@metamask/keyring-api 21.4.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +30 -2
  2. package/dist/api/transaction.cjs +64 -1
  3. package/dist/api/transaction.cjs.map +1 -1
  4. package/dist/api/transaction.d.cts +135 -0
  5. package/dist/api/transaction.d.cts.map +1 -1
  6. package/dist/api/transaction.d.mts +135 -0
  7. package/dist/api/transaction.d.mts.map +1 -1
  8. package/dist/api/transaction.mjs +64 -1
  9. package/dist/api/transaction.mjs.map +1 -1
  10. package/dist/api/v2/create-account/index.cjs +34 -0
  11. package/dist/api/v2/create-account/index.cjs.map +1 -1
  12. package/dist/api/v2/create-account/index.d.cts +29 -0
  13. package/dist/api/v2/create-account/index.d.cts.map +1 -1
  14. package/dist/api/v2/create-account/index.d.mts +29 -0
  15. package/dist/api/v2/create-account/index.d.mts.map +1 -1
  16. package/dist/api/v2/create-account/index.mjs +33 -0
  17. package/dist/api/v2/create-account/index.mjs.map +1 -1
  18. package/dist/api/v2/keyring-type.cjs +4 -0
  19. package/dist/api/v2/keyring-type.cjs.map +1 -1
  20. package/dist/api/v2/keyring-type.d.cts +5 -1
  21. package/dist/api/v2/keyring-type.d.cts.map +1 -1
  22. package/dist/api/v2/keyring-type.d.mts +5 -1
  23. package/dist/api/v2/keyring-type.d.mts.map +1 -1
  24. package/dist/api/v2/keyring-type.mjs +4 -0
  25. package/dist/api/v2/keyring-type.mjs.map +1 -1
  26. package/dist/eth/erc4337/types.d.cts +4 -4
  27. package/dist/eth/erc4337/types.d.mts +4 -4
  28. package/dist/eth/rpc/params.cjs +1 -1
  29. package/dist/eth/rpc/params.cjs.map +1 -1
  30. package/dist/eth/rpc/params.d.cts +16 -16
  31. package/dist/eth/rpc/params.d.cts.map +1 -1
  32. package/dist/eth/rpc/params.d.mts +16 -16
  33. package/dist/eth/rpc/params.d.mts.map +1 -1
  34. package/dist/eth/rpc/params.mjs +2 -2
  35. package/dist/eth/rpc/params.mjs.map +1 -1
  36. package/dist/eth/types.cjs +5 -2
  37. package/dist/eth/types.cjs.map +1 -1
  38. package/dist/eth/types.d.cts +6 -5
  39. package/dist/eth/types.d.cts.map +1 -1
  40. package/dist/eth/types.d.mts +6 -5
  41. package/dist/eth/types.d.mts.map +1 -1
  42. package/dist/eth/types.mjs +4 -1
  43. package/dist/eth/types.mjs.map +1 -1
  44. package/dist/events.d.cts +12 -0
  45. package/dist/events.d.cts.map +1 -1
  46. package/dist/events.d.mts +12 -0
  47. package/dist/events.d.mts.map +1 -1
  48. package/dist/rpc.d.cts +23 -0
  49. package/dist/rpc.d.cts.map +1 -1
  50. package/dist/rpc.d.mts +23 -0
  51. package/dist/rpc.d.mts.map +1 -1
  52. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,7 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ## [21.4.0]
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
+
20
+ ## [21.5.0]
21
+
22
+ ### Added
23
+
24
+ - Add `EthAddressStrictStruct` struct and `EthAddressStrict` types ([#465](https://github.com/MetaMask/accounts/pull/465))
25
+ - This is a stricter variant of `EthAddressStruct` which uses `Hex` instead of `string` for its inferred type.
26
+ - Add `assertCreateAccountOptionIsSupported` helper ([#464](https://github.com/MetaMask/accounts/pull/464))
27
+ - This helper can be used to implement `createAccounts` and narrow down the `options` to the supported types (based on the keyring capabilities).
28
+
29
+ ### Changed
30
+
31
+ - Re-use `string` for ERC4337 address-like fields ([#465](https://github.com/MetaMask/accounts/pull/465))
32
+ - This change reverts that and keeps using `string` for all address-like types.
33
+ - Changes in [#405](https://github.com/MetaMask/accounts/pull/405) updated the associated type for `EthAddressStruct` from `string` to `Hex`, this was actually a small breaking change that went unnoticed and that would require some effort to adapt in upstream clients/controllers, for this reason, we are undoing this change for now.
34
+ - Version [21.4.0] is marked as **DEPRECATED**, consumers are expected to use version [21.5.0] instead, that reverts this breaking change.
35
+
36
+ ## [21.4.0] - 2026-02-09 [DEPRECATED]
11
37
 
12
38
  ### Added
13
39
 
@@ -684,7 +710,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
684
710
  - SnapController keyring client. It is intended to be used by MetaMask to talk to the snap.
685
711
  - Helper functions to create keyring handler in the snap.
686
712
 
687
- [Unreleased]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@21.4.0...HEAD
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
715
+ [21.5.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@21.4.0...@metamask/keyring-api@21.5.0
688
716
  [21.4.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@21.3.0...@metamask/keyring-api@21.4.0
689
717
  [21.3.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@21.2.0...@metamask/keyring-api@21.3.0
690
718
  [21.2.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@21.1.0...@metamask/keyring-api@21.2.0
@@ -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;;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,EAAC;IACvB;;OAEG;IACH,IAAI,EAAE,IAAA,mBAAK,EAAC,CAAC,GAAG,OAAO,CAAC,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEvD;;OAEG;IACH,KAAK,EAAE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/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,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,C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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,IAAA,mBAAK,EAAC,iBAAiB,CAAC;IAE9B;;OAEG;IACH,EAAE,EAAE,IAAA,mBAAK,EAAC,iBAAiB,CAAC;IAE5B;;OAEG;IACH,IAAI,EAAE,IAAA,mBAAK,EAAC,SAAS,CAAC;IAEtB;;;;;OAKG;IACH,MAAM,EAAE,IAAA,mBAAK,EAAC,8BAAsB,CAAC;IAErC;;;;;;OAMG;IACH,OAAO,EAAE,IAAA,6BAAa,EAAC,gCAAwB,CAAC;CACjD,CAAC,CAAC;AAgBH;;;;;;;;;;;;;;;;;;;;;;;;;;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 { 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;;;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;IAChC;;;OAGG;IACH,OAAO,YAAY;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;IACjC;;OAEG;;;;;;;IAQH;;OAEG;;EAEH,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AEG;;;;;;;;;;;;;;;;;;;;;;;;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,g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