From 6d38a626e23b4c1699939ccdd7c8ad1912dc47ee Mon Sep 17 00:00:00 2001 From: Tomasz Marciniak Date: Tue, 4 Mar 2025 16:11:59 +0100 Subject: [PATCH 1/5] chore(deps): replace cbor with cbor2 --- package.json | 3 +- pnpm-lock.yaml | 41 +- src/ethereum.ts | 1832 +++++++++++++++++++++++------------------------ 3 files changed, 925 insertions(+), 951 deletions(-) diff --git a/package.json b/package.json index 621826ef..efecd93b 100644 --- a/package.json +++ b/package.json @@ -73,8 +73,7 @@ "bn.js": "^5.2.1", "bs58check": "^4.0.0", "buffer": "^6.0.3", - "cbor": "^10.0.2", - "cbor-bigdecimal": "^10.0.2", + "cbor2": "1.12.0", "crc-32": "^1.2.2", "elliptic": "6.5.7", "hash.js": "^1.1.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 31f9a01f..41e5c878 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,7 +6,7 @@ settings: patchedDependencies: vitest@2.1.3: - hash: vwmc6yhalpfduebrkyv2xq7etq + hash: 0c337a8de71c98b9a0e1f0e80ef2bf86e1b90fb9871b385fff2d2a2d93ed3ffd path: patches/vitest@2.1.3.patch importers: @@ -49,12 +49,9 @@ importers: buffer: specifier: ^6.0.3 version: 6.0.3 - cbor: - specifier: ^10.0.2 - version: 10.0.2 - cbor-bigdecimal: - specifier: ^10.0.2 - version: 10.0.2(bignumber.js@9.1.2) + cbor2: + specifier: 1.12.0 + version: 1.12.0 crc-32: specifier: ^1.2.2 version: 1.2.2 @@ -181,7 +178,7 @@ importers: version: 4.3.0(@types/node@22.7.8)(rollup@4.24.0)(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.8)) vitest: specifier: 2.1.3 - version: 2.1.3(patch_hash=vwmc6yhalpfduebrkyv2xq7etq)(@types/node@22.7.8)(msw@2.5.0(typescript@5.6.3)) + version: 2.1.3(patch_hash=0c337a8de71c98b9a0e1f0e80ef2bf86e1b90fb9871b385fff2d2a2d93ed3ffd)(@types/node@22.7.8)(msw@2.5.0(typescript@5.6.3)) packages: @@ -1363,15 +1360,9 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - cbor-bigdecimal@10.0.2: - resolution: {integrity: sha512-O/rckJeYt+6rBmFsG8D6YIOdZs+sJmbgFh+Y1ld4PAIzwn6iFcLgdo1/pG9hYpEXAuSe3HBbULzIDusKjD655Q==} - engines: {node: '>=18'} - peerDependencies: - bignumber.js: ^9.1.0 - - cbor@10.0.2: - resolution: {integrity: sha512-wJjyC0Efg8yUKpq9/+5SIcUbmBtyw+ZbvE8nNwbfGEKUkrL01h5CQ7h9/OPWtSt5oikmx6E5MuB5rTFz8zmMww==} - engines: {node: '>=18'} + cbor2@1.12.0: + resolution: {integrity: sha512-3Cco8XQhi27DogSp9Ri6LYNZLi/TBY/JVnDe+mj06NkBjW/ZYOtekaEU4wZ4xcRMNrFkDv8KNtOAqHyDfz3lYg==} + engines: {node: '>=18.7'} chai@5.1.1: resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==} @@ -2170,10 +2161,6 @@ packages: resolution: {integrity: sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw==} hasBin: true - nofilter@3.1.0: - resolution: {integrity: sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==} - engines: {node: '>=12.19'} - object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} @@ -4109,13 +4096,7 @@ snapshots: callsites@3.1.0: {} - cbor-bigdecimal@10.0.2(bignumber.js@9.1.2): - dependencies: - bignumber.js: 9.1.2 - - cbor@10.0.2: - dependencies: - nofilter: 3.1.0 + cbor2@1.12.0: {} chai@5.1.1: dependencies: @@ -5030,8 +5011,6 @@ snapshots: node-gyp-build@4.8.2: {} - nofilter@3.1.0: {} - object-assign@4.1.1: {} once@1.4.0: @@ -5619,7 +5598,7 @@ snapshots: '@types/node': 22.7.8 fsevents: 2.3.3 - vitest@2.1.3(patch_hash=vwmc6yhalpfduebrkyv2xq7etq)(@types/node@22.7.8)(msw@2.5.0(typescript@5.6.3)): + vitest@2.1.3(patch_hash=0c337a8de71c98b9a0e1f0e80ef2bf86e1b90fb9871b385fff2d2a2d93ed3ffd)(@types/node@22.7.8)(msw@2.5.0(typescript@5.6.3)): dependencies: '@vitest/expect': 2.1.3 '@vitest/mocker': 2.1.3(@vitest/spy@2.1.3)(msw@2.5.0(typescript@5.6.3))(vite@5.4.9(@types/node@22.7.8)) diff --git a/src/ethereum.ts b/src/ethereum.ts index c820de0b..db9e4942 100644 --- a/src/ethereum.ts +++ b/src/ethereum.ts @@ -1,955 +1,951 @@ // Utils for Ethereum transactions. This is effecitvely a shim of ethereumjs-util, which // does not have browser (or, by proxy, React-Native) support. -import { Chain, Common, Hardfork } from '@ethereumjs/common'; -import { TransactionFactory } from '@ethereumjs/tx'; -import BN from 'bignumber.js'; -import { SignTypedDataVersion, TypedDataUtils } from '@metamask/eth-sig-util'; -import { keccak256 } from 'js-sha3'; -import { RLP } from '@ethereumjs/rlp'; -import secp256k1 from 'secp256k1'; +import { Chain, Common, Hardfork } from "@ethereumjs/common"; +import { RLP } from "@ethereumjs/rlp"; +import { TransactionFactory } from "@ethereumjs/tx"; +import { SignTypedDataVersion, TypedDataUtils } from "@metamask/eth-sig-util"; +import BN from "bignumber.js"; +import * as cbor from "cbor2"; +import { keccak256 } from "js-sha3"; +import secp256k1 from "secp256k1"; +import type { TransactionSerializable } from "viem"; import { - ASCII_REGEX, - HANDLE_LARGER_CHAIN_ID, - MAX_CHAIN_ID_BYTES, - ethMsgProtocol, -} from './constants'; -import { LatticeSignSchema } from './protocol'; + ASCII_REGEX, + HANDLE_LARGER_CHAIN_ID, + MAX_CHAIN_ID_BYTES, + ethMsgProtocol, +} from "./constants"; +import { LatticeSignSchema } from "./protocol"; +import { TRANSACTION_TYPE, type TransactionRequest } from "./types"; import { - buildSignerPathBuf, - ensureHexBuffer, - fixLen, - isAsciiStr, - splitFrames, -} from './util'; -import cbor from 'cbor'; -import bdec from 'cbor-bigdecimal'; -import { TransactionSerializable } from 'viem'; -import { TRANSACTION_TYPE, TransactionRequest } from './types'; + buildSignerPathBuf, + ensureHexBuffer, + fixLen, + isAsciiStr, + splitFrames, +} from "./util"; -bdec(cbor); - -const buildEthereumMsgRequest = function (input) { - if (!input.payload || !input.protocol || !input.signerPath) - throw new Error( - 'You must provide `payload`, `signerPath`, and `protocol` arguments in the messsage request', - ); - if (input.signerPath.length > 5 || input.signerPath.length < 2) - throw new Error('Please provide a signer path with 2-5 indices'); - const req = { - schema: LatticeSignSchema.ethereumMsg, - payload: null, - input, // Save the input for later - msg: null, // Save the buffered message for later - }; - switch (input.protocol) { - case 'signPersonal': - return buildPersonalSignRequest(req, input); - case 'eip712': - if (!input.fwConstants.eip712Supported) - throw new Error( - 'EIP712 is not supported by your Lattice firmware version. Please upgrade.', - ); - return buildEIP712Request(req, input); - default: - throw new Error('Unsupported protocol'); - } +const buildEthereumMsgRequest = (input) => { + if (!input.payload || !input.protocol || !input.signerPath) + throw new Error( + "You must provide `payload`, `signerPath`, and `protocol` arguments in the messsage request", + ); + if (input.signerPath.length > 5 || input.signerPath.length < 2) + throw new Error("Please provide a signer path with 2-5 indices"); + const req = { + schema: LatticeSignSchema.ethereumMsg, + payload: null, + input, // Save the input for later + msg: null, // Save the buffered message for later + }; + switch (input.protocol) { + case "signPersonal": + return buildPersonalSignRequest(req, input); + case "eip712": + if (!input.fwConstants.eip712Supported) + throw new Error( + "EIP712 is not supported by your Lattice firmware version. Please upgrade.", + ); + return buildEIP712Request(req, input); + default: + throw new Error("Unsupported protocol"); + } }; -const validateEthereumMsgResponse = function (res, req) { - const { signer, sig } = res; - const { input, msg, prehash = null } = req; - if (input.protocol === 'signPersonal') { - // NOTE: We are currently hardcoding networkID=1 and useEIP155=false but these - // may be configurable in future versions - const hash = prehash - ? prehash - : Buffer.from( - keccak256(Buffer.concat([get_personal_sign_prefix(msg.length), msg])), - 'hex', - ); - // Get recovery param with a `v` value of [27,28] by setting `useEIP155=false` - return addRecoveryParam(hash, sig, signer, { - chainId: 1, - useEIP155: false, - }); - } else if (input.protocol === 'eip712') { - req = convertBigNumbers(req); - const encoded = TypedDataUtils.eip712Hash( - req.input.payload, - SignTypedDataVersion.V4, - ); - const digest = prehash ? prehash : encoded; - const chainId = parseInt(input.payload.domain.chainId, 16); - // Get recovery param with a `v` value of [27,28] by setting `useEIP155=false` - return addRecoveryParam(digest, sig, signer, { chainId, useEIP155: false }); - } else { - throw new Error('Unsupported protocol'); - } +const validateEthereumMsgResponse = (res, req) => { + const { signer, sig } = res; + const { input, msg, prehash = null } = req; + if (input.protocol === "signPersonal") { + // NOTE: We are currently hardcoding networkID=1 and useEIP155=false but these + // may be configurable in future versions + const hash = prehash + ? prehash + : Buffer.from( + keccak256(Buffer.concat([get_personal_sign_prefix(msg.length), msg])), + "hex", + ); + // Get recovery param with a `v` value of [27,28] by setting `useEIP155=false` + return addRecoveryParam(hash, sig, signer, { + chainId: 1, + useEIP155: false, + }); + } else if (input.protocol === "eip712") { + req = convertBigNumbers(req); + const encoded = TypedDataUtils.eip712Hash( + req.input.payload, + SignTypedDataVersion.V4, + ); + const digest = prehash ? prehash : encoded; + const chainId = Number.parseInt(input.payload.domain.chainId, 16); + // Get recovery param with a `v` value of [27,28] by setting `useEIP155=false` + return addRecoveryParam(digest, sig, signer, { chainId, useEIP155: false }); + } else { + throw new Error("Unsupported protocol"); + } }; function convertBigNumbers(obj) { - if (BN.isBigNumber(obj)) { - return obj.toFixed(); - } else if (Array.isArray(obj)) { - return obj.map(convertBigNumbers); - } else if (typeof obj === 'object' && obj !== null) { - const newObj = {}; - for (const [key, value] of Object.entries(obj)) { - newObj[key] = convertBigNumbers(value); - } - return newObj; - } else { - return obj; - } + if (BN.isBigNumber(obj)) { + return obj.toFixed(); + } else if (Array.isArray(obj)) { + return obj.map(convertBigNumbers); + } else if (typeof obj === "object" && obj !== null) { + const newObj = {}; + for (const [key, value] of Object.entries(obj)) { + newObj[key] = convertBigNumbers(value); + } + return newObj; + } else { + return obj; + } } -const buildEthereumTxRequest = function (data) { - try { - let { chainId = 1 } = data; - const { signerPath, eip155 = null, fwConstants, type = null } = data; - const { - contractDeployKey, - extraDataFrameSz, - extraDataMaxFrames, - prehashAllowed, - } = fwConstants; - const EXTRA_DATA_ALLOWED = extraDataFrameSz > 0 && extraDataMaxFrames > 0; - const MAX_BASE_DATA_SZ = fwConstants.ethMaxDataSz; - const VAR_PATH_SZ = fwConstants.varAddrPathSzAllowed; - // Sanity checks: - // There are a handful of named chains we allow the user to reference (`chainIds`) - // Custom chainIDs should be either numerical or hex strings - if ( - typeof chainId !== 'number' && - isValidChainIdHexNumStr(chainId) === false - ) { - chainId = chainIds[chainId]; - } - // If this was not a custom chainID and we cannot find the name of it, exit - if (!chainId) throw new Error('Unsupported chain ID or name'); - // Sanity check on signePath - if (!signerPath) throw new Error('`signerPath` not provided'); +const buildEthereumTxRequest = (data) => { + try { + let { chainId = 1 } = data; + const { signerPath, eip155 = null, fwConstants, type = null } = data; + const { + contractDeployKey, + extraDataFrameSz, + extraDataMaxFrames, + prehashAllowed, + } = fwConstants; + const EXTRA_DATA_ALLOWED = extraDataFrameSz > 0 && extraDataMaxFrames > 0; + const MAX_BASE_DATA_SZ = fwConstants.ethMaxDataSz; + const VAR_PATH_SZ = fwConstants.varAddrPathSzAllowed; + // Sanity checks: + // There are a handful of named chains we allow the user to reference (`chainIds`) + // Custom chainIDs should be either numerical or hex strings + if ( + typeof chainId !== "number" && + isValidChainIdHexNumStr(chainId) === false + ) { + chainId = chainIds[chainId]; + } + // If this was not a custom chainID and we cannot find the name of it, exit + if (!chainId) throw new Error("Unsupported chain ID or name"); + // Sanity check on signePath + if (!signerPath) throw new Error("`signerPath` not provided"); - // Is this a contract deployment? - if (data.to === null && !contractDeployKey) { - throw new Error( - 'Contract deployment not supported. Please update your Lattice firmware.', - ); - } - const isDeployment = data.to === null && contractDeployKey; - // We support eip1559 and eip2930 types (as well as legacy) - const eip1559IsAllowed = - fwConstants.allowedEthTxTypes && - fwConstants.allowedEthTxTypes.indexOf(2) > -1; - const eip2930IsAllowed = - fwConstants.allowedEthTxTypes && - fwConstants.allowedEthTxTypes.indexOf(1) > -1; - const isEip1559 = eip1559IsAllowed && (type === 2 || type === 'eip1559'); - const isEip2930 = eip2930IsAllowed && (type === 1 || type === 'eip2930'); - if (type !== null && !isEip1559 && !isEip2930) - throw new Error('Unsupported Ethereum transaction type'); - // Determine if we should use EIP155 given the chainID. - // If we are explicitly told to use eip155, we will use it. Otherwise, - // we will look up if the specified chainId is associated with a chain - // that does not use EIP155 by default. Note that most do use EIP155. - let useEIP155 = chainUsesEIP155(chainId); - if (eip155 !== null && typeof eip155 === 'boolean') { - useEIP155 = eip155; - } else if (isEip1559 || isEip2930) { - // Newer transaction types do not use EIP155 since the chainId is serialized - useEIP155 = false; - } + // Is this a contract deployment? + if (data.to === null && !contractDeployKey) { + throw new Error( + "Contract deployment not supported. Please update your Lattice firmware.", + ); + } + const isDeployment = data.to === null && contractDeployKey; + // We support eip1559 and eip2930 types (as well as legacy) + const eip1559IsAllowed = + fwConstants.allowedEthTxTypes && + fwConstants.allowedEthTxTypes.indexOf(2) > -1; + const eip2930IsAllowed = + fwConstants.allowedEthTxTypes && + fwConstants.allowedEthTxTypes.indexOf(1) > -1; + const isEip1559 = eip1559IsAllowed && (type === 2 || type === "eip1559"); + const isEip2930 = eip2930IsAllowed && (type === 1 || type === "eip2930"); + if (type !== null && !isEip1559 && !isEip2930) + throw new Error("Unsupported Ethereum transaction type"); + // Determine if we should use EIP155 given the chainID. + // If we are explicitly told to use eip155, we will use it. Otherwise, + // we will look up if the specified chainId is associated with a chain + // that does not use EIP155 by default. Note that most do use EIP155. + let useEIP155 = chainUsesEIP155(chainId); + if (eip155 !== null && typeof eip155 === "boolean") { + useEIP155 = eip155; + } else if (isEip1559 || isEip2930) { + // Newer transaction types do not use EIP155 since the chainId is serialized + useEIP155 = false; + } - // Hack for metamask, which sends value=null for 0 ETH transactions - if (!data.value) data.value = 0; + // Hack for metamask, which sends value=null for 0 ETH transactions + if (!data.value) data.value = 0; - //-------------- - // 1. BUILD THE RAW TX FOR FUTURE RLP ENCODING - //-------------- - // Ensure all fields are 0x-prefixed hex strings - const rawTx = []; - // Build the transaction buffer array - const chainIdBytes = ensureHexBuffer(chainId); - const nonceBytes = ensureHexBuffer(data.nonce); - let gasPriceBytes; - const gasLimitBytes = ensureHexBuffer(data.gasLimit); - // Handle contract deployment (indicated by `to` being `null`) - // For contract deployment we write a 20-byte key to the request - // buffer, which gets swapped for an empty buffer in firmware. - let toRlpElem, toBytes; - if (isDeployment) { - toRlpElem = Buffer.alloc(0); - toBytes = ensureHexBuffer(contractDeployKey); - } else { - toRlpElem = ensureHexBuffer(data.to); - toBytes = ensureHexBuffer(data.to); - } - const valueBytes = ensureHexBuffer(data.value); - const dataBytes = ensureHexBuffer(data.data); + //-------------- + // 1. BUILD THE RAW TX FOR FUTURE RLP ENCODING + //-------------- + // Ensure all fields are 0x-prefixed hex strings + const rawTx = []; + // Build the transaction buffer array + const chainIdBytes = ensureHexBuffer(chainId); + const nonceBytes = ensureHexBuffer(data.nonce); + let gasPriceBytes; + const gasLimitBytes = ensureHexBuffer(data.gasLimit); + // Handle contract deployment (indicated by `to` being `null`) + // For contract deployment we write a 20-byte key to the request + // buffer, which gets swapped for an empty buffer in firmware. + let toRlpElem, toBytes; + if (isDeployment) { + toRlpElem = Buffer.alloc(0); + toBytes = ensureHexBuffer(contractDeployKey); + } else { + toRlpElem = ensureHexBuffer(data.to); + toBytes = ensureHexBuffer(data.to); + } + const valueBytes = ensureHexBuffer(data.value); + const dataBytes = ensureHexBuffer(data.data); - if (isEip1559 || isEip2930) { - // EIP1559 and EIP2930 transactions have a chainID field - rawTx.push(chainIdBytes); - } - rawTx.push(nonceBytes); - let maxPriorityFeePerGasBytes, maxFeePerGasBytes; - if (isEip1559) { - if (!data.maxPriorityFeePerGas) - throw new Error( - 'EIP1559 transactions must include `maxPriorityFeePerGas`', - ); - maxPriorityFeePerGasBytes = ensureHexBuffer(data.maxPriorityFeePerGas); - rawTx.push(maxPriorityFeePerGasBytes); - maxFeePerGasBytes = ensureHexBuffer(data.maxFeePerGas); - rawTx.push(maxFeePerGasBytes); - // EIP1559 renamed "gasPrice" to "maxFeePerGas", but firmware still - // uses `gasPrice` in the struct, so update that value here. - gasPriceBytes = maxFeePerGasBytes; - } else { - // EIP1559 transactions do not have the gasPrice field - gasPriceBytes = ensureHexBuffer(data.gasPrice); - rawTx.push(gasPriceBytes); - } - rawTx.push(gasLimitBytes); - rawTx.push(toRlpElem); - rawTx.push(valueBytes); - rawTx.push(dataBytes); - // We do not currently support accessList in firmware so we need to prehash if - // the list is non-null - let PREHASH_FROM_ACCESS_LIST = false; - if (isEip1559 || isEip2930) { - const accessList = []; - if (Array.isArray(data.accessList)) { - data.accessList.forEach((listItem) => { - const keys = []; - listItem.storageKeys.forEach((key) => { - keys.push(ensureHexBuffer(key)); - }); - accessList.push([ensureHexBuffer(listItem.address), keys]); - PREHASH_FROM_ACCESS_LIST = true; - }); - } - rawTx.push(accessList); - } else if (useEIP155 === true) { - // Add empty v,r,s values for EIP155 legacy transactions - rawTx.push(chainIdBytes); // v (which is the same as chainId in EIP155 txs) - rawTx.push(ensureHexBuffer(null)); // r - rawTx.push(ensureHexBuffer(null)); // s - } - //-------------- - // 2. BUILD THE LATTICE REQUEST PAYLOAD - //-------------- - const ETH_TX_NON_DATA_SZ = 122; // Accounts for metadata and non-data params - const txReqPayload = Buffer.alloc(MAX_BASE_DATA_SZ + ETH_TX_NON_DATA_SZ); - let off = 0; - // 1. EIP155 switch and chainID - //------------------ - txReqPayload.writeUInt8(Number(useEIP155), off); - off++; - // NOTE: Originally we designed for a 1-byte chainID, but modern rollup chains use much larger - // chainID values. To account for these, we will put the chainID into the `data` buffer if it - // is >=255. Values up to UINT64_MAX will be allowed. - let chainIdBuf; - let chainIdBufSz = 0; - if (useChainIdBuffer(chainId) === true) { - chainIdBuf = getChainIdBuf(chainId); - chainIdBufSz = chainIdBuf.length; - if (chainIdBufSz > MAX_CHAIN_ID_BYTES) - throw new Error('ChainID provided is too large.'); - // Signal to Lattice firmware that it needs to read the chainId from the tx.data buffer - txReqPayload.writeUInt8(HANDLE_LARGER_CHAIN_ID, off); - off++; - } else { - // For chainIDs <255, write it to the chainId u8 slot in the main tx buffer - chainIdBuf = ensureHexBuffer(chainId); - if (chainIdBuf.length !== 1) throw new Error('Error parsing chainID'); - chainIdBuf.copy(txReqPayload, off); - off += chainIdBuf.length; - } - // 2. Signer Path - //------------------ - const signerPathBuf = buildSignerPathBuf(signerPath, VAR_PATH_SZ); - signerPathBuf.copy(txReqPayload, off); - off += signerPathBuf.length; + if (isEip1559 || isEip2930) { + // EIP1559 and EIP2930 transactions have a chainID field + rawTx.push(chainIdBytes); + } + rawTx.push(nonceBytes); + let maxPriorityFeePerGasBytes, maxFeePerGasBytes; + if (isEip1559) { + if (!data.maxPriorityFeePerGas) + throw new Error( + "EIP1559 transactions must include `maxPriorityFeePerGas`", + ); + maxPriorityFeePerGasBytes = ensureHexBuffer(data.maxPriorityFeePerGas); + rawTx.push(maxPriorityFeePerGasBytes); + maxFeePerGasBytes = ensureHexBuffer(data.maxFeePerGas); + rawTx.push(maxFeePerGasBytes); + // EIP1559 renamed "gasPrice" to "maxFeePerGas", but firmware still + // uses `gasPrice` in the struct, so update that value here. + gasPriceBytes = maxFeePerGasBytes; + } else { + // EIP1559 transactions do not have the gasPrice field + gasPriceBytes = ensureHexBuffer(data.gasPrice); + rawTx.push(gasPriceBytes); + } + rawTx.push(gasLimitBytes); + rawTx.push(toRlpElem); + rawTx.push(valueBytes); + rawTx.push(dataBytes); + // We do not currently support accessList in firmware so we need to prehash if + // the list is non-null + let PREHASH_FROM_ACCESS_LIST = false; + if (isEip1559 || isEip2930) { + const accessList = []; + if (Array.isArray(data.accessList)) { + data.accessList.forEach((listItem) => { + const keys = []; + listItem.storageKeys.forEach((key) => { + keys.push(ensureHexBuffer(key)); + }); + accessList.push([ensureHexBuffer(listItem.address), keys]); + PREHASH_FROM_ACCESS_LIST = true; + }); + } + rawTx.push(accessList); + } else if (useEIP155 === true) { + // Add empty v,r,s values for EIP155 legacy transactions + rawTx.push(chainIdBytes); // v (which is the same as chainId in EIP155 txs) + rawTx.push(ensureHexBuffer(null)); // r + rawTx.push(ensureHexBuffer(null)); // s + } + //-------------- + // 2. BUILD THE LATTICE REQUEST PAYLOAD + //-------------- + const ETH_TX_NON_DATA_SZ = 122; // Accounts for metadata and non-data params + const txReqPayload = Buffer.alloc(MAX_BASE_DATA_SZ + ETH_TX_NON_DATA_SZ); + let off = 0; + // 1. EIP155 switch and chainID + //------------------ + txReqPayload.writeUInt8(Number(useEIP155), off); + off++; + // NOTE: Originally we designed for a 1-byte chainID, but modern rollup chains use much larger + // chainID values. To account for these, we will put the chainID into the `data` buffer if it + // is >=255. Values up to UINT64_MAX will be allowed. + let chainIdBuf; + let chainIdBufSz = 0; + if (useChainIdBuffer(chainId) === true) { + chainIdBuf = getChainIdBuf(chainId); + chainIdBufSz = chainIdBuf.length; + if (chainIdBufSz > MAX_CHAIN_ID_BYTES) + throw new Error("ChainID provided is too large."); + // Signal to Lattice firmware that it needs to read the chainId from the tx.data buffer + txReqPayload.writeUInt8(HANDLE_LARGER_CHAIN_ID, off); + off++; + } else { + // For chainIDs <255, write it to the chainId u8 slot in the main tx buffer + chainIdBuf = ensureHexBuffer(chainId); + if (chainIdBuf.length !== 1) throw new Error("Error parsing chainID"); + chainIdBuf.copy(txReqPayload, off); + off += chainIdBuf.length; + } + // 2. Signer Path + //------------------ + const signerPathBuf = buildSignerPathBuf(signerPath, VAR_PATH_SZ); + signerPathBuf.copy(txReqPayload, off); + off += signerPathBuf.length; - // 3. ETH TX request data - //------------------ - if (nonceBytes.length > 4) throw new Error('Nonce too large'); - nonceBytes.copy(txReqPayload, off + (4 - nonceBytes.length)); - off += 4; - if (gasPriceBytes.length > 8) throw new Error('Gas price too large'); - gasPriceBytes.copy(txReqPayload, off + (8 - gasPriceBytes.length)); - off += 8; - if (gasLimitBytes.length > 4) throw new Error('Gas limit too large'); - gasLimitBytes.copy(txReqPayload, off + (4 - gasLimitBytes.length)); - off += 4; - if (toBytes.length !== 20) throw new Error('Invalid `to` address'); - toBytes.copy(txReqPayload, off); - off += 20; - if (valueBytes.length > 32) throw new Error('Value too large'); - valueBytes.copy(txReqPayload, off + (32 - valueBytes.length)); - off += 32; + // 3. ETH TX request data + //------------------ + if (nonceBytes.length > 4) throw new Error("Nonce too large"); + nonceBytes.copy(txReqPayload, off + (4 - nonceBytes.length)); + off += 4; + if (gasPriceBytes.length > 8) throw new Error("Gas price too large"); + gasPriceBytes.copy(txReqPayload, off + (8 - gasPriceBytes.length)); + off += 8; + if (gasLimitBytes.length > 4) throw new Error("Gas limit too large"); + gasLimitBytes.copy(txReqPayload, off + (4 - gasLimitBytes.length)); + off += 4; + if (toBytes.length !== 20) throw new Error("Invalid `to` address"); + toBytes.copy(txReqPayload, off); + off += 20; + if (valueBytes.length > 32) throw new Error("Value too large"); + valueBytes.copy(txReqPayload, off + (32 - valueBytes.length)); + off += 32; - // Extra Tx data comes before `data` in the struct - let PREHASH_UNSUPPORTED = false; - if (fwConstants.allowedEthTxTypes) { - // Some types may not be supported by firmware, so we will need to prehash - if (PREHASH_FROM_ACCESS_LIST) { - PREHASH_UNSUPPORTED = true; - } - txReqPayload.writeUInt8(PREHASH_UNSUPPORTED ? 1 : 0, off); - off += 1; - // EIP1559 & EIP2930 struct version - if (isEip1559) { - txReqPayload.writeUInt8(2, off); - off += 1; // Eip1559 type enum value - if (maxPriorityFeePerGasBytes.length > 8) - throw new Error('maxPriorityFeePerGasBytes too large'); - maxPriorityFeePerGasBytes.copy( - txReqPayload, - off + (8 - maxPriorityFeePerGasBytes.length), - ); - off += 8; // Skip EIP1559 params - } else if (isEip2930) { - txReqPayload.writeUInt8(1, off); - off += 1; // Eip2930 type enum value - off += 8; // Skip EIP1559 params - } else { - off += 9; // Skip EIP1559 and EIP2930 params - } - } + // Extra Tx data comes before `data` in the struct + let PREHASH_UNSUPPORTED = false; + if (fwConstants.allowedEthTxTypes) { + // Some types may not be supported by firmware, so we will need to prehash + if (PREHASH_FROM_ACCESS_LIST) { + PREHASH_UNSUPPORTED = true; + } + txReqPayload.writeUInt8(PREHASH_UNSUPPORTED ? 1 : 0, off); + off += 1; + // EIP1559 & EIP2930 struct version + if (isEip1559) { + txReqPayload.writeUInt8(2, off); + off += 1; // Eip1559 type enum value + if (maxPriorityFeePerGasBytes.length > 8) + throw new Error("maxPriorityFeePerGasBytes too large"); + maxPriorityFeePerGasBytes.copy( + txReqPayload, + off + (8 - maxPriorityFeePerGasBytes.length), + ); + off += 8; // Skip EIP1559 params + } else if (isEip2930) { + txReqPayload.writeUInt8(1, off); + off += 1; // Eip2930 type enum value + off += 8; // Skip EIP1559 params + } else { + off += 9; // Skip EIP1559 and EIP2930 params + } + } - // Flow data into extraData requests, which will follow-up transaction requests, if supported/applicable - const extraDataPayloads = []; - let prehash = null; + // Flow data into extraData requests, which will follow-up transaction requests, if supported/applicable + const extraDataPayloads = []; + let prehash = null; - // Create the buffer, prefix with chainId (if needed) and add data slice - const dataSz = dataBytes.length || 0; - const chainIdExtraSz = chainIdBufSz > 0 ? chainIdBufSz + 1 : 0; - const dataToCopy = Buffer.alloc(dataSz + chainIdExtraSz); - if (chainIdExtraSz > 0) { - dataToCopy.writeUInt8(chainIdBufSz, 0); - chainIdBuf.copy(dataToCopy, 1); - } - dataBytes.copy(dataToCopy, chainIdExtraSz); + // Create the buffer, prefix with chainId (if needed) and add data slice + const dataSz = dataBytes.length || 0; + const chainIdExtraSz = chainIdBufSz > 0 ? chainIdBufSz + 1 : 0; + const dataToCopy = Buffer.alloc(dataSz + chainIdExtraSz); + if (chainIdExtraSz > 0) { + dataToCopy.writeUInt8(chainIdBufSz, 0); + chainIdBuf.copy(dataToCopy, 1); + } + dataBytes.copy(dataToCopy, chainIdExtraSz); - if (dataSz > MAX_BASE_DATA_SZ) { - // Determine sizes and run through sanity checks - const totalSz = dataSz + chainIdExtraSz; - const maxSzAllowed = - MAX_BASE_DATA_SZ + extraDataMaxFrames * extraDataFrameSz; + if (dataSz > MAX_BASE_DATA_SZ) { + // Determine sizes and run through sanity checks + const totalSz = dataSz + chainIdExtraSz; + const maxSzAllowed = + MAX_BASE_DATA_SZ + extraDataMaxFrames * extraDataFrameSz; - if (prehashAllowed && totalSz > maxSzAllowed) { - // If this payload is too large to send, but the Lattice allows a prehashed message, do that - prehash = Buffer.from( - keccak256(get_rlp_encoded_preimage(rawTx, type)), - 'hex', - ); - } else { - if ( - !EXTRA_DATA_ALLOWED || - (EXTRA_DATA_ALLOWED && totalSz > maxSzAllowed) - ) - throw new Error( - `Data field too large (got ${dataBytes.length}; must be <=${ - maxSzAllowed - chainIdExtraSz - } bytes)`, - ); - // Split overflow data into extraData frames - const frames = splitFrames( - dataToCopy.slice(MAX_BASE_DATA_SZ), - extraDataFrameSz, - ); - frames.forEach((frame) => { - const szLE = Buffer.alloc(4); - szLE.writeUInt32LE(frame.length, 0); - extraDataPayloads.push(Buffer.concat([szLE, frame])); - }); - } - } else if (PREHASH_UNSUPPORTED) { - // If something is unsupported in firmware but we want to allow such transactions, - // we prehash the message here. - prehash = Buffer.from( - keccak256(get_rlp_encoded_preimage(rawTx, type)), - 'hex', - ); - } + if (prehashAllowed && totalSz > maxSzAllowed) { + // If this payload is too large to send, but the Lattice allows a prehashed message, do that + prehash = Buffer.from( + keccak256(get_rlp_encoded_preimage(rawTx, type)), + "hex", + ); + } else { + if ( + !EXTRA_DATA_ALLOWED || + (EXTRA_DATA_ALLOWED && totalSz > maxSzAllowed) + ) + throw new Error( + `Data field too large (got ${dataBytes.length}; must be <=${ + maxSzAllowed - chainIdExtraSz + } bytes)`, + ); + // Split overflow data into extraData frames + const frames = splitFrames( + dataToCopy.slice(MAX_BASE_DATA_SZ), + extraDataFrameSz, + ); + frames.forEach((frame) => { + const szLE = Buffer.alloc(4); + szLE.writeUInt32LE(frame.length, 0); + extraDataPayloads.push(Buffer.concat([szLE, frame])); + }); + } + } else if (PREHASH_UNSUPPORTED) { + // If something is unsupported in firmware but we want to allow such transactions, + // we prehash the message here. + prehash = Buffer.from( + keccak256(get_rlp_encoded_preimage(rawTx, type)), + "hex", + ); + } - // Write the data size (does *NOT* include the chainId buffer, if that exists) - txReqPayload.writeUInt16BE(dataBytes.length, off); - off += 2; - // Copy in the chainId buffer if needed - if (chainIdBufSz > 0) { - txReqPayload.writeUInt8(chainIdBufSz, off); - off++; - chainIdBuf.copy(txReqPayload, off); - off += chainIdBufSz; - } - // Copy the first slice of the data itself. If this payload has been pre-hashed, include it - // in the `data` field. This will result in a different Lattice screen being drawn. - if (prehash) { - prehash.copy(txReqPayload, off); - off += MAX_BASE_DATA_SZ; - } else { - dataBytes.slice(0, MAX_BASE_DATA_SZ).copy(txReqPayload, off); - off += MAX_BASE_DATA_SZ; - } - return { - rawTx, - type, - payload: txReqPayload.slice(0, off), - extraDataPayloads, - schema: LatticeSignSchema.ethereum, // We will use eth transfer for all ETH txs for v1 - chainId, - useEIP155, - signerPath, - }; - } catch (err) { - return { err: err.message }; - } + // Write the data size (does *NOT* include the chainId buffer, if that exists) + txReqPayload.writeUInt16BE(dataBytes.length, off); + off += 2; + // Copy in the chainId buffer if needed + if (chainIdBufSz > 0) { + txReqPayload.writeUInt8(chainIdBufSz, off); + off++; + chainIdBuf.copy(txReqPayload, off); + off += chainIdBufSz; + } + // Copy the first slice of the data itself. If this payload has been pre-hashed, include it + // in the `data` field. This will result in a different Lattice screen being drawn. + if (prehash) { + prehash.copy(txReqPayload, off); + off += MAX_BASE_DATA_SZ; + } else { + dataBytes.slice(0, MAX_BASE_DATA_SZ).copy(txReqPayload, off); + off += MAX_BASE_DATA_SZ; + } + return { + rawTx, + type, + payload: txReqPayload.slice(0, off), + extraDataPayloads, + schema: LatticeSignSchema.ethereum, // We will use eth transfer for all ETH txs for v1 + chainId, + useEIP155, + signerPath, + }; + } catch (err) { + return { err: err.message }; + } }; // From ethereumjs-util function stripZeros(a) { - let first = a[0]; - while (a.length > 0 && first.toString() === '0') { - a = a.slice(1); - first = a[0]; - } - return a; + let first = a[0]; + while (a.length > 0 && first.toString() === "0") { + a = a.slice(1); + first = a[0]; + } + return a; } // Given a 64-byte signature [r,s] we need to figure out the v value // and attah the full signature to the end of the transaction payload -const buildEthRawTx = function (tx, sig, address) { - // RLP-encode the data we sent to the lattice - const hash = Buffer.from( - keccak256(get_rlp_encoded_preimage(tx.rawTx, tx.type)), - 'hex', - ); - const newSig = addRecoveryParam(hash, sig, address, tx); - // Use the signature to generate a new raw transaction payload - // Strip the last 3 items and replace them with signature components - const newRawTx = tx.useEIP155 ? tx.rawTx.slice(0, -3) : tx.rawTx; - newRawTx.push(newSig.v); - // Per `ethereumjs-tx`, RLP encoding should include signature components w/ stripped zeros - // See: https://github.com/ethereumjs/ethereumjs-tx/blob/master/src/transaction.ts#L187 - newRawTx.push(stripZeros(newSig.r)); - newRawTx.push(stripZeros(newSig.s)); - let rlpEncodedWithSig = Buffer.from(RLP.encode(newRawTx)); - if (tx.type) { - rlpEncodedWithSig = Buffer.concat([ - Buffer.from([tx.type]), - rlpEncodedWithSig, - ]); - } - return { rawTx: rlpEncodedWithSig.toString('hex'), sigWithV: newSig }; +const buildEthRawTx = (tx, sig, address) => { + // RLP-encode the data we sent to the lattice + const hash = Buffer.from( + keccak256(get_rlp_encoded_preimage(tx.rawTx, tx.type)), + "hex", + ); + const newSig = addRecoveryParam(hash, sig, address, tx); + // Use the signature to generate a new raw transaction payload + // Strip the last 3 items and replace them with signature components + const newRawTx = tx.useEIP155 ? tx.rawTx.slice(0, -3) : tx.rawTx; + newRawTx.push(newSig.v); + // Per `ethereumjs-tx`, RLP encoding should include signature components w/ stripped zeros + // See: https://github.com/ethereumjs/ethereumjs-tx/blob/master/src/transaction.ts#L187 + newRawTx.push(stripZeros(newSig.r)); + newRawTx.push(stripZeros(newSig.s)); + let rlpEncodedWithSig = Buffer.from(RLP.encode(newRawTx)); + if (tx.type) { + rlpEncodedWithSig = Buffer.concat([ + Buffer.from([tx.type]), + rlpEncodedWithSig, + ]); + } + return { rawTx: rlpEncodedWithSig.toString("hex"), sigWithV: newSig }; }; // Attach a recovery parameter to a signature by brute-forcing ECRecover function addRecoveryParam(hashBuf, sig, address, txData = {}) { - try { - // Rebuild the keccak256 hash here so we can `ecrecover` - const hash = new Uint8Array(hashBuf); - let v = 0; - // Fix signature componenet lengths to 32 bytes each - const r = fixLen(sig.r, 32); - sig.r = r; - const s = fixLen(sig.s, 32); - sig.s = s; - // Calculate the recovery param - const rs = new Uint8Array(Buffer.concat([r, s])); - let pubkey = secp256k1.ecdsaRecover(rs, v, hash, false).slice(1); - // If the first `v` value is a match, return the sig! - if (pubToAddrStr(pubkey) === address.toString('hex')) { - sig.v = getRecoveryParam(v, txData); - return sig; - } - // Otherwise, try the other `v` value - v = 1; - pubkey = secp256k1.ecdsaRecover(rs, v, hash, false).slice(1); - if (pubToAddrStr(pubkey) === address.toString('hex')) { - sig.v = getRecoveryParam(v, txData); - return sig; - } else { - // If neither is a match, we should return an error - throw new Error('Invalid Ethereum signature returned.'); - } - } catch (err) { - throw new Error(err); - } + try { + // Rebuild the keccak256 hash here so we can `ecrecover` + const hash = new Uint8Array(hashBuf); + let v = 0; + // Fix signature componenet lengths to 32 bytes each + const r = fixLen(sig.r, 32); + sig.r = r; + const s = fixLen(sig.s, 32); + sig.s = s; + // Calculate the recovery param + const rs = new Uint8Array(Buffer.concat([r, s])); + let pubkey = secp256k1.ecdsaRecover(rs, v, hash, false).slice(1); + // If the first `v` value is a match, return the sig! + if (pubToAddrStr(pubkey) === address.toString("hex")) { + sig.v = getRecoveryParam(v, txData); + return sig; + } + // Otherwise, try the other `v` value + v = 1; + pubkey = secp256k1.ecdsaRecover(rs, v, hash, false).slice(1); + if (pubToAddrStr(pubkey) === address.toString("hex")) { + sig.v = getRecoveryParam(v, txData); + return sig; + } else { + // If neither is a match, we should return an error + throw new Error("Invalid Ethereum signature returned."); + } + } catch (err) { + throw new Error(err); + } } // Convert an RLP-serialized transaction (plus signature) into a transaction hash -const hashTransaction = function (serializedTx) { - return keccak256(Buffer.from(serializedTx, 'hex')); -}; +const hashTransaction = (serializedTx) => + keccak256(Buffer.from(serializedTx, "hex")); // Returns address string given public key buffer function pubToAddrStr(pub) { - return keccak256(pub).slice(-40); + return keccak256(pub).slice(-40); } // Convert a 0/1 `v` into a recovery param: // * For non-EIP155 transactions, return `27 + v` // * For EIP155 transactions, return `(CHAIN_ID*2) + 35 + v` function getRecoveryParam(v, txData: any = {}) { - const { chainId, useEIP155, type } = txData; - // For EIP1559 and EIP2930 transactions, we want the recoveryParam (0 or 1) - // rather than the `v` value because the `chainId` is already included in the - // transaction payload. - if (type === 1 || type === 2) { - return ensureHexBuffer(v, true); // 0 or 1, with 0 expected as an empty buffer - } else if (!useEIP155 || !chainId) { - // For ETH messages and non-EIP155 chains the set should be [27, 28] for `v` - return Buffer.from(new BN(v).plus(27).toString(16), 'hex'); - } + const { chainId, useEIP155, type } = txData; + // For EIP1559 and EIP2930 transactions, we want the recoveryParam (0 or 1) + // rather than the `v` value because the `chainId` is already included in the + // transaction payload. + if (type === 1 || type === 2) { + return ensureHexBuffer(v, true); // 0 or 1, with 0 expected as an empty buffer + } else if (!useEIP155 || !chainId) { + // For ETH messages and non-EIP155 chains the set should be [27, 28] for `v` + return Buffer.from(new BN(v).plus(27).toString(16), "hex"); + } - // We will use EIP155 in most cases. Convert v to a bignum and operate on it. - // Note that the protocol calls for v = (CHAIN_ID*2) + 35/36, where 35 or 36 - // is decided on based on the ecrecover result. `v` is passed in as either 0 or 1 - // so we add 35 to that. - const chainIdBuf = getChainIdBuf(chainId); - const chainIdBN = new BN(chainIdBuf.toString('hex'), 16); - return ensureHexBuffer( - `0x${chainIdBN.times(2).plus(35).plus(v).toString(16)}`, - ); + // We will use EIP155 in most cases. Convert v to a bignum and operate on it. + // Note that the protocol calls for v = (CHAIN_ID*2) + 35/36, where 35 or 36 + // is decided on based on the ecrecover result. `v` is passed in as either 0 or 1 + // so we add 35 to that. + const chainIdBuf = getChainIdBuf(chainId); + const chainIdBN = new BN(chainIdBuf.toString("hex"), 16); + return ensureHexBuffer( + `0x${chainIdBN.times(2).plus(35).plus(v).toString(16)}`, + ); } const chainIds = { - mainnet: 1, - roptsten: 3, - rinkeby: 4, - kovan: 42, - goerli: 5, + mainnet: 1, + roptsten: 3, + rinkeby: 4, + kovan: 42, + goerli: 5, }; // Get a buffer containing the chainId value. // Returns a 1, 2, 4, or 8 byte buffer with the chainId encoded in big endian function getChainIdBuf(chainId) { - let b; - // If our chainID is a hex string, we can convert it to a hex - // buffer directly - if (true === isValidChainIdHexNumStr(chainId)) b = ensureHexBuffer(chainId); - // If our chainID is a base-10 number, parse with bignumber.js and convert to hex buffer - else b = ensureHexBuffer(`0x${new BN(chainId).toString(16)}`); - // Make sure the buffer is an allowed size - if (b.length > 8) throw new Error('ChainID provided is too large.'); - // If this matches a u16, u32, or u64 size, return it now - if (b.length <= 2 || b.length === 4 || b.length === 8) return b; - // For other size buffers, we need to pack into u32 or u64 before returning; - let buf; - if (b.length === 3) { - buf = Buffer.alloc(4); - buf.writeUInt32BE(chainId); - } else if (b.length <= 8) { - buf = Buffer.alloc(8); - b.copy(buf, 8 - b.length); - } - return buf; + let b; + // If our chainID is a hex string, we can convert it to a hex + // buffer directly + if (true === isValidChainIdHexNumStr(chainId)) b = ensureHexBuffer(chainId); + // If our chainID is a base-10 number, parse with bignumber.js and convert to hex buffer + else b = ensureHexBuffer(`0x${new BN(chainId).toString(16)}`); + // Make sure the buffer is an allowed size + if (b.length > 8) throw new Error("ChainID provided is too large."); + // If this matches a u16, u32, or u64 size, return it now + if (b.length <= 2 || b.length === 4 || b.length === 8) return b; + // For other size buffers, we need to pack into u32 or u64 before returning; + let buf; + if (b.length === 3) { + buf = Buffer.alloc(4); + buf.writeUInt32BE(chainId); + } else if (b.length <= 8) { + buf = Buffer.alloc(8); + b.copy(buf, 8 - b.length); + } + return buf; } // Determine if the chain uses EIP155 by default, based on the chainID function chainUsesEIP155(chainID) { - switch (chainID) { - case 3: // ropsten - case 4: // rinkeby - return false; - case 1: // mainnet - case 42: // kovan - case 5: // goerli - default: - // all others should use eip155 - return true; - } + switch (chainID) { + case 3: // ropsten + case 4: // rinkeby + return false; + case 1: // mainnet + case 42: // kovan + case 5: // goerli + default: + // all others should use eip155 + return true; + } } // Determine if a valid number was passed in as a hex string function isValidChainIdHexNumStr(s) { - if (typeof s !== 'string') return false; - if (s.slice(0, 2) !== '0x') return false; - try { - const b = new BN(s, 16); - return b.isNaN() === false; - } catch (err) { - return false; - } + if (typeof s !== "string") return false; + if (s.slice(0, 2) !== "0x") return false; + try { + const b = new BN(s, 16); + return b.isNaN() === false; + } catch (err) { + return false; + } } // If this is a nubmer that fits in one byte, we don't need to add it // to the `data` buffer of the main transaction. // Note the one edge case: we still need to use the `data` field for chainID=255. function useChainIdBuffer(id) { - const buf = getChainIdBuf(id); - if (buf.length === 1) return buf.readUInt8(0) === 255; - return true; + const buf = getChainIdBuf(id); + if (buf.length === 1) return buf.readUInt8(0) === 255; + return true; } function buildPersonalSignRequest(req, input) { - const MAX_BASE_MSG_SZ = input.fwConstants.ethMaxMsgSz; - const VAR_PATH_SZ = input.fwConstants.varAddrPathSzAllowed; - const L = 24 + MAX_BASE_MSG_SZ + 4; - let off = 0; - req.payload = Buffer.alloc(L); - req.payload.writeUInt8(ethMsgProtocol.SIGN_PERSONAL, 0); - off += 1; - // Write the signer path into the buffer - const signerPathBuf = buildSignerPathBuf(input.signerPath, VAR_PATH_SZ); - signerPathBuf.copy(req.payload, off); - off += signerPathBuf.length; - // Write the payload buffer. The payload can come in either as a buffer or as a string - let payload = input.payload; - // Determine if this is a hex string - let displayHex = false; - if (typeof input.payload === 'string') { - if (input.payload.slice(0, 2) === '0x') { - payload = ensureHexBuffer(input.payload); - displayHex = - false === - ASCII_REGEX.test(Buffer.from(input.payload.slice(2), 'hex').toString()); - } else { - if (false === isAsciiStr(input.payload)) - throw new Error( - 'Currently, the Lattice can only display ASCII strings.', - ); - payload = Buffer.from(input.payload); - } - } else if (typeof input.displayHex === 'boolean') { - // If this is a buffer and the user has specified whether or not this - // is a hex buffer with the optional argument, write that - displayHex = input.displayHex; - } else { - // Otherwise, determine if this buffer is an ASCII string. If it is, set `displayHex` accordingly. - // NOTE: THIS MEANS THAT NON-ASCII STRINGS WILL DISPLAY AS HEX SINCE WE CANNOT KNOW IF THE REQUESTER - // EXPECTED NON-ASCII CHARACTERS TO DISPLAY IN A STRING - // TODO: Develop a more elegant solution for this - if (!input.payload.toString) throw new Error('Unsupported input data type'); - displayHex = false === ASCII_REGEX.test(input.payload.toString()); - } - const fwConst = input.fwConstants; - let maxSzAllowed = - MAX_BASE_MSG_SZ + fwConst.extraDataMaxFrames * fwConst.extraDataFrameSz; - if (fwConst.personalSignHeaderSz) { - // Account for the personal_sign header string - maxSzAllowed -= fwConst.personalSignHeaderSz; - } - if (fwConst.ethMsgPreHashAllowed && payload.length > maxSzAllowed) { - // If this message will not fit and pre-hashing is allowed, do that - req.payload.writeUInt8(displayHex, off); - off += 1; - req.payload.writeUInt16LE(payload.length, off); - off += 2; - const prehash = Buffer.from( - keccak256( - Buffer.concat([get_personal_sign_prefix(payload.length), payload]), - ), - 'hex', - ); - prehash.copy(req.payload, off); - req.prehash = prehash; - } else { - // Otherwise we can fit the payload. - // Flow data into extraData requests, which will follow-up transaction requests, if supported/applicable - const extraDataPayloads = getExtraData(payload, input); - // Write the payload and metadata into our buffer - req.extraDataPayloads = extraDataPayloads; - req.msg = payload; - req.payload.writeUInt8(displayHex, off); - off += 1; - req.payload.writeUInt16LE(payload.length, off); - off += 2; - payload.copy(req.payload, off); - } - return req; + const MAX_BASE_MSG_SZ = input.fwConstants.ethMaxMsgSz; + const VAR_PATH_SZ = input.fwConstants.varAddrPathSzAllowed; + const L = 24 + MAX_BASE_MSG_SZ + 4; + let off = 0; + req.payload = Buffer.alloc(L); + req.payload.writeUInt8(ethMsgProtocol.SIGN_PERSONAL, 0); + off += 1; + // Write the signer path into the buffer + const signerPathBuf = buildSignerPathBuf(input.signerPath, VAR_PATH_SZ); + signerPathBuf.copy(req.payload, off); + off += signerPathBuf.length; + // Write the payload buffer. The payload can come in either as a buffer or as a string + let payload = input.payload; + // Determine if this is a hex string + let displayHex = false; + if (typeof input.payload === "string") { + if (input.payload.slice(0, 2) === "0x") { + payload = ensureHexBuffer(input.payload); + displayHex = + false === + ASCII_REGEX.test(Buffer.from(input.payload.slice(2), "hex").toString()); + } else { + if (false === isAsciiStr(input.payload)) + throw new Error( + "Currently, the Lattice can only display ASCII strings.", + ); + payload = Buffer.from(input.payload); + } + } else if (typeof input.displayHex === "boolean") { + // If this is a buffer and the user has specified whether or not this + // is a hex buffer with the optional argument, write that + displayHex = input.displayHex; + } else { + // Otherwise, determine if this buffer is an ASCII string. If it is, set `displayHex` accordingly. + // NOTE: THIS MEANS THAT NON-ASCII STRINGS WILL DISPLAY AS HEX SINCE WE CANNOT KNOW IF THE REQUESTER + // EXPECTED NON-ASCII CHARACTERS TO DISPLAY IN A STRING + // TODO: Develop a more elegant solution for this + if (!input.payload.toString) throw new Error("Unsupported input data type"); + displayHex = false === ASCII_REGEX.test(input.payload.toString()); + } + const fwConst = input.fwConstants; + let maxSzAllowed = + MAX_BASE_MSG_SZ + fwConst.extraDataMaxFrames * fwConst.extraDataFrameSz; + if (fwConst.personalSignHeaderSz) { + // Account for the personal_sign header string + maxSzAllowed -= fwConst.personalSignHeaderSz; + } + if (fwConst.ethMsgPreHashAllowed && payload.length > maxSzAllowed) { + // If this message will not fit and pre-hashing is allowed, do that + req.payload.writeUInt8(displayHex, off); + off += 1; + req.payload.writeUInt16LE(payload.length, off); + off += 2; + const prehash = Buffer.from( + keccak256( + Buffer.concat([get_personal_sign_prefix(payload.length), payload]), + ), + "hex", + ); + prehash.copy(req.payload, off); + req.prehash = prehash; + } else { + // Otherwise we can fit the payload. + // Flow data into extraData requests, which will follow-up transaction requests, if supported/applicable + const extraDataPayloads = getExtraData(payload, input); + // Write the payload and metadata into our buffer + req.extraDataPayloads = extraDataPayloads; + req.msg = payload; + req.payload.writeUInt8(displayHex, off); + off += 1; + req.payload.writeUInt16LE(payload.length, off); + off += 2; + payload.copy(req.payload, off); + } + return req; } function buildEIP712Request(req, input) { - const { ethMaxMsgSz, varAddrPathSzAllowed, eip712MaxTypeParams } = - input.fwConstants; - const { TYPED_DATA } = ethMsgProtocol; - const L = 24 + ethMaxMsgSz + 4; - let off = 0; - req.payload = Buffer.alloc(L); - req.payload.writeUInt8(TYPED_DATA.enumIdx, 0); - off += 1; - // Write the signer path - const signerPathBuf = buildSignerPathBuf( - input.signerPath, - varAddrPathSzAllowed, - ); - signerPathBuf.copy(req.payload, off); - off += signerPathBuf.length; - // Parse/clean the EIP712 payload, serialize with CBOR, and write to the payload - const data = JSON.parse(JSON.stringify(input.payload)); - if (!data.primaryType || !data.types[data.primaryType]) - throw new Error( - 'primaryType must be specified and the type must be included.', - ); - if (!data.message || !data.domain) - throw new Error('message and domain must be specified.'); - if (0 > Object.keys(data.types).indexOf('EIP712Domain')) - throw new Error('EIP712Domain type must be defined.'); - // Parse the payload to ensure we have valid EIP712 data types and that - // they are encoded such that Lattice firmware can parse them. - // We need two different encodings: one to send to the Lattice in a format that plays - // nicely with our firmware CBOR decoder. The other is formatted to be consumable by - // our EIP712 validation module. - input.payload.message = parseEIP712Msg( - JSON.parse(JSON.stringify(data.message)), - JSON.parse(JSON.stringify(data.primaryType)), - JSON.parse(JSON.stringify(data.types)), - true, - ); - input.payload.domain = parseEIP712Msg( - JSON.parse(JSON.stringify(data.domain)), - 'EIP712Domain', - JSON.parse(JSON.stringify(data.types)), - true, - ); - data.domain = parseEIP712Msg(data.domain, 'EIP712Domain', data.types, false); - data.message = parseEIP712Msg( - data.message, - data.primaryType, - data.types, - false, - ); - // Now build the message to be sent to the Lattice - const payload = Buffer.from(cbor.encode(data)); - const fwConst = input.fwConstants; - const maxSzAllowed = - ethMaxMsgSz + fwConst.extraDataMaxFrames * fwConst.extraDataFrameSz; - // Determine if we need to prehash - let shouldPrehash = payload.length > maxSzAllowed; - Object.keys(data.types).forEach((k) => { - if (data.types[k].length > eip712MaxTypeParams) { - shouldPrehash = true; - } - }); - if (fwConst.ethMsgPreHashAllowed && shouldPrehash) { - // If this payload is too large to send, but the Lattice allows a prehashed message, do that - req.payload.writeUInt16LE(payload.length, off); - off += 2; - const prehash = TypedDataUtils.eip712Hash( - req.input.payload, - SignTypedDataVersion.V4, - ); - const prehashBuf = Buffer.from(prehash); - prehashBuf.copy(req.payload, off); - req.prehash = prehash; - } else { - const extraDataPayloads = getExtraData(payload, input); - req.extraDataPayloads = extraDataPayloads; - req.payload.writeUInt16LE(payload.length, off); - off += 2; - payload.copy(req.payload, off); - off += payload.length; - // Slice out the part of the buffer that we didn't use. - req.payload = req.payload.slice(0, off); - } - return req; + const { ethMaxMsgSz, varAddrPathSzAllowed, eip712MaxTypeParams } = + input.fwConstants; + const { TYPED_DATA } = ethMsgProtocol; + const L = 24 + ethMaxMsgSz + 4; + let off = 0; + req.payload = Buffer.alloc(L); + req.payload.writeUInt8(TYPED_DATA.enumIdx, 0); + off += 1; + // Write the signer path + const signerPathBuf = buildSignerPathBuf( + input.signerPath, + varAddrPathSzAllowed, + ); + signerPathBuf.copy(req.payload, off); + off += signerPathBuf.length; + // Parse/clean the EIP712 payload, serialize with CBOR, and write to the payload + const data = JSON.parse(JSON.stringify(input.payload)); + if (!data.primaryType || !data.types[data.primaryType]) + throw new Error( + "primaryType must be specified and the type must be included.", + ); + if (!data.message || !data.domain) + throw new Error("message and domain must be specified."); + if (0 > Object.keys(data.types).indexOf("EIP712Domain")) + throw new Error("EIP712Domain type must be defined."); + // Parse the payload to ensure we have valid EIP712 data types and that + // they are encoded such that Lattice firmware can parse them. + // We need two different encodings: one to send to the Lattice in a format that plays + // nicely with our firmware CBOR decoder. The other is formatted to be consumable by + // our EIP712 validation module. + input.payload.message = parseEIP712Msg( + JSON.parse(JSON.stringify(data.message)), + JSON.parse(JSON.stringify(data.primaryType)), + JSON.parse(JSON.stringify(data.types)), + true, + ); + input.payload.domain = parseEIP712Msg( + JSON.parse(JSON.stringify(data.domain)), + "EIP712Domain", + JSON.parse(JSON.stringify(data.types)), + true, + ); + data.domain = parseEIP712Msg(data.domain, "EIP712Domain", data.types, false); + data.message = parseEIP712Msg( + data.message, + data.primaryType, + data.types, + false, + ); + // Now build the message to be sent to the Lattice + const payload = Buffer.from(cbor.encode(data)); + const fwConst = input.fwConstants; + const maxSzAllowed = + ethMaxMsgSz + fwConst.extraDataMaxFrames * fwConst.extraDataFrameSz; + // Determine if we need to prehash + let shouldPrehash = payload.length > maxSzAllowed; + Object.keys(data.types).forEach((k) => { + if (data.types[k].length > eip712MaxTypeParams) { + shouldPrehash = true; + } + }); + if (fwConst.ethMsgPreHashAllowed && shouldPrehash) { + // If this payload is too large to send, but the Lattice allows a prehashed message, do that + req.payload.writeUInt16LE(payload.length, off); + off += 2; + const prehash = TypedDataUtils.eip712Hash( + req.input.payload, + SignTypedDataVersion.V4, + ); + const prehashBuf = Buffer.from(prehash); + prehashBuf.copy(req.payload, off); + req.prehash = prehash; + } else { + const extraDataPayloads = getExtraData(payload, input); + req.extraDataPayloads = extraDataPayloads; + req.payload.writeUInt16LE(payload.length, off); + off += 2; + payload.copy(req.payload, off); + off += payload.length; + // Slice out the part of the buffer that we didn't use. + req.payload = req.payload.slice(0, off); + } + return req; } function getExtraData(payload, input) { - const { ethMaxMsgSz, extraDataFrameSz, extraDataMaxFrames } = - input.fwConstants; - const MAX_BASE_MSG_SZ = ethMaxMsgSz; - const EXTRA_DATA_ALLOWED = extraDataFrameSz > 0 && extraDataMaxFrames > 0; - const extraDataPayloads = []; - if (payload.length > MAX_BASE_MSG_SZ) { - // Determine sizes and run through sanity checks - const maxSzAllowed = - MAX_BASE_MSG_SZ + extraDataMaxFrames * extraDataFrameSz; - if (!EXTRA_DATA_ALLOWED) - throw new Error( - `Your message is ${payload.length} bytes, but can only be a maximum of ${MAX_BASE_MSG_SZ}`, - ); - else if (EXTRA_DATA_ALLOWED && payload.length > maxSzAllowed) - throw new Error( - `Your message is ${payload.length} bytes, but can only be a maximum of ${maxSzAllowed}`, - ); - // Split overflow data into extraData frames - const frames = splitFrames( - payload.slice(MAX_BASE_MSG_SZ), - extraDataFrameSz, - ); - frames.forEach((frame) => { - const szLE = Buffer.alloc(4); - szLE.writeUInt32LE(frame.length, 0); - extraDataPayloads.push(Buffer.concat([szLE, frame])); - }); - } - return extraDataPayloads; + const { ethMaxMsgSz, extraDataFrameSz, extraDataMaxFrames } = + input.fwConstants; + const MAX_BASE_MSG_SZ = ethMaxMsgSz; + const EXTRA_DATA_ALLOWED = extraDataFrameSz > 0 && extraDataMaxFrames > 0; + const extraDataPayloads = []; + if (payload.length > MAX_BASE_MSG_SZ) { + // Determine sizes and run through sanity checks + const maxSzAllowed = + MAX_BASE_MSG_SZ + extraDataMaxFrames * extraDataFrameSz; + if (!EXTRA_DATA_ALLOWED) + throw new Error( + `Your message is ${payload.length} bytes, but can only be a maximum of ${MAX_BASE_MSG_SZ}`, + ); + else if (EXTRA_DATA_ALLOWED && payload.length > maxSzAllowed) + throw new Error( + `Your message is ${payload.length} bytes, but can only be a maximum of ${maxSzAllowed}`, + ); + // Split overflow data into extraData frames + const frames = splitFrames( + payload.slice(MAX_BASE_MSG_SZ), + extraDataFrameSz, + ); + frames.forEach((frame) => { + const szLE = Buffer.alloc(4); + szLE.writeUInt32LE(frame.length, 0); + extraDataPayloads.push(Buffer.concat([szLE, frame])); + }); + } + return extraDataPayloads; } function parseEIP712Msg(msg, typeName, types, forJSParser = false) { - const type = types[typeName]; - type.forEach((item) => { - const isArrayType = item.type.indexOf('[') > -1; - const singularType = isArrayType - ? item.type.slice(0, item.type.indexOf('[')) - : item.type; - const isCustomType = Object.keys(types).indexOf(singularType) > -1; - if (isCustomType && Array.isArray(msg)) { - // For custom types we need to jump into the `msg` using the key (name of type) and - // parse that entire sub-struct as if it were a message. - // We will recurse into sub-structs until we reach a level where every item is an - // elementary (i.e. non-custom) type. - // For arrays, we need to loop through each message item. - for (let i = 0; i < msg.length; i++) { - msg[i][item.name] = parseEIP712Msg( - msg[i][item.name], - singularType, - types, - forJSParser, - ); - } - } else if (isCustomType) { - // Not an array means we can jump directly into the sub-struct to convert - msg[item.name] = parseEIP712Msg( - msg[item.name], - singularType, - types, - forJSParser, - ); - } else if (Array.isArray(msg)) { - // If we have an array for this particular type and the type we are parsing - // is *not* a custom type, loop through the array elements and convert the types. - for (let i = 0; i < msg.length; i++) { - if (isArrayType) { - // If this type is itself an array, loop through those elements and parse individually. - // This code is not reachable for custom types so we assume these are arrays of - // elementary types. - for (let j = 0; j < msg[i][item.name].length; j++) { - msg[i][item.name][j] = parseEIP712Item( - msg[i][item.name][j], - singularType, - forJSParser, - ); - } - } else { - // Non-arrays parse + replace one value for the elementary type - msg[i][item.name] = parseEIP712Item( - msg[i][item.name], - singularType, - forJSParser, - ); - } - } - } else if (isArrayType) { - // If we have an elementary array type and a non-array message level, - //loop through the array and parse + replace each item individually. - for (let i = 0; i < msg[item.name].length; i++) { - msg[item.name][i] = parseEIP712Item( - msg[item.name][i], - singularType, - forJSParser, - ); - } - } else { - // If this is a singular elementary type, simply parse + replace. - msg[item.name] = parseEIP712Item( - msg[item.name], - singularType, - forJSParser, - ); - } - }); + const type = types[typeName]; + type.forEach((item) => { + const isArrayType = item.type.indexOf("[") > -1; + const singularType = isArrayType + ? item.type.slice(0, item.type.indexOf("[")) + : item.type; + const isCustomType = Object.keys(types).indexOf(singularType) > -1; + if (isCustomType && Array.isArray(msg)) { + // For custom types we need to jump into the `msg` using the key (name of type) and + // parse that entire sub-struct as if it were a message. + // We will recurse into sub-structs until we reach a level where every item is an + // elementary (i.e. non-custom) type. + // For arrays, we need to loop through each message item. + for (let i = 0; i < msg.length; i++) { + msg[i][item.name] = parseEIP712Msg( + msg[i][item.name], + singularType, + types, + forJSParser, + ); + } + } else if (isCustomType) { + // Not an array means we can jump directly into the sub-struct to convert + msg[item.name] = parseEIP712Msg( + msg[item.name], + singularType, + types, + forJSParser, + ); + } else if (Array.isArray(msg)) { + // If we have an array for this particular type and the type we are parsing + // is *not* a custom type, loop through the array elements and convert the types. + for (let i = 0; i < msg.length; i++) { + if (isArrayType) { + // If this type is itself an array, loop through those elements and parse individually. + // This code is not reachable for custom types so we assume these are arrays of + // elementary types. + for (let j = 0; j < msg[i][item.name].length; j++) { + msg[i][item.name][j] = parseEIP712Item( + msg[i][item.name][j], + singularType, + forJSParser, + ); + } + } else { + // Non-arrays parse + replace one value for the elementary type + msg[i][item.name] = parseEIP712Item( + msg[i][item.name], + singularType, + forJSParser, + ); + } + } + } else if (isArrayType) { + // If we have an elementary array type and a non-array message level, + //loop through the array and parse + replace each item individually. + for (let i = 0; i < msg[item.name].length; i++) { + msg[item.name][i] = parseEIP712Item( + msg[item.name][i], + singularType, + forJSParser, + ); + } + } else { + // If this is a singular elementary type, simply parse + replace. + msg[item.name] = parseEIP712Item( + msg[item.name], + singularType, + forJSParser, + ); + } + }); - return msg; + return msg; } function parseEIP712Item(data, type, forJSParser = false) { - if (type === 'bytes') { - // Variable sized bytes need to be buffer type - data = ensureHexBuffer(data); - if (forJSParser) { - // For EIP712 encoding module it's easier to encode hex strings - data = `0x${data.toString('hex')}`; - } - } else if (type.slice(0, 5) === 'bytes') { - // Fixed sizes bytes need to be buffer type. We also add some sanity checks. - const nBytes = parseInt(type.slice(5)); - data = ensureHexBuffer(data); - if (data.length !== nBytes) - throw new Error(`Expected ${type} type, but got ${data.length} bytes`); - if (forJSParser) { - // For EIP712 encoding module it's easier to encode hex strings - data = `0x${data.toString('hex')}`; - } - } else if (type === 'address') { - // Address must be a 20 byte buffer - data = ensureHexBuffer(data); - // Edge case to handle the 0-address - if (data.length === 0) { - data = Buffer.alloc(20); - } - if (data.length !== 20) - throw new Error( - `Address type must be 20 bytes, but got ${data.length} bytes`, - ); - // For EIP712 encoding module it's easier to encode hex strings - if (forJSParser) { - data = `0x${data.toString('hex')}`; - } - } else if ( - ethMsgProtocol.TYPED_DATA.typeCodes[type] && - type.indexOf('uint') === -1 && - type.indexOf('int') > -1 - ) { - // Handle signed integers using bignumber.js directly - // `bignumber.js` is needed for `cbor` encoding, which gets sent to the Lattice and plays - // nicely with its firmware cbor lib. - // NOTE: If we instantiate a `bignumber.js` object, it will not match what `borc` creates - // when run inside of the browser (i.e. MetaMask). Thus we introduce this hack to make sure - // we are creating a compatible type. - // TODO: Find another cbor lib that is compataible with the firmware's lib in a browser - // context. This is surprisingly difficult - I tried several libs and only cbor/borc have - // worked (borc is a supposedly "browser compatible" version of cbor) - data = new BN(data); - } else if ( - ethMsgProtocol.TYPED_DATA.typeCodes[type] && - (type.indexOf('uint') > -1 || type.indexOf('int') > -1) - ) { - // For uints, convert to a buffer and do some sanity checking. - // Note that we could probably just use bignumber.js directly as we do with - // signed ints, but this code is battle tested and we don't want to change it. - let b = ensureHexBuffer(data); - // Edge case to handle 0-value bignums - if (b.length === 0) { - b = Buffer.from('00', 'hex'); - } - // Uint256s should be encoded as bignums. - if (forJSParser) { - // For EIP712 encoding in this module we need strings to represent the numbers - data = `0x${b.toString('hex')}`; - } else { - // Load into bignumber.js used by cbor lib - data = new BN(b.toString('hex'), 16); - } - } else if (type === 'bool') { - // Booleans need to be cast to a u8 - data = data === true ? 1 : 0; - } - // Other types don't need to be modified - return data; + if (type === "bytes") { + // Variable sized bytes need to be buffer type + data = ensureHexBuffer(data); + if (forJSParser) { + // For EIP712 encoding module it's easier to encode hex strings + data = `0x${data.toString("hex")}`; + } + } else if (type.slice(0, 5) === "bytes") { + // Fixed sizes bytes need to be buffer type. We also add some sanity checks. + const nBytes = Number.parseInt(type.slice(5)); + data = ensureHexBuffer(data); + if (data.length !== nBytes) + throw new Error(`Expected ${type} type, but got ${data.length} bytes`); + if (forJSParser) { + // For EIP712 encoding module it's easier to encode hex strings + data = `0x${data.toString("hex")}`; + } + } else if (type === "address") { + // Address must be a 20 byte buffer + data = ensureHexBuffer(data); + // Edge case to handle the 0-address + if (data.length === 0) { + data = Buffer.alloc(20); + } + if (data.length !== 20) + throw new Error( + `Address type must be 20 bytes, but got ${data.length} bytes`, + ); + // For EIP712 encoding module it's easier to encode hex strings + if (forJSParser) { + data = `0x${data.toString("hex")}`; + } + } else if ( + ethMsgProtocol.TYPED_DATA.typeCodes[type] && + type.indexOf("uint") === -1 && + type.indexOf("int") > -1 + ) { + // Handle signed integers using bignumber.js directly + // `bignumber.js` is needed for `cbor` encoding, which gets sent to the Lattice and plays + // nicely with its firmware cbor lib. + // NOTE: If we instantiate a `bignumber.js` object, it will not match what `borc` creates + // when run inside of the browser (i.e. MetaMask). Thus we introduce this hack to make sure + // we are creating a compatible type. + // TODO: Find another cbor lib that is compataible with the firmware's lib in a browser + // context. This is surprisingly difficult - I tried several libs and only cbor/borc have + // worked (borc is a supposedly "browser compatible" version of cbor) + data = new BN(data); + } else if ( + ethMsgProtocol.TYPED_DATA.typeCodes[type] && + (type.indexOf("uint") > -1 || type.indexOf("int") > -1) + ) { + // For uints, convert to a buffer and do some sanity checking. + // Note that we could probably just use bignumber.js directly as we do with + // signed ints, but this code is battle tested and we don't want to change it. + let b = ensureHexBuffer(data); + // Edge case to handle 0-value bignums + if (b.length === 0) { + b = Buffer.from("00", "hex"); + } + // Uint256s should be encoded as bignums. + if (forJSParser) { + // For EIP712 encoding in this module we need strings to represent the numbers + data = `0x${b.toString("hex")}`; + } else { + // Load into bignumber.js used by cbor lib + data = new BN(b.toString("hex"), 16); + } + } else if (type === "bool") { + // Booleans need to be cast to a u8 + data = data === true ? 1 : 0; + } + // Other types don't need to be modified + return data; } function get_personal_sign_prefix(L) { - return Buffer.from( - `\u0019Ethereum Signed Message:\n${L.toString()}`, - 'utf-8', - ); + return Buffer.from( + `\u0019Ethereum Signed Message:\n${L.toString()}`, + "utf-8", + ); } function get_rlp_encoded_preimage(rawTx, txType) { - if (txType) { - return Buffer.concat([ - Buffer.from([txType]), - Buffer.from(RLP.encode(rawTx)), - ]); - } else { - return Buffer.from(RLP.encode(rawTx)); - } + if (txType) { + return Buffer.concat([ + Buffer.from([txType]), + Buffer.from(RLP.encode(rawTx)), + ]); + } else { + return Buffer.from(RLP.encode(rawTx)); + } } // ====== @@ -961,73 +957,73 @@ function get_rlp_encoded_preimage(rawTx, txType) { // // NOTE: Once we deprecate, we will remove this entire file // ====== -const ethConvertLegacyToGenericReq = function (req) { - let common; - if (!req.chainId || ensureHexBuffer(req.chainId).toString('hex') === '01') { - common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.London }); - } else { - // Not every network will support these EIPs but we will allow - // signing of transactions using them - common = Common.custom( - { chainId: Number(req.chainId) }, - { hardfork: Hardfork.London, eips: [1559, 2930] }, - ); - } - const tx = TransactionFactory.fromTxData(req, { common }); - // Get the raw transaction payload to be hashed and signed. - // Different `@ethereumjs/tx` Transaction object types have - // slightly different APIs around this. - if (req.type) { - // Newer transaction types - return tx.getMessageToSign(); - } else { - // Legacy transaction type - return Buffer.from(RLP.encode(tx.getMessageToSign())); - } +const ethConvertLegacyToGenericReq = (req) => { + let common; + if (!req.chainId || ensureHexBuffer(req.chainId).toString("hex") === "01") { + common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.London }); + } else { + // Not every network will support these EIPs but we will allow + // signing of transactions using them + common = Common.custom( + { chainId: Number(req.chainId) }, + { hardfork: Hardfork.London, eips: [1559, 2930] }, + ); + } + const tx = TransactionFactory.fromTxData(req, { common }); + // Get the raw transaction payload to be hashed and signed. + // Different `@ethereumjs/tx` Transaction object types have + // slightly different APIs around this. + if (req.type) { + // Newer transaction types + return tx.getMessageToSign(); + } else { + // Legacy transaction type + return Buffer.from(RLP.encode(tx.getMessageToSign())); + } }; // Convert an ethers `TransactionRequest` to a viem `TransactionSerializable` export const toViemTransaction = ( - tx: TransactionRequest, + tx: TransactionRequest, ): TransactionSerializable => { - const base = { - to: tx.to as `0x${string}`, - value: tx.value ? BigInt(tx.value) : undefined, - data: tx.data as `0x${string}`, - nonce: tx.nonce, - gas: tx.gasLimit ? BigInt(tx.gasLimit) : undefined, - }; + const base = { + to: tx.to as `0x${string}`, + value: tx.value ? BigInt(tx.value) : undefined, + data: tx.data as `0x${string}`, + nonce: tx.nonce, + gas: tx.gasLimit ? BigInt(tx.gasLimit) : undefined, + }; - if (tx.type === TRANSACTION_TYPE.EIP1559) { - return { - ...base, - type: 'eip1559', - maxFeePerGas: tx.maxFeePerGas ? BigInt(tx.maxFeePerGas) : undefined, - maxPriorityFeePerGas: tx.maxPriorityFeePerGas - ? BigInt(tx.maxPriorityFeePerGas) - : undefined, - chainId: tx.chainId, - accessList: tx.accessList?.map((item) => ({ - address: item.address as `0x${string}`, - storageKeys: item.storageKeys as `0x${string}`[], - })), - }; - } + if (tx.type === TRANSACTION_TYPE.EIP1559) { + return { + ...base, + type: "eip1559", + maxFeePerGas: tx.maxFeePerGas ? BigInt(tx.maxFeePerGas) : undefined, + maxPriorityFeePerGas: tx.maxPriorityFeePerGas + ? BigInt(tx.maxPriorityFeePerGas) + : undefined, + chainId: tx.chainId, + accessList: tx.accessList?.map((item) => ({ + address: item.address as `0x${string}`, + storageKeys: item.storageKeys as `0x${string}`[], + })), + }; + } - return { - ...base, - gasPrice: tx.maxFeePerGas ? BigInt(tx.maxFeePerGas) : undefined, - }; + return { + ...base, + gasPrice: tx.maxFeePerGas ? BigInt(tx.maxFeePerGas) : undefined, + }; }; export default { - buildEthereumMsgRequest, - validateEthereumMsgResponse, - buildEthereumTxRequest, - buildEthRawTx, - hashTransaction, - chainIds, - ensureHexBuffer, + buildEthereumMsgRequest, + validateEthereumMsgResponse, + buildEthereumTxRequest, + buildEthRawTx, + hashTransaction, + chainIds, + ensureHexBuffer, - ethConvertLegacyToGenericReq, + ethConvertLegacyToGenericReq, }; From 744b8ace2df1cf3558844fdffe67015c8b5b2d13 Mon Sep 17 00:00:00 2001 From: Tomasz Marciniak Date: Tue, 4 Mar 2025 16:14:32 +0100 Subject: [PATCH 2/5] fix(lockfile): rebuild --- pnpm-lock.yaml | 1960 ++++++++++++++++++++++++------------------------ 1 file changed, 986 insertions(+), 974 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 41e5c878..b7a23a48 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,7 +24,7 @@ importers: version: 5.4.0 '@metamask/eth-sig-util': specifier: ^8.0.0 - version: 8.0.0 + version: 8.2.0 '@types/uuid': specifier: ^10.0.0 version: 10.0.0 @@ -75,29 +75,29 @@ importers: version: 10.0.0 viem: specifier: ^2.22.19 - version: 2.22.19(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10) + version: 2.23.6(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10) devDependencies: '@chainsafe/bls-keystore': specifier: ^3.1.0 version: 3.1.0 '@eslint/js': specifier: ^9.13.0 - version: 9.13.0 + version: 9.21.0 '@noble/bls12-381': specifier: ^1.4.0 version: 1.4.0 '@solana/web3.js': specifier: ^1.95.4 - version: 1.95.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) + version: 1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) '@types/elliptic': specifier: ^6.4.18 version: 6.4.18 '@types/jest': specifier: ^29.5.13 - version: 29.5.13 + version: 29.5.14 '@types/node': specifier: ^22.7.8 - version: 22.7.8 + version: 22.13.9 '@types/readline-sync': specifier: ^1.4.8 version: 1.4.8 @@ -106,10 +106,10 @@ importers: version: 3.0.8 '@typescript-eslint/eslint-plugin': specifier: ^8.11.0 - version: 8.11.0(@typescript-eslint/parser@8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3) + version: 8.26.0(@typescript-eslint/parser@8.26.0(eslint@9.21.0)(typescript@5.8.2))(eslint@9.21.0)(typescript@5.8.2) '@typescript-eslint/parser': specifier: ^8.11.0 - version: 8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3) + version: 8.26.0(eslint@9.21.0)(typescript@5.8.2) bip32: specifier: ^1.0.4 version: 1.0.4 @@ -124,19 +124,19 @@ importers: version: 0.2.4 dotenv: specifier: ^16.4.5 - version: 16.4.5 + version: 16.4.7 ed25519-hd-key: specifier: ^1.3.0 version: 1.3.0 eslint: specifier: ^9.13.0 - version: 9.13.0(jiti@2.4.0) + version: 9.21.0 eslint-config-prettier: specifier: ^9.1.0 - version: 9.1.0(eslint@9.13.0(jiti@2.4.0)) + version: 9.1.0(eslint@9.21.0) eslint-plugin-prettier: specifier: ^5.2.1 - version: 5.2.1(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3) + version: 5.2.3(eslint-config-prettier@9.1.0(eslint@9.21.0))(eslint@9.21.0)(prettier@3.5.3) ethereumjs-util: specifier: ^7.1.5 version: 7.1.5 @@ -145,13 +145,13 @@ importers: version: 2.0.0 msw: specifier: ^2.5.0 - version: 2.5.0(typescript@5.6.3) + version: 2.7.3(@types/node@22.13.9)(typescript@5.8.2) node-fetch: specifier: ^3.3.2 version: 3.3.2 prettier: specifier: ^3.3.3 - version: 3.3.3 + version: 3.5.3 prettier-eslint: specifier: ^16.3.0 version: 16.3.0 @@ -166,56 +166,52 @@ importers: version: 3.0.5 tsup: specifier: ^8.3.5 - version: 8.3.5(@microsoft/api-extractor@7.47.11(@types/node@22.7.8))(jiti@2.4.0)(postcss@8.4.47)(typescript@5.6.3) + version: 8.4.0(@microsoft/api-extractor@7.51.1(@types/node@22.13.9))(postcss@8.5.3)(typescript@5.8.2) typescript: specifier: ^5.6.3 - version: 5.6.3 + version: 5.8.2 vite: specifier: ^5.4.9 - version: 5.4.9(@types/node@22.7.8) + version: 5.4.14(@types/node@22.13.9) vite-plugin-dts: specifier: ^4.3.0 - version: 4.3.0(@types/node@22.7.8)(rollup@4.24.0)(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.8)) + version: 4.5.3(@types/node@22.13.9)(rollup@4.34.9)(typescript@5.8.2)(vite@5.4.14(@types/node@22.13.9)) vitest: specifier: 2.1.3 - version: 2.1.3(patch_hash=0c337a8de71c98b9a0e1f0e80ef2bf86e1b90fb9871b385fff2d2a2d93ed3ffd)(@types/node@22.7.8)(msw@2.5.0(typescript@5.6.3)) + version: 2.1.3(patch_hash=0c337a8de71c98b9a0e1f0e80ef2bf86e1b90fb9871b385fff2d2a2d93ed3ffd)(@types/node@22.13.9)(msw@2.7.3(@types/node@22.13.9)(typescript@5.8.2)) packages: - '@adraffy/ens-normalize@1.10.1': - resolution: {integrity: sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==} + '@adraffy/ens-normalize@1.11.0': + resolution: {integrity: sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg==} - '@babel/code-frame@7.25.7': - resolution: {integrity: sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==} + '@babel/code-frame@7.26.2': + resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.25.7': - resolution: {integrity: sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==} + '@babel/helper-string-parser@7.25.9': + resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.25.7': - resolution: {integrity: sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==} + '@babel/helper-validator-identifier@7.25.9': + resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} engines: {node: '>=6.9.0'} - '@babel/highlight@7.25.7': - resolution: {integrity: sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==} - engines: {node: '>=6.9.0'} - - '@babel/parser@7.25.8': - resolution: {integrity: sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==} + '@babel/parser@7.26.9': + resolution: {integrity: sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==} engines: {node: '>=6.0.0'} hasBin: true - '@babel/runtime@7.25.7': - resolution: {integrity: sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==} + '@babel/runtime@7.26.9': + resolution: {integrity: sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==} engines: {node: '>=6.9.0'} - '@babel/types@7.25.8': - resolution: {integrity: sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==} + '@babel/types@7.26.9': + resolution: {integrity: sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==} engines: {node: '>=6.9.0'} - '@bundled-es-modules/cookie@2.0.0': - resolution: {integrity: sha512-Or6YHg/kamKHpxULAdSqhGqnWFneIXu1NKvvfBBzKGwpVsYuFIQ5aBPHDnnoR3ghW1nvSkALd+EF9iMtY7Vjxw==} + '@bundled-es-modules/cookie@2.0.1': + resolution: {integrity: sha512-8o+5fRPLNbjbdGRRmJj3h6Hh1AQJf2dk3qQ/5ZFb+PXkRNiSoMGGUKlsgLfrxneb72axVJyIYji64E2+nNfYyw==} '@bundled-es-modules/statuses@1.0.1': resolution: {integrity: sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg==} @@ -232,8 +228,8 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.24.2': - resolution: {integrity: sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==} + '@esbuild/aix-ppc64@0.25.0': + resolution: {integrity: sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] @@ -244,8 +240,8 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.24.2': - resolution: {integrity: sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==} + '@esbuild/android-arm64@0.25.0': + resolution: {integrity: sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==} engines: {node: '>=18'} cpu: [arm64] os: [android] @@ -256,8 +252,8 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.24.2': - resolution: {integrity: sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==} + '@esbuild/android-arm@0.25.0': + resolution: {integrity: sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==} engines: {node: '>=18'} cpu: [arm] os: [android] @@ -268,8 +264,8 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.24.2': - resolution: {integrity: sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==} + '@esbuild/android-x64@0.25.0': + resolution: {integrity: sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==} engines: {node: '>=18'} cpu: [x64] os: [android] @@ -280,8 +276,8 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.24.2': - resolution: {integrity: sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==} + '@esbuild/darwin-arm64@0.25.0': + resolution: {integrity: sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] @@ -292,8 +288,8 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.24.2': - resolution: {integrity: sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==} + '@esbuild/darwin-x64@0.25.0': + resolution: {integrity: sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==} engines: {node: '>=18'} cpu: [x64] os: [darwin] @@ -304,8 +300,8 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.24.2': - resolution: {integrity: sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==} + '@esbuild/freebsd-arm64@0.25.0': + resolution: {integrity: sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] @@ -316,8 +312,8 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.24.2': - resolution: {integrity: sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==} + '@esbuild/freebsd-x64@0.25.0': + resolution: {integrity: sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] @@ -328,8 +324,8 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.24.2': - resolution: {integrity: sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==} + '@esbuild/linux-arm64@0.25.0': + resolution: {integrity: sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==} engines: {node: '>=18'} cpu: [arm64] os: [linux] @@ -340,8 +336,8 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.24.2': - resolution: {integrity: sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==} + '@esbuild/linux-arm@0.25.0': + resolution: {integrity: sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==} engines: {node: '>=18'} cpu: [arm] os: [linux] @@ -352,8 +348,8 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.24.2': - resolution: {integrity: sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==} + '@esbuild/linux-ia32@0.25.0': + resolution: {integrity: sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==} engines: {node: '>=18'} cpu: [ia32] os: [linux] @@ -364,8 +360,8 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.24.2': - resolution: {integrity: sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==} + '@esbuild/linux-loong64@0.25.0': + resolution: {integrity: sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==} engines: {node: '>=18'} cpu: [loong64] os: [linux] @@ -376,8 +372,8 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.24.2': - resolution: {integrity: sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==} + '@esbuild/linux-mips64el@0.25.0': + resolution: {integrity: sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] @@ -388,8 +384,8 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.24.2': - resolution: {integrity: sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==} + '@esbuild/linux-ppc64@0.25.0': + resolution: {integrity: sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] @@ -400,8 +396,8 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.24.2': - resolution: {integrity: sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==} + '@esbuild/linux-riscv64@0.25.0': + resolution: {integrity: sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] @@ -412,8 +408,8 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.24.2': - resolution: {integrity: sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==} + '@esbuild/linux-s390x@0.25.0': + resolution: {integrity: sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==} engines: {node: '>=18'} cpu: [s390x] os: [linux] @@ -424,14 +420,14 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.24.2': - resolution: {integrity: sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==} + '@esbuild/linux-x64@0.25.0': + resolution: {integrity: sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.24.2': - resolution: {integrity: sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==} + '@esbuild/netbsd-arm64@0.25.0': + resolution: {integrity: sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] @@ -442,14 +438,14 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.24.2': - resolution: {integrity: sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==} + '@esbuild/netbsd-x64@0.25.0': + resolution: {integrity: sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.24.2': - resolution: {integrity: sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==} + '@esbuild/openbsd-arm64@0.25.0': + resolution: {integrity: sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] @@ -460,8 +456,8 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.24.2': - resolution: {integrity: sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==} + '@esbuild/openbsd-x64@0.25.0': + resolution: {integrity: sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] @@ -472,8 +468,8 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.24.2': - resolution: {integrity: sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==} + '@esbuild/sunos-x64@0.25.0': + resolution: {integrity: sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==} engines: {node: '>=18'} cpu: [x64] os: [sunos] @@ -484,8 +480,8 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.24.2': - resolution: {integrity: sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==} + '@esbuild/win32-arm64@0.25.0': + resolution: {integrity: sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==} engines: {node: '>=18'} cpu: [arm64] os: [win32] @@ -496,8 +492,8 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.24.2': - resolution: {integrity: sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==} + '@esbuild/win32-ia32@0.25.0': + resolution: {integrity: sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==} engines: {node: '>=18'} cpu: [ia32] os: [win32] @@ -508,52 +504,52 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.24.2': - resolution: {integrity: sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==} + '@esbuild/win32-x64@0.25.0': + resolution: {integrity: sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==} engines: {node: '>=18'} cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.4.0': - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + '@eslint-community/eslint-utils@4.4.1': + resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.11.1': - resolution: {integrity: sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==} + '@eslint-community/regexpp@4.12.1': + resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.18.0': - resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} + '@eslint/config-array@0.19.2': + resolution: {integrity: sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/core@0.7.0': - resolution: {integrity: sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==} + '@eslint/core@0.12.0': + resolution: {integrity: sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/eslintrc@2.1.4': resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/eslintrc@3.1.0': - resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} + '@eslint/eslintrc@3.3.0': + resolution: {integrity: sha512-yaVPAiNAalnCZedKLdR21GOGILMLKPyqSLWaAjQFvYA2i/ciDi8ArYVr69Anohb6cH2Ukhqti4aFnYyPm8wdwQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/js@8.57.1': resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@9.13.0': - resolution: {integrity: sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==} + '@eslint/js@9.21.0': + resolution: {integrity: sha512-BqStZ3HX8Yz6LvsF5ByXYrtigrV5AXADWLAGc7PH/1SxOb7/FIYYMszZZWiUou/GB9P2lXWk2SV4d+Z8h0nknw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/object-schema@2.1.4': - resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} + '@eslint/object-schema@2.1.6': + resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/plugin-kit@0.2.1': - resolution: {integrity: sha512-HFZ4Mp26nbWk9d/BpvP0YNL6W4UoZF0VFcTw/aPPA8RpOxeFQgK+ClABGgAUXs9Y/RGX/l1vOmrqz1MQt9MNuw==} + '@eslint/plugin-kit@0.2.7': + resolution: {integrity: sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@ethereumjs/common@3.2.0': @@ -588,12 +584,12 @@ packages: resolution: {integrity: sha512-XBEKsYqLGXLah9PNJbgdkigthkG7TAGvlD/sH12beMXEyHDyigfcbdvHhmLyDWgDyOJn4QwiQUaF7yeuhnjdog==} engines: {node: '>=18'} - '@humanfs/core@0.19.0': - resolution: {integrity: sha512-2cbWIHbZVEweE853g8jymffCA+NCMiuqeECeBBLm8dg2oFdjuGJhgN4UAbI+6v0CKbbhvtXA4qV8YR5Ji86nmw==} + '@humanfs/core@0.19.1': + resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} engines: {node: '>=18.18.0'} - '@humanfs/node@0.16.5': - resolution: {integrity: sha512-KSPA4umqSG4LHYRodq31VDwKAvaTF4xmVlzM8Aeh4PlU1JQ3IG0wiA8C25d3RQ9nJyM3mBHyI53K06VVL/oFFg==} + '@humanfs/node@0.16.6': + resolution: {integrity: sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==} engines: {node: '>=18.18.0'} '@humanwhocodes/config-array@0.13.0': @@ -613,21 +609,40 @@ packages: resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} engines: {node: '>=18.18'} - '@inquirer/confirm@4.0.1': - resolution: {integrity: sha512-46yL28o2NJ9doViqOy0VDcoTzng7rAb6yPQKU7VDLqkmbCaH4JqK4yk4XqlzNWy9PVC5pG1ZUXPBQv+VqnYs2w==} + '@humanwhocodes/retry@0.4.2': + resolution: {integrity: sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==} + engines: {node: '>=18.18'} + + '@inquirer/confirm@5.1.6': + resolution: {integrity: sha512-6ZXYK3M1XmaVBZX6FCfChgtponnL0R6I7k8Nu+kaoNkT828FVZTcca1MqmWQipaW2oNREQl5AaPCUOOCVNdRMw==} engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true - '@inquirer/core@9.2.1': - resolution: {integrity: sha512-F2VBt7W/mwqEU4bL0RnHNZmC/OxzNx9cOYxHqnXX3MP6ruYvZUZAW9imgN9+h/uBT/oP8Gh888J2OZSbjSeWcg==} + '@inquirer/core@10.1.7': + resolution: {integrity: sha512-AA9CQhlrt6ZgiSy6qoAigiA1izOa751ugX6ioSjqgJ+/Gd+tEN/TORk5sUYNjXuHWfW0r1n/a6ak4u/NqHHrtA==} engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true - '@inquirer/figures@1.0.7': - resolution: {integrity: sha512-m+Trk77mp54Zma6xLkLuY+mvanPxlE4A7yNKs2HBiyZ4UkVs28Mv5c/pgWrHeInx+USHeX/WEPzjrWrcJiQgjw==} + '@inquirer/figures@1.0.10': + resolution: {integrity: sha512-Ey6176gZmeqZuY/W/nZiUyvmb1/qInjcpiZjXWi6nON+nxJpD1bxtSoBxNliGISae32n6OwbY+TSXPZ1CfS4bw==} engines: {node: '>=18'} - '@inquirer/type@2.0.0': - resolution: {integrity: sha512-XvJRx+2KR3YXyYtPUUy+qd9i7p+GO9Ko6VIIpWlBrpWwXDv8WLFeHTxz35CfQFUiBMLXlGHhGzys7lqit9gWag==} + '@inquirer/type@3.0.4': + resolution: {integrity: sha512-2MNFrDY8jkFYc9Il9DgLsHhMzuHnOYM1+CUYVWbzu9oT0hC7V7EcYvdCKeoll/Fcci04A+ERZ9wcc7cQ8lTkIA==} engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} @@ -645,8 +660,8 @@ packages: resolution: {integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - '@jridgewell/gen-mapping@0.3.5': - resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} + '@jridgewell/gen-mapping@0.3.8': + resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==} engines: {node: '>=6.0.0'} '@jridgewell/resolve-uri@3.1.2': @@ -663,37 +678,37 @@ packages: '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} - '@metamask/abi-utils@2.0.4': - resolution: {integrity: sha512-StnIgUB75x7a7AgUhiaUZDpCsqGp7VkNnZh2XivXkJ6mPkE83U8ARGQj5MbRis7VJY8BC5V1AbB1fjdh0hupPQ==} - engines: {node: '>=16.0.0'} + '@metamask/abi-utils@3.0.0': + resolution: {integrity: sha512-a/l0DiSIr7+CBYVpHygUa3ztSlYLFCQMsklLna+t6qmNY9+eIO5TedNxhyIyvaJ+4cN7TLy0NQFbp9FV3X2ktg==} + engines: {node: ^18.18 || ^20.14 || >=22} - '@metamask/eth-sig-util@8.0.0': - resolution: {integrity: sha512-IwE6aoxUL39IhmsAgE4nk+OZbNo+ThFZRNsUjE1pjdEa4MFpWzm1Rue4zJ5DMy1oUyZBi/aiCLMhdMnjl2bh2Q==} + '@metamask/eth-sig-util@8.2.0': + resolution: {integrity: sha512-LZDglIh4gYGw9Myp+2aIwKrj6lIJpMC4e0m7wKJU+BxLLBFcrTgKrjdjstXGVWvuYG3kutlh9J+uNBRPJqffWQ==} engines: {node: ^18.18 || ^20.14 || >=22} '@metamask/superstruct@3.1.0': resolution: {integrity: sha512-N08M56HdOgBfRKkrgCMZvQppkZGcArEop3kixNEtVbJKm6P9Cfg0YkI6X0s1g78sNrj2fWUwvJADdZuzJgFttA==} engines: {node: '>=16.0.0'} - '@metamask/utils@9.3.0': - resolution: {integrity: sha512-w8CVbdkDrVXFJbfBSlDfafDR6BAkpDmv1bC1UJVCoVny5tW2RKAdn9i68Xf7asYT4TnUhl/hN4zfUiKQq9II4g==} - engines: {node: '>=16.0.0'} + '@metamask/utils@11.2.0': + resolution: {integrity: sha512-5Y4bd8Axvi2kJKjp6Jlbb9wyoTrSZxQjWvVGPevpErAc7SCUYUuW0QOOPVu7YmT+bzisTpnFnRE8LjtwYCKGAg==} + engines: {node: ^18.18 || ^20.14 || >=22} - '@microsoft/api-extractor-model@7.29.8': - resolution: {integrity: sha512-t3Z/xcO6TRbMcnKGVMs4uMzv/gd5j0NhMiJIGjD4cJMeFJ1Hf8wnLSx37vxlRlL0GWlGJhnFgxvnaL6JlS+73g==} + '@microsoft/api-extractor-model@7.30.3': + resolution: {integrity: sha512-yEAvq0F78MmStXdqz9TTT4PZ05Xu5R8nqgwI5xmUmQjWBQ9E6R2n8HB/iZMRciG4rf9iwI2mtuQwIzDXBvHn1w==} - '@microsoft/api-extractor@7.47.11': - resolution: {integrity: sha512-lrudfbPub5wzBhymfFtgZKuBvXxoSIAdrvS2UbHjoMT2TjIEddq6Z13pcve7A03BAouw0x8sW8G4txdgfiSwpQ==} + '@microsoft/api-extractor@7.51.1': + resolution: {integrity: sha512-VoFvIeYXme8QctXDkixy1KIn750kZaFy2snAEOB3nhDFfbBcJNEcvBrpCIQIV09MqI4g9egKUkg+/12WMRC77w==} hasBin: true - '@microsoft/tsdoc-config@0.17.0': - resolution: {integrity: sha512-v/EYRXnCAIHxOHW+Plb6OWuUoMotxTN0GLatnpOb1xq0KuTNw/WI3pamJx/UbsoJP5k9MCw1QxvvhPcF9pH3Zg==} + '@microsoft/tsdoc-config@0.17.1': + resolution: {integrity: sha512-UtjIFe0C6oYgTnad4q1QP4qXwLhe6tIpNTRStJ2RZEPIkqQPREAwE5spzVxsdn9UaEMUqhh0AqSx3X4nWAKXWw==} - '@microsoft/tsdoc@0.15.0': - resolution: {integrity: sha512-HZpPoABogPvjeJOdzCOSJsXeL/SMCBgBZMVC3X3d7YYp2gf31MfxhUoYUNwf1ERPJOnQc0wkFn9trqI6ZEdZuA==} + '@microsoft/tsdoc@0.15.1': + resolution: {integrity: sha512-4aErSrCR/On/e5G2hDP0wjooqDdauzEbIq8hIkIe5pXV0rtWJZvdCEKL0ykZxex+IxIwBp0eGeV48hQN07dXtw==} - '@mswjs/interceptors@0.36.5': - resolution: {integrity: sha512-aQ8WF5zQwOdcxLsxSEk9Jd01GgGb80xxqCaiDDlewhtwqpSm8MOvUHslwPydVirasdW09++NxDNNftm1vLY8yA==} + '@mswjs/interceptors@0.37.6': + resolution: {integrity: sha512-wK+5pLK5XFmgtH3aQ2YVvA3HohS3xqV/OxuVOdNx9Wpnz7VE/fnC+e1A7ln6LFYeck7gOJ/dsZV6OLplOtAJ2w==} engines: {node: '>=18'} '@noble/bls12-381@1.4.0': @@ -703,10 +718,6 @@ packages: '@noble/curves@1.4.2': resolution: {integrity: sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==} - '@noble/curves@1.6.0': - resolution: {integrity: sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==} - engines: {node: ^14.21.3 || >=16} - '@noble/curves@1.8.1': resolution: {integrity: sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==} engines: {node: ^14.21.3 || >=16} @@ -715,10 +726,6 @@ packages: resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==} engines: {node: '>= 16'} - '@noble/hashes@1.5.0': - resolution: {integrity: sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==} - engines: {node: ^14.21.3 || >=16} - '@noble/hashes@1.7.1': resolution: {integrity: sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==} engines: {node: ^14.21.3 || >=16} @@ -752,8 +759,8 @@ packages: resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - '@rollup/pluginutils@5.1.2': - resolution: {integrity: sha512-/FIdS3PyZ39bjZlwqFnWqCOVnW7o963LtKMwQOD0NhQqw22gSr2YY1afu3FxRip4ZCZNsD5jq6Aaz6QV3D/Njw==} + '@rollup/pluginutils@5.1.4': + resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 @@ -761,88 +768,103 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.24.0': - resolution: {integrity: sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==} + '@rollup/rollup-android-arm-eabi@4.34.9': + resolution: {integrity: sha512-qZdlImWXur0CFakn2BJ2znJOdqYZKiedEPEVNTBrpfPjc/YuTGcaYZcdmNFTkUj3DU0ZM/AElcM8Ybww3xVLzA==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.24.0': - resolution: {integrity: sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA==} + '@rollup/rollup-android-arm64@4.34.9': + resolution: {integrity: sha512-4KW7P53h6HtJf5Y608T1ISKvNIYLWRKMvfnG0c44M6In4DQVU58HZFEVhWINDZKp7FZps98G3gxwC1sb0wXUUg==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.24.0': - resolution: {integrity: sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA==} + '@rollup/rollup-darwin-arm64@4.34.9': + resolution: {integrity: sha512-0CY3/K54slrzLDjOA7TOjN1NuLKERBgk9nY5V34mhmuu673YNb+7ghaDUs6N0ujXR7fz5XaS5Aa6d2TNxZd0OQ==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.24.0': - resolution: {integrity: sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ==} + '@rollup/rollup-darwin-x64@4.34.9': + resolution: {integrity: sha512-eOojSEAi/acnsJVYRxnMkPFqcxSMFfrw7r2iD9Q32SGkb/Q9FpUY1UlAu1DH9T7j++gZ0lHjnm4OyH2vCI7l7Q==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.24.0': - resolution: {integrity: sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA==} + '@rollup/rollup-freebsd-arm64@4.34.9': + resolution: {integrity: sha512-2lzjQPJbN5UnHm7bHIUKFMulGTQwdvOkouJDpPysJS+QFBGDJqcfh+CxxtG23Ik/9tEvnebQiylYoazFMAgrYw==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.34.9': + resolution: {integrity: sha512-SLl0hi2Ah2H7xQYd6Qaiu01kFPzQ+hqvdYSoOtHYg/zCIFs6t8sV95kaoqjzjFwuYQLtOI0RZre/Ke0nPaQV+g==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.34.9': + resolution: {integrity: sha512-88I+D3TeKItrw+Y/2ud4Tw0+3CxQ2kLgu3QvrogZ0OfkmX/DEppehus7L3TS2Q4lpB+hYyxhkQiYPJ6Mf5/dPg==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.24.0': - resolution: {integrity: sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw==} + '@rollup/rollup-linux-arm-musleabihf@4.34.9': + resolution: {integrity: sha512-3qyfWljSFHi9zH0KgtEPG4cBXHDFhwD8kwg6xLfHQ0IWuH9crp005GfoUUh/6w9/FWGBwEHg3lxK1iHRN1MFlA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.24.0': - resolution: {integrity: sha512-i0xTLXjqap2eRfulFVlSnM5dEbTVque/3Pi4g2y7cxrs7+a9De42z4XxKLYJ7+OhE3IgxvfQM7vQc43bwTgPwA==} + '@rollup/rollup-linux-arm64-gnu@4.34.9': + resolution: {integrity: sha512-6TZjPHjKZUQKmVKMUowF3ewHxctrRR09eYyvT5eFv8w/fXarEra83A2mHTVJLA5xU91aCNOUnM+DWFMSbQ0Nxw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.24.0': - resolution: {integrity: sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw==} + '@rollup/rollup-linux-arm64-musl@4.34.9': + resolution: {integrity: sha512-LD2fytxZJZ6xzOKnMbIpgzFOuIKlxVOpiMAXawsAZ2mHBPEYOnLRK5TTEsID6z4eM23DuO88X0Tq1mErHMVq0A==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.24.0': - resolution: {integrity: sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw==} + '@rollup/rollup-linux-loongarch64-gnu@4.34.9': + resolution: {integrity: sha512-dRAgTfDsn0TE0HI6cmo13hemKpVHOEyeciGtvlBTkpx/F65kTvShtY/EVyZEIfxFkV5JJTuQ9tP5HGBS0hfxIg==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-powerpc64le-gnu@4.34.9': + resolution: {integrity: sha512-PHcNOAEhkoMSQtMf+rJofwisZqaU8iQ8EaSps58f5HYll9EAY5BSErCZ8qBDMVbq88h4UxaNPlbrKqfWP8RfJA==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.24.0': - resolution: {integrity: sha512-M3Dg4hlwuntUCdzU7KjYqbbd+BLq3JMAOhCKdBE3TcMGMZbKkDdJ5ivNdehOssMCIokNHFOsv7DO4rlEOfyKpg==} + '@rollup/rollup-linux-riscv64-gnu@4.34.9': + resolution: {integrity: sha512-Z2i0Uy5G96KBYKjeQFKbbsB54xFOL5/y1P5wNBsbXB8yE+At3oh0DVMjQVzCJRJSfReiB2tX8T6HUFZ2k8iaKg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.24.0': - resolution: {integrity: sha512-mjBaoo4ocxJppTorZVKWFpy1bfFj9FeCMJqzlMQGjpNPY9JwQi7OuS1axzNIk0nMX6jSgy6ZURDZ2w0QW6D56g==} + '@rollup/rollup-linux-s390x-gnu@4.34.9': + resolution: {integrity: sha512-U+5SwTMoeYXoDzJX5dhDTxRltSrIax8KWwfaaYcynuJw8mT33W7oOgz0a+AaXtGuvhzTr2tVKh5UO8GVANTxyQ==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.24.0': - resolution: {integrity: sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A==} + '@rollup/rollup-linux-x64-gnu@4.34.9': + resolution: {integrity: sha512-FwBHNSOjUTQLP4MG7y6rR6qbGw4MFeQnIBrMe161QGaQoBQLqSUEKlHIiVgF3g/mb3lxlxzJOpIBhaP+C+KP2A==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.24.0': - resolution: {integrity: sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==} + '@rollup/rollup-linux-x64-musl@4.34.9': + resolution: {integrity: sha512-cYRpV4650z2I3/s6+5/LONkjIz8MBeqrk+vPXV10ORBnshpn8S32bPqQ2Utv39jCiDcO2eJTuSlPXpnvmaIgRA==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.24.0': - resolution: {integrity: sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ==} + '@rollup/rollup-win32-arm64-msvc@4.34.9': + resolution: {integrity: sha512-z4mQK9dAN6byRA/vsSgQiPeuO63wdiDxZ9yg9iyX2QTzKuQM7T4xlBoeUP/J8uiFkqxkcWndWi+W7bXdPbt27Q==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.24.0': - resolution: {integrity: sha512-xrNcGDU0OxVcPTH/8n/ShH4UevZxKIO6HJFK0e15XItZP2UcaiLFd5kiX7hJnqCbSztUF8Qot+JWBC/QXRPYWQ==} + '@rollup/rollup-win32-ia32-msvc@4.34.9': + resolution: {integrity: sha512-KB48mPtaoHy1AwDNkAJfHXvHp24H0ryZog28spEs0V48l3H1fr4i37tiyHsgKZJnCmvxsbATdZGBpbmxTE3a9w==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.24.0': - resolution: {integrity: sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==} + '@rollup/rollup-win32-x64-msvc@4.34.9': + resolution: {integrity: sha512-AyleYRPU7+rgkMWbEh71fQlrzRfeP6SyMnRf9XX4fCdDPAJumdSBqYEcWPMzVQ4ScAl7E4oFfK0GUVn77xSwbw==} cpu: [x64] os: [win32] - '@rushstack/node-core-library@5.9.0': - resolution: {integrity: sha512-MMsshEWkTbXqxqFxD4gcIUWQOCeBChlGczdZbHfqmNZQFLHB3yWxDFSMHFUdu2/OB9NUk7Awn5qRL+rws4HQNg==} + '@rushstack/node-core-library@5.11.0': + resolution: {integrity: sha512-I8+VzG9A0F3nH2rLpPd7hF8F7l5Xb7D+ldrWVZYegXM6CsKkvWc670RlgK3WX8/AseZfXA/vVrh0bpXe2Y2UDQ==} peerDependencies: '@types/node': '*' peerDependenciesMeta: @@ -852,16 +874,16 @@ packages: '@rushstack/rig-package@0.5.3': resolution: {integrity: sha512-olzSSjYrvCNxUFZowevC3uz8gvKr3WTpHQ7BkpjtRpA3wK+T0ybep/SRUMfr195gBzJm5gaXw0ZMgjIyHqJUow==} - '@rushstack/terminal@0.14.2': - resolution: {integrity: sha512-2fC1wqu1VCExKC0/L+0noVcFQEXEnoBOtCIex1TOjBzEDWcw8KzJjjj7aTP6mLxepG0XIyn9OufeFb6SFsa+sg==} + '@rushstack/terminal@0.15.0': + resolution: {integrity: sha512-vXQPRQ+vJJn4GVqxkwRe+UGgzNxdV8xuJZY2zem46Y0p3tlahucH9/hPmLGj2i9dQnUBFiRnoM9/KW7PYw8F4Q==} peerDependencies: '@types/node': '*' peerDependenciesMeta: '@types/node': optional: true - '@rushstack/ts-command-line@4.23.0': - resolution: {integrity: sha512-jYREBtsxduPV6ptNq8jOKp9+yx0ld1Tb/Tkdnlj8gTjazl1sF3DwX2VbluyYrNd0meWIL0bNeer7WDf5tKFjaQ==} + '@rushstack/ts-command-line@4.23.5': + resolution: {integrity: sha512-jg70HfoK44KfSP3MTiL5rxsZH7X1ktX3cZs9Sl8eDu1/LxJSbPsh0MOFRC710lIuYYSgxWjI5AjbCBAl7u3RxA==} '@scure/base@1.1.9': resolution: {integrity: sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==} @@ -888,11 +910,11 @@ packages: resolution: {integrity: sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==} engines: {node: '>=5.10'} - '@solana/web3.js@1.95.4': - resolution: {integrity: sha512-sdewnNEA42ZSMxqkzdwEWi6fDgzwtJHaQa5ndUGEJYtoOnM6X5cvPmjoTUp7/k7bRrVAxfBgDnvQQHD6yhlLYw==} + '@solana/web3.js@1.98.0': + resolution: {integrity: sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA==} - '@swc/helpers@0.5.13': - resolution: {integrity: sha512-UoKGxQ3r5kYI9dALKJapMmuK+1zWM/H17Z1+iwnNmzcJRnfFuevZs375TA5rW31pu4BS4NoSy1fRsexDXfWn5w==} + '@swc/helpers@0.5.15': + resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} '@types/argparse@1.0.38': resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} @@ -924,23 +946,20 @@ packages: '@types/istanbul-reports@3.0.4': resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} - '@types/jest@29.5.13': - resolution: {integrity: sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg==} + '@types/jest@29.5.14': + resolution: {integrity: sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==} '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - '@types/ms@0.7.34': - resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} - - '@types/mute-stream@0.0.4': - resolution: {integrity: sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==} + '@types/ms@2.1.0': + resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@22.7.8': - resolution: {integrity: sha512-a922jJy31vqR5sk+kAdIENJjHblqcZ4RmERviFsER4WJcEONqxKcjNOlk0q7OUfrF5sddT+vng070cdfMlrPLg==} + '@types/node@22.13.9': + resolution: {integrity: sha512-acBjXdRJ3A6Pb3tqnw9HZmyR3Fiol3aGxRCK1x3d+6CDAMjl7I649wpSd+yNURCjbOUGu9tqtLKnTGxmK6CyGw==} '@types/pbkdf2@3.1.2': resolution: {integrity: sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==} @@ -969,14 +988,11 @@ packages: '@types/uuid@8.3.4': resolution: {integrity: sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==} - '@types/wrap-ansi@3.0.0': - resolution: {integrity: sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==} - '@types/ws@7.4.7': resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} - '@types/ws@8.5.12': - resolution: {integrity: sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==} + '@types/ws@8.5.14': + resolution: {integrity: sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==} '@types/yargs-parser@21.0.3': resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} @@ -984,16 +1000,13 @@ packages: '@types/yargs@17.0.33': resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} - '@typescript-eslint/eslint-plugin@8.11.0': - resolution: {integrity: sha512-KhGn2LjW1PJT2A/GfDpiyOfS4a8xHQv2myUagTM5+zsormOmBlYsnQ6pobJ8XxJmh6hnHwa2Mbe3fPrDJoDhbA==} + '@typescript-eslint/eslint-plugin@8.26.0': + resolution: {integrity: sha512-cLr1J6pe56zjKYajK6SSSre6nl1Gj6xDp1TY0trpgPzjVbgDwd09v2Ws37LABxzkicmUjhEeg/fAUjPJJB1v5Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + typescript: '>=4.8.4 <5.9.0' '@typescript-eslint/parser@6.21.0': resolution: {integrity: sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==} @@ -1005,39 +1018,34 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.11.0': - resolution: {integrity: sha512-lmt73NeHdy1Q/2ul295Qy3uninSqi6wQI18XwSpm8w0ZbQXUpjCAWP1Vlv/obudoBiIjJVjlztjQ+d/Md98Yxg==} + '@typescript-eslint/parser@8.26.0': + resolution: {integrity: sha512-mNtXP9LTVBy14ZF3o7JG69gRPBK/2QWtQd0j0oH26HcY/foyJJau6pNUez7QrM5UHnSvwlQcJXKsk0I99B9pOA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + typescript: '>=4.8.4 <5.9.0' '@typescript-eslint/scope-manager@6.21.0': resolution: {integrity: sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/scope-manager@8.11.0': - resolution: {integrity: sha512-Uholz7tWhXmA4r6epo+vaeV7yjdKy5QFCERMjs1kMVsLRKIrSdM6o21W2He9ftp5PP6aWOVpD5zvrvuHZC0bMQ==} + '@typescript-eslint/scope-manager@8.26.0': + resolution: {integrity: sha512-E0ntLvsfPqnPwng8b8y4OGuzh/iIOm2z8U3S9zic2TeMLW61u5IH2Q1wu0oSTkfrSzwbDJIB/Lm8O3//8BWMPA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.11.0': - resolution: {integrity: sha512-ItiMfJS6pQU0NIKAaybBKkuVzo6IdnAhPFZA/2Mba/uBjuPQPet/8+zh5GtLHwmuFRShZx+8lhIs7/QeDHflOg==} + '@typescript-eslint/type-utils@8.26.0': + resolution: {integrity: sha512-ruk0RNChLKz3zKGn2LwXuVoeBcUMh+jaqzN461uMMdxy5H9epZqIBtYj7UiPXRuOpaALXGbmRuZQhmwHhaS04Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' '@typescript-eslint/types@6.21.0': resolution: {integrity: sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/types@8.11.0': - resolution: {integrity: sha512-tn6sNMHf6EBAYMvmPUaKaVeYvhUsrE6x+bXQTxjQRp360h1giATU0WvgeEys1spbvb5R+VpNOZ+XJmjD8wOUHw==} + '@typescript-eslint/types@8.26.0': + resolution: {integrity: sha512-89B1eP3tnpr9A8L6PZlSjBvnJhWXtYfZhECqlBl1D9Lme9mHO6iWlsprBtVenQvY1HMhax1mWOjhtL3fh/u+pA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/typescript-estree@6.21.0': @@ -1049,31 +1057,29 @@ packages: typescript: optional: true - '@typescript-eslint/typescript-estree@8.11.0': - resolution: {integrity: sha512-yHC3s1z1RCHoCz5t06gf7jH24rr3vns08XXhfEqzYpd6Hll3z/3g23JRi0jM8A47UFKNc3u/y5KIMx8Ynbjohg==} + '@typescript-eslint/typescript-estree@8.26.0': + resolution: {integrity: sha512-tiJ1Hvy/V/oMVRTbEOIeemA2XoylimlDQ03CgPPNaHYZbpsc78Hmngnt+WXZfJX1pjQ711V7g0H7cSJThGYfPQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/utils@8.11.0': - resolution: {integrity: sha512-CYiX6WZcbXNJV7UNB4PLDIBtSdRmRI/nb0FMyqHPTQD1rMjA0foPLaPUV39C/MxkTd/QKSeX+Gb34PPsDVC35g==} + '@typescript-eslint/utils@8.26.0': + resolution: {integrity: sha512-2L2tU3FVwhvU14LndnQCA2frYC8JnPDVKyQtWFPf8IYFMt/ykEN1bPolNhNbCVgOmdzTlWdusCTKA/9nKrf8Ig==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' '@typescript-eslint/visitor-keys@6.21.0': resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/visitor-keys@8.11.0': - resolution: {integrity: sha512-EaewX6lxSjRJnc+99+dqzTeoDZUfyrA52d2/HRrkI830kgovWsmIiTfmr0NZorzqic7ga+1bS60lRBUgR3n/Bw==} + '@typescript-eslint/visitor-keys@8.26.0': + resolution: {integrity: sha512-2z8JQJWAzPdDd51dRQ/oqIJxe99/hoLIqmf8RMCAJQtYDc535W/Jt2+RTP4bP0aKeBG1F65yjIZuczOXCmbWwg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@ungap/structured-clone@1.2.0': - resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@ungap/structured-clone@1.3.0': + resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} '@vitest/expect@2.1.3': resolution: {integrity: sha512-SNBoPubeCJhZ48agjXruCI57DvxcsivVDdWz+SSsmjTT4QN/DfHk3zB/xKsJqMs26bLZ/pNRLnCf0j679i0uWQ==} @@ -1093,6 +1099,9 @@ packages: '@vitest/pretty-format@2.1.3': resolution: {integrity: sha512-XH1XdtoLZCpqV59KRbPrIhFCOO0hErxrQCMcvnQete3Vibb9UeIOX02uFPfVn3Z9ZXsq78etlfyhnkmIZSzIwQ==} + '@vitest/pretty-format@2.1.9': + resolution: {integrity: sha512-KhRIdGV2U9HOUzxfiHmY8IFHTdqtOhIzCpd8WRdJiE7D/HUcZVD0EgQCVjm+Q9gkUXWgBvMmTtZgIG48wq7sOQ==} + '@vitest/runner@2.1.3': resolution: {integrity: sha512-JGzpWqmFJ4fq5ZKHtVO3Xuy1iF2rHGV4d/pdzgkYHm1+gOzNZtqjvyiaDGJytRyMU54qkxpNzCx+PErzJ1/JqQ==} @@ -1105,34 +1114,34 @@ packages: '@vitest/utils@2.1.3': resolution: {integrity: sha512-xpiVfDSg1RrYT0tX6czgerkpcKFmFOF/gCr30+Mve5V2kewCy4Prn1/NDMSRwaSmT7PRaOF83wu+bEtsY1wrvA==} - '@volar/language-core@2.4.6': - resolution: {integrity: sha512-FxUfxaB8sCqvY46YjyAAV6c3mMIq/NWQMVvJ+uS4yxr1KzOvyg61gAuOnNvgCvO4TZ7HcLExBEsWcDu4+K4E8A==} + '@volar/language-core@2.4.11': + resolution: {integrity: sha512-lN2C1+ByfW9/JRPpqScuZt/4OrUUse57GLI6TbLgTIqBVemdl1wNcZ1qYGEo2+Gw8coYLgCy7SuKqn6IrQcQgg==} - '@volar/source-map@2.4.6': - resolution: {integrity: sha512-Nsh7UW2ruK+uURIPzjJgF0YRGP5CX9nQHypA2OMqdM2FKy7rh+uv3XgPnWPw30JADbKvZ5HuBzG4gSbVDYVtiw==} + '@volar/source-map@2.4.11': + resolution: {integrity: sha512-ZQpmafIGvaZMn/8iuvCFGrW3smeqkq/IIh9F1SdSx9aUl0J4Iurzd6/FhmjNO5g2ejF3rT45dKskgXWiofqlZQ==} - '@volar/typescript@2.4.6': - resolution: {integrity: sha512-NMIrA7y5OOqddL9VtngPWYmdQU03htNKFtAYidbYfWA0TOhyGVd9tfcP4TsLWQ+RBWDZCbBqsr8xzU0ZOxYTCQ==} + '@volar/typescript@2.4.11': + resolution: {integrity: sha512-2DT+Tdh88Spp5PyPbqhyoYavYCPDsqbHLFwcUI9K1NlY1YgUJvujGdrqUp0zWxnW7KWNTr3xSpMuv2WnaTKDAw==} - '@vue/compiler-core@3.5.12': - resolution: {integrity: sha512-ISyBTRMmMYagUxhcpyEH0hpXRd/KqDU4ymofPgl2XAkY9ZhQ+h0ovEZJIiPop13UmR/54oA2cgMDjgroRelaEw==} + '@vue/compiler-core@3.5.13': + resolution: {integrity: sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==} - '@vue/compiler-dom@3.5.12': - resolution: {integrity: sha512-9G6PbJ03uwxLHKQ3P42cMTi85lDRvGLB2rSGOiQqtXELat6uI4n8cNz9yjfVHRPIu+MsK6TE418Giruvgptckg==} + '@vue/compiler-dom@3.5.13': + resolution: {integrity: sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==} '@vue/compiler-vue2@2.7.16': resolution: {integrity: sha512-qYC3Psj9S/mfu9uVi5WvNZIzq+xnXMhOwbTFKKDD7b1lhpnn71jXSFdTQ+WsIEk0ONCd7VV2IMm7ONl6tbQ86A==} - '@vue/language-core@2.1.6': - resolution: {integrity: sha512-MW569cSky9R/ooKMh6xa2g1D0AtRKbL56k83dzus/bx//RDJk24RHWkMzbAlXjMdDNyxAaagKPRquBIxkxlCkg==} + '@vue/language-core@2.2.0': + resolution: {integrity: sha512-O1ZZFaaBGkKbsRfnVH1ifOK1/1BUkyK+3SQsfnh6PmMmD4qJcTU8godCeA96jjDRTL6zgnK7YzCHfaUlH2r0Mw==} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true - '@vue/shared@3.5.12': - resolution: {integrity: sha512-L2RPSAwUFbgZH20etwrXyVyCBu9OxRSi8T/38QsvnkJyvq2LufW2lDCOzm7t/U9C1mkhJGWYfCuFBCmIuNivrg==} + '@vue/shared@3.5.13': + resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==} JSONStream@1.3.5: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} @@ -1154,16 +1163,16 @@ packages: peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn@8.13.0: - resolution: {integrity: sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==} + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} engines: {node: '>=0.4.0'} hasBin: true aes-js@3.1.2: resolution: {integrity: sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==} - agentkeepalive@4.5.0: - resolution: {integrity: sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==} + agentkeepalive@4.6.0: + resolution: {integrity: sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==} engines: {node: '>= 8.0.0'} ajv-draft-04@1.0.0: @@ -1191,6 +1200,9 @@ packages: ajv@8.13.0: resolution: {integrity: sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==} + alien-signals@0.4.14: + resolution: {integrity: sha512-itUAVzhczTmP2U5yX67xVpsbbOiquusbWVyA9N+sy6+r6YVbFkahXvNCeEPWEOMhwDYwbVbGHFkVL03N9I5g+Q==} + ansi-escapes@4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} @@ -1211,10 +1223,6 @@ packages: resolution: {integrity: sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==} engines: {node: '>=0.10.0'} - ansi-styles@3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} - ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} @@ -1299,8 +1307,8 @@ packages: resolution: {integrity: sha512-vkJlc6ZRPtGI6Lu1bm8lTIVOq/MXe70b75LNZIohWbzw/kEDX0HXZCzoBbW1QxdAoGS9rZY40nchQ+KUPdDdEQ==} deprecated: 'Switch to micro-key-producer: the package has been merged into it' - bn.js@4.12.0: - resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} + bn.js@4.12.1: + resolution: {integrity: sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==} bn.js@5.2.1: resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} @@ -1342,12 +1350,12 @@ packages: buffer@6.0.3: resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} - bufferutil@4.0.8: - resolution: {integrity: sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==} + bufferutil@4.0.9: + resolution: {integrity: sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw==} engines: {node: '>=6.14.2'} - bundle-require@5.0.0: - resolution: {integrity: sha512-GuziW3fSSmopcx4KRymQEJVbZUfqlCqcq7dvs6TYwKRZiegK/2buMxQTPs6MGlNv50wms1699qYO54R8XfRX4w==} + bundle-require@5.1.0: + resolution: {integrity: sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} peerDependencies: esbuild: '>=0.18' @@ -1364,18 +1372,14 @@ packages: resolution: {integrity: sha512-3Cco8XQhi27DogSp9Ri6LYNZLi/TBY/JVnDe+mj06NkBjW/ZYOtekaEU4wZ4xcRMNrFkDv8KNtOAqHyDfz3lYg==} engines: {node: '>=18.7'} - chai@5.1.1: - resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==} + chai@5.2.0: + resolution: {integrity: sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==} engines: {node: '>=12'} chalk@1.1.3: resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} engines: {node: '>=0.10.0'} - chalk@2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} - chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} @@ -1384,16 +1388,17 @@ packages: resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} engines: {node: '>= 16'} - chokidar@4.0.1: - resolution: {integrity: sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==} + chokidar@4.0.3: + resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} engines: {node: '>= 14.16.0'} ci-info@3.9.0: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} - cipher-base@1.0.4: - resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} + cipher-base@1.0.6: + resolution: {integrity: sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw==} + engines: {node: '>= 0.10'} cli-width@4.1.0: resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} @@ -1403,16 +1408,10 @@ packages: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} - color-convert@1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} - color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} - color-name@1.1.3: - resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} @@ -1430,21 +1429,21 @@ packages: compare-versions@6.1.1: resolution: {integrity: sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==} - computeds@0.0.1: - resolution: {integrity: sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==} - concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} confbox@0.1.8: resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} - consola@3.2.3: - resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} + confbox@0.2.1: + resolution: {integrity: sha512-hkT3yDPFbs95mNCy1+7qNKC6Pro+/ibzYxtM2iqEigpf0sVw+bg4Zh9/snjsBcf990vfIsg5+1U7VyiyBb3etg==} + + consola@3.4.0: + resolution: {integrity: sha512-EiPU8G6dQG0GFHNR8ljnZFki/8a+cQwEQ+7wpxdChl02Q8HXlwEZWD5lqAF8vC2sEC3Tehr8hy7vErz88LHyUA==} engines: {node: ^14.18.0 || >=16.10.0} - cookie@0.5.0: - resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} + cookie@0.7.2: + resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} engines: {node: '>= 0.6'} crc-32@1.2.2: @@ -1458,8 +1457,8 @@ packages: create-hmac@1.1.7: resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} - cross-spawn@7.0.3: - resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} data-uri-to-buffer@4.0.1: @@ -1469,8 +1468,8 @@ packages: de-indent@1.0.2: resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} - debug@4.3.7: - resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} + debug@4.4.0: + resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} engines: {node: '>=6.0'} peerDependencies: supports-color: '*' @@ -1504,8 +1503,8 @@ packages: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} - dotenv@16.4.5: - resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} + dotenv@16.4.7: + resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==} engines: {node: '>=12'} eastasianwidth@0.2.0: @@ -1541,8 +1540,8 @@ packages: engines: {node: '>=12'} hasBin: true - esbuild@0.24.2: - resolution: {integrity: sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==} + esbuild@0.25.0: + resolution: {integrity: sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==} engines: {node: '>=18'} hasBin: true @@ -1568,8 +1567,8 @@ packages: peerDependencies: eslint: '>=7.0.0' - eslint-plugin-prettier@5.2.1: - resolution: {integrity: sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==} + eslint-plugin-prettier@5.2.3: + resolution: {integrity: sha512-qJ+y0FfCp/mQYQ/vWQ3s7eUlFEL4PyKfAJxsnYTJ4YT73nsJBWqmEpFryxV9OeUiqmsTsYJ5Y+KDNaeP31wrRw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: '@types/eslint': '>=8.0.0' @@ -1586,16 +1585,16 @@ packages: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-scope@8.1.0: - resolution: {integrity: sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==} + eslint-scope@8.2.0: + resolution: {integrity: sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-visitor-keys@4.1.0: - resolution: {integrity: sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==} + eslint-visitor-keys@4.2.0: + resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} eslint@8.57.1: @@ -1604,8 +1603,8 @@ packages: deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true - eslint@9.13.0: - resolution: {integrity: sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA==} + eslint@9.21.0: + resolution: {integrity: sha512-KjeihdFqTPhOMXTt7StsDxriV4n66ueuF/jfPNC3j/lduHwr/ijDwJMsF+wyMJethgiKi5wniIE243vi07d3pg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -1614,8 +1613,8 @@ packages: jiti: optional: true - espree@10.2.0: - resolution: {integrity: sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==} + espree@10.3.0: + resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} espree@9.6.1: @@ -1664,6 +1663,9 @@ packages: resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + exsolve@1.0.1: + resolution: {integrity: sha512-Smf0iQtkQVJLaph8r/qS8C8SWfQkaq9Q/dFcD44MLbJj6DNhlWefVuaS21SjfqOsBbjVlKtbCj6L9ekXK6EZUg==} + eyes@0.1.8: resolution: {integrity: sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==} engines: {node: '> 0.1.90'} @@ -1674,8 +1676,8 @@ packages: fast-diff@1.3.0: resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} - fast-glob@3.3.2: - resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + fast-glob@3.3.3: + resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} engines: {node: '>=8.6.0'} fast-json-stable-stringify@2.1.0: @@ -1690,11 +1692,11 @@ packages: fast-stable-stringify@1.0.0: resolution: {integrity: sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==} - fastq@1.17.1: - resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + fastq@1.19.1: + resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==} - fdir@6.4.2: - resolution: {integrity: sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==} + fdir@6.4.3: + resolution: {integrity: sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==} peerDependencies: picomatch: ^3 || ^4 peerDependenciesMeta: @@ -1732,20 +1734,20 @@ packages: resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} engines: {node: '>=16'} - flatted@3.3.1: - resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + flatted@3.3.3: + resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==} - foreground-child@3.3.0: - resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} + foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} engines: {node: '>=14'} formdata-polyfill@4.0.10: resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} engines: {node: '>=12.20.0'} - fs-extra@7.0.1: - resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} - engines: {node: '>=6 <7 || >=8'} + fs-extra@11.3.0: + resolution: {integrity: sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==} + engines: {node: '>=14.14'} fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -1796,18 +1798,14 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - graphql@16.9.0: - resolution: {integrity: sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==} + graphql@16.10.0: + resolution: {integrity: sha512-AjqGKbDGUFRKIRCP9tCKiIGHyriz2oHEbPIbEtcSLSs4YjReZOIPQQWek4+6hjw62H9QShXHyaGivGiYVLeYFQ==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} has-ansi@2.0.0: resolution: {integrity: sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==} engines: {node: '>=0.10.0'} - has-flag@3.0.0: - resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} - engines: {node: '>=4'} - has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} @@ -1843,8 +1841,8 @@ packages: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} - import-fresh@3.3.0: - resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + import-fresh@3.3.1: + resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} engines: {node: '>=6'} import-lazy@4.0.0: @@ -1869,8 +1867,8 @@ packages: is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - is-core-module@2.15.1: - resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} + is-core-module@2.16.1: + resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} engines: {node: '>= 0.4'} is-extglob@2.1.1: @@ -1912,8 +1910,8 @@ packages: jackspeak@3.4.3: resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} - jayson@4.1.2: - resolution: {integrity: sha512-5nzMWDHy6f+koZOuYsArh2AXs73NfWYVlFyJJuCedr93GpY+Ku8qq10ropSXVfHK+H0T6paA88ww+/dV+1fBNA==} + jayson@4.1.3: + resolution: {integrity: sha512-LtXh5aYZodBZ9Fc3j6f2w+MTNcnxteMOrb+QgIouguGOulWi0lieEkOUg+HkjjFs0DGoWDds6bi4E9hpNFLulQ==} engines: {node: '>=8'} hasBin: true @@ -1937,10 +1935,6 @@ packages: resolution: {integrity: sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - jiti@2.4.0: - resolution: {integrity: sha512-H5UpaUI+aHOqZXlYOaFP/8AzKsg+guWu+Pr3Y8i7+Y3zr1aXAvCvTAQ1RxSc6oVD8R8c7brgNtTVP91E7upH/g==} - hasBin: true - jju@1.4.0: resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} @@ -1980,8 +1974,8 @@ packages: resolution: {integrity: sha512-B281bLCT2TRMQa+AQUQY5AGcqSOXBOKaYGP4wDzoA/+QswUfN8sODektbPEs9Baq7LGKun5jQbNFpzwGuVYKhw==} engines: {node: '>=8'} - jsonfile@4.0.0: - resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} jsonparse@1.3.1: resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} @@ -2012,8 +2006,8 @@ packages: resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - local-pkg@0.5.0: - resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} + local-pkg@1.1.1: + resolution: {integrity: sha512-WunYko2W1NcdfAFpuLUoucsgULmgDBRkdxHxWQ7mK0cQqwPiy8E1enjuRBrhLtZkB5iScJ1XIPdhVEFK8aOLSg==} engines: {node: '>=14'} locate-path@6.0.0: @@ -2036,8 +2030,8 @@ packages: resolution: {integrity: sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==} engines: {node: '>= 0.6.0'} - loupe@3.1.2: - resolution: {integrity: sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==} + loupe@3.1.3: + resolution: {integrity: sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==} lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} @@ -2046,8 +2040,8 @@ packages: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} - magic-string@0.30.12: - resolution: {integrity: sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==} + magic-string@0.30.17: + resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} md5.js@1.3.5: resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} @@ -2097,14 +2091,14 @@ packages: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true - mlly@1.7.2: - resolution: {integrity: sha512-tN3dvVHYVz4DhSXinXIk7u9syPYaJvio118uomkovAtWBT+RdbP6Lfh/5Lvo519YMmwBafwlh20IPTXIStscpA==} + mlly@1.7.4: + resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==} ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - msw@2.5.0: - resolution: {integrity: sha512-DwIGQV/XFzkseQD7Ux3rPWMRa7DpozicRQ87QLX9Gzik2xyqcXvtvlBEUs57RziTBZPe/QzaKSl92fJVdxxt2g==} + msw@2.7.3: + resolution: {integrity: sha512-+mycXv8l2fEAjFZ5sjrtjJDmm2ceKGjrNbBr1durRg6VkU9fNUE/gsmQ51hWbHqs+l35W1iM+ZsmOD9Fd6lspw==} engines: {node: '>=18'} hasBin: true peerDependencies: @@ -2116,18 +2110,18 @@ packages: muggle-string@0.4.1: resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} - mute-stream@1.0.0: - resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + mute-stream@2.0.0: + resolution: {integrity: sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==} + engines: {node: ^18.17.0 || >=20.5.0} mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} - nan@2.22.0: - resolution: {integrity: sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==} + nan@2.22.2: + resolution: {integrity: sha512-DANghxFkS1plDdRsX0X9pm0Z6SJNN6gBdtXfanwoZ8hooC5gosGFSBGRYHUVPz1asKA/kMRqDRdHrluZ61SpBQ==} - nanoid@3.3.7: - resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} + nanoid@3.3.8: + resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true @@ -2157,8 +2151,8 @@ packages: resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - node-gyp-build@4.8.2: - resolution: {integrity: sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw==} + node-gyp-build@4.8.4: + resolution: {integrity: sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==} hasBin: true object-assign@4.1.1: @@ -2234,6 +2228,9 @@ packages: pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + pathval@2.0.0: resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} engines: {node: '>= 14.16'} @@ -2257,8 +2254,11 @@ packages: resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} engines: {node: '>= 6'} - pkg-types@1.2.1: - resolution: {integrity: sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==} + pkg-types@1.3.1: + resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} + + pkg-types@2.1.0: + resolution: {integrity: sha512-wmJwA+8ihJixSoHKxZJRBQG1oY8Yr9pGLzRmSsNms0iNWyHHAlZCa7mmKiFR10YPZuz/2k169JiS/inOjBCZ2A==} pony-cause@2.1.11: resolution: {integrity: sha512-M7LhCsdNbNgiLYiP4WjsfLUuFmCfnjdF6jKe2R9NKl4WFN+HZPGHJZ9lnLP7f9ZnKe3U9nuWD0szirmj+migUg==} @@ -2282,8 +2282,8 @@ packages: yaml: optional: true - postcss@8.4.47: - resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} + postcss@8.5.3: + resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==} engines: {node: ^10 || ^12 || >=14} prelude-ls@1.2.1: @@ -2306,8 +2306,8 @@ packages: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} engines: {node: '>=6.0.0'} - prettier@3.3.3: - resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} + prettier@3.5.3: + resolution: {integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==} engines: {node: '>=14'} hasBin: true @@ -2315,8 +2315,8 @@ packages: resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - psl@1.9.0: - resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} + psl@1.15.0: + resolution: {integrity: sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==} punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} @@ -2325,6 +2325,9 @@ packages: pushdata-bitcoin@1.0.1: resolution: {integrity: sha512-hw7rcYTJRAl4olM8Owe8x0fBuJJ+WGbMhQuLWOXEMN3PxPCKQHRkhfL+XG0+iXUmSHjkMmb3Ba55Mt21cZc9kQ==} + quansync@0.2.8: + resolution: {integrity: sha512-4+saucphJMazjt7iOM27mbFCk+D9dd/zmgMDCzRZ8MEoBfYp7lAvoN38et/phRQF6wOPMy/OROBGgoWeSKyluA==} + querystringify@2.2.0: resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} @@ -2344,9 +2347,9 @@ packages: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} - readdirp@4.0.2: - resolution: {integrity: sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==} - engines: {node: '>= 14.16.0'} + readdirp@4.1.2: + resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} + engines: {node: '>= 14.18.0'} readline-sync@1.4.10: resolution: {integrity: sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw==} @@ -2377,12 +2380,13 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} - resolve@1.22.8: - resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + resolve@1.22.10: + resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==} + engines: {node: '>= 0.4'} hasBin: true - reusify@1.0.4: - resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + reusify@1.1.0: + resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} rimraf@3.0.2: @@ -2397,13 +2401,13 @@ packages: resolution: {integrity: sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==} hasBin: true - rollup@4.24.0: - resolution: {integrity: sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==} + rollup@4.34.9: + resolution: {integrity: sha512-nF5XYqWWp9hx/LrpC8sZvvvmq0TeTjQgaZHYmAgwysT9nh8sWnZhBnM8ZyVbbJFIQBLwHDNoMqsBZBbUo4U8sQ==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true - rpc-websockets@9.0.4: - resolution: {integrity: sha512-yWZWN0M+bivtoNLnaDbtny4XchdAIF5Q4g/ZsC5UC61Ckbp0QczwO8fg44rV3uYmY4WHd+EZQbn90W1d8ojzqQ==} + rpc-websockets@9.1.1: + resolution: {integrity: sha512-1IXGM/TfPT6nfYMIXkJdzn+L4JEsmb0FL1O2OBjaH03V3yuUDdKFulGLMFG6ErV+8pZ5HVC0limve01RyO+saA==} run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -2430,8 +2434,8 @@ packages: engines: {node: '>=10'} hasBin: true - semver@7.6.3: - resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + semver@7.7.1: + resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==} engines: {node: '>=10'} hasBin: true @@ -2487,8 +2491,8 @@ packages: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'} - std-env@3.7.0: - resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} + std-env@3.8.1: + resolution: {integrity: sha512-vj5lIj3Mwf9D79hBkltk5qmkFI+biIKWS2IBxEyEU3AX1tUf7AoL8nSazCOiiqQsGKIq01SClsKEzweu34uwvA==} strict-event-emitter@0.5.1: resolution: {integrity: sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==} @@ -2541,10 +2545,6 @@ packages: resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==} engines: {node: '>=0.8.0'} - supports-color@5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} - engines: {node: '>=4'} - supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} @@ -2577,22 +2577,22 @@ packages: through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - tiny-secp256k1@1.1.6: - resolution: {integrity: sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==} + tiny-secp256k1@1.1.7: + resolution: {integrity: sha512-eb+F6NabSnjbLwNoC+2o5ItbmP1kg7HliWue71JgLegQt6A5mTN8YbvTLCazdlg6e5SV6A+r8OGvZYskdlmhqQ==} engines: {node: '>=6.0.0'} tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} - tinyexec@0.3.1: - resolution: {integrity: sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==} + tinyexec@0.3.2: + resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} - tinyglobby@0.2.10: - resolution: {integrity: sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==} + tinyglobby@0.2.12: + resolution: {integrity: sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==} engines: {node: '>=12.0.0'} - tinypool@1.0.1: - resolution: {integrity: sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==} + tinypool@1.0.2: + resolution: {integrity: sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==} engines: {node: ^18.0.0 || >=20.0.0} tinyrainbow@1.2.0: @@ -2603,10 +2603,6 @@ packages: resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} engines: {node: '>=14.0.0'} - to-fast-properties@2.0.0: - resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} - engines: {node: '>=4'} - to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -2625,20 +2621,26 @@ packages: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true - ts-api-utils@1.3.0: - resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} + ts-api-utils@1.4.3: + resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==} engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' + ts-api-utils@2.0.1: + resolution: {integrity: sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} - tslib@2.8.0: - resolution: {integrity: sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==} + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - tsup@8.3.5: - resolution: {integrity: sha512-Tunf6r6m6tnZsG9GYWndg0z8dEV7fD733VBFzFJ5Vcm1FtlXB8xBD/rtrBi2a3YKEV7hHtxiZtW5EAVADoe1pA==} + tsup@8.4.0: + resolution: {integrity: sha512-b+eZbPCjz10fRryaAA7C8xlIHnf8VnsaRqydheLIqwG/Mcpfk8Z5zp3HayX7GaTygkigHl5cBUs+IhcySiIexQ==} engines: {node: '>=18'} hasBin: true peerDependencies: @@ -2671,37 +2673,37 @@ packages: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} - type-fest@4.26.1: - resolution: {integrity: sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg==} + type-fest@4.37.0: + resolution: {integrity: sha512-S/5/0kFftkq27FPNye0XM1e2NsnoD/3FS+pBmbjmmtLT6I+i344KoOf7pvXreaFsDamWeaJX55nczA1m5PsBDg==} engines: {node: '>=16'} typeforce@1.18.0: resolution: {integrity: sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==} - typescript@5.4.2: - resolution: {integrity: sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==} + typescript@5.7.3: + resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} engines: {node: '>=14.17'} hasBin: true - typescript@5.6.3: - resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} + typescript@5.8.2: + resolution: {integrity: sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==} engines: {node: '>=14.17'} hasBin: true ufo@1.5.4: resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} - undici-types@6.19.8: - resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} - - universalify@0.1.2: - resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} - engines: {node: '>= 4.0.0'} + undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} universalify@0.2.0: resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} engines: {node: '>= 4.0.0'} + universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} @@ -2730,8 +2732,8 @@ packages: varuint-bitcoin@1.1.2: resolution: {integrity: sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==} - viem@2.22.19: - resolution: {integrity: sha512-aGR/NUHaboQ/HoS86wYfJWbXt6aewjhp2OCO2uczCrusgcwXO/qC0l36AcFVw2dkOPBEhIG5oXMEso97L+xHmA==} + viem@2.23.6: + resolution: {integrity: sha512-+yUeK8rktbGFQaLIvY4Tki22HUjian9Z4eKGAUT72RF9bcfkYgK8CJZz9P83tgoeLpiTyX3xcBM4xJZrJyKmsA==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -2743,9 +2745,8 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite-plugin-dts@4.3.0: - resolution: {integrity: sha512-LkBJh9IbLwL6/rxh0C1/bOurDrIEmRE7joC+jFdOEEciAFPbpEKOLSAr5nNh5R7CJ45cMbksTrFfy52szzC5eA==} - engines: {node: ^14.18.0 || >=16.0.0} + vite-plugin-dts@4.5.3: + resolution: {integrity: sha512-P64VnD00dR+e8S26ESoFELqc17+w7pKkwlBpgXteOljFyT0zDwD8hH4zXp49M/kciy//7ZbVXIwQCekBJjfWzA==} peerDependencies: typescript: '*' vite: '*' @@ -2753,8 +2754,8 @@ packages: vite: optional: true - vite@5.4.9: - resolution: {integrity: sha512-20OVpJHh0PAM0oSOELa5GaZNWeDjcAvQjGXy2Uyr+Tp+/D2/Hdz6NLgpJLsarPTA2QJ6v8mX2P1ZfbsSKvdMkg==} + vite@5.4.14: + resolution: {integrity: sha512-EK5cY7Q1D8JNhSaPKVK4pwBFvaTmZxEnoKXLG/U9gmdDcihQGNzFlgIvaxezFR4glP1LsuiedwMBqCXH3wZccA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -2809,8 +2810,8 @@ packages: jsdom: optional: true - vscode-uri@3.0.8: - resolution: {integrity: sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==} + vscode-uri@3.1.0: + resolution: {integrity: sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==} vue-eslint-parser@9.4.3: resolution: {integrity: sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg==} @@ -2890,6 +2891,18 @@ packages: utf-8-validate: optional: true + ws@8.18.1: + resolution: {integrity: sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -2915,41 +2928,34 @@ packages: snapshots: - '@adraffy/ens-normalize@1.10.1': {} + '@adraffy/ens-normalize@1.11.0': {} - '@babel/code-frame@7.25.7': + '@babel/code-frame@7.26.2': dependencies: - '@babel/highlight': 7.25.7 + '@babel/helper-validator-identifier': 7.25.9 + js-tokens: 4.0.0 picocolors: 1.1.1 - '@babel/helper-string-parser@7.25.7': {} + '@babel/helper-string-parser@7.25.9': {} - '@babel/helper-validator-identifier@7.25.7': {} + '@babel/helper-validator-identifier@7.25.9': {} - '@babel/highlight@7.25.7': + '@babel/parser@7.26.9': dependencies: - '@babel/helper-validator-identifier': 7.25.7 - chalk: 2.4.2 - js-tokens: 4.0.0 - picocolors: 1.1.1 + '@babel/types': 7.26.9 - '@babel/parser@7.25.8': - dependencies: - '@babel/types': 7.25.8 - - '@babel/runtime@7.25.7': + '@babel/runtime@7.26.9': dependencies: regenerator-runtime: 0.14.1 - '@babel/types@7.25.8': + '@babel/types@7.26.9': dependencies: - '@babel/helper-string-parser': 7.25.7 - '@babel/helper-validator-identifier': 7.25.7 - to-fast-properties: 2.0.0 + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 - '@bundled-es-modules/cookie@2.0.0': + '@bundled-es-modules/cookie@2.0.1': dependencies: - cookie: 0.5.0 + cookie: 0.7.2 '@bundled-es-modules/statuses@1.0.1': dependencies: @@ -2968,191 +2974,193 @@ snapshots: '@esbuild/aix-ppc64@0.21.5': optional: true - '@esbuild/aix-ppc64@0.24.2': + '@esbuild/aix-ppc64@0.25.0': optional: true '@esbuild/android-arm64@0.21.5': optional: true - '@esbuild/android-arm64@0.24.2': + '@esbuild/android-arm64@0.25.0': optional: true '@esbuild/android-arm@0.21.5': optional: true - '@esbuild/android-arm@0.24.2': + '@esbuild/android-arm@0.25.0': optional: true '@esbuild/android-x64@0.21.5': optional: true - '@esbuild/android-x64@0.24.2': + '@esbuild/android-x64@0.25.0': optional: true '@esbuild/darwin-arm64@0.21.5': optional: true - '@esbuild/darwin-arm64@0.24.2': + '@esbuild/darwin-arm64@0.25.0': optional: true '@esbuild/darwin-x64@0.21.5': optional: true - '@esbuild/darwin-x64@0.24.2': + '@esbuild/darwin-x64@0.25.0': optional: true '@esbuild/freebsd-arm64@0.21.5': optional: true - '@esbuild/freebsd-arm64@0.24.2': + '@esbuild/freebsd-arm64@0.25.0': optional: true '@esbuild/freebsd-x64@0.21.5': optional: true - '@esbuild/freebsd-x64@0.24.2': + '@esbuild/freebsd-x64@0.25.0': optional: true '@esbuild/linux-arm64@0.21.5': optional: true - '@esbuild/linux-arm64@0.24.2': + '@esbuild/linux-arm64@0.25.0': optional: true '@esbuild/linux-arm@0.21.5': optional: true - '@esbuild/linux-arm@0.24.2': + '@esbuild/linux-arm@0.25.0': optional: true '@esbuild/linux-ia32@0.21.5': optional: true - '@esbuild/linux-ia32@0.24.2': + '@esbuild/linux-ia32@0.25.0': optional: true '@esbuild/linux-loong64@0.21.5': optional: true - '@esbuild/linux-loong64@0.24.2': + '@esbuild/linux-loong64@0.25.0': optional: true '@esbuild/linux-mips64el@0.21.5': optional: true - '@esbuild/linux-mips64el@0.24.2': + '@esbuild/linux-mips64el@0.25.0': optional: true '@esbuild/linux-ppc64@0.21.5': optional: true - '@esbuild/linux-ppc64@0.24.2': + '@esbuild/linux-ppc64@0.25.0': optional: true '@esbuild/linux-riscv64@0.21.5': optional: true - '@esbuild/linux-riscv64@0.24.2': + '@esbuild/linux-riscv64@0.25.0': optional: true '@esbuild/linux-s390x@0.21.5': optional: true - '@esbuild/linux-s390x@0.24.2': + '@esbuild/linux-s390x@0.25.0': optional: true '@esbuild/linux-x64@0.21.5': optional: true - '@esbuild/linux-x64@0.24.2': + '@esbuild/linux-x64@0.25.0': optional: true - '@esbuild/netbsd-arm64@0.24.2': + '@esbuild/netbsd-arm64@0.25.0': optional: true '@esbuild/netbsd-x64@0.21.5': optional: true - '@esbuild/netbsd-x64@0.24.2': + '@esbuild/netbsd-x64@0.25.0': optional: true - '@esbuild/openbsd-arm64@0.24.2': + '@esbuild/openbsd-arm64@0.25.0': optional: true '@esbuild/openbsd-x64@0.21.5': optional: true - '@esbuild/openbsd-x64@0.24.2': + '@esbuild/openbsd-x64@0.25.0': optional: true '@esbuild/sunos-x64@0.21.5': optional: true - '@esbuild/sunos-x64@0.24.2': + '@esbuild/sunos-x64@0.25.0': optional: true '@esbuild/win32-arm64@0.21.5': optional: true - '@esbuild/win32-arm64@0.24.2': + '@esbuild/win32-arm64@0.25.0': optional: true '@esbuild/win32-ia32@0.21.5': optional: true - '@esbuild/win32-ia32@0.24.2': + '@esbuild/win32-ia32@0.25.0': optional: true '@esbuild/win32-x64@0.21.5': optional: true - '@esbuild/win32-x64@0.24.2': + '@esbuild/win32-x64@0.25.0': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.1)': + '@eslint-community/eslint-utils@4.4.1(eslint@8.57.1)': dependencies: eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.4.0(eslint@9.13.0(jiti@2.4.0))': + '@eslint-community/eslint-utils@4.4.1(eslint@9.21.0)': dependencies: - eslint: 9.13.0(jiti@2.4.0) + eslint: 9.21.0 eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.11.1': {} + '@eslint-community/regexpp@4.12.1': {} - '@eslint/config-array@0.18.0': + '@eslint/config-array@0.19.2': dependencies: - '@eslint/object-schema': 2.1.4 - debug: 4.3.7 + '@eslint/object-schema': 2.1.6 + debug: 4.4.0 minimatch: 3.1.2 transitivePeerDependencies: - supports-color - '@eslint/core@0.7.0': {} + '@eslint/core@0.12.0': + dependencies: + '@types/json-schema': 7.0.15 '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.7 + debug: 4.4.0 espree: 9.6.1 globals: 13.24.0 ignore: 5.3.2 - import-fresh: 3.3.0 + import-fresh: 3.3.1 js-yaml: 4.1.0 minimatch: 3.1.2 strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color - '@eslint/eslintrc@3.1.0': + '@eslint/eslintrc@3.3.0': dependencies: ajv: 6.12.6 - debug: 4.3.7 - espree: 10.2.0 + debug: 4.4.0 + espree: 10.3.0 globals: 14.0.0 ignore: 5.3.2 - import-fresh: 3.3.0 + import-fresh: 3.3.1 js-yaml: 4.1.0 minimatch: 3.1.2 strip-json-comments: 3.1.1 @@ -3161,12 +3169,13 @@ snapshots: '@eslint/js@8.57.1': {} - '@eslint/js@9.13.0': {} + '@eslint/js@9.21.0': {} - '@eslint/object-schema@2.1.4': {} + '@eslint/object-schema@2.1.6': {} - '@eslint/plugin-kit@0.2.1': + '@eslint/plugin-kit@0.2.7': dependencies: + '@eslint/core': 0.12.0 levn: 0.4.1 '@ethereumjs/common@3.2.0': @@ -3207,17 +3216,17 @@ snapshots: '@ethereumjs/rlp': 5.0.2 ethereum-cryptography: 2.2.1 - '@humanfs/core@0.19.0': {} + '@humanfs/core@0.19.1': {} - '@humanfs/node@0.16.5': + '@humanfs/node@0.16.6': dependencies: - '@humanfs/core': 0.19.0 + '@humanfs/core': 0.19.1 '@humanwhocodes/retry': 0.3.1 '@humanwhocodes/config-array@0.13.0': dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.7 + debug: 4.4.0 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -3228,31 +3237,33 @@ snapshots: '@humanwhocodes/retry@0.3.1': {} - '@inquirer/confirm@4.0.1': + '@humanwhocodes/retry@0.4.2': {} + + '@inquirer/confirm@5.1.6(@types/node@22.13.9)': dependencies: - '@inquirer/core': 9.2.1 - '@inquirer/type': 2.0.0 + '@inquirer/core': 10.1.7(@types/node@22.13.9) + '@inquirer/type': 3.0.4(@types/node@22.13.9) + optionalDependencies: + '@types/node': 22.13.9 - '@inquirer/core@9.2.1': + '@inquirer/core@10.1.7(@types/node@22.13.9)': dependencies: - '@inquirer/figures': 1.0.7 - '@inquirer/type': 2.0.0 - '@types/mute-stream': 0.0.4 - '@types/node': 22.7.8 - '@types/wrap-ansi': 3.0.0 + '@inquirer/figures': 1.0.10 + '@inquirer/type': 3.0.4(@types/node@22.13.9) ansi-escapes: 4.3.2 cli-width: 4.1.0 - mute-stream: 1.0.0 + mute-stream: 2.0.0 signal-exit: 4.1.0 - strip-ansi: 6.0.1 wrap-ansi: 6.2.0 yoctocolors-cjs: 2.1.2 + optionalDependencies: + '@types/node': 22.13.9 - '@inquirer/figures@1.0.7': {} + '@inquirer/figures@1.0.10': {} - '@inquirer/type@2.0.0': - dependencies: - mute-stream: 1.0.0 + '@inquirer/type@3.0.4(@types/node@22.13.9)': + optionalDependencies: + '@types/node': 22.13.9 '@isaacs/cliui@8.0.2': dependencies: @@ -3276,11 +3287,11 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.7.8 + '@types/node': 22.13.9 '@types/yargs': 17.0.33 chalk: 4.1.2 - '@jridgewell/gen-mapping@0.3.5': + '@jridgewell/gen-mapping@0.3.8': dependencies: '@jridgewell/set-array': 1.2.1 '@jridgewell/sourcemap-codec': 1.5.0 @@ -3297,18 +3308,19 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@metamask/abi-utils@2.0.4': + '@metamask/abi-utils@3.0.0': dependencies: '@metamask/superstruct': 3.1.0 - '@metamask/utils': 9.3.0 + '@metamask/utils': 11.2.0 transitivePeerDependencies: - supports-color - '@metamask/eth-sig-util@8.0.0': + '@metamask/eth-sig-util@8.2.0': dependencies: + '@ethereumjs/rlp': 4.0.1 '@ethereumjs/util': 8.1.0 - '@metamask/abi-utils': 2.0.4 - '@metamask/utils': 9.3.0 + '@metamask/abi-utils': 3.0.0 + '@metamask/utils': 11.2.0 '@scure/base': 1.1.9 ethereum-cryptography: 2.2.1 tweetnacl: 1.0.3 @@ -3317,56 +3329,56 @@ snapshots: '@metamask/superstruct@3.1.0': {} - '@metamask/utils@9.3.0': + '@metamask/utils@11.2.0': dependencies: '@ethereumjs/tx': 4.2.0 '@metamask/superstruct': 3.1.0 '@noble/hashes': 1.7.1 '@scure/base': 1.1.9 '@types/debug': 4.1.12 - debug: 4.3.7 + debug: 4.4.0 pony-cause: 2.1.11 - semver: 7.6.3 + semver: 7.7.1 uuid: 9.0.1 transitivePeerDependencies: - supports-color - '@microsoft/api-extractor-model@7.29.8(@types/node@22.7.8)': + '@microsoft/api-extractor-model@7.30.3(@types/node@22.13.9)': dependencies: - '@microsoft/tsdoc': 0.15.0 - '@microsoft/tsdoc-config': 0.17.0 - '@rushstack/node-core-library': 5.9.0(@types/node@22.7.8) + '@microsoft/tsdoc': 0.15.1 + '@microsoft/tsdoc-config': 0.17.1 + '@rushstack/node-core-library': 5.11.0(@types/node@22.13.9) transitivePeerDependencies: - '@types/node' - '@microsoft/api-extractor@7.47.11(@types/node@22.7.8)': + '@microsoft/api-extractor@7.51.1(@types/node@22.13.9)': dependencies: - '@microsoft/api-extractor-model': 7.29.8(@types/node@22.7.8) - '@microsoft/tsdoc': 0.15.0 - '@microsoft/tsdoc-config': 0.17.0 - '@rushstack/node-core-library': 5.9.0(@types/node@22.7.8) + '@microsoft/api-extractor-model': 7.30.3(@types/node@22.13.9) + '@microsoft/tsdoc': 0.15.1 + '@microsoft/tsdoc-config': 0.17.1 + '@rushstack/node-core-library': 5.11.0(@types/node@22.13.9) '@rushstack/rig-package': 0.5.3 - '@rushstack/terminal': 0.14.2(@types/node@22.7.8) - '@rushstack/ts-command-line': 4.23.0(@types/node@22.7.8) + '@rushstack/terminal': 0.15.0(@types/node@22.13.9) + '@rushstack/ts-command-line': 4.23.5(@types/node@22.13.9) lodash: 4.17.21 minimatch: 3.0.8 - resolve: 1.22.8 + resolve: 1.22.10 semver: 7.5.4 source-map: 0.6.1 - typescript: 5.4.2 + typescript: 5.7.3 transitivePeerDependencies: - '@types/node' - '@microsoft/tsdoc-config@0.17.0': + '@microsoft/tsdoc-config@0.17.1': dependencies: - '@microsoft/tsdoc': 0.15.0 + '@microsoft/tsdoc': 0.15.1 ajv: 8.12.0 jju: 1.4.0 - resolve: 1.22.8 + resolve: 1.22.10 - '@microsoft/tsdoc@0.15.0': {} + '@microsoft/tsdoc@0.15.1': {} - '@mswjs/interceptors@0.36.5': + '@mswjs/interceptors@0.37.6': dependencies: '@open-draft/deferred-promise': 2.2.0 '@open-draft/logger': 0.3.0 @@ -3381,18 +3393,12 @@ snapshots: dependencies: '@noble/hashes': 1.4.0 - '@noble/curves@1.6.0': - dependencies: - '@noble/hashes': 1.5.0 - '@noble/curves@1.8.1': dependencies: '@noble/hashes': 1.7.1 '@noble/hashes@1.4.0': {} - '@noble/hashes@1.5.0': {} - '@noble/hashes@1.7.1': {} '@nodelib/fs.scandir@2.1.5': @@ -3405,7 +3411,7 @@ snapshots: '@nodelib/fs.walk@1.2.8': dependencies: '@nodelib/fs.scandir': 2.1.5 - fastq: 1.17.1 + fastq: 1.19.1 '@open-draft/deferred-promise@2.2.0': {} @@ -3421,90 +3427,99 @@ snapshots: '@pkgr/core@0.1.1': {} - '@rollup/pluginutils@5.1.2(rollup@4.24.0)': + '@rollup/pluginutils@5.1.4(rollup@4.34.9)': dependencies: '@types/estree': 1.0.6 estree-walker: 2.0.2 - picomatch: 2.3.1 + picomatch: 4.0.2 optionalDependencies: - rollup: 4.24.0 + rollup: 4.34.9 + + '@rollup/rollup-android-arm-eabi@4.34.9': + optional: true + + '@rollup/rollup-android-arm64@4.34.9': + optional: true - '@rollup/rollup-android-arm-eabi@4.24.0': + '@rollup/rollup-darwin-arm64@4.34.9': optional: true - '@rollup/rollup-android-arm64@4.24.0': + '@rollup/rollup-darwin-x64@4.34.9': optional: true - '@rollup/rollup-darwin-arm64@4.24.0': + '@rollup/rollup-freebsd-arm64@4.34.9': optional: true - '@rollup/rollup-darwin-x64@4.24.0': + '@rollup/rollup-freebsd-x64@4.34.9': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.24.0': + '@rollup/rollup-linux-arm-gnueabihf@4.34.9': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.24.0': + '@rollup/rollup-linux-arm-musleabihf@4.34.9': optional: true - '@rollup/rollup-linux-arm64-gnu@4.24.0': + '@rollup/rollup-linux-arm64-gnu@4.34.9': optional: true - '@rollup/rollup-linux-arm64-musl@4.24.0': + '@rollup/rollup-linux-arm64-musl@4.34.9': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.24.0': + '@rollup/rollup-linux-loongarch64-gnu@4.34.9': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.24.0': + '@rollup/rollup-linux-powerpc64le-gnu@4.34.9': optional: true - '@rollup/rollup-linux-s390x-gnu@4.24.0': + '@rollup/rollup-linux-riscv64-gnu@4.34.9': optional: true - '@rollup/rollup-linux-x64-gnu@4.24.0': + '@rollup/rollup-linux-s390x-gnu@4.34.9': optional: true - '@rollup/rollup-linux-x64-musl@4.24.0': + '@rollup/rollup-linux-x64-gnu@4.34.9': optional: true - '@rollup/rollup-win32-arm64-msvc@4.24.0': + '@rollup/rollup-linux-x64-musl@4.34.9': optional: true - '@rollup/rollup-win32-ia32-msvc@4.24.0': + '@rollup/rollup-win32-arm64-msvc@4.34.9': optional: true - '@rollup/rollup-win32-x64-msvc@4.24.0': + '@rollup/rollup-win32-ia32-msvc@4.34.9': optional: true - '@rushstack/node-core-library@5.9.0(@types/node@22.7.8)': + '@rollup/rollup-win32-x64-msvc@4.34.9': + optional: true + + '@rushstack/node-core-library@5.11.0(@types/node@22.13.9)': dependencies: ajv: 8.13.0 ajv-draft-04: 1.0.0(ajv@8.13.0) ajv-formats: 3.0.1(ajv@8.13.0) - fs-extra: 7.0.1 + fs-extra: 11.3.0 import-lazy: 4.0.0 jju: 1.4.0 - resolve: 1.22.8 + resolve: 1.22.10 semver: 7.5.4 optionalDependencies: - '@types/node': 22.7.8 + '@types/node': 22.13.9 '@rushstack/rig-package@0.5.3': dependencies: - resolve: 1.22.8 + resolve: 1.22.10 strip-json-comments: 3.1.1 - '@rushstack/terminal@0.14.2(@types/node@22.7.8)': + '@rushstack/terminal@0.15.0(@types/node@22.13.9)': dependencies: - '@rushstack/node-core-library': 5.9.0(@types/node@22.7.8) + '@rushstack/node-core-library': 5.11.0(@types/node@22.13.9) supports-color: 8.1.1 optionalDependencies: - '@types/node': 22.7.8 + '@types/node': 22.13.9 - '@rushstack/ts-command-line@4.23.0(@types/node@22.7.8)': + '@rushstack/ts-command-line@4.23.5(@types/node@22.13.9)': dependencies: - '@rushstack/terminal': 0.14.2(@types/node@22.7.8) + '@rushstack/terminal': 0.15.0(@types/node@22.13.9) '@types/argparse': 1.0.38 argparse: 1.0.10 string-argv: 0.3.2 @@ -3543,47 +3558,47 @@ snapshots: dependencies: buffer: 6.0.3 - '@solana/web3.js@1.95.4(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@solana/web3.js@1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)': dependencies: - '@babel/runtime': 7.25.7 - '@noble/curves': 1.6.0 - '@noble/hashes': 1.5.0 + '@babel/runtime': 7.26.9 + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 '@solana/buffer-layout': 4.0.1 - agentkeepalive: 4.5.0 + agentkeepalive: 4.6.0 bigint-buffer: 1.1.5 bn.js: 5.2.1 borsh: 0.7.0 bs58: 4.0.1 buffer: 6.0.3 fast-stable-stringify: 1.0.0 - jayson: 4.1.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + jayson: 4.1.3(bufferutil@4.0.9)(utf-8-validate@5.0.10) node-fetch: 2.7.0 - rpc-websockets: 9.0.4 + rpc-websockets: 9.1.1 superstruct: 2.0.2 transitivePeerDependencies: - bufferutil - encoding - utf-8-validate - '@swc/helpers@0.5.13': + '@swc/helpers@0.5.15': dependencies: - tslib: 2.8.0 + tslib: 2.8.1 '@types/argparse@1.0.38': {} '@types/bn.js@5.1.6': dependencies: - '@types/node': 22.7.8 + '@types/node': 22.13.9 '@types/connect@3.4.38': dependencies: - '@types/node': 22.7.8 + '@types/node': 22.13.9 '@types/cookie@0.6.0': {} '@types/debug@4.1.12': dependencies: - '@types/ms': 0.7.34 + '@types/ms': 2.1.0 '@types/elliptic@6.4.18': dependencies: @@ -3601,34 +3616,30 @@ snapshots: dependencies: '@types/istanbul-lib-report': 3.0.3 - '@types/jest@29.5.13': + '@types/jest@29.5.14': dependencies: expect: 29.7.0 pretty-format: 29.7.0 '@types/json-schema@7.0.15': {} - '@types/ms@0.7.34': {} - - '@types/mute-stream@0.0.4': - dependencies: - '@types/node': 22.7.8 + '@types/ms@2.1.0': {} '@types/node@12.20.55': {} - '@types/node@22.7.8': + '@types/node@22.13.9': dependencies: - undici-types: 6.19.8 + undici-types: 6.20.0 '@types/pbkdf2@3.1.2': dependencies: - '@types/node': 22.7.8 + '@types/node': 22.13.9 '@types/readline-sync@1.4.8': {} '@types/secp256k1@4.0.6': dependencies: - '@types/node': 22.7.8 + '@types/node': 22.13.9 '@types/seedrandom@3.0.8': {} @@ -3642,15 +3653,13 @@ snapshots: '@types/uuid@8.3.4': {} - '@types/wrap-ansi@3.0.0': {} - '@types/ws@7.4.7': dependencies: - '@types/node': 22.7.8 + '@types/node': 22.13.9 - '@types/ws@8.5.12': + '@types/ws@8.5.14': dependencies: - '@types/node': 22.7.8 + '@types/node': 22.13.9 '@types/yargs-parser@21.0.3': {} @@ -3658,47 +3667,45 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.11.0(@typescript-eslint/parser@8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.26.0(@typescript-eslint/parser@8.26.0(eslint@9.21.0)(typescript@5.8.2))(eslint@9.21.0)(typescript@5.8.2)': dependencies: - '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.11.0 - '@typescript-eslint/type-utils': 8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3) - '@typescript-eslint/utils': 8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.11.0 - eslint: 9.13.0(jiti@2.4.0) + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 8.26.0(eslint@9.21.0)(typescript@5.8.2) + '@typescript-eslint/scope-manager': 8.26.0 + '@typescript-eslint/type-utils': 8.26.0(eslint@9.21.0)(typescript@5.8.2) + '@typescript-eslint/utils': 8.26.0(eslint@9.21.0)(typescript@5.8.2) + '@typescript-eslint/visitor-keys': 8.26.0 + eslint: 9.21.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 + ts-api-utils: 2.0.1(typescript@5.8.2) + typescript: 5.8.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.3)': + '@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.8.2)': dependencies: '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.8.2) '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.7 + debug: 4.4.0 eslint: 8.57.1 optionalDependencies: - typescript: 5.6.3 + typescript: 5.8.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)': + '@typescript-eslint/parser@8.26.0(eslint@9.21.0)(typescript@5.8.2)': dependencies: - '@typescript-eslint/scope-manager': 8.11.0 - '@typescript-eslint/types': 8.11.0 - '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.11.0 - debug: 4.3.7 - eslint: 9.13.0(jiti@2.4.0) - optionalDependencies: - typescript: 5.6.3 + '@typescript-eslint/scope-manager': 8.26.0 + '@typescript-eslint/types': 8.26.0 + '@typescript-eslint/typescript-estree': 8.26.0(typescript@5.8.2) + '@typescript-eslint/visitor-keys': 8.26.0 + debug: 4.4.0 + eslint: 9.21.0 + typescript: 5.8.2 transitivePeerDependencies: - supports-color @@ -3707,100 +3714,102 @@ snapshots: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 - '@typescript-eslint/scope-manager@8.11.0': + '@typescript-eslint/scope-manager@8.26.0': dependencies: - '@typescript-eslint/types': 8.11.0 - '@typescript-eslint/visitor-keys': 8.11.0 + '@typescript-eslint/types': 8.26.0 + '@typescript-eslint/visitor-keys': 8.26.0 - '@typescript-eslint/type-utils@8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.26.0(eslint@9.21.0)(typescript@5.8.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3) - debug: 4.3.7 - ts-api-utils: 1.3.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 + '@typescript-eslint/typescript-estree': 8.26.0(typescript@5.8.2) + '@typescript-eslint/utils': 8.26.0(eslint@9.21.0)(typescript@5.8.2) + debug: 4.4.0 + eslint: 9.21.0 + ts-api-utils: 2.0.1(typescript@5.8.2) + typescript: 5.8.2 transitivePeerDependencies: - - eslint - supports-color '@typescript-eslint/types@6.21.0': {} - '@typescript-eslint/types@8.11.0': {} + '@typescript-eslint/types@8.26.0': {} - '@typescript-eslint/typescript-estree@6.21.0(typescript@5.6.3)': + '@typescript-eslint/typescript-estree@6.21.0(typescript@5.8.2)': dependencies: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.7 + debug: 4.4.0 globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 - semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.3) + semver: 7.7.1 + ts-api-utils: 1.4.3(typescript@5.8.2) optionalDependencies: - typescript: 5.6.3 + typescript: 5.8.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.11.0(typescript@5.6.3)': + '@typescript-eslint/typescript-estree@8.26.0(typescript@5.8.2)': dependencies: - '@typescript-eslint/types': 8.11.0 - '@typescript-eslint/visitor-keys': 8.11.0 - debug: 4.3.7 - fast-glob: 3.3.2 + '@typescript-eslint/types': 8.26.0 + '@typescript-eslint/visitor-keys': 8.26.0 + debug: 4.4.0 + fast-glob: 3.3.3 is-glob: 4.0.3 minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 + semver: 7.7.1 + ts-api-utils: 2.0.1(typescript@5.8.2) + typescript: 5.8.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)': + '@typescript-eslint/utils@8.26.0(eslint@9.21.0)(typescript@5.8.2)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0(jiti@2.4.0)) - '@typescript-eslint/scope-manager': 8.11.0 - '@typescript-eslint/types': 8.11.0 - '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) - eslint: 9.13.0(jiti@2.4.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.21.0) + '@typescript-eslint/scope-manager': 8.26.0 + '@typescript-eslint/types': 8.26.0 + '@typescript-eslint/typescript-estree': 8.26.0(typescript@5.8.2) + eslint: 9.21.0 + typescript: 5.8.2 transitivePeerDependencies: - supports-color - - typescript '@typescript-eslint/visitor-keys@6.21.0': dependencies: '@typescript-eslint/types': 6.21.0 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.11.0': + '@typescript-eslint/visitor-keys@8.26.0': dependencies: - '@typescript-eslint/types': 8.11.0 - eslint-visitor-keys: 3.4.3 + '@typescript-eslint/types': 8.26.0 + eslint-visitor-keys: 4.2.0 - '@ungap/structured-clone@1.2.0': {} + '@ungap/structured-clone@1.3.0': {} '@vitest/expect@2.1.3': dependencies: '@vitest/spy': 2.1.3 '@vitest/utils': 2.1.3 - chai: 5.1.1 + chai: 5.2.0 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.3(@vitest/spy@2.1.3)(msw@2.5.0(typescript@5.6.3))(vite@5.4.9(@types/node@22.7.8))': + '@vitest/mocker@2.1.3(@vitest/spy@2.1.3)(msw@2.7.3(@types/node@22.13.9)(typescript@5.8.2))(vite@5.4.14(@types/node@22.13.9))': dependencies: '@vitest/spy': 2.1.3 estree-walker: 3.0.3 - magic-string: 0.30.12 + magic-string: 0.30.17 optionalDependencies: - msw: 2.5.0(typescript@5.6.3) - vite: 5.4.9(@types/node@22.7.8) + msw: 2.7.3(@types/node@22.13.9)(typescript@5.8.2) + vite: 5.4.14(@types/node@22.13.9) '@vitest/pretty-format@2.1.3': dependencies: tinyrainbow: 1.2.0 + '@vitest/pretty-format@2.1.9': + dependencies: + tinyrainbow: 1.2.0 + '@vitest/runner@2.1.3': dependencies: '@vitest/utils': 2.1.3 @@ -3809,7 +3818,7 @@ snapshots: '@vitest/snapshot@2.1.3': dependencies: '@vitest/pretty-format': 2.1.3 - magic-string: 0.30.12 + magic-string: 0.30.17 pathe: 1.1.2 '@vitest/spy@2.1.3': @@ -3819,72 +3828,72 @@ snapshots: '@vitest/utils@2.1.3': dependencies: '@vitest/pretty-format': 2.1.3 - loupe: 3.1.2 + loupe: 3.1.3 tinyrainbow: 1.2.0 - '@volar/language-core@2.4.6': + '@volar/language-core@2.4.11': dependencies: - '@volar/source-map': 2.4.6 + '@volar/source-map': 2.4.11 - '@volar/source-map@2.4.6': {} + '@volar/source-map@2.4.11': {} - '@volar/typescript@2.4.6': + '@volar/typescript@2.4.11': dependencies: - '@volar/language-core': 2.4.6 + '@volar/language-core': 2.4.11 path-browserify: 1.0.1 - vscode-uri: 3.0.8 + vscode-uri: 3.1.0 - '@vue/compiler-core@3.5.12': + '@vue/compiler-core@3.5.13': dependencies: - '@babel/parser': 7.25.8 - '@vue/shared': 3.5.12 + '@babel/parser': 7.26.9 + '@vue/shared': 3.5.13 entities: 4.5.0 estree-walker: 2.0.2 source-map-js: 1.2.1 - '@vue/compiler-dom@3.5.12': + '@vue/compiler-dom@3.5.13': dependencies: - '@vue/compiler-core': 3.5.12 - '@vue/shared': 3.5.12 + '@vue/compiler-core': 3.5.13 + '@vue/shared': 3.5.13 '@vue/compiler-vue2@2.7.16': dependencies: de-indent: 1.0.2 he: 1.2.0 - '@vue/language-core@2.1.6(typescript@5.6.3)': + '@vue/language-core@2.2.0(typescript@5.8.2)': dependencies: - '@volar/language-core': 2.4.6 - '@vue/compiler-dom': 3.5.12 + '@volar/language-core': 2.4.11 + '@vue/compiler-dom': 3.5.13 '@vue/compiler-vue2': 2.7.16 - '@vue/shared': 3.5.12 - computeds: 0.0.1 + '@vue/shared': 3.5.13 + alien-signals: 0.4.14 minimatch: 9.0.5 muggle-string: 0.4.1 path-browserify: 1.0.1 optionalDependencies: - typescript: 5.6.3 + typescript: 5.8.2 - '@vue/shared@3.5.12': {} + '@vue/shared@3.5.13': {} JSONStream@1.3.5: dependencies: jsonparse: 1.3.1 through: 2.3.8 - abitype@1.0.8(typescript@5.6.3): + abitype@1.0.8(typescript@5.8.2): optionalDependencies: - typescript: 5.6.3 + typescript: 5.8.2 - acorn-jsx@5.3.2(acorn@8.13.0): + acorn-jsx@5.3.2(acorn@8.14.0): dependencies: - acorn: 8.13.0 + acorn: 8.14.0 - acorn@8.13.0: {} + acorn@8.14.0: {} aes-js@3.1.2: {} - agentkeepalive@4.5.0: + agentkeepalive@4.6.0: dependencies: humanize-ms: 1.2.1 @@ -3917,6 +3926,8 @@ snapshots: require-from-string: 2.0.2 uri-js: 4.4.1 + alien-signals@0.4.14: {} + ansi-escapes@4.3.2: dependencies: type-fest: 0.21.3 @@ -3929,10 +3940,6 @@ snapshots: ansi-styles@2.2.1: {} - ansi-styles@3.2.1: - dependencies: - color-convert: 1.9.3 - ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 @@ -3982,13 +3989,13 @@ snapshots: bs58check: 2.1.2 create-hash: 1.2.0 create-hmac: 1.1.7 - tiny-secp256k1: 1.1.6 + tiny-secp256k1: 1.1.7 typeforce: 1.18.0 wif: 2.0.6 bip39@3.1.0: dependencies: - '@noble/hashes': 1.5.0 + '@noble/hashes': 1.7.1 bip66@1.1.5: dependencies: @@ -4009,7 +4016,7 @@ snapshots: pushdata-bitcoin: 1.0.1 randombytes: 2.1.0 safe-buffer: 5.2.1 - tiny-secp256k1: 1.1.6 + tiny-secp256k1: 1.1.7 typeforce: 1.18.0 varuint-bitcoin: 1.1.2 wif: 2.0.6 @@ -4022,7 +4029,7 @@ snapshots: dependencies: '@noble/hashes': 1.4.0 - bn.js@4.12.0: {} + bn.js@4.12.1: {} bn.js@5.2.1: {} @@ -4050,7 +4057,7 @@ snapshots: browserify-aes@1.2.0: dependencies: buffer-xor: 1.0.3 - cipher-base: 1.0.4 + cipher-base: 1.0.6 create-hash: 1.2.0 evp_bytestokey: 1.0.3 inherits: 2.0.4 @@ -4072,7 +4079,7 @@ snapshots: bs58check@4.0.0: dependencies: - '@noble/hashes': 1.5.0 + '@noble/hashes': 1.7.1 bs58: 6.0.0 buffer-xor@1.0.3: {} @@ -4082,14 +4089,14 @@ snapshots: base64-js: 1.5.1 ieee754: 1.2.1 - bufferutil@4.0.8: + bufferutil@4.0.9: dependencies: - node-gyp-build: 4.8.2 + node-gyp-build: 4.8.4 optional: true - bundle-require@5.0.0(esbuild@0.24.2): + bundle-require@5.1.0(esbuild@0.25.0): dependencies: - esbuild: 0.24.2 + esbuild: 0.25.0 load-tsconfig: 0.2.5 cac@6.7.14: {} @@ -4098,12 +4105,12 @@ snapshots: cbor2@1.12.0: {} - chai@5.1.1: + chai@5.2.0: dependencies: assertion-error: 2.0.1 check-error: 2.1.1 deep-eql: 5.0.2 - loupe: 3.1.2 + loupe: 3.1.3 pathval: 2.0.0 chalk@1.1.3: @@ -4114,12 +4121,6 @@ snapshots: strip-ansi: 3.0.1 supports-color: 2.0.0 - chalk@2.4.2: - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.5.0 - chalk@4.1.2: dependencies: ansi-styles: 4.3.0 @@ -4127,13 +4128,13 @@ snapshots: check-error@2.1.1: {} - chokidar@4.0.1: + chokidar@4.0.3: dependencies: - readdirp: 4.0.2 + readdirp: 4.1.2 ci-info@3.9.0: {} - cipher-base@1.0.4: + cipher-base@1.0.6: dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 @@ -4146,16 +4147,10 @@ snapshots: strip-ansi: 6.0.1 wrap-ansi: 7.0.0 - color-convert@1.9.3: - dependencies: - color-name: 1.1.3 - color-convert@2.0.1: dependencies: color-name: 1.1.4 - color-name@1.1.3: {} - color-name@1.1.4: {} commander@2.20.3: {} @@ -4166,21 +4161,21 @@ snapshots: compare-versions@6.1.1: {} - computeds@0.0.1: {} - concat-map@0.0.1: {} confbox@0.1.8: {} - consola@3.2.3: {} + confbox@0.2.1: {} - cookie@0.5.0: {} + consola@3.4.0: {} + + cookie@0.7.2: {} crc-32@1.2.2: {} create-hash@1.2.0: dependencies: - cipher-base: 1.0.4 + cipher-base: 1.0.6 inherits: 2.0.4 md5.js: 1.3.5 ripemd160: 2.0.2 @@ -4188,14 +4183,14 @@ snapshots: create-hmac@1.1.7: dependencies: - cipher-base: 1.0.4 + cipher-base: 1.0.6 create-hash: 1.2.0 inherits: 2.0.4 ripemd160: 2.0.2 safe-buffer: 5.2.1 sha.js: 2.4.11 - cross-spawn@7.0.3: + cross-spawn@7.0.6: dependencies: path-key: 3.1.1 shebang-command: 2.0.0 @@ -4205,7 +4200,7 @@ snapshots: de-indent@1.0.2: {} - debug@4.3.7: + debug@4.4.0: dependencies: ms: 2.1.3 @@ -4227,7 +4222,7 @@ snapshots: dependencies: esutils: 2.0.3 - dotenv@16.4.5: {} + dotenv@16.4.7: {} eastasianwidth@0.2.0: {} @@ -4238,7 +4233,7 @@ snapshots: elliptic@6.5.7: dependencies: - bn.js: 4.12.0 + bn.js: 4.12.1 brorand: 1.1.0 hash.js: 1.1.7 hmac-drbg: 1.0.1 @@ -4288,33 +4283,33 @@ snapshots: '@esbuild/win32-ia32': 0.21.5 '@esbuild/win32-x64': 0.21.5 - esbuild@0.24.2: + esbuild@0.25.0: optionalDependencies: - '@esbuild/aix-ppc64': 0.24.2 - '@esbuild/android-arm': 0.24.2 - '@esbuild/android-arm64': 0.24.2 - '@esbuild/android-x64': 0.24.2 - '@esbuild/darwin-arm64': 0.24.2 - '@esbuild/darwin-x64': 0.24.2 - '@esbuild/freebsd-arm64': 0.24.2 - '@esbuild/freebsd-x64': 0.24.2 - '@esbuild/linux-arm': 0.24.2 - '@esbuild/linux-arm64': 0.24.2 - '@esbuild/linux-ia32': 0.24.2 - '@esbuild/linux-loong64': 0.24.2 - '@esbuild/linux-mips64el': 0.24.2 - '@esbuild/linux-ppc64': 0.24.2 - '@esbuild/linux-riscv64': 0.24.2 - '@esbuild/linux-s390x': 0.24.2 - '@esbuild/linux-x64': 0.24.2 - '@esbuild/netbsd-arm64': 0.24.2 - '@esbuild/netbsd-x64': 0.24.2 - '@esbuild/openbsd-arm64': 0.24.2 - '@esbuild/openbsd-x64': 0.24.2 - '@esbuild/sunos-x64': 0.24.2 - '@esbuild/win32-arm64': 0.24.2 - '@esbuild/win32-ia32': 0.24.2 - '@esbuild/win32-x64': 0.24.2 + '@esbuild/aix-ppc64': 0.25.0 + '@esbuild/android-arm': 0.25.0 + '@esbuild/android-arm64': 0.25.0 + '@esbuild/android-x64': 0.25.0 + '@esbuild/darwin-arm64': 0.25.0 + '@esbuild/darwin-x64': 0.25.0 + '@esbuild/freebsd-arm64': 0.25.0 + '@esbuild/freebsd-x64': 0.25.0 + '@esbuild/linux-arm': 0.25.0 + '@esbuild/linux-arm64': 0.25.0 + '@esbuild/linux-ia32': 0.25.0 + '@esbuild/linux-loong64': 0.25.0 + '@esbuild/linux-mips64el': 0.25.0 + '@esbuild/linux-ppc64': 0.25.0 + '@esbuild/linux-riscv64': 0.25.0 + '@esbuild/linux-s390x': 0.25.0 + '@esbuild/linux-x64': 0.25.0 + '@esbuild/netbsd-arm64': 0.25.0 + '@esbuild/netbsd-x64': 0.25.0 + '@esbuild/openbsd-arm64': 0.25.0 + '@esbuild/openbsd-x64': 0.25.0 + '@esbuild/sunos-x64': 0.25.0 + '@esbuild/win32-arm64': 0.25.0 + '@esbuild/win32-ia32': 0.25.0 + '@esbuild/win32-x64': 0.25.0 escalade@3.2.0: {} @@ -4324,47 +4319,47 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)): + eslint-config-prettier@9.1.0(eslint@9.21.0): dependencies: - eslint: 9.13.0(jiti@2.4.0) + eslint: 9.21.0 - eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3): + eslint-plugin-prettier@5.2.3(eslint-config-prettier@9.1.0(eslint@9.21.0))(eslint@9.21.0)(prettier@3.5.3): dependencies: - eslint: 9.13.0(jiti@2.4.0) - prettier: 3.3.3 + eslint: 9.21.0 + prettier: 3.5.3 prettier-linter-helpers: 1.0.0 synckit: 0.9.2 optionalDependencies: - eslint-config-prettier: 9.1.0(eslint@9.13.0(jiti@2.4.0)) + eslint-config-prettier: 9.1.0(eslint@9.21.0) eslint-scope@7.2.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 - eslint-scope@8.1.0: + eslint-scope@8.2.0: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@4.1.0: {} + eslint-visitor-keys@4.2.0: {} eslint@8.57.1: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@eslint-community/regexpp': 4.11.1 + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) + '@eslint-community/regexpp': 4.12.1 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.57.1 '@humanwhocodes/config-array': 0.13.0 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.0 + '@ungap/structured-clone': 1.3.0 ajv: 6.12.6 chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.7 + cross-spawn: 7.0.6 + debug: 4.4.0 doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -4394,28 +4389,28 @@ snapshots: transitivePeerDependencies: - supports-color - eslint@9.13.0(jiti@2.4.0): + eslint@9.21.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0(jiti@2.4.0)) - '@eslint-community/regexpp': 4.11.1 - '@eslint/config-array': 0.18.0 - '@eslint/core': 0.7.0 - '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.13.0 - '@eslint/plugin-kit': 0.2.1 - '@humanfs/node': 0.16.5 + '@eslint-community/eslint-utils': 4.4.1(eslint@9.21.0) + '@eslint-community/regexpp': 4.12.1 + '@eslint/config-array': 0.19.2 + '@eslint/core': 0.12.0 + '@eslint/eslintrc': 3.3.0 + '@eslint/js': 9.21.0 + '@eslint/plugin-kit': 0.2.7 + '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.3.1 + '@humanwhocodes/retry': 0.4.2 '@types/estree': 1.0.6 '@types/json-schema': 7.0.15 ajv: 6.12.6 chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.7 + cross-spawn: 7.0.6 + debug: 4.4.0 escape-string-regexp: 4.0.0 - eslint-scope: 8.1.0 - eslint-visitor-keys: 4.1.0 - espree: 10.2.0 + eslint-scope: 8.2.0 + eslint-visitor-keys: 4.2.0 + espree: 10.3.0 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 @@ -4430,22 +4425,19 @@ snapshots: minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.4 - text-table: 0.2.0 - optionalDependencies: - jiti: 2.4.0 transitivePeerDependencies: - supports-color - espree@10.2.0: + espree@10.3.0: dependencies: - acorn: 8.13.0 - acorn-jsx: 5.3.2(acorn@8.13.0) - eslint-visitor-keys: 4.1.0 + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) + eslint-visitor-keys: 4.2.0 espree@9.6.1: dependencies: - acorn: 8.13.0 - acorn-jsx: 5.3.2(acorn@8.13.0) + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) eslint-visitor-keys: 3.4.3 esquery@1.6.0: @@ -4514,13 +4506,15 @@ snapshots: jest-message-util: 29.7.0 jest-util: 29.7.0 + exsolve@1.0.1: {} + eyes@0.1.8: {} fast-deep-equal@3.1.3: {} fast-diff@1.3.0: {} - fast-glob@3.3.2: + fast-glob@3.3.3: dependencies: '@nodelib/fs.stat': 2.0.5 '@nodelib/fs.walk': 1.2.8 @@ -4536,11 +4530,11 @@ snapshots: fast-stable-stringify@1.0.0: {} - fastq@1.17.1: + fastq@1.19.1: dependencies: - reusify: 1.0.4 + reusify: 1.1.0 - fdir@6.4.2(picomatch@4.0.2): + fdir@6.4.3(picomatch@4.0.2): optionalDependencies: picomatch: 4.0.2 @@ -4570,31 +4564,31 @@ snapshots: flat-cache@3.2.0: dependencies: - flatted: 3.3.1 + flatted: 3.3.3 keyv: 4.5.4 rimraf: 3.0.2 flat-cache@4.0.1: dependencies: - flatted: 3.3.1 + flatted: 3.3.3 keyv: 4.5.4 - flatted@3.3.1: {} + flatted@3.3.3: {} - foreground-child@3.3.0: + foreground-child@3.3.1: dependencies: - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 signal-exit: 4.1.0 formdata-polyfill@4.0.10: dependencies: fetch-blob: 3.2.0 - fs-extra@7.0.1: + fs-extra@11.3.0: dependencies: graceful-fs: 4.2.11 - jsonfile: 4.0.0 - universalify: 0.1.2 + jsonfile: 6.1.0 + universalify: 2.0.1 fs.realpath@1.0.0: {} @@ -4615,7 +4609,7 @@ snapshots: glob@10.4.5: dependencies: - foreground-child: 3.3.0 + foreground-child: 3.3.1 jackspeak: 3.4.3 minimatch: 9.0.5 minipass: 7.1.2 @@ -4641,7 +4635,7 @@ snapshots: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.3.2 + fast-glob: 3.3.3 ignore: 5.3.2 merge2: 1.4.1 slash: 3.0.0 @@ -4650,14 +4644,12 @@ snapshots: graphemer@1.4.0: {} - graphql@16.9.0: {} + graphql@16.10.0: {} has-ansi@2.0.0: dependencies: ansi-regex: 2.1.1 - has-flag@3.0.0: {} - has-flag@4.0.0: {} hash-base@3.1.0: @@ -4693,7 +4685,7 @@ snapshots: ignore@5.3.2: {} - import-fresh@3.3.0: + import-fresh@3.3.1: dependencies: parent-module: 1.0.1 resolve-from: 4.0.0 @@ -4713,7 +4705,7 @@ snapshots: is-arrayish@0.2.1: {} - is-core-module@2.15.1: + is-core-module@2.16.1: dependencies: hasown: 2.0.2 @@ -4733,13 +4725,13 @@ snapshots: isexe@2.0.0: {} - isomorphic-ws@4.0.1(ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + isomorphic-ws@4.0.1(ws@7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10)): dependencies: - ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10) - isows@1.0.6(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + isows@1.0.6(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)): dependencies: - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) jackspeak@3.4.3: dependencies: @@ -4747,7 +4739,7 @@ snapshots: optionalDependencies: '@pkgjs/parseargs': 0.11.0 - jayson@4.1.2(bufferutil@4.0.8)(utf-8-validate@5.0.10): + jayson@4.1.3(bufferutil@4.0.9)(utf-8-validate@5.0.10): dependencies: '@types/connect': 3.4.38 '@types/node': 12.20.55 @@ -4757,10 +4749,10 @@ snapshots: delay: 5.0.0 es6-promisify: 5.0.0 eyes: 0.1.8 - isomorphic-ws: 4.0.1(ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + isomorphic-ws: 4.0.1(ws@7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10)) json-stringify-safe: 5.0.1 uuid: 8.3.2 - ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - utf-8-validate @@ -4783,7 +4775,7 @@ snapshots: jest-message-util@29.7.0: dependencies: - '@babel/code-frame': 7.25.7 + '@babel/code-frame': 7.26.2 '@jest/types': 29.6.3 '@types/stack-utils': 2.0.3 chalk: 4.1.2 @@ -4796,15 +4788,12 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.7.8 + '@types/node': 22.13.9 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 picomatch: 2.3.1 - jiti@2.4.0: - optional: true - jju@1.4.0: {} joycon@3.1.1: {} @@ -4838,7 +4827,9 @@ snapshots: strip-bom: 4.0.0 strip-json-comments: 3.1.1 - jsonfile@4.0.0: + jsonfile@6.1.0: + dependencies: + universalify: 2.0.1 optionalDependencies: graceful-fs: 4.2.11 @@ -4847,7 +4838,7 @@ snapshots: keccak@3.0.4: dependencies: node-addon-api: 2.0.2 - node-gyp-build: 4.8.2 + node-gyp-build: 4.8.4 readable-stream: 3.6.2 keyv@4.5.4: @@ -4867,10 +4858,11 @@ snapshots: load-tsconfig@0.2.5: {} - local-pkg@0.5.0: + local-pkg@1.1.1: dependencies: - mlly: 1.7.2 - pkg-types: 1.2.1 + mlly: 1.7.4 + pkg-types: 2.1.0 + quansync: 0.2.8 locate-path@6.0.0: dependencies: @@ -4889,7 +4881,7 @@ snapshots: loglevel@1.9.2: {} - loupe@3.1.2: {} + loupe@3.1.3: {} lru-cache@10.4.3: {} @@ -4897,7 +4889,7 @@ snapshots: dependencies: yallist: 4.0.0 - magic-string@0.30.12: + magic-string@0.30.17: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -4946,40 +4938,43 @@ snapshots: dependencies: minimist: 1.2.8 - mlly@1.7.2: + mlly@1.7.4: dependencies: - acorn: 8.13.0 - pathe: 1.1.2 - pkg-types: 1.2.1 + acorn: 8.14.0 + pathe: 2.0.3 + pkg-types: 1.3.1 ufo: 1.5.4 ms@2.1.3: {} - msw@2.5.0(typescript@5.6.3): + msw@2.7.3(@types/node@22.13.9)(typescript@5.8.2): dependencies: - '@bundled-es-modules/cookie': 2.0.0 + '@bundled-es-modules/cookie': 2.0.1 '@bundled-es-modules/statuses': 1.0.1 '@bundled-es-modules/tough-cookie': 0.1.6 - '@inquirer/confirm': 4.0.1 - '@mswjs/interceptors': 0.36.5 + '@inquirer/confirm': 5.1.6(@types/node@22.13.9) + '@mswjs/interceptors': 0.37.6 + '@open-draft/deferred-promise': 2.2.0 '@open-draft/until': 2.1.0 '@types/cookie': 0.6.0 '@types/statuses': 2.0.5 - chalk: 4.1.2 - graphql: 16.9.0 + graphql: 16.10.0 headers-polyfill: 4.0.3 is-node-process: 1.2.0 outvariant: 1.4.3 path-to-regexp: 6.3.0 + picocolors: 1.1.1 strict-event-emitter: 0.5.1 - type-fest: 4.26.1 + type-fest: 4.37.0 yargs: 17.7.2 optionalDependencies: - typescript: 5.6.3 + typescript: 5.8.2 + transitivePeerDependencies: + - '@types/node' muggle-string@0.4.1: {} - mute-stream@1.0.0: {} + mute-stream@2.0.0: {} mz@2.7.0: dependencies: @@ -4987,9 +4982,9 @@ snapshots: object-assign: 4.1.1 thenify-all: 1.6.0 - nan@2.22.0: {} + nan@2.22.2: {} - nanoid@3.3.7: {} + nanoid@3.3.8: {} natural-compare@1.4.0: {} @@ -5009,7 +5004,7 @@ snapshots: fetch-blob: 3.2.0 formdata-polyfill: 4.0.10 - node-gyp-build@4.8.2: {} + node-gyp-build@4.8.4: {} object-assign@4.1.1: {} @@ -5028,17 +5023,17 @@ snapshots: outvariant@1.4.3: {} - ox@0.6.7(typescript@5.6.3): + ox@0.6.7(typescript@5.8.2): dependencies: - '@adraffy/ens-normalize': 1.10.1 + '@adraffy/ens-normalize': 1.11.0 '@noble/curves': 1.8.1 '@noble/hashes': 1.7.1 '@scure/bip32': 1.6.2 '@scure/bip39': 1.5.4 - abitype: 1.0.8(typescript@5.6.3) + abitype: 1.0.8(typescript@5.8.2) eventemitter3: 5.0.1 optionalDependencies: - typescript: 5.6.3 + typescript: 5.8.2 transitivePeerDependencies: - zod @@ -5082,6 +5077,8 @@ snapshots: pathe@1.1.2: {} + pathe@2.0.3: {} + pathval@2.0.0: {} pbkdf2@3.1.2: @@ -5100,24 +5097,29 @@ snapshots: pirates@4.0.6: {} - pkg-types@1.2.1: + pkg-types@1.3.1: dependencies: confbox: 0.1.8 - mlly: 1.7.2 - pathe: 1.1.2 + mlly: 1.7.4 + pathe: 2.0.3 + + pkg-types@2.1.0: + dependencies: + confbox: 0.2.1 + exsolve: 1.0.1 + pathe: 2.0.3 pony-cause@2.1.11: {} - postcss-load-config@6.0.1(jiti@2.4.0)(postcss@8.4.47): + postcss-load-config@6.0.1(postcss@8.5.3): dependencies: lilconfig: 3.1.3 optionalDependencies: - jiti: 2.4.0 - postcss: 8.4.47 + postcss: 8.5.3 - postcss@8.4.47: + postcss@8.5.3: dependencies: - nanoid: 3.3.7 + nanoid: 3.3.8 picocolors: 1.1.1 source-map-js: 1.2.1 @@ -5125,17 +5127,17 @@ snapshots: prettier-eslint@16.3.0: dependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.8.2) common-tags: 1.8.2 dlv: 1.1.3 eslint: 8.57.1 indent-string: 4.0.0 lodash.merge: 4.6.2 loglevel-colored-level-prefix: 1.0.0 - prettier: 3.3.3 + prettier: 3.5.3 pretty-format: 29.7.0 require-relative: 0.8.7 - typescript: 5.6.3 + typescript: 5.8.2 vue-eslint-parser: 9.4.3(eslint@8.57.1) transitivePeerDependencies: - supports-color @@ -5144,7 +5146,7 @@ snapshots: dependencies: fast-diff: 1.3.0 - prettier@3.3.3: {} + prettier@3.5.3: {} pretty-format@29.7.0: dependencies: @@ -5152,7 +5154,9 @@ snapshots: ansi-styles: 5.2.0 react-is: 18.3.1 - psl@1.9.0: {} + psl@1.15.0: + dependencies: + punycode: 2.3.1 punycode@2.3.1: {} @@ -5160,6 +5164,8 @@ snapshots: dependencies: bitcoin-ops: 1.4.1 + quansync@0.2.8: {} + querystringify@2.2.0: {} queue-microtask@1.2.3: {} @@ -5180,7 +5186,7 @@ snapshots: string_decoder: 1.3.0 util-deprecate: 1.0.2 - readdirp@4.0.2: {} + readdirp@4.1.2: {} readline-sync@1.4.10: {} @@ -5198,13 +5204,13 @@ snapshots: resolve-from@5.0.0: {} - resolve@1.22.8: + resolve@1.22.10: dependencies: - is-core-module: 2.15.1 + is-core-module: 2.16.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - reusify@1.0.4: {} + reusify@1.1.0: {} rimraf@3.0.2: dependencies: @@ -5219,39 +5225,42 @@ snapshots: dependencies: bn.js: 5.2.1 - rollup@4.24.0: + rollup@4.34.9: dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.24.0 - '@rollup/rollup-android-arm64': 4.24.0 - '@rollup/rollup-darwin-arm64': 4.24.0 - '@rollup/rollup-darwin-x64': 4.24.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.24.0 - '@rollup/rollup-linux-arm-musleabihf': 4.24.0 - '@rollup/rollup-linux-arm64-gnu': 4.24.0 - '@rollup/rollup-linux-arm64-musl': 4.24.0 - '@rollup/rollup-linux-powerpc64le-gnu': 4.24.0 - '@rollup/rollup-linux-riscv64-gnu': 4.24.0 - '@rollup/rollup-linux-s390x-gnu': 4.24.0 - '@rollup/rollup-linux-x64-gnu': 4.24.0 - '@rollup/rollup-linux-x64-musl': 4.24.0 - '@rollup/rollup-win32-arm64-msvc': 4.24.0 - '@rollup/rollup-win32-ia32-msvc': 4.24.0 - '@rollup/rollup-win32-x64-msvc': 4.24.0 + '@rollup/rollup-android-arm-eabi': 4.34.9 + '@rollup/rollup-android-arm64': 4.34.9 + '@rollup/rollup-darwin-arm64': 4.34.9 + '@rollup/rollup-darwin-x64': 4.34.9 + '@rollup/rollup-freebsd-arm64': 4.34.9 + '@rollup/rollup-freebsd-x64': 4.34.9 + '@rollup/rollup-linux-arm-gnueabihf': 4.34.9 + '@rollup/rollup-linux-arm-musleabihf': 4.34.9 + '@rollup/rollup-linux-arm64-gnu': 4.34.9 + '@rollup/rollup-linux-arm64-musl': 4.34.9 + '@rollup/rollup-linux-loongarch64-gnu': 4.34.9 + '@rollup/rollup-linux-powerpc64le-gnu': 4.34.9 + '@rollup/rollup-linux-riscv64-gnu': 4.34.9 + '@rollup/rollup-linux-s390x-gnu': 4.34.9 + '@rollup/rollup-linux-x64-gnu': 4.34.9 + '@rollup/rollup-linux-x64-musl': 4.34.9 + '@rollup/rollup-win32-arm64-msvc': 4.34.9 + '@rollup/rollup-win32-ia32-msvc': 4.34.9 + '@rollup/rollup-win32-x64-msvc': 4.34.9 fsevents: 2.3.3 - rpc-websockets@9.0.4: + rpc-websockets@9.1.1: dependencies: - '@swc/helpers': 0.5.13 + '@swc/helpers': 0.5.15 '@types/uuid': 8.3.4 - '@types/ws': 8.5.12 + '@types/ws': 8.5.14 buffer: 6.0.3 eventemitter3: 5.0.1 uuid: 8.3.2 - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) optionalDependencies: - bufferutil: 4.0.8 + bufferutil: 4.0.9 utf-8-validate: 5.0.10 run-parallel@1.2.0: @@ -5266,13 +5275,13 @@ snapshots: dependencies: elliptic: 6.5.7 node-addon-api: 5.1.0 - node-gyp-build: 4.8.2 + node-gyp-build: 4.8.4 secp256k1@5.0.1: dependencies: elliptic: 6.5.7 node-addon-api: 5.1.0 - node-gyp-build: 4.8.2 + node-gyp-build: 4.8.4 seedrandom@3.0.5: {} @@ -5280,7 +5289,7 @@ snapshots: dependencies: lru-cache: 6.0.0 - semver@7.6.3: {} + semver@7.7.1: {} setimmediate@1.0.5: {} @@ -5319,7 +5328,7 @@ snapshots: statuses@2.0.1: {} - std-env@3.7.0: {} + std-env@3.8.1: {} strict-event-emitter@0.5.1: {} @@ -5359,7 +5368,7 @@ snapshots: sucrase@3.35.0: dependencies: - '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/gen-mapping': 0.3.8 commander: 4.1.1 glob: 10.4.5 lines-and-columns: 1.2.4 @@ -5371,10 +5380,6 @@ snapshots: supports-color@2.0.0: {} - supports-color@5.5.0: - dependencies: - has-flag: 3.0.0 - supports-color@7.2.0: dependencies: has-flag: 4.0.0 @@ -5388,7 +5393,7 @@ snapshots: synckit@0.9.2: dependencies: '@pkgr/core': 0.1.1 - tslib: 2.8.0 + tslib: 2.8.1 text-encoding-utf-8@1.0.2: {} @@ -5404,38 +5409,36 @@ snapshots: through@2.3.8: {} - tiny-secp256k1@1.1.6: + tiny-secp256k1@1.1.7: dependencies: bindings: 1.5.0 - bn.js: 4.12.0 + bn.js: 4.12.1 create-hmac: 1.1.7 elliptic: 6.5.7 - nan: 2.22.0 + nan: 2.22.2 tinybench@2.9.0: {} - tinyexec@0.3.1: {} + tinyexec@0.3.2: {} - tinyglobby@0.2.10: + tinyglobby@0.2.12: dependencies: - fdir: 6.4.2(picomatch@4.0.2) + fdir: 6.4.3(picomatch@4.0.2) picomatch: 4.0.2 - tinypool@1.0.1: {} + tinypool@1.0.2: {} tinyrainbow@1.2.0: {} tinyspy@3.0.2: {} - to-fast-properties@2.0.0: {} - to-regex-range@5.0.1: dependencies: is-number: 7.0.0 tough-cookie@4.1.4: dependencies: - psl: 1.9.0 + psl: 1.15.0 punycode: 2.3.1 universalify: 0.2.0 url-parse: 1.5.10 @@ -5448,36 +5451,40 @@ snapshots: tree-kill@1.2.2: {} - ts-api-utils@1.3.0(typescript@5.6.3): + ts-api-utils@1.4.3(typescript@5.8.2): dependencies: - typescript: 5.6.3 + typescript: 5.8.2 + + ts-api-utils@2.0.1(typescript@5.8.2): + dependencies: + typescript: 5.8.2 ts-interface-checker@0.1.13: {} - tslib@2.8.0: {} + tslib@2.8.1: {} - tsup@8.3.5(@microsoft/api-extractor@7.47.11(@types/node@22.7.8))(jiti@2.4.0)(postcss@8.4.47)(typescript@5.6.3): + tsup@8.4.0(@microsoft/api-extractor@7.51.1(@types/node@22.13.9))(postcss@8.5.3)(typescript@5.8.2): dependencies: - bundle-require: 5.0.0(esbuild@0.24.2) + bundle-require: 5.1.0(esbuild@0.25.0) cac: 6.7.14 - chokidar: 4.0.1 - consola: 3.2.3 - debug: 4.3.7 - esbuild: 0.24.2 + chokidar: 4.0.3 + consola: 3.4.0 + debug: 4.4.0 + esbuild: 0.25.0 joycon: 3.1.1 picocolors: 1.1.1 - postcss-load-config: 6.0.1(jiti@2.4.0)(postcss@8.4.47) + postcss-load-config: 6.0.1(postcss@8.5.3) resolve-from: 5.0.0 - rollup: 4.24.0 + rollup: 4.34.9 source-map: 0.8.0-beta.0 sucrase: 3.35.0 - tinyexec: 0.3.1 - tinyglobby: 0.2.10 + tinyexec: 0.3.2 + tinyglobby: 0.2.12 tree-kill: 1.2.2 optionalDependencies: - '@microsoft/api-extractor': 7.47.11(@types/node@22.7.8) - postcss: 8.4.47 - typescript: 5.6.3 + '@microsoft/api-extractor': 7.51.1(@types/node@22.13.9) + postcss: 8.5.3 + typescript: 5.8.2 transitivePeerDependencies: - jiti - supports-color @@ -5494,22 +5501,22 @@ snapshots: type-fest@0.21.3: {} - type-fest@4.26.1: {} + type-fest@4.37.0: {} typeforce@1.18.0: {} - typescript@5.4.2: {} + typescript@5.7.3: {} - typescript@5.6.3: {} + typescript@5.8.2: {} ufo@1.5.4: {} - undici-types@6.19.8: {} - - universalify@0.1.2: {} + undici-types@6.20.0: {} universalify@0.2.0: {} + universalify@2.0.1: {} + uri-js@4.4.1: dependencies: punycode: 2.3.1 @@ -5521,7 +5528,7 @@ snapshots: utf-8-validate@5.0.10: dependencies: - node-gyp-build: 4.8.2 + node-gyp-build: 4.8.4 optional: true util-deprecate@1.0.2: {} @@ -5536,29 +5543,29 @@ snapshots: dependencies: safe-buffer: 5.2.1 - viem@2.22.19(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10): + viem@2.23.6(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10): dependencies: '@noble/curves': 1.8.1 '@noble/hashes': 1.7.1 '@scure/bip32': 1.6.2 '@scure/bip39': 1.5.4 - abitype: 1.0.8(typescript@5.6.3) - isows: 1.0.6(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - ox: 0.6.7(typescript@5.6.3) - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + abitype: 1.0.8(typescript@5.8.2) + isows: 1.0.6(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ox: 0.6.7(typescript@5.8.2) + ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) optionalDependencies: - typescript: 5.6.3 + typescript: 5.8.2 transitivePeerDependencies: - bufferutil - utf-8-validate - zod - vite-node@2.1.3(@types/node@22.7.8): + vite-node@2.1.3(@types/node@22.13.9): dependencies: cac: 6.7.14 - debug: 4.3.7 + debug: 4.4.0 pathe: 1.1.2 - vite: 5.4.9(@types/node@22.7.8) + vite: 5.4.14(@types/node@22.13.9) transitivePeerDependencies: - '@types/node' - less @@ -5570,57 +5577,57 @@ snapshots: - supports-color - terser - vite-plugin-dts@4.3.0(@types/node@22.7.8)(rollup@4.24.0)(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.8)): + vite-plugin-dts@4.5.3(@types/node@22.13.9)(rollup@4.34.9)(typescript@5.8.2)(vite@5.4.14(@types/node@22.13.9)): dependencies: - '@microsoft/api-extractor': 7.47.11(@types/node@22.7.8) - '@rollup/pluginutils': 5.1.2(rollup@4.24.0) - '@volar/typescript': 2.4.6 - '@vue/language-core': 2.1.6(typescript@5.6.3) + '@microsoft/api-extractor': 7.51.1(@types/node@22.13.9) + '@rollup/pluginutils': 5.1.4(rollup@4.34.9) + '@volar/typescript': 2.4.11 + '@vue/language-core': 2.2.0(typescript@5.8.2) compare-versions: 6.1.1 - debug: 4.3.7 + debug: 4.4.0 kolorist: 1.8.0 - local-pkg: 0.5.0 - magic-string: 0.30.12 - typescript: 5.6.3 + local-pkg: 1.1.1 + magic-string: 0.30.17 + typescript: 5.8.2 optionalDependencies: - vite: 5.4.9(@types/node@22.7.8) + vite: 5.4.14(@types/node@22.13.9) transitivePeerDependencies: - '@types/node' - rollup - supports-color - vite@5.4.9(@types/node@22.7.8): + vite@5.4.14(@types/node@22.13.9): dependencies: esbuild: 0.21.5 - postcss: 8.4.47 - rollup: 4.24.0 + postcss: 8.5.3 + rollup: 4.34.9 optionalDependencies: - '@types/node': 22.7.8 + '@types/node': 22.13.9 fsevents: 2.3.3 - vitest@2.1.3(patch_hash=0c337a8de71c98b9a0e1f0e80ef2bf86e1b90fb9871b385fff2d2a2d93ed3ffd)(@types/node@22.7.8)(msw@2.5.0(typescript@5.6.3)): + vitest@2.1.3(patch_hash=0c337a8de71c98b9a0e1f0e80ef2bf86e1b90fb9871b385fff2d2a2d93ed3ffd)(@types/node@22.13.9)(msw@2.7.3(@types/node@22.13.9)(typescript@5.8.2)): dependencies: '@vitest/expect': 2.1.3 - '@vitest/mocker': 2.1.3(@vitest/spy@2.1.3)(msw@2.5.0(typescript@5.6.3))(vite@5.4.9(@types/node@22.7.8)) - '@vitest/pretty-format': 2.1.3 + '@vitest/mocker': 2.1.3(@vitest/spy@2.1.3)(msw@2.7.3(@types/node@22.13.9)(typescript@5.8.2))(vite@5.4.14(@types/node@22.13.9)) + '@vitest/pretty-format': 2.1.9 '@vitest/runner': 2.1.3 '@vitest/snapshot': 2.1.3 '@vitest/spy': 2.1.3 '@vitest/utils': 2.1.3 - chai: 5.1.1 - debug: 4.3.7 - magic-string: 0.30.12 + chai: 5.2.0 + debug: 4.4.0 + magic-string: 0.30.17 pathe: 1.1.2 - std-env: 3.7.0 + std-env: 3.8.1 tinybench: 2.9.0 - tinyexec: 0.3.1 - tinypool: 1.0.1 + tinyexec: 0.3.2 + tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.9(@types/node@22.7.8) - vite-node: 2.1.3(@types/node@22.7.8) + vite: 5.4.14(@types/node@22.13.9) + vite-node: 2.1.3(@types/node@22.13.9) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.7.8 + '@types/node': 22.13.9 transitivePeerDependencies: - less - lightningcss @@ -5632,18 +5639,18 @@ snapshots: - supports-color - terser - vscode-uri@3.0.8: {} + vscode-uri@3.1.0: {} vue-eslint-parser@9.4.3(eslint@8.57.1): dependencies: - debug: 4.3.7 + debug: 4.4.0 eslint: 8.57.1 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 esquery: 1.6.0 lodash: 4.17.21 - semver: 7.6.3 + semver: 7.7.1 transitivePeerDependencies: - supports-color @@ -5699,14 +5706,19 @@ snapshots: wrappy@1.0.2: {} - ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10): + ws@7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10): + optionalDependencies: + bufferutil: 4.0.9 + utf-8-validate: 5.0.10 + + ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10): optionalDependencies: - bufferutil: 4.0.8 + bufferutil: 4.0.9 utf-8-validate: 5.0.10 - ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): + ws@8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10): optionalDependencies: - bufferutil: 4.0.8 + bufferutil: 4.0.9 utf-8-validate: 5.0.10 y18n@5.0.8: {} From 7c10c41c585e62742d6458c17c4246638c4c6d72 Mon Sep 17 00:00:00 2001 From: Tomasz Marciniak Date: Tue, 4 Mar 2025 16:18:23 +0100 Subject: [PATCH 3/5] chore(actions): bump pnpm version to current --- .vscode/settings.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 12d111f4..7155df45 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,9 +1,9 @@ { "editor.codeActionsOnSave": { - "source.addMissingImports": true, - "source.fixAll": true, - "source.formatDocument": true, - "source.organizeImports": true + "source.addMissingImports": "explicit", + "source.fixAll": "explicit", + "source.formatDocument": "explicit", + "source.organizeImports": "explicit" }, "editor.formatOnPaste": true, "editor.formatOnSave": true, From 13d83e0e1ca30209ae0991590739b887c45be983 Mon Sep 17 00:00:00 2001 From: Tomasz Marciniak Date: Tue, 4 Mar 2025 16:19:40 +0100 Subject: [PATCH 4/5] chore(actions): cleanup --- .github/workflows/build-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index f1849885..e4dbc7a7 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -19,7 +19,7 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v2 with: - version: 9 + version: 10 - name: Install dependencies run: pnpm install From 3c734cc0a76f286fc70f7fb6d4954dcb85452a8b Mon Sep 17 00:00:00 2001 From: Tomasz Marciniak Date: Tue, 4 Mar 2025 16:21:35 +0100 Subject: [PATCH 5/5] chore(code): format --- src/ethereum.ts | 1816 +++++++++++++++++++++++------------------------ 1 file changed, 908 insertions(+), 908 deletions(-) diff --git a/src/ethereum.ts b/src/ethereum.ts index db9e4942..7bb4f792 100644 --- a/src/ethereum.ts +++ b/src/ethereum.ts @@ -1,951 +1,951 @@ // Utils for Ethereum transactions. This is effecitvely a shim of ethereumjs-util, which // does not have browser (or, by proxy, React-Native) support. -import { Chain, Common, Hardfork } from "@ethereumjs/common"; -import { RLP } from "@ethereumjs/rlp"; -import { TransactionFactory } from "@ethereumjs/tx"; -import { SignTypedDataVersion, TypedDataUtils } from "@metamask/eth-sig-util"; -import BN from "bignumber.js"; -import * as cbor from "cbor2"; -import { keccak256 } from "js-sha3"; -import secp256k1 from "secp256k1"; -import type { TransactionSerializable } from "viem"; +import { Chain, Common, Hardfork } from '@ethereumjs/common'; +import { RLP } from '@ethereumjs/rlp'; +import { TransactionFactory } from '@ethereumjs/tx'; +import { SignTypedDataVersion, TypedDataUtils } from '@metamask/eth-sig-util'; +import BN from 'bignumber.js'; +import * as cbor from 'cbor2'; +import { keccak256 } from 'js-sha3'; +import secp256k1 from 'secp256k1'; +import type { TransactionSerializable } from 'viem'; import { - ASCII_REGEX, - HANDLE_LARGER_CHAIN_ID, - MAX_CHAIN_ID_BYTES, - ethMsgProtocol, -} from "./constants"; -import { LatticeSignSchema } from "./protocol"; -import { TRANSACTION_TYPE, type TransactionRequest } from "./types"; + ASCII_REGEX, + HANDLE_LARGER_CHAIN_ID, + MAX_CHAIN_ID_BYTES, + ethMsgProtocol, +} from './constants'; +import { LatticeSignSchema } from './protocol'; +import { TRANSACTION_TYPE, type TransactionRequest } from './types'; import { - buildSignerPathBuf, - ensureHexBuffer, - fixLen, - isAsciiStr, - splitFrames, -} from "./util"; + buildSignerPathBuf, + ensureHexBuffer, + fixLen, + isAsciiStr, + splitFrames, +} from './util'; const buildEthereumMsgRequest = (input) => { - if (!input.payload || !input.protocol || !input.signerPath) - throw new Error( - "You must provide `payload`, `signerPath`, and `protocol` arguments in the messsage request", - ); - if (input.signerPath.length > 5 || input.signerPath.length < 2) - throw new Error("Please provide a signer path with 2-5 indices"); - const req = { - schema: LatticeSignSchema.ethereumMsg, - payload: null, - input, // Save the input for later - msg: null, // Save the buffered message for later - }; - switch (input.protocol) { - case "signPersonal": - return buildPersonalSignRequest(req, input); - case "eip712": - if (!input.fwConstants.eip712Supported) - throw new Error( - "EIP712 is not supported by your Lattice firmware version. Please upgrade.", - ); - return buildEIP712Request(req, input); - default: - throw new Error("Unsupported protocol"); - } + if (!input.payload || !input.protocol || !input.signerPath) + throw new Error( + 'You must provide `payload`, `signerPath`, and `protocol` arguments in the messsage request', + ); + if (input.signerPath.length > 5 || input.signerPath.length < 2) + throw new Error('Please provide a signer path with 2-5 indices'); + const req = { + schema: LatticeSignSchema.ethereumMsg, + payload: null, + input, // Save the input for later + msg: null, // Save the buffered message for later + }; + switch (input.protocol) { + case 'signPersonal': + return buildPersonalSignRequest(req, input); + case 'eip712': + if (!input.fwConstants.eip712Supported) + throw new Error( + 'EIP712 is not supported by your Lattice firmware version. Please upgrade.', + ); + return buildEIP712Request(req, input); + default: + throw new Error('Unsupported protocol'); + } }; const validateEthereumMsgResponse = (res, req) => { - const { signer, sig } = res; - const { input, msg, prehash = null } = req; - if (input.protocol === "signPersonal") { - // NOTE: We are currently hardcoding networkID=1 and useEIP155=false but these - // may be configurable in future versions - const hash = prehash - ? prehash - : Buffer.from( - keccak256(Buffer.concat([get_personal_sign_prefix(msg.length), msg])), - "hex", - ); - // Get recovery param with a `v` value of [27,28] by setting `useEIP155=false` - return addRecoveryParam(hash, sig, signer, { - chainId: 1, - useEIP155: false, - }); - } else if (input.protocol === "eip712") { - req = convertBigNumbers(req); - const encoded = TypedDataUtils.eip712Hash( - req.input.payload, - SignTypedDataVersion.V4, - ); - const digest = prehash ? prehash : encoded; - const chainId = Number.parseInt(input.payload.domain.chainId, 16); - // Get recovery param with a `v` value of [27,28] by setting `useEIP155=false` - return addRecoveryParam(digest, sig, signer, { chainId, useEIP155: false }); - } else { - throw new Error("Unsupported protocol"); - } + const { signer, sig } = res; + const { input, msg, prehash = null } = req; + if (input.protocol === 'signPersonal') { + // NOTE: We are currently hardcoding networkID=1 and useEIP155=false but these + // may be configurable in future versions + const hash = prehash + ? prehash + : Buffer.from( + keccak256(Buffer.concat([get_personal_sign_prefix(msg.length), msg])), + 'hex', + ); + // Get recovery param with a `v` value of [27,28] by setting `useEIP155=false` + return addRecoveryParam(hash, sig, signer, { + chainId: 1, + useEIP155: false, + }); + } else if (input.protocol === 'eip712') { + req = convertBigNumbers(req); + const encoded = TypedDataUtils.eip712Hash( + req.input.payload, + SignTypedDataVersion.V4, + ); + const digest = prehash ? prehash : encoded; + const chainId = Number.parseInt(input.payload.domain.chainId, 16); + // Get recovery param with a `v` value of [27,28] by setting `useEIP155=false` + return addRecoveryParam(digest, sig, signer, { chainId, useEIP155: false }); + } else { + throw new Error('Unsupported protocol'); + } }; function convertBigNumbers(obj) { - if (BN.isBigNumber(obj)) { - return obj.toFixed(); - } else if (Array.isArray(obj)) { - return obj.map(convertBigNumbers); - } else if (typeof obj === "object" && obj !== null) { - const newObj = {}; - for (const [key, value] of Object.entries(obj)) { - newObj[key] = convertBigNumbers(value); - } - return newObj; - } else { - return obj; - } + if (BN.isBigNumber(obj)) { + return obj.toFixed(); + } else if (Array.isArray(obj)) { + return obj.map(convertBigNumbers); + } else if (typeof obj === 'object' && obj !== null) { + const newObj = {}; + for (const [key, value] of Object.entries(obj)) { + newObj[key] = convertBigNumbers(value); + } + return newObj; + } else { + return obj; + } } const buildEthereumTxRequest = (data) => { - try { - let { chainId = 1 } = data; - const { signerPath, eip155 = null, fwConstants, type = null } = data; - const { - contractDeployKey, - extraDataFrameSz, - extraDataMaxFrames, - prehashAllowed, - } = fwConstants; - const EXTRA_DATA_ALLOWED = extraDataFrameSz > 0 && extraDataMaxFrames > 0; - const MAX_BASE_DATA_SZ = fwConstants.ethMaxDataSz; - const VAR_PATH_SZ = fwConstants.varAddrPathSzAllowed; - // Sanity checks: - // There are a handful of named chains we allow the user to reference (`chainIds`) - // Custom chainIDs should be either numerical or hex strings - if ( - typeof chainId !== "number" && - isValidChainIdHexNumStr(chainId) === false - ) { - chainId = chainIds[chainId]; - } - // If this was not a custom chainID and we cannot find the name of it, exit - if (!chainId) throw new Error("Unsupported chain ID or name"); - // Sanity check on signePath - if (!signerPath) throw new Error("`signerPath` not provided"); + try { + let { chainId = 1 } = data; + const { signerPath, eip155 = null, fwConstants, type = null } = data; + const { + contractDeployKey, + extraDataFrameSz, + extraDataMaxFrames, + prehashAllowed, + } = fwConstants; + const EXTRA_DATA_ALLOWED = extraDataFrameSz > 0 && extraDataMaxFrames > 0; + const MAX_BASE_DATA_SZ = fwConstants.ethMaxDataSz; + const VAR_PATH_SZ = fwConstants.varAddrPathSzAllowed; + // Sanity checks: + // There are a handful of named chains we allow the user to reference (`chainIds`) + // Custom chainIDs should be either numerical or hex strings + if ( + typeof chainId !== 'number' && + isValidChainIdHexNumStr(chainId) === false + ) { + chainId = chainIds[chainId]; + } + // If this was not a custom chainID and we cannot find the name of it, exit + if (!chainId) throw new Error('Unsupported chain ID or name'); + // Sanity check on signePath + if (!signerPath) throw new Error('`signerPath` not provided'); - // Is this a contract deployment? - if (data.to === null && !contractDeployKey) { - throw new Error( - "Contract deployment not supported. Please update your Lattice firmware.", - ); - } - const isDeployment = data.to === null && contractDeployKey; - // We support eip1559 and eip2930 types (as well as legacy) - const eip1559IsAllowed = - fwConstants.allowedEthTxTypes && - fwConstants.allowedEthTxTypes.indexOf(2) > -1; - const eip2930IsAllowed = - fwConstants.allowedEthTxTypes && - fwConstants.allowedEthTxTypes.indexOf(1) > -1; - const isEip1559 = eip1559IsAllowed && (type === 2 || type === "eip1559"); - const isEip2930 = eip2930IsAllowed && (type === 1 || type === "eip2930"); - if (type !== null && !isEip1559 && !isEip2930) - throw new Error("Unsupported Ethereum transaction type"); - // Determine if we should use EIP155 given the chainID. - // If we are explicitly told to use eip155, we will use it. Otherwise, - // we will look up if the specified chainId is associated with a chain - // that does not use EIP155 by default. Note that most do use EIP155. - let useEIP155 = chainUsesEIP155(chainId); - if (eip155 !== null && typeof eip155 === "boolean") { - useEIP155 = eip155; - } else if (isEip1559 || isEip2930) { - // Newer transaction types do not use EIP155 since the chainId is serialized - useEIP155 = false; - } + // Is this a contract deployment? + if (data.to === null && !contractDeployKey) { + throw new Error( + 'Contract deployment not supported. Please update your Lattice firmware.', + ); + } + const isDeployment = data.to === null && contractDeployKey; + // We support eip1559 and eip2930 types (as well as legacy) + const eip1559IsAllowed = + fwConstants.allowedEthTxTypes && + fwConstants.allowedEthTxTypes.indexOf(2) > -1; + const eip2930IsAllowed = + fwConstants.allowedEthTxTypes && + fwConstants.allowedEthTxTypes.indexOf(1) > -1; + const isEip1559 = eip1559IsAllowed && (type === 2 || type === 'eip1559'); + const isEip2930 = eip2930IsAllowed && (type === 1 || type === 'eip2930'); + if (type !== null && !isEip1559 && !isEip2930) + throw new Error('Unsupported Ethereum transaction type'); + // Determine if we should use EIP155 given the chainID. + // If we are explicitly told to use eip155, we will use it. Otherwise, + // we will look up if the specified chainId is associated with a chain + // that does not use EIP155 by default. Note that most do use EIP155. + let useEIP155 = chainUsesEIP155(chainId); + if (eip155 !== null && typeof eip155 === 'boolean') { + useEIP155 = eip155; + } else if (isEip1559 || isEip2930) { + // Newer transaction types do not use EIP155 since the chainId is serialized + useEIP155 = false; + } - // Hack for metamask, which sends value=null for 0 ETH transactions - if (!data.value) data.value = 0; + // Hack for metamask, which sends value=null for 0 ETH transactions + if (!data.value) data.value = 0; - //-------------- - // 1. BUILD THE RAW TX FOR FUTURE RLP ENCODING - //-------------- - // Ensure all fields are 0x-prefixed hex strings - const rawTx = []; - // Build the transaction buffer array - const chainIdBytes = ensureHexBuffer(chainId); - const nonceBytes = ensureHexBuffer(data.nonce); - let gasPriceBytes; - const gasLimitBytes = ensureHexBuffer(data.gasLimit); - // Handle contract deployment (indicated by `to` being `null`) - // For contract deployment we write a 20-byte key to the request - // buffer, which gets swapped for an empty buffer in firmware. - let toRlpElem, toBytes; - if (isDeployment) { - toRlpElem = Buffer.alloc(0); - toBytes = ensureHexBuffer(contractDeployKey); - } else { - toRlpElem = ensureHexBuffer(data.to); - toBytes = ensureHexBuffer(data.to); - } - const valueBytes = ensureHexBuffer(data.value); - const dataBytes = ensureHexBuffer(data.data); + //-------------- + // 1. BUILD THE RAW TX FOR FUTURE RLP ENCODING + //-------------- + // Ensure all fields are 0x-prefixed hex strings + const rawTx = []; + // Build the transaction buffer array + const chainIdBytes = ensureHexBuffer(chainId); + const nonceBytes = ensureHexBuffer(data.nonce); + let gasPriceBytes; + const gasLimitBytes = ensureHexBuffer(data.gasLimit); + // Handle contract deployment (indicated by `to` being `null`) + // For contract deployment we write a 20-byte key to the request + // buffer, which gets swapped for an empty buffer in firmware. + let toRlpElem, toBytes; + if (isDeployment) { + toRlpElem = Buffer.alloc(0); + toBytes = ensureHexBuffer(contractDeployKey); + } else { + toRlpElem = ensureHexBuffer(data.to); + toBytes = ensureHexBuffer(data.to); + } + const valueBytes = ensureHexBuffer(data.value); + const dataBytes = ensureHexBuffer(data.data); - if (isEip1559 || isEip2930) { - // EIP1559 and EIP2930 transactions have a chainID field - rawTx.push(chainIdBytes); - } - rawTx.push(nonceBytes); - let maxPriorityFeePerGasBytes, maxFeePerGasBytes; - if (isEip1559) { - if (!data.maxPriorityFeePerGas) - throw new Error( - "EIP1559 transactions must include `maxPriorityFeePerGas`", - ); - maxPriorityFeePerGasBytes = ensureHexBuffer(data.maxPriorityFeePerGas); - rawTx.push(maxPriorityFeePerGasBytes); - maxFeePerGasBytes = ensureHexBuffer(data.maxFeePerGas); - rawTx.push(maxFeePerGasBytes); - // EIP1559 renamed "gasPrice" to "maxFeePerGas", but firmware still - // uses `gasPrice` in the struct, so update that value here. - gasPriceBytes = maxFeePerGasBytes; - } else { - // EIP1559 transactions do not have the gasPrice field - gasPriceBytes = ensureHexBuffer(data.gasPrice); - rawTx.push(gasPriceBytes); - } - rawTx.push(gasLimitBytes); - rawTx.push(toRlpElem); - rawTx.push(valueBytes); - rawTx.push(dataBytes); - // We do not currently support accessList in firmware so we need to prehash if - // the list is non-null - let PREHASH_FROM_ACCESS_LIST = false; - if (isEip1559 || isEip2930) { - const accessList = []; - if (Array.isArray(data.accessList)) { - data.accessList.forEach((listItem) => { - const keys = []; - listItem.storageKeys.forEach((key) => { - keys.push(ensureHexBuffer(key)); - }); - accessList.push([ensureHexBuffer(listItem.address), keys]); - PREHASH_FROM_ACCESS_LIST = true; - }); - } - rawTx.push(accessList); - } else if (useEIP155 === true) { - // Add empty v,r,s values for EIP155 legacy transactions - rawTx.push(chainIdBytes); // v (which is the same as chainId in EIP155 txs) - rawTx.push(ensureHexBuffer(null)); // r - rawTx.push(ensureHexBuffer(null)); // s - } - //-------------- - // 2. BUILD THE LATTICE REQUEST PAYLOAD - //-------------- - const ETH_TX_NON_DATA_SZ = 122; // Accounts for metadata and non-data params - const txReqPayload = Buffer.alloc(MAX_BASE_DATA_SZ + ETH_TX_NON_DATA_SZ); - let off = 0; - // 1. EIP155 switch and chainID - //------------------ - txReqPayload.writeUInt8(Number(useEIP155), off); - off++; - // NOTE: Originally we designed for a 1-byte chainID, but modern rollup chains use much larger - // chainID values. To account for these, we will put the chainID into the `data` buffer if it - // is >=255. Values up to UINT64_MAX will be allowed. - let chainIdBuf; - let chainIdBufSz = 0; - if (useChainIdBuffer(chainId) === true) { - chainIdBuf = getChainIdBuf(chainId); - chainIdBufSz = chainIdBuf.length; - if (chainIdBufSz > MAX_CHAIN_ID_BYTES) - throw new Error("ChainID provided is too large."); - // Signal to Lattice firmware that it needs to read the chainId from the tx.data buffer - txReqPayload.writeUInt8(HANDLE_LARGER_CHAIN_ID, off); - off++; - } else { - // For chainIDs <255, write it to the chainId u8 slot in the main tx buffer - chainIdBuf = ensureHexBuffer(chainId); - if (chainIdBuf.length !== 1) throw new Error("Error parsing chainID"); - chainIdBuf.copy(txReqPayload, off); - off += chainIdBuf.length; - } - // 2. Signer Path - //------------------ - const signerPathBuf = buildSignerPathBuf(signerPath, VAR_PATH_SZ); - signerPathBuf.copy(txReqPayload, off); - off += signerPathBuf.length; + if (isEip1559 || isEip2930) { + // EIP1559 and EIP2930 transactions have a chainID field + rawTx.push(chainIdBytes); + } + rawTx.push(nonceBytes); + let maxPriorityFeePerGasBytes, maxFeePerGasBytes; + if (isEip1559) { + if (!data.maxPriorityFeePerGas) + throw new Error( + 'EIP1559 transactions must include `maxPriorityFeePerGas`', + ); + maxPriorityFeePerGasBytes = ensureHexBuffer(data.maxPriorityFeePerGas); + rawTx.push(maxPriorityFeePerGasBytes); + maxFeePerGasBytes = ensureHexBuffer(data.maxFeePerGas); + rawTx.push(maxFeePerGasBytes); + // EIP1559 renamed "gasPrice" to "maxFeePerGas", but firmware still + // uses `gasPrice` in the struct, so update that value here. + gasPriceBytes = maxFeePerGasBytes; + } else { + // EIP1559 transactions do not have the gasPrice field + gasPriceBytes = ensureHexBuffer(data.gasPrice); + rawTx.push(gasPriceBytes); + } + rawTx.push(gasLimitBytes); + rawTx.push(toRlpElem); + rawTx.push(valueBytes); + rawTx.push(dataBytes); + // We do not currently support accessList in firmware so we need to prehash if + // the list is non-null + let PREHASH_FROM_ACCESS_LIST = false; + if (isEip1559 || isEip2930) { + const accessList = []; + if (Array.isArray(data.accessList)) { + data.accessList.forEach((listItem) => { + const keys = []; + listItem.storageKeys.forEach((key) => { + keys.push(ensureHexBuffer(key)); + }); + accessList.push([ensureHexBuffer(listItem.address), keys]); + PREHASH_FROM_ACCESS_LIST = true; + }); + } + rawTx.push(accessList); + } else if (useEIP155 === true) { + // Add empty v,r,s values for EIP155 legacy transactions + rawTx.push(chainIdBytes); // v (which is the same as chainId in EIP155 txs) + rawTx.push(ensureHexBuffer(null)); // r + rawTx.push(ensureHexBuffer(null)); // s + } + //-------------- + // 2. BUILD THE LATTICE REQUEST PAYLOAD + //-------------- + const ETH_TX_NON_DATA_SZ = 122; // Accounts for metadata and non-data params + const txReqPayload = Buffer.alloc(MAX_BASE_DATA_SZ + ETH_TX_NON_DATA_SZ); + let off = 0; + // 1. EIP155 switch and chainID + //------------------ + txReqPayload.writeUInt8(Number(useEIP155), off); + off++; + // NOTE: Originally we designed for a 1-byte chainID, but modern rollup chains use much larger + // chainID values. To account for these, we will put the chainID into the `data` buffer if it + // is >=255. Values up to UINT64_MAX will be allowed. + let chainIdBuf; + let chainIdBufSz = 0; + if (useChainIdBuffer(chainId) === true) { + chainIdBuf = getChainIdBuf(chainId); + chainIdBufSz = chainIdBuf.length; + if (chainIdBufSz > MAX_CHAIN_ID_BYTES) + throw new Error('ChainID provided is too large.'); + // Signal to Lattice firmware that it needs to read the chainId from the tx.data buffer + txReqPayload.writeUInt8(HANDLE_LARGER_CHAIN_ID, off); + off++; + } else { + // For chainIDs <255, write it to the chainId u8 slot in the main tx buffer + chainIdBuf = ensureHexBuffer(chainId); + if (chainIdBuf.length !== 1) throw new Error('Error parsing chainID'); + chainIdBuf.copy(txReqPayload, off); + off += chainIdBuf.length; + } + // 2. Signer Path + //------------------ + const signerPathBuf = buildSignerPathBuf(signerPath, VAR_PATH_SZ); + signerPathBuf.copy(txReqPayload, off); + off += signerPathBuf.length; - // 3. ETH TX request data - //------------------ - if (nonceBytes.length > 4) throw new Error("Nonce too large"); - nonceBytes.copy(txReqPayload, off + (4 - nonceBytes.length)); - off += 4; - if (gasPriceBytes.length > 8) throw new Error("Gas price too large"); - gasPriceBytes.copy(txReqPayload, off + (8 - gasPriceBytes.length)); - off += 8; - if (gasLimitBytes.length > 4) throw new Error("Gas limit too large"); - gasLimitBytes.copy(txReqPayload, off + (4 - gasLimitBytes.length)); - off += 4; - if (toBytes.length !== 20) throw new Error("Invalid `to` address"); - toBytes.copy(txReqPayload, off); - off += 20; - if (valueBytes.length > 32) throw new Error("Value too large"); - valueBytes.copy(txReqPayload, off + (32 - valueBytes.length)); - off += 32; + // 3. ETH TX request data + //------------------ + if (nonceBytes.length > 4) throw new Error('Nonce too large'); + nonceBytes.copy(txReqPayload, off + (4 - nonceBytes.length)); + off += 4; + if (gasPriceBytes.length > 8) throw new Error('Gas price too large'); + gasPriceBytes.copy(txReqPayload, off + (8 - gasPriceBytes.length)); + off += 8; + if (gasLimitBytes.length > 4) throw new Error('Gas limit too large'); + gasLimitBytes.copy(txReqPayload, off + (4 - gasLimitBytes.length)); + off += 4; + if (toBytes.length !== 20) throw new Error('Invalid `to` address'); + toBytes.copy(txReqPayload, off); + off += 20; + if (valueBytes.length > 32) throw new Error('Value too large'); + valueBytes.copy(txReqPayload, off + (32 - valueBytes.length)); + off += 32; - // Extra Tx data comes before `data` in the struct - let PREHASH_UNSUPPORTED = false; - if (fwConstants.allowedEthTxTypes) { - // Some types may not be supported by firmware, so we will need to prehash - if (PREHASH_FROM_ACCESS_LIST) { - PREHASH_UNSUPPORTED = true; - } - txReqPayload.writeUInt8(PREHASH_UNSUPPORTED ? 1 : 0, off); - off += 1; - // EIP1559 & EIP2930 struct version - if (isEip1559) { - txReqPayload.writeUInt8(2, off); - off += 1; // Eip1559 type enum value - if (maxPriorityFeePerGasBytes.length > 8) - throw new Error("maxPriorityFeePerGasBytes too large"); - maxPriorityFeePerGasBytes.copy( - txReqPayload, - off + (8 - maxPriorityFeePerGasBytes.length), - ); - off += 8; // Skip EIP1559 params - } else if (isEip2930) { - txReqPayload.writeUInt8(1, off); - off += 1; // Eip2930 type enum value - off += 8; // Skip EIP1559 params - } else { - off += 9; // Skip EIP1559 and EIP2930 params - } - } + // Extra Tx data comes before `data` in the struct + let PREHASH_UNSUPPORTED = false; + if (fwConstants.allowedEthTxTypes) { + // Some types may not be supported by firmware, so we will need to prehash + if (PREHASH_FROM_ACCESS_LIST) { + PREHASH_UNSUPPORTED = true; + } + txReqPayload.writeUInt8(PREHASH_UNSUPPORTED ? 1 : 0, off); + off += 1; + // EIP1559 & EIP2930 struct version + if (isEip1559) { + txReqPayload.writeUInt8(2, off); + off += 1; // Eip1559 type enum value + if (maxPriorityFeePerGasBytes.length > 8) + throw new Error('maxPriorityFeePerGasBytes too large'); + maxPriorityFeePerGasBytes.copy( + txReqPayload, + off + (8 - maxPriorityFeePerGasBytes.length), + ); + off += 8; // Skip EIP1559 params + } else if (isEip2930) { + txReqPayload.writeUInt8(1, off); + off += 1; // Eip2930 type enum value + off += 8; // Skip EIP1559 params + } else { + off += 9; // Skip EIP1559 and EIP2930 params + } + } - // Flow data into extraData requests, which will follow-up transaction requests, if supported/applicable - const extraDataPayloads = []; - let prehash = null; + // Flow data into extraData requests, which will follow-up transaction requests, if supported/applicable + const extraDataPayloads = []; + let prehash = null; - // Create the buffer, prefix with chainId (if needed) and add data slice - const dataSz = dataBytes.length || 0; - const chainIdExtraSz = chainIdBufSz > 0 ? chainIdBufSz + 1 : 0; - const dataToCopy = Buffer.alloc(dataSz + chainIdExtraSz); - if (chainIdExtraSz > 0) { - dataToCopy.writeUInt8(chainIdBufSz, 0); - chainIdBuf.copy(dataToCopy, 1); - } - dataBytes.copy(dataToCopy, chainIdExtraSz); + // Create the buffer, prefix with chainId (if needed) and add data slice + const dataSz = dataBytes.length || 0; + const chainIdExtraSz = chainIdBufSz > 0 ? chainIdBufSz + 1 : 0; + const dataToCopy = Buffer.alloc(dataSz + chainIdExtraSz); + if (chainIdExtraSz > 0) { + dataToCopy.writeUInt8(chainIdBufSz, 0); + chainIdBuf.copy(dataToCopy, 1); + } + dataBytes.copy(dataToCopy, chainIdExtraSz); - if (dataSz > MAX_BASE_DATA_SZ) { - // Determine sizes and run through sanity checks - const totalSz = dataSz + chainIdExtraSz; - const maxSzAllowed = - MAX_BASE_DATA_SZ + extraDataMaxFrames * extraDataFrameSz; + if (dataSz > MAX_BASE_DATA_SZ) { + // Determine sizes and run through sanity checks + const totalSz = dataSz + chainIdExtraSz; + const maxSzAllowed = + MAX_BASE_DATA_SZ + extraDataMaxFrames * extraDataFrameSz; - if (prehashAllowed && totalSz > maxSzAllowed) { - // If this payload is too large to send, but the Lattice allows a prehashed message, do that - prehash = Buffer.from( - keccak256(get_rlp_encoded_preimage(rawTx, type)), - "hex", - ); - } else { - if ( - !EXTRA_DATA_ALLOWED || - (EXTRA_DATA_ALLOWED && totalSz > maxSzAllowed) - ) - throw new Error( - `Data field too large (got ${dataBytes.length}; must be <=${ - maxSzAllowed - chainIdExtraSz - } bytes)`, - ); - // Split overflow data into extraData frames - const frames = splitFrames( - dataToCopy.slice(MAX_BASE_DATA_SZ), - extraDataFrameSz, - ); - frames.forEach((frame) => { - const szLE = Buffer.alloc(4); - szLE.writeUInt32LE(frame.length, 0); - extraDataPayloads.push(Buffer.concat([szLE, frame])); - }); - } - } else if (PREHASH_UNSUPPORTED) { - // If something is unsupported in firmware but we want to allow such transactions, - // we prehash the message here. - prehash = Buffer.from( - keccak256(get_rlp_encoded_preimage(rawTx, type)), - "hex", - ); - } + if (prehashAllowed && totalSz > maxSzAllowed) { + // If this payload is too large to send, but the Lattice allows a prehashed message, do that + prehash = Buffer.from( + keccak256(get_rlp_encoded_preimage(rawTx, type)), + 'hex', + ); + } else { + if ( + !EXTRA_DATA_ALLOWED || + (EXTRA_DATA_ALLOWED && totalSz > maxSzAllowed) + ) + throw new Error( + `Data field too large (got ${dataBytes.length}; must be <=${ + maxSzAllowed - chainIdExtraSz + } bytes)`, + ); + // Split overflow data into extraData frames + const frames = splitFrames( + dataToCopy.slice(MAX_BASE_DATA_SZ), + extraDataFrameSz, + ); + frames.forEach((frame) => { + const szLE = Buffer.alloc(4); + szLE.writeUInt32LE(frame.length, 0); + extraDataPayloads.push(Buffer.concat([szLE, frame])); + }); + } + } else if (PREHASH_UNSUPPORTED) { + // If something is unsupported in firmware but we want to allow such transactions, + // we prehash the message here. + prehash = Buffer.from( + keccak256(get_rlp_encoded_preimage(rawTx, type)), + 'hex', + ); + } - // Write the data size (does *NOT* include the chainId buffer, if that exists) - txReqPayload.writeUInt16BE(dataBytes.length, off); - off += 2; - // Copy in the chainId buffer if needed - if (chainIdBufSz > 0) { - txReqPayload.writeUInt8(chainIdBufSz, off); - off++; - chainIdBuf.copy(txReqPayload, off); - off += chainIdBufSz; - } - // Copy the first slice of the data itself. If this payload has been pre-hashed, include it - // in the `data` field. This will result in a different Lattice screen being drawn. - if (prehash) { - prehash.copy(txReqPayload, off); - off += MAX_BASE_DATA_SZ; - } else { - dataBytes.slice(0, MAX_BASE_DATA_SZ).copy(txReqPayload, off); - off += MAX_BASE_DATA_SZ; - } - return { - rawTx, - type, - payload: txReqPayload.slice(0, off), - extraDataPayloads, - schema: LatticeSignSchema.ethereum, // We will use eth transfer for all ETH txs for v1 - chainId, - useEIP155, - signerPath, - }; - } catch (err) { - return { err: err.message }; - } + // Write the data size (does *NOT* include the chainId buffer, if that exists) + txReqPayload.writeUInt16BE(dataBytes.length, off); + off += 2; + // Copy in the chainId buffer if needed + if (chainIdBufSz > 0) { + txReqPayload.writeUInt8(chainIdBufSz, off); + off++; + chainIdBuf.copy(txReqPayload, off); + off += chainIdBufSz; + } + // Copy the first slice of the data itself. If this payload has been pre-hashed, include it + // in the `data` field. This will result in a different Lattice screen being drawn. + if (prehash) { + prehash.copy(txReqPayload, off); + off += MAX_BASE_DATA_SZ; + } else { + dataBytes.slice(0, MAX_BASE_DATA_SZ).copy(txReqPayload, off); + off += MAX_BASE_DATA_SZ; + } + return { + rawTx, + type, + payload: txReqPayload.slice(0, off), + extraDataPayloads, + schema: LatticeSignSchema.ethereum, // We will use eth transfer for all ETH txs for v1 + chainId, + useEIP155, + signerPath, + }; + } catch (err) { + return { err: err.message }; + } }; // From ethereumjs-util function stripZeros(a) { - let first = a[0]; - while (a.length > 0 && first.toString() === "0") { - a = a.slice(1); - first = a[0]; - } - return a; + let first = a[0]; + while (a.length > 0 && first.toString() === '0') { + a = a.slice(1); + first = a[0]; + } + return a; } // Given a 64-byte signature [r,s] we need to figure out the v value // and attah the full signature to the end of the transaction payload const buildEthRawTx = (tx, sig, address) => { - // RLP-encode the data we sent to the lattice - const hash = Buffer.from( - keccak256(get_rlp_encoded_preimage(tx.rawTx, tx.type)), - "hex", - ); - const newSig = addRecoveryParam(hash, sig, address, tx); - // Use the signature to generate a new raw transaction payload - // Strip the last 3 items and replace them with signature components - const newRawTx = tx.useEIP155 ? tx.rawTx.slice(0, -3) : tx.rawTx; - newRawTx.push(newSig.v); - // Per `ethereumjs-tx`, RLP encoding should include signature components w/ stripped zeros - // See: https://github.com/ethereumjs/ethereumjs-tx/blob/master/src/transaction.ts#L187 - newRawTx.push(stripZeros(newSig.r)); - newRawTx.push(stripZeros(newSig.s)); - let rlpEncodedWithSig = Buffer.from(RLP.encode(newRawTx)); - if (tx.type) { - rlpEncodedWithSig = Buffer.concat([ - Buffer.from([tx.type]), - rlpEncodedWithSig, - ]); - } - return { rawTx: rlpEncodedWithSig.toString("hex"), sigWithV: newSig }; + // RLP-encode the data we sent to the lattice + const hash = Buffer.from( + keccak256(get_rlp_encoded_preimage(tx.rawTx, tx.type)), + 'hex', + ); + const newSig = addRecoveryParam(hash, sig, address, tx); + // Use the signature to generate a new raw transaction payload + // Strip the last 3 items and replace them with signature components + const newRawTx = tx.useEIP155 ? tx.rawTx.slice(0, -3) : tx.rawTx; + newRawTx.push(newSig.v); + // Per `ethereumjs-tx`, RLP encoding should include signature components w/ stripped zeros + // See: https://github.com/ethereumjs/ethereumjs-tx/blob/master/src/transaction.ts#L187 + newRawTx.push(stripZeros(newSig.r)); + newRawTx.push(stripZeros(newSig.s)); + let rlpEncodedWithSig = Buffer.from(RLP.encode(newRawTx)); + if (tx.type) { + rlpEncodedWithSig = Buffer.concat([ + Buffer.from([tx.type]), + rlpEncodedWithSig, + ]); + } + return { rawTx: rlpEncodedWithSig.toString('hex'), sigWithV: newSig }; }; // Attach a recovery parameter to a signature by brute-forcing ECRecover function addRecoveryParam(hashBuf, sig, address, txData = {}) { - try { - // Rebuild the keccak256 hash here so we can `ecrecover` - const hash = new Uint8Array(hashBuf); - let v = 0; - // Fix signature componenet lengths to 32 bytes each - const r = fixLen(sig.r, 32); - sig.r = r; - const s = fixLen(sig.s, 32); - sig.s = s; - // Calculate the recovery param - const rs = new Uint8Array(Buffer.concat([r, s])); - let pubkey = secp256k1.ecdsaRecover(rs, v, hash, false).slice(1); - // If the first `v` value is a match, return the sig! - if (pubToAddrStr(pubkey) === address.toString("hex")) { - sig.v = getRecoveryParam(v, txData); - return sig; - } - // Otherwise, try the other `v` value - v = 1; - pubkey = secp256k1.ecdsaRecover(rs, v, hash, false).slice(1); - if (pubToAddrStr(pubkey) === address.toString("hex")) { - sig.v = getRecoveryParam(v, txData); - return sig; - } else { - // If neither is a match, we should return an error - throw new Error("Invalid Ethereum signature returned."); - } - } catch (err) { - throw new Error(err); - } + try { + // Rebuild the keccak256 hash here so we can `ecrecover` + const hash = new Uint8Array(hashBuf); + let v = 0; + // Fix signature componenet lengths to 32 bytes each + const r = fixLen(sig.r, 32); + sig.r = r; + const s = fixLen(sig.s, 32); + sig.s = s; + // Calculate the recovery param + const rs = new Uint8Array(Buffer.concat([r, s])); + let pubkey = secp256k1.ecdsaRecover(rs, v, hash, false).slice(1); + // If the first `v` value is a match, return the sig! + if (pubToAddrStr(pubkey) === address.toString('hex')) { + sig.v = getRecoveryParam(v, txData); + return sig; + } + // Otherwise, try the other `v` value + v = 1; + pubkey = secp256k1.ecdsaRecover(rs, v, hash, false).slice(1); + if (pubToAddrStr(pubkey) === address.toString('hex')) { + sig.v = getRecoveryParam(v, txData); + return sig; + } else { + // If neither is a match, we should return an error + throw new Error('Invalid Ethereum signature returned.'); + } + } catch (err) { + throw new Error(err); + } } // Convert an RLP-serialized transaction (plus signature) into a transaction hash const hashTransaction = (serializedTx) => - keccak256(Buffer.from(serializedTx, "hex")); + keccak256(Buffer.from(serializedTx, 'hex')); // Returns address string given public key buffer function pubToAddrStr(pub) { - return keccak256(pub).slice(-40); + return keccak256(pub).slice(-40); } // Convert a 0/1 `v` into a recovery param: // * For non-EIP155 transactions, return `27 + v` // * For EIP155 transactions, return `(CHAIN_ID*2) + 35 + v` function getRecoveryParam(v, txData: any = {}) { - const { chainId, useEIP155, type } = txData; - // For EIP1559 and EIP2930 transactions, we want the recoveryParam (0 or 1) - // rather than the `v` value because the `chainId` is already included in the - // transaction payload. - if (type === 1 || type === 2) { - return ensureHexBuffer(v, true); // 0 or 1, with 0 expected as an empty buffer - } else if (!useEIP155 || !chainId) { - // For ETH messages and non-EIP155 chains the set should be [27, 28] for `v` - return Buffer.from(new BN(v).plus(27).toString(16), "hex"); - } + const { chainId, useEIP155, type } = txData; + // For EIP1559 and EIP2930 transactions, we want the recoveryParam (0 or 1) + // rather than the `v` value because the `chainId` is already included in the + // transaction payload. + if (type === 1 || type === 2) { + return ensureHexBuffer(v, true); // 0 or 1, with 0 expected as an empty buffer + } else if (!useEIP155 || !chainId) { + // For ETH messages and non-EIP155 chains the set should be [27, 28] for `v` + return Buffer.from(new BN(v).plus(27).toString(16), 'hex'); + } - // We will use EIP155 in most cases. Convert v to a bignum and operate on it. - // Note that the protocol calls for v = (CHAIN_ID*2) + 35/36, where 35 or 36 - // is decided on based on the ecrecover result. `v` is passed in as either 0 or 1 - // so we add 35 to that. - const chainIdBuf = getChainIdBuf(chainId); - const chainIdBN = new BN(chainIdBuf.toString("hex"), 16); - return ensureHexBuffer( - `0x${chainIdBN.times(2).plus(35).plus(v).toString(16)}`, - ); + // We will use EIP155 in most cases. Convert v to a bignum and operate on it. + // Note that the protocol calls for v = (CHAIN_ID*2) + 35/36, where 35 or 36 + // is decided on based on the ecrecover result. `v` is passed in as either 0 or 1 + // so we add 35 to that. + const chainIdBuf = getChainIdBuf(chainId); + const chainIdBN = new BN(chainIdBuf.toString('hex'), 16); + return ensureHexBuffer( + `0x${chainIdBN.times(2).plus(35).plus(v).toString(16)}`, + ); } const chainIds = { - mainnet: 1, - roptsten: 3, - rinkeby: 4, - kovan: 42, - goerli: 5, + mainnet: 1, + roptsten: 3, + rinkeby: 4, + kovan: 42, + goerli: 5, }; // Get a buffer containing the chainId value. // Returns a 1, 2, 4, or 8 byte buffer with the chainId encoded in big endian function getChainIdBuf(chainId) { - let b; - // If our chainID is a hex string, we can convert it to a hex - // buffer directly - if (true === isValidChainIdHexNumStr(chainId)) b = ensureHexBuffer(chainId); - // If our chainID is a base-10 number, parse with bignumber.js and convert to hex buffer - else b = ensureHexBuffer(`0x${new BN(chainId).toString(16)}`); - // Make sure the buffer is an allowed size - if (b.length > 8) throw new Error("ChainID provided is too large."); - // If this matches a u16, u32, or u64 size, return it now - if (b.length <= 2 || b.length === 4 || b.length === 8) return b; - // For other size buffers, we need to pack into u32 or u64 before returning; - let buf; - if (b.length === 3) { - buf = Buffer.alloc(4); - buf.writeUInt32BE(chainId); - } else if (b.length <= 8) { - buf = Buffer.alloc(8); - b.copy(buf, 8 - b.length); - } - return buf; + let b; + // If our chainID is a hex string, we can convert it to a hex + // buffer directly + if (true === isValidChainIdHexNumStr(chainId)) b = ensureHexBuffer(chainId); + // If our chainID is a base-10 number, parse with bignumber.js and convert to hex buffer + else b = ensureHexBuffer(`0x${new BN(chainId).toString(16)}`); + // Make sure the buffer is an allowed size + if (b.length > 8) throw new Error('ChainID provided is too large.'); + // If this matches a u16, u32, or u64 size, return it now + if (b.length <= 2 || b.length === 4 || b.length === 8) return b; + // For other size buffers, we need to pack into u32 or u64 before returning; + let buf; + if (b.length === 3) { + buf = Buffer.alloc(4); + buf.writeUInt32BE(chainId); + } else if (b.length <= 8) { + buf = Buffer.alloc(8); + b.copy(buf, 8 - b.length); + } + return buf; } // Determine if the chain uses EIP155 by default, based on the chainID function chainUsesEIP155(chainID) { - switch (chainID) { - case 3: // ropsten - case 4: // rinkeby - return false; - case 1: // mainnet - case 42: // kovan - case 5: // goerli - default: - // all others should use eip155 - return true; - } + switch (chainID) { + case 3: // ropsten + case 4: // rinkeby + return false; + case 1: // mainnet + case 42: // kovan + case 5: // goerli + default: + // all others should use eip155 + return true; + } } // Determine if a valid number was passed in as a hex string function isValidChainIdHexNumStr(s) { - if (typeof s !== "string") return false; - if (s.slice(0, 2) !== "0x") return false; - try { - const b = new BN(s, 16); - return b.isNaN() === false; - } catch (err) { - return false; - } + if (typeof s !== 'string') return false; + if (s.slice(0, 2) !== '0x') return false; + try { + const b = new BN(s, 16); + return b.isNaN() === false; + } catch (err) { + return false; + } } // If this is a nubmer that fits in one byte, we don't need to add it // to the `data` buffer of the main transaction. // Note the one edge case: we still need to use the `data` field for chainID=255. function useChainIdBuffer(id) { - const buf = getChainIdBuf(id); - if (buf.length === 1) return buf.readUInt8(0) === 255; - return true; + const buf = getChainIdBuf(id); + if (buf.length === 1) return buf.readUInt8(0) === 255; + return true; } function buildPersonalSignRequest(req, input) { - const MAX_BASE_MSG_SZ = input.fwConstants.ethMaxMsgSz; - const VAR_PATH_SZ = input.fwConstants.varAddrPathSzAllowed; - const L = 24 + MAX_BASE_MSG_SZ + 4; - let off = 0; - req.payload = Buffer.alloc(L); - req.payload.writeUInt8(ethMsgProtocol.SIGN_PERSONAL, 0); - off += 1; - // Write the signer path into the buffer - const signerPathBuf = buildSignerPathBuf(input.signerPath, VAR_PATH_SZ); - signerPathBuf.copy(req.payload, off); - off += signerPathBuf.length; - // Write the payload buffer. The payload can come in either as a buffer or as a string - let payload = input.payload; - // Determine if this is a hex string - let displayHex = false; - if (typeof input.payload === "string") { - if (input.payload.slice(0, 2) === "0x") { - payload = ensureHexBuffer(input.payload); - displayHex = - false === - ASCII_REGEX.test(Buffer.from(input.payload.slice(2), "hex").toString()); - } else { - if (false === isAsciiStr(input.payload)) - throw new Error( - "Currently, the Lattice can only display ASCII strings.", - ); - payload = Buffer.from(input.payload); - } - } else if (typeof input.displayHex === "boolean") { - // If this is a buffer and the user has specified whether or not this - // is a hex buffer with the optional argument, write that - displayHex = input.displayHex; - } else { - // Otherwise, determine if this buffer is an ASCII string. If it is, set `displayHex` accordingly. - // NOTE: THIS MEANS THAT NON-ASCII STRINGS WILL DISPLAY AS HEX SINCE WE CANNOT KNOW IF THE REQUESTER - // EXPECTED NON-ASCII CHARACTERS TO DISPLAY IN A STRING - // TODO: Develop a more elegant solution for this - if (!input.payload.toString) throw new Error("Unsupported input data type"); - displayHex = false === ASCII_REGEX.test(input.payload.toString()); - } - const fwConst = input.fwConstants; - let maxSzAllowed = - MAX_BASE_MSG_SZ + fwConst.extraDataMaxFrames * fwConst.extraDataFrameSz; - if (fwConst.personalSignHeaderSz) { - // Account for the personal_sign header string - maxSzAllowed -= fwConst.personalSignHeaderSz; - } - if (fwConst.ethMsgPreHashAllowed && payload.length > maxSzAllowed) { - // If this message will not fit and pre-hashing is allowed, do that - req.payload.writeUInt8(displayHex, off); - off += 1; - req.payload.writeUInt16LE(payload.length, off); - off += 2; - const prehash = Buffer.from( - keccak256( - Buffer.concat([get_personal_sign_prefix(payload.length), payload]), - ), - "hex", - ); - prehash.copy(req.payload, off); - req.prehash = prehash; - } else { - // Otherwise we can fit the payload. - // Flow data into extraData requests, which will follow-up transaction requests, if supported/applicable - const extraDataPayloads = getExtraData(payload, input); - // Write the payload and metadata into our buffer - req.extraDataPayloads = extraDataPayloads; - req.msg = payload; - req.payload.writeUInt8(displayHex, off); - off += 1; - req.payload.writeUInt16LE(payload.length, off); - off += 2; - payload.copy(req.payload, off); - } - return req; + const MAX_BASE_MSG_SZ = input.fwConstants.ethMaxMsgSz; + const VAR_PATH_SZ = input.fwConstants.varAddrPathSzAllowed; + const L = 24 + MAX_BASE_MSG_SZ + 4; + let off = 0; + req.payload = Buffer.alloc(L); + req.payload.writeUInt8(ethMsgProtocol.SIGN_PERSONAL, 0); + off += 1; + // Write the signer path into the buffer + const signerPathBuf = buildSignerPathBuf(input.signerPath, VAR_PATH_SZ); + signerPathBuf.copy(req.payload, off); + off += signerPathBuf.length; + // Write the payload buffer. The payload can come in either as a buffer or as a string + let payload = input.payload; + // Determine if this is a hex string + let displayHex = false; + if (typeof input.payload === 'string') { + if (input.payload.slice(0, 2) === '0x') { + payload = ensureHexBuffer(input.payload); + displayHex = + false === + ASCII_REGEX.test(Buffer.from(input.payload.slice(2), 'hex').toString()); + } else { + if (false === isAsciiStr(input.payload)) + throw new Error( + 'Currently, the Lattice can only display ASCII strings.', + ); + payload = Buffer.from(input.payload); + } + } else if (typeof input.displayHex === 'boolean') { + // If this is a buffer and the user has specified whether or not this + // is a hex buffer with the optional argument, write that + displayHex = input.displayHex; + } else { + // Otherwise, determine if this buffer is an ASCII string. If it is, set `displayHex` accordingly. + // NOTE: THIS MEANS THAT NON-ASCII STRINGS WILL DISPLAY AS HEX SINCE WE CANNOT KNOW IF THE REQUESTER + // EXPECTED NON-ASCII CHARACTERS TO DISPLAY IN A STRING + // TODO: Develop a more elegant solution for this + if (!input.payload.toString) throw new Error('Unsupported input data type'); + displayHex = false === ASCII_REGEX.test(input.payload.toString()); + } + const fwConst = input.fwConstants; + let maxSzAllowed = + MAX_BASE_MSG_SZ + fwConst.extraDataMaxFrames * fwConst.extraDataFrameSz; + if (fwConst.personalSignHeaderSz) { + // Account for the personal_sign header string + maxSzAllowed -= fwConst.personalSignHeaderSz; + } + if (fwConst.ethMsgPreHashAllowed && payload.length > maxSzAllowed) { + // If this message will not fit and pre-hashing is allowed, do that + req.payload.writeUInt8(displayHex, off); + off += 1; + req.payload.writeUInt16LE(payload.length, off); + off += 2; + const prehash = Buffer.from( + keccak256( + Buffer.concat([get_personal_sign_prefix(payload.length), payload]), + ), + 'hex', + ); + prehash.copy(req.payload, off); + req.prehash = prehash; + } else { + // Otherwise we can fit the payload. + // Flow data into extraData requests, which will follow-up transaction requests, if supported/applicable + const extraDataPayloads = getExtraData(payload, input); + // Write the payload and metadata into our buffer + req.extraDataPayloads = extraDataPayloads; + req.msg = payload; + req.payload.writeUInt8(displayHex, off); + off += 1; + req.payload.writeUInt16LE(payload.length, off); + off += 2; + payload.copy(req.payload, off); + } + return req; } function buildEIP712Request(req, input) { - const { ethMaxMsgSz, varAddrPathSzAllowed, eip712MaxTypeParams } = - input.fwConstants; - const { TYPED_DATA } = ethMsgProtocol; - const L = 24 + ethMaxMsgSz + 4; - let off = 0; - req.payload = Buffer.alloc(L); - req.payload.writeUInt8(TYPED_DATA.enumIdx, 0); - off += 1; - // Write the signer path - const signerPathBuf = buildSignerPathBuf( - input.signerPath, - varAddrPathSzAllowed, - ); - signerPathBuf.copy(req.payload, off); - off += signerPathBuf.length; - // Parse/clean the EIP712 payload, serialize with CBOR, and write to the payload - const data = JSON.parse(JSON.stringify(input.payload)); - if (!data.primaryType || !data.types[data.primaryType]) - throw new Error( - "primaryType must be specified and the type must be included.", - ); - if (!data.message || !data.domain) - throw new Error("message and domain must be specified."); - if (0 > Object.keys(data.types).indexOf("EIP712Domain")) - throw new Error("EIP712Domain type must be defined."); - // Parse the payload to ensure we have valid EIP712 data types and that - // they are encoded such that Lattice firmware can parse them. - // We need two different encodings: one to send to the Lattice in a format that plays - // nicely with our firmware CBOR decoder. The other is formatted to be consumable by - // our EIP712 validation module. - input.payload.message = parseEIP712Msg( - JSON.parse(JSON.stringify(data.message)), - JSON.parse(JSON.stringify(data.primaryType)), - JSON.parse(JSON.stringify(data.types)), - true, - ); - input.payload.domain = parseEIP712Msg( - JSON.parse(JSON.stringify(data.domain)), - "EIP712Domain", - JSON.parse(JSON.stringify(data.types)), - true, - ); - data.domain = parseEIP712Msg(data.domain, "EIP712Domain", data.types, false); - data.message = parseEIP712Msg( - data.message, - data.primaryType, - data.types, - false, - ); - // Now build the message to be sent to the Lattice - const payload = Buffer.from(cbor.encode(data)); - const fwConst = input.fwConstants; - const maxSzAllowed = - ethMaxMsgSz + fwConst.extraDataMaxFrames * fwConst.extraDataFrameSz; - // Determine if we need to prehash - let shouldPrehash = payload.length > maxSzAllowed; - Object.keys(data.types).forEach((k) => { - if (data.types[k].length > eip712MaxTypeParams) { - shouldPrehash = true; - } - }); - if (fwConst.ethMsgPreHashAllowed && shouldPrehash) { - // If this payload is too large to send, but the Lattice allows a prehashed message, do that - req.payload.writeUInt16LE(payload.length, off); - off += 2; - const prehash = TypedDataUtils.eip712Hash( - req.input.payload, - SignTypedDataVersion.V4, - ); - const prehashBuf = Buffer.from(prehash); - prehashBuf.copy(req.payload, off); - req.prehash = prehash; - } else { - const extraDataPayloads = getExtraData(payload, input); - req.extraDataPayloads = extraDataPayloads; - req.payload.writeUInt16LE(payload.length, off); - off += 2; - payload.copy(req.payload, off); - off += payload.length; - // Slice out the part of the buffer that we didn't use. - req.payload = req.payload.slice(0, off); - } - return req; + const { ethMaxMsgSz, varAddrPathSzAllowed, eip712MaxTypeParams } = + input.fwConstants; + const { TYPED_DATA } = ethMsgProtocol; + const L = 24 + ethMaxMsgSz + 4; + let off = 0; + req.payload = Buffer.alloc(L); + req.payload.writeUInt8(TYPED_DATA.enumIdx, 0); + off += 1; + // Write the signer path + const signerPathBuf = buildSignerPathBuf( + input.signerPath, + varAddrPathSzAllowed, + ); + signerPathBuf.copy(req.payload, off); + off += signerPathBuf.length; + // Parse/clean the EIP712 payload, serialize with CBOR, and write to the payload + const data = JSON.parse(JSON.stringify(input.payload)); + if (!data.primaryType || !data.types[data.primaryType]) + throw new Error( + 'primaryType must be specified and the type must be included.', + ); + if (!data.message || !data.domain) + throw new Error('message and domain must be specified.'); + if (0 > Object.keys(data.types).indexOf('EIP712Domain')) + throw new Error('EIP712Domain type must be defined.'); + // Parse the payload to ensure we have valid EIP712 data types and that + // they are encoded such that Lattice firmware can parse them. + // We need two different encodings: one to send to the Lattice in a format that plays + // nicely with our firmware CBOR decoder. The other is formatted to be consumable by + // our EIP712 validation module. + input.payload.message = parseEIP712Msg( + JSON.parse(JSON.stringify(data.message)), + JSON.parse(JSON.stringify(data.primaryType)), + JSON.parse(JSON.stringify(data.types)), + true, + ); + input.payload.domain = parseEIP712Msg( + JSON.parse(JSON.stringify(data.domain)), + 'EIP712Domain', + JSON.parse(JSON.stringify(data.types)), + true, + ); + data.domain = parseEIP712Msg(data.domain, 'EIP712Domain', data.types, false); + data.message = parseEIP712Msg( + data.message, + data.primaryType, + data.types, + false, + ); + // Now build the message to be sent to the Lattice + const payload = Buffer.from(cbor.encode(data)); + const fwConst = input.fwConstants; + const maxSzAllowed = + ethMaxMsgSz + fwConst.extraDataMaxFrames * fwConst.extraDataFrameSz; + // Determine if we need to prehash + let shouldPrehash = payload.length > maxSzAllowed; + Object.keys(data.types).forEach((k) => { + if (data.types[k].length > eip712MaxTypeParams) { + shouldPrehash = true; + } + }); + if (fwConst.ethMsgPreHashAllowed && shouldPrehash) { + // If this payload is too large to send, but the Lattice allows a prehashed message, do that + req.payload.writeUInt16LE(payload.length, off); + off += 2; + const prehash = TypedDataUtils.eip712Hash( + req.input.payload, + SignTypedDataVersion.V4, + ); + const prehashBuf = Buffer.from(prehash); + prehashBuf.copy(req.payload, off); + req.prehash = prehash; + } else { + const extraDataPayloads = getExtraData(payload, input); + req.extraDataPayloads = extraDataPayloads; + req.payload.writeUInt16LE(payload.length, off); + off += 2; + payload.copy(req.payload, off); + off += payload.length; + // Slice out the part of the buffer that we didn't use. + req.payload = req.payload.slice(0, off); + } + return req; } function getExtraData(payload, input) { - const { ethMaxMsgSz, extraDataFrameSz, extraDataMaxFrames } = - input.fwConstants; - const MAX_BASE_MSG_SZ = ethMaxMsgSz; - const EXTRA_DATA_ALLOWED = extraDataFrameSz > 0 && extraDataMaxFrames > 0; - const extraDataPayloads = []; - if (payload.length > MAX_BASE_MSG_SZ) { - // Determine sizes and run through sanity checks - const maxSzAllowed = - MAX_BASE_MSG_SZ + extraDataMaxFrames * extraDataFrameSz; - if (!EXTRA_DATA_ALLOWED) - throw new Error( - `Your message is ${payload.length} bytes, but can only be a maximum of ${MAX_BASE_MSG_SZ}`, - ); - else if (EXTRA_DATA_ALLOWED && payload.length > maxSzAllowed) - throw new Error( - `Your message is ${payload.length} bytes, but can only be a maximum of ${maxSzAllowed}`, - ); - // Split overflow data into extraData frames - const frames = splitFrames( - payload.slice(MAX_BASE_MSG_SZ), - extraDataFrameSz, - ); - frames.forEach((frame) => { - const szLE = Buffer.alloc(4); - szLE.writeUInt32LE(frame.length, 0); - extraDataPayloads.push(Buffer.concat([szLE, frame])); - }); - } - return extraDataPayloads; + const { ethMaxMsgSz, extraDataFrameSz, extraDataMaxFrames } = + input.fwConstants; + const MAX_BASE_MSG_SZ = ethMaxMsgSz; + const EXTRA_DATA_ALLOWED = extraDataFrameSz > 0 && extraDataMaxFrames > 0; + const extraDataPayloads = []; + if (payload.length > MAX_BASE_MSG_SZ) { + // Determine sizes and run through sanity checks + const maxSzAllowed = + MAX_BASE_MSG_SZ + extraDataMaxFrames * extraDataFrameSz; + if (!EXTRA_DATA_ALLOWED) + throw new Error( + `Your message is ${payload.length} bytes, but can only be a maximum of ${MAX_BASE_MSG_SZ}`, + ); + else if (EXTRA_DATA_ALLOWED && payload.length > maxSzAllowed) + throw new Error( + `Your message is ${payload.length} bytes, but can only be a maximum of ${maxSzAllowed}`, + ); + // Split overflow data into extraData frames + const frames = splitFrames( + payload.slice(MAX_BASE_MSG_SZ), + extraDataFrameSz, + ); + frames.forEach((frame) => { + const szLE = Buffer.alloc(4); + szLE.writeUInt32LE(frame.length, 0); + extraDataPayloads.push(Buffer.concat([szLE, frame])); + }); + } + return extraDataPayloads; } function parseEIP712Msg(msg, typeName, types, forJSParser = false) { - const type = types[typeName]; - type.forEach((item) => { - const isArrayType = item.type.indexOf("[") > -1; - const singularType = isArrayType - ? item.type.slice(0, item.type.indexOf("[")) - : item.type; - const isCustomType = Object.keys(types).indexOf(singularType) > -1; - if (isCustomType && Array.isArray(msg)) { - // For custom types we need to jump into the `msg` using the key (name of type) and - // parse that entire sub-struct as if it were a message. - // We will recurse into sub-structs until we reach a level where every item is an - // elementary (i.e. non-custom) type. - // For arrays, we need to loop through each message item. - for (let i = 0; i < msg.length; i++) { - msg[i][item.name] = parseEIP712Msg( - msg[i][item.name], - singularType, - types, - forJSParser, - ); - } - } else if (isCustomType) { - // Not an array means we can jump directly into the sub-struct to convert - msg[item.name] = parseEIP712Msg( - msg[item.name], - singularType, - types, - forJSParser, - ); - } else if (Array.isArray(msg)) { - // If we have an array for this particular type and the type we are parsing - // is *not* a custom type, loop through the array elements and convert the types. - for (let i = 0; i < msg.length; i++) { - if (isArrayType) { - // If this type is itself an array, loop through those elements and parse individually. - // This code is not reachable for custom types so we assume these are arrays of - // elementary types. - for (let j = 0; j < msg[i][item.name].length; j++) { - msg[i][item.name][j] = parseEIP712Item( - msg[i][item.name][j], - singularType, - forJSParser, - ); - } - } else { - // Non-arrays parse + replace one value for the elementary type - msg[i][item.name] = parseEIP712Item( - msg[i][item.name], - singularType, - forJSParser, - ); - } - } - } else if (isArrayType) { - // If we have an elementary array type and a non-array message level, - //loop through the array and parse + replace each item individually. - for (let i = 0; i < msg[item.name].length; i++) { - msg[item.name][i] = parseEIP712Item( - msg[item.name][i], - singularType, - forJSParser, - ); - } - } else { - // If this is a singular elementary type, simply parse + replace. - msg[item.name] = parseEIP712Item( - msg[item.name], - singularType, - forJSParser, - ); - } - }); + const type = types[typeName]; + type.forEach((item) => { + const isArrayType = item.type.indexOf('[') > -1; + const singularType = isArrayType + ? item.type.slice(0, item.type.indexOf('[')) + : item.type; + const isCustomType = Object.keys(types).indexOf(singularType) > -1; + if (isCustomType && Array.isArray(msg)) { + // For custom types we need to jump into the `msg` using the key (name of type) and + // parse that entire sub-struct as if it were a message. + // We will recurse into sub-structs until we reach a level where every item is an + // elementary (i.e. non-custom) type. + // For arrays, we need to loop through each message item. + for (let i = 0; i < msg.length; i++) { + msg[i][item.name] = parseEIP712Msg( + msg[i][item.name], + singularType, + types, + forJSParser, + ); + } + } else if (isCustomType) { + // Not an array means we can jump directly into the sub-struct to convert + msg[item.name] = parseEIP712Msg( + msg[item.name], + singularType, + types, + forJSParser, + ); + } else if (Array.isArray(msg)) { + // If we have an array for this particular type and the type we are parsing + // is *not* a custom type, loop through the array elements and convert the types. + for (let i = 0; i < msg.length; i++) { + if (isArrayType) { + // If this type is itself an array, loop through those elements and parse individually. + // This code is not reachable for custom types so we assume these are arrays of + // elementary types. + for (let j = 0; j < msg[i][item.name].length; j++) { + msg[i][item.name][j] = parseEIP712Item( + msg[i][item.name][j], + singularType, + forJSParser, + ); + } + } else { + // Non-arrays parse + replace one value for the elementary type + msg[i][item.name] = parseEIP712Item( + msg[i][item.name], + singularType, + forJSParser, + ); + } + } + } else if (isArrayType) { + // If we have an elementary array type and a non-array message level, + //loop through the array and parse + replace each item individually. + for (let i = 0; i < msg[item.name].length; i++) { + msg[item.name][i] = parseEIP712Item( + msg[item.name][i], + singularType, + forJSParser, + ); + } + } else { + // If this is a singular elementary type, simply parse + replace. + msg[item.name] = parseEIP712Item( + msg[item.name], + singularType, + forJSParser, + ); + } + }); - return msg; + return msg; } function parseEIP712Item(data, type, forJSParser = false) { - if (type === "bytes") { - // Variable sized bytes need to be buffer type - data = ensureHexBuffer(data); - if (forJSParser) { - // For EIP712 encoding module it's easier to encode hex strings - data = `0x${data.toString("hex")}`; - } - } else if (type.slice(0, 5) === "bytes") { - // Fixed sizes bytes need to be buffer type. We also add some sanity checks. - const nBytes = Number.parseInt(type.slice(5)); - data = ensureHexBuffer(data); - if (data.length !== nBytes) - throw new Error(`Expected ${type} type, but got ${data.length} bytes`); - if (forJSParser) { - // For EIP712 encoding module it's easier to encode hex strings - data = `0x${data.toString("hex")}`; - } - } else if (type === "address") { - // Address must be a 20 byte buffer - data = ensureHexBuffer(data); - // Edge case to handle the 0-address - if (data.length === 0) { - data = Buffer.alloc(20); - } - if (data.length !== 20) - throw new Error( - `Address type must be 20 bytes, but got ${data.length} bytes`, - ); - // For EIP712 encoding module it's easier to encode hex strings - if (forJSParser) { - data = `0x${data.toString("hex")}`; - } - } else if ( - ethMsgProtocol.TYPED_DATA.typeCodes[type] && - type.indexOf("uint") === -1 && - type.indexOf("int") > -1 - ) { - // Handle signed integers using bignumber.js directly - // `bignumber.js` is needed for `cbor` encoding, which gets sent to the Lattice and plays - // nicely with its firmware cbor lib. - // NOTE: If we instantiate a `bignumber.js` object, it will not match what `borc` creates - // when run inside of the browser (i.e. MetaMask). Thus we introduce this hack to make sure - // we are creating a compatible type. - // TODO: Find another cbor lib that is compataible with the firmware's lib in a browser - // context. This is surprisingly difficult - I tried several libs and only cbor/borc have - // worked (borc is a supposedly "browser compatible" version of cbor) - data = new BN(data); - } else if ( - ethMsgProtocol.TYPED_DATA.typeCodes[type] && - (type.indexOf("uint") > -1 || type.indexOf("int") > -1) - ) { - // For uints, convert to a buffer and do some sanity checking. - // Note that we could probably just use bignumber.js directly as we do with - // signed ints, but this code is battle tested and we don't want to change it. - let b = ensureHexBuffer(data); - // Edge case to handle 0-value bignums - if (b.length === 0) { - b = Buffer.from("00", "hex"); - } - // Uint256s should be encoded as bignums. - if (forJSParser) { - // For EIP712 encoding in this module we need strings to represent the numbers - data = `0x${b.toString("hex")}`; - } else { - // Load into bignumber.js used by cbor lib - data = new BN(b.toString("hex"), 16); - } - } else if (type === "bool") { - // Booleans need to be cast to a u8 - data = data === true ? 1 : 0; - } - // Other types don't need to be modified - return data; + if (type === 'bytes') { + // Variable sized bytes need to be buffer type + data = ensureHexBuffer(data); + if (forJSParser) { + // For EIP712 encoding module it's easier to encode hex strings + data = `0x${data.toString('hex')}`; + } + } else if (type.slice(0, 5) === 'bytes') { + // Fixed sizes bytes need to be buffer type. We also add some sanity checks. + const nBytes = Number.parseInt(type.slice(5)); + data = ensureHexBuffer(data); + if (data.length !== nBytes) + throw new Error(`Expected ${type} type, but got ${data.length} bytes`); + if (forJSParser) { + // For EIP712 encoding module it's easier to encode hex strings + data = `0x${data.toString('hex')}`; + } + } else if (type === 'address') { + // Address must be a 20 byte buffer + data = ensureHexBuffer(data); + // Edge case to handle the 0-address + if (data.length === 0) { + data = Buffer.alloc(20); + } + if (data.length !== 20) + throw new Error( + `Address type must be 20 bytes, but got ${data.length} bytes`, + ); + // For EIP712 encoding module it's easier to encode hex strings + if (forJSParser) { + data = `0x${data.toString('hex')}`; + } + } else if ( + ethMsgProtocol.TYPED_DATA.typeCodes[type] && + type.indexOf('uint') === -1 && + type.indexOf('int') > -1 + ) { + // Handle signed integers using bignumber.js directly + // `bignumber.js` is needed for `cbor` encoding, which gets sent to the Lattice and plays + // nicely with its firmware cbor lib. + // NOTE: If we instantiate a `bignumber.js` object, it will not match what `borc` creates + // when run inside of the browser (i.e. MetaMask). Thus we introduce this hack to make sure + // we are creating a compatible type. + // TODO: Find another cbor lib that is compataible with the firmware's lib in a browser + // context. This is surprisingly difficult - I tried several libs and only cbor/borc have + // worked (borc is a supposedly "browser compatible" version of cbor) + data = new BN(data); + } else if ( + ethMsgProtocol.TYPED_DATA.typeCodes[type] && + (type.indexOf('uint') > -1 || type.indexOf('int') > -1) + ) { + // For uints, convert to a buffer and do some sanity checking. + // Note that we could probably just use bignumber.js directly as we do with + // signed ints, but this code is battle tested and we don't want to change it. + let b = ensureHexBuffer(data); + // Edge case to handle 0-value bignums + if (b.length === 0) { + b = Buffer.from('00', 'hex'); + } + // Uint256s should be encoded as bignums. + if (forJSParser) { + // For EIP712 encoding in this module we need strings to represent the numbers + data = `0x${b.toString('hex')}`; + } else { + // Load into bignumber.js used by cbor lib + data = new BN(b.toString('hex'), 16); + } + } else if (type === 'bool') { + // Booleans need to be cast to a u8 + data = data === true ? 1 : 0; + } + // Other types don't need to be modified + return data; } function get_personal_sign_prefix(L) { - return Buffer.from( - `\u0019Ethereum Signed Message:\n${L.toString()}`, - "utf-8", - ); + return Buffer.from( + `\u0019Ethereum Signed Message:\n${L.toString()}`, + 'utf-8', + ); } function get_rlp_encoded_preimage(rawTx, txType) { - if (txType) { - return Buffer.concat([ - Buffer.from([txType]), - Buffer.from(RLP.encode(rawTx)), - ]); - } else { - return Buffer.from(RLP.encode(rawTx)); - } + if (txType) { + return Buffer.concat([ + Buffer.from([txType]), + Buffer.from(RLP.encode(rawTx)), + ]); + } else { + return Buffer.from(RLP.encode(rawTx)); + } } // ====== @@ -958,72 +958,72 @@ function get_rlp_encoded_preimage(rawTx, txType) { // NOTE: Once we deprecate, we will remove this entire file // ====== const ethConvertLegacyToGenericReq = (req) => { - let common; - if (!req.chainId || ensureHexBuffer(req.chainId).toString("hex") === "01") { - common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.London }); - } else { - // Not every network will support these EIPs but we will allow - // signing of transactions using them - common = Common.custom( - { chainId: Number(req.chainId) }, - { hardfork: Hardfork.London, eips: [1559, 2930] }, - ); - } - const tx = TransactionFactory.fromTxData(req, { common }); - // Get the raw transaction payload to be hashed and signed. - // Different `@ethereumjs/tx` Transaction object types have - // slightly different APIs around this. - if (req.type) { - // Newer transaction types - return tx.getMessageToSign(); - } else { - // Legacy transaction type - return Buffer.from(RLP.encode(tx.getMessageToSign())); - } + let common; + if (!req.chainId || ensureHexBuffer(req.chainId).toString('hex') === '01') { + common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.London }); + } else { + // Not every network will support these EIPs but we will allow + // signing of transactions using them + common = Common.custom( + { chainId: Number(req.chainId) }, + { hardfork: Hardfork.London, eips: [1559, 2930] }, + ); + } + const tx = TransactionFactory.fromTxData(req, { common }); + // Get the raw transaction payload to be hashed and signed. + // Different `@ethereumjs/tx` Transaction object types have + // slightly different APIs around this. + if (req.type) { + // Newer transaction types + return tx.getMessageToSign(); + } else { + // Legacy transaction type + return Buffer.from(RLP.encode(tx.getMessageToSign())); + } }; // Convert an ethers `TransactionRequest` to a viem `TransactionSerializable` export const toViemTransaction = ( - tx: TransactionRequest, + tx: TransactionRequest, ): TransactionSerializable => { - const base = { - to: tx.to as `0x${string}`, - value: tx.value ? BigInt(tx.value) : undefined, - data: tx.data as `0x${string}`, - nonce: tx.nonce, - gas: tx.gasLimit ? BigInt(tx.gasLimit) : undefined, - }; + const base = { + to: tx.to as `0x${string}`, + value: tx.value ? BigInt(tx.value) : undefined, + data: tx.data as `0x${string}`, + nonce: tx.nonce, + gas: tx.gasLimit ? BigInt(tx.gasLimit) : undefined, + }; - if (tx.type === TRANSACTION_TYPE.EIP1559) { - return { - ...base, - type: "eip1559", - maxFeePerGas: tx.maxFeePerGas ? BigInt(tx.maxFeePerGas) : undefined, - maxPriorityFeePerGas: tx.maxPriorityFeePerGas - ? BigInt(tx.maxPriorityFeePerGas) - : undefined, - chainId: tx.chainId, - accessList: tx.accessList?.map((item) => ({ - address: item.address as `0x${string}`, - storageKeys: item.storageKeys as `0x${string}`[], - })), - }; - } + if (tx.type === TRANSACTION_TYPE.EIP1559) { + return { + ...base, + type: 'eip1559', + maxFeePerGas: tx.maxFeePerGas ? BigInt(tx.maxFeePerGas) : undefined, + maxPriorityFeePerGas: tx.maxPriorityFeePerGas + ? BigInt(tx.maxPriorityFeePerGas) + : undefined, + chainId: tx.chainId, + accessList: tx.accessList?.map((item) => ({ + address: item.address as `0x${string}`, + storageKeys: item.storageKeys as `0x${string}`[], + })), + }; + } - return { - ...base, - gasPrice: tx.maxFeePerGas ? BigInt(tx.maxFeePerGas) : undefined, - }; + return { + ...base, + gasPrice: tx.maxFeePerGas ? BigInt(tx.maxFeePerGas) : undefined, + }; }; export default { - buildEthereumMsgRequest, - validateEthereumMsgResponse, - buildEthereumTxRequest, - buildEthRawTx, - hashTransaction, - chainIds, - ensureHexBuffer, + buildEthereumMsgRequest, + validateEthereumMsgResponse, + buildEthereumTxRequest, + buildEthRawTx, + hashTransaction, + chainIds, + ensureHexBuffer, - ethConvertLegacyToGenericReq, + ethConvertLegacyToGenericReq, };