@metamask/transaction-controller 15.0.0 → 17.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 (90) hide show
  1. package/CHANGELOG.md +48 -1
  2. package/dist/TransactionController.d.ts +159 -20
  3. package/dist/TransactionController.d.ts.map +1 -1
  4. package/dist/TransactionController.js +489 -151
  5. package/dist/TransactionController.js.map +1 -1
  6. package/dist/constants.d.ts +2 -3
  7. package/dist/constants.d.ts.map +1 -1
  8. package/dist/constants.js +3 -15
  9. package/dist/constants.js.map +1 -1
  10. package/dist/{EtherscanRemoteTransactionSource.d.ts → helpers/EtherscanRemoteTransactionSource.d.ts} +1 -1
  11. package/dist/helpers/EtherscanRemoteTransactionSource.d.ts.map +1 -0
  12. package/dist/{EtherscanRemoteTransactionSource.js → helpers/EtherscanRemoteTransactionSource.js} +4 -4
  13. package/dist/helpers/EtherscanRemoteTransactionSource.js.map +1 -0
  14. package/dist/{IncomingTransactionHelper.d.ts → helpers/IncomingTransactionHelper.d.ts} +1 -1
  15. package/dist/helpers/IncomingTransactionHelper.d.ts.map +1 -0
  16. package/dist/{IncomingTransactionHelper.js → helpers/IncomingTransactionHelper.js} +1 -1
  17. package/dist/helpers/IncomingTransactionHelper.js.map +1 -0
  18. package/dist/helpers/PendingTransactionTracker.d.ts +38 -0
  19. package/dist/helpers/PendingTransactionTracker.d.ts.map +1 -0
  20. package/dist/helpers/PendingTransactionTracker.js +329 -0
  21. package/dist/helpers/PendingTransactionTracker.js.map +1 -0
  22. package/dist/index.d.ts +2 -2
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +1 -1
  25. package/dist/index.js.map +1 -1
  26. package/dist/logger.d.ts +0 -1
  27. package/dist/logger.d.ts.map +1 -1
  28. package/dist/logger.js +1 -2
  29. package/dist/logger.js.map +1 -1
  30. package/dist/types.d.ts +290 -8
  31. package/dist/types.d.ts.map +1 -1
  32. package/dist/types.js +37 -1
  33. package/dist/types.js.map +1 -1
  34. package/dist/utils/etherscan.d.ts.map +1 -0
  35. package/dist/{etherscan.js → utils/etherscan.js} +3 -4
  36. package/dist/utils/etherscan.js.map +1 -0
  37. package/dist/{external-transactions.d.ts → utils/external-transactions.d.ts} +1 -1
  38. package/dist/utils/external-transactions.d.ts.map +1 -0
  39. package/dist/{external-transactions.js → utils/external-transactions.js} +1 -1
  40. package/dist/utils/external-transactions.js.map +1 -0
  41. package/dist/utils/gas-fees.d.ts +31 -0
  42. package/dist/utils/gas-fees.d.ts.map +1 -0
  43. package/dist/utils/gas-fees.js +212 -0
  44. package/dist/utils/gas-fees.js.map +1 -0
  45. package/dist/utils/gas.d.ts +27 -0
  46. package/dist/utils/gas.d.ts.map +1 -0
  47. package/dist/utils/gas.js +134 -0
  48. package/dist/utils/gas.js.map +1 -0
  49. package/dist/{history.d.ts → utils/history.d.ts} +1 -1
  50. package/dist/utils/history.d.ts.map +1 -0
  51. package/dist/utils/history.js.map +1 -0
  52. package/dist/utils/swaps.d.ts +81 -0
  53. package/dist/utils/swaps.d.ts.map +1 -0
  54. package/dist/utils/swaps.js +240 -0
  55. package/dist/utils/swaps.js.map +1 -0
  56. package/dist/{transaction-type.d.ts → utils/transaction-type.d.ts} +1 -1
  57. package/dist/utils/transaction-type.d.ts.map +1 -0
  58. package/dist/{transaction-type.js → utils/transaction-type.js} +1 -1
  59. package/dist/utils/transaction-type.js.map +1 -0
  60. package/dist/{utils.d.ts → utils/utils.d.ts} +13 -3
  61. package/dist/utils/utils.d.ts.map +1 -0
  62. package/dist/{utils.js → utils/utils.js} +21 -5
  63. package/dist/utils/utils.js.map +1 -0
  64. package/dist/{validation.d.ts → utils/validation.d.ts} +1 -1
  65. package/dist/utils/validation.d.ts.map +1 -0
  66. package/dist/{validation.js → utils/validation.js} +90 -7
  67. package/dist/utils/validation.js.map +1 -0
  68. package/package.json +12 -9
  69. package/dist/EtherscanRemoteTransactionSource.d.ts.map +0 -1
  70. package/dist/EtherscanRemoteTransactionSource.js.map +0 -1
  71. package/dist/IncomingTransactionHelper.d.ts.map +0 -1
  72. package/dist/IncomingTransactionHelper.js.map +0 -1
  73. package/dist/PendingTransactionTracker.d.ts +0 -18
  74. package/dist/PendingTransactionTracker.d.ts.map +0 -1
  75. package/dist/PendingTransactionTracker.js +0 -144
  76. package/dist/PendingTransactionTracker.js.map +0 -1
  77. package/dist/etherscan.d.ts.map +0 -1
  78. package/dist/etherscan.js.map +0 -1
  79. package/dist/external-transactions.d.ts.map +0 -1
  80. package/dist/external-transactions.js.map +0 -1
  81. package/dist/history.d.ts.map +0 -1
  82. package/dist/history.js.map +0 -1
  83. package/dist/transaction-type.d.ts.map +0 -1
  84. package/dist/transaction-type.js.map +0 -1
  85. package/dist/utils.d.ts.map +0 -1
  86. package/dist/utils.js.map +0 -1
  87. package/dist/validation.d.ts.map +0 -1
  88. package/dist/validation.js.map +0 -1
  89. /package/dist/{etherscan.d.ts → utils/etherscan.d.ts} +0 -0
  90. /package/dist/{history.js → utils/history.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -6,6 +6,51 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [17.0.0]
10
+ ### Added
11
+ - **BREAKING:** Add additional support swaps support ([#1877](https://github.com/MetaMask/core/pull/1877))
12
+ - Swap transaction updates can be prevented by setting `disableSwaps` as `true`. If not set it will default to `false`.
13
+ - If `disableSwaps` is `false` or not set, then the `createSwapsTransaction` callback MUST be defined.
14
+ - Add optional hooks to support alternate flows ([#1787](https://github.com/MetaMask/core/pull/1787))
15
+ - Add the `getAdditionalSignArguments` hook to provide additional arguments when signing.
16
+ - Add the `beforeApproveOnInit` hook to execute additional logic before starting an approval flow for a transaction during initialization. Return `false` to skip the transaction.
17
+ - Add the `afterSign` hook to execute additional logic after signing a transaction. Return `false` to not change the `status` to `signed`.
18
+ - Add the `beforePublish` hook to execute additional logic before publishing a transaction. Return `false` to prevent the transaction being submitted.
19
+ - Add additional persisted transaction support during initialization and on network change ([#1916](https://github.com/MetaMask/core/pull/1916))
20
+ - Initialise approvals for unapproved transactions on the current network.
21
+ - Add missing gas values for unapproved transactions on the current network.
22
+ - Submit any approved transactions on the current network.
23
+ - Support saved gas fees ([#1966](https://github.com/MetaMask/core/pull/1966))
24
+ - Add optional `getSavedGasFees` callback to constructor.
25
+ - Add `updateCustodialTransaction` method to update custodial transactions ([#2018](https://github.com/MetaMask/core/pull/2018))
26
+ - Add `accessList` to txParam types ([#2016](https://github.com/MetaMask/core/pull/2016))
27
+ - Add `estimateGasBuffered` method to estimate gas and apply a specific buffer multiplier ([#2021](https://github.com/MetaMask/core/pull/2021))
28
+ - Add `updateSecurityAlertResponse` method ([#1985](https://github.com/MetaMask/core/pull/1985))
29
+ - Add gas values validation ([#1978](https://github.com/MetaMask/core/pull/1978))
30
+ - Add `approveTransactionsWithSameNonce` method ([#1961](https://github.com/MetaMask/core/pull/1961))
31
+ - Add `clearUnapprovedTransactions` method ([#1979](https://github.com/MetaMask/core/pull/1979))
32
+ - Add `updatePreviousGasParams` method ([#1943](https://github.com/MetaMask/core/pull/1943))
33
+ - Emit additional events to support metrics in the clients ([#1894](https://github.com/MetaMask/core/pull/1894))
34
+ - Populate the `firstRetryBlockNumber`, `retryCount`, and `warning` properties in the transaction metadata. ([#1896](https://github.com/MetaMask/core/pull/1896))
35
+
36
+ ### Changed
37
+ - **BREAKING:** Pending transactions are now automatically resubmitted. ([#1896](https://github.com/MetaMask/core/pull/1896))
38
+ - This can be disabled by setting the new `pendingTransactions.isResubmitEnabled` constructor option to `false`.
39
+ - **BREAKING:** Bump dependency and peer dependency on `@metamask/network-controller` to ^16.0.0
40
+ - Persist specific error properties in core transaction metadata ([#1915](https://github.com/MetaMask/core/pull/1915))
41
+ - Create `TransactionError` type with explicit properties.
42
+ - Align core transaction error messages with extension ([#1980](https://github.com/MetaMask/core/pull/1980))
43
+ - Catch of the `initApprovals` method to skip logging when the error is `userRejectedRequest`.
44
+ - Create an additional transaction metadata entry when calling `stopTransaction` ([#1998](https://github.com/MetaMask/core/pull/1998))
45
+ - Bump dependency `@metamask/eth-query` from ^3.0.1 to ^4.0.0 ([#2028](https://github.com/MetaMask/core/pull/2028))
46
+ - Bump dependency and peer dependency on `@metamask/gas-fee-controller` to ^10.0.1
47
+ - Bump @metamask/utils from 8.1.0 to 8.2.0 ([#1957](https://github.com/MetaMask/core/pull/1957))
48
+
49
+ ## [16.0.0]
50
+ ### Changed
51
+ - **BREAKING:** Bump dependency and peer dependency on `@metamask/gas-fee-controller` to ^10.0.0
52
+ - Bump dependency and peer dependency on `@metamask/network-controller` to ^15.1.0
53
+
9
54
  ## [15.0.0]
10
55
  ### Changed
11
56
  - **BREAKING:** Bump dependency and peer dependency on `@metamask/network-controller` to ^15.0.0
@@ -243,7 +288,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
243
288
 
244
289
  All changes listed after this point were applied to this package following the monorepo conversion.
245
290
 
246
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@15.0.0...HEAD
291
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@17.0.0...HEAD
292
+ [17.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@16.0.0...@metamask/transaction-controller@17.0.0
293
+ [16.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@15.0.0...@metamask/transaction-controller@16.0.0
247
294
  [15.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@14.0.0...@metamask/transaction-controller@15.0.0
248
295
  [14.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@13.0.0...@metamask/transaction-controller@14.0.0
249
296
  [13.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@12.0.0...@metamask/transaction-controller@13.0.0
@@ -4,11 +4,13 @@ import type { TypedTransaction } from '@ethereumjs/tx';
4
4
  import type { AddApprovalRequest } from '@metamask/approval-controller';
5
5
  import type { BaseConfig, BaseState, RestrictedControllerMessenger } from '@metamask/base-controller';
6
6
  import { BaseController } from '@metamask/base-controller';
7
+ import type { GasFeeState } from '@metamask/gas-fee-controller';
7
8
  import type { BlockTracker, NetworkState, Provider } from '@metamask/network-controller';
8
9
  import type { Hex } from '@metamask/utils';
9
10
  import { EventEmitter } from 'events';
10
- import type { TransactionParams, TransactionMeta, TransactionReceipt, SecurityProviderRequest, SendFlowHistoryEntry, WalletDevice } from './types';
11
- import { TransactionType } from './types';
11
+ import type { NonceLock } from 'nonce-tracker/dist/NonceTracker';
12
+ import type { Events, SavedGasFees, SecurityProviderRequest, SendFlowHistoryEntry, TransactionParams, TransactionMeta, TransactionReceipt, WalletDevice, SecurityAlertResponse } from './types';
13
+ import { TransactionType, TransactionStatus } from './types';
12
14
  export declare const HARDFORK = Hardfork.London;
13
15
  /**
14
16
  * @type Result
@@ -84,33 +86,45 @@ declare type AllowedActions = AddApprovalRequest;
84
86
  * The messenger of the {@link TransactionController}.
85
87
  */
86
88
  export declare type TransactionControllerMessenger = RestrictedControllerMessenger<typeof controllerName, AllowedActions, never, AllowedActions['type'], never>;
89
+ export interface TransactionControllerEventEmitter extends EventEmitter {
90
+ on<T extends keyof Events>(eventName: T, listener: (...args: Events[T]) => void): this;
91
+ emit<T extends keyof Events>(eventName: T, ...args: Events[T]): boolean;
92
+ }
87
93
  /**
88
94
  * Controller responsible for submitting and managing transactions.
89
95
  */
90
96
  export declare class TransactionController extends BaseController<TransactionConfig, TransactionState> {
91
97
  private ethQuery;
92
98
  private readonly isHistoryDisabled;
99
+ private readonly isSwapsDisabled;
93
100
  private readonly isSendFlowHistoryDisabled;
101
+ private readonly inProcessOfSigning;
94
102
  private readonly nonceTracker;
95
103
  private registry;
96
104
  private readonly provider;
97
- private readonly handle?;
98
105
  private readonly mutex;
106
+ private readonly getSavedGasFees;
99
107
  private readonly getNetworkState;
100
108
  private readonly getCurrentAccountEIP1559Compatibility;
101
109
  private readonly getCurrentNetworkEIP1559Compatibility;
110
+ private readonly getGasFeeEstimates;
102
111
  private readonly getPermittedAccounts;
103
112
  private readonly getSelectedAddress;
104
113
  private readonly messagingSystem;
105
114
  private readonly incomingTransactionHelper;
106
115
  private readonly securityProviderRequest?;
107
116
  private readonly pendingTransactionTracker;
117
+ private readonly afterSign;
118
+ private readonly beforeApproveOnInit;
119
+ private readonly beforeCheckPendingTransaction;
120
+ private readonly beforePublish;
121
+ private readonly getAdditionalSignArguments;
108
122
  private failTransaction;
109
123
  private registryLookup;
110
124
  /**
111
125
  * EventEmitter instance used to listen to specific transactional events
112
126
  */
113
- hub: EventEmitter;
127
+ hub: TransactionControllerEventEmitter;
114
128
  /**
115
129
  * Name of this controller used during composition
116
130
  */
@@ -118,7 +132,7 @@ export declare class TransactionController extends BaseController<TransactionCon
118
132
  /**
119
133
  * Method used to sign transactions
120
134
  */
121
- sign?: (transaction: TypedTransaction, from: string) => Promise<TypedTransaction>;
135
+ sign?: (transaction: TypedTransaction, from: string, transactionMeta?: TransactionMeta) => Promise<TypedTransaction>;
122
136
  /**
123
137
  * Creates a TransactionController instance.
124
138
  *
@@ -126,8 +140,11 @@ export declare class TransactionController extends BaseController<TransactionCon
126
140
  * @param options.blockTracker - The block tracker used to poll for new blocks data.
127
141
  * @param options.disableHistory - Whether to disable storing history in transaction metadata.
128
142
  * @param options.disableSendFlowHistory - Explicitly disable transaction metadata history.
143
+ * @param options.disableSwaps - Whether to disable additional processing on swaps transactions.
144
+ * @param options.getSavedGasFees - Gets the saved gas fee config.
129
145
  * @param options.getCurrentAccountEIP1559Compatibility - Whether or not the account supports EIP-1559.
130
146
  * @param options.getCurrentNetworkEIP1559Compatibility - Whether or not the network supports EIP-1559.
147
+ * @param options.getGasFeeEstimates - Callback to retrieve gas fee estimates.
131
148
  * @param options.getNetworkState - Gets the state of the network controller.
132
149
  * @param options.getPermittedAccounts - Get accounts that a given origin has permissions for.
133
150
  * @param options.getSelectedAddress - Gets the address of the currently selected account.
@@ -138,21 +155,32 @@ export declare class TransactionController extends BaseController<TransactionCon
138
155
  * @param options.incomingTransactions.updateTransactions - Whether to update local transactions using remote transaction data.
139
156
  * @param options.messenger - The controller messenger.
140
157
  * @param options.onNetworkStateChange - Allows subscribing to network controller state changes.
158
+ * @param options.pendingTransactions - Configuration options for pending transaction support.
159
+ * @param options.pendingTransactions.isResubmitEnabled - Whether transaction publishing is automatically retried.
141
160
  * @param options.provider - The provider used to create the underlying EthQuery instance.
142
161
  * @param options.securityProviderRequest - A function for verifying a transaction, whether it is malicious or not.
162
+ * @param options.hooks - The controller hooks.
163
+ * @param options.hooks.afterSign - Additional logic to execute after signing a transaction. Return false to not change the status to signed.
164
+ * @param options.hooks.beforeApproveOnInit - Additional logic to execute before starting an approval flow for a transaction during initialization. Return false to skip the transaction.
165
+ * @param options.hooks.beforeCheckPendingTransaction - Additional logic to execute before checking pending transactions. Return false to prevent the broadcast of the transaction.
166
+ * @param options.hooks.beforePublish - Additional logic to execute before publishing a transaction. Return false to prevent the broadcast of the transaction.
167
+ * @param options.hooks.getAdditionalSignArguments - Returns additional arguments required to sign a transaction.
143
168
  * @param config - Initial options used to configure this controller.
144
169
  * @param state - Initial state to set on this controller.
145
170
  */
146
- constructor({ blockTracker, disableHistory, disableSendFlowHistory, getCurrentAccountEIP1559Compatibility, getCurrentNetworkEIP1559Compatibility, getNetworkState, getPermittedAccounts, getSelectedAddress, incomingTransactions, messenger, onNetworkStateChange, provider, securityProviderRequest, }: {
171
+ constructor({ blockTracker, disableHistory, disableSendFlowHistory, disableSwaps, getSavedGasFees, getCurrentAccountEIP1559Compatibility, getCurrentNetworkEIP1559Compatibility, getGasFeeEstimates, getNetworkState, getPermittedAccounts, getSelectedAddress, incomingTransactions, messenger, onNetworkStateChange, pendingTransactions, provider, securityProviderRequest, hooks, }: {
147
172
  blockTracker: BlockTracker;
148
173
  disableHistory: boolean;
149
174
  disableSendFlowHistory: boolean;
175
+ disableSwaps: boolean;
176
+ getSavedGasFees?: (chainId: Hex) => SavedGasFees | undefined;
150
177
  getCurrentAccountEIP1559Compatibility: () => Promise<boolean>;
151
178
  getCurrentNetworkEIP1559Compatibility: () => Promise<boolean>;
179
+ getGasFeeEstimates?: () => Promise<GasFeeState>;
152
180
  getNetworkState: () => NetworkState;
153
181
  getPermittedAccounts: (origin?: string) => Promise<string[]>;
154
182
  getSelectedAddress: () => string;
155
- incomingTransactions: {
183
+ incomingTransactions?: {
156
184
  includeTokenTransfers?: boolean;
157
185
  isEnabled?: () => boolean;
158
186
  queryEntireHistory?: boolean;
@@ -160,8 +188,18 @@ export declare class TransactionController extends BaseController<TransactionCon
160
188
  };
161
189
  messenger: TransactionControllerMessenger;
162
190
  onNetworkStateChange: (listener: (state: NetworkState) => void) => void;
191
+ pendingTransactions?: {
192
+ isResubmitEnabled?: boolean;
193
+ };
163
194
  provider: Provider;
164
195
  securityProviderRequest?: SecurityProviderRequest;
196
+ hooks: {
197
+ afterSign?: (transactionMeta: TransactionMeta, signedTx: TypedTransaction) => boolean;
198
+ beforeApproveOnInit?: (transactionMeta: TransactionMeta) => boolean;
199
+ beforeCheckPendingTransaction?: (transactionMeta: TransactionMeta) => boolean;
200
+ beforePublish?: (transactionMeta: TransactionMeta) => boolean;
201
+ getAdditionalSignArguments?: (transactionMeta: TransactionMeta) => (TransactionMeta | undefined)[];
202
+ };
165
203
  }, config?: Partial<TransactionConfig>, state?: Partial<TransactionState>);
166
204
  /**
167
205
  * Handle new method data request.
@@ -185,25 +223,28 @@ export declare class TransactionController extends BaseController<TransactionCon
185
223
  * @param opts.securityAlertResponse - Response from security validator.
186
224
  * @param opts.sendFlowHistory - The sendFlowHistory entries to add.
187
225
  * @param opts.type - Type of transaction to add, such as 'cancel' or 'swap'.
226
+ * @param opts.swaps - Options for swaps transactions.
227
+ * @param opts.swaps.hasApproveTx - Whether the transaction has an approval transaction.
228
+ * @param opts.swaps.meta - Metadata for swap transaction.
188
229
  * @returns Object containing a promise resolving to the transaction hash if approved.
189
230
  */
190
- addTransaction(txParams: TransactionParams, { actionId, deviceConfirmedOn, method, origin, requireApproval, securityAlertResponse, sendFlowHistory, type, }?: {
231
+ addTransaction(txParams: TransactionParams, { actionId, deviceConfirmedOn, method, origin, requireApproval, securityAlertResponse, sendFlowHistory, swaps, type, }?: {
191
232
  actionId?: string;
192
233
  deviceConfirmedOn?: WalletDevice;
193
234
  method?: string;
194
235
  origin?: string;
195
236
  requireApproval?: boolean | undefined;
196
- securityAlertResponse?: Record<string, unknown>;
237
+ securityAlertResponse?: SecurityAlertResponse;
197
238
  sendFlowHistory?: SendFlowHistoryEntry[];
239
+ swaps?: {
240
+ hasApproveTx?: boolean;
241
+ meta?: Partial<TransactionMeta>;
242
+ };
198
243
  type?: TransactionType;
199
244
  }): Promise<Result>;
200
245
  startIncomingTransactionPolling(): void;
201
246
  stopIncomingTransactionPolling(): void;
202
247
  updateIncomingTransactions(): Promise<void>;
203
- /**
204
- * Creates approvals for all unapproved transactions persisted.
205
- */
206
- initApprovals(): void;
207
248
  /**
208
249
  * Attempts to cancel a transaction based on its ID by setting its status to "rejected"
209
250
  * and emitting a `<tx.id>:finished` hub event.
@@ -211,10 +252,12 @@ export declare class TransactionController extends BaseController<TransactionCon
211
252
  * @param transactionId - The ID of the transaction to cancel.
212
253
  * @param gasValues - The gas values to use for the cancellation transaction.
213
254
  * @param options - The options for the cancellation transaction.
255
+ * @param options.actionId - Unique ID to prevent duplicate requests.
214
256
  * @param options.estimatedBaseFee - The estimated base fee of the transaction.
215
257
  */
216
- stopTransaction(transactionId: string, gasValues?: GasPriceValue | FeeMarketEIP1559Values, { estimatedBaseFee }?: {
258
+ stopTransaction(transactionId: string, gasValues?: GasPriceValue | FeeMarketEIP1559Values, { estimatedBaseFee, actionId, }?: {
217
259
  estimatedBaseFee?: string;
260
+ actionId?: string;
218
261
  }): Promise<void>;
219
262
  /**
220
263
  * Attempts to speed up a transaction increasing transaction gasPrice by ten percent.
@@ -237,12 +280,31 @@ export declare class TransactionController extends BaseController<TransactionCon
237
280
  */
238
281
  estimateGas(transaction: TransactionParams): Promise<{
239
282
  gas: string;
240
- gasPrice: any;
241
- estimateGasError?: undefined;
242
- } | {
283
+ simulationFails: {
284
+ reason: any;
285
+ errorKey: any;
286
+ debug: {
287
+ blockNumber: string;
288
+ blockGasLimit: string;
289
+ };
290
+ } | undefined;
291
+ }>;
292
+ /**
293
+ * Estimates required gas for a given transaction and add additional gas buffer with the given multiplier.
294
+ *
295
+ * @param transaction - The transaction params to estimate gas for.
296
+ * @param multiplier - The multiplier to use for the gas buffer.
297
+ */
298
+ estimateGasBuffered(transaction: TransactionParams, multiplier: number): Promise<{
243
299
  gas: string;
244
- gasPrice: any;
245
- estimateGasError: string | undefined;
300
+ simulationFails: {
301
+ reason: any;
302
+ errorKey: any;
303
+ debug: {
304
+ blockNumber: string;
305
+ blockGasLimit: string;
306
+ };
307
+ } | undefined;
246
308
  }>;
247
309
  /**
248
310
  * Updates an existing transaction in state.
@@ -251,6 +313,13 @@ export declare class TransactionController extends BaseController<TransactionCon
251
313
  * @param note - A note or update reason to include in the transaction history.
252
314
  */
253
315
  updateTransaction(transactionMeta: TransactionMeta, note: string): void;
316
+ /**
317
+ * Update the security alert response for a transaction.
318
+ *
319
+ * @param transactionId - ID of the transaction.
320
+ * @param securityAlertResponse - The new security alert response for the transaction.
321
+ */
322
+ updateSecurityAlertResponse(transactionId: string, securityAlertResponse: SecurityAlertResponse): void;
254
323
  /**
255
324
  * Removes all transactions from state, optionally based on the current network.
256
325
  *
@@ -310,6 +379,73 @@ export declare class TransactionController extends BaseController<TransactionCon
310
379
  userEditedGasLimit?: boolean;
311
380
  userFeeLevel?: string;
312
381
  }): TransactionMeta;
382
+ /**
383
+ * Update the previous gas values of a transaction.
384
+ *
385
+ * @param transactionId - The ID of the transaction to update.
386
+ * @param previousGas - Previous gas values to update.
387
+ * @param previousGas.gasLimit - Maxmimum number of units of gas to use for this transaction.
388
+ * @param previousGas.maxFeePerGas - Maximum amount per gas to pay for the transaction, including the priority fee.
389
+ * @param previousGas.maxPriorityFeePerGas - Maximum amount per gas to give to validator as incentive.
390
+ * @returns The updated transactionMeta.
391
+ */
392
+ updatePreviousGasParams(transactionId: string, { gasLimit, maxFeePerGas, maxPriorityFeePerGas, }: {
393
+ gasLimit?: string;
394
+ maxFeePerGas?: string;
395
+ maxPriorityFeePerGas?: string;
396
+ }): TransactionMeta;
397
+ /**
398
+ * Gets the next nonce according to the nonce-tracker.
399
+ * Ensure `releaseLock` is called once processing of the `nonce` value is complete.
400
+ *
401
+ * @param address - The hex string address for the transaction.
402
+ * @returns object with the `nextNonce` `nonceDetails`, and the releaseLock.
403
+ */
404
+ getNonceLock(address: string): Promise<NonceLock>;
405
+ /**
406
+ * Signs and returns the raw transaction data for provided transaction params list.
407
+ *
408
+ * @param listOfTxParams - The list of transaction params to approve.
409
+ * @returns The raw transactions.
410
+ */
411
+ approveTransactionsWithSameNonce(listOfTxParams?: TransactionParams[]): Promise<string | string[]>;
412
+ /**
413
+ * Update a custodial transaction.
414
+ *
415
+ * @param transactionId - The ID of the transaction to update.
416
+ * @param options - The custodial transaction options to update.
417
+ * @param options.custodyStatus - The new custody status value to be assigned.
418
+ * @param options.errorMessage - The error message to be assigned in case transaction status update to failed.
419
+ * @param options.hash - The new hash value to be assigned.
420
+ * @param options.status - The new status value to be assigned.
421
+ */
422
+ updateCustodialTransaction(transactionId: string, { custodyStatus, errorMessage, hash, status, }: {
423
+ custodyStatus?: string;
424
+ errorMessage?: string;
425
+ hash?: string;
426
+ status?: TransactionStatus;
427
+ }): void;
428
+ private signExternalTransaction;
429
+ /**
430
+ * Removes unapproved transactions from state.
431
+ */
432
+ clearUnapprovedTransactions(): void;
433
+ private addMetadata;
434
+ private updateGasProperties;
435
+ private getCurrentChainTransactionsByStatus;
436
+ private onBootCleanup;
437
+ /**
438
+ * Create approvals for all unapproved transactions on current chain.
439
+ */
440
+ private createApprovalsForUnapprovedTransactions;
441
+ /**
442
+ * Update the gas values of all unapproved transactions on current chain.
443
+ */
444
+ private loadGasValuesForUnapprovedTransactions;
445
+ /**
446
+ * Force to submit approved transactions on current chain.
447
+ */
448
+ private submitApprovedTransactions;
313
449
  private processApproval;
314
450
  /**
315
451
  * Approves a transaction and updates it's status in state. If this is not a
@@ -320,11 +456,13 @@ export declare class TransactionController extends BaseController<TransactionCon
320
456
  * @param transactionId - The ID of the transaction to approve.
321
457
  */
322
458
  private approveTransaction;
459
+ private publishTransaction;
323
460
  /**
324
461
  * Cancels a transaction based on its ID by setting its status to "rejected"
325
462
  * and emitting a `<tx.id>:finished` hub event.
326
463
  *
327
464
  * @param transactionId - The ID of the transaction to cancel.
465
+ * @param actionId - The actionId passed from UI
328
466
  */
329
467
  private cancelTransaction;
330
468
  /**
@@ -374,7 +512,6 @@ export declare class TransactionController extends BaseController<TransactionCon
374
512
  private getCommonConfiguration;
375
513
  private onIncomingTransactions;
376
514
  private onUpdatedLastFetchedBlockNumbers;
377
- private onPendingTransactionsUpdate;
378
515
  private generateDappSuggestedGasFees;
379
516
  /**
380
517
  * Validates and adds external provided transaction to state.
@@ -412,6 +549,8 @@ export declare class TransactionController extends BaseController<TransactionCon
412
549
  */
413
550
  private updateTransactionMetaRSV;
414
551
  private getEIP1559Compatibility;
552
+ private addPendingTransactionTrackerListeners;
553
+ private signTransaction;
415
554
  }
416
555
  export default TransactionController;
417
556
  //# sourceMappingURL=TransactionController.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TransactionController.d.ts","sourceRoot":"","sources":["../src/TransactionController.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAA4B,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,KAAK,EAEV,kBAAkB,EAEnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,6BAA6B,EAC9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,2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