SmartTransactionsController Actions
20 actions registered.
SmartTransactionsController:cancelSmartTransaction
Package: @metamask/smart-transactions-controller
Handler signature:
(uuid: string, { networkClientId, }?: {
networkClientId?: NetworkClientId;
}) => Promise<void>
SmartTransactionsController:checkPoll
Package: @metamask/smart-transactions-controller
Handler signature:
({ smartTransactionsState: { smartTransactions }, }: SmartTransactionsControllerState) => void
SmartTransactionsController:clearFees
Package: @metamask/smart-transactions-controller
Handler signature:
() => Fees
SmartTransactionsController:fetchLiveness
Package: @metamask/smart-transactions-controller
Fetches the liveness status of Smart Transactions for a given chain.
Parameters:
| Name | Description |
|---|---|
options | The options object. |
options.chainId | The chain ID to fetch liveness for. Preferred over networkClientId. |
options.networkClientId | The network client ID to derive chain ID from. |
Returns: A promise that resolves to the liveness status.
Handler signature:
({ networkClientId, chainId: chainIdArg, }?: {
/** @deprecated Use `chainId` instead. */
networkClientId?: NetworkClientId;
chainId?: Hex;
}) => Promise<boolean>
SmartTransactionsController:fetchSmartTransactionsStatus
Package: @metamask/smart-transactions-controller
Handler signature:
(transactions: {
uuid: string;
networkClientId?: NetworkClientId;
chainId: Hex;
}[]) => Promise<Record<string, SmartTransactionsStatus>>
SmartTransactionsController:getFees
Package: @metamask/smart-transactions-controller
Handler signature:
(tradeTx: UnsignedTransaction, approvalTx?: UnsignedTransaction, { networkClientId }?: {
networkClientId?: NetworkClientId;
}) => Promise<Fees>
SmartTransactionsController:getSmartTransactionByMinedTxHash
Package: @metamask/smart-transactions-controller
Handler signature:
(txHash: string | undefined) => SmartTransaction | undefined
SmartTransactionsController:getState
Package: @metamask/smart-transactions-controller
Handler signature:
() => SmartTransactionsControllerState
SmartTransactionsController:getTransactions
Package: @metamask/smart-transactions-controller
Handler signature:
({ addressFrom, status, }: {
addressFrom: string;
status: SmartTransactionStatuses;
}) => SmartTransaction[]
SmartTransactionsController:initializeSmartTransactionsForChainId
Package: @metamask/smart-transactions-controller
Handler signature:
() => void
SmartTransactionsController:isNewSmartTransaction
Package: @metamask/smart-transactions-controller
Handler signature:
(smartTransactionUuid: string, chainId?: Hex) => boolean
SmartTransactionsController:poll
Package: @metamask/smart-transactions-controller
Handler signature:
(interval?: number) => Promise<void>
SmartTransactionsController:setOptInState
Package: @metamask/smart-transactions-controller
Handler signature:
(optInState: boolean | null) => void
SmartTransactionsController:setStatusRefreshInterval
Package: @metamask/smart-transactions-controller
Handler signature:
(interval: number) => Promise<void>
SmartTransactionsController:stop
Package: @metamask/smart-transactions-controller
Handler signature:
() => Promise<void>
SmartTransactionsController:submitSignedTransactions
Package: @metamask/smart-transactions-controller
Handler signature:
({ transactionMeta, txParams, signedTransactions, signedCanceledTransactions, signedTransactionsWithMetadata, networkClientId, }: {
signedTransactions: SignedTransaction[];
signedCanceledTransactions?: SignedCanceledTransaction[];
signedTransactionsWithMetadata?: SignedTransactionWithMetadata[];
transactionMeta?: TransactionMeta;
txParams?: TransactionParams;
networkClientId?: NetworkClientId;
}) => Promise<SentinelSubmitTransactionsResponse & {
txHash: string;
txHashes: string[];
}>
SmartTransactionsController:trackStxStatusChange
Package: @metamask/smart-transactions-controller
Handler signature:
(smartTransaction: SmartTransaction, prevSmartTransaction?: SmartTransaction) => void
SmartTransactionsController:updateSmartTransaction
Package: @metamask/smart-transactions-controller
Handler signature:
(smartTransaction: SmartTransaction, { networkClientId }?: {
networkClientId?: NetworkClientId;
}) => void
SmartTransactionsController:updateSmartTransactions
Package: @metamask/smart-transactions-controller
Handler signature:
({ chainIds, }?: {
chainIds: Hex[];
}) => Promise<void>
SmartTransactionsController:wipeSmartTransactions
Package: @metamask/smart-transactions-controller
Handler signature:
({ address, ignoreNetwork, }: {
address: string;
ignoreNetwork?: boolean;
}) => void