@metamask/transaction-controller 29.0.2 → 30.0.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 (104) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/dist/TransactionController.js +11 -11
  3. package/dist/TransactionController.mjs +10 -10
  4. package/dist/{chunk-VJYFB7BM.js → chunk-2OH557V3.js} +9 -9
  5. package/dist/{chunk-AGJNOOBN.mjs → chunk-4GQZF4A5.mjs} +2 -2
  6. package/dist/{chunk-DUFOYA4D.js → chunk-4HP4W5YQ.js} +6 -6
  7. package/dist/{chunk-NHRBO3LU.mjs → chunk-6DDVVUJC.mjs} +1 -1
  8. package/dist/chunk-6DDVVUJC.mjs.map +1 -0
  9. package/dist/{chunk-XL3HBKDE.mjs → chunk-A7HHUDTE.mjs} +3 -3
  10. package/dist/{chunk-F6E3TTR3.mjs → chunk-AZ4WIRH3.mjs} +1 -1
  11. package/dist/chunk-AZ4WIRH3.mjs.map +1 -0
  12. package/dist/{chunk-N6JXPWLY.mjs → chunk-B2ED6364.mjs} +2 -1
  13. package/dist/chunk-B2ED6364.mjs.map +1 -0
  14. package/dist/{chunk-FBCFML64.mjs → chunk-B3KC7EIQ.mjs} +12 -11
  15. package/dist/chunk-B3KC7EIQ.mjs.map +1 -0
  16. package/dist/{chunk-REOG6YD4.mjs → chunk-CQPIO3NZ.mjs} +3 -3
  17. package/dist/{chunk-7DJO6UZA.js → chunk-E76IQWXN.js} +3 -3
  18. package/dist/{chunk-KNYSD4JP.js → chunk-EXPINI6I.js} +5 -5
  19. package/dist/{chunk-ZGUNOEUQ.mjs → chunk-IJ5GUKRO.mjs} +47 -1
  20. package/dist/chunk-IJ5GUKRO.mjs.map +1 -0
  21. package/dist/{chunk-SL3GHHKG.mjs → chunk-JC2WLSM5.mjs} +2 -2
  22. package/dist/{chunk-5C3CSQAD.js → chunk-LG2JQVTQ.js} +2 -1
  23. package/dist/chunk-LG2JQVTQ.js.map +1 -0
  24. package/dist/{chunk-IXUOEWWL.js → chunk-MZHBDTIW.js} +21 -20
  25. package/dist/chunk-MZHBDTIW.js.map +1 -0
  26. package/dist/{chunk-ZNZEJDOE.js → chunk-PRUNMTRD.js} +1 -1
  27. package/dist/chunk-PRUNMTRD.js.map +1 -0
  28. package/dist/{chunk-5XQ2KRYL.js → chunk-PUESYN62.js} +1 -1
  29. package/dist/chunk-PUESYN62.js.map +1 -0
  30. package/dist/{chunk-4M7FHI4S.mjs → chunk-UCN7HXGX.mjs} +3 -3
  31. package/dist/{chunk-C2LNDHP4.js → chunk-UT4M4XI3.js} +47 -1
  32. package/dist/chunk-UT4M4XI3.js.map +1 -0
  33. package/dist/{chunk-EMDU4XLM.js → chunk-XD4HUW35.js} +4 -4
  34. package/dist/errors.js +1 -1
  35. package/dist/errors.mjs +1 -1
  36. package/dist/gas-flows/DefaultGasFeeFlow.js +6 -6
  37. package/dist/gas-flows/DefaultGasFeeFlow.mjs +5 -5
  38. package/dist/gas-flows/LineaGasFeeFlow.js +7 -7
  39. package/dist/gas-flows/LineaGasFeeFlow.mjs +6 -6
  40. package/dist/gas-flows/TestGasFeeFlow.js +1 -1
  41. package/dist/gas-flows/TestGasFeeFlow.mjs +1 -1
  42. package/dist/helpers/EtherscanRemoteTransactionSource.js +1 -1
  43. package/dist/helpers/EtherscanRemoteTransactionSource.mjs +1 -1
  44. package/dist/helpers/GasFeePoller.js +4 -4
  45. package/dist/helpers/GasFeePoller.mjs +3 -3
  46. package/dist/helpers/MultichainTrackingHelper.js +3 -3
  47. package/dist/helpers/MultichainTrackingHelper.mjs +2 -2
  48. package/dist/helpers/PendingTransactionTracker.js +1 -1
  49. package/dist/helpers/PendingTransactionTracker.mjs +1 -1
  50. package/dist/index.js +11 -11
  51. package/dist/index.mjs +10 -10
  52. package/dist/tsconfig.build.tsbuildinfo +1 -1
  53. package/dist/types/TransactionController.d.ts +11 -2
  54. package/dist/types/TransactionController.d.ts.map +1 -1
  55. package/dist/types/helpers/MultichainTrackingHelper.d.ts +1 -1
  56. package/dist/types/helpers/MultichainTrackingHelper.d.ts.map +1 -1
  57. package/dist/types/types.d.ts +24 -0
  58. package/dist/types/types.d.ts.map +1 -1
  59. package/dist/types/utils/nonce.d.ts +1 -1
  60. package/dist/types/utils/nonce.d.ts.map +1 -1
  61. package/dist/types/utils/swaps.d.ts.map +1 -1
  62. package/dist/types.js +2 -2
  63. package/dist/types.mjs +1 -1
  64. package/dist/utils/external-transactions.js +1 -1
  65. package/dist/utils/external-transactions.mjs +1 -1
  66. package/dist/utils/gas-fees.js +5 -5
  67. package/dist/utils/gas-fees.mjs +4 -4
  68. package/dist/utils/gas-flow.js +3 -3
  69. package/dist/utils/gas-flow.mjs +2 -2
  70. package/dist/utils/nonce.js +2 -2
  71. package/dist/utils/nonce.mjs +1 -1
  72. package/dist/utils/simulation-api.js +1 -1
  73. package/dist/utils/simulation-api.mjs +1 -1
  74. package/dist/utils/simulation.js +1 -1
  75. package/dist/utils/simulation.mjs +1 -1
  76. package/dist/utils/swaps.js +3 -3
  77. package/dist/utils/swaps.mjs +2 -2
  78. package/dist/utils/transaction-type.js +1 -1
  79. package/dist/utils/transaction-type.mjs +1 -1
  80. package/dist/utils/utils.js +1 -1
  81. package/dist/utils/utils.mjs +1 -1
  82. package/dist/utils/validation.js +1 -1
  83. package/dist/utils/validation.mjs +1 -1
  84. package/package.json +4 -4
  85. package/dist/chunk-5C3CSQAD.js.map +0 -1
  86. package/dist/chunk-5XQ2KRYL.js.map +0 -1
  87. package/dist/chunk-C2LNDHP4.js.map +0 -1
  88. package/dist/chunk-F6E3TTR3.mjs.map +0 -1
  89. package/dist/chunk-FBCFML64.mjs.map +0 -1
  90. package/dist/chunk-IXUOEWWL.js.map +0 -1
  91. package/dist/chunk-N6JXPWLY.mjs.map +0 -1
  92. package/dist/chunk-NHRBO3LU.mjs.map +0 -1
  93. package/dist/chunk-ZGUNOEUQ.mjs.map +0 -1
  94. package/dist/chunk-ZNZEJDOE.js.map +0 -1
  95. /package/dist/{chunk-VJYFB7BM.js.map → chunk-2OH557V3.js.map} +0 -0
  96. /package/dist/{chunk-AGJNOOBN.mjs.map → chunk-4GQZF4A5.mjs.map} +0 -0
  97. /package/dist/{chunk-DUFOYA4D.js.map → chunk-4HP4W5YQ.js.map} +0 -0
  98. /package/dist/{chunk-XL3HBKDE.mjs.map → chunk-A7HHUDTE.mjs.map} +0 -0
  99. /package/dist/{chunk-REOG6YD4.mjs.map → chunk-CQPIO3NZ.mjs.map} +0 -0
  100. /package/dist/{chunk-7DJO6UZA.js.map → chunk-E76IQWXN.js.map} +0 -0
  101. /package/dist/{chunk-KNYSD4JP.js.map → chunk-EXPINI6I.js.map} +0 -0
  102. /package/dist/{chunk-SL3GHHKG.mjs.map → chunk-JC2WLSM5.mjs.map} +0 -0
  103. /package/dist/{chunk-4M7FHI4S.mjs.map → chunk-UCN7HXGX.mjs.map} +0 -0
  104. /package/dist/{chunk-EMDU4XLM.js.map → chunk-XD4HUW35.js.map} +0 -0
@@ -96,6 +96,10 @@ type TransactionMetaBase = {
96
96
  * The address of the token being received of swap transaction.
97
97
  */
98
98
  destinationTokenAddress?: string;
99
+ /**
100
+ * The raw amount of the destination token
101
+ */
102
+ destinationTokenAmount?: string;
99
103
  /**
100
104
  * The decimals of the token being received of swap transaction.
101
105
  */
@@ -263,10 +267,26 @@ type TransactionMetaBase = {
263
267
  * The time the transaction was submitted to the network, in Unix epoch time (ms).
264
268
  */
265
269
  submittedTime?: number;
270
+ /**
271
+ * The address of the token being swapped
272
+ */
273
+ sourceTokenAddress?: string;
274
+ /**
275
+ * The raw amount of the source swap token
276
+ */
277
+ sourceTokenAmount?: string;
278
+ /**
279
+ * The decimals of the token being swapped.
280
+ */
281
+ sourceTokenDecimals?: number;
266
282
  /**
267
283
  * The symbol of the token being swapped.
268
284
  */
269
285
  sourceTokenSymbol?: string;
286
+ /**
287
+ * The address of the swap recipient.
288
+ */
289
+ swapAndSendRecipient?: string;
270
290
  /**
271
291
  * The metadata of the swap transaction.
272
292
  */
@@ -423,6 +443,10 @@ export declare enum TransactionType {
423
443
  * A transaction swapping one token for another through MetaMask Swaps.
424
444
  */
425
445
  swap = "swap",
446
+ /**
447
+ * A transaction swapping one token for another through MetaMask Swaps, then sending the swapped token to a recipient.
448
+ */
449
+ swapAndSend = "swapAndSend",
426
450
  /**
427
451
  * Similar to the approve type, a swap approval is a special case of ERC20
428
452
  * approve method that requests an allowance of the token to spend on behalf
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;GAEG;AACH,KAAK,kBAAkB,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,GACvC,CAAC,GACD;KACG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK;CACjD,CAAC;AAEN;;;;;GAKG;AACH,KAAK,uBAAuB,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAC/C,CACI;IACE,MAAM,EAAE,OAAO,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;CAC9D,GACD;IACE,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC;IACjC,KAAK,EAAE,gBAAgB,CA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,GAAG,MAAM,CAAC;IAEvB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,yCAAyC;AACzC,MAAM,MAAM,cAAc,GAAG;IAC3B,uEAAuE;IACvE,KAAK,CAAC,EAAE,eAAe,CAAC;IAExB,6DAA6D;IAC7D,mBAAmB,CAAC,EAAE,uBAAuB,CAAC;IAE9C,6DAA6D;IAC7D,mBAAmB,EAAE,4BAA4B,EAAE,CAAC;CACrD,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { NonceLock, Transaction as NonceTrackerTransaction } from 'nonce-tracker';
1
+ import type { NonceLock, Transaction as NonceTrackerTransaction } from '@metamask/nonce-tracker';
2
2
  import type { TransactionMeta, TransactionStatus } from '../types';
3
3
  /**
4
4
  * Determine the next nonce to be used for a transaction.
@@ -1 +1 @@
1
- {"version":3,"file":"nonce.d.ts","sourceRoot":"","sources":["../../../src/utils/nonce.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EACT,WAAW,IAAI,uBAAuB,EACvC,MAAM,eAAe,CAAC;AAGvB,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAInE;;;;;;GAMG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,eAAe,EACvB,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,GACpD,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC,CAyB7C;AAED;;;;;;;;GAQG;AACH,wBAAgB,uCAAuC,CACrD,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,EACnB,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,EAAE,eAAe,EAAE,GAC9B,uBAAuB,EAAE,CA0B3B"}
1
+ {"version":3,"file":"nonce.d.ts","sourceRoot":"","sources":["../../../src/utils/nonce.ts"],"names":[],"mappings":"AACA,O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unk-5C3CSQAD.js');
11
+ var _chunkLG2JQVTQjs = require('./chunk-LG2JQVTQ.js');
12
12
  require('./chunk-Z4BLTVTB.js');
13
13
 
14
14
 
@@ -20,5 +20,5 @@ require('./chunk-Z4BLTVTB.js');
20
20
 
21
21
 
22
22
 
23
- exports.GasFeeEstimateLevel = _chunk5C3CSQADjs.GasFeeEstimateLevel; exports.GasFeeEstimateType = _chunk5C3CSQADjs.GasFeeEstimateType; exports.SimulationErrorCode = _chunk5C3CSQADjs.SimulationErrorCode; exports.SimulationTokenStandard = _chunk5C3CSQADjs.SimulationTokenStandard; exports.TransactionEnvelopeType = _chunk5C3CSQADjs.TransactionEnvelopeType; exports.TransactionStatus = _chunk5C3CSQADjs.TransactionStatus; exports.TransactionType = _chunk5C3CSQADjs.TransactionType; exports.UserFeeLevel = _chunk5C3CSQADjs.UserFeeLevel; exports.WalletDevice = _chunk5C3CSQADjs.WalletDevice;
23
+ exports.GasFeeEstimateLevel = _chunkLG2JQVTQjs.GasFeeEstimateLevel; exports.GasFeeEstimateType = _chunkLG2JQVTQjs.GasFeeEstimateType; exports.SimulationErrorCode = _chunkLG2JQVTQjs.SimulationErrorCode; exports.SimulationTokenStandard = _chunkLG2JQVTQjs.SimulationTokenStandard; exports.TransactionEnvelopeType = _chunkLG2JQVTQjs.TransactionEnvelopeType; exports.TransactionStatus = _chunkLG2JQVTQjs.TransactionStatus; exports.TransactionType = _chunkLG2JQVTQjs.TransactionType; exports.UserFeeLevel = _chunkLG2JQVTQjs.UserFeeLevel; exports.WalletDevice = _chunkLG2JQVTQjs.WalletDevice;
24
24
  //# sourceMappingURL=types.js.map
package/dist/types.mjs CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  TransactionType,
9
9
  UserFeeLevel,
10
10
  WalletDevice
11
- } from "./chunk-N6JXPWLY.mjs";
11
+ } from "./chunk-B2ED6364.mjs";
12
12
  import "./chunk-XUI43LEZ.mjs";
13
13
  export {
14
14
  GasFeeEstimateLevel,
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
  var _chunk7LXE4KHVjs = require('../chunk-7LXE4KHV.js');
4
- require('../chunk-5C3CSQAD.js');
4
+ require('../chunk-LG2JQVTQ.js');
5
5
  require('../chunk-Z4BLTVTB.js');
6
6
 
7
7
 
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  validateConfirmedExternalTransaction
3
3
  } from "../chunk-FRKQ3Z2L.mjs";
4
- import "../chunk-N6JXPWLY.mjs";
4
+ import "../chunk-B2ED6364.mjs";
5
5
  import "../chunk-XUI43LEZ.mjs";
6
6
  export {
7
7
  validateConfirmedExternalTransaction
@@ -1,16 +1,16 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkKNYSD4JPjs = require('../chunk-KNYSD4JP.js');
5
- require('../chunk-C2LNDHP4.js');
4
+ var _chunkEXPINI6Ijs = require('../chunk-EXPINI6I.js');
5
+ require('../chunk-UT4M4XI3.js');
6
6
  require('../chunk-UGFBA4GV.js');
7
- require('../chunk-EMDU4XLM.js');
7
+ require('../chunk-XD4HUW35.js');
8
8
  require('../chunk-UGN7PBON.js');
9
9
  require('../chunk-S6VGOPUY.js');
10
- require('../chunk-5C3CSQAD.js');
10
+ require('../chunk-LG2JQVTQ.js');
11
11
  require('../chunk-Z4BLTVTB.js');
12
12
 
13
13
 
14
14
 
15
- exports.gweiDecimalToWeiHex = _chunkKNYSD4JPjs.gweiDecimalToWeiHex; exports.updateGasFees = _chunkKNYSD4JPjs.updateGasFees;
15
+ exports.gweiDecimalToWeiHex = _chunkEXPINI6Ijs.gweiDecimalToWeiHex; exports.updateGasFees = _chunkEXPINI6Ijs.updateGasFees;
16
16
  //# sourceMappingURL=gas-fees.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  gweiDecimalToWeiHex,
3
3
  updateGasFees
4
- } from "../chunk-4M7FHI4S.mjs";
5
- import "../chunk-ZGUNOEUQ.mjs";
4
+ } from "../chunk-UCN7HXGX.mjs";
5
+ import "../chunk-IJ5GUKRO.mjs";
6
6
  import "../chunk-J56A7UCK.mjs";
7
- import "../chunk-AGJNOOBN.mjs";
7
+ import "../chunk-4GQZF4A5.mjs";
8
8
  import "../chunk-O6ZZVIFH.mjs";
9
9
  import "../chunk-UQQWZT6C.mjs";
10
- import "../chunk-N6JXPWLY.mjs";
10
+ import "../chunk-B2ED6364.mjs";
11
11
  import "../chunk-XUI43LEZ.mjs";
12
12
  export {
13
13
  gweiDecimalToWeiHex,
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkEMDU4XLMjs = require('../chunk-EMDU4XLM.js');
5
- require('../chunk-5C3CSQAD.js');
4
+ var _chunkXD4HUW35js = require('../chunk-XD4HUW35.js');
5
+ require('../chunk-LG2JQVTQ.js');
6
6
  require('../chunk-Z4BLTVTB.js');
7
7
 
8
8
 
9
9
 
10
- exports.getGasFeeFlow = _chunkEMDU4XLMjs.getGasFeeFlow; exports.mergeGasFeeEstimates = _chunkEMDU4XLMjs.mergeGasFeeEstimates;
10
+ exports.getGasFeeFlow = _chunkXD4HUW35js.getGasFeeFlow; exports.mergeGasFeeEstimates = _chunkXD4HUW35js.mergeGasFeeEstimates;
11
11
  //# sourceMappingURL=gas-flow.js.map
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  getGasFeeFlow,
3
3
  mergeGasFeeEstimates
4
- } from "../chunk-AGJNOOBN.mjs";
5
- import "../chunk-N6JXPWLY.mjs";
4
+ } from "../chunk-4GQZF4A5.mjs";
5
+ import "../chunk-B2ED6364.mjs";
6
6
  import "../chunk-XUI43LEZ.mjs";
7
7
  export {
8
8
  getGasFeeFlow,
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkZNZEJDOEjs = require('../chunk-ZNZEJDOE.js');
4
+ var _chunkPRUNMTRDjs = require('../chunk-PRUNMTRD.js');
5
5
  require('../chunk-S6VGOPUY.js');
6
6
  require('../chunk-Z4BLTVTB.js');
7
7
 
8
8
 
9
9
 
10
- exports.getAndFormatTransactionsForNonceTracker = _chunkZNZEJDOEjs.getAndFormatTransactionsForNonceTracker; exports.getNextNonce = _chunkZNZEJDOEjs.getNextNonce;
10
+ exports.getAndFormatTransactionsForNonceTracker = _chunkPRUNMTRDjs.getAndFormatTransactionsForNonceTracker; exports.getNextNonce = _chunkPRUNMTRDjs.getNextNonce;
11
11
  //# sourceMappingURL=nonce.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getAndFormatTransactionsForNonceTracker,
3
3
  getNextNonce
4
- } from "../chunk-NHRBO3LU.mjs";
4
+ } from "../chunk-6DDVVUJC.mjs";
5
5
  import "../chunk-UQQWZT6C.mjs";
6
6
  import "../chunk-XUI43LEZ.mjs";
7
7
  export {
@@ -3,7 +3,7 @@
3
3
  var _chunkKT6UAKBBjs = require('../chunk-KT6UAKBB.js');
4
4
  require('../chunk-HMOSP33F.js');
5
5
  require('../chunk-S6VGOPUY.js');
6
- require('../chunk-5C3CSQAD.js');
6
+ require('../chunk-LG2JQVTQ.js');
7
7
  require('../chunk-Z4BLTVTB.js');
8
8
 
9
9
 
@@ -3,7 +3,7 @@ import {
3
3
  } from "../chunk-K4KOSAGM.mjs";
4
4
  import "../chunk-HQSNKCXI.mjs";
5
5
  import "../chunk-UQQWZT6C.mjs";
6
- import "../chunk-N6JXPWLY.mjs";
6
+ import "../chunk-B2ED6364.mjs";
7
7
  import "../chunk-XUI43LEZ.mjs";
8
8
  export {
9
9
  simulateTransactions
@@ -7,7 +7,7 @@ require('../chunk-KT6UAKBB.js');
7
7
  require('../chunk-HMOSP33F.js');
8
8
  require('../chunk-UGN7PBON.js');
9
9
  require('../chunk-S6VGOPUY.js');
10
- require('../chunk-5C3CSQAD.js');
10
+ require('../chunk-LG2JQVTQ.js');
11
11
  require('../chunk-Z4BLTVTB.js');
12
12
 
13
13
 
@@ -7,7 +7,7 @@ import "../chunk-K4KOSAGM.mjs";
7
7
  import "../chunk-HQSNKCXI.mjs";
8
8
  import "../chunk-O6ZZVIFH.mjs";
9
9
  import "../chunk-UQQWZT6C.mjs";
10
- import "../chunk-N6JXPWLY.mjs";
10
+ import "../chunk-B2ED6364.mjs";
11
11
  import "../chunk-XUI43LEZ.mjs";
12
12
  export {
13
13
  SupportedToken,
@@ -6,11 +6,11 @@
6
6
 
7
7
 
8
8
 
9
- var _chunkC2LNDHP4js = require('../chunk-C2LNDHP4.js');
9
+ var _chunkUT4M4XI3js = require('../chunk-UT4M4XI3.js');
10
10
  require('../chunk-UGFBA4GV.js');
11
11
  require('../chunk-UGN7PBON.js');
12
12
  require('../chunk-S6VGOPUY.js');
13
- require('../chunk-5C3CSQAD.js');
13
+ require('../chunk-LG2JQVTQ.js');
14
14
  require('../chunk-Z4BLTVTB.js');
15
15
 
16
16
 
@@ -20,5 +20,5 @@ require('../chunk-Z4BLTVTB.js');
20
20
 
21
21
 
22
22
 
23
- exports.DEFAULT_TOKEN_ADDRESS = _chunkC2LNDHP4js.DEFAULT_TOKEN_ADDRESS; exports.SWAPS_CHAINID_DEFAULT_TOKEN_MAP = _chunkC2LNDHP4js.SWAPS_CHAINID_DEFAULT_TOKEN_MAP; exports.SWAP_TRANSACTION_TYPES = _chunkC2LNDHP4js.SWAP_TRANSACTION_TYPES; exports.UPDATE_POST_TX_BALANCE_ATTEMPTS = _chunkC2LNDHP4js.UPDATE_POST_TX_BALANCE_ATTEMPTS; exports.UPDATE_POST_TX_BALANCE_TIMEOUT = _chunkC2LNDHP4js.UPDATE_POST_TX_BALANCE_TIMEOUT; exports.updatePostTransactionBalance = _chunkC2LNDHP4js.updatePostTransactionBalance; exports.updateSwapsTransaction = _chunkC2LNDHP4js.updateSwapsTransaction;
23
+ exports.DEFAULT_TOKEN_ADDRESS = _chunkUT4M4XI3js.DEFAULT_TOKEN_ADDRESS; exports.SWAPS_CHAINID_DEFAULT_TOKEN_MAP = _chunkUT4M4XI3js.SWAPS_CHAINID_DEFAULT_TOKEN_MAP; exports.SWAP_TRANSACTION_TYPES = _chunkUT4M4XI3js.SWAP_TRANSACTION_TYPES; exports.UPDATE_POST_TX_BALANCE_ATTEMPTS = _chunkUT4M4XI3js.UPDATE_POST_TX_BALANCE_ATTEMPTS; exports.UPDATE_POST_TX_BALANCE_TIMEOUT = _chunkUT4M4XI3js.UPDATE_POST_TX_BALANCE_TIMEOUT; exports.updatePostTransactionBalance = _chunkUT4M4XI3js.updatePostTransactionBalance; exports.updateSwapsTransaction = _chunkUT4M4XI3js.updateSwapsTransaction;
24
24
  //# sourceMappingURL=swaps.js.map
@@ -6,11 +6,11 @@ import {
6
6
  UPDATE_POST_TX_BALANCE_TIMEOUT,
7
7
  updatePostTransactionBalance,
8
8
  updateSwapsTransaction
9
- } from "../chunk-ZGUNOEUQ.mjs";
9
+ } from "../chunk-IJ5GUKRO.mjs";
10
10
  import "../chunk-J56A7UCK.mjs";
11
11
  import "../chunk-O6ZZVIFH.mjs";
12
12
  import "../chunk-UQQWZT6C.mjs";
13
- import "../chunk-N6JXPWLY.mjs";
13
+ import "../chunk-B2ED6364.mjs";
14
14
  import "../chunk-XUI43LEZ.mjs";
15
15
  export {
16
16
  DEFAULT_TOKEN_ADDRESS,
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
  var _chunkSD6CWFDFjs = require('../chunk-SD6CWFDF.js');
5
- require('../chunk-5C3CSQAD.js');
5
+ require('../chunk-LG2JQVTQ.js');
6
6
  require('../chunk-Z4BLTVTB.js');
7
7
 
8
8
 
@@ -2,7 +2,7 @@ import {
2
2
  ESTIMATE_GAS_ERROR,
3
3
  determineTransactionType
4
4
  } from "../chunk-KG4UW4K4.mjs";
5
- import "../chunk-N6JXPWLY.mjs";
5
+ import "../chunk-B2ED6364.mjs";
6
6
  import "../chunk-XUI43LEZ.mjs";
7
7
  export {
8
8
  ESTIMATE_GAS_ERROR,
@@ -13,7 +13,7 @@
13
13
 
14
14
 
15
15
  var _chunkUGFBA4GVjs = require('../chunk-UGFBA4GV.js');
16
- require('../chunk-5C3CSQAD.js');
16
+ require('../chunk-LG2JQVTQ.js');
17
17
  require('../chunk-Z4BLTVTB.js');
18
18
 
19
19
 
@@ -13,7 +13,7 @@ import {
13
13
  validateIfTransactionUnapproved,
14
14
  validateMinimumIncrease
15
15
  } from "../chunk-J56A7UCK.mjs";
16
- import "../chunk-N6JXPWLY.mjs";
16
+ import "../chunk-B2ED6364.mjs";
17
17
  import "../chunk-XUI43LEZ.mjs";
18
18
  export {
19
19
  ESTIMATE_GAS_ERROR,
@@ -3,7 +3,7 @@
3
3
 
4
4
  var _chunkVH47Q6TSjs = require('../chunk-VH47Q6TS.js');
5
5
  require('../chunk-UGFBA4GV.js');
6
- require('../chunk-5C3CSQAD.js');
6
+ require('../chunk-LG2JQVTQ.js');
7
7
  require('../chunk-Z4BLTVTB.js');
8
8
 
9
9
 
@@ -3,7 +3,7 @@ import {
3
3
  validateTxParams
4
4
  } from "../chunk-NM6OYEPP.mjs";
5
5
  import "../chunk-J56A7UCK.mjs";
6
- import "../chunk-N6JXPWLY.mjs";
6
+ import "../chunk-B2ED6364.mjs";
7
7
  import "../chunk-XUI43LEZ.mjs";
8
8
  export {
9
9
  validateTransactionOrigin,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask/transaction-controller",
3
- "version": "29.0.2",
3
+ "version": "30.0.0",
4
4
  "description": "Stores transactions alongside their periodically updated statuses and manages interactions such as approval and cancellation",
5
5
  "keywords": [
6
6
  "MetaMask",
@@ -53,7 +53,8 @@
53
53
  "@metamask/eth-query": "^4.0.0",
54
54
  "@metamask/gas-fee-controller": "^15.1.2",
55
55
  "@metamask/metamask-eth-abis": "^3.1.1",
56
- "@metamask/network-controller": "^18.1.1",
56
+ "@metamask/network-controller": "^18.1.2",
57
+ "@metamask/nonce-tracker": "^5.0.0",
57
58
  "@metamask/rpc-errors": "^6.2.1",
58
59
  "@metamask/utils": "^8.3.0",
59
60
  "async-mutex": "^0.2.6",
@@ -61,7 +62,6 @@
61
62
  "eth-method-registry": "^4.0.0",
62
63
  "fast-json-patch": "^3.1.1",
63
64
  "lodash": "^4.17.21",
64
- "nonce-tracker": "^3.0.0",
65
65
  "uuid": "^8.3.2"
66
66
  },
67
67
  "devDependencies": {
@@ -85,7 +85,7 @@
85
85
  "@babel/runtime": "^7.23.9",
86
86
  "@metamask/approval-controller": "^6.0.0",
87
87
  "@metamask/gas-fee-controller": "^15.0.0",
88
- "@metamask/network-controller": "^18.0.0"
88
+ "@metamask/network-controller": "^18.1.2"
89
89
  },
90
90
  "engines": {
91
91
  "node": ">=16.0.0"
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/types.ts"],"names":["TransactionStatus","WalletDevice","TransactionType","TransactionEnvelopeType","UserFeeLevel","GasFeeEstimateLevel","GasFeeEstimateType","SimulationTokenStandard","SimulationErrorCode"],"mappings":";AA6aO,IAAK,oBAAL,kBAAKA,uBAAL;AACL,EAAAA,mBAAA,cAAW;AAEX,EAAAA,mBAAA,eAAY;AACZ,EAAAA,mBAAA,eAAY;AACZ,EAAAA,mBAAA,aAAU;AACV,EAAAA,mBAAA,YAAS;AACT,EAAAA,mBAAA,cAAW;AACX,EAAAA,mBAAA,YAAS;AACT,EAAAA,mBAAA,eAAY;AACZ,EAAAA,mBAAA,gBAAa;AAVH,SAAAA;AAAA,GAAA;AAgBL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,eAAY;AACZ,EAAAA,cAAA,kBAAe;AACf,EAAAA,cAAA,WAAQ;AAHE,SAAAA;AAAA,GAAA;AASL,IAAK,kBAAL,kBAAKC,qBAAL;AAIL,EAAAA,iBAAA,YAAS;AAOT,EAAAA,iBAAA,yBAAsB;AAKtB,EAAAA,iBAAA,oBAAiB;AAKjB,EAAAA,iBAAA,gBAAa;AAKb,EAAAA,iBAAA,+BAA4B;AAK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;AACX,EAAAA,qBAAA,qBAAkB;AAClB,EAAAA,qBAAA,cAAW;AAJD,SAAAA;AAAA,GAAA","sourcesContent":["import type { AccessList } from '@ethereumjs/tx';\nimport type EthQuery from '@metamask/eth-query';\nimport type { GasFeeState } from '@metamask/gas-fee-controller';\nimport type { NetworkClientId, Provider } from '@metamask/network-controller';\nimport type { Hex, Json } from '@metamask/utils';\nimport type { Operation } from 'fast-json-patch';\n\n/**\n * Given a record, ensures that each property matches the `Json` type.\n */\ntype MakeJsonCompatible<T> = T extends Json\n ? T\n : {\n [K in keyof T]: T[K] extends Json ? T[K] : never;\n };\n\n/**\n * `Json` from `@metamask/utils` is defined as a recursive type alias, but\n * `Operation` is defined as an interface, and the two are not compatible with\n * each other. Therefore, this is a variant of Operation from `fast-json-patch`\n * which is guaranteed to be type-compatible with `Json`.\n */\ntype JsonCompatibleOperation = MakeJsonCompatible<Operation>;\n\n/**\n * Representation of transaction metadata.\n */\nexport type TransactionMeta = TransactionMetaBase &\n (\n | {\n status: Exclude<TransactionStatus, TransactionStatus.failed>;\n }\n | {\n status: TransactionStatus.failed;\n error: TransactionError;\n }\n );\n\n/**\n * Information about a single transaction such as status and block number.\n */\ntype TransactionMetaBase = {\n /**\n * ID of the transaction that approved the swap token transfer.\n */\n approvalTxId?: string;\n\n /**\n * Unique ID to prevent duplicate requests.\n */\n actionId?: string;\n\n /**\n * Base fee of the block as a hex value, introduced in EIP-1559.\n */\n baseFeePerGas?: Hex;\n\n /**\n * Number of the block where the transaction has been included.\n */\n blockNumber?: string;\n\n /**\n * The timestamp for when the block was collated.\n */\n blockTimestamp?: string;\n\n /**\n * Network code as per EIP-155 for this transaction.\n */\n chainId: Hex;\n\n /**\n * A string representing a name of transaction contract method.\n */\n contractMethodName?: string;\n\n /**\n * The balance of the token that is being sent.\n */\n currentTokenBalance?: string;\n\n /**\n * Unique ID for custodian transaction.\n */\n custodyId?: string;\n\n /**\n * Custodian transaction status.\n */\n custodyStatus?: string;\n\n /** The optional custom nonce override as a decimal string. */\n customNonceValue?: string;\n\n /**\n * The custom token amount is the amount set by the user.\n */\n customTokenAmount?: string;\n\n /**\n * The dapp proposed token amount.\n */\n dappProposedTokenAmount?: string;\n\n /**\n * Gas values provided by the dApp.\n */\n dappSuggestedGasFees?: DappSuggestedGasFees;\n\n /**\n * The initial gas values set when the transaction was first created.\n */\n defaultGasEstimates?: DefaultGasEstimates;\n\n /**\n * String to indicate what device the transaction was confirmed on.\n */\n deviceConfirmedOn?: WalletDevice;\n\n /**\n * The address of the token being received of swap transaction.\n */\n destinationTokenAddress?: string;\n\n /**\n * The decimals of the token being received of swap transaction.\n */\n destinationTokenDecimals?: number;\n\n /**\n * The symbol of the token being received with swap.\n */\n destinationTokenSymbol?: string;\n\n /**\n * The estimated base fee of the transaction.\n */\n estimatedBaseFee?: string;\n\n /**\n * Which estimate level that the API suggested.\n */\n estimateSuggested?: string;\n\n /**\n * Which estimate level was used\n */\n estimateUsed?: string;\n\n /**\n * The chosen amount which will be the same as the originally proposed token\n * amount if the user does not edit the amount or will be a custom token\n * amount set by the user.\n */\n finalApprovalAmount?: string;\n\n /**\n * The number of the latest block when the transaction submit was first retried.\n */\n firstRetryBlockNumber?: string;\n\n /** Alternate EIP-1559 gas fee estimates for multiple priority levels. */\n gasFeeEstimates?: GasFeeEstimates;\n\n /** Whether the gas fee estimates have been checked at least once. */\n gasFeeEstimatesLoaded?: boolean;\n\n /**\n * A hex string of the transaction hash, used to identify the transaction on the network.\n */\n hash?: string;\n\n /**\n * A history of mutations to TransactionMeta.\n */\n history?: TransactionHistory;\n\n /**\n * Generated UUID associated with this transaction.\n */\n id: string;\n\n /**\n * Whether the transaction is a transfer.\n */\n isTransfer?: boolean;\n\n /**\n * Whether the transaction entry is generated from a user operation.\n */\n isUserOperation?: boolean;\n\n /**\n * Additional gas fees to cover the cost of persisting data on layer 1 for layer 2 networks.\n */\n layer1GasFee?: Hex;\n\n /**\n * The ID of the network client used by the transaction.\n */\n networkClientId?: NetworkClientId;\n\n /**\n * Network code as per EIP-155 for this transaction\n *\n * @deprecated Use `chainId` instead.\n */\n readonly networkID?: string;\n\n /**\n * Origin this transaction was sent from.\n */\n origin?: string;\n\n /**\n * The original dapp proposed token approval amount before edit by user.\n */\n originalApprovalAmount?: string;\n\n /**\n * The original gas estimation of the transaction.\n */\n originalGasEstimate?: string;\n\n /**\n * When we speed up a transaction, we set the type as Retry and we lose\n * information about type of transaction that is being set up, so we use\n * original type to track that information.\n */\n originalType?: TransactionType;\n\n /**\n * Account transaction balance after swap.\n */\n postTxBalance?: string;\n\n /**\n * Account transaction balance before swap.\n */\n preTxBalance?: string;\n\n /**\n * The previous gas properties before they were updated.\n */\n previousGas?: {\n /**\n * Maxmimum number of units of gas to use for this transaction.\n */\n gasLimit?: string;\n\n /**\n * Maximum amount per gas to pay for the transaction, including the priority fee.\n */\n maxFeePerGas?: string;\n\n /**\n * Maximum amount per gas to give to validator as incentive.\n */\n maxPriorityFeePerGas?: string;\n };\n\n /**\n * The transaction's 'r' value as a hex string.\n */\n r?: string;\n\n /**\n * Hex representation of the underlying transaction.\n */\n rawTx?: string;\n\n /**\n * When the transaction is dropped, this is the replacement transaction hash.\n */\n replacedBy?: string;\n\n /**\n * When the transaction is dropped, this is the replacement transaction ID.\n */\n replacedById?: string;\n\n /**\n * The number of times that the transaction submit has been retried.\n */\n retryCount?: number;\n\n /**\n * The transaction's 's' value as a hex string.\n */\n s?: string;\n\n /**\n * Response from security validator.\n */\n securityAlertResponse?: SecurityAlertResponse;\n\n /**\n * Response from security provider.\n */\n // TODO: Replace `any` with type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n securityProviderResponse?: Record<string, any>;\n\n /**\n * An array of entries that describe the user's journey through the send flow.\n * This is purely attached to state logs for troubleshooting and support.\n */\n sendFlowHistory?: SendFlowHistoryEntry[];\n\n /**\n * Simulation data for the transaction used to predict its outcome.\n */\n simulationData?: SimulationData;\n\n /**\n * If the gas estimation fails, an object containing error and block information.\n */\n simulationFails?: {\n reason?: string;\n errorKey?: string;\n debug: {\n blockNumber?: string;\n blockGasLimit?: string;\n };\n };\n\n /**\n * The time the transaction was submitted to the network, in Unix epoch time (ms).\n */\n submittedTime?: number;\n\n /**\n * The symbol of the token being swapped.\n */\n sourceTokenSymbol?: string;\n\n /**\n * The metadata of the swap transaction.\n */\n // TODO: Replace `any` with type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n swapMetaData?: Record<string, any>;\n\n /**\n * The value of the token being swapped.\n */\n swapTokenValue?: string;\n\n /**\n * Timestamp associated with this transaction.\n */\n time: number;\n\n /**\n * Whether transaction recipient is a smart contract.\n */\n toSmartContract?: boolean;\n\n /**\n * Additional transfer information.\n */\n transferInformation?: {\n contractAddress: string;\n decimals: number;\n symbol: string;\n };\n\n /**\n * Underlying Transaction object.\n */\n txParams: TransactionParams;\n\n /**\n * Transaction receipt.\n */\n txReceipt?: TransactionReceipt;\n\n /**\n * The type of transaction such as `cancel` or `swap`.\n */\n type?: TransactionType;\n\n /**\n * The gas limit supplied by user.\n */\n userEditedGasLimit?: boolean;\n\n /**\n * Estimate level user selected.\n */\n userFeeLevel?: string;\n\n /**\n * The transaction's 'v' value as a hex string.\n */\n v?: string;\n\n /**\n * Whether the transaction is verified on the blockchain.\n */\n verifiedOnBlockchain?: boolean;\n\n /**\n * Warning information for the transaction.\n */\n warning?: {\n error: string;\n message: string;\n };\n};\n\nexport type SendFlowHistoryEntry = {\n /**\n * String to indicate user interaction information.\n */\n entry: string;\n\n /**\n * Timestamp associated with this entry.\n */\n timestamp: number;\n};\n\n/**\n * The status of the transaction. Each status represents the state of the transaction internally\n * in the wallet. Some of these correspond with the state of the transaction on the network, but\n * some are wallet-specific.\n */\nexport enum TransactionStatus {\n approved = 'approved',\n /** @deprecated Determined by the clients using the transaction type. No longer used. */\n cancelled = 'cancelled',\n confirmed = 'confirmed',\n dropped = 'dropped',\n failed = 'failed',\n rejected = 'rejected',\n signed = 'signed',\n submitted = 'submitted',\n unapproved = 'unapproved',\n}\n\n/**\n * Options for wallet device.\n */\nexport enum WalletDevice {\n MM_MOBILE = 'metamask_mobile',\n MM_EXTENSION = 'metamask_extension',\n OTHER = 'other_device',\n}\n\n/**\n * The type of the transaction.\n */\nexport enum TransactionType {\n /**\n * A transaction sending a network's native asset to a recipient.\n */\n cancel = 'cancel',\n\n /**\n * A transaction that is interacting with a smart contract's methods that we\n * have not treated as a special case, such as approve, transfer, and\n * transferfrom.\n */\n contractInteraction = 'contractInteraction',\n\n /**\n * A transaction that deployed a smart contract.\n */\n deployContract = 'contractDeployment',\n\n /**\n * A transaction for Ethereum decryption.\n */\n ethDecrypt = 'eth_decrypt',\n\n /**\n * A transaction for getting an encryption public key.\n */\n ethGetEncryptionPublicKey = 'eth_getEncryptionPublicKey',\n\n /**\n * An incoming (deposit) transaction.\n */\n incoming = 'incoming',\n\n /**\n * A transaction for personal sign.\n */\n personalSign = 'personal_sign',\n\n /**\n * When a transaction is failed it can be retried by\n * resubmitting the same transaction with a higher gas fee. This type is also used\n * to speed up pending transactions. This is accomplished by creating a new tx with\n * the same nonce and higher gas fees.\n */\n retry = 'retry',\n\n /**\n * A transaction sending a network's native asset to a recipient.\n */\n simpleSend = 'simpleSend',\n\n /**\n * A transaction that is signing a message.\n */\n sign = 'eth_sign',\n\n /**\n * A transaction that is signing typed data.\n */\n signTypedData = 'eth_signTypedData',\n\n /**\n * A transaction sending a network's native asset to a recipient.\n */\n smart = 'smart',\n\n /**\n * A transaction swapping one token for another through MetaMask Swaps.\n */\n swap = 'swap',\n\n /**\n * Similar to the approve type, a swap approval is a special case of ERC20\n * approve method that requests an allowance of the token to spend on behalf\n * of the user for the MetaMask Swaps contract. The first swap for any token\n * will have an accompanying swapApproval transaction.\n */\n swapApproval = 'swapApproval',\n\n /**\n * A token transaction requesting an allowance of the token to spend on\n * behalf of the user.\n */\n tokenMethodApprove = 'approve',\n\n /**\n * A token transaction transferring tokens from an account that the sender\n * has an allowance of. The method is prefixed with safe because when calling\n * this method the contract checks to ensure that the receiver is an address\n * capable of handling the token being sent.\n */\n tokenMethodSafeTransferFrom = 'safetransferfrom',\n\n /**\n * A token transaction where the user is sending tokens that they own to\n * another address.\n */\n tokenMethodTransfer = 'transfer',\n\n /**\n * A token transaction transferring tokens from an account that the sender\n * has an allowance of. For more information on allowances, see the approve\n * type.\n */\n tokenMethodTransferFrom = 'transferfrom',\n\n /**\n * A token transaction requesting an allowance of all of a user's tokens to\n * spend on behalf of the user.\n */\n tokenMethodSetApprovalForAll = 'setapprovalforall',\n\n /**\n * Increase the allowance by a given increment\n */\n tokenMethodIncreaseAllowance = 'increaseAllowance',\n}\n\n/**\n * Standard data concerning a transaction to be processed by the blockchain.\n */\nexport type TransactionParams = {\n /**\n * A list of addresses and storage keys that the transaction plans to access.\n */\n accessList?: AccessList;\n\n /**\n * Network ID as per EIP-155.\n */\n chainId?: Hex;\n\n /**\n * Data to pass with this transaction.\n */\n data?: string;\n\n /**\n * Error message for gas estimation failure.\n */\n estimateGasError?: string;\n\n /**\n * Estimated base fee for this transaction.\n */\n estimatedBaseFee?: string;\n\n /**\n * Which estimate level that the API suggested.\n */\n estimateSuggested?: string;\n\n /**\n * Which estimate level was used\n */\n estimateUsed?: string;\n\n /**\n * Address to send this transaction from.\n */\n from: string;\n\n /**\n * same as gasLimit?\n */\n gas?: string;\n\n /**\n * Maxmimum number of units of gas to use for this transaction.\n */\n gasLimit?: string;\n\n /**\n * Price per gas for legacy txs\n */\n gasPrice?: string;\n\n /**\n * Gas used in the transaction.\n */\n gasUsed?: string;\n\n /**\n * Maximum amount per gas to pay for the transaction, including the priority\n * fee.\n */\n maxFeePerGas?: string;\n\n /**\n * Maximum amount per gas to give to validator as incentive.\n */\n maxPriorityFeePerGas?: string;\n\n /**\n * Unique number to prevent replay attacks.\n */\n nonce?: string;\n\n /**\n * Address to send this transaction to.\n */\n to?: string;\n\n /**\n * Value associated with this transaction.\n */\n value?: string;\n\n /**\n * Type of transaction.\n * 0x0 indicates a legacy transaction.\n */\n type?: string;\n};\n\n/**\n * Standard data concerning a transaction processed by the blockchain.\n */\nexport type TransactionReceipt = {\n /**\n * The block hash of the block that this transaction was included in.\n */\n blockHash?: string;\n\n /**\n * The block number of the block that this transaction was included in.\n */\n blockNumber?: string;\n\n /**\n * Effective gas price the transaction was charged at.\n */\n effectiveGasPrice?: string;\n\n /**\n * Gas used in the transaction.\n */\n gasUsed?: string;\n\n /**\n * Total used gas in hex.\n */\n l1Fee?: string;\n\n /**\n * All the logs emitted by this transaction.\n */\n logs?: Log[];\n\n /**\n * The status of the transaction.\n */\n status?: string;\n\n /**\n * The hexadecimal index of this transaction in the list of transactions included in the block this transaction was mined in.\n */\n transactionIndex?: string;\n};\n\n/**\n * Represents an event that has been included in a transaction using the EVM `LOG` opcode.\n */\nexport type Log = {\n /**\n * Address of the contract that generated log.\n */\n address?: string;\n /**\n * List of topics for log.\n */\n topics?: string;\n};\n\n/**\n * The configuration required to fetch transaction data from a RemoteTransactionSource.\n */\n// This interface was created before this ESLint rule was added.\n// Convert to a `type` in a future major version.\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport interface RemoteTransactionSourceRequest {\n /**\n * The address of the account to fetch transactions for.\n */\n address: string;\n\n /**\n * The chainId of the current network.\n */\n currentChainId: Hex;\n\n /**\n * Block number to start fetching transactions from.\n */\n fromBlock?: number;\n\n /**\n * Maximum number of transactions to retrieve.\n */\n limit?: number;\n}\n\n/**\n * An object capable of fetching transaction data from a remote source.\n * Used by the IncomingTransactionHelper to retrieve remote transaction data.\n */\n// This interface was created before this ESLint rule was added.\n// Convert to a `type` in a future major version.\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport interface RemoteTransactionSource {\n /**\n * @param chainId - The chainId of the current network.\n * @returns Whether the remote transaction source supports the specified network.\n */\n isSupportedNetwork: (chainId: Hex) => boolean;\n\n /**\n * @returns An array of additional keys to use when caching the last fetched block number.\n */\n getLastBlockVariations?: () => string[];\n\n /**\n * @param request - A request object containing data such as the address and chain ID.\n * @returns An array of transaction metadata for the retrieved transactions.\n */\n fetchTransactions: (\n request: RemoteTransactionSourceRequest,\n ) => Promise<TransactionMeta[]>;\n}\n\n/**\n * Gas values initially suggested by the dApp.\n */\nexport type DappSuggestedGasFees = {\n gas?: string;\n gasPrice?: string;\n maxFeePerGas?: string;\n maxPriorityFeePerGas?: string;\n};\n\n/**\n * Gas values saved by the user for a specific chain.\n */\n// Convert to a `type` in a future major version.\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport interface SavedGasFees {\n maxBaseFee: string;\n priorityFee: string;\n}\n\n/**\n * A transaction history operation that includes a note and timestamp.\n */\ntype ExtendedHistoryOperation = JsonCompatibleOperation & {\n note?: string;\n timestamp?: number;\n};\n\n/**\n * A transaction history entry that includes the ExtendedHistoryOperation as the first element.\n */\nexport type TransactionHistoryEntry = [\n ExtendedHistoryOperation,\n ...JsonCompatibleOperation[],\n];\n\n/**\n * A transaction history that includes the transaction meta as the first element.\n * And the rest of the elements are the operation arrays that were applied to the transaction meta.\n */\nexport type TransactionHistory = [\n TransactionMeta,\n ...TransactionHistoryEntry[],\n];\n\n/**\n * Result of inferring the transaction type.\n */\nexport type InferTransactionTypeResult = {\n /**\n * The contract code, in hex format if it exists. '0x0' or\n * '0x' are also indicators of non-existent contract code.\n */\n getCodeResponse?: string | null;\n\n /**\n * The type of transaction\n */\n type: TransactionType;\n};\n\n/**\n * A function for verifying a transaction, whether it is malicious or not.\n */\nexport type SecurityProviderRequest = (\n requestData: TransactionMeta,\n messageType: string,\n // TODO: Replace `any` with type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n) => Promise<any>;\n\n/**\n * Specifies the shape of the base transaction parameters.\n * Added in EIP-2718.\n */\nexport enum TransactionEnvelopeType {\n /**\n * A legacy transaction, the very first type.\n */\n legacy = '0x0',\n\n /**\n * EIP-2930 defined the access list transaction type that allowed for\n * specifying the state that a transaction would act upon in advance and\n * theoretically save on gas fees.\n */\n accessList = '0x1',\n\n /**\n * The type introduced comes from EIP-1559, Fee Market describes the addition\n * of a baseFee to blocks that will be burned instead of distributed to\n * miners. Transactions of this type have both a maxFeePerGas (maximum total\n * amount in gwei per gas to spend on the transaction) which is inclusive of\n * the maxPriorityFeePerGas (maximum amount of gwei per gas from the\n * transaction fee to distribute to miner).\n */\n feeMarket = '0x2',\n}\n\n/**\n * The source of the gas fee parameters on a transaction.\n */\nexport enum UserFeeLevel {\n CUSTOM = 'custom',\n DAPP_SUGGESTED = 'dappSuggested',\n MEDIUM = 'medium',\n}\n\n/**\n * Initial gas values set when the transaction was first created.\n */\nexport type DefaultGasEstimates = {\n /**\n * Source of the gas fee values, such as `dappSuggested` or `medium`.\n */\n estimateType?: string;\n\n /**\n * Maxmimum number of units of gas to use for this transaction.\n */\n gas?: string;\n\n /**\n * Price per gas for legacy transactions.\n */\n gasPrice?: string;\n\n /**\n * Maximum amount per gas to pay for the transaction, including the priority fee.\n */\n maxFeePerGas?: string;\n\n /**\n * Maximum amount per gas to give to validator as incentive.\n */\n maxPriorityFeePerGas?: string;\n};\n\n/**\n * Data concerning an error while processing a transaction.\n */\nexport type TransactionError = {\n /**\n * A descriptive error name.\n */\n name: string;\n\n /**\n * A descriptive error message providing details about the encountered error.\n */\n message: string;\n\n /**\n * The stack trace associated with the error, if available.\n */\n stack?: string;\n\n /**\n * An optional error code associated with the error.\n */\n code?: string;\n\n /**\n * The rpc property holds additional information related to the error.\n */\n // We are intentionally using `any` here instead of `Json` because it causes\n // `WritableDraft<TransactionMeta>` from Immer to cause TypeScript to error\n // with \"Type instantiation is excessively deep and possibly infinite\". See:\n // <https://github.com/immerjs/immer/issues/839>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n rpc?: any;\n};\n\n/**\n * Type for security alert response from transaction validator.\n */\nexport type SecurityAlertResponse = {\n reason: string;\n features?: string[];\n result_type: string;\n providerRequestsCount?: Record<string, number>;\n};\n\n/** Alternate priority levels for which values are provided in gas fee estimates. */\nexport enum GasFeeEstimateLevel {\n Low = 'low',\n Medium = 'medium',\n High = 'high',\n}\n\n/** Type of gas fee estimate generated by a GasFeeFlow. */\nexport enum GasFeeEstimateType {\n FeeMarket = 'fee-market',\n Legacy = 'legacy',\n GasPrice = 'eth_gasPrice',\n}\n\n/** Gas fee estimates for a specific priority level. */\nexport type FeeMarketGasFeeEstimateForLevel = {\n /** Maximum amount to pay per gas. */\n maxFeePerGas: Hex;\n\n /** Maximum amount per gas to give to the validator as an incentive. */\n maxPriorityFeePerGas: Hex;\n};\n\n/** Gas fee estimates for a EIP-1559 transaction. */\nexport type FeeMarketGasFeeEstimates = {\n type: GasFeeEstimateType.FeeMarket;\n [GasFeeEstimateLevel.Low]: FeeMarketGasFeeEstimateForLevel;\n [GasFeeEstimateLevel.Medium]: FeeMarketGasFeeEstimateForLevel;\n [GasFeeEstimateLevel.High]: FeeMarketGasFeeEstimateForLevel;\n};\n\n/** Gas fee estimates for a legacy transaction. */\nexport type LegacyGasFeeEstimates = {\n type: GasFeeEstimateType.Legacy;\n [GasFeeEstimateLevel.Low]: Hex;\n [GasFeeEstimateLevel.Medium]: Hex;\n [GasFeeEstimateLevel.High]: Hex;\n};\n\n/** Gas fee estimates for a transaction retrieved with the eth_gasPrice method. */\nexport type GasPriceGasFeeEstimates = {\n type: GasFeeEstimateType.GasPrice;\n gasPrice: Hex;\n};\n\n/** Gas fee estimates for a transaction. */\nexport type GasFeeEstimates =\n | FeeMarketGasFeeEstimates\n | LegacyGasFeeEstimates\n | GasPriceGasFeeEstimates;\n\n/** Request to a gas fee flow to obtain gas fee estimates. */\nexport type GasFeeFlowRequest = {\n /** An EthQuery instance to enable queries to the associated RPC provider. */\n ethQuery: EthQuery;\n\n /** Gas fee controller data matching the chain ID of the transaction. */\n gasFeeControllerData: GasFeeState;\n\n /** The metadata of the transaction to obtain estimates for. */\n transactionMeta: TransactionMeta;\n};\n\n/** Response from a gas fee flow containing gas fee estimates. */\nexport type GasFeeFlowResponse = {\n /** The gas fee estimates for the transaction. */\n estimates: GasFeeEstimates;\n};\n\n/** A method of obtaining gas fee estimates for a specific transaction. */\nexport type GasFeeFlow = {\n /**\n * Determine if the gas fee flow supports the specified transaction.\n * @param transactionMeta - The transaction metadata.\n * @returns Whether the gas fee flow supports the transaction.\n */\n matchesTransaction(transactionMeta: TransactionMeta): boolean;\n\n /**\n * Get gas fee estimates for a specific transaction.\n * @param request - The gas fee flow request.\n * @returns The gas fee flow response containing the gas fee estimates.\n */\n getGasFees: (request: GasFeeFlowRequest) => Promise<GasFeeFlowResponse>;\n};\n\n/** Request to a layer 1 gas fee flow to obtain layer 1 fee estimate. */\nexport type Layer1GasFeeFlowRequest = {\n /** RPC Provider instance. */\n provider: Provider;\n\n /** The metadata of the transaction to obtain estimates for. */\n transactionMeta: TransactionMeta;\n};\n\n/** Response from a layer 1 gas fee flow containing layer 1 fee estimate. */\nexport type Layer1GasFeeFlowResponse = {\n /** The gas fee estimates for the transaction. */\n layer1Fee: Hex;\n};\n\n/** A method of obtaining layer 1 gas fee estimates for a specific transaction. */\nexport type Layer1GasFeeFlow = {\n /**\n * Determine if the gas fee flow supports the specified transaction.\n * @param transactionMeta - The transaction metadata.\n * @returns Whether the layer1 gas fee flow supports the transaction.\n */\n matchesTransaction(transactionMeta: TransactionMeta): boolean;\n\n /**\n * Get layer 1 gas fee estimates for a specific transaction.\n * @param request - The gas fee flow request.\n * @returns The gas fee flow response containing the layer 1 gas fee estimate.\n */\n getLayer1Fee: (\n request: Layer1GasFeeFlowRequest,\n ) => Promise<Layer1GasFeeFlowResponse>;\n};\n\n/** Simulation data concerning an update to a native or token balance. */\nexport type SimulationBalanceChange = {\n /** The balance before the transaction. */\n previousBalance: Hex;\n\n /** The balance after the transaction. */\n newBalance: Hex;\n\n /** The difference in balance. */\n difference: Hex;\n\n /** Whether the balance is increasing or decreasing. */\n isDecrease: boolean;\n};\n\n/** Token standards supported by simulation. */\nexport enum SimulationTokenStandard {\n erc20 = 'erc20',\n erc721 = 'erc721',\n erc1155 = 'erc1155',\n}\n\n/** Simulation data concerning an updated token. */\nexport type SimulationToken = {\n /** The token's contract address. */\n address: Hex;\n\n /** The standard of the token. */\n standard: SimulationTokenStandard;\n\n /** The ID of the token if supported by the standard. */\n id?: Hex;\n};\n\n/** Simulation data concerning a change to the a token balance. */\nexport type SimulationTokenBalanceChange = SimulationToken &\n SimulationBalanceChange;\n\nexport enum SimulationErrorCode {\n ChainNotSupported = 'chain-not-supported',\n Disabled = 'disabled',\n InvalidResponse = 'invalid-response',\n Reverted = 'reverted',\n}\n\n/** Error data for a failed simulation. */\nexport type SimulationError = {\n /** Error code to identify the error type. */\n code?: string | number;\n\n /** Error message to describe the error. */\n message?: string;\n};\n\n/** Simulation data for a transaction. */\nexport type SimulationData = {\n /** Error data if the simulation failed or the transaction reverted. */\n error?: SimulationError;\n\n /** Data concerning a change to the user's native balance. */\n nativeBalanceChange?: SimulationBalanceChange;\n\n /** Data concerning a change to the user's token balances. */\n tokenBalanceChanges: SimulationTokenBalanceChange[];\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/helpers/MultichainTrackingHelper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,OAAO,cAAc;AAUrB,SAAS,aAAa;AAVtB;AAkEO,IAAM,2BAAN,MAA+B;AAAA,EAyDpC,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,GAAoC;AA6NpC;AAeA;AAwEA;AA1XA;AAEA,uBAAS,WAAT;AAEA,uBAAS,eAAT;AAEA,uBAAS,6BAAT;AAEA,uBAAS,+BAAT;AAEA,uBAAS,uBAAT;AAEA,uBAAS,2BAAT;AAEA,uBAAS,2CAAT;AAIA,uBAAS,2CAAT;AAIA,uBAAS,qBAAT;AAMA,uBAAS,kCAAT;AAMA,uBAAS,kCAAT;AAMA,uBA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,EACF;AAEA,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,eAAe,EAAE,QAAQ;AAAA,EAC3B,IAAI,mBAAK,uBAAL,WAA2B;AAE/B,MAAI,mCACF,mBAAK,uCAAsC,IAAI,OAAO;AACxD,MAAI,CAAC,kCAAkC;AACrC,uCAAmC,IAAI,iCAAiC;AAAA,MACtE,uBACE,mBAAK,6BAA4B;AAAA,IACrC,CAAC;AACD,uBAAK,uCAAsC;AAAA,MACzC;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,QAAM,eAAe,mBAAK,qBAAL,WAAyB;AAAA,IAC5C;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,4BAA4B,mBAAK,kCAAL,WAAsC;AAAA,IACtE;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,4BAA4B,mBAAK,kCAAL,WAAsC;AAAA,IACtE;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,qBAAK,cAAa,IAAI,iBAAiB;AAAA,IACrC;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;AAEA;AAsBA;AAAA,sBAAiB,SAAC;AAAA,EAChB;AAAA,EACA;AACF,IAGI,CAAC,GAA8B;AACjC,MAAI;AAEJ,MAAI,iBAAiB;AACnB,QAAI;AACF,sBAAgB,mBAAK,uBAAL,WAA2B;AAAA,IAC7C,SAAS,KAAK;AACZ,iCAAI,iDAAiD;AAAA,IACvD;AAAA,EACF;AACA,MAAI,CAAC,iBAAiB,SAAS;AAC7B,QAAI;AACF,YAAM,4BACJ,mBAAK,+BAAL,WAAmC;AACrC,sBAAgB,mBAAK,uBAAL,WAA2B;AAAA,IAC7C,SAAS,KAAK;AACZ,iCAAI,yCAAyC;AAAA,IAC/C;AAAA,EACF;AACA,SAAO;AACT","sourcesContent":["import EthQuery from '@metamask/eth-query';\nimport type {\n NetworkClientId,\n NetworkController,\n NetworkClient,\n BlockTracker,\n Provider,\n NetworkControllerStateChangeEvent,\n} from '@metamask/network-controller';\nimport type { Hex } from '@metamask/utils';\nimport { Mutex } from 'async-mutex';\nimport type { NonceLock, NonceTracker } from 'nonce-tracker';\n\nimport { incomingTransactionsLogger as log } from '../logger';\nimport { EtherscanRemoteTransactionSource } from './EtherscanRemoteTransactionSource';\nimport type {\n IncomingTransactionHelper,\n IncomingTransactionOptions,\n} from './IncomingTransactionHelper';\nimport type { PendingTransactionTracker } from './PendingTransactionTracker';\n\n/**\n * Registry of network clients provided by the NetworkController\n */\ntype NetworkClientRegistry = ReturnType<\n NetworkController['getNetworkClientRegistry']\n>;\n\nexport type MultichainTrackingHelperOptions = {\n isMultichainEnabled: boolean;\n provider: Provider;\n nonceTracker: NonceTracker;\n incomingTransactionOptions: IncomingTransactionOptions;\n\n findNetworkClientIdByChainId: NetworkController['findNetworkClientIdByChainId'];\n getNetworkClientById: NetworkController['getNetworkClientById'];\n getNetworkClientRegistry: NetworkController['getNetworkClientRegistry'];\n\n removeIncomingTransactionHelperListeners: (\n IncomingTransactionHelper: IncomingTransactionHelper,\n ) => void;\n removePendingTransactionTrackerListeners: (\n pendingTransactionTracker: PendingTransactionTracker,\n ) => void;\n createNonceTracker: (opts: {\n provider: Provider;\n blockTracker: BlockTracker;\n chainId?: Hex;\n }) => NonceTracker;\n createIncomingTransactionHelper: (opts: {\n blockTracker: BlockTracker;\n etherscanRemoteTransactionSource: EtherscanRemoteTransactionSource;\n chainId?: Hex;\n }) => IncomingTransactionHelper;\n createPendingTransactionTracker: (opts: {\n provider: Provider;\n blockTracker: BlockTracker;\n chainId?: Hex;\n }) => PendingTransactionTracker;\n onNetworkStateChange: (\n listener: (\n ...payload: NetworkControllerStateChangeEvent['payload']\n ) => void,\n ) => void;\n};\n\nexport class MultichainTrackingHelper {\n #isMultichainEnabled: boolean;\n\n readonly #provider: Provider;\n\n readonly #nonceTracker: NonceTracker;\n\n readonly #incomingTransactionOptions: IncomingTransactionOptions;\n\n readonly #findNetworkClientIdByChainId: NetworkController['findNetworkClientIdByChainId'];\n\n readonly #getNetworkClientById: NetworkController['getNetworkClientById'];\n\n readonly #getNetworkClientRegistry: NetworkController['getNetworkClientRegistry'];\n\n readonly #removeIncomingTransactionHelperListeners: (\n IncomingTransactionHelper: IncomingTransactionHelper,\n ) => void;\n\n readonly #removePendingTransactionTrackerListeners: (\n pendingTransactionTracker: PendingTransactionTracker,\n ) => void;\n\n readonly #createNonceTracker: (opts: {\n provider: Provider;\n blockTracker: BlockTracker;\n chainId?: Hex;\n }) => NonceTracker;\n\n readonly #createIncomingTransactionHelper: (opts: {\n blockTracker: BlockTracker;\n chainId?: Hex;\n etherscanRemoteTransactionSource: EtherscanRemoteTransactionSource;\n }) => IncomingTransactionHelper;\n\n readonly #createPendingTransactionTracker: (opts: {\n provider: Provider;\n blockTracker: BlockTracker;\n chainId?: Hex;\n }) => PendingTransactionTracker;\n\n readonly #nonceMutexesByChainId = new Map<Hex, Map<string, Mutex>>();\n\n readonly #trackingMap: Map<\n NetworkClientId,\n {\n nonceTracker: NonceTracker;\n pendingTransactionTracker: PendingTransactionTracker;\n incomingTransactionHelper: IncomingTransactionHelper;\n }\n > = new Map();\n\n readonly #etherscanRemoteTransactionSourcesMap: Map<\n Hex,\n EtherscanRemoteTransactionSource\n > = new Map();\n\n constructor({\n isMultichainEnabled,\n provider,\n nonceTracker,\n incomingTransactionOptions,\n findNetworkClientIdByChainId,\n getNetworkClientById,\n getNetworkClientRegistry,\n removeIncomingTransactionHelperListeners,\n removePendingTransactionTrackerListeners,\n createNonceTracker,\n createIncomingTransactionHelper,\n createPendingTransactionTracker,\n onNetworkStateChange,\n }: MultichainTrackingHelperOptions) {\n this.#isMultichainEnabled = isMultichainEnabled;\n this.#provider = provider;\n this.#nonceTracker = nonceTracker;\n this.#incomingTransactionOptions = incomingTransactionOptions;\n\n this.#findNetworkClientIdByChainId = findNetworkClientIdByChainId;\n this.#getNetworkClientById = getNetworkClientById;\n this.#getNetworkClientRegistry = getNetworkClientRegistry;\n\n this.#removeIncomingTransactionHelperListeners =\n removeIncomingTransactionHelperListeners;\n this.#removePendingTransactionTrackerListeners =\n removePendingTransactionTrackerListeners;\n this.#createNonceTracker = createNonceTracker;\n this.#createIncomingTransactionHelper = createIncomingTransactionHelper;\n this.#createPendingTransactionTracker = createPendingTransactionTracker;\n\n onNetworkStateChange((_, patches) => {\n if (this.#isMultichainEnabled) {\n const networkClients = this.#getNetworkClientRegistry();\n patches.forEach(({ op, path }) => {\n if (op === 'remove' && path[0] === 'networkConfigurations') {\n const networkClientId = path[1] as NetworkClientId;\n delete networkClients[networkClientId];\n }\n });\n\n this.#refreshTrackingMap(networkClients);\n }\n });\n }\n\n initialize() {\n if (!this.#isMultichainEnabled) {\n return;\n }\n const networkClients = this.#getNetworkClientRegistry();\n this.#refreshTrackingMap(networkClients);\n }\n\n has(networkClientId: NetworkClientId) {\n return this.#trackingMap.has(networkClientId);\n }\n\n getEthQuery({\n networkClientId,\n chainId,\n }: {\n networkClientId?: NetworkClientId;\n chainId?: Hex;\n } = {}): EthQuery {\n return new EthQuery(this.getProvider({ networkClientId, chainId }));\n }\n\n getProvider({\n networkClientId,\n chainId,\n }: {\n networkClientId?: NetworkClientId;\n chainId?: Hex;\n } = {}): Provider {\n if (!this.#isMultichainEnabled) {\n return this.#provider;\n }\n\n const networkClient = this.#getNetworkClient({\n networkClientId,\n chainId,\n });\n\n return networkClient?.provider || this.#provider;\n }\n\n /**\n * Gets the mutex intended to guard the nonceTracker for a particular chainId and key .\n *\n * @param opts - The options object.\n * @param opts.chainId - The hex chainId.\n * @param opts.key - The hex address (or constant) pertaining to the chainId\n * @returns Mutex instance for the given chainId and key pair\n */\n async acquireNonceLockForChainIdKey({\n chainId,\n key = 'global',\n }: {\n chainId: Hex;\n key?: string;\n }): Promise<() => void> {\n let nonceMutexesForChainId = this.#nonceMutexesByChainId.get(chainId);\n if (!nonceMutexesForChainId) {\n nonceMutexesForChainId = new Map<string, Mutex>();\n this.#nonceMutexesByChainId.set(chainId, nonceMutexesForChainId);\n }\n let nonceMutexForKey = nonceMutexesForChainId.get(key);\n if (!nonceMutexForKey) {\n nonceMutexForKey = new Mutex();\n nonceMutexesForChainId.set(key, nonceMutexForKey);\n }\n\n return await nonceMutexForKey.acquire();\n }\n\n /**\n * Gets the next nonce according to the nonce-tracker.\n * Ensure `releaseLock` is called once processing of the `nonce` value is complete.\n *\n * @param address - The hex string address for the transaction.\n * @param networkClientId - The network client ID for the transaction, used to fetch the correct nonce tracker.\n * @returns object with the `nextNonce` `nonceDetails`, and the releaseLock.\n */\n async getNonceLock(\n address: string,\n networkClientId?: NetworkClientId,\n ): Promise<NonceLock> {\n let releaseLockForChainIdKey: (() => void) | undefined;\n let nonceTracker = this.#nonceTracker;\n if (networkClientId && this.#isMultichainEnabled) {\n const networkClient = this.#getNetworkClientById(networkClientId);\n releaseLockForChainIdKey = await this.acquireNonceLockForChainIdKey({\n chainId: networkClient.configuration.chainId,\n key: address,\n });\n const trackers = this.#trackingMap.get(networkClientId);\n if (!trackers) {\n throw new Error('missing nonceTracker for networkClientId');\n }\n nonceTracker = trackers.nonceTracker;\n }\n\n // Acquires the lock for the chainId + address and the nonceLock from the nonceTracker, then\n // couples them together by replacing the nonceLock's releaseLock method with\n // an anonymous function that calls releases both the original nonceLock and the\n // lock for the chainId.\n try {\n const nonceLock = await nonceTracker.getNonceLock(address);\n return {\n ...nonceLock,\n releaseLock: () => {\n nonceLock.releaseLock();\n releaseLockForChainIdKey?.();\n },\n };\n } catch (err) {\n releaseLockForChainIdKey?.();\n throw err;\n }\n }\n\n startIncomingTransactionPolling(networkClientIds: NetworkClientId[] = []) {\n networkClientIds.forEach((networkClientId) => {\n this.#trackingMap.get(networkClientId)?.incomingTransactionHelper.start();\n });\n }\n\n stopIncomingTransactionPolling(networkClientIds: NetworkClientId[] = []) {\n networkClientIds.forEach((networkClientId) => {\n this.#trackingMap.get(networkClientId)?.incomingTransactionHelper.stop();\n });\n }\n\n stopAllIncomingTransactionPolling() {\n for (const [, trackers] of this.#trackingMap) {\n trackers.incomingTransactionHelper.stop();\n }\n }\n\n async updateIncomingTransactions(networkClientIds: NetworkClientId[] = []) {\n const promises = await Promise.allSettled(\n networkClientIds.map(async (networkClientId) => {\n return await this.#trackingMap\n .get(networkClientId)\n ?.incomingTransactionHelper.update();\n }),\n );\n\n promises\n .filter((result) => result.status === 'rejected')\n .forEach((result) => {\n log(\n 'failed to update incoming transactions',\n (result as PromiseRejectedResult).reason,\n );\n });\n }\n\n checkForPendingTransactionAndStartPolling = () => {\n for (const [, trackers] of this.#trackingMap) {\n trackers.pendingTransactionTracker.startIfPendingTransactions();\n }\n };\n\n stopAllTracking() {\n for (const [networkClientId] of this.#trackingMap) {\n this.#stopTrackingByNetworkClientId(networkClientId);\n }\n }\n\n #refreshTrackingMap = (networkClients: NetworkClientRegistry) => {\n this.#refreshEtherscanRemoteTransactionSources(networkClients);\n\n const networkClientIds = Object.keys(networkClients);\n const existingNetworkClientIds = Array.from(this.#trackingMap.keys());\n\n // Remove tracking for NetworkClientIds that no longer exist\n const networkClientIdsToRemove = existingNetworkClientIds.filter(\n (id) => !networkClientIds.includes(id),\n );\n networkClientIdsToRemove.forEach((id) => {\n this.#stopTrackingByNetworkClientId(id);\n });\n\n // Start tracking new NetworkClientIds from the registry\n const networkClientIdsToAdd = networkClientIds.filter(\n (id) => !existingNetworkClientIds.includes(id),\n );\n networkClientIdsToAdd.forEach((id) => {\n this.#startTrackingByNetworkClientId(id);\n });\n };\n\n #stopTrackingByNetworkClientId(networkClientId: NetworkClientId) {\n const trackers = this.#trackingMap.get(networkClientId);\n if (trackers) {\n trackers.pendingTransactionTracker.stop();\n this.#removePendingTransactionTrackerListeners(\n trackers.pendingTransactionTracker,\n );\n trackers.incomingTransactionHelper.stop();\n this.#removeIncomingTransactionHelperListeners(\n trackers.incomingTransactionHelper,\n );\n this.#trackingMap.delete(networkClientId);\n }\n }\n\n #startTrackingByNetworkClientId(networkClientId: NetworkClientId) {\n const trackers = this.#trackingMap.get(networkClientId);\n if (trackers) {\n return;\n }\n\n const {\n provider,\n blockTracker,\n configuration: { chainId },\n } = this.#getNetworkClientById(networkClientId);\n\n let etherscanRemoteTransactionSource =\n this.#etherscanRemoteTransactionSourcesMap.get(chainId);\n if (!etherscanRemoteTransactionSource) {\n etherscanRemoteTransactionSource = new EtherscanRemoteTransactionSource({\n includeTokenTransfers:\n this.#incomingTransactionOptions.includeTokenTransfers,\n });\n this.#etherscanRemoteTransactionSourcesMap.set(\n chainId,\n etherscanRemoteTransactionSource,\n );\n }\n\n const nonceTracker = this.#createNonceTracker({\n provider,\n blockTracker,\n chainId,\n });\n\n const incomingTransactionHelper = this.#createIncomingTransactionHelper({\n blockTracker,\n etherscanRemoteTransactionSource,\n chainId,\n });\n\n const pendingTransactionTracker = this.#createPendingTransactionTracker({\n provider,\n blockTracker,\n chainId,\n });\n\n this.#trackingMap.set(networkClientId, {\n nonceTracker,\n incomingTransactionHelper,\n pendingTransactionTracker,\n });\n }\n\n #refreshEtherscanRemoteTransactionSources = (\n networkClients: NetworkClientRegistry,\n ) => {\n // this will be prettier when we have consolidated network clients with a single chainId:\n // check if there are still other network clients using the same chainId\n // if not remove the etherscanRemoteTransaction source from the map\n const chainIdsInRegistry = new Set();\n Object.values(networkClients).forEach((networkClient) =>\n chainIdsInRegistry.add(networkClient.configuration.chainId),\n );\n const existingChainIds = Array.from(\n this.#etherscanRemoteTransactionSourcesMap.keys(),\n );\n const chainIdsToRemove = existingChainIds.filter(\n (chainId) => !chainIdsInRegistry.has(chainId),\n );\n\n chainIdsToRemove.forEach((chainId) => {\n this.#etherscanRemoteTransactionSourcesMap.delete(chainId);\n });\n };\n\n #getNetworkClient({\n networkClientId,\n chainId,\n }: {\n networkClientId?: NetworkClientId;\n chainId?: Hex;\n } = {}): NetworkClient | undefined {\n let networkClient: NetworkClient | undefined;\n\n if (networkClientId) {\n try {\n networkClient = this.#getNetworkClientById(networkClientId);\n } catch (err) {\n log('failed to get network client by networkClientId');\n }\n }\n if (!networkClient && chainId) {\n try {\n const networkClientIdForChainId =\n this.#findNetworkClientIdByChainId(chainId);\n networkClient = this.#getNetworkClientById(networkClientIdForChainId);\n } catch (err) {\n log('failed to get network client by chainId');\n }\n }\n return networkClient;\n }\n}\n"]}