@metamask-previews/keyring-api 23.2.0-c42f34c → 23.2.0-e5bc458
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/api/account.d.cts +2 -2
- package/dist/api/account.d.mts +2 -2
- package/dist/api/asset.d.cts +2 -2
- package/dist/api/asset.d.mts +2 -2
- package/dist/api/request.d.cts +3 -3
- package/dist/api/request.d.mts +3 -3
- package/dist/api/response.d.cts +1 -1
- package/dist/api/response.d.mts +1 -1
- package/dist/api/transaction.cjs +19 -3
- package/dist/api/transaction.cjs.map +1 -1
- package/dist/api/transaction.d.cts +109 -77
- package/dist/api/transaction.d.cts.map +1 -1
- package/dist/api/transaction.d.mts +109 -77
- package/dist/api/transaction.d.mts.map +1 -1
- package/dist/api/transaction.mjs +19 -3
- package/dist/api/transaction.mjs.map +1 -1
- package/dist/btc/types.d.cts +8 -8
- package/dist/btc/types.d.mts +8 -8
- package/dist/eth/erc4337/types.d.cts +3 -3
- package/dist/eth/erc4337/types.d.mts +3 -3
- package/dist/eth/rpc/params.d.cts +29 -29
- package/dist/eth/rpc/params.d.mts +29 -29
- package/dist/eth/types.d.cts +4 -4
- package/dist/eth/types.d.mts +4 -4
- package/dist/events.d.cts +59 -56
- package/dist/events.d.cts.map +1 -1
- package/dist/events.d.mts +59 -56
- package/dist/events.d.mts.map +1 -1
- package/dist/rpc.d.cts +137 -131
- package/dist/rpc.d.cts.map +1 -1
- package/dist/rpc.d.mts +137 -131
- package/dist/rpc.d.mts.map +1 -1
- package/dist/sol/types.d.cts +2 -2
- package/dist/sol/types.d.mts +2 -2
- package/dist/trx/types.d.cts +2 -2
- package/dist/trx/types.d.mts +2 -2
- package/dist/v2/api/create-account/bip44.d.cts +1 -1
- package/dist/v2/api/create-account/bip44.d.mts +1 -1
- package/dist/v2/api/create-account/index.d.cts +1 -1
- package/dist/v2/api/create-account/index.d.mts +1 -1
- package/dist/v2/api/keyring-rpc.d.cts +28 -28
- package/dist/v2/api/keyring-rpc.d.mts +28 -28
- package/dist/xlm/types.d.cts +2 -2
- package/dist/xlm/types.d.mts +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.mjs","sourceRoot":"","sources":["../../src/api/transaction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,gCAAgC;AAE5E,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,8BAA8B;AAE/E,OAAO,EAAE,WAAW,EAAE,oBAAgB;AACtC,OAAO,EAAE,iBAAiB,EAAE,mBAAe;AAG3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,iBAAiB,GAAG,MAAM,CAAC;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE;IAEjB;;OAEG;IACH,KAAK,EAAE,QAAQ,CAAC,WAAW,CAAC;CAC7B,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAN,IAAY,OAiBX;AAjBD,WAAY,OAAO;IACjB;;;;;;OAMG;IACH,wBAAa,CAAA;IAEb;;;;;OAKG;IACH,gCAAqB,CAAA;AACvB,CAAC,EAjBW,OAAO,KAAP,OAAO,QAiBlB;AAED;;GAEG;AACH,MAAM,SAAS,GAAG,MAAM,CAAC;IACvB;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEvD;;OAEG;IACH,KAAK,EAAE,WAAW;CACnB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAN,IAAY,iBAsBX;AAtBD,WAAY,iBAAiB;IAC3B;;;OAGG;IACH,4CAAuB,CAAA;IAEvB;;;OAGG;IACH,gDAA2B,CAAA;IAE3B;;OAEG;IACH,4CAAuB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,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IAEtB;;;;;OAKG;IACH,MAAM,EAAE,KAAK,CAAC,sBAAsB,CAAC;IAErC;;;;;;OAMG;IACH,OAAO,EAAE,aAAa,CAAC,wBAAwB,CAAC;CACjD,CAAC,CAAC;AAgBH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC;IAC3C;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAE9B;;;OAGG;IACH,IAAI,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;CACzB,CAAC,CAAC","sourcesContent":["import type { InferEquals } from '@metamask/keyring-utils';\nimport { exactOptional, object, UuidStruct } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { array, enums, nullable, number, string } from '@metamask/superstruct';\n\nimport { AssetStruct } from './asset';\nimport { CaipChainIdStruct } from './caip';\nimport type { Paginated } from './pagination';\n\n/**\n * This struct represents a participant in a transaction.\n *\n * @example\n * ```ts\n * {\n * address: '0x1234...',\n * asset: {\n * fungible: true,\n * type: 'eip155:1/slip44:60',\n * unit: 'ETH',\n * amount: '0.01',\n * },\n * },\n * ```\n *\n * @example\n * ```ts\n * {\n * address: '0x1234...',\n * asset: {\n * fungible: false,\n * id: 'eip155:1/erc721:0x06012c8cf97BEaD5deAe237070F9587f8E7A266d/771769',\n * },\n * },\n * ```\n *\n * @example\n * ```ts\n * {\n * address: '0x1234...',\n * asset: null,\n * },\n * ```\n */\nconst ParticipantStruct = object({\n /**\n * Participant address.\n */\n address: string(),\n\n /**\n * Asset being transferred.\n */\n asset: nullable(AssetStruct),\n});\n\n/**\n * Fee types.\n */\nexport enum FeeType {\n /**\n * Base fee. It is the minimum fee required to include a transaction in the\n * blockchain.\n *\n * For non-confirmed transactions, it must be the maximum base fee. For\n * confirmed transactions, it must be the actual base fee paid.\n */\n Base = 'base',\n\n /**\n * Priority fee. It is an optional fee used to prioritize the transaction.\n *\n * For non-confirmed transactions, it must be the maximum priority fee. For\n * confirmed transactions, it must be the actual priority fee paid.\n */\n Priority = 'priority',\n}\n\n/**\n * This struct represents a transaction fee.\n */\nconst FeeStruct = object({\n /**\n * Fee type {@see FeeType}.\n */\n type: enums([`${FeeType.Base}`, `${FeeType.Priority}`]),\n\n /**\n * Asset used to pay for the fee.\n */\n asset: AssetStruct,\n});\n\n/**\n * Transaction statuses.\n */\nexport enum TransactionStatus {\n /**\n * The transaction has been submitted but is not yet in the\n * blockchain. For example, it can be in the mempool.\n */\n Submitted = 'submitted',\n\n /**\n * The transaction is in the blockchain but has not been\n * confirmed yet.\n */\n Unconfirmed = 'unconfirmed',\n\n /**\n * The transaction has been confirmed.\n */\n Confirmed = 'confirmed',\n\n /**\n * The transaction has failed. For example, it has been reverted.\n */\n Failed = 'failed',\n}\n\n/**\n * Transaction types.\n */\nexport enum TransactionType {\n /**\n * The transaction was originated by the account. If the transaction\n * has a change output that goes back to the same account, it must be tagged\n * as a send transaction.\n */\n Send = 'send',\n\n /**\n * The transaction was received by the account, but originated by\n * another account.\n */\n Receive = 'receive',\n\n /**\n * The transaction is a swap. It decreases the balance of one asset and\n * increases the balance of another asset in a single transaction.\n *\n * A swap transaction must be originated by the account.\n */\n Swap = 'swap',\n\n /**\n * Represents an outgoing bridge transaction, transferring assets from\n * the account to another blockchain.\n */\n BridgeSend = 'bridge:send',\n\n /**\n * Represents an incoming bridge transaction, transferring assets from\n * another blockchain to the account.\n */\n BridgeReceive = 'bridge:receive',\n\n /**\n * Represents a stake deposit transaction.\n */\n StakeDeposit = 'stake:deposit',\n\n /**\n * Represents a stake withdrawal transaction.\n */\n StakeWithdraw = 'stake:withdraw',\n\n /**\n * Represents a token approval transaction.\n */\n TokenApprove = 'token:approve',\n\n /**\n * The transaction type is unknown. It's not possible to determine the\n * transaction type based on the information available.\n */\n Unknown = 'unknown',\n}\n\n/**\n * Security alert response values from the Security Alert API.\n */\nexport enum SecurityAlertResponse {\n /**\n * The transaction is considered safe with no detected security issues.\n */\n Benign = 'Benign',\n\n /**\n * The transaction has potential security concerns that warrant user attention.\n */\n Warning = 'Warning',\n\n /**\n * The transaction has been identified as malicious and should be avoided.\n */\n Malicious = 'Malicious',\n}\n\n/**\n * This struct represents additional transaction details.\n *\n * @example\n * ```ts\n * {\n * origin: 'https://dapp.example.com',\n * securityAlertResponse: 'Benign',\n * }\n * ```\n *\n * @example\n * ```ts\n * {\n * origin: 'metamask',\n * securityAlertResponse: 'Warning',\n * }\n * ```\n */\nexport const TransactionDetailsStruct = object({\n /**\n * Origin of the original transaction request.\n *\n * This can be either 'metamask' for internally initiated transactions, or a URL\n * (e.g., 'https://dapp.example.com') for dapp-initiated transactions.\n */\n origin: exactOptional(string()),\n\n /**\n * Response from the Security Alert API indicating the security assessment of the\n * transaction.\n */\n securityAlertResponse: exactOptional(\n enums([\n `${SecurityAlertResponse.Benign}`,\n `${SecurityAlertResponse.Warning}`,\n `${SecurityAlertResponse.Malicious}`,\n ]),\n ),\n});\n\n/**\n * This struct represents a transaction event.\n */\nexport const TransactionEventStruct = object({\n /**\n * New status of the transaction.\n */\n status: enums([\n `${TransactionStatus.Submitted}`,\n `${TransactionStatus.Unconfirmed}`,\n `${TransactionStatus.Confirmed}`,\n `${TransactionStatus.Failed}`,\n ]),\n\n /**\n * UNIX timestamp of when the event occurred.\n */\n timestamp: nullable(number()),\n});\n\n/**\n * This struct represents a blockchain transaction.\n *\n * @example\n * ```ts\n * const tx = {\n * id: 'f5d8ee39a430901c91a5917b9f2dc19d6d1a0e9cea205b009ca73dd04470b9a6',\n * chain: 'bip122:000000000019d6689c085ae165831e93',\n * account: 'b9beb861-9761-4b97-89ce-d992be5f34da',\n * status: 'confirmed',\n * timestamp: 1716367781,\n * type: 'send',\n * from: [\n * {\n * address: 'bc1qrp0yzgkf8rawkuvdlhnjfj2fnjwm0m8727kgah',\n * asset: {\n * fungible: true,\n * type: 'bip122:000000000019d6689c085ae165831e93/slip44:0',\n * unit: 'BTC',\n * amount: '0.1',\n * },\n * },\n * ],\n * to: [\n * {\n * address: 'bc1qrp0yzgkf8rawkuvdlhnjfj2fnjwm0m8727kgah',\n * asset: {\n * fungible: true,\n * type: 'bip122:000000000019d6689c085ae165831e93/slip44:0',\n * unit: 'BTC',\n * amount: '0.1',\n * },\n * },\n * {\n * address: 'bc1qwl8399fz829uqvqly9tcatgrgtwp3udnhxfq4k',\n * asset: {\n * fungible: true,\n * type: 'bip122:000000000019d6689c085ae165831e93/slip44:0',\n * unit: 'BTC',\n * amount: '0.1',\n * },\n * },\n * ],\n * fees: [\n * {\n * type: 'priority',\n * asset: {\n * fungible: true,\n * type: 'bip122:000000000019d6689c085ae165831e93/slip44:0',\n * unit: 'BTC',\n * amount: '0.1',\n * },\n * },\n * ],\n * };\n * ```\n */\nexport const TransactionStruct = object({\n /**\n * Chain-specific transaction ID.\n */\n id: string(),\n\n /**\n * Chain ID (CAIP-2).\n */\n chain: CaipChainIdStruct,\n\n /**\n * Account ID (UUIDv4).\n */\n account: UuidStruct,\n\n /**\n * Transaction status {@see TransactionStatus}.\n */\n status: enums([\n `${TransactionStatus.Submitted}`,\n `${TransactionStatus.Unconfirmed}`,\n `${TransactionStatus.Confirmed}`,\n `${TransactionStatus.Failed}`,\n ]),\n\n /**\n * UNIX timestamp of when the transaction was added to the blockchain. The\n * timestamp can be null if the transaction has not been included in the\n * blockchain yet.\n */\n timestamp: nullable(number()),\n\n /**\n * Transaction type {@see TransactionType}. This will be used by MetaMask to enrich the transaction\n * details on the UI.\n */\n type: enums([\n `${TransactionType.Send}`,\n `${TransactionType.Receive}`,\n `${TransactionType.Swap}`,\n `${TransactionType.BridgeSend}`,\n `${TransactionType.BridgeReceive}`,\n `${TransactionType.StakeDeposit}`,\n `${TransactionType.StakeWithdraw}`,\n `${TransactionType.TokenApprove}`,\n `${TransactionType.Unknown}`,\n ]),\n\n /**\n * Transaction sender addresses and amounts.\n */\n from: array(ParticipantStruct),\n\n /**\n * Transaction receiver addresses and amounts.\n */\n to: array(ParticipantStruct),\n\n /**\n * Total transaction fee.\n */\n fees: array(FeeStruct),\n\n /**\n * List of events related to the transaction {@see TransactionEventStruct}.\n *\n * The events are tracked in a best-effort basis and may not be available for\n * all transactions.\n */\n events: array(TransactionEventStruct),\n\n /**\n * Additional transaction details {@see TransactionDetailsStruct}.\n *\n * Contains contextual information about the transaction such as its origin and\n * security assessment. This field is optional and may not be present for all\n * transactions.\n */\n details: exactOptional(TransactionDetailsStruct),\n});\n\n/**\n * Transaction details object.\n *\n * See {@link TransactionDetailsStruct}.\n */\nexport type TransactionDetails = Infer<typeof TransactionDetailsStruct>;\n\n/**\n * Transaction object.\n *\n * See {@link TransactionStruct}.\n */\nexport type Transaction = Infer<typeof TransactionStruct>;\n\n/**\n * This struct represents a page of transactions.\n *\n * @example\n * ```ts\n * {\n * data: [\n * {\n * // Transaction object\n * }\n * ],\n * next: 'c3y1Q6QtqtstbxKX+oqVdEW6',\n * }\n * ```\n *\n * @example\n * ```ts\n * {\n * data: [\n * {\n * // Transaction object\n * }\n * ],\n * next: null, // No more results\n * }**\n * ```\n */\nexport const TransactionsPageStruct = object({\n /**\n * List of transactions.\n */\n data: array(TransactionStruct),\n\n /**\n * Next cursor to iterate over the results. If null, there are no more\n * results.\n */\n next: nullable(string()),\n});\n\n/**\n * Transactions page object.\n *\n * See {@link TransactionsPageStruct}.\n */\nexport type TransactionsPage = InferEquals<\n typeof TransactionsPageStruct,\n Paginated<Transaction>\n>;\n"]}
|
|
1
|
+
{"version":3,"file":"transaction.mjs","sourceRoot":"","sources":["../../src/api/transaction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,gCAAgC;AAE5E,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,8BAA8B;AAE/E,OAAO,EAAE,WAAW,EAAE,oBAAgB;AACtC,OAAO,EAAE,i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,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAE9B;;;OAGG;IACH,IAAI,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;CACzB,CAAC,CAAC","sourcesContent":["import type { InferEquals } from '@metamask/keyring-utils';\nimport { exactOptional, object, UuidStruct } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { array, enums, nullable, number, string } from '@metamask/superstruct';\n\nimport { AssetStruct } from './asset';\nimport { CaipChainIdStruct } from './caip';\nimport type { Paginated } from './pagination';\n\n/**\n * This struct represents a participant in a transaction.\n *\n * @example\n * ```ts\n * {\n * address: '0x1234...',\n * asset: {\n * fungible: true,\n * type: 'eip155:1/slip44:60',\n * unit: 'ETH',\n * amount: '0.01',\n * },\n * },\n * ```\n *\n * @example\n * ```ts\n * {\n * address: '0x1234...',\n * asset: {\n * fungible: false,\n * id: 'eip155:1/erc721:0x06012c8cf97BEaD5deAe237070F9587f8E7A266d/771769',\n * },\n * },\n * ```\n *\n * @example\n * ```ts\n * {\n * address: '0x1234...',\n * asset: null,\n * },\n * ```\n */\nconst ParticipantStruct = object({\n /**\n * Participant address.\n */\n address: string(),\n\n /**\n * Asset being transferred.\n */\n asset: nullable(AssetStruct),\n});\n\n/**\n * Fee types.\n */\nexport enum FeeType {\n /**\n * Base fee. It is the minimum fee required to include a transaction in the\n * blockchain.\n *\n * For non-confirmed transactions, it must be the maximum base fee. For\n * confirmed transactions, it must be the actual base fee paid.\n */\n Base = 'base',\n\n /**\n * Priority fee. It is an optional fee used to prioritize the transaction.\n *\n * For non-confirmed transactions, it must be the maximum priority fee. For\n * confirmed transactions, it must be the actual priority fee paid.\n */\n Priority = 'priority',\n}\n\n/**\n * This struct represents a transaction fee.\n */\nconst FeeStruct = object({\n /**\n * Fee type {@see FeeType}.\n */\n type: enums([`${FeeType.Base}`, `${FeeType.Priority}`]),\n\n /**\n * Asset used to pay for the fee.\n */\n asset: AssetStruct,\n});\n\n/**\n * Transaction statuses.\n */\nexport enum TransactionStatus {\n /**\n * The transaction has been submitted but is not yet in the\n * blockchain. For example, it can be in the mempool.\n */\n Submitted = 'submitted',\n\n /**\n * The transaction is in the blockchain but has not been\n * confirmed yet.\n */\n Unconfirmed = 'unconfirmed',\n\n /**\n * The transaction has been confirmed.\n */\n Confirmed = 'confirmed',\n\n /**\n * The transaction has failed. For example, it has been reverted.\n */\n Failed = 'failed',\n}\n\n/**\n * Transaction types.\n */\nexport enum TransactionType {\n /**\n * The transaction was originated by the account. If the transaction\n * has a change output that goes back to the same account, it must be tagged\n * as a send transaction.\n */\n Send = 'send',\n\n /**\n * The transaction was received by the account, but originated by\n * another account.\n */\n Receive = 'receive',\n\n /**\n * The transaction is a swap. It decreases the balance of one asset and\n * increases the balance of another asset in a single transaction.\n *\n * A swap transaction must be originated by the account.\n */\n Swap = 'swap',\n\n /**\n * Represents an outgoing bridge transaction, transferring assets from\n * the account to another blockchain.\n */\n BridgeSend = 'bridge:send',\n\n /**\n * Represents an incoming bridge transaction, transferring assets from\n * another blockchain to the account.\n */\n BridgeReceive = 'bridge:receive',\n\n /**\n * Represents a stake deposit transaction.\n */\n StakeDeposit = 'stake:deposit',\n\n /**\n * Represents a stake withdrawal transaction.\n */\n StakeWithdraw = 'stake:withdraw',\n\n /**\n * Represents a token approval transaction.\n */\n TokenApprove = 'token:approve',\n\n /**\n * Represents a token disapproval transaction.\n */\n TokenDisapprove = 'token:disapprove',\n\n /**\n * The transaction type is unknown. It's not possible to determine the\n * transaction type based on the information available.\n */\n Unknown = 'unknown',\n}\n\n/**\n * Security alert response values from the Security Alert API.\n */\nexport enum SecurityAlertResponse {\n /**\n * The transaction is considered safe with no detected security issues.\n */\n Benign = 'Benign',\n\n /**\n * The transaction has potential security concerns that warrant user attention.\n */\n Warning = 'Warning',\n\n /**\n * The transaction has been identified as malicious and should be avoided.\n */\n Malicious = 'Malicious',\n}\n\n/**\n * This struct represents additional transaction details.\n *\n * @example\n * ```ts\n * {\n * origin: 'https://dapp.example.com',\n * securityAlertResponse: 'Benign',\n * }\n * ```\n *\n * @example\n * ```ts\n * {\n * origin: 'metamask',\n * securityAlertResponse: 'Warning',\n * }\n * ```\n *\n * @example\n * ```ts\n * {\n * typeLabel: 'Some label',\n * }\n * ```\n */\nexport const TransactionDetailsStruct = object({\n /**\n * Origin of the original transaction request.\n *\n * This can be either 'metamask' for internally initiated transactions, or a URL\n * (e.g., 'https://dapp.example.com') for dapp-initiated transactions.\n */\n origin: exactOptional(string()),\n\n /**\n * Response from the Security Alert API indicating the security assessment of the\n * transaction.\n */\n securityAlertResponse: exactOptional(\n enums([\n `${SecurityAlertResponse.Benign}`,\n `${SecurityAlertResponse.Warning}`,\n `${SecurityAlertResponse.Malicious}`,\n ]),\n ),\n\n /**\n * Optional label for UI display purposes.\n */\n typeLabel: exactOptional(string()),\n});\n\n/**\n * This struct represents a transaction event.\n */\nexport const TransactionEventStruct = object({\n /**\n * New status of the transaction.\n */\n status: enums([\n `${TransactionStatus.Submitted}`,\n `${TransactionStatus.Unconfirmed}`,\n `${TransactionStatus.Confirmed}`,\n `${TransactionStatus.Failed}`,\n ]),\n\n /**\n * UNIX timestamp of when the event occurred.\n */\n timestamp: nullable(number()),\n});\n\n/**\n * This struct represents a blockchain transaction.\n *\n * @example\n * ```ts\n * const tx = {\n * id: 'f5d8ee39a430901c91a5917b9f2dc19d6d1a0e9cea205b009ca73dd04470b9a6',\n * chain: 'bip122:000000000019d6689c085ae165831e93',\n * account: 'b9beb861-9761-4b97-89ce-d992be5f34da',\n * status: 'confirmed',\n * timestamp: 1716367781,\n * type: 'send',\n * from: [\n * {\n * address: 'bc1qrp0yzgkf8rawkuvdlhnjfj2fnjwm0m8727kgah',\n * asset: {\n * fungible: true,\n * type: 'bip122:000000000019d6689c085ae165831e93/slip44:0',\n * unit: 'BTC',\n * amount: '0.1',\n * },\n * },\n * ],\n * to: [\n * {\n * address: 'bc1qrp0yzgkf8rawkuvdlhnjfj2fnjwm0m8727kgah',\n * asset: {\n * fungible: true,\n * type: 'bip122:000000000019d6689c085ae165831e93/slip44:0',\n * unit: 'BTC',\n * amount: '0.1',\n * },\n * },\n * {\n * address: 'bc1qwl8399fz829uqvqly9tcatgrgtwp3udnhxfq4k',\n * asset: {\n * fungible: true,\n * type: 'bip122:000000000019d6689c085ae165831e93/slip44:0',\n * unit: 'BTC',\n * amount: '0.1',\n * },\n * },\n * ],\n * fees: [\n * {\n * type: 'priority',\n * asset: {\n * fungible: true,\n * type: 'bip122:000000000019d6689c085ae165831e93/slip44:0',\n * unit: 'BTC',\n * amount: '0.1',\n * },\n * },\n * ],\n * };\n * ```\n */\nexport const TransactionStruct = object({\n /**\n * Chain-specific transaction ID.\n */\n id: string(),\n\n /**\n * Chain ID (CAIP-2).\n */\n chain: CaipChainIdStruct,\n\n /**\n * Account ID (UUIDv4).\n */\n account: UuidStruct,\n\n /**\n * Transaction status {@see TransactionStatus}.\n */\n status: enums([\n `${TransactionStatus.Submitted}`,\n `${TransactionStatus.Unconfirmed}`,\n `${TransactionStatus.Confirmed}`,\n `${TransactionStatus.Failed}`,\n ]),\n\n /**\n * UNIX timestamp of when the transaction was added to the blockchain. The\n * timestamp can be null if the transaction has not been included in the\n * blockchain yet.\n */\n timestamp: nullable(number()),\n\n /**\n * Transaction type {@see TransactionType}. This will be used by MetaMask to enrich the transaction\n * details on the UI.\n */\n type: enums([\n `${TransactionType.Send}`,\n `${TransactionType.Receive}`,\n `${TransactionType.Swap}`,\n `${TransactionType.BridgeSend}`,\n `${TransactionType.BridgeReceive}`,\n `${TransactionType.StakeDeposit}`,\n `${TransactionType.StakeWithdraw}`,\n `${TransactionType.TokenApprove}`,\n `${TransactionType.TokenDisapprove}`,\n `${TransactionType.Unknown}`,\n ]),\n\n /**\n * Transaction sender addresses and amounts.\n */\n from: array(ParticipantStruct),\n\n /**\n * Transaction receiver addresses and amounts.\n */\n to: array(ParticipantStruct),\n\n /**\n * Total transaction fee.\n */\n fees: array(FeeStruct),\n\n /**\n * List of events related to the transaction {@see TransactionEventStruct}.\n *\n * The events are tracked in a best-effort basis and may not be available for\n * all transactions.\n */\n events: array(TransactionEventStruct),\n\n /**\n * Additional transaction details {@see TransactionDetailsStruct}.\n *\n * Contains contextual information about the transaction such as its origin,\n * security assessment, and optional `typeLabel`. This field is optional and\n * may not be present for all transactions.\n */\n details: exactOptional(TransactionDetailsStruct),\n});\n\n/**\n * Transaction details object.\n *\n * See {@link TransactionDetailsStruct}.\n */\nexport type TransactionDetails = Infer<typeof TransactionDetailsStruct>;\n\n/**\n * Transaction object.\n *\n * See {@link TransactionStruct}.\n */\nexport type Transaction = Infer<typeof TransactionStruct>;\n\n/**\n * This struct represents a page of transactions.\n *\n * @example\n * ```ts\n * {\n * data: [\n * {\n * // Transaction object\n * }\n * ],\n * next: 'c3y1Q6QtqtstbxKX+oqVdEW6',\n * }\n * ```\n *\n * @example\n * ```ts\n * {\n * data: [\n * {\n * // Transaction object\n * }\n * ],\n * next: null, // No more results\n * }**\n * ```\n */\nexport const TransactionsPageStruct = object({\n /**\n * List of transactions.\n */\n data: array(TransactionStruct),\n\n /**\n * Next cursor to iterate over the results. If null, there are no more\n * results.\n */\n next: nullable(string()),\n});\n\n/**\n * Transactions page object.\n *\n * See {@link TransactionsPageStruct}.\n */\nexport type TransactionsPage = InferEquals<\n typeof TransactionsPageStruct,\n Paginated<Transaction>\n>;\n"]}
|
package/dist/btc/types.d.cts
CHANGED
|
@@ -20,8 +20,6 @@ export declare enum BtcMethod {
|
|
|
20
20
|
export declare const BtcP2pkhAccountStruct: import("@metamask/superstruct").Struct<{
|
|
21
21
|
type: "bip122:p2pkh";
|
|
22
22
|
id: string;
|
|
23
|
-
address: string;
|
|
24
|
-
scopes: `${string}:${string}`[];
|
|
25
23
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
26
24
|
entropy?: {
|
|
27
25
|
type: "mnemonic";
|
|
@@ -35,6 +33,8 @@ export declare const BtcP2pkhAccountStruct: import("@metamask/superstruct").Stru
|
|
|
35
33
|
};
|
|
36
34
|
exportable?: boolean;
|
|
37
35
|
};
|
|
36
|
+
address: string;
|
|
37
|
+
scopes: `${string}:${string}`[];
|
|
38
38
|
methods: BtcMethod[];
|
|
39
39
|
}, {
|
|
40
40
|
/**
|
|
@@ -81,8 +81,6 @@ export declare const BtcP2pkhAccountStruct: import("@metamask/superstruct").Stru
|
|
|
81
81
|
export declare const BtcP2shAccountStruct: import("@metamask/superstruct").Struct<{
|
|
82
82
|
type: "bip122:p2sh";
|
|
83
83
|
id: string;
|
|
84
|
-
address: string;
|
|
85
|
-
scopes: `${string}:${string}`[];
|
|
86
84
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
87
85
|
entropy?: {
|
|
88
86
|
type: "mnemonic";
|
|
@@ -96,6 +94,8 @@ export declare const BtcP2shAccountStruct: import("@metamask/superstruct").Struc
|
|
|
96
94
|
};
|
|
97
95
|
exportable?: boolean;
|
|
98
96
|
};
|
|
97
|
+
address: string;
|
|
98
|
+
scopes: `${string}:${string}`[];
|
|
99
99
|
methods: BtcMethod[];
|
|
100
100
|
}, {
|
|
101
101
|
/**
|
|
@@ -142,8 +142,6 @@ export declare const BtcP2shAccountStruct: import("@metamask/superstruct").Struc
|
|
|
142
142
|
export declare const BtcP2wpkhAccountStruct: import("@metamask/superstruct").Struct<{
|
|
143
143
|
type: "bip122:p2wpkh";
|
|
144
144
|
id: string;
|
|
145
|
-
address: string;
|
|
146
|
-
scopes: `${string}:${string}`[];
|
|
147
145
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
148
146
|
entropy?: {
|
|
149
147
|
type: "mnemonic";
|
|
@@ -157,6 +155,8 @@ export declare const BtcP2wpkhAccountStruct: import("@metamask/superstruct").Str
|
|
|
157
155
|
};
|
|
158
156
|
exportable?: boolean;
|
|
159
157
|
};
|
|
158
|
+
address: string;
|
|
159
|
+
scopes: `${string}:${string}`[];
|
|
160
160
|
methods: BtcMethod[];
|
|
161
161
|
}, {
|
|
162
162
|
/**
|
|
@@ -203,8 +203,6 @@ export declare const BtcP2wpkhAccountStruct: import("@metamask/superstruct").Str
|
|
|
203
203
|
export declare const BtcP2trAccountStruct: import("@metamask/superstruct").Struct<{
|
|
204
204
|
type: "bip122:p2tr";
|
|
205
205
|
id: string;
|
|
206
|
-
address: string;
|
|
207
|
-
scopes: `${string}:${string}`[];
|
|
208
206
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
209
207
|
entropy?: {
|
|
210
208
|
type: "mnemonic";
|
|
@@ -218,6 +216,8 @@ export declare const BtcP2trAccountStruct: import("@metamask/superstruct").Struc
|
|
|
218
216
|
};
|
|
219
217
|
exportable?: boolean;
|
|
220
218
|
};
|
|
219
|
+
address: string;
|
|
220
|
+
scopes: `${string}:${string}`[];
|
|
221
221
|
methods: BtcMethod[];
|
|
222
222
|
}, {
|
|
223
223
|
/**
|
package/dist/btc/types.d.mts
CHANGED
|
@@ -20,8 +20,6 @@ export declare enum BtcMethod {
|
|
|
20
20
|
export declare const BtcP2pkhAccountStruct: import("@metamask/superstruct").Struct<{
|
|
21
21
|
type: "bip122:p2pkh";
|
|
22
22
|
id: string;
|
|
23
|
-
address: string;
|
|
24
|
-
scopes: `${string}:${string}`[];
|
|
25
23
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
26
24
|
entropy?: {
|
|
27
25
|
type: "mnemonic";
|
|
@@ -35,6 +33,8 @@ export declare const BtcP2pkhAccountStruct: import("@metamask/superstruct").Stru
|
|
|
35
33
|
};
|
|
36
34
|
exportable?: boolean;
|
|
37
35
|
};
|
|
36
|
+
address: string;
|
|
37
|
+
scopes: `${string}:${string}`[];
|
|
38
38
|
methods: BtcMethod[];
|
|
39
39
|
}, {
|
|
40
40
|
/**
|
|
@@ -81,8 +81,6 @@ export declare const BtcP2pkhAccountStruct: import("@metamask/superstruct").Stru
|
|
|
81
81
|
export declare const BtcP2shAccountStruct: import("@metamask/superstruct").Struct<{
|
|
82
82
|
type: "bip122:p2sh";
|
|
83
83
|
id: string;
|
|
84
|
-
address: string;
|
|
85
|
-
scopes: `${string}:${string}`[];
|
|
86
84
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
87
85
|
entropy?: {
|
|
88
86
|
type: "mnemonic";
|
|
@@ -96,6 +94,8 @@ export declare const BtcP2shAccountStruct: import("@metamask/superstruct").Struc
|
|
|
96
94
|
};
|
|
97
95
|
exportable?: boolean;
|
|
98
96
|
};
|
|
97
|
+
address: string;
|
|
98
|
+
scopes: `${string}:${string}`[];
|
|
99
99
|
methods: BtcMethod[];
|
|
100
100
|
}, {
|
|
101
101
|
/**
|
|
@@ -142,8 +142,6 @@ export declare const BtcP2shAccountStruct: import("@metamask/superstruct").Struc
|
|
|
142
142
|
export declare const BtcP2wpkhAccountStruct: import("@metamask/superstruct").Struct<{
|
|
143
143
|
type: "bip122:p2wpkh";
|
|
144
144
|
id: string;
|
|
145
|
-
address: string;
|
|
146
|
-
scopes: `${string}:${string}`[];
|
|
147
145
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
148
146
|
entropy?: {
|
|
149
147
|
type: "mnemonic";
|
|
@@ -157,6 +155,8 @@ export declare const BtcP2wpkhAccountStruct: import("@metamask/superstruct").Str
|
|
|
157
155
|
};
|
|
158
156
|
exportable?: boolean;
|
|
159
157
|
};
|
|
158
|
+
address: string;
|
|
159
|
+
scopes: `${string}:${string}`[];
|
|
160
160
|
methods: BtcMethod[];
|
|
161
161
|
}, {
|
|
162
162
|
/**
|
|
@@ -203,8 +203,6 @@ export declare const BtcP2wpkhAccountStruct: import("@metamask/superstruct").Str
|
|
|
203
203
|
export declare const BtcP2trAccountStruct: import("@metamask/superstruct").Struct<{
|
|
204
204
|
type: "bip122:p2tr";
|
|
205
205
|
id: string;
|
|
206
|
-
address: string;
|
|
207
|
-
scopes: `${string}:${string}`[];
|
|
208
206
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
209
207
|
entropy?: {
|
|
210
208
|
type: "mnemonic";
|
|
@@ -218,6 +216,8 @@ export declare const BtcP2trAccountStruct: import("@metamask/superstruct").Struc
|
|
|
218
216
|
};
|
|
219
217
|
exportable?: boolean;
|
|
220
218
|
};
|
|
219
|
+
address: string;
|
|
220
|
+
scopes: `${string}:${string}`[];
|
|
221
221
|
methods: BtcMethod[];
|
|
222
222
|
}, {
|
|
223
223
|
/**
|
|
@@ -5,8 +5,8 @@ import type { Infer } from "@metamask/superstruct";
|
|
|
5
5
|
* @see https://eips.ethereum.org/EIPS/eip-4337#definitions
|
|
6
6
|
*/
|
|
7
7
|
export declare const EthUserOperationStruct: import("@metamask/superstruct").Struct<{
|
|
8
|
-
sender: string;
|
|
9
8
|
nonce: string;
|
|
9
|
+
sender: string;
|
|
10
10
|
initCode: string;
|
|
11
11
|
callData: string;
|
|
12
12
|
callGasLimit: string;
|
|
@@ -35,9 +35,9 @@ export type EthUserOperation = Infer<typeof EthUserOperationStruct>;
|
|
|
35
35
|
* construct a UserOperation.
|
|
36
36
|
*/
|
|
37
37
|
export declare const EthBaseTransactionStruct: import("@metamask/superstruct").Struct<{
|
|
38
|
-
to: string;
|
|
39
|
-
data: string;
|
|
40
38
|
value: string;
|
|
39
|
+
data: string;
|
|
40
|
+
to: string;
|
|
41
41
|
}, {
|
|
42
42
|
/**
|
|
43
43
|
* Address of the transaction recipient.
|
|
@@ -5,8 +5,8 @@ import type { Infer } from "@metamask/superstruct";
|
|
|
5
5
|
* @see https://eips.ethereum.org/EIPS/eip-4337#definitions
|
|
6
6
|
*/
|
|
7
7
|
export declare const EthUserOperationStruct: import("@metamask/superstruct").Struct<{
|
|
8
|
-
sender: string;
|
|
9
8
|
nonce: string;
|
|
9
|
+
sender: string;
|
|
10
10
|
initCode: string;
|
|
11
11
|
callData: string;
|
|
12
12
|
callGasLimit: string;
|
|
@@ -35,9 +35,9 @@ export type EthUserOperation = Infer<typeof EthUserOperationStruct>;
|
|
|
35
35
|
* construct a UserOperation.
|
|
36
36
|
*/
|
|
37
37
|
export declare const EthBaseTransactionStruct: import("@metamask/superstruct").Struct<{
|
|
38
|
-
to: string;
|
|
39
|
-
data: string;
|
|
40
38
|
value: string;
|
|
39
|
+
data: string;
|
|
40
|
+
to: string;
|
|
41
41
|
}, {
|
|
42
42
|
/**
|
|
43
43
|
* Address of the transaction recipient.
|
|
@@ -14,22 +14,22 @@ import type { Infer } from "@metamask/superstruct";
|
|
|
14
14
|
* The actual transaction validation is performed by the transaction library.
|
|
15
15
|
*/
|
|
16
16
|
export declare const EthTransactionDataStruct: import("@metamask/superstruct").Struct<{
|
|
17
|
+
value?: string | number | undefined;
|
|
17
18
|
type?: string | number | undefined;
|
|
18
|
-
from?: string | undefined;
|
|
19
|
-
to?: string | null | undefined;
|
|
20
19
|
data?: string | undefined;
|
|
21
|
-
|
|
20
|
+
from?: string | undefined;
|
|
21
|
+
chainId?: string | number | undefined;
|
|
22
|
+
accessList?: {
|
|
23
|
+
address: string;
|
|
24
|
+
storageKeys: string[];
|
|
25
|
+
}[] | undefined;
|
|
22
26
|
nonce?: string | number | undefined;
|
|
27
|
+
to?: string | null | undefined;
|
|
23
28
|
maxFeePerGas?: string | number | undefined;
|
|
24
29
|
maxPriorityFeePerGas?: string | number | undefined;
|
|
25
30
|
gas?: string | number | undefined;
|
|
26
31
|
gasLimit?: string | number | undefined;
|
|
27
32
|
gasPrice?: string | number | undefined;
|
|
28
|
-
accessList?: {
|
|
29
|
-
address: string;
|
|
30
|
-
storageKeys: string[];
|
|
31
|
-
}[] | undefined;
|
|
32
|
-
chainId?: string | number | undefined;
|
|
33
33
|
}, {
|
|
34
34
|
to: import("@metamask/superstruct").Struct<string | null | undefined, null>;
|
|
35
35
|
from: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
@@ -60,13 +60,13 @@ export type EthTransactionData = Infer<typeof EthTransactionDataStruct>;
|
|
|
60
60
|
* This is an array of { type, name, value } objects.
|
|
61
61
|
*/
|
|
62
62
|
export declare const EthTypedDataV1Struct: import("@metamask/superstruct").Struct<{
|
|
63
|
-
type: string;
|
|
64
|
-
value: unknown;
|
|
65
63
|
name: string;
|
|
66
|
-
}[], import("@metamask/superstruct").Struct<{
|
|
67
|
-
type: string;
|
|
68
64
|
value: unknown;
|
|
65
|
+
type: string;
|
|
66
|
+
}[], import("@metamask/superstruct").Struct<{
|
|
69
67
|
name: string;
|
|
68
|
+
value: unknown;
|
|
69
|
+
type: string;
|
|
70
70
|
}, {
|
|
71
71
|
type: import("@metamask/superstruct").Struct<string, null>;
|
|
72
72
|
name: import("@metamask/superstruct").Struct<string, null>;
|
|
@@ -78,8 +78,8 @@ export type EthTypedDataV1 = Infer<typeof EthTypedDataV1Struct>;
|
|
|
78
78
|
* Maps type names to arrays of { name, type } definitions.
|
|
79
79
|
*/
|
|
80
80
|
export declare const EthTypedDataTypesStruct: import("@metamask/superstruct").Struct<Record<string, {
|
|
81
|
-
type: string;
|
|
82
81
|
name: string;
|
|
82
|
+
type: string;
|
|
83
83
|
}[]>, null>;
|
|
84
84
|
export type EthTypedDataTypes = Infer<typeof EthTypedDataTypesStruct>;
|
|
85
85
|
/**
|
|
@@ -88,16 +88,16 @@ export type EthTypedDataTypes = Infer<typeof EthTypedDataTypesStruct>;
|
|
|
88
88
|
*/
|
|
89
89
|
export declare const EthTypedMessageStruct: import("@metamask/superstruct").Struct<{
|
|
90
90
|
message: Record<string, any>;
|
|
91
|
+
domain: Record<string, any>;
|
|
91
92
|
types: Record<string, {
|
|
92
|
-
type: string;
|
|
93
93
|
name: string;
|
|
94
|
+
type: string;
|
|
94
95
|
}[]>;
|
|
95
96
|
primaryType: string;
|
|
96
|
-
domain: Record<string, any>;
|
|
97
97
|
}, {
|
|
98
98
|
types: import("@metamask/superstruct").Struct<Record<string, {
|
|
99
|
-
type: string;
|
|
100
99
|
name: string;
|
|
100
|
+
type: string;
|
|
101
101
|
}[]>, null>;
|
|
102
102
|
primaryType: import("@metamask/superstruct").Struct<string, null>;
|
|
103
103
|
domain: import("@metamask/superstruct").Struct<Record<string, any>, null>;
|
|
@@ -133,22 +133,22 @@ export declare const EthGetEncryptionPublicKeyOptionsStruct: import("@metamask/s
|
|
|
133
133
|
* Parameters for `eth_signTransaction`.
|
|
134
134
|
*/
|
|
135
135
|
export declare const EthSignTransactionParamsStruct: import("@metamask/superstruct").Struct<[{
|
|
136
|
+
value?: string | number | undefined;
|
|
136
137
|
type?: string | number | undefined;
|
|
137
|
-
from?: string | undefined;
|
|
138
|
-
to?: string | null | undefined;
|
|
139
138
|
data?: string | undefined;
|
|
140
|
-
|
|
139
|
+
from?: string | undefined;
|
|
140
|
+
chainId?: string | number | undefined;
|
|
141
|
+
accessList?: {
|
|
142
|
+
address: string;
|
|
143
|
+
storageKeys: string[];
|
|
144
|
+
}[] | undefined;
|
|
141
145
|
nonce?: string | number | undefined;
|
|
146
|
+
to?: string | null | undefined;
|
|
142
147
|
maxFeePerGas?: string | number | undefined;
|
|
143
148
|
maxPriorityFeePerGas?: string | number | undefined;
|
|
144
149
|
gas?: string | number | undefined;
|
|
145
150
|
gasLimit?: string | number | undefined;
|
|
146
151
|
gasPrice?: string | number | undefined;
|
|
147
|
-
accessList?: {
|
|
148
|
-
address: string;
|
|
149
|
-
storageKeys: string[];
|
|
150
|
-
}[] | undefined;
|
|
151
|
-
chainId?: string | number | undefined;
|
|
152
152
|
}], null>;
|
|
153
153
|
export type EthSignTransactionParams = Infer<typeof EthSignTransactionParamsStruct>;
|
|
154
154
|
/**
|
|
@@ -159,15 +159,15 @@ export type EthSignParams = Infer<typeof EthSignParamsStruct>;
|
|
|
159
159
|
/**
|
|
160
160
|
* Parameters for `personal_sign`.
|
|
161
161
|
*/
|
|
162
|
-
export declare const EthPersonalSignParamsStruct: import("@metamask/superstruct").Struct<[string] | [string
|
|
162
|
+
export declare const EthPersonalSignParamsStruct: import("@metamask/superstruct").Struct<[string, string] | [string], null>;
|
|
163
163
|
export type EthPersonalSignParams = Infer<typeof EthPersonalSignParamsStruct>;
|
|
164
164
|
/**
|
|
165
165
|
* Parameters for `eth_signTypedData_v1`.
|
|
166
166
|
*/
|
|
167
167
|
export declare const EthSignTypedDataV1ParamsStruct: import("@metamask/superstruct").Struct<[string, {
|
|
168
|
-
type: string;
|
|
169
|
-
value: unknown;
|
|
170
168
|
name: string;
|
|
169
|
+
value: unknown;
|
|
170
|
+
type: string;
|
|
171
171
|
}[]], null>;
|
|
172
172
|
export type EthSignTypedDataV1Params = Infer<typeof EthSignTypedDataV1ParamsStruct>;
|
|
173
173
|
/**
|
|
@@ -175,12 +175,12 @@ export type EthSignTypedDataV1Params = Infer<typeof EthSignTypedDataV1ParamsStru
|
|
|
175
175
|
*/
|
|
176
176
|
export declare const EthSignTypedDataParamsStruct: import("@metamask/superstruct").Struct<[string, {
|
|
177
177
|
message: Record<string, any>;
|
|
178
|
+
domain: Record<string, any>;
|
|
178
179
|
types: Record<string, {
|
|
179
|
-
type: string;
|
|
180
180
|
name: string;
|
|
181
|
+
type: string;
|
|
181
182
|
}[]>;
|
|
182
183
|
primaryType: string;
|
|
183
|
-
domain: Record<string, any>;
|
|
184
184
|
}], null>;
|
|
185
185
|
export type EthSignTypedDataParams = Infer<typeof EthSignTypedDataParamsStruct>;
|
|
186
186
|
/**
|
|
@@ -14,22 +14,22 @@ import type { Infer } from "@metamask/superstruct";
|
|
|
14
14
|
* The actual transaction validation is performed by the transaction library.
|
|
15
15
|
*/
|
|
16
16
|
export declare const EthTransactionDataStruct: import("@metamask/superstruct").Struct<{
|
|
17
|
+
value?: string | number | undefined;
|
|
17
18
|
type?: string | number | undefined;
|
|
18
|
-
from?: string | undefined;
|
|
19
|
-
to?: string | null | undefined;
|
|
20
19
|
data?: string | undefined;
|
|
21
|
-
|
|
20
|
+
from?: string | undefined;
|
|
21
|
+
chainId?: string | number | undefined;
|
|
22
|
+
accessList?: {
|
|
23
|
+
address: string;
|
|
24
|
+
storageKeys: string[];
|
|
25
|
+
}[] | undefined;
|
|
22
26
|
nonce?: string | number | undefined;
|
|
27
|
+
to?: string | null | undefined;
|
|
23
28
|
maxFeePerGas?: string | number | undefined;
|
|
24
29
|
maxPriorityFeePerGas?: string | number | undefined;
|
|
25
30
|
gas?: string | number | undefined;
|
|
26
31
|
gasLimit?: string | number | undefined;
|
|
27
32
|
gasPrice?: string | number | undefined;
|
|
28
|
-
accessList?: {
|
|
29
|
-
address: string;
|
|
30
|
-
storageKeys: string[];
|
|
31
|
-
}[] | undefined;
|
|
32
|
-
chainId?: string | number | undefined;
|
|
33
33
|
}, {
|
|
34
34
|
to: import("@metamask/superstruct").Struct<string | null | undefined, null>;
|
|
35
35
|
from: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
@@ -60,13 +60,13 @@ export type EthTransactionData = Infer<typeof EthTransactionDataStruct>;
|
|
|
60
60
|
* This is an array of { type, name, value } objects.
|
|
61
61
|
*/
|
|
62
62
|
export declare const EthTypedDataV1Struct: import("@metamask/superstruct").Struct<{
|
|
63
|
-
type: string;
|
|
64
|
-
value: unknown;
|
|
65
63
|
name: string;
|
|
66
|
-
}[], import("@metamask/superstruct").Struct<{
|
|
67
|
-
type: string;
|
|
68
64
|
value: unknown;
|
|
65
|
+
type: string;
|
|
66
|
+
}[], import("@metamask/superstruct").Struct<{
|
|
69
67
|
name: string;
|
|
68
|
+
value: unknown;
|
|
69
|
+
type: string;
|
|
70
70
|
}, {
|
|
71
71
|
type: import("@metamask/superstruct").Struct<string, null>;
|
|
72
72
|
name: import("@metamask/superstruct").Struct<string, null>;
|
|
@@ -78,8 +78,8 @@ export type EthTypedDataV1 = Infer<typeof EthTypedDataV1Struct>;
|
|
|
78
78
|
* Maps type names to arrays of { name, type } definitions.
|
|
79
79
|
*/
|
|
80
80
|
export declare const EthTypedDataTypesStruct: import("@metamask/superstruct").Struct<Record<string, {
|
|
81
|
-
type: string;
|
|
82
81
|
name: string;
|
|
82
|
+
type: string;
|
|
83
83
|
}[]>, null>;
|
|
84
84
|
export type EthTypedDataTypes = Infer<typeof EthTypedDataTypesStruct>;
|
|
85
85
|
/**
|
|
@@ -88,16 +88,16 @@ export type EthTypedDataTypes = Infer<typeof EthTypedDataTypesStruct>;
|
|
|
88
88
|
*/
|
|
89
89
|
export declare const EthTypedMessageStruct: import("@metamask/superstruct").Struct<{
|
|
90
90
|
message: Record<string, any>;
|
|
91
|
+
domain: Record<string, any>;
|
|
91
92
|
types: Record<string, {
|
|
92
|
-
type: string;
|
|
93
93
|
name: string;
|
|
94
|
+
type: string;
|
|
94
95
|
}[]>;
|
|
95
96
|
primaryType: string;
|
|
96
|
-
domain: Record<string, any>;
|
|
97
97
|
}, {
|
|
98
98
|
types: import("@metamask/superstruct").Struct<Record<string, {
|
|
99
|
-
type: string;
|
|
100
99
|
name: string;
|
|
100
|
+
type: string;
|
|
101
101
|
}[]>, null>;
|
|
102
102
|
primaryType: import("@metamask/superstruct").Struct<string, null>;
|
|
103
103
|
domain: import("@metamask/superstruct").Struct<Record<string, any>, null>;
|
|
@@ -133,22 +133,22 @@ export declare const EthGetEncryptionPublicKeyOptionsStruct: import("@metamask/s
|
|
|
133
133
|
* Parameters for `eth_signTransaction`.
|
|
134
134
|
*/
|
|
135
135
|
export declare const EthSignTransactionParamsStruct: import("@metamask/superstruct").Struct<[{
|
|
136
|
+
value?: string | number | undefined;
|
|
136
137
|
type?: string | number | undefined;
|
|
137
|
-
from?: string | undefined;
|
|
138
|
-
to?: string | null | undefined;
|
|
139
138
|
data?: string | undefined;
|
|
140
|
-
|
|
139
|
+
from?: string | undefined;
|
|
140
|
+
chainId?: string | number | undefined;
|
|
141
|
+
accessList?: {
|
|
142
|
+
address: string;
|
|
143
|
+
storageKeys: string[];
|
|
144
|
+
}[] | undefined;
|
|
141
145
|
nonce?: string | number | undefined;
|
|
146
|
+
to?: string | null | undefined;
|
|
142
147
|
maxFeePerGas?: string | number | undefined;
|
|
143
148
|
maxPriorityFeePerGas?: string | number | undefined;
|
|
144
149
|
gas?: string | number | undefined;
|
|
145
150
|
gasLimit?: string | number | undefined;
|
|
146
151
|
gasPrice?: string | number | undefined;
|
|
147
|
-
accessList?: {
|
|
148
|
-
address: string;
|
|
149
|
-
storageKeys: string[];
|
|
150
|
-
}[] | undefined;
|
|
151
|
-
chainId?: string | number | undefined;
|
|
152
152
|
}], null>;
|
|
153
153
|
export type EthSignTransactionParams = Infer<typeof EthSignTransactionParamsStruct>;
|
|
154
154
|
/**
|
|
@@ -159,15 +159,15 @@ export type EthSignParams = Infer<typeof EthSignParamsStruct>;
|
|
|
159
159
|
/**
|
|
160
160
|
* Parameters for `personal_sign`.
|
|
161
161
|
*/
|
|
162
|
-
export declare const EthPersonalSignParamsStruct: import("@metamask/superstruct").Struct<[string] | [string
|
|
162
|
+
export declare const EthPersonalSignParamsStruct: import("@metamask/superstruct").Struct<[string, string] | [string], null>;
|
|
163
163
|
export type EthPersonalSignParams = Infer<typeof EthPersonalSignParamsStruct>;
|
|
164
164
|
/**
|
|
165
165
|
* Parameters for `eth_signTypedData_v1`.
|
|
166
166
|
*/
|
|
167
167
|
export declare const EthSignTypedDataV1ParamsStruct: import("@metamask/superstruct").Struct<[string, {
|
|
168
|
-
type: string;
|
|
169
|
-
value: unknown;
|
|
170
168
|
name: string;
|
|
169
|
+
value: unknown;
|
|
170
|
+
type: string;
|
|
171
171
|
}[]], null>;
|
|
172
172
|
export type EthSignTypedDataV1Params = Infer<typeof EthSignTypedDataV1ParamsStruct>;
|
|
173
173
|
/**
|
|
@@ -175,12 +175,12 @@ export type EthSignTypedDataV1Params = Infer<typeof EthSignTypedDataV1ParamsStru
|
|
|
175
175
|
*/
|
|
176
176
|
export declare const EthSignTypedDataParamsStruct: import("@metamask/superstruct").Struct<[string, {
|
|
177
177
|
message: Record<string, any>;
|
|
178
|
+
domain: Record<string, any>;
|
|
178
179
|
types: Record<string, {
|
|
179
|
-
type: string;
|
|
180
180
|
name: string;
|
|
181
|
+
type: string;
|
|
181
182
|
}[]>;
|
|
182
183
|
primaryType: string;
|
|
183
|
-
domain: Record<string, any>;
|
|
184
184
|
}], null>;
|
|
185
185
|
export type EthSignTypedDataParams = Infer<typeof EthSignTypedDataParamsStruct>;
|
|
186
186
|
/**
|
package/dist/eth/types.d.cts
CHANGED
|
@@ -22,8 +22,6 @@ export declare enum EthMethod {
|
|
|
22
22
|
export declare const EthEoaAccountStruct: import("@metamask/superstruct").Struct<{
|
|
23
23
|
type: "eip155:eoa";
|
|
24
24
|
id: string;
|
|
25
|
-
address: string;
|
|
26
|
-
scopes: EthScope.Eoa[];
|
|
27
25
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
28
26
|
entropy?: {
|
|
29
27
|
type: "mnemonic";
|
|
@@ -37,6 +35,8 @@ export declare const EthEoaAccountStruct: import("@metamask/superstruct").Struct
|
|
|
37
35
|
};
|
|
38
36
|
exportable?: boolean;
|
|
39
37
|
};
|
|
38
|
+
address: string;
|
|
39
|
+
scopes: EthScope.Eoa[];
|
|
40
40
|
methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
|
|
41
41
|
}, {
|
|
42
42
|
/**
|
|
@@ -81,8 +81,6 @@ export type EthEoaAccount = Infer<typeof EthEoaAccountStruct>;
|
|
|
81
81
|
export declare const EthErc4337AccountStruct: import("@metamask/superstruct").Struct<{
|
|
82
82
|
type: "eip155:erc4337";
|
|
83
83
|
id: string;
|
|
84
|
-
address: string;
|
|
85
|
-
scopes: `${string}:${string}`[];
|
|
86
84
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
87
85
|
entropy?: {
|
|
88
86
|
type: "mnemonic";
|
|
@@ -96,6 +94,8 @@ export declare const EthErc4337AccountStruct: import("@metamask/superstruct").St
|
|
|
96
94
|
};
|
|
97
95
|
exportable?: boolean;
|
|
98
96
|
};
|
|
97
|
+
address: string;
|
|
98
|
+
scopes: `${string}:${string}`[];
|
|
99
99
|
methods: ("personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation")[];
|
|
100
100
|
}, {
|
|
101
101
|
/**
|
package/dist/eth/types.d.mts
CHANGED
|
@@ -22,8 +22,6 @@ export declare enum EthMethod {
|
|
|
22
22
|
export declare const EthEoaAccountStruct: import("@metamask/superstruct").Struct<{
|
|
23
23
|
type: "eip155:eoa";
|
|
24
24
|
id: string;
|
|
25
|
-
address: string;
|
|
26
|
-
scopes: EthScope.Eoa[];
|
|
27
25
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
28
26
|
entropy?: {
|
|
29
27
|
type: "mnemonic";
|
|
@@ -37,6 +35,8 @@ export declare const EthEoaAccountStruct: import("@metamask/superstruct").Struct
|
|
|
37
35
|
};
|
|
38
36
|
exportable?: boolean;
|
|
39
37
|
};
|
|
38
|
+
address: string;
|
|
39
|
+
scopes: EthScope.Eoa[];
|
|
40
40
|
methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
|
|
41
41
|
}, {
|
|
42
42
|
/**
|
|
@@ -81,8 +81,6 @@ export type EthEoaAccount = Infer<typeof EthEoaAccountStruct>;
|
|
|
81
81
|
export declare const EthErc4337AccountStruct: import("@metamask/superstruct").Struct<{
|
|
82
82
|
type: "eip155:erc4337";
|
|
83
83
|
id: string;
|
|
84
|
-
address: string;
|
|
85
|
-
scopes: `${string}:${string}`[];
|
|
86
84
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
87
85
|
entropy?: {
|
|
88
86
|
type: "mnemonic";
|
|
@@ -96,6 +94,8 @@ export declare const EthErc4337AccountStruct: import("@metamask/superstruct").St
|
|
|
96
94
|
};
|
|
97
95
|
exportable?: boolean;
|
|
98
96
|
};
|
|
97
|
+
address: string;
|
|
98
|
+
scopes: `${string}:${string}`[];
|
|
99
99
|
methods: ("personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation")[];
|
|
100
100
|
}, {
|
|
101
101
|
/**
|