@metamask/transaction-controller 16.0.0 → 18.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 (44) hide show
  1. package/CHANGELOG.md +66 -1
  2. package/dist/TransactionController.d.ts +184 -21
  3. package/dist/TransactionController.d.ts.map +1 -1
  4. package/dist/TransactionController.js +635 -121
  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/helpers/PendingTransactionTracker.d.ts +23 -5
  11. package/dist/helpers/PendingTransactionTracker.d.ts.map +1 -1
  12. package/dist/helpers/PendingTransactionTracker.js +263 -108
  13. package/dist/helpers/PendingTransactionTracker.js.map +1 -1
  14. package/dist/logger.d.ts +0 -1
  15. package/dist/logger.d.ts.map +1 -1
  16. package/dist/logger.js +1 -2
  17. package/dist/logger.js.map +1 -1
  18. package/dist/types.d.ts +225 -8
  19. package/dist/types.d.ts.map +1 -1
  20. package/dist/types.js +1 -0
  21. package/dist/types.js.map +1 -1
  22. package/dist/utils/etherscan.d.ts.map +1 -1
  23. package/dist/utils/etherscan.js.map +1 -1
  24. package/dist/utils/gas-fees.d.ts +3 -2
  25. package/dist/utils/gas-fees.d.ts.map +1 -1
  26. package/dist/utils/gas-fees.js +22 -4
  27. package/dist/utils/gas-fees.js.map +1 -1
  28. package/dist/utils/gas.d.ts +2 -0
  29. package/dist/utils/gas.d.ts.map +1 -1
  30. package/dist/utils/gas.js +26 -17
  31. package/dist/utils/gas.js.map +1 -1
  32. package/dist/utils/swaps.d.ts +81 -0
  33. package/dist/utils/swaps.d.ts.map +1 -0
  34. package/dist/utils/swaps.js +253 -0
  35. package/dist/utils/swaps.js.map +1 -0
  36. package/dist/utils/utils.d.ts +21 -3
  37. package/dist/utils/utils.d.ts.map +1 -1
  38. package/dist/utils/utils.js +45 -4
  39. package/dist/utils/utils.js.map +1 -1
  40. package/dist/utils/validation.d.ts +1 -1
  41. package/dist/utils/validation.d.ts.map +1 -1
  42. package/dist/utils/validation.js +90 -7
  43. package/dist/utils/validation.js.map +1 -1
  44. package/package.json +16 -15
package/CHANGELOG.md CHANGED
@@ -6,6 +6,69 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [18.0.0]
10
+ ### Added
11
+ - Add `updateEditableParams` method ([#2056](https://github.com/MetaMask/core/pull/2056))
12
+ - Add `initApprovals` method to trigger the approval flow for any pending transactions during initialisation ([#2056](https://github.com/MetaMask/core/pull/2056))
13
+ - Add `getTransactions` method to search transactions using the given criteria and options ([#2056](https://github.com/MetaMask/core/pull/2056))
14
+
15
+ ### Changed
16
+ - **BREAKING:** Bump `@metamask/base-controller` to ^4.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
17
+ - This is breaking because the type of the `messenger` has backward-incompatible changes. See the changelog for this package for more.
18
+ - **BREAKING:** Add `finished` and `publish-skip` events to `Events` type
19
+ - **BREAKING:** Update `TransactionReceipt` type so `transactionIndex` is now a string rather than a number ([#2063](https://github.com/MetaMask/core/pull/2063))
20
+ - Bump `nonce-tracker` to ^3.0.0 ([#2040](https://github.com/MetaMask/core/pull/2040))
21
+ - The controller now emits a `transaction-status-update` event each time the status of a transaction changes (e.g. submitted, rejected, etc.) ([#2027](https://github.com/MetaMask/core/pull/2027))
22
+ - Make `getCurrentAccountEIP1559Compatibility` constructor parameter optional ([#2056](https://github.com/MetaMask/core/pull/2056))
23
+ - Normalize the gas values provided to the `speedUpTransaction` and `stopTransaction` methods ([#2056](https://github.com/MetaMask/core/pull/2056))
24
+ - Persist any property changes performed by the `afterSign` hook ([#2056](https://github.com/MetaMask/core/pull/2056))
25
+ - Report success to the approver if publishing is skipped by the `beforePublish` hook ([#2056](https://github.com/MetaMask/core/pull/2056))
26
+ - Update `postTxBalance` after all swap transactions ([#2056](https://github.com/MetaMask/core/pull/2056))
27
+ - Bump `@metamask/approval-controller` to ^5.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
28
+ - Bump `@metamask/controller-utils` to ^6.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
29
+ - Bump `@metamask/gas-fee-controller` to ^11.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
30
+ - Bump `@metamask/network-controller` to ^17.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
31
+
32
+ ## [17.0.0]
33
+ ### Added
34
+ - **BREAKING:** Add additional support swaps support ([#1877](https://github.com/MetaMask/core/pull/1877))
35
+ - Swap transaction updates can be prevented by setting `disableSwaps` as `true`. If not set it will default to `false`.
36
+ - If `disableSwaps` is `false` or not set, then the `createSwapsTransaction` callback MUST be defined.
37
+ - Add optional hooks to support alternate flows ([#1787](https://github.com/MetaMask/core/pull/1787))
38
+ - Add the `getAdditionalSignArguments` hook to provide additional arguments when signing.
39
+ - Add the `beforeApproveOnInit` hook to execute additional logic before starting an approval flow for a transaction during initialization. Return `false` to skip the transaction.
40
+ - Add the `afterSign` hook to execute additional logic after signing a transaction. Return `false` to not change the `status` to `signed`.
41
+ - Add the `beforePublish` hook to execute additional logic before publishing a transaction. Return `false` to prevent the transaction being submitted.
42
+ - Add additional persisted transaction support during initialization and on network change ([#1916](https://github.com/MetaMask/core/pull/1916))
43
+ - Initialise approvals for unapproved transactions on the current network.
44
+ - Add missing gas values for unapproved transactions on the current network.
45
+ - Submit any approved transactions on the current network.
46
+ - Support saved gas fees ([#1966](https://github.com/MetaMask/core/pull/1966))
47
+ - Add optional `getSavedGasFees` callback to constructor.
48
+ - Add `updateCustodialTransaction` method to update custodial transactions ([#2018](https://github.com/MetaMask/core/pull/2018))
49
+ - Add `accessList` to txParam types ([#2016](https://github.com/MetaMask/core/pull/2016))
50
+ - Add `estimateGasBuffered` method to estimate gas and apply a specific buffer multiplier ([#2021](https://github.com/MetaMask/core/pull/2021))
51
+ - Add `updateSecurityAlertResponse` method ([#1985](https://github.com/MetaMask/core/pull/1985))
52
+ - Add gas values validation ([#1978](https://github.com/MetaMask/core/pull/1978))
53
+ - Add `approveTransactionsWithSameNonce` method ([#1961](https://github.com/MetaMask/core/pull/1961))
54
+ - Add `clearUnapprovedTransactions` method ([#1979](https://github.com/MetaMask/core/pull/1979))
55
+ - Add `updatePreviousGasParams` method ([#1943](https://github.com/MetaMask/core/pull/1943))
56
+ - Emit additional events to support metrics in the clients ([#1894](https://github.com/MetaMask/core/pull/1894))
57
+ - Populate the `firstRetryBlockNumber`, `retryCount`, and `warning` properties in the transaction metadata. ([#1896](https://github.com/MetaMask/core/pull/1896))
58
+
59
+ ### Changed
60
+ - **BREAKING:** Pending transactions are now automatically resubmitted. ([#1896](https://github.com/MetaMask/core/pull/1896))
61
+ - This can be disabled by setting the new `pendingTransactions.isResubmitEnabled` constructor option to `false`.
62
+ - **BREAKING:** Bump dependency and peer dependency on `@metamask/network-controller` to ^16.0.0
63
+ - Persist specific error properties in core transaction metadata ([#1915](https://github.com/MetaMask/core/pull/1915))
64
+ - Create `TransactionError` type with explicit properties.
65
+ - Align core transaction error messages with extension ([#1980](https://github.com/MetaMask/core/pull/1980))
66
+ - Catch of the `initApprovals` method to skip logging when the error is `userRejectedRequest`.
67
+ - Create an additional transaction metadata entry when calling `stopTransaction` ([#1998](https://github.com/MetaMask/core/pull/1998))
68
+ - Bump dependency `@metamask/eth-query` from ^3.0.1 to ^4.0.0 ([#2028](https://github.com/MetaMask/core/pull/2028))
69
+ - Bump dependency and peer dependency on `@metamask/gas-fee-controller` to ^10.0.1
70
+ - Bump @metamask/utils from 8.1.0 to 8.2.0 ([#1957](https://github.com/MetaMask/core/pull/1957))
71
+
9
72
  ## [16.0.0]
10
73
  ### Changed
11
74
  - **BREAKING:** Bump dependency and peer dependency on `@metamask/gas-fee-controller` to ^10.0.0
@@ -248,7 +311,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
248
311
 
249
312
  All changes listed after this point were applied to this package following the monorepo conversion.
250
313
 
251
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@16.0.0...HEAD
314
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@18.0.0...HEAD
315
+ [18.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@17.0.0...@metamask/transaction-controller@18.0.0
316
+ [17.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@16.0.0...@metamask/transaction-controller@17.0.0
252
317
  [16.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@15.0.0...@metamask/transaction-controller@16.0.0
253
318
  [15.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@14.0.0...@metamask/transaction-controller@15.0.0
254
319
  [14.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@13.0.0...@metamask/transaction-controller@14.0.0
@@ -3,14 +3,14 @@ import { Hardfork } from '@ethereumjs/common';
3
3
  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
- import { BaseController } from '@metamask/base-controller';
6
+ import { BaseControllerV1 } from '@metamask/base-controller';
7
7
  import type { GasFeeState } from '@metamask/gas-fee-controller';
8
8
  import type { BlockTracker, NetworkState, Provider } from '@metamask/network-controller';
9
9
  import type { Hex } from '@metamask/utils';
10
10
  import { EventEmitter } from 'events';
11
- import type { NonceLock } from 'nonce-tracker/dist/NonceTracker';
12
- import type { TransactionParams, TransactionMeta, TransactionReceipt, SecurityProviderRequest, SendFlowHistoryEntry, WalletDevice } from './types';
13
- import { TransactionType } from './types';
11
+ import type { NonceLock } from 'nonce-tracker';
12
+ import type { Events, SavedGasFees, SecurityProviderRequest, SendFlowHistoryEntry, TransactionParams, TransactionMeta, TransactionReceipt, WalletDevice, SecurityAlertResponse } from './types';
13
+ import { TransactionType, TransactionStatus } from './types';
14
14
  export declare const HARDFORK = Hardfork.London;
15
15
  /**
16
16
  * @type Result
@@ -86,18 +86,24 @@ declare type AllowedActions = AddApprovalRequest;
86
86
  * The messenger of the {@link TransactionController}.
87
87
  */
88
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
+ }
89
93
  /**
90
94
  * Controller responsible for submitting and managing transactions.
91
95
  */
92
- export declare class TransactionController extends BaseController<TransactionConfig, TransactionState> {
96
+ export declare class TransactionController extends BaseControllerV1<TransactionConfig, TransactionState> {
93
97
  private ethQuery;
94
98
  private readonly isHistoryDisabled;
99
+ private readonly isSwapsDisabled;
95
100
  private readonly isSendFlowHistoryDisabled;
101
+ private readonly inProcessOfSigning;
96
102
  private readonly nonceTracker;
97
103
  private registry;
98
104
  private readonly provider;
99
- private readonly handle?;
100
105
  private readonly mutex;
106
+ private readonly getSavedGasFees;
101
107
  private readonly getNetworkState;
102
108
  private readonly getCurrentAccountEIP1559Compatibility;
103
109
  private readonly getCurrentNetworkEIP1559Compatibility;
@@ -108,12 +114,17 @@ export declare class TransactionController extends BaseController<TransactionCon
108
114
  private readonly incomingTransactionHelper;
109
115
  private readonly securityProviderRequest?;
110
116
  private readonly pendingTransactionTracker;
117
+ private readonly afterSign;
118
+ private readonly beforeApproveOnInit;
119
+ private readonly beforeCheckPendingTransaction;
120
+ private readonly beforePublish;
121
+ private readonly getAdditionalSignArguments;
111
122
  private failTransaction;
112
123
  private registryLookup;
113
124
  /**
114
125
  * EventEmitter instance used to listen to specific transactional events
115
126
  */
116
- hub: EventEmitter;
127
+ hub: TransactionControllerEventEmitter;
117
128
  /**
118
129
  * Name of this controller used during composition
119
130
  */
@@ -121,7 +132,7 @@ export declare class TransactionController extends BaseController<TransactionCon
121
132
  /**
122
133
  * Method used to sign transactions
123
134
  */
124
- sign?: (transaction: TypedTransaction, from: string) => Promise<TypedTransaction>;
135
+ sign?: (transaction: TypedTransaction, from: string, transactionMeta?: TransactionMeta) => Promise<TypedTransaction>;
125
136
  /**
126
137
  * Creates a TransactionController instance.
127
138
  *
@@ -129,6 +140,8 @@ export declare class TransactionController extends BaseController<TransactionCon
129
140
  * @param options.blockTracker - The block tracker used to poll for new blocks data.
130
141
  * @param options.disableHistory - Whether to disable storing history in transaction metadata.
131
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.
132
145
  * @param options.getCurrentAccountEIP1559Compatibility - Whether or not the account supports EIP-1559.
133
146
  * @param options.getCurrentNetworkEIP1559Compatibility - Whether or not the network supports EIP-1559.
134
147
  * @param options.getGasFeeEstimates - Callback to retrieve gas fee estimates.
@@ -142,22 +155,32 @@ export declare class TransactionController extends BaseController<TransactionCon
142
155
  * @param options.incomingTransactions.updateTransactions - Whether to update local transactions using remote transaction data.
143
156
  * @param options.messenger - The controller messenger.
144
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.
145
160
  * @param options.provider - The provider used to create the underlying EthQuery instance.
146
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.
147
168
  * @param config - Initial options used to configure this controller.
148
169
  * @param state - Initial state to set on this controller.
149
170
  */
150
- constructor({ blockTracker, disableHistory, disableSendFlowHistory, getCurrentAccountEIP1559Compatibility, getCurrentNetworkEIP1559Compatibility, getGasFeeEstimates, 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, }: {
151
172
  blockTracker: BlockTracker;
152
173
  disableHistory: boolean;
153
174
  disableSendFlowHistory: boolean;
154
- getCurrentAccountEIP1559Compatibility: () => Promise<boolean>;
175
+ disableSwaps: boolean;
176
+ getSavedGasFees?: (chainId: Hex) => SavedGasFees | undefined;
177
+ getCurrentAccountEIP1559Compatibility?: () => Promise<boolean>;
155
178
  getCurrentNetworkEIP1559Compatibility: () => Promise<boolean>;
156
179
  getGasFeeEstimates?: () => Promise<GasFeeState>;
157
180
  getNetworkState: () => NetworkState;
158
181
  getPermittedAccounts: (origin?: string) => Promise<string[]>;
159
182
  getSelectedAddress: () => string;
160
- incomingTransactions: {
183
+ incomingTransactions?: {
161
184
  includeTokenTransfers?: boolean;
162
185
  isEnabled?: () => boolean;
163
186
  queryEntireHistory?: boolean;
@@ -165,8 +188,18 @@ export declare class TransactionController extends BaseController<TransactionCon
165
188
  };
166
189
  messenger: TransactionControllerMessenger;
167
190
  onNetworkStateChange: (listener: (state: NetworkState) => void) => void;
191
+ pendingTransactions?: {
192
+ isResubmitEnabled?: boolean;
193
+ };
168
194
  provider: Provider;
169
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
+ };
170
203
  }, config?: Partial<TransactionConfig>, state?: Partial<TransactionState>);
171
204
  /**
172
205
  * Handle new method data request.
@@ -190,25 +223,28 @@ export declare class TransactionController extends BaseController<TransactionCon
190
223
  * @param opts.securityAlertResponse - Response from security validator.
191
224
  * @param opts.sendFlowHistory - The sendFlowHistory entries to add.
192
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.
193
229
  * @returns Object containing a promise resolving to the transaction hash if approved.
194
230
  */
195
- addTransaction(txParams: TransactionParams, { actionId, deviceConfirmedOn, method, origin, requireApproval, securityAlertResponse, sendFlowHistory, type, }?: {
231
+ addTransaction(txParams: TransactionParams, { actionId, deviceConfirmedOn, method, origin, requireApproval, securityAlertResponse, sendFlowHistory, swaps, type, }?: {
196
232
  actionId?: string;
197
233
  deviceConfirmedOn?: WalletDevice;
198
234
  method?: string;
199
235
  origin?: string;
200
236
  requireApproval?: boolean | undefined;
201
- securityAlertResponse?: Record<string, unknown>;
237
+ securityAlertResponse?: SecurityAlertResponse;
202
238
  sendFlowHistory?: SendFlowHistoryEntry[];
239
+ swaps?: {
240
+ hasApproveTx?: boolean;
241
+ meta?: Partial<TransactionMeta>;
242
+ };
203
243
  type?: TransactionType;
204
244
  }): Promise<Result>;
205
245
  startIncomingTransactionPolling(): void;
206
246
  stopIncomingTransactionPolling(): void;
207
247
  updateIncomingTransactions(): Promise<void>;
208
- /**
209
- * Creates approvals for all unapproved transactions persisted.
210
- */
211
- initApprovals(): void;
212
248
  /**
213
249
  * Attempts to cancel a transaction based on its ID by setting its status to "rejected"
214
250
  * and emitting a `<tx.id>:finished` hub event.
@@ -216,10 +252,12 @@ export declare class TransactionController extends BaseController<TransactionCon
216
252
  * @param transactionId - The ID of the transaction to cancel.
217
253
  * @param gasValues - The gas values to use for the cancellation transaction.
218
254
  * @param options - The options for the cancellation transaction.
255
+ * @param options.actionId - Unique ID to prevent duplicate requests.
219
256
  * @param options.estimatedBaseFee - The estimated base fee of the transaction.
220
257
  */
221
- stopTransaction(transactionId: string, gasValues?: GasPriceValue | FeeMarketEIP1559Values, { estimatedBaseFee }?: {
258
+ stopTransaction(transactionId: string, gasValues?: GasPriceValue | FeeMarketEIP1559Values, { estimatedBaseFee, actionId, }?: {
222
259
  estimatedBaseFee?: string;
260
+ actionId?: string;
223
261
  }): Promise<void>;
224
262
  /**
225
263
  * Attempts to speed up a transaction increasing transaction gasPrice by ten percent.
@@ -251,6 +289,23 @@ export declare class TransactionController extends BaseController<TransactionCon
251
289
  };
252
290
  } | undefined;
253
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<{
299
+ gas: string;
300
+ simulationFails: {
301
+ reason: any;
302
+ errorKey: any;
303
+ debug: {
304
+ blockNumber: string;
305
+ blockGasLimit: string;
306
+ };
307
+ } | undefined;
308
+ }>;
254
309
  /**
255
310
  * Updates an existing transaction in state.
256
311
  *
@@ -258,6 +313,13 @@ export declare class TransactionController extends BaseController<TransactionCon
258
313
  * @param note - A note or update reason to include in the transaction history.
259
314
  */
260
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;
261
323
  /**
262
324
  * Removes all transactions from state, optionally based on the current network.
263
325
  *
@@ -317,6 +379,21 @@ export declare class TransactionController extends BaseController<TransactionCon
317
379
  userEditedGasLimit?: boolean;
318
380
  userFeeLevel?: string;
319
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;
320
397
  /**
321
398
  * Gets the next nonce according to the nonce-tracker.
322
399
  * Ensure `releaseLock` is called once processing of the `nonce` value is complete.
@@ -325,6 +402,85 @@ export declare class TransactionController extends BaseController<TransactionCon
325
402
  * @returns object with the `nextNonce` `nonceDetails`, and the releaseLock.
326
403
  */
327
404
  getNonceLock(address: string): Promise<NonceLock>;
405
+ /**
406
+ * Updates the editable parameters of a transaction.
407
+ *
408
+ * @param txId - The ID of the transaction to update.
409
+ * @param params - The editable parameters to update.
410
+ * @param params.data - Data to pass with the transaction.
411
+ * @param params.gas - Maximum number of units of gas to use for the transaction.
412
+ * @param params.gasPrice - Price per gas for legacy transactions.
413
+ * @param params.from - Address to send the transaction from.
414
+ * @param params.to - Address to send the transaction to.
415
+ * @param params.value - Value associated with the transaction.
416
+ * @returns The updated transaction metadata.
417
+ */
418
+ updateEditableParams(txId: string, { data, gas, gasPrice, from, to, value, }: {
419
+ data?: string;
420
+ gas?: string;
421
+ gasPrice?: string;
422
+ from?: string;
423
+ to?: string;
424
+ value?: string;
425
+ }): Promise<TransactionMeta | undefined>;
426
+ /**
427
+ * Signs and returns the raw transaction data for provided transaction params list.
428
+ *
429
+ * @param listOfTxParams - The list of transaction params to approve.
430
+ * @returns The raw transactions.
431
+ */
432
+ approveTransactionsWithSameNonce(listOfTxParams?: TransactionParams[]): Promise<string | string[]>;
433
+ /**
434
+ * Update a custodial transaction.
435
+ *
436
+ * @param transactionId - The ID of the transaction to update.
437
+ * @param options - The custodial transaction options to update.
438
+ * @param options.errorMessage - The error message to be assigned in case transaction status update to failed.
439
+ * @param options.hash - The new hash value to be assigned.
440
+ * @param options.status - The new status value to be assigned.
441
+ */
442
+ updateCustodialTransaction(transactionId: string, { errorMessage, hash, status, }: {
443
+ errorMessage?: string;
444
+ hash?: string;
445
+ status?: TransactionStatus;
446
+ }): void;
447
+ /**
448
+ * Creates approvals for all unapproved transactions persisted.
449
+ */
450
+ initApprovals(): void;
451
+ /**
452
+ * Search transaction metadata for matching entries.
453
+ *
454
+ * @param opts - Options bag.
455
+ * @param opts.searchCriteria - An object containing values or functions for transaction properties to filter transactions with.
456
+ * @param opts.initialList - The transactions to search. Defaults to the current state.
457
+ * @param opts.filterToCurrentNetwork - Whether to filter the results to the current network. Defaults to true.
458
+ * @param opts.limit - The maximum number of transactions to return. No limit by default.
459
+ * @returns An array of transactions matching the provided options.
460
+ */
461
+ getTransactions({ searchCriteria, initialList, filterToCurrentNetwork, limit, }?: {
462
+ searchCriteria?: any;
463
+ initialList?: TransactionMeta[];
464
+ filterToCurrentNetwork?: boolean;
465
+ limit?: number;
466
+ }): TransactionMeta[];
467
+ private signExternalTransaction;
468
+ /**
469
+ * Removes unapproved transactions from state.
470
+ */
471
+ clearUnapprovedTransactions(): void;
472
+ private addMetadata;
473
+ private updateGasProperties;
474
+ private getCurrentChainTransactionsByStatus;
475
+ private onBootCleanup;
476
+ /**
477
+ * Create approvals for all unapproved transactions on current chain.
478
+ */
479
+ private createApprovalsForUnapprovedTransactions;
480
+ /**
481
+ * Force to submit approved transactions on current chain.
482
+ */
483
+ private submitApprovedTransactions;
328
484
  private processApproval;
329
485
  /**
330
486
  * Approves a transaction and updates it's status in state. If this is not a
@@ -335,11 +491,13 @@ export declare class TransactionController extends BaseController<TransactionCon
335
491
  * @param transactionId - The ID of the transaction to approve.
336
492
  */
337
493
  private approveTransaction;
494
+ private publishTransaction;
338
495
  /**
339
496
  * Cancels a transaction based on its ID by setting its status to "rejected"
340
497
  * and emitting a `<tx.id>:finished` hub event.
341
498
  *
342
499
  * @param transactionId - The ID of the transaction to cancel.
500
+ * @param actionId - The actionId passed from UI
343
501
  */
344
502
  private cancelTransaction;
345
503
  /**
@@ -351,7 +509,7 @@ export declare class TransactionController extends BaseController<TransactionCon
351
509
  * representation, this function will not break apart transactions with the
352
510
  * same nonce, created on the same day, per network. Not accounting for transactions of the same
353
511
  * nonce, same day and network combo can result in confusing or broken experiences
354
- * in the UI. The transactions are then updated using the BaseController update.
512
+ * in the UI. The transactions are then updated using the BaseControllerV1 update.
355
513
  *
356
514
  * @param transactions - The transactions to be applied to the state.
357
515
  * @returns The trimmed list of transactions.
@@ -389,7 +547,6 @@ export declare class TransactionController extends BaseController<TransactionCon
389
547
  private getCommonConfiguration;
390
548
  private onIncomingTransactions;
391
549
  private onUpdatedLastFetchedBlockNumbers;
392
- private onPendingTransactionsUpdate;
393
550
  private generateDappSuggestedGasFees;
394
551
  /**
395
552
  * Validates and adds external provided transaction to state.
@@ -427,6 +584,12 @@ export declare class TransactionController extends BaseController<TransactionCon
427
584
  */
428
585
  private updateTransactionMetaRSV;
429
586
  private getEIP1559Compatibility;
587
+ private addPendingTransactionTrackerListeners;
588
+ private signTransaction;
589
+ private onTransactionStatusChange;
590
+ private getNonceTrackerTransactions;
591
+ private onConfirmedTransaction;
592
+ private updatePostBalance;
430
593
  }
431
- export default TransactionController;
594
+ export {};
432
595
  //# 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,2BAA2B,CAAC;AAU3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,QAAQ,EACT,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAI3C,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAOjE,OAAO,KAAK,EAEV,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,YAAY,EACb,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,eAAe,EAAqB,MAAM,SAAS,CAAC;AAyB7D,eAAO,MAAM,QAAQ,kBAAkB,CAAC;AAExC;;;;GAIG;AACH,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACxB,eAAe,EAAE,eAAe,CAAC;CAClC;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,MAAM,CA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