@metamask-previews/transaction-controller 69.6.1-preview-4f4c98e → 69.6.1-preview-eb263b0ee
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.
- package/CHANGELOG.md +0 -5
- package/dist/TransactionController-method-action-types.cjs +7 -0
- package/dist/TransactionController-method-action-types.cjs.map +1 -0
- package/dist/{TransactionController-method-action-types.d.ts → TransactionController-method-action-types.d.cts} +2 -2
- package/dist/TransactionController-method-action-types.d.cts.map +1 -0
- package/dist/TransactionController-method-action-types.d.mts +413 -0
- package/dist/TransactionController-method-action-types.d.mts.map +1 -0
- package/dist/{TransactionController-method-action-types.js → TransactionController-method-action-types.mjs} +1 -1
- package/dist/TransactionController-method-action-types.mjs.map +1 -0
- package/dist/TransactionController.cjs +2444 -0
- package/dist/TransactionController.cjs.map +1 -0
- package/dist/{TransactionController.d.ts → TransactionController.d.cts} +18 -18
- package/dist/TransactionController.d.cts.map +1 -0
- package/dist/TransactionController.d.mts +751 -0
- package/dist/TransactionController.d.mts.map +1 -0
- package/dist/{TransactionController.js → TransactionController.mjs} +50 -49
- package/dist/TransactionController.mjs.map +1 -0
- package/dist/api/accounts-api.cjs +57 -0
- package/dist/api/accounts-api.cjs.map +1 -0
- package/dist/api/{accounts-api.d.ts → accounts-api.d.cts} +1 -1
- package/dist/api/accounts-api.d.cts.map +1 -0
- package/dist/api/accounts-api.d.mts +44 -0
- package/dist/api/accounts-api.d.mts.map +1 -0
- package/dist/api/{accounts-api.js → accounts-api.mjs} +5 -5
- package/dist/api/accounts-api.mjs.map +1 -0
- package/dist/api/simulation-api.cjs +116 -0
- package/dist/api/simulation-api.cjs.map +1 -0
- package/dist/api/{simulation-api.d.ts → simulation-api.d.cts} +3 -3
- package/dist/api/simulation-api.d.cts.map +1 -0
- package/dist/api/simulation-api.d.mts +196 -0
- package/dist/api/simulation-api.d.mts.map +1 -0
- package/dist/api/{simulation-api.js → simulation-api.mjs} +8 -7
- package/dist/api/simulation-api.mjs.map +1 -0
- package/dist/constants.cjs +111 -0
- package/dist/constants.cjs.map +1 -0
- package/dist/{constants.d.ts → constants.d.cts} +37 -37
- package/dist/constants.d.cts.map +1 -0
- package/dist/constants.d.mts +78 -0
- package/dist/constants.d.mts.map +1 -0
- package/dist/{constants.js → constants.mjs} +1 -1
- package/dist/constants.mjs.map +1 -0
- package/dist/errors.cjs +37 -0
- package/dist/errors.cjs.map +1 -0
- package/dist/{errors.d.ts → errors.d.cts} +2 -2
- package/dist/errors.d.cts.map +1 -0
- package/dist/errors.d.mts +19 -0
- package/dist/errors.d.mts.map +1 -0
- package/dist/{errors.js → errors.mjs} +2 -2
- package/dist/errors.mjs.map +1 -0
- package/dist/gas-flows/DefaultGasFeeFlow.cjs +85 -0
- package/dist/gas-flows/{DefaultGasFeeFlow.js.map → DefaultGasFeeFlow.cjs.map} +1 -1
- package/dist/gas-flows/{DefaultGasFeeFlow.d.ts → DefaultGasFeeFlow.d.cts} +2 -2
- package/dist/gas-flows/DefaultGasFeeFlow.d.cts.map +1 -0
- package/dist/gas-flows/DefaultGasFeeFlow.d.mts +10 -0
- package/dist/gas-flows/DefaultGasFeeFlow.d.mts.map +1 -0
- package/dist/gas-flows/{DefaultGasFeeFlow.js → DefaultGasFeeFlow.mjs} +6 -6
- package/dist/gas-flows/DefaultGasFeeFlow.mjs.map +1 -0
- package/dist/gas-flows/LineaGasFeeFlow.cjs +111 -0
- package/dist/gas-flows/LineaGasFeeFlow.cjs.map +1 -0
- package/dist/gas-flows/{LineaGasFeeFlow.d.ts → LineaGasFeeFlow.d.cts} +3 -3
- package/dist/gas-flows/LineaGasFeeFlow.d.cts.map +1 -0
- package/dist/gas-flows/LineaGasFeeFlow.d.mts +16 -0
- package/dist/gas-flows/LineaGasFeeFlow.d.mts.map +1 -0
- package/dist/gas-flows/{LineaGasFeeFlow.js → LineaGasFeeFlow.mjs} +7 -7
- package/dist/gas-flows/LineaGasFeeFlow.mjs.map +1 -0
- package/dist/gas-flows/MantleLayer1GasFeeFlow.cjs +66 -0
- package/dist/gas-flows/MantleLayer1GasFeeFlow.cjs.map +1 -0
- package/dist/gas-flows/{MantleLayer1GasFeeFlow.d.ts → MantleLayer1GasFeeFlow.d.cts} +5 -5
- package/dist/gas-flows/MantleLayer1GasFeeFlow.d.cts.map +1 -0
- package/dist/gas-flows/MantleLayer1GasFeeFlow.d.mts +21 -0
- package/dist/gas-flows/MantleLayer1GasFeeFlow.d.mts.map +1 -0
- package/dist/gas-flows/{MantleLayer1GasFeeFlow.js → MantleLayer1GasFeeFlow.mjs} +6 -6
- package/dist/gas-flows/MantleLayer1GasFeeFlow.mjs.map +1 -0
- package/dist/gas-flows/OptimismLayer1GasFeeFlow.cjs +59 -0
- package/dist/gas-flows/OptimismLayer1GasFeeFlow.cjs.map +1 -0
- package/dist/gas-flows/{OptimismLayer1GasFeeFlow.d.ts → OptimismLayer1GasFeeFlow.d.cts} +4 -4
- package/dist/gas-flows/OptimismLayer1GasFeeFlow.d.cts.map +1 -0
- package/dist/gas-flows/OptimismLayer1GasFeeFlow.d.mts +14 -0
- package/dist/gas-flows/OptimismLayer1GasFeeFlow.d.mts.map +1 -0
- package/dist/gas-flows/{OptimismLayer1GasFeeFlow.js → OptimismLayer1GasFeeFlow.mjs} +5 -5
- package/dist/gas-flows/OptimismLayer1GasFeeFlow.mjs.map +1 -0
- package/dist/gas-flows/OracleLayer1GasFeeFlow.cjs +201 -0
- package/dist/gas-flows/OracleLayer1GasFeeFlow.cjs.map +1 -0
- package/dist/gas-flows/{OracleLayer1GasFeeFlow.d.ts → OracleLayer1GasFeeFlow.d.cts} +5 -5
- package/dist/gas-flows/OracleLayer1GasFeeFlow.d.cts.map +1 -0
- package/dist/gas-flows/OracleLayer1GasFeeFlow.d.mts +57 -0
- package/dist/gas-flows/OracleLayer1GasFeeFlow.d.mts.map +1 -0
- package/dist/gas-flows/{OracleLayer1GasFeeFlow.js → OracleLayer1GasFeeFlow.mjs} +15 -8
- package/dist/gas-flows/OracleLayer1GasFeeFlow.mjs.map +1 -0
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.cjs +123 -0
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.cjs.map +1 -0
- package/dist/gas-flows/{RandomisedEstimationsGasFeeFlow.d.ts → RandomisedEstimationsGasFeeFlow.d.cts} +4 -4
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.d.cts.map +1 -0
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.d.mts +28 -0
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.d.mts.map +1 -0
- package/dist/gas-flows/{RandomisedEstimationsGasFeeFlow.js → RandomisedEstimationsGasFeeFlow.mjs} +8 -8
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.mjs.map +1 -0
- package/dist/gas-flows/ScrollLayer1GasFeeFlow.cjs +24 -0
- package/dist/gas-flows/ScrollLayer1GasFeeFlow.cjs.map +1 -0
- package/dist/gas-flows/{ScrollLayer1GasFeeFlow.d.ts → ScrollLayer1GasFeeFlow.d.cts} +5 -5
- package/dist/gas-flows/ScrollLayer1GasFeeFlow.d.cts.map +1 -0
- package/dist/gas-flows/ScrollLayer1GasFeeFlow.d.mts +16 -0
- package/dist/gas-flows/ScrollLayer1GasFeeFlow.d.mts.map +1 -0
- package/dist/gas-flows/{ScrollLayer1GasFeeFlow.js → ScrollLayer1GasFeeFlow.mjs} +3 -3
- package/dist/gas-flows/ScrollLayer1GasFeeFlow.mjs.map +1 -0
- package/dist/gas-flows/TestGasFeeFlow.cjs +73 -0
- package/dist/gas-flows/TestGasFeeFlow.cjs.map +1 -0
- package/dist/gas-flows/{TestGasFeeFlow.d.ts → TestGasFeeFlow.d.cts} +2 -2
- package/dist/gas-flows/TestGasFeeFlow.d.cts.map +1 -0
- package/dist/gas-flows/TestGasFeeFlow.d.mts +12 -0
- package/dist/gas-flows/TestGasFeeFlow.d.mts.map +1 -0
- package/dist/gas-flows/{TestGasFeeFlow.js → TestGasFeeFlow.mjs} +3 -3
- package/dist/gas-flows/TestGasFeeFlow.mjs.map +1 -0
- package/dist/helpers/GasFeePoller.cjs +334 -0
- package/dist/helpers/GasFeePoller.cjs.map +1 -0
- package/dist/helpers/{GasFeePoller.d.ts → GasFeePoller.d.cts} +10 -7
- package/dist/helpers/GasFeePoller.d.cts.map +1 -0
- package/dist/helpers/GasFeePoller.d.mts +66 -0
- package/dist/helpers/GasFeePoller.d.mts.map +1 -0
- package/dist/helpers/{GasFeePoller.js → GasFeePoller.mjs} +9 -9
- package/dist/helpers/GasFeePoller.mjs.map +1 -0
- package/dist/helpers/MethodDataHelper.cjs +84 -0
- package/dist/helpers/MethodDataHelper.cjs.map +1 -0
- package/dist/helpers/{MethodDataHelper.d.ts → MethodDataHelper.d.cts} +7 -4
- package/dist/helpers/MethodDataHelper.d.cts.map +1 -0
- package/dist/helpers/MethodDataHelper.d.mts +16 -0
- package/dist/helpers/MethodDataHelper.d.mts.map +1 -0
- package/dist/helpers/{MethodDataHelper.js → MethodDataHelper.mjs} +7 -7
- package/dist/helpers/MethodDataHelper.mjs.map +1 -0
- package/dist/helpers/MultichainTrackingHelper.cjs +231 -0
- package/dist/helpers/MultichainTrackingHelper.cjs.map +1 -0
- package/dist/helpers/{MultichainTrackingHelper.d.ts → MultichainTrackingHelper.d.cts} +5 -5
- package/dist/helpers/MultichainTrackingHelper.d.cts.map +1 -0
- package/dist/helpers/MultichainTrackingHelper.d.mts +56 -0
- package/dist/helpers/MultichainTrackingHelper.d.mts.map +1 -0
- package/dist/helpers/{MultichainTrackingHelper.js → MultichainTrackingHelper.mjs} +8 -8
- package/dist/helpers/MultichainTrackingHelper.mjs.map +1 -0
- package/dist/helpers/PendingTransactionTracker.cjs +407 -0
- package/dist/helpers/PendingTransactionTracker.cjs.map +1 -0
- package/dist/helpers/{PendingTransactionTracker.d.ts → PendingTransactionTracker.d.cts} +8 -5
- package/dist/helpers/PendingTransactionTracker.d.cts.map +1 -0
- package/dist/helpers/PendingTransactionTracker.d.mts +54 -0
- package/dist/helpers/PendingTransactionTracker.d.mts.map +1 -0
- package/dist/helpers/{PendingTransactionTracker.js → PendingTransactionTracker.mjs} +15 -14
- package/dist/helpers/PendingTransactionTracker.mjs.map +1 -0
- package/dist/helpers/ResimulateHelper.cjs +274 -0
- package/dist/helpers/ResimulateHelper.cjs.map +1 -0
- package/dist/helpers/{ResimulateHelper.d.ts → ResimulateHelper.d.cts} +3 -3
- package/dist/helpers/ResimulateHelper.d.cts.map +1 -0
- package/dist/helpers/ResimulateHelper.d.mts +36 -0
- package/dist/helpers/ResimulateHelper.d.mts.map +1 -0
- package/dist/helpers/{ResimulateHelper.js → ResimulateHelper.mjs} +8 -7
- package/dist/helpers/ResimulateHelper.mjs.map +1 -0
- package/dist/helpers/TransactionPoller.cjs +175 -0
- package/dist/helpers/TransactionPoller.cjs.map +1 -0
- package/dist/helpers/{TransactionPoller.d.ts → TransactionPoller.d.cts} +5 -5
- package/dist/helpers/TransactionPoller.d.cts.map +1 -0
- package/dist/helpers/TransactionPoller.d.mts +37 -0
- package/dist/helpers/TransactionPoller.d.mts.map +1 -0
- package/dist/helpers/{TransactionPoller.js → TransactionPoller.mjs} +11 -10
- package/dist/helpers/TransactionPoller.mjs.map +1 -0
- package/dist/hooks/CollectPublishHook.cjs +94 -0
- package/dist/hooks/CollectPublishHook.cjs.map +1 -0
- package/dist/hooks/{CollectPublishHook.d.ts → CollectPublishHook.d.cts} +3 -3
- package/dist/hooks/CollectPublishHook.d.cts.map +1 -0
- package/dist/hooks/CollectPublishHook.d.mts +29 -0
- package/dist/hooks/CollectPublishHook.d.mts.map +1 -0
- package/dist/hooks/{CollectPublishHook.js → CollectPublishHook.mjs} +5 -4
- package/dist/hooks/CollectPublishHook.mjs.map +1 -0
- package/dist/hooks/ExtraTransactionsPublishHook.cjs +126 -0
- package/dist/hooks/ExtraTransactionsPublishHook.cjs.map +1 -0
- package/dist/hooks/{ExtraTransactionsPublishHook.d.ts → ExtraTransactionsPublishHook.d.cts} +3 -3
- package/dist/hooks/ExtraTransactionsPublishHook.d.cts.map +1 -0
- package/dist/hooks/ExtraTransactionsPublishHook.d.mts +19 -0
- package/dist/hooks/ExtraTransactionsPublishHook.d.mts.map +1 -0
- package/dist/hooks/{ExtraTransactionsPublishHook.js → ExtraTransactionsPublishHook.mjs} +3 -3
- package/dist/hooks/ExtraTransactionsPublishHook.mjs.map +1 -0
- package/dist/hooks/SequentialPublishBatchHook.cjs +112 -0
- package/dist/hooks/SequentialPublishBatchHook.cjs.map +1 -0
- package/dist/hooks/{SequentialPublishBatchHook.d.ts → SequentialPublishBatchHook.d.cts} +4 -4
- package/dist/hooks/SequentialPublishBatchHook.d.cts.map +1 -0
- package/dist/hooks/SequentialPublishBatchHook.d.mts +22 -0
- package/dist/hooks/SequentialPublishBatchHook.d.mts.map +1 -0
- package/dist/hooks/{SequentialPublishBatchHook.js → SequentialPublishBatchHook.mjs} +4 -4
- package/dist/hooks/SequentialPublishBatchHook.mjs.map +1 -0
- package/dist/index.cjs +40 -0
- package/dist/index.cjs.map +1 -0
- package/dist/{index.d.ts → index.d.cts} +16 -16
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +16 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +12 -0
- package/dist/index.mjs.map +1 -0
- package/dist/logger.cjs +9 -0
- package/dist/logger.cjs.map +1 -0
- package/dist/{logger.d.ts → logger.d.cts} +3 -2
- package/dist/logger.d.cts.map +1 -0
- package/dist/logger.d.mts +6 -0
- package/dist/logger.d.mts.map +1 -0
- package/dist/{logger.js → logger.mjs} +2 -2
- package/dist/logger.mjs.map +1 -0
- package/dist/types.cjs +382 -0
- package/dist/types.cjs.map +1 -0
- package/dist/{types.d.ts → types.d.cts} +8 -8
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.mts +1887 -0
- package/dist/types.d.mts.map +1 -0
- package/dist/{types.js → types.mjs} +1 -1
- package/dist/types.mjs.map +1 -0
- package/dist/utils/balance-changes.cjs +592 -0
- package/dist/utils/balance-changes.cjs.map +1 -0
- package/dist/utils/{balance-changes.d.ts → balance-changes.d.cts} +5 -5
- package/dist/utils/balance-changes.d.cts.map +1 -0
- package/dist/utils/balance-changes.d.mts +38 -0
- package/dist/utils/balance-changes.d.mts.map +1 -0
- package/dist/utils/{balance-changes.js → balance-changes.mjs} +20 -13
- package/dist/utils/balance-changes.mjs.map +1 -0
- package/dist/utils/balance.cjs +44 -0
- package/dist/utils/balance.cjs.map +1 -0
- package/dist/utils/{balance.d.ts → balance.d.cts} +5 -5
- package/dist/utils/balance.d.cts.map +1 -0
- package/dist/utils/balance.d.mts +26 -0
- package/dist/utils/balance.d.mts.map +1 -0
- package/dist/utils/{balance.js → balance.mjs} +3 -3
- package/dist/utils/balance.mjs.map +1 -0
- package/dist/utils/batch.cjs +712 -0
- package/dist/utils/batch.cjs.map +1 -0
- package/dist/utils/{batch.d.ts → batch.d.cts} +8 -8
- package/dist/utils/batch.d.cts.map +1 -0
- package/dist/utils/batch.d.mts +58 -0
- package/dist/utils/batch.d.mts.map +1 -0
- package/dist/utils/{batch.js → batch.mjs} +18 -18
- package/dist/utils/batch.mjs.map +1 -0
- package/dist/utils/eip7702.cjs +354 -0
- package/dist/utils/eip7702.cjs.map +1 -0
- package/dist/utils/{eip7702.d.ts → eip7702.d.cts} +5 -5
- package/dist/utils/eip7702.d.cts.map +1 -0
- package/dist/utils/eip7702.d.mts +137 -0
- package/dist/utils/eip7702.d.mts.map +1 -0
- package/dist/utils/{eip7702.js → eip7702.mjs} +12 -12
- package/dist/utils/eip7702.mjs.map +1 -0
- package/dist/utils/external-transactions.cjs +36 -0
- package/dist/utils/external-transactions.cjs.map +1 -0
- package/dist/utils/{external-transactions.d.ts → external-transactions.d.cts} +2 -2
- package/dist/utils/external-transactions.d.cts.map +1 -0
- package/dist/utils/external-transactions.d.mts +10 -0
- package/dist/utils/external-transactions.d.mts.map +1 -0
- package/dist/utils/{external-transactions.js → external-transactions.mjs} +3 -3
- package/dist/utils/external-transactions.mjs.map +1 -0
- package/dist/utils/feature-flags.cjs +255 -0
- package/dist/utils/feature-flags.cjs.map +1 -0
- package/dist/utils/{feature-flags.d.ts → feature-flags.d.cts} +3 -3
- package/dist/utils/feature-flags.d.cts.map +1 -0
- package/dist/utils/feature-flags.d.mts +313 -0
- package/dist/utils/feature-flags.d.mts.map +1 -0
- package/dist/utils/{feature-flags.js → feature-flags.mjs} +5 -5
- package/dist/utils/feature-flags.mjs.map +1 -0
- package/dist/utils/first-time-interaction.cjs +69 -0
- package/dist/utils/first-time-interaction.cjs.map +1 -0
- package/dist/utils/{first-time-interaction.d.ts → first-time-interaction.d.cts} +3 -3
- package/dist/utils/first-time-interaction.d.cts.map +1 -0
- package/dist/utils/first-time-interaction.d.mts +30 -0
- package/dist/utils/first-time-interaction.d.mts.map +1 -0
- package/dist/utils/{first-time-interaction.js → first-time-interaction.mjs} +6 -6
- package/dist/utils/first-time-interaction.mjs.map +1 -0
- package/dist/utils/gas-fee-tokens.cjs +174 -0
- package/dist/utils/gas-fee-tokens.cjs.map +1 -0
- package/dist/utils/{gas-fee-tokens.d.ts → gas-fee-tokens.d.cts} +5 -5
- package/dist/utils/gas-fee-tokens.d.cts.map +1 -0
- package/dist/utils/gas-fee-tokens.d.mts +46 -0
- package/dist/utils/gas-fee-tokens.d.mts.map +1 -0
- package/dist/utils/{gas-fee-tokens.js → gas-fee-tokens.mjs} +9 -9
- package/dist/utils/gas-fee-tokens.mjs.map +1 -0
- package/dist/utils/gas-fees.cjs +424 -0
- package/dist/utils/gas-fees.cjs.map +1 -0
- package/dist/utils/{gas-fees.d.ts → gas-fees.d.cts} +5 -5
- package/dist/utils/gas-fees.d.cts.map +1 -0
- package/dist/utils/gas-fees.d.mts +57 -0
- package/dist/utils/gas-fees.d.mts.map +1 -0
- package/dist/utils/{gas-fees.js → gas-fees.mjs} +9 -9
- package/dist/utils/gas-fees.mjs.map +1 -0
- package/dist/utils/gas-flow.cjs +81 -0
- package/dist/utils/gas-flow.cjs.map +1 -0
- package/dist/utils/{gas-flow.d.ts → gas-flow.d.cts} +6 -6
- package/dist/utils/gas-flow.d.cts.map +1 -0
- package/dist/utils/gas-flow.d.mts +29 -0
- package/dist/utils/gas-flow.d.mts.map +1 -0
- package/dist/utils/{gas-flow.js → gas-flow.mjs} +3 -3
- package/dist/utils/gas-flow.mjs.map +1 -0
- package/dist/utils/gas.cjs +545 -0
- package/dist/utils/gas.cjs.map +1 -0
- package/dist/utils/{gas.d.ts → gas.d.cts} +6 -5
- package/dist/utils/gas.d.cts.map +1 -0
- package/dist/utils/gas.d.mts +116 -0
- package/dist/utils/gas.d.mts.map +1 -0
- package/dist/utils/{gas.js → gas.mjs} +11 -11
- package/dist/utils/gas.mjs.map +1 -0
- package/dist/utils/layer1-gas-fee-flow.cjs +73 -0
- package/dist/utils/layer1-gas-fee-flow.cjs.map +1 -0
- package/dist/utils/{layer1-gas-fee-flow.d.ts → layer1-gas-fee-flow.d.cts} +4 -4
- package/dist/utils/layer1-gas-fee-flow.d.cts.map +1 -0
- package/dist/utils/layer1-gas-fee-flow.d.mts +28 -0
- package/dist/utils/layer1-gas-fee-flow.d.mts.map +1 -0
- package/dist/utils/{layer1-gas-fee-flow.js → layer1-gas-fee-flow.mjs} +3 -3
- package/dist/utils/layer1-gas-fee-flow.mjs.map +1 -0
- package/dist/utils/nonce.cjs +93 -0
- package/dist/utils/nonce.cjs.map +1 -0
- package/dist/utils/{nonce.d.ts → nonce.d.cts} +3 -3
- package/dist/utils/nonce.d.cts.map +1 -0
- package/dist/utils/nonce.d.mts +26 -0
- package/dist/utils/nonce.d.mts.map +1 -0
- package/dist/utils/{nonce.js → nonce.mjs} +4 -4
- package/dist/utils/nonce.mjs.map +1 -0
- package/dist/utils/prepare.cjs +97 -0
- package/dist/utils/prepare.cjs.map +1 -0
- package/dist/utils/{prepare.d.ts → prepare.d.cts} +5 -5
- package/dist/utils/prepare.d.cts.map +1 -0
- package/dist/utils/prepare.d.mts +22 -0
- package/dist/utils/prepare.d.mts.map +1 -0
- package/dist/utils/{prepare.js → prepare.mjs} +6 -5
- package/dist/utils/prepare.mjs.map +1 -0
- package/dist/utils/provider.cjs +106 -0
- package/dist/utils/provider.cjs.map +1 -0
- package/dist/utils/{provider.d.ts → provider.d.cts} +4 -4
- package/dist/utils/provider.d.cts.map +1 -0
- package/dist/utils/provider.d.mts +65 -0
- package/dist/utils/provider.d.mts.map +1 -0
- package/dist/utils/{provider.js → provider.mjs} +3 -3
- package/dist/utils/provider.mjs.map +1 -0
- package/dist/utils/recipient.cjs +31 -0
- package/dist/utils/recipient.cjs.map +1 -0
- package/dist/utils/{recipient.d.ts → recipient.d.cts} +2 -2
- package/dist/utils/recipient.d.cts.map +1 -0
- package/dist/utils/recipient.d.mts +13 -0
- package/dist/utils/recipient.d.mts.map +1 -0
- package/dist/utils/{recipient.js → recipient.mjs} +3 -3
- package/dist/utils/recipient.mjs.map +1 -0
- package/dist/utils/retry.cjs +93 -0
- package/dist/utils/retry.cjs.map +1 -0
- package/dist/utils/{retry.d.ts → retry.d.cts} +2 -2
- package/dist/utils/retry.d.cts.map +1 -0
- package/dist/utils/retry.d.mts +11 -0
- package/dist/utils/retry.d.mts.map +1 -0
- package/dist/utils/{retry.js → retry.mjs} +3 -3
- package/dist/utils/retry.mjs.map +1 -0
- package/dist/utils/revert-reason.cjs +192 -0
- package/dist/utils/revert-reason.cjs.map +1 -0
- package/dist/utils/{revert-reason.d.ts → revert-reason.d.cts} +5 -5
- package/dist/utils/revert-reason.d.cts.map +1 -0
- package/dist/utils/revert-reason.d.mts +57 -0
- package/dist/utils/revert-reason.d.mts.map +1 -0
- package/dist/utils/{revert-reason.js → revert-reason.mjs} +4 -4
- package/dist/utils/revert-reason.mjs.map +1 -0
- package/dist/utils/signature.cjs +26 -0
- package/dist/utils/signature.cjs.map +1 -0
- package/dist/utils/{signature.d.ts → signature.d.cts} +2 -2
- package/dist/utils/signature.d.cts.map +1 -0
- package/dist/utils/signature.d.mts +11 -0
- package/dist/utils/signature.d.mts.map +1 -0
- package/dist/utils/{signature.js → signature.mjs} +3 -3
- package/dist/utils/signature.mjs.map +1 -0
- package/dist/utils/swaps.cjs +332 -0
- package/dist/utils/swaps.cjs.map +1 -0
- package/dist/utils/{swaps.d.ts → swaps.d.cts} +5 -5
- package/dist/utils/swaps.d.cts.map +1 -0
- package/dist/utils/swaps.d.mts +90 -0
- package/dist/utils/swaps.d.mts.map +1 -0
- package/dist/utils/{swaps.js → swaps.mjs} +8 -7
- package/dist/utils/swaps.mjs.map +1 -0
- package/dist/utils/transaction-type.cjs +159 -0
- package/dist/utils/transaction-type.cjs.map +1 -0
- package/dist/utils/{transaction-type.d.ts → transaction-type.d.cts} +6 -6
- package/dist/utils/transaction-type.d.cts.map +1 -0
- package/dist/utils/transaction-type.d.mts +44 -0
- package/dist/utils/transaction-type.d.mts.map +1 -0
- package/dist/utils/{transaction-type.js → transaction-type.mjs} +6 -6
- package/dist/utils/transaction-type.mjs.map +1 -0
- package/dist/utils/utils.cjs +287 -0
- package/dist/utils/utils.cjs.map +1 -0
- package/dist/utils/{utils.d.ts → utils.d.cts} +4 -4
- package/dist/utils/utils.d.cts.map +1 -0
- package/dist/utils/utils.d.mts +101 -0
- package/dist/utils/utils.d.mts.map +1 -0
- package/dist/utils/{utils.js → utils.mjs} +12 -5
- package/dist/utils/utils.mjs.map +1 -0
- package/dist/utils/validation.cjs +389 -0
- package/dist/utils/validation.cjs.map +1 -0
- package/dist/utils/{validation.d.ts → validation.d.cts} +4 -4
- package/dist/utils/validation.d.cts.map +1 -0
- package/dist/utils/validation.d.mts +66 -0
- package/dist/utils/validation.d.mts.map +1 -0
- package/dist/utils/{validation.js → validation.mjs} +8 -8
- package/dist/utils/validation.mjs.map +1 -0
- package/package.json +19 -15
- package/dist/TransactionController-method-action-types.d.ts.map +0 -1
- package/dist/TransactionController-method-action-types.js.map +0 -1
- package/dist/TransactionController.d.ts.map +0 -1
- package/dist/TransactionController.js.map +0 -1
- package/dist/api/accounts-api.d.ts.map +0 -1
- package/dist/api/accounts-api.js.map +0 -1
- package/dist/api/simulation-api.d.ts.map +0 -1
- package/dist/api/simulation-api.js.map +0 -1
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/gas-flows/DefaultGasFeeFlow.d.ts.map +0 -1
- package/dist/gas-flows/LineaGasFeeFlow.d.ts.map +0 -1
- package/dist/gas-flows/LineaGasFeeFlow.js.map +0 -1
- package/dist/gas-flows/MantleLayer1GasFeeFlow.d.ts.map +0 -1
- package/dist/gas-flows/MantleLayer1GasFeeFlow.js.map +0 -1
- package/dist/gas-flows/OptimismLayer1GasFeeFlow.d.ts.map +0 -1
- package/dist/gas-flows/OptimismLayer1GasFeeFlow.js.map +0 -1
- package/dist/gas-flows/OracleLayer1GasFeeFlow.d.ts.map +0 -1
- package/dist/gas-flows/OracleLayer1GasFeeFlow.js.map +0 -1
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.d.ts.map +0 -1
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.js.map +0 -1
- package/dist/gas-flows/ScrollLayer1GasFeeFlow.d.ts.map +0 -1
- package/dist/gas-flows/ScrollLayer1GasFeeFlow.js.map +0 -1
- package/dist/gas-flows/TestGasFeeFlow.d.ts.map +0 -1
- package/dist/gas-flows/TestGasFeeFlow.js.map +0 -1
- package/dist/helpers/GasFeePoller.d.ts.map +0 -1
- package/dist/helpers/GasFeePoller.js.map +0 -1
- package/dist/helpers/MethodDataHelper.d.ts.map +0 -1
- package/dist/helpers/MethodDataHelper.js.map +0 -1
- package/dist/helpers/MultichainTrackingHelper.d.ts.map +0 -1
- package/dist/helpers/MultichainTrackingHelper.js.map +0 -1
- package/dist/helpers/PendingTransactionTracker.d.ts.map +0 -1
- package/dist/helpers/PendingTransactionTracker.js.map +0 -1
- package/dist/helpers/ResimulateHelper.d.ts.map +0 -1
- package/dist/helpers/ResimulateHelper.js.map +0 -1
- package/dist/helpers/TransactionPoller.d.ts.map +0 -1
- package/dist/helpers/TransactionPoller.js.map +0 -1
- package/dist/hooks/CollectPublishHook.d.ts.map +0 -1
- package/dist/hooks/CollectPublishHook.js.map +0 -1
- package/dist/hooks/ExtraTransactionsPublishHook.d.ts.map +0 -1
- package/dist/hooks/ExtraTransactionsPublishHook.js.map +0 -1
- package/dist/hooks/SequentialPublishBatchHook.d.ts.map +0 -1
- package/dist/hooks/SequentialPublishBatchHook.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -12
- package/dist/index.js.map +0 -1
- package/dist/logger.d.ts.map +0 -1
- package/dist/logger.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/utils/balance-changes.d.ts.map +0 -1
- package/dist/utils/balance-changes.js.map +0 -1
- package/dist/utils/balance.d.ts.map +0 -1
- package/dist/utils/balance.js.map +0 -1
- package/dist/utils/batch.d.ts.map +0 -1
- package/dist/utils/batch.js.map +0 -1
- package/dist/utils/eip7702.d.ts.map +0 -1
- package/dist/utils/eip7702.js.map +0 -1
- package/dist/utils/external-transactions.d.ts.map +0 -1
- package/dist/utils/external-transactions.js.map +0 -1
- package/dist/utils/feature-flags.d.ts.map +0 -1
- package/dist/utils/feature-flags.js.map +0 -1
- package/dist/utils/first-time-interaction.d.ts.map +0 -1
- package/dist/utils/first-time-interaction.js.map +0 -1
- package/dist/utils/gas-fee-tokens.d.ts.map +0 -1
- package/dist/utils/gas-fee-tokens.js.map +0 -1
- package/dist/utils/gas-fees.d.ts.map +0 -1
- package/dist/utils/gas-fees.js.map +0 -1
- package/dist/utils/gas-flow.d.ts.map +0 -1
- package/dist/utils/gas-flow.js.map +0 -1
- package/dist/utils/gas.d.ts.map +0 -1
- package/dist/utils/gas.js.map +0 -1
- package/dist/utils/layer1-gas-fee-flow.d.ts.map +0 -1
- package/dist/utils/layer1-gas-fee-flow.js.map +0 -1
- package/dist/utils/nonce.d.ts.map +0 -1
- package/dist/utils/nonce.js.map +0 -1
- package/dist/utils/prepare.d.ts.map +0 -1
- package/dist/utils/prepare.js.map +0 -1
- package/dist/utils/provider.d.ts.map +0 -1
- package/dist/utils/provider.js.map +0 -1
- package/dist/utils/recipient.d.ts.map +0 -1
- package/dist/utils/recipient.js.map +0 -1
- package/dist/utils/retry.d.ts.map +0 -1
- package/dist/utils/retry.js.map +0 -1
- package/dist/utils/revert-reason.d.ts.map +0 -1
- package/dist/utils/revert-reason.js.map +0 -1
- package/dist/utils/signature.d.ts.map +0 -1
- package/dist/utils/signature.js.map +0 -1
- package/dist/utils/swaps.d.ts.map +0 -1
- package/dist/utils/swaps.js.map +0 -1
- package/dist/utils/transaction-type.d.ts.map +0 -1
- package/dist/utils/transaction-type.js.map +0 -1
- package/dist/utils/utils.d.ts.map +0 -1
- package/dist/utils/utils.js.map +0 -1
- package/dist/utils/validation.d.ts.map +0 -1
- package/dist/utils/validation.js.map +0 -1
|
@@ -0,0 +1,751 @@
|
|
|
1
|
+
import type { AccountsControllerGetSelectedAccountAction, AccountsControllerGetStateAction, AccountsControllerSelectedAccountChangeEvent } from "@metamask/accounts-controller";
|
|
2
|
+
import type { ApprovalControllerAddRequestAction } from "@metamask/approval-controller";
|
|
3
|
+
import type { ControllerGetStateAction, ControllerStateChangeEvent } from "@metamask/base-controller";
|
|
4
|
+
import { BaseController } from "@metamask/base-controller";
|
|
5
|
+
import type { TraceCallback } from "@metamask/controller-utils";
|
|
6
|
+
import type { AccountActivityServiceStatusChangedEvent, AccountActivityServiceTransactionUpdatedEvent, BackendWebSocketServiceConnectionStateChangedEvent } from "@metamask/core-backend";
|
|
7
|
+
import type { GasFeeControllerFetchGasFeeEstimatesAction } from "@metamask/gas-fee-controller";
|
|
8
|
+
import type { KeyringControllerGetStateAction, KeyringControllerSignEip7702AuthorizationAction, KeyringControllerSignTransactionAction } from "@metamask/keyring-controller";
|
|
9
|
+
import type { Messenger } from "@metamask/messenger";
|
|
10
|
+
import type { NetworkClientId, NetworkControllerStateChangeEvent, NetworkControllerFindNetworkClientIdByChainIdAction, NetworkControllerGetNetworkClientByIdAction, NetworkControllerGetNetworkClientRegistryAction, NetworkControllerGetStateAction, NetworkControllerGetEIP1559CompatibilityAction } from "@metamask/network-controller";
|
|
11
|
+
import type { NonceLock } from "@metamask/nonce-tracker";
|
|
12
|
+
import type { RemoteFeatureFlagControllerGetStateAction } from "@metamask/remote-feature-flag-controller";
|
|
13
|
+
import type { Hex } from "@metamask/utils";
|
|
14
|
+
import type { TransactionControllerMethodActions } from "./TransactionController-method-action-types.mjs";
|
|
15
|
+
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.mjs";
|
|
16
|
+
import { TransactionContainerType } from "./types.mjs";
|
|
17
|
+
import type { EstimateGasBatchResult } from "./utils/gas.mjs";
|
|
18
|
+
/**
|
|
19
|
+
* Object with new transaction's meta and a promise resolving to the
|
|
20
|
+
* transaction hash if successful.
|
|
21
|
+
*/
|
|
22
|
+
export interface Result {
|
|
23
|
+
/** Promise resolving to a new transaction hash. */
|
|
24
|
+
result: Promise<string>;
|
|
25
|
+
/** Meta information about this new transaction. */
|
|
26
|
+
transactionMeta: TransactionMeta;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Method data registry object
|
|
30
|
+
*/
|
|
31
|
+
export type MethodData = {
|
|
32
|
+
/** Registry method raw string. */
|
|
33
|
+
registryMethod: string;
|
|
34
|
+
/** Registry method object, containing name and method arguments. */
|
|
35
|
+
parsedRegistryMethod: {
|
|
36
|
+
name: string;
|
|
37
|
+
args: {
|
|
38
|
+
type: string;
|
|
39
|
+
}[];
|
|
40
|
+
} | {
|
|
41
|
+
name?: any;
|
|
42
|
+
args?: any;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Transaction controller state
|
|
47
|
+
*/
|
|
48
|
+
export type TransactionControllerState = {
|
|
49
|
+
/** A list of TransactionMeta objects. */
|
|
50
|
+
transactions: TransactionMeta[];
|
|
51
|
+
/** A list of TransactionBatchMeta objects. */
|
|
52
|
+
transactionBatches: TransactionBatchMeta[];
|
|
53
|
+
/** Object containing all known method data information. */
|
|
54
|
+
methodData: Record<string, MethodData>;
|
|
55
|
+
/** Cache to optimise incoming transaction queries. */
|
|
56
|
+
lastFetchedBlockNumbers: {
|
|
57
|
+
[key: string]: number | string;
|
|
58
|
+
};
|
|
59
|
+
/** History of all transactions submitted from the wallet. */
|
|
60
|
+
submitHistory: SubmitHistoryEntry[];
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Multiplier used to determine a transaction's increased gas fee during cancellation
|
|
64
|
+
*/
|
|
65
|
+
export declare const CANCEL_RATE = 1.1;
|
|
66
|
+
/**
|
|
67
|
+
* Multiplier used to determine a transaction's increased gas fee during speed up
|
|
68
|
+
*/
|
|
69
|
+
export declare const SPEED_UP_RATE = 1.1;
|
|
70
|
+
/**
|
|
71
|
+
* Represents the `TransactionController:getState` action.
|
|
72
|
+
*/
|
|
73
|
+
export type TransactionControllerGetStateAction = ControllerGetStateAction<typeof controllerName, TransactionControllerState>;
|
|
74
|
+
/**
|
|
75
|
+
* The internal actions available to the TransactionController.
|
|
76
|
+
*/
|
|
77
|
+
export type TransactionControllerActions = TransactionControllerGetStateAction | TransactionControllerMethodActions;
|
|
78
|
+
/**
|
|
79
|
+
* @deprecated Incoming transaction support has been removed. These options are ignored.
|
|
80
|
+
*/
|
|
81
|
+
export type IncomingTransactionCompatibilityOptions = {
|
|
82
|
+
client?: string;
|
|
83
|
+
includeTokenTransfers?: boolean;
|
|
84
|
+
isEnabled?: () => boolean;
|
|
85
|
+
updateTransactions?: boolean;
|
|
86
|
+
/** @deprecated Ignored as incoming transaction support has been removed. */
|
|
87
|
+
etherscanApiKeysByChainId?: Record<Hex, string>;
|
|
88
|
+
};
|
|
89
|
+
/** TransactionController constructor options. */
|
|
90
|
+
export type TransactionControllerOptions = {
|
|
91
|
+
/** Whether to disable additional processing on swaps transactions. */
|
|
92
|
+
disableSwaps: boolean;
|
|
93
|
+
/** Get accounts that a given origin has permissions for. */
|
|
94
|
+
getPermittedAccounts?: (origin?: string) => Promise<string[]>;
|
|
95
|
+
/** Gets the saved gas fee config. */
|
|
96
|
+
getSavedGasFees?: (transactionMeta: TransactionMeta) => SavedGasFees | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Gets the transaction simulation configuration.
|
|
99
|
+
*/
|
|
100
|
+
getSimulationConfig?: GetSimulationConfig;
|
|
101
|
+
/**
|
|
102
|
+
* @deprecated Incoming transaction support has been removed. This option is ignored.
|
|
103
|
+
*/
|
|
104
|
+
incomingTransactions?: IncomingTransactionCompatibilityOptions;
|
|
105
|
+
/**
|
|
106
|
+
* Callback to determine whether gas fee updates should be enabled for a given transaction.
|
|
107
|
+
* Returns true to enable updates, false to disable them.
|
|
108
|
+
*/
|
|
109
|
+
isAutomaticGasFeeUpdateEnabled?: (transactionMeta: TransactionMeta) => boolean;
|
|
110
|
+
/** Whether simulation should return EIP-7702 gas fee tokens. */
|
|
111
|
+
isEIP7702GasFeeTokensEnabled?: (transactionMeta: TransactionMeta) => Promise<boolean>;
|
|
112
|
+
/** Whether the first time interaction check is enabled. */
|
|
113
|
+
isFirstTimeInteractionEnabled?: () => boolean;
|
|
114
|
+
/** Whether new transactions will be automatically simulated. */
|
|
115
|
+
isSimulationEnabled?: (transactionMeta?: TransactionMeta) => boolean;
|
|
116
|
+
/** Whether timeout checking is enabled for a transaction. */
|
|
117
|
+
isTimeoutEnabled?: (transactionMeta: TransactionMeta) => boolean;
|
|
118
|
+
/** The controller messenger. */
|
|
119
|
+
messenger: TransactionControllerMessenger;
|
|
120
|
+
/** Public key used to validate EIP-7702 contract signatures in feature flags. */
|
|
121
|
+
publicKeyEIP7702?: Hex;
|
|
122
|
+
/** Initial state to set on this controller. */
|
|
123
|
+
state?: Partial<TransactionControllerState>;
|
|
124
|
+
testGasFeeFlows?: boolean;
|
|
125
|
+
trace?: TraceCallback;
|
|
126
|
+
/** The controller hooks. */
|
|
127
|
+
hooks: {
|
|
128
|
+
/** Additional logic to execute after adding a transaction. */
|
|
129
|
+
afterAdd?: AfterAddHook;
|
|
130
|
+
/**
|
|
131
|
+
* Additional logic to execute before checking pending transactions.
|
|
132
|
+
* Return false to prevent the broadcast of the transaction.
|
|
133
|
+
*/
|
|
134
|
+
beforeCheckPendingTransaction?: (transactionMeta: TransactionMeta) => Promise<boolean>;
|
|
135
|
+
/**
|
|
136
|
+
* Additional logic to execute before publishing a transaction.
|
|
137
|
+
* Return false to prevent the broadcast of the transaction.
|
|
138
|
+
*/
|
|
139
|
+
beforePublish?: (transactionMeta: TransactionMeta) => Promise<boolean>;
|
|
140
|
+
/**
|
|
141
|
+
* Additional logic to execute before signing a transaction.
|
|
142
|
+
*/
|
|
143
|
+
beforeSign?: BeforeSignHook;
|
|
144
|
+
/** Alternate logic to publish a transaction. */
|
|
145
|
+
publish?: (transactionMeta: TransactionMeta) => Promise<{
|
|
146
|
+
transactionHash: string;
|
|
147
|
+
}>;
|
|
148
|
+
publishBatch?: PublishBatchHook;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* The name of the {@link TransactionController}.
|
|
153
|
+
*/
|
|
154
|
+
declare const controllerName = "TransactionController";
|
|
155
|
+
/**
|
|
156
|
+
* The external actions available to the {@link TransactionController}.
|
|
157
|
+
*/
|
|
158
|
+
export type AllowedActions = AccountsControllerGetSelectedAccountAction | AccountsControllerGetStateAction | ApprovalControllerAddRequestAction | GasFeeControllerFetchGasFeeEstimatesAction | KeyringControllerGetStateAction | KeyringControllerSignEip7702AuthorizationAction | KeyringControllerSignTransactionAction | NetworkControllerFindNetworkClientIdByChainIdAction | NetworkControllerGetEIP1559CompatibilityAction | NetworkControllerGetNetworkClientByIdAction | NetworkControllerGetNetworkClientRegistryAction | NetworkControllerGetStateAction | RemoteFeatureFlagControllerGetStateAction;
|
|
159
|
+
/**
|
|
160
|
+
* The external events available to the {@link TransactionController}.
|
|
161
|
+
*/
|
|
162
|
+
export type AllowedEvents = AccountActivityServiceStatusChangedEvent | AccountActivityServiceTransactionUpdatedEvent | AccountsControllerSelectedAccountChangeEvent | BackendWebSocketServiceConnectionStateChangedEvent | NetworkControllerStateChangeEvent;
|
|
163
|
+
/**
|
|
164
|
+
* Represents the `TransactionController:stateChange` event.
|
|
165
|
+
*/
|
|
166
|
+
export type TransactionControllerStateChangeEvent = ControllerStateChangeEvent<typeof controllerName, TransactionControllerState>;
|
|
167
|
+
/**
|
|
168
|
+
* Represents the `TransactionController:postTransactionBalanceUpdated` event.
|
|
169
|
+
*/
|
|
170
|
+
export type TransactionControllerPostTransactionBalanceUpdatedEvent = {
|
|
171
|
+
type: `${typeof controllerName}:postTransactionBalanceUpdated`;
|
|
172
|
+
payload: [
|
|
173
|
+
{
|
|
174
|
+
transactionMeta: TransactionMeta;
|
|
175
|
+
approvalTransactionMeta?: TransactionMeta;
|
|
176
|
+
}
|
|
177
|
+
];
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* Represents the `TransactionController:speedUpTransactionAdded` event.
|
|
181
|
+
*/
|
|
182
|
+
export type TransactionControllerSpeedupTransactionAddedEvent = {
|
|
183
|
+
type: `${typeof controllerName}:speedupTransactionAdded`;
|
|
184
|
+
payload: [transactionMeta: TransactionMeta];
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* Represents the `TransactionController:transactionApproved` event.
|
|
188
|
+
*/
|
|
189
|
+
export type TransactionControllerTransactionApprovedEvent = {
|
|
190
|
+
type: `${typeof controllerName}:transactionApproved`;
|
|
191
|
+
payload: [
|
|
192
|
+
{
|
|
193
|
+
transactionMeta: TransactionMeta;
|
|
194
|
+
actionId?: string;
|
|
195
|
+
}
|
|
196
|
+
];
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* Represents the `TransactionController:transactionConfirmed` event.
|
|
200
|
+
*/
|
|
201
|
+
export type TransactionControllerTransactionConfirmedEvent = {
|
|
202
|
+
type: `${typeof controllerName}:transactionConfirmed`;
|
|
203
|
+
payload: [transactionMeta: TransactionMeta];
|
|
204
|
+
};
|
|
205
|
+
/**
|
|
206
|
+
* Represents the `TransactionController:transactionDropped` event.
|
|
207
|
+
*/
|
|
208
|
+
export type TransactionControllerTransactionDroppedEvent = {
|
|
209
|
+
type: `${typeof controllerName}:transactionDropped`;
|
|
210
|
+
payload: [{
|
|
211
|
+
transactionMeta: TransactionMeta;
|
|
212
|
+
}];
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* Represents the `TransactionController:transactionFailed` event.
|
|
216
|
+
*/
|
|
217
|
+
export type TransactionControllerTransactionFailedEvent = {
|
|
218
|
+
type: `${typeof controllerName}:transactionFailed`;
|
|
219
|
+
payload: [
|
|
220
|
+
{
|
|
221
|
+
actionId?: string;
|
|
222
|
+
error: string;
|
|
223
|
+
transactionMeta: TransactionMeta;
|
|
224
|
+
}
|
|
225
|
+
];
|
|
226
|
+
};
|
|
227
|
+
/**
|
|
228
|
+
* Represents the `TransactionController:transactionFinished` event.
|
|
229
|
+
*/
|
|
230
|
+
export type TransactionControllerTransactionFinishedEvent = {
|
|
231
|
+
type: `${typeof controllerName}:transactionFinished`;
|
|
232
|
+
payload: [transactionMeta: TransactionMeta];
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* Represents the `TransactionController:transactionNewSwapApproval` event.
|
|
236
|
+
*/
|
|
237
|
+
export type TransactionControllerTransactionNewSwapApprovalEvent = {
|
|
238
|
+
type: `${typeof controllerName}:transactionNewSwapApproval`;
|
|
239
|
+
payload: [{
|
|
240
|
+
transactionMeta: TransactionMeta;
|
|
241
|
+
}];
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* Represents the `TransactionController:transactionNewSwap` event.
|
|
245
|
+
*/
|
|
246
|
+
export type TransactionControllerTransactionNewSwapEvent = {
|
|
247
|
+
type: `${typeof controllerName}:transactionNewSwap`;
|
|
248
|
+
payload: [{
|
|
249
|
+
transactionMeta: TransactionMeta;
|
|
250
|
+
}];
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* Represents the `TransactionController:transactionNewSwapApproval` event.
|
|
254
|
+
*/
|
|
255
|
+
export type TransactionControllerTransactionNewSwapAndSendEvent = {
|
|
256
|
+
type: `${typeof controllerName}:transactionNewSwapAndSend`;
|
|
257
|
+
payload: [{
|
|
258
|
+
transactionMeta: TransactionMeta;
|
|
259
|
+
}];
|
|
260
|
+
};
|
|
261
|
+
/**
|
|
262
|
+
* Represents the `TransactionController:transactionPublishingSkipped` event.
|
|
263
|
+
*/
|
|
264
|
+
export type TransactionControllerTransactionPublishingSkipped = {
|
|
265
|
+
type: `${typeof controllerName}:transactionPublishingSkipped`;
|
|
266
|
+
payload: [transactionMeta: TransactionMeta];
|
|
267
|
+
};
|
|
268
|
+
/**
|
|
269
|
+
* Represents the `TransactionController:transactionRejected` event.
|
|
270
|
+
*/
|
|
271
|
+
export type TransactionControllerTransactionRejectedEvent = {
|
|
272
|
+
type: `${typeof controllerName}:transactionRejected`;
|
|
273
|
+
payload: [
|
|
274
|
+
{
|
|
275
|
+
transactionMeta: TransactionMeta;
|
|
276
|
+
actionId?: string;
|
|
277
|
+
}
|
|
278
|
+
];
|
|
279
|
+
};
|
|
280
|
+
/**
|
|
281
|
+
* Represents the `TransactionController:transactionStatusUpdated` event.
|
|
282
|
+
*/
|
|
283
|
+
export type TransactionControllerTransactionStatusUpdatedEvent = {
|
|
284
|
+
type: `${typeof controllerName}:transactionStatusUpdated`;
|
|
285
|
+
payload: [
|
|
286
|
+
{
|
|
287
|
+
transactionMeta: TransactionMeta;
|
|
288
|
+
}
|
|
289
|
+
];
|
|
290
|
+
};
|
|
291
|
+
/**
|
|
292
|
+
* Represents the `TransactionController:transactionSubmitted` event.
|
|
293
|
+
*/
|
|
294
|
+
export type TransactionControllerTransactionSubmittedEvent = {
|
|
295
|
+
type: `${typeof controllerName}:transactionSubmitted`;
|
|
296
|
+
payload: [
|
|
297
|
+
{
|
|
298
|
+
transactionMeta: TransactionMeta;
|
|
299
|
+
actionId?: string;
|
|
300
|
+
}
|
|
301
|
+
];
|
|
302
|
+
};
|
|
303
|
+
/**
|
|
304
|
+
* Represents the `TransactionController:unapprovedTransactionAdded` event.
|
|
305
|
+
*/
|
|
306
|
+
export type TransactionControllerUnapprovedTransactionAddedEvent = {
|
|
307
|
+
type: `${typeof controllerName}:unapprovedTransactionAdded`;
|
|
308
|
+
payload: [transactionMeta: TransactionMeta];
|
|
309
|
+
};
|
|
310
|
+
/**
|
|
311
|
+
* The internal events available to the {@link TransactionController}.
|
|
312
|
+
*/
|
|
313
|
+
export type TransactionControllerEvents = TransactionControllerPostTransactionBalanceUpdatedEvent | TransactionControllerSpeedupTransactionAddedEvent | TransactionControllerStateChangeEvent | TransactionControllerTransactionApprovedEvent | TransactionControllerTransactionConfirmedEvent | TransactionControllerTransactionDroppedEvent | TransactionControllerTransactionFailedEvent | TransactionControllerTransactionFinishedEvent | TransactionControllerTransactionNewSwapApprovalEvent | TransactionControllerTransactionNewSwapEvent | TransactionControllerTransactionNewSwapAndSendEvent | TransactionControllerTransactionPublishingSkipped | TransactionControllerTransactionRejectedEvent | TransactionControllerTransactionStatusUpdatedEvent | TransactionControllerTransactionSubmittedEvent | TransactionControllerUnapprovedTransactionAddedEvent;
|
|
314
|
+
/**
|
|
315
|
+
* The messenger of the {@link TransactionController}.
|
|
316
|
+
*/
|
|
317
|
+
export type TransactionControllerMessenger = Messenger<typeof controllerName, TransactionControllerActions | AllowedActions, TransactionControllerEvents | AllowedEvents>;
|
|
318
|
+
/**
|
|
319
|
+
* Possible states of the approve transaction step.
|
|
320
|
+
*/
|
|
321
|
+
export declare enum ApprovalState {
|
|
322
|
+
Approved = "approved",
|
|
323
|
+
NotApproved = "not-approved",
|
|
324
|
+
SkippedViaBeforePublishHook = "skipped-via-before-publish-hook"
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Controller responsible for submitting and managing transactions.
|
|
328
|
+
*/
|
|
329
|
+
export declare class TransactionController extends BaseController<typeof controllerName, TransactionControllerState, TransactionControllerMessenger> {
|
|
330
|
+
#private;
|
|
331
|
+
/**
|
|
332
|
+
* Constructs a TransactionController.
|
|
333
|
+
*
|
|
334
|
+
* @param options - The controller options.
|
|
335
|
+
*/
|
|
336
|
+
constructor(options: TransactionControllerOptions);
|
|
337
|
+
/**
|
|
338
|
+
* Stops polling and removes listeners to prepare the controller for garbage collection.
|
|
339
|
+
*/
|
|
340
|
+
destroy(): void;
|
|
341
|
+
/**
|
|
342
|
+
* @deprecated Incoming transaction support has been removed. This method is retained as a no-op for backwards compatibility.
|
|
343
|
+
*/
|
|
344
|
+
startIncomingTransactionPolling(): void;
|
|
345
|
+
/**
|
|
346
|
+
* @deprecated Incoming transaction support has been removed. This method is retained as a no-op for backwards compatibility.
|
|
347
|
+
*/
|
|
348
|
+
stopIncomingTransactionPolling(): void;
|
|
349
|
+
/**
|
|
350
|
+
* Handle new method data request.
|
|
351
|
+
*
|
|
352
|
+
* @param fourBytePrefix - The method prefix.
|
|
353
|
+
* @param networkClientId - The ID of the network client used to fetch the method data.
|
|
354
|
+
* @returns The method data object corresponding to the given signature prefix.
|
|
355
|
+
*/
|
|
356
|
+
handleMethodData(fourBytePrefix: string, networkClientId: NetworkClientId): Promise<MethodData>;
|
|
357
|
+
/**
|
|
358
|
+
* Add a batch of transactions to be submitted after approval.
|
|
359
|
+
*
|
|
360
|
+
* @param request - Request object containing the transactions to add.
|
|
361
|
+
* @returns Result object containing the generated batch ID.
|
|
362
|
+
*/
|
|
363
|
+
addTransactionBatch(request: TransactionBatchRequest): Promise<TransactionBatchResult>;
|
|
364
|
+
/**
|
|
365
|
+
* Determine which chains support atomic batch transactions with the given account address.
|
|
366
|
+
*
|
|
367
|
+
* @param request - Request object containing the account address and other parameters.
|
|
368
|
+
* @returns Result object containing the supported chains and related information.
|
|
369
|
+
*/
|
|
370
|
+
isAtomicBatchSupported(request: IsAtomicBatchSupportedRequest): Promise<IsAtomicBatchSupportedResult>;
|
|
371
|
+
/**
|
|
372
|
+
* Add a new unapproved transaction to state. Parameters will be validated, a
|
|
373
|
+
* unique transaction ID will be generated, and `gas` and `gasPrice` will be calculated
|
|
374
|
+
* if not provided. A `<tx.id>:unapproved` hub event will be emitted once added.
|
|
375
|
+
*
|
|
376
|
+
* @param txParams - Standard parameters for an Ethereum transaction.
|
|
377
|
+
* @param options - Additional options to control how the transaction is added.
|
|
378
|
+
* @returns Object containing a promise resolving to the transaction hash if approved.
|
|
379
|
+
*/
|
|
380
|
+
addTransaction(txParams: TransactionParams, options: AddTransactionOptions): Promise<Result>;
|
|
381
|
+
/**
|
|
382
|
+
* Attempts to cancel a transaction based on its ID by setting its status to "rejected"
|
|
383
|
+
* and emitting a `<tx.id>:finished` hub event.
|
|
384
|
+
*
|
|
385
|
+
* @param transactionId - The ID of the transaction to cancel.
|
|
386
|
+
* @param gasValues - The gas values to use for the cancellation transaction.
|
|
387
|
+
* @param options - The options for the cancellation transaction.
|
|
388
|
+
* @param options.actionId - Unique ID persisted on transaction metadata.
|
|
389
|
+
* @param options.estimatedBaseFee - The estimated base fee of the transaction.
|
|
390
|
+
*/
|
|
391
|
+
stopTransaction(transactionId: string, gasValues?: GasPriceValue | FeeMarketEIP1559Values, { estimatedBaseFee, actionId, }?: {
|
|
392
|
+
estimatedBaseFee?: string;
|
|
393
|
+
actionId?: string;
|
|
394
|
+
}): Promise<void>;
|
|
395
|
+
/**
|
|
396
|
+
* Attempts to speed up a transaction increasing transaction gasPrice by ten percent.
|
|
397
|
+
*
|
|
398
|
+
* @param transactionId - The ID of the transaction to speed up.
|
|
399
|
+
* @param gasValues - The gas values to use for the speed up transaction.
|
|
400
|
+
* @param options - The options for the speed up transaction.
|
|
401
|
+
* @param options.actionId - Unique ID persisted on transaction metadata.
|
|
402
|
+
* @param options.estimatedBaseFee - The estimated base fee of the transaction.
|
|
403
|
+
*/
|
|
404
|
+
speedUpTransaction(transactionId: string, gasValues?: GasPriceValue | FeeMarketEIP1559Values, { actionId, estimatedBaseFee, }?: {
|
|
405
|
+
actionId?: string;
|
|
406
|
+
estimatedBaseFee?: string;
|
|
407
|
+
}): Promise<void>;
|
|
408
|
+
/**
|
|
409
|
+
* Estimates required gas for a given transaction.
|
|
410
|
+
*
|
|
411
|
+
* @param transaction - The transaction to estimate gas for.
|
|
412
|
+
* @param networkClientId - The network client id to use for the estimate.
|
|
413
|
+
* @param options - Additional options for the estimate.
|
|
414
|
+
* @param options.ignoreDelegationSignatures - Ignore signature errors if submitting delegations to the DelegationManager.
|
|
415
|
+
* @returns The gas and gas price.
|
|
416
|
+
*/
|
|
417
|
+
estimateGas(transaction: TransactionParams, networkClientId: NetworkClientId, { ignoreDelegationSignatures, }?: {
|
|
418
|
+
ignoreDelegationSignatures?: boolean;
|
|
419
|
+
}): Promise<{
|
|
420
|
+
gas: string;
|
|
421
|
+
simulationFails: TransactionMeta['simulationFails'];
|
|
422
|
+
}>;
|
|
423
|
+
/**
|
|
424
|
+
* Estimates required gas for a batch of transactions.
|
|
425
|
+
*
|
|
426
|
+
* @param request - Request object.
|
|
427
|
+
* @param request.chainId - Chain ID of the transactions.
|
|
428
|
+
* @param request.from - Address of the sender.
|
|
429
|
+
* @param request.transactions - Array of transactions within a batch request.
|
|
430
|
+
* @returns Object containing the gas limit.
|
|
431
|
+
*/
|
|
432
|
+
estimateGasBatch({ chainId, from, transactions, }: {
|
|
433
|
+
chainId: Hex;
|
|
434
|
+
from: Hex;
|
|
435
|
+
transactions: BatchTransactionParams[];
|
|
436
|
+
}): Promise<EstimateGasBatchResult>;
|
|
437
|
+
/**
|
|
438
|
+
* Estimates required gas for a given transaction and add additional gas buffer with the given multiplier.
|
|
439
|
+
*
|
|
440
|
+
* @param transaction - The transaction params to estimate gas for.
|
|
441
|
+
* @param multiplier - The multiplier to use for the gas buffer.
|
|
442
|
+
* @param networkClientId - The network client id to use for the estimate.
|
|
443
|
+
* @returns The buffered estimated gas and whether the estimation failed.
|
|
444
|
+
*/
|
|
445
|
+
estimateGasBuffered(transaction: TransactionParams, multiplier: number, networkClientId: NetworkClientId): Promise<{
|
|
446
|
+
gas: string;
|
|
447
|
+
simulationFails: TransactionMeta['simulationFails'];
|
|
448
|
+
}>;
|
|
449
|
+
/**
|
|
450
|
+
* Updates an existing transaction in state.
|
|
451
|
+
*
|
|
452
|
+
* @param transactionMeta - The new transaction to store in state.
|
|
453
|
+
* @param note - A note or update reason to be logged.
|
|
454
|
+
*/
|
|
455
|
+
updateTransaction(transactionMeta: TransactionMeta, note: string): void;
|
|
456
|
+
/**
|
|
457
|
+
* Updates transaction metadata.
|
|
458
|
+
*
|
|
459
|
+
* @param options - Update options.
|
|
460
|
+
* @param options.transactionId - ID of the transaction to update.
|
|
461
|
+
* @param options.callback - Function that mutates the transaction metadata.
|
|
462
|
+
* @param options.skipResimulate - Whether to skip automatic re-simulation.
|
|
463
|
+
* @returns The updated transaction metadata.
|
|
464
|
+
*/
|
|
465
|
+
updateTransactionMetadata({ transactionId, callback, skipResimulate, }: {
|
|
466
|
+
transactionId: string;
|
|
467
|
+
callback: (transactionMeta: TransactionMeta) => void;
|
|
468
|
+
skipResimulate?: boolean;
|
|
469
|
+
}): Readonly<TransactionMeta>;
|
|
470
|
+
/**
|
|
471
|
+
* Mark a transaction as failed, transitioning it through the standard failure
|
|
472
|
+
* path.
|
|
473
|
+
*
|
|
474
|
+
* Unlike `updateTransaction`, this emits the transaction lifecycle events
|
|
475
|
+
* (`transactionFailed`, `transactionStatusUpdated`, `transactionFinished`), so
|
|
476
|
+
* downstream subscribers such as the bridge status controller and metrics are
|
|
477
|
+
* notified. Intended for callers that finalize a transaction out-of-band, for
|
|
478
|
+
* example the smart transactions controller when the relay cancels a smart
|
|
479
|
+
* transaction that never landed on chain.
|
|
480
|
+
*
|
|
481
|
+
* @param transactionId - The ID of the transaction to mark as failed.
|
|
482
|
+
* @param error - The error describing why the transaction failed.
|
|
483
|
+
*/
|
|
484
|
+
failTransaction(transactionId: string, error: Error): void;
|
|
485
|
+
/**
|
|
486
|
+
* Update the security alert response for a transaction.
|
|
487
|
+
*
|
|
488
|
+
* @param transactionId - ID of the transaction.
|
|
489
|
+
* @param securityAlertResponse - The new security alert response for the transaction.
|
|
490
|
+
*/
|
|
491
|
+
updateSecurityAlertResponse(transactionId: string, securityAlertResponse: SecurityAlertResponse): void;
|
|
492
|
+
/**
|
|
493
|
+
* Remove transactions from state.
|
|
494
|
+
*
|
|
495
|
+
* @param options - The options bag.
|
|
496
|
+
* @param options.address - Remove transactions from this account only. Defaults to all accounts.
|
|
497
|
+
* @param options.chainId - Remove transactions for the specified chain only. Defaults to all chains.
|
|
498
|
+
*/
|
|
499
|
+
wipeTransactions({ address, chainId, }?: {
|
|
500
|
+
address?: string;
|
|
501
|
+
chainId?: string;
|
|
502
|
+
}): void;
|
|
503
|
+
/**
|
|
504
|
+
* @deprecated No longer used. Kept only to avoid breaking changes. It now performs no operations.
|
|
505
|
+
* @param transactionID - The ID of the transaction to update.
|
|
506
|
+
* @param _currentSendFlowHistoryLength - The length of the current sendFlowHistory array.
|
|
507
|
+
* @param _sendFlowHistoryToAdd - The sendFlowHistory entries to add.
|
|
508
|
+
* @returns The transactionMeta.
|
|
509
|
+
*/
|
|
510
|
+
updateTransactionSendFlowHistory(transactionID: string, _currentSendFlowHistoryLength: number, _sendFlowHistoryToAdd: SendFlowHistoryEntry[]): TransactionMeta;
|
|
511
|
+
/**
|
|
512
|
+
* Adds external provided transaction to state as confirmed transaction.
|
|
513
|
+
*
|
|
514
|
+
* @param transactionMeta - TransactionMeta to add transactions.
|
|
515
|
+
* @param transactionReceipt - TransactionReceipt of the external transaction.
|
|
516
|
+
* @param baseFeePerGas - Base fee per gas of the external transaction.
|
|
517
|
+
*/
|
|
518
|
+
confirmExternalTransaction(transactionMeta: TransactionMeta, transactionReceipt: TransactionReceipt, baseFeePerGas: Hex): Promise<void>;
|
|
519
|
+
/**
|
|
520
|
+
* Update the gas values of a transaction.
|
|
521
|
+
*
|
|
522
|
+
* @param transactionId - The ID of the transaction to update.
|
|
523
|
+
* @param gasValues - Gas values to update.
|
|
524
|
+
* @param gasValues.gas - Same as transaction.gasLimit.
|
|
525
|
+
* @param gasValues.gasLimit - Maxmimum number of units of gas to use for this transaction.
|
|
526
|
+
* @param gasValues.gasPrice - Price per gas for legacy transactions.
|
|
527
|
+
* @param gasValues.maxPriorityFeePerGas - Maximum amount per gas to give to validator as incentive.
|
|
528
|
+
* @param gasValues.maxFeePerGas - Maximum amount per gas to pay for the transaction, including the priority fee.
|
|
529
|
+
* @param gasValues.estimateUsed - Which estimate level was used.
|
|
530
|
+
* @param gasValues.estimateSuggested - Which estimate level that the API suggested.
|
|
531
|
+
* @param gasValues.defaultGasEstimates - The default estimate for gas.
|
|
532
|
+
* @param gasValues.originalGasEstimate - Original estimate for gas.
|
|
533
|
+
* @param gasValues.userEditedGasLimit - The gas limit supplied by user.
|
|
534
|
+
* @param gasValues.userFeeLevel - Estimate level user selected.
|
|
535
|
+
* @returns The updated transactionMeta.
|
|
536
|
+
*/
|
|
537
|
+
updateTransactionGasFees(transactionId: string, { defaultGasEstimates, estimateUsed, estimateSuggested, gas, gasLimit, gasPrice, maxPriorityFeePerGas, maxFeePerGas, originalGasEstimate, userEditedGasLimit, userFeeLevel: userFeeLevelParam, }: {
|
|
538
|
+
defaultGasEstimates?: string;
|
|
539
|
+
estimateUsed?: string;
|
|
540
|
+
estimateSuggested?: string;
|
|
541
|
+
gas?: string;
|
|
542
|
+
gasLimit?: string;
|
|
543
|
+
gasPrice?: string;
|
|
544
|
+
maxPriorityFeePerGas?: string;
|
|
545
|
+
maxFeePerGas?: string;
|
|
546
|
+
originalGasEstimate?: string;
|
|
547
|
+
userEditedGasLimit?: boolean;
|
|
548
|
+
userFeeLevel?: string;
|
|
549
|
+
}): TransactionMeta;
|
|
550
|
+
/**
|
|
551
|
+
* Update the previous gas values of a transaction.
|
|
552
|
+
*
|
|
553
|
+
* @param transactionId - The ID of the transaction to update.
|
|
554
|
+
* @param previousGas - Previous gas values to update.
|
|
555
|
+
* @param previousGas.gasLimit - Maximum number of units of gas to use for this transaction.
|
|
556
|
+
* @param previousGas.maxFeePerGas - Maximum amount per gas to pay for the transaction, including the priority fee.
|
|
557
|
+
* @param previousGas.maxPriorityFeePerGas - Maximum amount per gas to give to validator as incentive.
|
|
558
|
+
* @returns The updated transactionMeta.
|
|
559
|
+
*/
|
|
560
|
+
updatePreviousGasParams(transactionId: string, { gasLimit, maxFeePerGas, maxPriorityFeePerGas, }: {
|
|
561
|
+
gasLimit?: string;
|
|
562
|
+
maxFeePerGas?: string;
|
|
563
|
+
maxPriorityFeePerGas?: string;
|
|
564
|
+
}): TransactionMeta;
|
|
565
|
+
/**
|
|
566
|
+
* Acquires a nonce lock for the given address on the specified network,
|
|
567
|
+
* ensuring that nonces are assigned sequentially without conflicts.
|
|
568
|
+
*
|
|
569
|
+
* @param address - The account address for which to acquire the nonce lock.
|
|
570
|
+
* @param networkClientId - The ID of the network client to use.
|
|
571
|
+
* @returns A promise that resolves to a nonce lock containing the next nonce and a release function.
|
|
572
|
+
*/
|
|
573
|
+
getNonceLock(address: string, networkClientId: NetworkClientId): Promise<NonceLock>;
|
|
574
|
+
/**
|
|
575
|
+
* Updates the editable parameters of a transaction.
|
|
576
|
+
*
|
|
577
|
+
* @param txId - The ID of the transaction to update.
|
|
578
|
+
* @param params - The editable parameters to update.
|
|
579
|
+
* @param params.containerTypes - Container types applied to the parameters.
|
|
580
|
+
* @param params.data - Data to pass with the transaction.
|
|
581
|
+
* @param params.from - Address to send the transaction from.
|
|
582
|
+
* @param params.gas - Maximum number of units of gas to use for the transaction.
|
|
583
|
+
* @param params.gasPrice - Price per gas for legacy transactions.
|
|
584
|
+
* @param params.maxFeePerGas - Maximum amount per gas to pay for the transaction, including the priority fee.
|
|
585
|
+
* @param params.maxPriorityFeePerGas - Maximum amount per gas to give to validator as incentive.
|
|
586
|
+
* @param params.updateType - Whether to update the transaction type. Defaults to `true`.
|
|
587
|
+
* @param params.to - Address to send the transaction to.
|
|
588
|
+
* @param params.value - Value associated with the transaction.
|
|
589
|
+
* @returns The updated transaction metadata.
|
|
590
|
+
*/
|
|
591
|
+
updateEditableParams(txId: string, { containerTypes, data, from, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, to, updateType, value, }: {
|
|
592
|
+
containerTypes?: TransactionContainerType[];
|
|
593
|
+
data?: string;
|
|
594
|
+
from?: string;
|
|
595
|
+
gas?: string;
|
|
596
|
+
gasPrice?: string;
|
|
597
|
+
maxFeePerGas?: string;
|
|
598
|
+
maxPriorityFeePerGas?: string;
|
|
599
|
+
to?: string;
|
|
600
|
+
updateType?: boolean;
|
|
601
|
+
value?: string;
|
|
602
|
+
}): Promise<Readonly<TransactionMeta> | undefined>;
|
|
603
|
+
/**
|
|
604
|
+
* Update the isActive state of a transaction.
|
|
605
|
+
*
|
|
606
|
+
* @param transactionId - The ID of the transaction to update.
|
|
607
|
+
* @param isActive - The active state.
|
|
608
|
+
*/
|
|
609
|
+
setTransactionActive(transactionId: string, isActive: boolean): void;
|
|
610
|
+
/**
|
|
611
|
+
* Signs and returns the raw transaction data for provided transaction params list.
|
|
612
|
+
*
|
|
613
|
+
* @param listOfTxParams - The list of transaction params to approve.
|
|
614
|
+
* @param opts - Options bag.
|
|
615
|
+
* @param opts.hasNonce - Whether the transactions already have a nonce.
|
|
616
|
+
* @returns The raw transactions.
|
|
617
|
+
*/
|
|
618
|
+
approveTransactionsWithSameNonce(listOfTxParams?: (TransactionParams & {
|
|
619
|
+
chainId: Hex;
|
|
620
|
+
})[], { hasNonce }?: {
|
|
621
|
+
hasNonce?: boolean;
|
|
622
|
+
}): Promise<string | string[]>;
|
|
623
|
+
/**
|
|
624
|
+
* Update a custodial transaction.
|
|
625
|
+
*
|
|
626
|
+
* @param request - The custodial transaction update request.
|
|
627
|
+
*
|
|
628
|
+
* @returns The updated transaction metadata.
|
|
629
|
+
*/
|
|
630
|
+
updateCustodialTransaction(request: UpdateCustodialTransactionRequest): TransactionMeta;
|
|
631
|
+
/**
|
|
632
|
+
* Search transaction metadata for matching entries.
|
|
633
|
+
*
|
|
634
|
+
* @param opts - Options bag.
|
|
635
|
+
* @param opts.initialList - The transactions to search. Defaults to the current state.
|
|
636
|
+
* @param opts.limit - The maximum number of transactions to return. No limit by default.
|
|
637
|
+
* @param opts.searchCriteria - An object containing values or functions for transaction properties to filter transactions with.
|
|
638
|
+
* @returns An array of transactions matching the provided options.
|
|
639
|
+
*/
|
|
640
|
+
getTransactions({ initialList, limit, searchCriteria, }?: {
|
|
641
|
+
initialList?: TransactionMeta[];
|
|
642
|
+
limit?: number;
|
|
643
|
+
searchCriteria?: any;
|
|
644
|
+
}): TransactionMeta[];
|
|
645
|
+
/**
|
|
646
|
+
* Estimates the gas fees for a transaction.
|
|
647
|
+
*
|
|
648
|
+
* @param args - The arguments for estimating gas fees.
|
|
649
|
+
* @param args.transactionParams - The transaction parameters to estimate fees for.
|
|
650
|
+
* @param args.chainId - The chain ID to use. If not provided, the network client ID is used to determine the chain.
|
|
651
|
+
* @param args.networkClientId - The network client ID to use for the estimation.
|
|
652
|
+
* @returns A promise that resolves to the estimated gas fee response.
|
|
653
|
+
*/
|
|
654
|
+
estimateGasFee({ transactionParams, chainId, networkClientId: requestNetworkClientId, }: {
|
|
655
|
+
transactionParams: TransactionParams;
|
|
656
|
+
chainId?: Hex;
|
|
657
|
+
networkClientId?: NetworkClientId;
|
|
658
|
+
}): Promise<GasFeeFlowResponse>;
|
|
659
|
+
/**
|
|
660
|
+
* Determine the layer 1 gas fee for the given transaction parameters.
|
|
661
|
+
*
|
|
662
|
+
* @param request - The request object.
|
|
663
|
+
* @param request.transactionParams - The transaction parameters to estimate the layer 1 gas fee for.
|
|
664
|
+
* @param request.chainId - The ID of the chain where the transaction will be executed.
|
|
665
|
+
* @param request.networkClientId - The ID of a specific network client to process the transaction.
|
|
666
|
+
* @returns The layer 1 gas fee.
|
|
667
|
+
*/
|
|
668
|
+
getLayer1GasFee({ transactionParams, chainId, networkClientId, }: {
|
|
669
|
+
transactionParams: TransactionParams;
|
|
670
|
+
chainId?: Hex;
|
|
671
|
+
networkClientId?: NetworkClientId;
|
|
672
|
+
}): Promise<Hex | undefined>;
|
|
673
|
+
/**
|
|
674
|
+
* Removes unapproved transactions from state.
|
|
675
|
+
*/
|
|
676
|
+
clearUnapprovedTransactions(): void;
|
|
677
|
+
/**
|
|
678
|
+
* Stop the signing process for a specific transaction.
|
|
679
|
+
* Throws an error causing the transaction status to be set to failed.
|
|
680
|
+
*
|
|
681
|
+
* @param transactionId - The ID of the transaction to stop signing.
|
|
682
|
+
*/
|
|
683
|
+
abortTransactionSigning(transactionId: string): void;
|
|
684
|
+
/**
|
|
685
|
+
* Update the transaction data of a single nested transaction within an atomic batch transaction.
|
|
686
|
+
*
|
|
687
|
+
* @param options - The options bag.
|
|
688
|
+
* @param options.transactionId - ID of the atomic batch transaction.
|
|
689
|
+
* @param options.transactionIndex - Index of the nested transaction within the atomic batch transaction.
|
|
690
|
+
* @param options.transactionData - New data to set for the nested transaction.
|
|
691
|
+
* @returns The updated data for the atomic batch transaction.
|
|
692
|
+
*/
|
|
693
|
+
updateAtomicBatchData({ transactionId, transactionIndex, transactionData, }: {
|
|
694
|
+
transactionId: string;
|
|
695
|
+
transactionIndex: number;
|
|
696
|
+
transactionData: Hex;
|
|
697
|
+
}): Promise<Hex>;
|
|
698
|
+
/**
|
|
699
|
+
* Update the batch transactions associated with a transaction.
|
|
700
|
+
* These transactions will be submitted with the main transaction as a batch.
|
|
701
|
+
*
|
|
702
|
+
* @param request - The request object.
|
|
703
|
+
* @param request.transactionId - The ID of the transaction to update.
|
|
704
|
+
* @param request.batchTransactions - The new batch transactions.
|
|
705
|
+
*/
|
|
706
|
+
updateBatchTransactions({ transactionId, batchTransactions, }: {
|
|
707
|
+
transactionId: string;
|
|
708
|
+
batchTransactions: BatchTransactionParams[];
|
|
709
|
+
}): void;
|
|
710
|
+
/**
|
|
711
|
+
* Update the selected gas fee token for a transaction.
|
|
712
|
+
*
|
|
713
|
+
* @param transactionId - The ID of the transaction to update.
|
|
714
|
+
* @param contractAddress - The contract address of the selected gas fee token.
|
|
715
|
+
*/
|
|
716
|
+
updateSelectedGasFeeToken(transactionId: string, contractAddress: Hex | undefined): void;
|
|
717
|
+
/**
|
|
718
|
+
* Update the required transaction IDs for a transaction.
|
|
719
|
+
*
|
|
720
|
+
* @param request - The request object.
|
|
721
|
+
* @param request.transactionId - The ID of the transaction to update.
|
|
722
|
+
* @param request.requiredTransactionIds - The additional required transaction IDs.
|
|
723
|
+
* @param request.append - Whether to append the IDs to any existing values. Defaults to true.
|
|
724
|
+
*/
|
|
725
|
+
updateRequiredTransactionIds({ transactionId, requiredTransactionIds, append, }: {
|
|
726
|
+
transactionId: string;
|
|
727
|
+
requiredTransactionIds: string[];
|
|
728
|
+
append?: boolean;
|
|
729
|
+
}): void;
|
|
730
|
+
/**
|
|
731
|
+
* Emulate a new transaction.
|
|
732
|
+
*
|
|
733
|
+
* @param transactionId - The transaction ID.
|
|
734
|
+
*/
|
|
735
|
+
emulateNewTransaction(transactionId: string): void;
|
|
736
|
+
/**
|
|
737
|
+
* Emulate a transaction update.
|
|
738
|
+
*
|
|
739
|
+
* @param transactionMeta - Transaction metadata.
|
|
740
|
+
*/
|
|
741
|
+
emulateTransactionUpdate(transactionMeta: TransactionMeta): void;
|
|
742
|
+
/**
|
|
743
|
+
* Retrieve available gas fee tokens for a transaction.
|
|
744
|
+
*
|
|
745
|
+
* @param request - The request object containing transaction details.
|
|
746
|
+
* @returns The list of available gas fee tokens.
|
|
747
|
+
*/
|
|
748
|
+
getGasFeeTokens(request: GetGasFeeTokensRequest): Promise<GasFeeToken[]>;
|
|
749
|
+
}
|
|
750
|
+
export {};
|
|
751
|
+
//# sourceMappingURL=TransactionController.d.mts.map
|