import type { AccountsControllerGetSelectedAccountAction, AccountsControllerGetStateAction, AccountsControllerSelectedAccountChangeEvent } from '@metamask/accounts-controller'; import type { ApprovalControllerAddRequestAction } from '@metamask/approval-controller'; import type { ControllerGetStateAction, ControllerStateChangeEvent } from '@metamask/base-controller'; import { BaseController } from '@metamask/base-controller'; import type { TraceCallback } from '@metamask/controller-utils'; import type { AccountActivityServiceStatusChangedEvent, AccountActivityServiceTransactionUpdatedEvent, BackendWebSocketServiceConnectionStateChangedEvent } from '@metamask/core-backend'; import type { GasFeeControllerFetchGasFeeEstimatesAction } from '@metamask/gas-fee-controller'; import type { KeyringControllerGetStateAction, KeyringControllerSignEip7702AuthorizationAction, KeyringControllerSignTransactionAction } from '@metamask/keyring-controller'; import type { Messenger } from '@metamask/messenger'; import type { NetworkClientId, NetworkControllerStateChangeEvent, NetworkControllerFindNetworkClientIdByChainIdAction, NetworkControllerGetNetworkClientByIdAction, NetworkControllerGetNetworkClientRegistryAction, NetworkControllerGetStateAction, NetworkControllerGetEIP1559CompatibilityAction } from '@metamask/network-controller'; import type { NonceLock } from '@metamask/nonce-tracker'; import type { RemoteFeatureFlagControllerGetStateAction } from '@metamask/remote-feature-flag-controller'; import type { Hex } from '@metamask/utils'; import type { TransactionControllerMethodActions } from './TransactionController-method-action-types.js'; import type { SavedGasFees, SendFlowHistoryEntry, TransactionParams, TransactionMeta, TransactionReceipt, SecurityAlertResponse, GasFeeFlowResponse, GasPriceValue, FeeMarketEIP1559Values, SubmitHistoryEntry, TransactionBatchRequest, TransactionBatchResult, BatchTransactionParams, UpdateCustodialTransactionRequest, PublishBatchHook, GasFeeToken, IsAtomicBatchSupportedResult, IsAtomicBatchSupportedRequest, AfterAddHook, TransactionBatchMeta, BeforeSignHook, GetSimulationConfig, AddTransactionOptions, GetGasFeeTokensRequest } from './types.js'; import { TransactionContainerType } from './types.js'; import type { EstimateGasBatchResult } from './utils/gas.js'; /** * Object with new transaction's meta and a promise resolving to the * transaction hash if successful. */ export interface Result { /** Promise resolving to a new transaction hash. */ result: Promise; /** Meta information about this new transaction. */ transactionMeta: TransactionMeta; } /** * Method data registry object */ export type MethodData = { /** Registry method raw string. */ registryMethod: string; /** Registry method object, containing name and method arguments. */ parsedRegistryMethod: { name: string; args: { type: string; }[]; } | { name?: any; args?: any; }; }; /** * Transaction controller state */ export type TransactionControllerState = { /** Number of transactions to sign for each active batch. */ batchTransactionCounts: Record; /** A list of TransactionMeta objects. */ transactions: TransactionMeta[]; /** A list of TransactionBatchMeta objects. */ transactionBatches: TransactionBatchMeta[]; /** Object containing all known method data information. */ methodData: Record; /** Cache to optimise incoming transaction queries. */ lastFetchedBlockNumbers: { [key: string]: number | string; }; /** History of all transactions submitted from the wallet. */ submitHistory: SubmitHistoryEntry[]; }; /** * Multiplier used to determine a transaction's increased gas fee during cancellation */ export declare const CANCEL_RATE = 1.1; /** * Multiplier used to determine a transaction's increased gas fee during speed up */ export declare const SPEED_UP_RATE = 1.1; /** * Represents the `TransactionController:getState` action. */ export type TransactionControllerGetStateAction = ControllerGetStateAction; /** * The internal actions available to the TransactionController. */ export type TransactionControllerActions = TransactionControllerGetStateAction | TransactionControllerMethodActions; /** * @deprecated Incoming transaction support has been removed. These options are ignored. */ export type IncomingTransactionCompatibilityOptions = { client?: string; includeTokenTransfers?: boolean; isEnabled?: () => boolean; updateTransactions?: boolean; /** @deprecated Ignored as incoming transaction support has been removed. */ etherscanApiKeysByChainId?: Record; }; /** TransactionController constructor options. */ export type TransactionControllerOptions = { /** Whether to disable additional processing on swaps transactions. */ disableSwaps: boolean; /** Get accounts that a given origin has permissions for. */ getPermittedAccounts?: (origin?: string) => Promise; /** Gets the saved gas fee config. */ getSavedGasFees?: (transactionMeta: TransactionMeta) => SavedGasFees | undefined; /** * Gets the transaction simulation configuration. */ getSimulationConfig?: GetSimulationConfig; /** * @deprecated Incoming transaction support has been removed. This option is ignored. */ incomingTransactions?: IncomingTransactionCompatibilityOptions; /** * Callback to determine whether gas fee updates should be enabled for a given transaction. * Returns true to enable updates, false to disable them. */ isAutomaticGasFeeUpdateEnabled?: (transactionMeta: TransactionMeta) => boolean; /** Whether simulation should return EIP-7702 gas fee tokens. */ isEIP7702GasFeeTokensEnabled?: (transactionMeta: TransactionMeta) => Promise; /** Whether the first time interaction check is enabled. */ isFirstTimeInteractionEnabled?: () => boolean; /** Whether new transactions will be automatically simulated. */ isSimulationEnabled?: (transactionMeta?: TransactionMeta) => boolean; /** Whether timeout checking is enabled for a transaction. */ isTimeoutEnabled?: (transactionMeta: TransactionMeta) => boolean; /** The controller messenger. */ messenger: TransactionControllerMessenger; /** Public key used to validate EIP-7702 contract signatures in feature flags. */ publicKeyEIP7702?: Hex; /** Initial state to set on this controller. */ state?: Partial; testGasFeeFlows?: boolean; trace?: TraceCallback; /** The controller hooks. */ hooks: { /** Additional logic to execute after adding a transaction. */ afterAdd?: AfterAddHook; /** * Additional logic to execute before checking pending transactions. * Return false to prevent the broadcast of the transaction. */ beforeCheckPendingTransaction?: (transactionMeta: TransactionMeta) => Promise; /** * Additional logic to execute before publishing a transaction. * Return false to prevent the broadcast of the transaction. */ beforePublish?: (transactionMeta: TransactionMeta) => Promise; /** * Additional logic to execute before signing a transaction. */ beforeSign?: BeforeSignHook; /** Alternate logic to publish a transaction. */ publish?: (transactionMeta: TransactionMeta) => Promise<{ transactionHash: string; }>; publishBatch?: PublishBatchHook; }; }; /** * The name of the {@link TransactionController}. */ declare const controllerName = "TransactionController"; /** * The external actions available to the {@link TransactionController}. */ export type AllowedActions = AccountsControllerGetSelectedAccountAction | AccountsControllerGetStateAction | ApprovalControllerAddRequestAction | GasFeeControllerFetchGasFeeEstimatesAction | KeyringControllerGetStateAction | KeyringControllerSignEip7702AuthorizationAction | KeyringControllerSignTransactionAction | NetworkControllerFindNetworkClientIdByChainIdAction | NetworkControllerGetEIP1559CompatibilityAction | NetworkControllerGetNetworkClientByIdAction | NetworkControllerGetNetworkClientRegistryAction | NetworkControllerGetStateAction | RemoteFeatureFlagControllerGetStateAction; /** * The external events available to the {@link TransactionController}. */ export type AllowedEvents = AccountActivityServiceStatusChangedEvent | AccountActivityServiceTransactionUpdatedEvent | AccountsControllerSelectedAccountChangeEvent | BackendWebSocketServiceConnectionStateChangedEvent | NetworkControllerStateChangeEvent; /** * Represents the `TransactionController:stateChange` event. */ export type TransactionControllerStateChangeEvent = ControllerStateChangeEvent; /** * Represents the `TransactionController:postTransactionBalanceUpdated` event. */ export type TransactionControllerPostTransactionBalanceUpdatedEvent = { type: `${typeof controllerName}:postTransactionBalanceUpdated`; payload: [ { transactionMeta: TransactionMeta; approvalTransactionMeta?: TransactionMeta; } ]; }; /** * Represents the `TransactionController:speedUpTransactionAdded` event. */ export type TransactionControllerSpeedupTransactionAddedEvent = { type: `${typeof controllerName}:speedupTransactionAdded`; payload: [transactionMeta: TransactionMeta]; }; /** * Represents the `TransactionController:transactionApproved` event. */ export type TransactionControllerTransactionApprovedEvent = { type: `${typeof controllerName}:transactionApproved`; payload: [ { transactionMeta: TransactionMeta; actionId?: string; } ]; }; /** * Represents the `TransactionController:transactionConfirmed` event. */ export type TransactionControllerTransactionConfirmedEvent = { type: `${typeof controllerName}:transactionConfirmed`; payload: [transactionMeta: TransactionMeta]; }; /** * Represents the `TransactionController:transactionDropped` event. */ export type TransactionControllerTransactionDroppedEvent = { type: `${typeof controllerName}:transactionDropped`; payload: [{ transactionMeta: TransactionMeta; }]; }; /** * Represents the `TransactionController:transactionFailed` event. */ export type TransactionControllerTransactionFailedEvent = { type: `${typeof controllerName}:transactionFailed`; payload: [ { actionId?: string; error: string; transactionMeta: TransactionMeta; } ]; }; /** * Represents the `TransactionController:transactionFinished` event. */ export type TransactionControllerTransactionFinishedEvent = { type: `${typeof controllerName}:transactionFinished`; payload: [transactionMeta: TransactionMeta]; }; /** * Represents the `TransactionController:transactionNewSwapApproval` event. */ export type TransactionControllerTransactionNewSwapApprovalEvent = { type: `${typeof controllerName}:transactionNewSwapApproval`; payload: [{ transactionMeta: TransactionMeta; }]; }; /** * Represents the `TransactionController:transactionNewSwap` event. */ export type TransactionControllerTransactionNewSwapEvent = { type: `${typeof controllerName}:transactionNewSwap`; payload: [{ transactionMeta: TransactionMeta; }]; }; /** * Represents the `TransactionController:transactionNewSwapApproval` event. */ export type TransactionControllerTransactionNewSwapAndSendEvent = { type: `${typeof controllerName}:transactionNewSwapAndSend`; payload: [{ transactionMeta: TransactionMeta; }]; }; /** * Represents the `TransactionController:transactionPublishingSkipped` event. */ export type TransactionControllerTransactionPublishingSkipped = { type: `${typeof controllerName}:transactionPublishingSkipped`; payload: [transactionMeta: TransactionMeta]; }; /** * Represents the `TransactionController:transactionRejected` event. */ export type TransactionControllerTransactionRejectedEvent = { type: `${typeof controllerName}:transactionRejected`; payload: [ { transactionMeta: TransactionMeta; actionId?: string; } ]; }; /** * Represents the `TransactionController:transactionStatusUpdated` event. */ export type TransactionControllerTransactionStatusUpdatedEvent = { type: `${typeof controllerName}:transactionStatusUpdated`; payload: [ { transactionMeta: TransactionMeta; } ]; }; /** * Represents the `TransactionController:transactionSubmitted` event. */ export type TransactionControllerTransactionSubmittedEvent = { type: `${typeof controllerName}:transactionSubmitted`; payload: [ { transactionMeta: TransactionMeta; actionId?: string; } ]; }; /** * Represents the `TransactionController:unapprovedTransactionAdded` event. */ export type TransactionControllerUnapprovedTransactionAddedEvent = { type: `${typeof controllerName}:unapprovedTransactionAdded`; payload: [transactionMeta: TransactionMeta]; }; /** * The internal events available to the {@link TransactionController}. */ export type TransactionControllerEvents = TransactionControllerPostTransactionBalanceUpdatedEvent | TransactionControllerSpeedupTransactionAddedEvent | TransactionControllerStateChangeEvent | TransactionControllerTransactionApprovedEvent | TransactionControllerTransactionConfirmedEvent | TransactionControllerTransactionDroppedEvent | TransactionControllerTransactionFailedEvent | TransactionControllerTransactionFinishedEvent | TransactionControllerTransactionNewSwapApprovalEvent | TransactionControllerTransactionNewSwapEvent | TransactionControllerTransactionNewSwapAndSendEvent | TransactionControllerTransactionPublishingSkipped | TransactionControllerTransactionRejectedEvent | TransactionControllerTransactionStatusUpdatedEvent | TransactionControllerTransactionSubmittedEvent | TransactionControllerUnapprovedTransactionAddedEvent; /** * The messenger of the {@link TransactionController}. */ export type TransactionControllerMessenger = Messenger; /** * Possible states of the approve transaction step. */ export declare enum ApprovalState { Approved = "approved", NotApproved = "not-approved", SkippedViaBeforePublishHook = "skipped-via-before-publish-hook" } /** * Controller responsible for submitting and managing transactions. */ export declare class TransactionController extends BaseController { #private; /** * Constructs a TransactionController. * * @param options - The controller options. */ constructor(options: TransactionControllerOptions); /** * Stops polling and removes listeners to prepare the controller for garbage collection. */ destroy(): void; /** * @deprecated Incoming transaction support has been removed. This method is retained as a no-op for backwards compatibility. */ startIncomingTransactionPolling(): void; /** * @deprecated Incoming transaction support has been removed. This method is retained as a no-op for backwards compatibility. */ stopIncomingTransactionPolling(): void; /** * Handle new method data request. * * @param fourBytePrefix - The method prefix. * @param networkClientId - The ID of the network client used to fetch the method data. * @returns The method data object corresponding to the given signature prefix. */ handleMethodData(fourBytePrefix: string, networkClientId: NetworkClientId): Promise; /** * Add a batch of transactions to be submitted after approval. * * @param request - Request object containing the transactions to add. * @returns Result object containing the generated batch ID. */ addTransactionBatch(request: TransactionBatchRequest): Promise; /** * Determine which chains support atomic batch transactions with the given account address. * * @param request - Request object containing the account address and other parameters. * @returns Result object containing the supported chains and related information. */ isAtomicBatchSupported(request: IsAtomicBatchSupportedRequest): Promise; /** * Add a new unapproved transaction to state. Parameters will be validated, a * unique transaction ID will be generated, and `gas` and `gasPrice` will be calculated * if not provided. A `:unapproved` hub event will be emitted once added. * * @param txParams - Standard parameters for an Ethereum transaction. * @param options - Additional options to control how the transaction is added. * @returns Object containing a promise resolving to the transaction hash if approved. */ addTransaction(txParams: TransactionParams, options: AddTransactionOptions): Promise; /** * Attempts to cancel a transaction based on its ID by setting its status to "rejected" * and emitting a `:finished` hub event. * * @param transactionId - The ID of the transaction to cancel. * @param gasValues - The gas values to use for the cancellation transaction. * @param options - The options for the cancellation transaction. * @param options.actionId - Unique ID persisted on transaction metadata. * @param options.estimatedBaseFee - The estimated base fee of the transaction. */ stopTransaction(transactionId: string, gasValues?: GasPriceValue | FeeMarketEIP1559Values, { estimatedBaseFee, actionId, }?: { estimatedBaseFee?: string; actionId?: string; }): Promise; /** * Attempts to speed up a transaction increasing transaction gasPrice by ten percent. * * @param transactionId - The ID of the transaction to speed up. * @param gasValues - The gas values to use for the speed up transaction. * @param options - The options for the speed up transaction. * @param options.actionId - Unique ID persisted on transaction metadata. * @param options.estimatedBaseFee - The estimated base fee of the transaction. */ speedUpTransaction(transactionId: string, gasValues?: GasPriceValue | FeeMarketEIP1559Values, { actionId, estimatedBaseFee, }?: { actionId?: string; estimatedBaseFee?: string; }): Promise; /** * Estimates required gas for a given transaction. * * @param transaction - The transaction to estimate gas for. * @param networkClientId - The network client id to use for the estimate. * @param options - Additional options for the estimate. * @param options.ignoreDelegationSignatures - Ignore signature errors if submitting delegations to the DelegationManager. * @returns The gas and gas price. */ estimateGas(transaction: TransactionParams, networkClientId: NetworkClientId, { ignoreDelegationSignatures, }?: { ignoreDelegationSignatures?: boolean; }): Promise<{ gas: string; simulationFails: TransactionMeta['simulationFails']; }>; /** * Estimates required gas for a batch of transactions. * * @param request - Request object. * @param request.chainId - Chain ID of the transactions. * @param request.from - Address of the sender. * @param request.transactions - Array of transactions within a batch request. * @returns Object containing the gas limit. */ estimateGasBatch({ chainId, from, transactions, }: { chainId: Hex; from: Hex; transactions: BatchTransactionParams[]; }): Promise; /** * Estimates required gas for a given transaction and add additional gas buffer with the given multiplier. * * @param transaction - The transaction params to estimate gas for. * @param multiplier - The multiplier to use for the gas buffer. * @param networkClientId - The network client id to use for the estimate. * @returns The buffered estimated gas and whether the estimation failed. */ estimateGasBuffered(transaction: TransactionParams, multiplier: number, networkClientId: NetworkClientId): Promise<{ gas: string; simulationFails: TransactionMeta['simulationFails']; }>; /** * Updates an existing transaction in state. * * @param transactionMeta - The new transaction to store in state. * @param note - A note or update reason to be logged. */ updateTransaction(transactionMeta: TransactionMeta, note: string): void; /** * Updates transaction metadata. * * @param options - Update options. * @param options.transactionId - ID of the transaction to update. * @param options.callback - Function that mutates the transaction metadata. * @param options.skipResimulate - Whether to skip automatic re-simulation. * @returns The updated transaction metadata. */ updateTransactionMetadata({ transactionId, callback, skipResimulate, }: { transactionId: string; callback: (transactionMeta: TransactionMeta) => void; skipResimulate?: boolean; }): Readonly; /** * Mark a transaction as failed, transitioning it through the standard failure * path. * * Unlike `updateTransaction`, this emits the transaction lifecycle events * (`transactionFailed`, `transactionStatusUpdated`, `transactionFinished`), so * downstream subscribers such as the bridge status controller and metrics are * notified. Intended for callers that finalize a transaction out-of-band, for * example the smart transactions controller when the relay cancels a smart * transaction that never landed on chain. * * @param transactionId - The ID of the transaction to mark as failed. * @param error - The error describing why the transaction failed. */ failTransaction(transactionId: string, error: Error): void; /** * Update the security alert response for a transaction. * * @param transactionId - ID of the transaction. * @param securityAlertResponse - The new security alert response for the transaction. */ updateSecurityAlertResponse(transactionId: string, securityAlertResponse: SecurityAlertResponse): void; /** * Remove transactions from state. * * @param options - The options bag. * @param options.address - Remove transactions from this account only. Defaults to all accounts. * @param options.chainId - Remove transactions for the specified chain only. Defaults to all chains. */ wipeTransactions({ address, chainId, }?: { address?: string; chainId?: string; }): void; /** * @deprecated No longer used. Kept only to avoid breaking changes. It now performs no operations. * @param transactionID - The ID of the transaction to update. * @param _currentSendFlowHistoryLength - The length of the current sendFlowHistory array. * @param _sendFlowHistoryToAdd - The sendFlowHistory entries to add. * @returns The transactionMeta. */ updateTransactionSendFlowHistory(transactionID: string, _currentSendFlowHistoryLength: number, _sendFlowHistoryToAdd: SendFlowHistoryEntry[]): TransactionMeta; /** * Adds external provided transaction to state as confirmed transaction. * * @param transactionMeta - TransactionMeta to add transactions. * @param transactionReceipt - TransactionReceipt of the external transaction. * @param baseFeePerGas - Base fee per gas of the external transaction. */ confirmExternalTransaction(transactionMeta: TransactionMeta, transactionReceipt: TransactionReceipt, baseFeePerGas: Hex): Promise; /** * Update the gas values of a transaction. * * @param transactionId - The ID of the transaction to update. * @param gasValues - Gas values to update. * @param gasValues.gas - Same as transaction.gasLimit. * @param gasValues.gasLimit - Maxmimum number of units of gas to use for this transaction. * @param gasValues.gasPrice - Price per gas for legacy transactions. * @param gasValues.maxPriorityFeePerGas - Maximum amount per gas to give to validator as incentive. * @param gasValues.maxFeePerGas - Maximum amount per gas to pay for the transaction, including the priority fee. * @param gasValues.estimateUsed - Which estimate level was used. * @param gasValues.estimateSuggested - Which estimate level that the API suggested. * @param gasValues.defaultGasEstimates - The default estimate for gas. * @param gasValues.originalGasEstimate - Original estimate for gas. * @param gasValues.userEditedGasLimit - The gas limit supplied by user. * @param gasValues.userFeeLevel - Estimate level user selected. * @returns The updated transactionMeta. */ updateTransactionGasFees(transactionId: string, { defaultGasEstimates, estimateUsed, estimateSuggested, gas, gasLimit, gasPrice, maxPriorityFeePerGas, maxFeePerGas, originalGasEstimate, userEditedGasLimit, userFeeLevel: userFeeLevelParam, }: { defaultGasEstimates?: string; estimateUsed?: string; estimateSuggested?: string; gas?: string; gasLimit?: string; gasPrice?: string; maxPriorityFeePerGas?: string; maxFeePerGas?: string; originalGasEstimate?: string; userEditedGasLimit?: boolean; userFeeLevel?: string; }): TransactionMeta; /** * Update the previous gas values of a transaction. * * @param transactionId - The ID of the transaction to update. * @param previousGas - Previous gas values to update. * @param previousGas.gasLimit - Maximum number of units of gas to use for this transaction. * @param previousGas.maxFeePerGas - Maximum amount per gas to pay for the transaction, including the priority fee. * @param previousGas.maxPriorityFeePerGas - Maximum amount per gas to give to validator as incentive. * @returns The updated transactionMeta. */ updatePreviousGasParams(transactionId: string, { gasLimit, maxFeePerGas, maxPriorityFeePerGas, }: { gasLimit?: string; maxFeePerGas?: string; maxPriorityFeePerGas?: string; }): TransactionMeta; /** * Acquires a nonce lock for the given address on the specified network, * ensuring that nonces are assigned sequentially without conflicts. * * @param address - The account address for which to acquire the nonce lock. * @param networkClientId - The ID of the network client to use. * @returns A promise that resolves to a nonce lock containing the next nonce and a release function. */ getNonceLock(address: string, networkClientId: NetworkClientId): Promise; /** * Updates the editable parameters of a transaction. * * @param txId - The ID of the transaction to update. * @param params - The editable parameters to update. * @param params.containerTypes - Container types applied to the parameters. * @param params.data - Data to pass with the transaction. * @param params.from - Address to send the transaction from. * @param params.gas - Maximum number of units of gas to use for the transaction. * @param params.gasPrice - Price per gas for legacy transactions. * @param params.maxFeePerGas - Maximum amount per gas to pay for the transaction, including the priority fee. * @param params.maxPriorityFeePerGas - Maximum amount per gas to give to validator as incentive. * @param params.updateType - Whether to update the transaction type. Defaults to `true`. * @param params.to - Address to send the transaction to. * @param params.value - Value associated with the transaction. * @returns The updated transaction metadata. */ updateEditableParams(txId: string, { containerTypes, data, from, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, to, updateType, value, }: { containerTypes?: TransactionContainerType[]; data?: string; from?: string; gas?: string; gasPrice?: string; maxFeePerGas?: string; maxPriorityFeePerGas?: string; to?: string; updateType?: boolean; value?: string; }): Promise | undefined>; /** * Update the isActive state of a transaction. * * @param transactionId - The ID of the transaction to update. * @param isActive - The active state. */ setTransactionActive(transactionId: string, isActive: boolean): void; /** * Signs and returns the raw transaction data for provided transaction params list. * * @param listOfTxParams - The list of transaction params to approve. * @param opts - Options bag. * @param opts.hasNonce - Whether the transactions already have a nonce. * @returns The raw transactions. */ approveTransactionsWithSameNonce(listOfTxParams?: (TransactionParams & { chainId: Hex; })[], { hasNonce }?: { hasNonce?: boolean; }): Promise; /** * Update a custodial transaction. * * @param request - The custodial transaction update request. * * @returns The updated transaction metadata. */ updateCustodialTransaction(request: UpdateCustodialTransactionRequest): TransactionMeta; /** * Search transaction metadata for matching entries. * * @param opts - Options bag. * @param opts.initialList - The transactions to search. Defaults to the current state. * @param opts.limit - The maximum number of transactions to return. No limit by default. * @param opts.searchCriteria - An object containing values or functions for transaction properties to filter transactions with. * @returns An array of transactions matching the provided options. */ getTransactions({ initialList, limit, searchCriteria, }?: { initialList?: TransactionMeta[]; limit?: number; searchCriteria?: any; }): TransactionMeta[]; /** * Estimates the gas fees for a transaction. * * @param args - The arguments for estimating gas fees. * @param args.transactionParams - The transaction parameters to estimate fees for. * @param args.chainId - The chain ID to use. If not provided, the network client ID is used to determine the chain. * @param args.networkClientId - The network client ID to use for the estimation. * @returns A promise that resolves to the estimated gas fee response. */ estimateGasFee({ transactionParams, chainId, networkClientId: requestNetworkClientId, }: { transactionParams: TransactionParams; chainId?: Hex; networkClientId?: NetworkClientId; }): Promise; /** * Determine the layer 1 gas fee for the given transaction parameters. * * @param request - The request object. * @param request.transactionParams - The transaction parameters to estimate the layer 1 gas fee for. * @param request.chainId - The ID of the chain where the transaction will be executed. * @param request.networkClientId - The ID of a specific network client to process the transaction. * @returns The layer 1 gas fee. */ getLayer1GasFee({ transactionParams, chainId, networkClientId, }: { transactionParams: TransactionParams; chainId?: Hex; networkClientId?: NetworkClientId; }): Promise; /** * Removes unapproved transactions from state. */ clearUnapprovedTransactions(): void; /** * Stop the signing process for a specific transaction. * Throws an error causing the transaction status to be set to failed. * * @param transactionId - The ID of the transaction to stop signing. */ abortTransactionSigning(transactionId: string): void; /** * Update the transaction data of a single nested transaction within an atomic batch transaction. * * @param options - The options bag. * @param options.transactionId - ID of the atomic batch transaction. * @param options.transactionIndex - Index of the nested transaction within the atomic batch transaction. * @param options.transactionData - New data to set for the nested transaction. * @returns The updated data for the atomic batch transaction. */ updateAtomicBatchData({ transactionId, transactionIndex, transactionData, }: { transactionId: string; transactionIndex: number; transactionData: Hex; }): Promise; /** * Update the batch transactions associated with a transaction. * These transactions will be submitted with the main transaction as a batch. * * @param request - The request object. * @param request.transactionId - The ID of the transaction to update. * @param request.batchTransactions - The new batch transactions. */ updateBatchTransactions({ transactionId, batchTransactions, }: { transactionId: string; batchTransactions: BatchTransactionParams[]; }): void; /** * Update the selected gas fee token for a transaction. * * @param transactionId - The ID of the transaction to update. * @param contractAddress - The contract address of the selected gas fee token. */ updateSelectedGasFeeToken(transactionId: string, contractAddress: Hex | undefined): void; /** * Update the required transaction IDs for a transaction. * * @param request - The request object. * @param request.transactionId - The ID of the transaction to update. * @param request.requiredTransactionIds - The additional required transaction IDs. * @param request.append - Whether to append the IDs to any existing values. Defaults to true. */ updateRequiredTransactionIds({ transactionId, requiredTransactionIds, append, }: { transactionId: string; requiredTransactionIds: string[]; append?: boolean; }): void; /** * Emulate a new transaction. * * @param transactionId - The transaction ID. */ emulateNewTransaction(transactionId: string): void; /** * Emulate a transaction update. * * @param transactionMeta - Transaction metadata. */ emulateTransactionUpdate(transactionMeta: TransactionMeta): void; /** * Retrieve available gas fee tokens for a transaction. * * @param request - The request object containing transaction details. * @returns The list of available gas fee tokens. */ getGasFeeTokens(request: GetGasFeeTokensRequest): Promise; } export {}; //# sourceMappingURL=TransactionController.d.ts.map