@metamask/keyring-api 21.5.0 → 21.6.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 +12 -1
- package/dist/api/transaction.cjs +64 -1
- package/dist/api/transaction.cjs.map +1 -1
- package/dist/api/transaction.d.cts +135 -0
- package/dist/api/transaction.d.cts.map +1 -1
- package/dist/api/transaction.d.mts +135 -0
- package/dist/api/transaction.d.mts.map +1 -1
- package/dist/api/transaction.mjs +64 -1
- package/dist/api/transaction.mjs.map +1 -1
- package/dist/api/v2/keyring-type.cjs +4 -0
- package/dist/api/v2/keyring-type.cjs.map +1 -1
- package/dist/api/v2/keyring-type.d.cts +5 -1
- package/dist/api/v2/keyring-type.d.cts.map +1 -1
- package/dist/api/v2/keyring-type.d.mts +5 -1
- package/dist/api/v2/keyring-type.d.mts.map +1 -1
- package/dist/api/v2/keyring-type.mjs +4 -0
- package/dist/api/v2/keyring-type.mjs.map +1 -1
- package/dist/events.d.cts +12 -0
- package/dist/events.d.cts.map +1 -1
- package/dist/events.d.mts +12 -0
- package/dist/events.d.mts.map +1 -1
- package/dist/rpc.d.cts +23 -0
- package/dist/rpc.d.cts.map +1 -1
- package/dist/rpc.d.mts +23 -0
- package/dist/rpc.d.mts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [21.6.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Add `KeyringType.Money` variant ([#472](https://github.com/MetaMask/accounts/pull/472))
|
|
15
|
+
- Add optional `details` field to `Transaction` type ([#445](https://github.com/MetaMask/accounts/pull/445))
|
|
16
|
+
- Add `SecurityAlertResponse` enum with values: `benign`, `warning`, `malicious`
|
|
17
|
+
- Add optional `origin` field (string) to track transaction request source
|
|
18
|
+
- Add optional `securityAlertResponse` field for Security Alert API responses
|
|
19
|
+
|
|
10
20
|
## [21.5.0]
|
|
11
21
|
|
|
12
22
|
### Added
|
|
@@ -700,7 +710,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
700
710
|
- SnapController keyring client. It is intended to be used by MetaMask to talk to the snap.
|
|
701
711
|
- Helper functions to create keyring handler in the snap.
|
|
702
712
|
|
|
703
|
-
[Unreleased]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@21.
|
|
713
|
+
[Unreleased]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@21.6.0...HEAD
|
|
714
|
+
[21.6.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@21.5.0...@metamask/keyring-api@21.6.0
|
|
704
715
|
[21.5.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@21.4.0...@metamask/keyring-api@21.5.0
|
|
705
716
|
[21.4.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@21.3.0...@metamask/keyring-api@21.4.0
|
|
706
717
|
[21.3.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@21.2.0...@metamask/keyring-api@21.3.0
|
package/dist/api/transaction.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TransactionsPageStruct = exports.TransactionStruct = exports.TransactionEventStruct = exports.TransactionType = exports.TransactionStatus = exports.FeeType = void 0;
|
|
3
|
+
exports.TransactionsPageStruct = exports.TransactionStruct = exports.TransactionEventStruct = exports.TransactionDetailsStruct = exports.SecurityAlertResponse = exports.TransactionType = exports.TransactionStatus = exports.FeeType = void 0;
|
|
4
4
|
const keyring_utils_1 = require("@metamask/keyring-utils");
|
|
5
5
|
const superstruct_1 = require("@metamask/superstruct");
|
|
6
6
|
const asset_1 = require("./asset.cjs");
|
|
@@ -155,6 +155,61 @@ var TransactionType;
|
|
|
155
155
|
*/
|
|
156
156
|
TransactionType["Unknown"] = "unknown";
|
|
157
157
|
})(TransactionType || (exports.TransactionType = TransactionType = {}));
|
|
158
|
+
/**
|
|
159
|
+
* Security alert response values from the Security Alert API.
|
|
160
|
+
*/
|
|
161
|
+
var SecurityAlertResponse;
|
|
162
|
+
(function (SecurityAlertResponse) {
|
|
163
|
+
/**
|
|
164
|
+
* The transaction is considered safe with no detected security issues.
|
|
165
|
+
*/
|
|
166
|
+
SecurityAlertResponse["Benign"] = "Benign";
|
|
167
|
+
/**
|
|
168
|
+
* The transaction has potential security concerns that warrant user attention.
|
|
169
|
+
*/
|
|
170
|
+
SecurityAlertResponse["Warning"] = "Warning";
|
|
171
|
+
/**
|
|
172
|
+
* The transaction has been identified as malicious and should be avoided.
|
|
173
|
+
*/
|
|
174
|
+
SecurityAlertResponse["Malicious"] = "Malicious";
|
|
175
|
+
})(SecurityAlertResponse || (exports.SecurityAlertResponse = SecurityAlertResponse = {}));
|
|
176
|
+
/**
|
|
177
|
+
* This struct represents additional transaction details.
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* ```ts
|
|
181
|
+
* {
|
|
182
|
+
* origin: 'https://dapp.example.com',
|
|
183
|
+
* securityAlertResponse: 'Benign',
|
|
184
|
+
* }
|
|
185
|
+
* ```
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* ```ts
|
|
189
|
+
* {
|
|
190
|
+
* origin: 'metamask',
|
|
191
|
+
* securityAlertResponse: 'Warning',
|
|
192
|
+
* }
|
|
193
|
+
* ```
|
|
194
|
+
*/
|
|
195
|
+
exports.TransactionDetailsStruct = (0, keyring_utils_1.object)({
|
|
196
|
+
/**
|
|
197
|
+
* Origin of the original transaction request.
|
|
198
|
+
*
|
|
199
|
+
* This can be either 'metamask' for internally initiated transactions, or a URL
|
|
200
|
+
* (e.g., 'https://dapp.example.com') for dapp-initiated transactions.
|
|
201
|
+
*/
|
|
202
|
+
origin: (0, keyring_utils_1.exactOptional)((0, superstruct_1.string)()),
|
|
203
|
+
/**
|
|
204
|
+
* Response from the Security Alert API indicating the security assessment of the
|
|
205
|
+
* transaction.
|
|
206
|
+
*/
|
|
207
|
+
securityAlertResponse: (0, keyring_utils_1.exactOptional)((0, superstruct_1.enums)([
|
|
208
|
+
`${SecurityAlertResponse.Benign}`,
|
|
209
|
+
`${SecurityAlertResponse.Warning}`,
|
|
210
|
+
`${SecurityAlertResponse.Malicious}`,
|
|
211
|
+
])),
|
|
212
|
+
});
|
|
158
213
|
/**
|
|
159
214
|
* This struct represents a transaction event.
|
|
160
215
|
*/
|
|
@@ -291,6 +346,14 @@ exports.TransactionStruct = (0, keyring_utils_1.object)({
|
|
|
291
346
|
* all transactions.
|
|
292
347
|
*/
|
|
293
348
|
events: (0, superstruct_1.array)(exports.TransactionEventStruct),
|
|
349
|
+
/**
|
|
350
|
+
* Additional transaction details {@see TransactionDetailsStruct}.
|
|
351
|
+
*
|
|
352
|
+
* Contains contextual information about the transaction such as its origin and
|
|
353
|
+
* security assessment. This field is optional and may not be present for all
|
|
354
|
+
* transactions.
|
|
355
|
+
*/
|
|
356
|
+
details: (0, keyring_utils_1.exactOptional)(exports.TransactionDetailsStruct),
|
|
294
357
|
});
|
|
295
358
|
/**
|
|
296
359
|
* This struct represents a page of transactions.
|
|
@@ -1 +1 @@
|
|
|
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;;G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EAAC,SAAS,CAAC;IAEtB;;;;;OAKG;IACH,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 * 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 * 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.StakeDeposit}`,\n `${TransactionType.StakeWithdraw}`,\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"]}
|
|
1
|
+
{"version":3,"file":"transaction.cjs","sourceRoot":"","sources":["../../src/api/transaction.ts"],"names":[],"mappings":";;;AACA,2DAA4E;AAE5E,uD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,EAAC,IAAA,oBAAM,GAAE,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 * 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.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"]}
|
|
@@ -90,6 +90,63 @@ export declare enum TransactionType {
|
|
|
90
90
|
*/
|
|
91
91
|
Unknown = "unknown"
|
|
92
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Security alert response values from the Security Alert API.
|
|
95
|
+
*/
|
|
96
|
+
export declare enum SecurityAlertResponse {
|
|
97
|
+
/**
|
|
98
|
+
* The transaction is considered safe with no detected security issues.
|
|
99
|
+
*/
|
|
100
|
+
Benign = "Benign",
|
|
101
|
+
/**
|
|
102
|
+
* The transaction has potential security concerns that warrant user attention.
|
|
103
|
+
*/
|
|
104
|
+
Warning = "Warning",
|
|
105
|
+
/**
|
|
106
|
+
* The transaction has been identified as malicious and should be avoided.
|
|
107
|
+
*/
|
|
108
|
+
Malicious = "Malicious"
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* This struct represents additional transaction details.
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* ```ts
|
|
115
|
+
* {
|
|
116
|
+
* origin: 'https://dapp.example.com',
|
|
117
|
+
* securityAlertResponse: 'Benign',
|
|
118
|
+
* }
|
|
119
|
+
* ```
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```ts
|
|
123
|
+
* {
|
|
124
|
+
* origin: 'metamask',
|
|
125
|
+
* securityAlertResponse: 'Warning',
|
|
126
|
+
* }
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
export declare const TransactionDetailsStruct: import("@metamask/superstruct").Struct<{
|
|
130
|
+
origin?: string;
|
|
131
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
132
|
+
}, {
|
|
133
|
+
/**
|
|
134
|
+
* Origin of the original transaction request.
|
|
135
|
+
*
|
|
136
|
+
* This can be either 'metamask' for internally initiated transactions, or a URL
|
|
137
|
+
* (e.g., 'https://dapp.example.com') for dapp-initiated transactions.
|
|
138
|
+
*/
|
|
139
|
+
origin: import("@metamask/superstruct").Struct<string | import("@metamask/keyring-utils").ExactOptionalTag, null>;
|
|
140
|
+
/**
|
|
141
|
+
* Response from the Security Alert API indicating the security assessment of the
|
|
142
|
+
* transaction.
|
|
143
|
+
*/
|
|
144
|
+
securityAlertResponse: import("@metamask/superstruct").Struct<import("@metamask/keyring-utils").ExactOptionalTag | "Benign" | "Warning" | "Malicious", {
|
|
145
|
+
Benign: "Benign";
|
|
146
|
+
Warning: "Warning";
|
|
147
|
+
Malicious: "Malicious";
|
|
148
|
+
}>;
|
|
149
|
+
}>;
|
|
93
150
|
/**
|
|
94
151
|
* This struct represents a transaction event.
|
|
95
152
|
*/
|
|
@@ -215,6 +272,10 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
|
|
|
215
272
|
fungible: false;
|
|
216
273
|
};
|
|
217
274
|
}[];
|
|
275
|
+
details?: {
|
|
276
|
+
origin?: string;
|
|
277
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
278
|
+
};
|
|
218
279
|
}, {
|
|
219
280
|
/**
|
|
220
281
|
* Chain-specific transaction ID.
|
|
@@ -416,7 +477,41 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
|
|
|
416
477
|
*/
|
|
417
478
|
timestamp: import("@metamask/superstruct").Struct<number | null, null>;
|
|
418
479
|
}>>;
|
|
480
|
+
/**
|
|
481
|
+
* Additional transaction details {@see TransactionDetailsStruct}.
|
|
482
|
+
*
|
|
483
|
+
* Contains contextual information about the transaction such as its origin and
|
|
484
|
+
* security assessment. This field is optional and may not be present for all
|
|
485
|
+
* transactions.
|
|
486
|
+
*/
|
|
487
|
+
details: import("@metamask/superstruct").Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
|
|
488
|
+
origin?: string;
|
|
489
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
490
|
+
}, {
|
|
491
|
+
/**
|
|
492
|
+
* Origin of the original transaction request.
|
|
493
|
+
*
|
|
494
|
+
* This can be either 'metamask' for internally initiated transactions, or a URL
|
|
495
|
+
* (e.g., 'https://dapp.example.com') for dapp-initiated transactions.
|
|
496
|
+
*/
|
|
497
|
+
origin: import("@metamask/superstruct").Struct<string | import("@metamask/keyring-utils").ExactOptionalTag, null>;
|
|
498
|
+
/**
|
|
499
|
+
* Response from the Security Alert API indicating the security assessment of the
|
|
500
|
+
* transaction.
|
|
501
|
+
*/
|
|
502
|
+
securityAlertResponse: import("@metamask/superstruct").Struct<import("@metamask/keyring-utils").ExactOptionalTag | "Benign" | "Warning" | "Malicious", {
|
|
503
|
+
Benign: "Benign";
|
|
504
|
+
Warning: "Warning";
|
|
505
|
+
Malicious: "Malicious";
|
|
506
|
+
}>;
|
|
507
|
+
}>;
|
|
419
508
|
}>;
|
|
509
|
+
/**
|
|
510
|
+
* Transaction details object.
|
|
511
|
+
*
|
|
512
|
+
* See {@link TransactionDetailsStruct}.
|
|
513
|
+
*/
|
|
514
|
+
export type TransactionDetails = Infer<typeof TransactionDetailsStruct>;
|
|
420
515
|
/**
|
|
421
516
|
* Transaction object.
|
|
422
517
|
*
|
|
@@ -498,6 +593,10 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
|
|
|
498
593
|
fungible: false;
|
|
499
594
|
};
|
|
500
595
|
}[];
|
|
596
|
+
details?: {
|
|
597
|
+
origin?: string;
|
|
598
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
599
|
+
};
|
|
501
600
|
}[];
|
|
502
601
|
next: string | null;
|
|
503
602
|
}, {
|
|
@@ -551,6 +650,10 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
|
|
|
551
650
|
fungible: false;
|
|
552
651
|
};
|
|
553
652
|
}[];
|
|
653
|
+
details?: {
|
|
654
|
+
origin?: string;
|
|
655
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
656
|
+
};
|
|
554
657
|
}[], import("@metamask/superstruct").Struct<{
|
|
555
658
|
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw";
|
|
556
659
|
id: string;
|
|
@@ -598,6 +701,10 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
|
|
|
598
701
|
fungible: false;
|
|
599
702
|
};
|
|
600
703
|
}[];
|
|
704
|
+
details?: {
|
|
705
|
+
origin?: string;
|
|
706
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
707
|
+
};
|
|
601
708
|
}, {
|
|
602
709
|
/**
|
|
603
710
|
* Chain-specific transaction ID.
|
|
@@ -799,6 +906,34 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
|
|
|
799
906
|
*/
|
|
800
907
|
timestamp: import("@metamask/superstruct").Struct<number | null, null>;
|
|
801
908
|
}>>;
|
|
909
|
+
/**
|
|
910
|
+
* Additional transaction details {@see TransactionDetailsStruct}.
|
|
911
|
+
*
|
|
912
|
+
* Contains contextual information about the transaction such as its origin and
|
|
913
|
+
* security assessment. This field is optional and may not be present for all
|
|
914
|
+
* transactions.
|
|
915
|
+
*/
|
|
916
|
+
details: import("@metamask/superstruct").Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
|
|
917
|
+
origin?: string;
|
|
918
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
919
|
+
}, {
|
|
920
|
+
/**
|
|
921
|
+
* Origin of the original transaction request.
|
|
922
|
+
*
|
|
923
|
+
* This can be either 'metamask' for internally initiated transactions, or a URL
|
|
924
|
+
* (e.g., 'https://dapp.example.com') for dapp-initiated transactions.
|
|
925
|
+
*/
|
|
926
|
+
origin: import("@metamask/superstruct").Struct<string | import("@metamask/keyring-utils").ExactOptionalTag, null>;
|
|
927
|
+
/**
|
|
928
|
+
* Response from the Security Alert API indicating the security assessment of the
|
|
929
|
+
* transaction.
|
|
930
|
+
*/
|
|
931
|
+
securityAlertResponse: import("@metamask/superstruct").Struct<import("@metamask/keyring-utils").ExactOptionalTag | "Benign" | "Warning" | "Malicious", {
|
|
932
|
+
Benign: "Benign";
|
|
933
|
+
Warning: "Warning";
|
|
934
|
+
Malicious: "Malicious";
|
|
935
|
+
}>;
|
|
936
|
+
}>;
|
|
802
937
|
}>>;
|
|
803
938
|
/**
|
|
804
939
|
* Next cursor to iterate over the results. If null, there are no more
|
|
@@ -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;;;OAG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AGH;;WAEG;;QAGH;;WAEG;;;;;;;QAQH;;;;WAIG;;QAGH;;;WAGG;;;;;;;;;;;QAYH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;YA7TH;;eAEG;;YAGH;;eAEG;;;;;;;;;;;QAyTH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;YAlUH;;eAEG;;YAGH;;eAEG;;;;;;;;;;;QA8TH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;YAlSH;;eAEG;;;;;YAGH;;eAEG;;;;;;;;;;;QA8RH;;;;;WAKG;;;;;;;;YA7IH;;eAEG;;;;;;;YAQH;;eAEG;;;QAoIH;;;;;;WAMG;;;;;YA/KH;;;;;eAKG;;YAGH;;;eAGG;;;;;;;;IAuNH;;;OAGG;;EAEH,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,WAAW,CACxC,OAAO,sBAAsB,EAC7B,SAAS,CAAC,WAAW,CAAC,CACvB,CAAC"}
|
|
@@ -90,6 +90,63 @@ export declare enum TransactionType {
|
|
|
90
90
|
*/
|
|
91
91
|
Unknown = "unknown"
|
|
92
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Security alert response values from the Security Alert API.
|
|
95
|
+
*/
|
|
96
|
+
export declare enum SecurityAlertResponse {
|
|
97
|
+
/**
|
|
98
|
+
* The transaction is considered safe with no detected security issues.
|
|
99
|
+
*/
|
|
100
|
+
Benign = "Benign",
|
|
101
|
+
/**
|
|
102
|
+
* The transaction has potential security concerns that warrant user attention.
|
|
103
|
+
*/
|
|
104
|
+
Warning = "Warning",
|
|
105
|
+
/**
|
|
106
|
+
* The transaction has been identified as malicious and should be avoided.
|
|
107
|
+
*/
|
|
108
|
+
Malicious = "Malicious"
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* This struct represents additional transaction details.
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* ```ts
|
|
115
|
+
* {
|
|
116
|
+
* origin: 'https://dapp.example.com',
|
|
117
|
+
* securityAlertResponse: 'Benign',
|
|
118
|
+
* }
|
|
119
|
+
* ```
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```ts
|
|
123
|
+
* {
|
|
124
|
+
* origin: 'metamask',
|
|
125
|
+
* securityAlertResponse: 'Warning',
|
|
126
|
+
* }
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
export declare const TransactionDetailsStruct: import("@metamask/superstruct").Struct<{
|
|
130
|
+
origin?: string;
|
|
131
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
132
|
+
}, {
|
|
133
|
+
/**
|
|
134
|
+
* Origin of the original transaction request.
|
|
135
|
+
*
|
|
136
|
+
* This can be either 'metamask' for internally initiated transactions, or a URL
|
|
137
|
+
* (e.g., 'https://dapp.example.com') for dapp-initiated transactions.
|
|
138
|
+
*/
|
|
139
|
+
origin: import("@metamask/superstruct").Struct<string | import("@metamask/keyring-utils").ExactOptionalTag, null>;
|
|
140
|
+
/**
|
|
141
|
+
* Response from the Security Alert API indicating the security assessment of the
|
|
142
|
+
* transaction.
|
|
143
|
+
*/
|
|
144
|
+
securityAlertResponse: import("@metamask/superstruct").Struct<import("@metamask/keyring-utils").ExactOptionalTag | "Benign" | "Warning" | "Malicious", {
|
|
145
|
+
Benign: "Benign";
|
|
146
|
+
Warning: "Warning";
|
|
147
|
+
Malicious: "Malicious";
|
|
148
|
+
}>;
|
|
149
|
+
}>;
|
|
93
150
|
/**
|
|
94
151
|
* This struct represents a transaction event.
|
|
95
152
|
*/
|
|
@@ -215,6 +272,10 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
|
|
|
215
272
|
fungible: false;
|
|
216
273
|
};
|
|
217
274
|
}[];
|
|
275
|
+
details?: {
|
|
276
|
+
origin?: string;
|
|
277
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
278
|
+
};
|
|
218
279
|
}, {
|
|
219
280
|
/**
|
|
220
281
|
* Chain-specific transaction ID.
|
|
@@ -416,7 +477,41 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
|
|
|
416
477
|
*/
|
|
417
478
|
timestamp: import("@metamask/superstruct").Struct<number | null, null>;
|
|
418
479
|
}>>;
|
|
480
|
+
/**
|
|
481
|
+
* Additional transaction details {@see TransactionDetailsStruct}.
|
|
482
|
+
*
|
|
483
|
+
* Contains contextual information about the transaction such as its origin and
|
|
484
|
+
* security assessment. This field is optional and may not be present for all
|
|
485
|
+
* transactions.
|
|
486
|
+
*/
|
|
487
|
+
details: import("@metamask/superstruct").Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
|
|
488
|
+
origin?: string;
|
|
489
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
490
|
+
}, {
|
|
491
|
+
/**
|
|
492
|
+
* Origin of the original transaction request.
|
|
493
|
+
*
|
|
494
|
+
* This can be either 'metamask' for internally initiated transactions, or a URL
|
|
495
|
+
* (e.g., 'https://dapp.example.com') for dapp-initiated transactions.
|
|
496
|
+
*/
|
|
497
|
+
origin: import("@metamask/superstruct").Struct<string | import("@metamask/keyring-utils").ExactOptionalTag, null>;
|
|
498
|
+
/**
|
|
499
|
+
* Response from the Security Alert API indicating the security assessment of the
|
|
500
|
+
* transaction.
|
|
501
|
+
*/
|
|
502
|
+
securityAlertResponse: import("@metamask/superstruct").Struct<import("@metamask/keyring-utils").ExactOptionalTag | "Benign" | "Warning" | "Malicious", {
|
|
503
|
+
Benign: "Benign";
|
|
504
|
+
Warning: "Warning";
|
|
505
|
+
Malicious: "Malicious";
|
|
506
|
+
}>;
|
|
507
|
+
}>;
|
|
419
508
|
}>;
|
|
509
|
+
/**
|
|
510
|
+
* Transaction details object.
|
|
511
|
+
*
|
|
512
|
+
* See {@link TransactionDetailsStruct}.
|
|
513
|
+
*/
|
|
514
|
+
export type TransactionDetails = Infer<typeof TransactionDetailsStruct>;
|
|
420
515
|
/**
|
|
421
516
|
* Transaction object.
|
|
422
517
|
*
|
|
@@ -498,6 +593,10 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
|
|
|
498
593
|
fungible: false;
|
|
499
594
|
};
|
|
500
595
|
}[];
|
|
596
|
+
details?: {
|
|
597
|
+
origin?: string;
|
|
598
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
599
|
+
};
|
|
501
600
|
}[];
|
|
502
601
|
next: string | null;
|
|
503
602
|
}, {
|
|
@@ -551,6 +650,10 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
|
|
|
551
650
|
fungible: false;
|
|
552
651
|
};
|
|
553
652
|
}[];
|
|
653
|
+
details?: {
|
|
654
|
+
origin?: string;
|
|
655
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
656
|
+
};
|
|
554
657
|
}[], import("@metamask/superstruct").Struct<{
|
|
555
658
|
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw";
|
|
556
659
|
id: string;
|
|
@@ -598,6 +701,10 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
|
|
|
598
701
|
fungible: false;
|
|
599
702
|
};
|
|
600
703
|
}[];
|
|
704
|
+
details?: {
|
|
705
|
+
origin?: string;
|
|
706
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
707
|
+
};
|
|
601
708
|
}, {
|
|
602
709
|
/**
|
|
603
710
|
* Chain-specific transaction ID.
|
|
@@ -799,6 +906,34 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
|
|
|
799
906
|
*/
|
|
800
907
|
timestamp: import("@metamask/superstruct").Struct<number | null, null>;
|
|
801
908
|
}>>;
|
|
909
|
+
/**
|
|
910
|
+
* Additional transaction details {@see TransactionDetailsStruct}.
|
|
911
|
+
*
|
|
912
|
+
* Contains contextual information about the transaction such as its origin and
|
|
913
|
+
* security assessment. This field is optional and may not be present for all
|
|
914
|
+
* transactions.
|
|
915
|
+
*/
|
|
916
|
+
details: import("@metamask/superstruct").Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
|
|
917
|
+
origin?: string;
|
|
918
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
919
|
+
}, {
|
|
920
|
+
/**
|
|
921
|
+
* Origin of the original transaction request.
|
|
922
|
+
*
|
|
923
|
+
* This can be either 'metamask' for internally initiated transactions, or a URL
|
|
924
|
+
* (e.g., 'https://dapp.example.com') for dapp-initiated transactions.
|
|
925
|
+
*/
|
|
926
|
+
origin: import("@metamask/superstruct").Struct<string | import("@metamask/keyring-utils").ExactOptionalTag, null>;
|
|
927
|
+
/**
|
|
928
|
+
* Response from the Security Alert API indicating the security assessment of the
|
|
929
|
+
* transaction.
|
|
930
|
+
*/
|
|
931
|
+
securityAlertResponse: import("@metamask/superstruct").Struct<import("@metamask/keyring-utils").ExactOptionalTag | "Benign" | "Warning" | "Malicious", {
|
|
932
|
+
Benign: "Benign";
|
|
933
|
+
Warning: "Warning";
|
|
934
|
+
Malicious: "Malicious";
|
|
935
|
+
}>;
|
|
936
|
+
}>;
|
|
802
937
|
}>>;
|
|
803
938
|
/**
|
|
804
939
|
* Next cursor to iterate over the results. If null, there are no more
|
|
@@ -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;IAEb;;;OAGG;IACH,UAAU,gBAAgB;IAE1B;;;OAGG;IACH,aAAa,mBAAmB;IAEhC;;OAEG;IACH,YAAY,kBAAkB;IAE9B;;OAEG;IACH,aAAa,mBAAmB;
|
|
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;;;OAGG;IACH,aAAa,mBAAmB;IAEhC;;OAEG;IACH,YAAY,kBAAkB;IAE9B;;OAEG;IACH,aAAa,mBAAmB;IAEhC;;;OAGG;IACH,OAAO,YAAY;CACpB;AAED;;GAEG;AACH,oBAAY,qBAAqB;IAC/B;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,OAAO,YAAY;IAEnB;;OAEG;IACH,SAAS,cAAc;CACxB;AAED;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA5HH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;;;;QAQH;;;;WAIG;;QAGH;;;WAGG;;;;;;;;;;;QAYH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;YA7TH;;eAEG;;YAGH;;eAEG;;;;;;;;;;;QAyTH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;YAlUH;;eAEG;;YAGH;;eAEG;;;;;;;;;;;QA8TH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;YAlSH;;eAEG;;;;;YAGH;;eAEG;;;;;;;;;;;QA8RH;;;;;WAKG;;;;;;;;YA7IH;;eAEG;;;;;;;YAQH;;eAEG;;;QAoIH;;;;;;WAMG;;;;;YA/KH;;;;;eAKG;;YAGH;;;eAGG;;;;;;;;IAuNH;;;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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { object, UuidStruct } from "@metamask/keyring-utils";
|
|
1
|
+
import { exactOptional, object, UuidStruct } from "@metamask/keyring-utils";
|
|
2
2
|
import { array, enums, nullable, number, string } from "@metamask/superstruct";
|
|
3
3
|
import { AssetStruct } from "./asset.mjs";
|
|
4
4
|
import { CaipChainIdStruct } from "./caip.mjs";
|
|
@@ -152,6 +152,61 @@ export var TransactionType;
|
|
|
152
152
|
*/
|
|
153
153
|
TransactionType["Unknown"] = "unknown";
|
|
154
154
|
})(TransactionType || (TransactionType = {}));
|
|
155
|
+
/**
|
|
156
|
+
* Security alert response values from the Security Alert API.
|
|
157
|
+
*/
|
|
158
|
+
export var SecurityAlertResponse;
|
|
159
|
+
(function (SecurityAlertResponse) {
|
|
160
|
+
/**
|
|
161
|
+
* The transaction is considered safe with no detected security issues.
|
|
162
|
+
*/
|
|
163
|
+
SecurityAlertResponse["Benign"] = "Benign";
|
|
164
|
+
/**
|
|
165
|
+
* The transaction has potential security concerns that warrant user attention.
|
|
166
|
+
*/
|
|
167
|
+
SecurityAlertResponse["Warning"] = "Warning";
|
|
168
|
+
/**
|
|
169
|
+
* The transaction has been identified as malicious and should be avoided.
|
|
170
|
+
*/
|
|
171
|
+
SecurityAlertResponse["Malicious"] = "Malicious";
|
|
172
|
+
})(SecurityAlertResponse || (SecurityAlertResponse = {}));
|
|
173
|
+
/**
|
|
174
|
+
* This struct represents additional transaction details.
|
|
175
|
+
*
|
|
176
|
+
* @example
|
|
177
|
+
* ```ts
|
|
178
|
+
* {
|
|
179
|
+
* origin: 'https://dapp.example.com',
|
|
180
|
+
* securityAlertResponse: 'Benign',
|
|
181
|
+
* }
|
|
182
|
+
* ```
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```ts
|
|
186
|
+
* {
|
|
187
|
+
* origin: 'metamask',
|
|
188
|
+
* securityAlertResponse: 'Warning',
|
|
189
|
+
* }
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
192
|
+
export const TransactionDetailsStruct = object({
|
|
193
|
+
/**
|
|
194
|
+
* Origin of the original transaction request.
|
|
195
|
+
*
|
|
196
|
+
* This can be either 'metamask' for internally initiated transactions, or a URL
|
|
197
|
+
* (e.g., 'https://dapp.example.com') for dapp-initiated transactions.
|
|
198
|
+
*/
|
|
199
|
+
origin: exactOptional(string()),
|
|
200
|
+
/**
|
|
201
|
+
* Response from the Security Alert API indicating the security assessment of the
|
|
202
|
+
* transaction.
|
|
203
|
+
*/
|
|
204
|
+
securityAlertResponse: exactOptional(enums([
|
|
205
|
+
`${SecurityAlertResponse.Benign}`,
|
|
206
|
+
`${SecurityAlertResponse.Warning}`,
|
|
207
|
+
`${SecurityAlertResponse.Malicious}`,
|
|
208
|
+
])),
|
|
209
|
+
});
|
|
155
210
|
/**
|
|
156
211
|
* This struct represents a transaction event.
|
|
157
212
|
*/
|
|
@@ -288,6 +343,14 @@ export const TransactionStruct = object({
|
|
|
288
343
|
* all transactions.
|
|
289
344
|
*/
|
|
290
345
|
events: array(TransactionEventStruct),
|
|
346
|
+
/**
|
|
347
|
+
* Additional transaction details {@see TransactionDetailsStruct}.
|
|
348
|
+
*
|
|
349
|
+
* Contains contextual information about the transaction such as its origin and
|
|
350
|
+
* security assessment. This field is optional and may not be present for all
|
|
351
|
+
* transactions.
|
|
352
|
+
*/
|
|
353
|
+
details: exactOptional(TransactionDetailsStruct),
|
|
291
354
|
});
|
|
292
355
|
/**
|
|
293
356
|
* This struct represents a page of transactions.
|
|
@@ -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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B,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 * 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 * 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.StakeDeposit}`,\n `${TransactionType.StakeWithdraw}`,\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"]}
|
|
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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AiB,CAAC,MAAM,EAAE;KAC9B,CAAC;IAEF;;;;OAIG;IACH,SAAS,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IAE7B;;;OAGG;IACH,IAAI,EAAE,KAAK,CAAC;QACV,GAAG,eAAe,CAAC,IAAI,EAAE;QACzB,GAAG,eAAe,CAAC,OAAO,EAAE;QAC5B,GAAG,eAAe,CAAC,IAAI,EAAE;QACzB,GAAG,eAAe,CAAC,UAAU,EAAE;QAC/B,GAAG,eAAe,CAAC,aAAa,EAAE;QAClC,GAAG,eAAe,CAAC,YAAY,EAAE;QACjC,GAAG,eAAe,CAAC,aAAa,EAAE;QAClC,GAAG,eAAe,CAAC,OAAO,EAAE;KAC7B,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;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 * 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.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"]}
|
|
@@ -40,5 +40,9 @@ var KeyringType;
|
|
|
40
40
|
* Represents keyring backed by a OneKey hardware wallet.
|
|
41
41
|
*/
|
|
42
42
|
KeyringType["OneKey"] = "onekey";
|
|
43
|
+
/**
|
|
44
|
+
* Represents keyring for money accounts.
|
|
45
|
+
*/
|
|
46
|
+
KeyringType["Money"] = "money";
|
|
43
47
|
})(KeyringType || (exports.KeyringType = KeyringType = {}));
|
|
44
48
|
//# sourceMappingURL=keyring-type.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyring-type.cjs","sourceRoot":"","sources":["../../../src/api/v2/keyring-type.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,
|
|
1
|
+
{"version":3,"file":"keyring-type.cjs","sourceRoot":"","sources":["../../../src/api/v2/keyring-type.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,WA+CX;AA/CD,WAAY,WAAW;IACrB;;OAEG;IACH,wBAAS,CAAA;IAET;;OAEG;IACH,yCAA0B,CAAA;IAE1B;;;;OAIG;IACH,wBAAS,CAAA;IAET;;OAEG;IACH,4BAAa,CAAA;IAEb;;OAEG;IACH,gCAAiB,CAAA;IAEjB;;OAEG;IACH,kCAAmB,CAAA;IAEnB;;OAEG;IACH,gCAAiB,CAAA;IAEjB;;OAEG;IACH,gCAAiB,CAAA;IAEjB;;OAEG;IACH,8BAAe,CAAA;AACjB,CAAC,EA/CW,WAAW,2BAAX,WAAW,QA+CtB","sourcesContent":["/**\n * Enum representing the different types of keyrings supported.\n */\nexport enum KeyringType {\n /**\n * Represents a hierarchical deterministic (HD) keyring.\n */\n Hd = 'hd',\n\n /**\n * Represents a keyring that directly stores private keys.\n */\n PrivateKey = 'private-key',\n\n /**\n * Represents a keyring that implements the QR protocol.\n *\n * See: https://eips.ethereum.org/EIPS/eip-4527\n */\n Qr = 'qr',\n\n /**\n * Represents keyring backed by a Snap.\n */\n Snap = 'snap',\n\n /**\n * Represents keyring backed by a Ledger hardware wallet.\n */\n Ledger = 'ledger',\n\n /**\n * Represents keyring backed by a Lattice hardware wallet.\n */\n Lattice = 'lattice',\n\n /**\n * Represents keyring backed by a Trezor hardware wallet.\n */\n Trezor = 'trezor',\n\n /**\n * Represents keyring backed by a OneKey hardware wallet.\n */\n OneKey = 'onekey',\n\n /**\n * Represents keyring for money accounts.\n */\n Money = 'money',\n}\n"]}
|
|
@@ -35,6 +35,10 @@ export declare enum KeyringType {
|
|
|
35
35
|
/**
|
|
36
36
|
* Represents keyring backed by a OneKey hardware wallet.
|
|
37
37
|
*/
|
|
38
|
-
OneKey = "onekey"
|
|
38
|
+
OneKey = "onekey",
|
|
39
|
+
/**
|
|
40
|
+
* Represents keyring for money accounts.
|
|
41
|
+
*/
|
|
42
|
+
Money = "money"
|
|
39
43
|
}
|
|
40
44
|
//# sourceMappingURL=keyring-type.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyring-type.d.cts","sourceRoot":"","sources":["../../../src/api/v2/keyring-type.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,WAAW;IACrB;;OAEG;IACH,EAAE,OAAO;IAET;;OAEG;IACH,UAAU,gBAAgB;IAE1B;;;;OAIG;IACH,EAAE,OAAO;IAET;;OAEG;IACH,IAAI,SAAS;IAEb;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,OAAO,YAAY;IAEnB;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,MAAM,WAAW;
|
|
1
|
+
{"version":3,"file":"keyring-type.d.cts","sourceRoot":"","sources":["../../../src/api/v2/keyring-type.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,WAAW;IACrB;;OAEG;IACH,EAAE,OAAO;IAET;;OAEG;IACH,UAAU,gBAAgB;IAE1B;;;;OAIG;IACH,EAAE,OAAO;IAET;;OAEG;IACH,IAAI,SAAS;IAEb;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,OAAO,YAAY;IAEnB;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,KAAK,UAAU;CAChB"}
|
|
@@ -35,6 +35,10 @@ export declare enum KeyringType {
|
|
|
35
35
|
/**
|
|
36
36
|
* Represents keyring backed by a OneKey hardware wallet.
|
|
37
37
|
*/
|
|
38
|
-
OneKey = "onekey"
|
|
38
|
+
OneKey = "onekey",
|
|
39
|
+
/**
|
|
40
|
+
* Represents keyring for money accounts.
|
|
41
|
+
*/
|
|
42
|
+
Money = "money"
|
|
39
43
|
}
|
|
40
44
|
//# sourceMappingURL=keyring-type.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyring-type.d.mts","sourceRoot":"","sources":["../../../src/api/v2/keyring-type.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,WAAW;IACrB;;OAEG;IACH,EAAE,OAAO;IAET;;OAEG;IACH,UAAU,gBAAgB;IAE1B;;;;OAIG;IACH,EAAE,OAAO;IAET;;OAEG;IACH,IAAI,SAAS;IAEb;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,OAAO,YAAY;IAEnB;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,MAAM,WAAW;
|
|
1
|
+
{"version":3,"file":"keyring-type.d.mts","sourceRoot":"","sources":["../../../src/api/v2/keyring-type.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,WAAW;IACrB;;OAEG;IACH,EAAE,OAAO;IAET;;OAEG;IACH,UAAU,gBAAgB;IAE1B;;;;OAIG;IACH,EAAE,OAAO;IAET;;OAEG;IACH,IAAI,SAAS;IAEb;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,OAAO,YAAY;IAEnB;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,KAAK,UAAU;CAChB"}
|
|
@@ -37,5 +37,9 @@ export var KeyringType;
|
|
|
37
37
|
* Represents keyring backed by a OneKey hardware wallet.
|
|
38
38
|
*/
|
|
39
39
|
KeyringType["OneKey"] = "onekey";
|
|
40
|
+
/**
|
|
41
|
+
* Represents keyring for money accounts.
|
|
42
|
+
*/
|
|
43
|
+
KeyringType["Money"] = "money";
|
|
40
44
|
})(KeyringType || (KeyringType = {}));
|
|
41
45
|
//# sourceMappingURL=keyring-type.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyring-type.mjs","sourceRoot":"","sources":["../../../src/api/v2/keyring-type.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"keyring-type.mjs","sourceRoot":"","sources":["../../../src/api/v2/keyring-type.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,WA+CX;AA/CD,WAAY,WAAW;IACrB;;OAEG;IACH,wBAAS,CAAA;IAET;;OAEG;IACH,yCAA0B,CAAA;IAE1B;;;;OAIG;IACH,wBAAS,CAAA;IAET;;OAEG;IACH,4BAAa,CAAA;IAEb;;OAEG;IACH,gCAAiB,CAAA;IAEjB;;OAEG;IACH,kCAAmB,CAAA;IAEnB;;OAEG;IACH,gCAAiB,CAAA;IAEjB;;OAEG;IACH,gCAAiB,CAAA;IAEjB;;OAEG;IACH,8BAAe,CAAA;AACjB,CAAC,EA/CW,WAAW,KAAX,WAAW,QA+CtB","sourcesContent":["/**\n * Enum representing the different types of keyrings supported.\n */\nexport enum KeyringType {\n /**\n * Represents a hierarchical deterministic (HD) keyring.\n */\n Hd = 'hd',\n\n /**\n * Represents a keyring that directly stores private keys.\n */\n PrivateKey = 'private-key',\n\n /**\n * Represents a keyring that implements the QR protocol.\n *\n * See: https://eips.ethereum.org/EIPS/eip-4527\n */\n Qr = 'qr',\n\n /**\n * Represents keyring backed by a Snap.\n */\n Snap = 'snap',\n\n /**\n * Represents keyring backed by a Ledger hardware wallet.\n */\n Ledger = 'ledger',\n\n /**\n * Represents keyring backed by a Lattice hardware wallet.\n */\n Lattice = 'lattice',\n\n /**\n * Represents keyring backed by a Trezor hardware wallet.\n */\n Trezor = 'trezor',\n\n /**\n * Represents keyring backed by a OneKey hardware wallet.\n */\n OneKey = 'onekey',\n\n /**\n * Represents keyring for money accounts.\n */\n Money = 'money',\n}\n"]}
|
package/dist/events.d.cts
CHANGED
|
@@ -412,6 +412,10 @@ export declare const AccountTransactionsUpdatedEventStruct: import("@metamask/su
|
|
|
412
412
|
fungible: false;
|
|
413
413
|
};
|
|
414
414
|
}[];
|
|
415
|
+
details?: {
|
|
416
|
+
origin?: string;
|
|
417
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
418
|
+
};
|
|
415
419
|
}[]>;
|
|
416
420
|
};
|
|
417
421
|
}, {
|
|
@@ -464,6 +468,10 @@ export declare const AccountTransactionsUpdatedEventStruct: import("@metamask/su
|
|
|
464
468
|
fungible: false;
|
|
465
469
|
};
|
|
466
470
|
}[];
|
|
471
|
+
details?: {
|
|
472
|
+
origin?: string;
|
|
473
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
474
|
+
};
|
|
467
475
|
}[]>;
|
|
468
476
|
}, {
|
|
469
477
|
/**
|
|
@@ -516,6 +524,10 @@ export declare const AccountTransactionsUpdatedEventStruct: import("@metamask/su
|
|
|
516
524
|
fungible: false;
|
|
517
525
|
};
|
|
518
526
|
}[];
|
|
527
|
+
details?: {
|
|
528
|
+
origin?: string;
|
|
529
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
530
|
+
};
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10 @@ export declare const AccountTransactionsUpdatedEventStruct: import("@metamask/su
|
|
|
412
412
|
fungible: false;
|
|
413
413
|
};
|
|
414
414
|
}[];
|
|
415
|
+
details?: {
|
|
416
|
+
origin?: string;
|
|
417
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
418
|
+
};
|
|
415
419
|
}[]>;
|
|
416
420
|
};
|
|
417
421
|
}, {
|
|
@@ -464,6 +468,10 @@ export declare const AccountTransactionsUpdatedEventStruct: import("@metamask/su
|
|
|
464
468
|
fungible: false;
|
|
465
469
|
};
|
|
466
470
|
}[];
|
|
471
|
+
details?: {
|
|
472
|
+
origin?: string;
|
|
473
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
474
|
+
};
|
|
467
475
|
}[]>;
|
|
468
476
|
}, {
|
|
469
477
|
/**
|
|
@@ -516,6 +524,10 @@ export declare const AccountTransactionsUpdatedEventStruct: import("@metamask/su
|
|
|
516
524
|
fungible: false;
|
|
517
525
|
};
|
|
518
526
|
}[];
|
|
527
|
+
details?: {
|
|
528
|
+
origin?: string;
|
|
529
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
530
|
+
};
|
|
519
531
|
}[]>, null>;
|
|
520
532
|
}>;
|
|
521
533
|
}>;
|
package/dist/events.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.mts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAenD;;GAEG;AACH,oBAAY,YAAY;IAEtB,cAAc,0BAA0B;IACxC,cAAc,0BAA0B;IACxC,cAAc,0BAA0B;IAGxC,eAAe,2BAA2B;IAC1C,eAAe,2BAA2B;IAG1C,sBAAsB,kCAAkC;IACxD,uBAAuB,mCAAmC;IAC1D,0BAA0B,sCAAsC;CACjE;AAED,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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M,MAAM,+BAA+B,GAAG,KAAK,CACjD,OAAO,qCAAqC,CAC7C,CAAC;AACF,MAAM,MAAM,sCAAsC,GAChD,+BAA+B,CAAC,QAAQ,CAAC,CAAC;AAE5C;;;;;;GAMG;AACH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;QAG3C;;WAEG;;;;;;EAuBL,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,KAAK,CAC9C,OAAO,kCAAkC,CAC1C,CAAC;AACF,MAAM,MAAM,mCAAmC,GAC7C,4BAA4B,CAAC,QAAQ,CAAC,CAAC;AAEzC;;GAEG;AAEH,KAAK,aAAa,GACd,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,4BAA4B,GAC5B,2BAA2B,GAC3B,+BAA+B,GAC/B,oBAAoB,GACpB,oBAAoB,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,KAAK,SAAS,YAAY,IAAI,OAAO,CACnE,aAAa,EAGb;IAAE,MAAM,EAAE,GAAG,KAAK,EAAE,CAAA;CAAE,CACvB,CAAC,QAAQ,CAAC,CAAC"}
|
package/dist/rpc.d.cts
CHANGED
|
@@ -549,6 +549,10 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
549
549
|
fungible: false;
|
|
550
550
|
};
|
|
551
551
|
}[];
|
|
552
|
+
details?: {
|
|
553
|
+
origin?: string;
|
|
554
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
555
|
+
};
|
|
552
556
|
}[];
|
|
553
557
|
next: string | null;
|
|
554
558
|
}, {
|
|
@@ -599,6 +603,10 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
599
603
|
fungible: false;
|
|
600
604
|
};
|
|
601
605
|
}[];
|
|
606
|
+
details?: {
|
|
607
|
+
origin?: string;
|
|
608
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
609
|
+
};
|
|
602
610
|
}[], import("@metamask/superstruct").Struct<{
|
|
603
611
|
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw";
|
|
604
612
|
id: string;
|
|
@@ -646,6 +654,10 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
646
654
|
fungible: false;
|
|
647
655
|
};
|
|
648
656
|
}[];
|
|
657
|
+
details?: {
|
|
658
|
+
origin?: string;
|
|
659
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
660
|
+
};
|
|
649
661
|
}, {
|
|
650
662
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
651
663
|
chain: import("@metamask/superstruct").Struct<`${string}:${string}`, null>;
|
|
@@ -787,6 +799,17 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
787
799
|
}>;
|
|
788
800
|
timestamp: import("@metamask/superstruct").Struct<number | null, null>;
|
|
789
801
|
}>>;
|
|
802
|
+
details: import("@metamask/superstruct").Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
|
|
803
|
+
origin?: string;
|
|
804
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
805
|
+
}, {
|
|
806
|
+
origin: import("@metamask/superstruct").Struct<string | import("@metamask/keyring-utils").ExactOptionalTag, null>;
|
|
807
|
+
securityAlertResponse: import("@metamask/superstruct").Struct<import("@metamask/keyring-utils").ExactOptionalTag | "Benign" | "Warning" | "Malicious", {
|
|
808
|
+
Benign: "Benign";
|
|
809
|
+
Warning: "Warning";
|
|
810
|
+
Malicious: "Malicious";
|
|
811
|
+
}>;
|
|
812
|
+
}>;
|
|
790
813
|
}>>;
|
|
791
814
|
next: import("@metamask/superstruct").Struct<string | null, null>;
|
|
792
815
|
}>;
|
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,E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B;;;;;;;;;;;;;;;;EAMrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE5E,eAAO,MAAM,2BAA2B,oDAAgB,CAAC;AAEzD,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
package/dist/rpc.d.mts
CHANGED
|
@@ -549,6 +549,10 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
549
549
|
fungible: false;
|
|
550
550
|
};
|
|
551
551
|
}[];
|
|
552
|
+
details?: {
|
|
553
|
+
origin?: string;
|
|
554
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
555
|
+
};
|
|
552
556
|
}[];
|
|
553
557
|
next: string | null;
|
|
554
558
|
}, {
|
|
@@ -599,6 +603,10 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
599
603
|
fungible: false;
|
|
600
604
|
};
|
|
601
605
|
}[];
|
|
606
|
+
details?: {
|
|
607
|
+
origin?: string;
|
|
608
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
609
|
+
};
|
|
602
610
|
}[], import("@metamask/superstruct").Struct<{
|
|
603
611
|
type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw";
|
|
604
612
|
id: string;
|
|
@@ -646,6 +654,10 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
646
654
|
fungible: false;
|
|
647
655
|
};
|
|
648
656
|
}[];
|
|
657
|
+
details?: {
|
|
658
|
+
origin?: string;
|
|
659
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
660
|
+
};
|
|
649
661
|
}, {
|
|
650
662
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
651
663
|
chain: import("@metamask/superstruct").Struct<`${string}:${string}`, null>;
|
|
@@ -787,6 +799,17 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
787
799
|
}>;
|
|
788
800
|
timestamp: import("@metamask/superstruct").Struct<number | null, null>;
|
|
789
801
|
}>>;
|
|
802
|
+
details: import("@metamask/superstruct").Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
|
|
803
|
+
origin?: string;
|
|
804
|
+
securityAlertResponse?: "Benign" | "Warning" | "Malicious";
|
|
805
|
+
}, {
|
|
806
|
+
origin: import("@metamask/superstruct").Struct<string | import("@metamask/keyring-utils").ExactOptionalTag, null>;
|
|
807
|
+
securityAlertResponse: import("@metamask/superstruct").Struct<import("@metamask/keyring-utils").ExactOptionalTag | "Benign" | "Warning" | "Malicious", {
|
|
808
|
+
Benign: "Benign";
|
|
809
|
+
Warning: "Warning";
|
|
810
|
+
Malicious: "Malicious";
|
|
811
|
+
}>;
|
|
812
|
+
}>;
|
|
790
813
|
}>>;
|
|
791
814
|
next: import("@metamask/superstruct").Struct<string | null, null>;
|
|
792
815
|
}>;
|
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;AA4BnD;;GAEG;AACH,oBAAY,gBAAgB;IAE1B,aAAa,0BAA0B;IACvC,cAAc,2BAA2B;IACzC,aAAa,0BAA0B;IACvC,gBAAgB,6BAA6B;IAC7C,aAAa,0BAA0B;IACvC,mBAAmB,gCAAgC;IACnD,UAAU,uBAAuB;IACjC,YAAY,yBAAyB;IACrC,aAAa,0BAA0B;IAGvC,cAAc,2BAA2B;IACzC,UAAU,uBAAuB;IACjC,YAAY,yBAAyB;IACrC,aAAa,0BAA0B;IACvC,aAAa,0BAA0B;IAGvC,kBAAkB,+BAA+B;IACjD,iBAAiB,8BAA8B;IAC/C,uBAAuB,oCAAoC;IAC3D,mBAAmB,gCAAgC;IAGnD,qBAAqB,kCAAkC;CACxD;AAED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