@metamask/keyring-api 17.4.0 → 17.5.0
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 +10 -1
- package/dist/api/transaction.cjs +18 -0
- package/dist/api/transaction.cjs.map +1 -1
- package/dist/api/transaction.d.cts +28 -7
- package/dist/api/transaction.d.cts.map +1 -1
- package/dist/api/transaction.d.mts +28 -7
- package/dist/api/transaction.d.mts.map +1 -1
- package/dist/api/transaction.mjs +18 -0
- package/dist/api/transaction.mjs.map +1 -1
- package/dist/events.d.cts +3 -3
- package/dist/events.d.mts +3 -3
- package/dist/rpc.d.cts +7 -4
- package/dist/rpc.d.cts.map +1 -1
- package/dist/rpc.d.mts +7 -4
- package/dist/rpc.d.mts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [17.5.0]
|
11
|
+
|
12
|
+
### Added
|
13
|
+
|
14
|
+
- Add `bridge:{send,receive}` transaction type ([#251](https://github.com/MetaMask/accounts/pull/251))
|
15
|
+
- Add `unknown` transaction type ([#251](https://github.com/MetaMask/accounts/pull/251))
|
16
|
+
- This type can be used when a transaction type cannot be identified.
|
17
|
+
|
10
18
|
## [17.4.0]
|
11
19
|
|
12
20
|
### Added
|
@@ -561,7 +569,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
561
569
|
- SnapController keyring client. It is intended to be used by MetaMask to talk to the snap.
|
562
570
|
- Helper functions to create keyring handler in the snap.
|
563
571
|
|
564
|
-
[Unreleased]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@17.
|
572
|
+
[Unreleased]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@17.5.0...HEAD
|
573
|
+
[17.5.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@17.4.0...@metamask/keyring-api@17.5.0
|
565
574
|
[17.4.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@17.3.0...@metamask/keyring-api@17.4.0
|
566
575
|
[17.3.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@17.2.1...@metamask/keyring-api@17.3.0
|
567
576
|
[17.2.1]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@17.2.0...@metamask/keyring-api@17.2.1
|
package/dist/api/transaction.cjs
CHANGED
@@ -131,6 +131,21 @@ var TransactionType;
|
|
131
131
|
* A swap transaction must be originated by the account.
|
132
132
|
*/
|
133
133
|
TransactionType["Swap"] = "swap";
|
134
|
+
/**
|
135
|
+
* Represents an outgoing bridge transaction, transferring assets from
|
136
|
+
* the account to another blockchain.
|
137
|
+
*/
|
138
|
+
TransactionType["BridgeSend"] = "bridge:send";
|
139
|
+
/**
|
140
|
+
* Represents an incoming bridge transaction, transferring assets from
|
141
|
+
* another blockchain to the account.
|
142
|
+
*/
|
143
|
+
TransactionType["BridgeReceive"] = "bridge:receive";
|
144
|
+
/**
|
145
|
+
* The transaction type is unknown. It's not possible to determine the
|
146
|
+
* transaction type based on the information available.
|
147
|
+
*/
|
148
|
+
TransactionType["Unknown"] = "unknown";
|
134
149
|
})(TransactionType || (exports.TransactionType = TransactionType = {}));
|
135
150
|
/**
|
136
151
|
* This struct represents a transaction event.
|
@@ -243,6 +258,9 @@ exports.TransactionStruct = (0, keyring_utils_1.object)({
|
|
243
258
|
`${TransactionType.Send}`,
|
244
259
|
`${TransactionType.Receive}`,
|
245
260
|
`${TransactionType.Swap}`,
|
261
|
+
`${TransactionType.BridgeSend}`,
|
262
|
+
`${TransactionType.BridgeReceive}`,
|
263
|
+
`${TransactionType.Unknown}`,
|
246
264
|
]),
|
247
265
|
/**
|
248
266
|
* Transaction sender addresses and amounts.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transaction.cjs","sourceRoot":"","sources":["../../src/api/transaction.ts"],"names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MAAM,EAAE,IAAA,mBAAK,EAAC,8BAAsB,CAAC;CACtC,CAAC,CAAC;AASH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACU,QAAA,sBAAsB,GAAG,IAAA,sBAAM,EAAC;IAC3C;;OAEG;IACH,IAAI,EAAE,IAAA,mBAAK,EAAC,yBAAiB,CAAC;IAE9B;;;OAGG;IACH,IAAI,EAAE,IAAA,sBAAQ,EAAC,IAAA,oBAAM,GAAE,CAAC;CACzB,CAAC,CAAC","sourcesContent":["import type { InferEquals } from '@metamask/keyring-utils';\nimport { 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/**\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 ]),\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/**\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.cjs","sourceRoot":"","sources":["../../src/api/transaction.ts"],"names":[],"mappings":";;;AACA,2DAA6D;AAE7D,uDAA+E;AAE/E,uCAAsC;AACtC,qCAA2C;AAG3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,iBAAiB,GAAG,IAAA,sBAAM,EAAC;IAC/B;;OAEG;IACH,OAAO,EAAE,IAAA,oBAAM,GAAE;IAEjB;;OAEG;IACH,KAAK,EAAE,IAAA,sBAAQ,EAAC,mBAAW,CAAC;CAC7B,CAAC,CAAC;AAEH;;GAEG;AACH,IAAY,OAiBX;AAjBD,WAAY,OAAO;IACjB;;;;;;OAMG;IACH,wBAAa,CAAA;IAEb;;;;;OAKG;IACH,gCAAqB,CAAA;AACvB,CAAC,EAjBW,OAAO,uBAAP,OAAO,QAiBlB;AAED;;GAEG;AACH,MAAM,SAAS,GAAG,IAAA,sBAAM,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AAC","sourcesContent":["import type { InferEquals } from '@metamask/keyring-utils';\nimport { 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 * 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 * 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.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/**\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"]}
|
@@ -65,7 +65,22 @@ export declare enum TransactionType {
|
|
65
65
|
*
|
66
66
|
* A swap transaction must be originated by the account.
|
67
67
|
*/
|
68
|
-
Swap = "swap"
|
68
|
+
Swap = "swap",
|
69
|
+
/**
|
70
|
+
* Represents an outgoing bridge transaction, transferring assets from
|
71
|
+
* the account to another blockchain.
|
72
|
+
*/
|
73
|
+
BridgeSend = "bridge:send",
|
74
|
+
/**
|
75
|
+
* Represents an incoming bridge transaction, transferring assets from
|
76
|
+
* another blockchain to the account.
|
77
|
+
*/
|
78
|
+
BridgeReceive = "bridge:receive",
|
79
|
+
/**
|
80
|
+
* The transaction type is unknown. It's not possible to determine the
|
81
|
+
* transaction type based on the information available.
|
82
|
+
*/
|
83
|
+
Unknown = "unknown"
|
69
84
|
}
|
70
85
|
/**
|
71
86
|
* This struct represents a transaction event.
|
@@ -146,7 +161,7 @@ export declare const TransactionEventStruct: import("@metamask/superstruct").Str
|
|
146
161
|
* ```
|
147
162
|
*/
|
148
163
|
export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
|
149
|
-
type: "send" | "receive" | "swap";
|
164
|
+
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
|
150
165
|
id: string;
|
151
166
|
from: {
|
152
167
|
address: string;
|
@@ -224,10 +239,13 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
|
|
224
239
|
* Transaction type {@see TransactionType}. This will be used by MetaMask to enrich the transaction
|
225
240
|
* details on the UI.
|
226
241
|
*/
|
227
|
-
type: import("@metamask/superstruct").Struct<"send" | "receive" | "swap", {
|
242
|
+
type: import("@metamask/superstruct").Struct<"unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive", {
|
243
|
+
unknown: "unknown";
|
228
244
|
send: "send";
|
229
245
|
receive: "receive";
|
230
246
|
swap: "swap";
|
247
|
+
"bridge:send": "bridge:send";
|
248
|
+
"bridge:receive": "bridge:receive";
|
231
249
|
}>;
|
232
250
|
/**
|
233
251
|
* Transaction sender addresses and amounts.
|
@@ -424,7 +442,7 @@ export type Transaction = Infer<typeof TransactionStruct>;
|
|
424
442
|
*/
|
425
443
|
export declare const TransactionsPageStruct: import("@metamask/superstruct").Struct<{
|
426
444
|
data: {
|
427
|
-
type: "send" | "receive" | "swap";
|
445
|
+
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
|
428
446
|
id: string;
|
429
447
|
from: {
|
430
448
|
address: string;
|
@@ -477,7 +495,7 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
|
|
477
495
|
* List of transactions.
|
478
496
|
*/
|
479
497
|
data: import("@metamask/superstruct").Struct<{
|
480
|
-
type: "send" | "receive" | "swap";
|
498
|
+
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
|
481
499
|
id: string;
|
482
500
|
from: {
|
483
501
|
address: string;
|
@@ -524,7 +542,7 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
|
|
524
542
|
};
|
525
543
|
}[];
|
526
544
|
}[], import("@metamask/superstruct").Struct<{
|
527
|
-
type: "send" | "receive" | "swap";
|
545
|
+
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
|
528
546
|
id: string;
|
529
547
|
from: {
|
530
548
|
address: string;
|
@@ -602,10 +620,13 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
|
|
602
620
|
* Transaction type {@see TransactionType}. This will be used by MetaMask to enrich the transaction
|
603
621
|
* details on the UI.
|
604
622
|
*/
|
605
|
-
type: import("@metamask/superstruct").Struct<"send" | "receive" | "swap", {
|
623
|
+
type: import("@metamask/superstruct").Struct<"unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive", {
|
624
|
+
unknown: "unknown";
|
606
625
|
send: "send";
|
607
626
|
receive: "receive";
|
608
627
|
swap: "swap";
|
628
|
+
"bridge:send": "bridge:send";
|
629
|
+
"bridge:receive": "bridge:receive";
|
609
630
|
}>;
|
610
631
|
/**
|
611
632
|
* Transaction sender addresses and amounts.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transaction.d.cts","sourceRoot":"","sources":["../../src/api/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,gCAAgC;AAE3D,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAKnD,OAAO,KAAK,EAAE,SAAS,EAAE,yBAAqB;AAiD9C;;GAEG;AACH,oBAAY,OAAO;IACjB;;;;;;OAMG;IACH,IAAI,SAAS;IAEb;;;;;OAKG;IACH,QAAQ,aAAa;CACtB;AAiBD;;GAEG;AACH,oBAAY,iBAAiB;IAC3B;;;OAGG;IACH,SAAS,cAAc;IAEvB;;;OAGG;IACH,WAAW,gBAAgB;IAE3B;;OAEG;IACH,SAAS,cAAc;IAEvB;;OAEG;IACH,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,oBAAY,eAAe;IACzB;;;;OAIG;IACH,IAAI,SAAS;IAEb;;;OAGG;IAC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
|
68
|
-
Swap = "swap"
|
68
|
+
Swap = "swap",
|
69
|
+
/**
|
70
|
+
* Represents an outgoing bridge transaction, transferring assets from
|
71
|
+
* the account to another blockchain.
|
72
|
+
*/
|
73
|
+
BridgeSend = "bridge:send",
|
74
|
+
/**
|
75
|
+
* Represents an incoming bridge transaction, transferring assets from
|
76
|
+
* another blockchain to the account.
|
77
|
+
*/
|
78
|
+
BridgeReceive = "bridge:receive",
|
79
|
+
/**
|
80
|
+
* The transaction type is unknown. It's not possible to determine the
|
81
|
+
* transaction type based on the information available.
|
82
|
+
*/
|
83
|
+
Unknown = "unknown"
|
69
84
|
}
|
70
85
|
/**
|
71
86
|
* This struct represents a transaction event.
|
@@ -146,7 +161,7 @@ export declare const TransactionEventStruct: import("@metamask/superstruct").Str
|
|
146
161
|
* ```
|
147
162
|
*/
|
148
163
|
export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
|
149
|
-
type: "send" | "receive" | "swap";
|
164
|
+
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
|
150
165
|
id: string;
|
151
166
|
from: {
|
152
167
|
address: string;
|
@@ -224,10 +239,13 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
|
|
224
239
|
* Transaction type {@see TransactionType}. This will be used by MetaMask to enrich the transaction
|
225
240
|
* details on the UI.
|
226
241
|
*/
|
227
|
-
type: import("@metamask/superstruct").Struct<"send" | "receive" | "swap", {
|
242
|
+
type: import("@metamask/superstruct").Struct<"unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive", {
|
243
|
+
unknown: "unknown";
|
228
244
|
send: "send";
|
229
245
|
receive: "receive";
|
230
246
|
swap: "swap";
|
247
|
+
"bridge:send": "bridge:send";
|
248
|
+
"bridge:receive": "bridge:receive";
|
231
249
|
}>;
|
232
250
|
/**
|
233
251
|
* Transaction sender addresses and amounts.
|
@@ -424,7 +442,7 @@ export type Transaction = Infer<typeof TransactionStruct>;
|
|
424
442
|
*/
|
425
443
|
export declare const TransactionsPageStruct: import("@metamask/superstruct").Struct<{
|
426
444
|
data: {
|
427
|
-
type: "send" | "receive" | "swap";
|
445
|
+
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
|
428
446
|
id: string;
|
429
447
|
from: {
|
430
448
|
address: string;
|
@@ -477,7 +495,7 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
|
|
477
495
|
* List of transactions.
|
478
496
|
*/
|
479
497
|
data: import("@metamask/superstruct").Struct<{
|
480
|
-
type: "send" | "receive" | "swap";
|
498
|
+
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
|
481
499
|
id: string;
|
482
500
|
from: {
|
483
501
|
address: string;
|
@@ -524,7 +542,7 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
|
|
524
542
|
};
|
525
543
|
}[];
|
526
544
|
}[], import("@metamask/superstruct").Struct<{
|
527
|
-
type: "send" | "receive" | "swap";
|
545
|
+
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
|
528
546
|
id: string;
|
529
547
|
from: {
|
530
548
|
address: string;
|
@@ -602,10 +620,13 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
|
|
602
620
|
* Transaction type {@see TransactionType}. This will be used by MetaMask to enrich the transaction
|
603
621
|
* details on the UI.
|
604
622
|
*/
|
605
|
-
type: import("@metamask/superstruct").Struct<"send" | "receive" | "swap", {
|
623
|
+
type: import("@metamask/superstruct").Struct<"unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive", {
|
624
|
+
unknown: "unknown";
|
606
625
|
send: "send";
|
607
626
|
receive: "receive";
|
608
627
|
swap: "swap";
|
628
|
+
"bridge:send": "bridge:send";
|
629
|
+
"bridge:receive": "bridge:receive";
|
609
630
|
}>;
|
610
631
|
/**
|
611
632
|
* Transaction sender addresses and amounts.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transaction.d.mts","sourceRoot":"","sources":["../../src/api/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,gCAAgC;AAE3D,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAKnD,OAAO,KAAK,EAAE,SAAS,EAAE,yBAAqB;AAiD9C;;GAEG;AACH,oBAAY,OAAO;IACjB;;;;;;OAMG;IACH,IAAI,SAAS;IAEb;;;;;OAKG;IACH,QAAQ,aAAa;CACtB;AAiBD;;GAEG;AACH,oBAAY,iBAAiB;IAC3B;;;OAGG;IACH,SAAS,cAAc;IAEvB;;;OAGG;IACH,WAAW,gBAAgB;IAE3B;;OAEG;IACH,SAAS,cAAc;IAEvB;;OAEG;IACH,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,oBAAY,eAAe;IACzB;;;;OAIG;IACH,IAAI,SAAS;IAEb;;;OAGG;IACH,OAAO,YAAY;IAEnB;;;;;OAKG;IACH,IAAI,SAAS;
|
1
|
+
{"version":3,"file":"transaction.d.mts","sourceRoot":"","sources":["../../src/api/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,gCAAgC;AAE3D,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAKnD,OAAO,KAAK,EAAE,SAAS,EAAE,yBAAqB;AAiD9C;;GAEG;AACH,oBAAY,OAAO;IACjB;;;;;;OAMG;IACH,IAAI,SAAS;IAEb;;;;;OAKG;IACH,QAAQ,aAAa;CACtB;AAiBD;;GAEG;AACH,oBAAY,iBAAiB;IAC3B;;;OAGG;IACH,SAAS,cAAc;IAEvB;;;OAGG;IACH,WAAW,gBAAgB;IAE3B;;OAEG;IACH,SAAS,cAAc;IAEvB;;OAEG;IACH,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,oBAAY,eAAe;IACzB;;;;OAIG;IACH,IAAI,SAAS;IAEb;;;OAGG;IACH,OAAO,YAAY;IAEnB;;;;;OAKG;IACH,IAAI,SAAS;IAEb;;;OAGG;IACH,UAAU,gBAAgB;IAE1B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;;;;YApPH;;eAEG;;YAGH;;eAEG;;;;;;;;;;;QAgPH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;YAzPH;;eAEG;;YAGH;;eAEG;;;;;;;;;;;QAqPH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;YAzNH;;eAEG;;;;;YAGH;;eAEG;;;;;;;;;;;QAqNH;;;;;WAKG;;;;;;;;YA3IH;;eAEG;;;;;;;YAQH;;eAEG;;;;IA2KH;;;OAGG;;EAEH,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,WAAW,CACxC,OAAO,sBAAsB,EAC7B,SAAS,CAAC,WAAW,CAAC,CACvB,CAAC"}
|
package/dist/api/transaction.mjs
CHANGED
@@ -128,6 +128,21 @@ export var TransactionType;
|
|
128
128
|
* A swap transaction must be originated by the account.
|
129
129
|
*/
|
130
130
|
TransactionType["Swap"] = "swap";
|
131
|
+
/**
|
132
|
+
* Represents an outgoing bridge transaction, transferring assets from
|
133
|
+
* the account to another blockchain.
|
134
|
+
*/
|
135
|
+
TransactionType["BridgeSend"] = "bridge:send";
|
136
|
+
/**
|
137
|
+
* Represents an incoming bridge transaction, transferring assets from
|
138
|
+
* another blockchain to the account.
|
139
|
+
*/
|
140
|
+
TransactionType["BridgeReceive"] = "bridge:receive";
|
141
|
+
/**
|
142
|
+
* The transaction type is unknown. It's not possible to determine the
|
143
|
+
* transaction type based on the information available.
|
144
|
+
*/
|
145
|
+
TransactionType["Unknown"] = "unknown";
|
131
146
|
})(TransactionType || (TransactionType = {}));
|
132
147
|
/**
|
133
148
|
* This struct represents a transaction event.
|
@@ -240,6 +255,9 @@ export const TransactionStruct = object({
|
|
240
255
|
`${TransactionType.Send}`,
|
241
256
|
`${TransactionType.Receive}`,
|
242
257
|
`${TransactionType.Swap}`,
|
258
|
+
`${TransactionType.BridgeSend}`,
|
259
|
+
`${TransactionType.BridgeReceive}`,
|
260
|
+
`${TransactionType.Unknown}`,
|
243
261
|
]),
|
244
262
|
/**
|
245
263
|
* Transaction sender addresses and amounts.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transaction.mjs","sourceRoot":"","sources":["../../src/api/transaction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,gCAAgC;AAE7D,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,CAAA;IAEvB;;OAEG;IACH,sCAAiB,CAAA;AACnB,CAAC,EAtBW,iBAAiB,KAAjB,iBAAiB,QAsB5B;AAED;;G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,CAAC;IAEF;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAE9B;;OAEG;IACH,EAAE,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAE5B;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IAEtB;;;;;OAKG;IACH,MAAM,EAAE,KAAK,CAAC,sBAAsB,CAAC;CACtC,CAAC,CAAC;AASH;;;;;;;;;;;;;;;;;;;;;;;;;;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 { 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/**\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 ]),\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/**\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,MAAM,EAAE,UAAU,EAAE,gCAAgC;AAE7D,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,EA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AAC;AASH;;;;;;;;;;;;;;;;;;;;;;;;;;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 { 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 * 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 * 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.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/**\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/events.d.cts
CHANGED
@@ -260,7 +260,7 @@ export declare const AccountTransactionsUpdatedEventStruct: import("@metamask/su
|
|
260
260
|
method: "notify:accountTransactionsUpdated";
|
261
261
|
params: {
|
262
262
|
transactions: Record<string, {
|
263
|
-
type: "send" | "receive" | "swap";
|
263
|
+
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
|
264
264
|
id: string;
|
265
265
|
from: {
|
266
266
|
address: string;
|
@@ -312,7 +312,7 @@ export declare const AccountTransactionsUpdatedEventStruct: import("@metamask/su
|
|
312
312
|
method: import("@metamask/superstruct").Struct<"notify:accountTransactionsUpdated", "notify:accountTransactionsUpdated">;
|
313
313
|
params: import("@metamask/superstruct").Struct<{
|
314
314
|
transactions: Record<string, {
|
315
|
-
type: "send" | "receive" | "swap";
|
315
|
+
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
|
316
316
|
id: string;
|
317
317
|
from: {
|
318
318
|
address: string;
|
@@ -364,7 +364,7 @@ export declare const AccountTransactionsUpdatedEventStruct: import("@metamask/su
|
|
364
364
|
* Transactions updates of accounts owned by the Snap.
|
365
365
|
*/
|
366
366
|
transactions: import("@metamask/superstruct").Struct<Record<string, {
|
367
|
-
type: "send" | "receive" | "swap";
|
367
|
+
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
|
368
368
|
id: string;
|
369
369
|
from: {
|
370
370
|
address: string;
|
package/dist/events.d.mts
CHANGED
@@ -260,7 +260,7 @@ export declare const AccountTransactionsUpdatedEventStruct: import("@metamask/su
|
|
260
260
|
method: "notify:accountTransactionsUpdated";
|
261
261
|
params: {
|
262
262
|
transactions: Record<string, {
|
263
|
-
type: "send" | "receive" | "swap";
|
263
|
+
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
|
264
264
|
id: string;
|
265
265
|
from: {
|
266
266
|
address: string;
|
@@ -312,7 +312,7 @@ export declare const AccountTransactionsUpdatedEventStruct: import("@metamask/su
|
|
312
312
|
method: import("@metamask/superstruct").Struct<"notify:accountTransactionsUpdated", "notify:accountTransactionsUpdated">;
|
313
313
|
params: import("@metamask/superstruct").Struct<{
|
314
314
|
transactions: Record<string, {
|
315
|
-
type: "send" | "receive" | "swap";
|
315
|
+
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
|
316
316
|
id: string;
|
317
317
|
from: {
|
318
318
|
address: string;
|
@@ -364,7 +364,7 @@ export declare const AccountTransactionsUpdatedEventStruct: import("@metamask/su
|
|
364
364
|
* Transactions updates of accounts owned by the Snap.
|
365
365
|
*/
|
366
366
|
transactions: import("@metamask/superstruct").Struct<Record<string, {
|
367
|
-
type: "send" | "receive" | "swap";
|
367
|
+
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
|
368
368
|
id: string;
|
369
369
|
from: {
|
370
370
|
address: string;
|
package/dist/rpc.d.cts
CHANGED
@@ -217,7 +217,7 @@ export declare const ListAccountTransactionsRequestStruct: import("@metamask/sup
|
|
217
217
|
export type ListAccountTransactionsRequest = Infer<typeof ListAccountTransactionsRequestStruct>;
|
218
218
|
export declare const ListAccountTransactionsResponseStruct: import("@metamask/superstruct").Struct<{
|
219
219
|
data: {
|
220
|
-
type: "send" | "receive" | "swap";
|
220
|
+
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
|
221
221
|
id: string;
|
222
222
|
from: {
|
223
223
|
address: string;
|
@@ -267,7 +267,7 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
267
267
|
next: string | null;
|
268
268
|
}, {
|
269
269
|
data: import("@metamask/superstruct").Struct<{
|
270
|
-
type: "send" | "receive" | "swap";
|
270
|
+
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
|
271
271
|
id: string;
|
272
272
|
from: {
|
273
273
|
address: string;
|
@@ -314,7 +314,7 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
314
314
|
};
|
315
315
|
}[];
|
316
316
|
}[], import("@metamask/superstruct").Struct<{
|
317
|
-
type: "send" | "receive" | "swap";
|
317
|
+
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
|
318
318
|
id: string;
|
319
319
|
from: {
|
320
320
|
address: string;
|
@@ -371,10 +371,13 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
371
371
|
failed: "failed";
|
372
372
|
}>;
|
373
373
|
timestamp: import("@metamask/superstruct").Struct<number | null, null>;
|
374
|
-
type: import("@metamask/superstruct").Struct<"send" | "receive" | "swap", {
|
374
|
+
type: import("@metamask/superstruct").Struct<"unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive", {
|
375
|
+
unknown: "unknown";
|
375
376
|
send: "send";
|
376
377
|
receive: "receive";
|
377
378
|
swap: "swap";
|
379
|
+
"bridge:send": "bridge:send";
|
380
|
+
"bridge:receive": "bridge:receive";
|
378
381
|
}>;
|
379
382
|
from: import("@metamask/superstruct").Struct<{
|
380
383
|
address: string;
|
package/dist/rpc.d.cts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rpc.d.cts","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AA2BnD;;GAEG;AACH,oBAAY,gBAAgB;IAC1B,YAAY,yBAAyB;IACrC,UAAU,uBAAuB;IACjC,aAAa,0BAA0B;IACvC,gBAAgB,6BAA6B;IAC7C,iBAAiB,8BAA8B;IAC/C,uBAAuB,oCAAoC;IAC3D,kBAAkB,+BAA+B;IACjD,qBAAqB,kCAAkC;IACvD,mBAAmB,gCAAgC;IACnD,aAAa,0BAA0B;IACvC,aAAa,0BAA0B;IACvC,aAAa,0BAA0B;IACvC,YAAY,yBAAyB;IACrC,UAAU,uBAAuB;IACjC,aAAa,0BAA0B;IACvC,cAAc,2BAA2B;IACzC,aAAa,0BAA0B;CACxC;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE1D;AAYD,eAAO,MAAM,yBAAyB;;;;;;;;EAGpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE1E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;GAA8B,CAAC;AAEtE,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAK5E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;EAMlC,CAA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AO,MAAM,2BAA2B,oDAAgB,CAAC;AAEzD,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
package/dist/rpc.d.mts
CHANGED
@@ -217,7 +217,7 @@ export declare const ListAccountTransactionsRequestStruct: import("@metamask/sup
|
|
217
217
|
export type ListAccountTransactionsRequest = Infer<typeof ListAccountTransactionsRequestStruct>;
|
218
218
|
export declare const ListAccountTransactionsResponseStruct: import("@metamask/superstruct").Struct<{
|
219
219
|
data: {
|
220
|
-
type: "send" | "receive" | "swap";
|
220
|
+
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
|
221
221
|
id: string;
|
222
222
|
from: {
|
223
223
|
address: string;
|
@@ -267,7 +267,7 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
267
267
|
next: string | null;
|
268
268
|
}, {
|
269
269
|
data: import("@metamask/superstruct").Struct<{
|
270
|
-
type: "send" | "receive" | "swap";
|
270
|
+
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
|
271
271
|
id: string;
|
272
272
|
from: {
|
273
273
|
address: string;
|
@@ -314,7 +314,7 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
314
314
|
};
|
315
315
|
}[];
|
316
316
|
}[], import("@metamask/superstruct").Struct<{
|
317
|
-
type: "send" | "receive" | "swap";
|
317
|
+
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
|
318
318
|
id: string;
|
319
319
|
from: {
|
320
320
|
address: string;
|
@@ -371,10 +371,13 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
371
371
|
failed: "failed";
|
372
372
|
}>;
|
373
373
|
timestamp: import("@metamask/superstruct").Struct<number | null, null>;
|
374
|
-
type: import("@metamask/superstruct").Struct<"send" | "receive" | "swap", {
|
374
|
+
type: import("@metamask/superstruct").Struct<"unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive", {
|
375
|
+
unknown: "unknown";
|
375
376
|
send: "send";
|
376
377
|
receive: "receive";
|
377
378
|
swap: "swap";
|
379
|
+
"bridge:send": "bridge:send";
|
380
|
+
"bridge:receive": "bridge:receive";
|
378
381
|
}>;
|
379
382
|
from: import("@metamask/superstruct").Struct<{
|
380
383
|
address: string;
|
package/dist/rpc.d.mts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rpc.d.mts","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AA2BnD;;GAEG;AACH,oBAAY,gBAAgB;IAC1B,YAAY,yBAAyB;IACrC,UAAU,uBAAuB;IACjC,aAAa,0BAA0B;IACvC,gBAAgB,6BAA6B;IAC7C,iBAAiB,8BAA8B;IAC/C,uBAAuB,oCAAoC;IAC3D,kBAAkB,+BAA+B;IACjD,qBAAqB,kCAAkC;IACvD,mBAAmB,gCAAgC;IACnD,aAAa,0BAA0B;IACvC,aAAa,0BAA0B;IACvC,aAAa,0BAA0B;IACvC,YAAY,yBAAyB;IACrC,UAAU,uBAAuB;IACjC,aAAa,0BAA0B;IACvC,cAAc,2BAA2B;IACzC,aAAa,0BAA0B;CACxC;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE1D;AAYD,eAAO,MAAM,yBAAyB;;;;;;;;EAGpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE1E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;GAA8B,CAAC;AAEtE,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAK5E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;EAMlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,uBAAuB,C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