viem 3.0.0-next.10 → 3.0.0-next.13
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/dist/chains/definitions/arc.d.ts +15 -1
- package/dist/chains/definitions/arc.d.ts.map +1 -1
- package/dist/chains/definitions/arc.js +19 -1
- package/dist/chains/definitions/arc.js.map +1 -1
- package/dist/chains/definitions/berachainBepolia.d.ts +1 -1
- package/dist/chains/definitions/berachainBepolia.js +1 -1
- package/dist/chains/definitions/blockdag.d.ts +18 -0
- package/dist/chains/definitions/blockdag.d.ts.map +1 -0
- package/dist/chains/definitions/blockdag.js +18 -0
- package/dist/chains/definitions/blockdag.js.map +1 -0
- package/dist/chains/definitions/candyChain.d.ts +27 -0
- package/dist/chains/definitions/candyChain.d.ts.map +1 -0
- package/dist/chains/definitions/candyChain.js +26 -0
- package/dist/chains/definitions/candyChain.js.map +1 -0
- package/dist/chains/definitions/creditCoin3Devnet.d.ts +6 -0
- package/dist/chains/definitions/creditCoin3Devnet.d.ts.map +1 -1
- package/dist/chains/definitions/creditCoin3Devnet.js +6 -0
- package/dist/chains/definitions/creditCoin3Devnet.js.map +1 -1
- package/dist/chains/definitions/creditCoin3Mainnet.d.ts +5 -1
- package/dist/chains/definitions/creditCoin3Mainnet.d.ts.map +1 -1
- package/dist/chains/definitions/creditCoin3Mainnet.js +4 -0
- package/dist/chains/definitions/creditCoin3Mainnet.js.map +1 -1
- package/dist/chains/definitions/creditCoin3Testnet.d.ts +5 -1
- package/dist/chains/definitions/creditCoin3Testnet.d.ts.map +1 -1
- package/dist/chains/definitions/creditCoin3Testnet.js +4 -0
- package/dist/chains/definitions/creditCoin3Testnet.js.map +1 -1
- package/dist/chains/definitions/crymad.d.ts +25 -0
- package/dist/chains/definitions/crymad.d.ts.map +1 -0
- package/dist/chains/definitions/crymad.js +23 -0
- package/dist/chains/definitions/crymad.js.map +1 -0
- package/dist/chains/definitions/crymadL2.d.ts +26 -0
- package/dist/chains/definitions/crymadL2.d.ts.map +1 -0
- package/dist/chains/definitions/crymadL2.js +24 -0
- package/dist/chains/definitions/crymadL2.js.map +1 -0
- package/dist/chains/definitions/eCanna.d.ts +18 -0
- package/dist/chains/definitions/eCanna.d.ts.map +1 -0
- package/dist/chains/definitions/eCanna.js +18 -0
- package/dist/chains/definitions/eCanna.js.map +1 -0
- package/dist/chains/definitions/eCannaTestnet.d.ts +19 -0
- package/dist/chains/definitions/eCannaTestnet.d.ts.map +1 -0
- package/dist/chains/definitions/eCannaTestnet.js +19 -0
- package/dist/chains/definitions/eCannaTestnet.js.map +1 -0
- package/dist/chains/definitions/hausTestnet.d.ts +20 -0
- package/dist/chains/definitions/hausTestnet.d.ts.map +1 -0
- package/dist/chains/definitions/hausTestnet.js +18 -0
- package/dist/chains/definitions/hausTestnet.js.map +1 -0
- package/dist/chains/definitions/hyveChain.d.ts +26 -0
- package/dist/chains/definitions/hyveChain.d.ts.map +1 -0
- package/dist/chains/definitions/hyveChain.js +22 -0
- package/dist/chains/definitions/hyveChain.js.map +1 -0
- package/dist/chains/definitions/kortana.d.ts +18 -0
- package/dist/chains/definitions/kortana.d.ts.map +1 -0
- package/dist/chains/definitions/kortana.js +16 -0
- package/dist/chains/definitions/kortana.js.map +1 -0
- package/dist/chains/definitions/morphTachyon.d.ts +18 -0
- package/dist/chains/definitions/morphTachyon.d.ts.map +1 -0
- package/dist/chains/definitions/morphTachyon.js +16 -0
- package/dist/chains/definitions/morphTachyon.js.map +1 -0
- package/dist/chains/definitions/morphTachyonTestnet.d.ts +19 -0
- package/dist/chains/definitions/morphTachyonTestnet.d.ts.map +1 -0
- package/dist/chains/definitions/morphTachyonTestnet.js +17 -0
- package/dist/chains/definitions/morphTachyonTestnet.js.map +1 -0
- package/dist/chains/definitions/rabbitChainTestnet.d.ts +19 -0
- package/dist/chains/definitions/rabbitChainTestnet.d.ts.map +1 -0
- package/dist/chains/definitions/rabbitChainTestnet.js +19 -0
- package/dist/chains/definitions/rabbitChainTestnet.js.map +1 -0
- package/dist/chains/definitions/robinhood.d.ts +2 -1
- package/dist/chains/definitions/robinhood.d.ts.map +1 -1
- package/dist/chains/definitions/robinhood.js +6 -2
- package/dist/chains/definitions/robinhood.js.map +1 -1
- package/dist/chains/definitions/tempo.d.ts +11 -3
- package/dist/chains/definitions/tempo.d.ts.map +1 -1
- package/dist/chains/definitions/tempo.js +10 -0
- package/dist/chains/definitions/tempo.js.map +1 -1
- package/dist/chains/definitions/tempoModerato.d.ts +11 -3
- package/dist/chains/definitions/tempoModerato.d.ts.map +1 -1
- package/dist/chains/definitions/tempoModerato.js +10 -0
- package/dist/chains/definitions/tempoModerato.js.map +1 -1
- package/dist/chains/definitions/whitechainSepolia.d.ts +54 -2
- package/dist/chains/definitions/whitechainSepolia.d.ts.map +1 -1
- package/dist/chains/definitions/whitechainSepolia.js +27 -3
- package/dist/chains/definitions/whitechainSepolia.js.map +1 -1
- package/dist/chains/definitions/xgrTestnet.d.ts +19 -0
- package/dist/chains/definitions/xgrTestnet.d.ts.map +1 -0
- package/dist/chains/definitions/xgrTestnet.js +19 -0
- package/dist/chains/definitions/xgrTestnet.js.map +1 -0
- package/dist/chains/definitions/ynxTestnet.d.ts +19 -0
- package/dist/chains/definitions/ynxTestnet.d.ts.map +1 -0
- package/dist/chains/definitions/ynxTestnet.js +17 -0
- package/dist/chains/definitions/ynxTestnet.js.map +1 -0
- package/dist/chains/definitions/zagros.d.ts +26 -0
- package/dist/chains/definitions/zagros.d.ts.map +1 -0
- package/dist/chains/definitions/zagros.js +26 -0
- package/dist/chains/definitions/zagros.js.map +1 -0
- package/dist/chains/index.d.ts +16 -0
- package/dist/chains/index.d.ts.map +1 -1
- package/dist/chains/index.js +15 -0
- package/dist/chains/index.js.map +1 -1
- package/dist/core/actions/address/getStorageValues.d.ts +30 -0
- package/dist/core/actions/address/getStorageValues.d.ts.map +1 -0
- package/dist/core/actions/address/getStorageValues.js +29 -0
- package/dist/core/actions/address/getStorageValues.js.map +1 -0
- package/dist/core/actions/address/index.d.ts +1 -0
- package/dist/core/actions/address/index.d.ts.map +1 -1
- package/dist/core/actions/address/index.js +1 -0
- package/dist/core/actions/address/index.js.map +1 -1
- package/dist/core/actions/block/simulate.d.ts +2 -0
- package/dist/core/actions/block/simulate.d.ts.map +1 -1
- package/dist/core/actions/block/simulate.js +3 -0
- package/dist/core/actions/block/simulate.js.map +1 -1
- package/dist/core/actions/multicall.d.ts.map +1 -1
- package/dist/core/actions/multicall.js +7 -1
- package/dist/core/actions/multicall.js.map +1 -1
- package/dist/core/actions/siwe/verify.d.ts.map +1 -1
- package/dist/core/actions/siwe/verify.js +2 -1
- package/dist/core/actions/siwe/verify.js.map +1 -1
- package/dist/core/actions/transaction/Errors.d.ts +1 -0
- package/dist/core/actions/transaction/Errors.d.ts.map +1 -1
- package/dist/core/actions/transaction/Errors.js +1 -0
- package/dist/core/actions/transaction/Errors.js.map +1 -1
- package/dist/core/actions/transaction/fill.d.ts +10 -1
- package/dist/core/actions/transaction/fill.d.ts.map +1 -1
- package/dist/core/actions/transaction/fill.js +71 -38
- package/dist/core/actions/transaction/fill.js.map +1 -1
- package/dist/core/actions/transaction/prepare.d.ts.map +1 -1
- package/dist/core/actions/transaction/prepare.js +4 -1
- package/dist/core/actions/transaction/prepare.js.map +1 -1
- package/dist/core/actions/transaction/sign.d.ts.map +1 -1
- package/dist/core/actions/transaction/sign.js +3 -1
- package/dist/core/actions/transaction/sign.js.map +1 -1
- package/dist/core/actions/wallet/sendCalls.d.ts.map +1 -1
- package/dist/core/actions/wallet/sendCalls.js +1 -0
- package/dist/core/actions/wallet/sendCalls.js.map +1 -1
- package/dist/core/internal/transport.js +1 -1
- package/dist/core/internal/transport.js.map +1 -1
- package/dist/erc4337/actions/userOperation/get.d.ts.map +1 -1
- package/dist/erc4337/actions/userOperation/get.js +3 -1
- package/dist/erc4337/actions/userOperation/get.js.map +1 -1
- package/dist/erc4337/actions/userOperation/waitForReceipt.js +1 -1
- package/dist/erc4337/actions/userOperation/waitForReceipt.js.map +1 -1
- package/dist/internal/inference.d.ts +24 -0
- package/dist/internal/inference.d.ts.map +1 -1
- package/dist/node/transports/ipc.d.ts.map +1 -1
- package/dist/node/transports/ipc.js +20 -2
- package/dist/node/transports/ipc.js.map +1 -1
- package/dist/op-stack/actions/l1/getGame.js +1 -1
- package/dist/op-stack/actions/l1/getGame.js.map +1 -1
- package/dist/op-stack/actions/l1/getGames.js +1 -1
- package/dist/op-stack/actions/l1/getGames.js.map +1 -1
- package/dist/op-stack/actions/l1/getTimeToNextGame.js +1 -1
- package/dist/op-stack/actions/l1/getTimeToNextGame.js.map +1 -1
- package/dist/op-stack/actions/l1/getTimeToNextL2Output.js +1 -1
- package/dist/op-stack/actions/l1/getTimeToNextL2Output.js.map +1 -1
- package/dist/tempo/Abis.d.ts +36662 -5677
- package/dist/tempo/Abis.d.ts.map +1 -1
- package/dist/tempo/Abis.js +5626 -1536
- package/dist/tempo/Abis.js.map +1 -1
- package/dist/tempo/Account.d.ts +86 -29
- package/dist/tempo/Account.d.ts.map +1 -1
- package/dist/tempo/Account.js +204 -70
- package/dist/tempo/Account.js.map +1 -1
- package/dist/tempo/Addresses.d.ts +16 -1
- package/dist/tempo/Addresses.d.ts.map +1 -1
- package/dist/tempo/Addresses.js +41 -1
- package/dist/tempo/Addresses.js.map +1 -1
- package/dist/tempo/Capabilities.d.ts +7 -13
- package/dist/tempo/Capabilities.d.ts.map +1 -1
- package/dist/tempo/Client.d.ts.map +1 -1
- package/dist/tempo/Client.js +1 -1
- package/dist/tempo/Client.js.map +1 -1
- package/dist/tempo/Decorator.d.ts +226 -7
- package/dist/tempo/Decorator.d.ts.map +1 -1
- package/dist/tempo/Decorator.js +27 -5
- package/dist/tempo/Decorator.js.map +1 -1
- package/dist/tempo/ExecutionError.d.ts +81 -0
- package/dist/tempo/ExecutionError.d.ts.map +1 -0
- package/dist/tempo/ExecutionError.js +309 -0
- package/dist/tempo/ExecutionError.js.map +1 -0
- package/dist/tempo/Relay.d.ts +303 -0
- package/dist/tempo/Relay.d.ts.map +1 -0
- package/dist/tempo/Relay.js +170 -0
- package/dist/tempo/Relay.js.map +1 -0
- package/dist/tempo/Selectors.d.ts +219 -66
- package/dist/tempo/Selectors.d.ts.map +1 -1
- package/dist/tempo/Selectors.js +220 -67
- package/dist/tempo/Selectors.js.map +1 -1
- package/dist/tempo/Store.d.ts +62 -0
- package/dist/tempo/Store.d.ts.map +1 -0
- package/dist/tempo/Store.js +107 -0
- package/dist/tempo/Store.js.map +1 -0
- package/dist/tempo/Transport.d.ts +48 -2
- package/dist/tempo/Transport.d.ts.map +1 -1
- package/dist/tempo/Transport.js +116 -34
- package/dist/tempo/Transport.js.map +1 -1
- package/dist/tempo/Zone.d.ts +51 -0
- package/dist/tempo/Zone.d.ts.map +1 -0
- package/dist/tempo/Zone.js +40 -0
- package/dist/tempo/Zone.js.map +1 -0
- package/dist/tempo/actions/accessKey/authorizeSync.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/authorizeSync.js +2 -0
- package/dist/tempo/actions/accessKey/authorizeSync.js.map +1 -1
- package/dist/tempo/actions/accessKey/burnWitnessSync.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/burnWitnessSync.js +2 -0
- package/dist/tempo/actions/accessKey/burnWitnessSync.js.map +1 -1
- package/dist/tempo/actions/accessKey/index.d.ts +1 -0
- package/dist/tempo/actions/accessKey/index.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/index.js +1 -0
- package/dist/tempo/actions/accessKey/index.js.map +1 -1
- package/dist/tempo/actions/accessKey/prepareAuthorization.d.ts +76 -0
- package/dist/tempo/actions/accessKey/prepareAuthorization.d.ts.map +1 -0
- package/dist/tempo/actions/accessKey/prepareAuthorization.js +62 -0
- package/dist/tempo/actions/accessKey/prepareAuthorization.js.map +1 -0
- package/dist/tempo/actions/accessKey/revokeSync.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/revokeSync.js +2 -0
- package/dist/tempo/actions/accessKey/revokeSync.js.map +1 -1
- package/dist/tempo/actions/accessKey/signAuthorization.d.ts +43 -38
- package/dist/tempo/actions/accessKey/signAuthorization.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/signAuthorization.js +102 -44
- package/dist/tempo/actions/accessKey/signAuthorization.js.map +1 -1
- package/dist/tempo/actions/accessKey/updateLimitSync.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/updateLimitSync.js +2 -0
- package/dist/tempo/actions/accessKey/updateLimitSync.js.map +1 -1
- package/dist/tempo/actions/amm/burnSync.d.ts.map +1 -1
- package/dist/tempo/actions/amm/burnSync.js +2 -0
- package/dist/tempo/actions/amm/burnSync.js.map +1 -1
- package/dist/tempo/actions/amm/mintSync.d.ts.map +1 -1
- package/dist/tempo/actions/amm/mintSync.js +2 -0
- package/dist/tempo/actions/amm/mintSync.js.map +1 -1
- package/dist/tempo/actions/amm/rebalanceSwapSync.d.ts.map +1 -1
- package/dist/tempo/actions/amm/rebalanceSwapSync.js +2 -0
- package/dist/tempo/actions/amm/rebalanceSwapSync.js.map +1 -1
- package/dist/tempo/actions/channel/closeSync.d.ts.map +1 -1
- package/dist/tempo/actions/channel/closeSync.js +2 -0
- package/dist/tempo/actions/channel/closeSync.js.map +1 -1
- package/dist/tempo/actions/channel/openSync.d.ts.map +1 -1
- package/dist/tempo/actions/channel/openSync.js +2 -0
- package/dist/tempo/actions/channel/openSync.js.map +1 -1
- package/dist/tempo/actions/channel/requestCloseSync.d.ts.map +1 -1
- package/dist/tempo/actions/channel/requestCloseSync.js +2 -0
- package/dist/tempo/actions/channel/requestCloseSync.js.map +1 -1
- package/dist/tempo/actions/channel/settleSync.d.ts.map +1 -1
- package/dist/tempo/actions/channel/settleSync.js +2 -0
- package/dist/tempo/actions/channel/settleSync.js.map +1 -1
- package/dist/tempo/actions/channel/topUpSync.d.ts.map +1 -1
- package/dist/tempo/actions/channel/topUpSync.js +2 -0
- package/dist/tempo/actions/channel/topUpSync.js.map +1 -1
- package/dist/tempo/actions/channel/withdrawSync.d.ts.map +1 -1
- package/dist/tempo/actions/channel/withdrawSync.js +2 -0
- package/dist/tempo/actions/channel/withdrawSync.js.map +1 -1
- package/dist/tempo/actions/dex/cancelStaleSync.d.ts.map +1 -1
- package/dist/tempo/actions/dex/cancelStaleSync.js +2 -0
- package/dist/tempo/actions/dex/cancelStaleSync.js.map +1 -1
- package/dist/tempo/actions/dex/cancelSync.d.ts.map +1 -1
- package/dist/tempo/actions/dex/cancelSync.js +2 -0
- package/dist/tempo/actions/dex/cancelSync.js.map +1 -1
- package/dist/tempo/actions/dex/createPairSync.d.ts.map +1 -1
- package/dist/tempo/actions/dex/createPairSync.js +2 -0
- package/dist/tempo/actions/dex/createPairSync.js.map +1 -1
- package/dist/tempo/actions/dex/placeFlipSync.d.ts.map +1 -1
- package/dist/tempo/actions/dex/placeFlipSync.js +2 -0
- package/dist/tempo/actions/dex/placeFlipSync.js.map +1 -1
- package/dist/tempo/actions/dex/placeSync.d.ts.map +1 -1
- package/dist/tempo/actions/dex/placeSync.js +2 -0
- package/dist/tempo/actions/dex/placeSync.js.map +1 -1
- package/dist/tempo/actions/dex/withdrawSync.d.ts.map +1 -1
- package/dist/tempo/actions/dex/withdrawSync.js +2 -0
- package/dist/tempo/actions/dex/withdrawSync.js.map +1 -1
- package/dist/tempo/actions/earn/deployment.d.ts +36 -21
- package/dist/tempo/actions/earn/deployment.d.ts.map +1 -1
- package/dist/tempo/actions/earn/deployment.js +96 -32
- package/dist/tempo/actions/earn/deployment.js.map +1 -1
- package/dist/tempo/actions/earn.d.ts +21 -21
- package/dist/tempo/actions/earn.d.ts.map +1 -1
- package/dist/tempo/actions/earn.js +24 -9
- package/dist/tempo/actions/earn.js.map +1 -1
- package/dist/tempo/actions/fee/setUserTokenSync.d.ts.map +1 -1
- package/dist/tempo/actions/fee/setUserTokenSync.js +2 -0
- package/dist/tempo/actions/fee/setUserTokenSync.js.map +1 -1
- package/dist/tempo/actions/fee/setValidatorTokenSync.d.ts.map +1 -1
- package/dist/tempo/actions/fee/setValidatorTokenSync.js +2 -0
- package/dist/tempo/actions/fee/setValidatorTokenSync.js.map +1 -1
- package/dist/tempo/actions/index.d.ts +3 -0
- package/dist/tempo/actions/index.d.ts.map +1 -1
- package/dist/tempo/actions/index.js +3 -0
- package/dist/tempo/actions/index.js.map +1 -1
- package/dist/tempo/actions/multisig/getConfig.d.ts +34 -0
- package/dist/tempo/actions/multisig/getConfig.d.ts.map +1 -0
- package/dist/tempo/actions/multisig/getConfig.js +27 -0
- package/dist/tempo/actions/multisig/getConfig.js.map +1 -0
- package/dist/tempo/actions/multisig/getConfigCommitment.d.ts +72 -0
- package/dist/tempo/actions/multisig/getConfigCommitment.d.ts.map +1 -0
- package/dist/tempo/actions/multisig/getConfigCommitment.js +55 -0
- package/dist/tempo/actions/multisig/getConfigCommitment.js.map +1 -0
- package/dist/tempo/actions/multisig/getOperation.d.ts +23 -0
- package/dist/tempo/actions/multisig/getOperation.d.ts.map +1 -0
- package/dist/tempo/actions/multisig/getOperation.js +18 -0
- package/dist/tempo/actions/multisig/getOperation.js.map +1 -0
- package/dist/tempo/actions/multisig/index.d.ts +6 -0
- package/dist/tempo/actions/multisig/index.d.ts.map +1 -0
- package/dist/tempo/actions/multisig/index.js +6 -0
- package/dist/tempo/actions/multisig/index.js.map +1 -0
- package/dist/tempo/actions/multisig/updateConfig.d.ts +193 -0
- package/dist/tempo/actions/multisig/updateConfig.d.ts.map +1 -0
- package/dist/tempo/actions/multisig/updateConfig.js +170 -0
- package/dist/tempo/actions/multisig/updateConfig.js.map +1 -0
- package/dist/tempo/actions/multisig/updateConfigSync.d.ts +50 -0
- package/dist/tempo/actions/multisig/updateConfigSync.d.ts.map +1 -0
- package/dist/tempo/actions/multisig/updateConfigSync.js +55 -0
- package/dist/tempo/actions/multisig/updateConfigSync.js.map +1 -0
- package/dist/tempo/actions/policy/createSync.d.ts.map +1 -1
- package/dist/tempo/actions/policy/createSync.js +2 -0
- package/dist/tempo/actions/policy/createSync.js.map +1 -1
- package/dist/tempo/actions/policy/modifyBlacklistSync.d.ts.map +1 -1
- package/dist/tempo/actions/policy/modifyBlacklistSync.js +2 -0
- package/dist/tempo/actions/policy/modifyBlacklistSync.js.map +1 -1
- package/dist/tempo/actions/policy/modifyWhitelistSync.d.ts.map +1 -1
- package/dist/tempo/actions/policy/modifyWhitelistSync.js +2 -0
- package/dist/tempo/actions/policy/modifyWhitelistSync.js.map +1 -1
- package/dist/tempo/actions/policy/setAdminSync.d.ts.map +1 -1
- package/dist/tempo/actions/policy/setAdminSync.js +2 -0
- package/dist/tempo/actions/policy/setAdminSync.js.map +1 -1
- package/dist/tempo/actions/propAmm.d.ts +1025 -0
- package/dist/tempo/actions/propAmm.d.ts.map +1 -0
- package/dist/tempo/actions/propAmm.js +541 -0
- package/dist/tempo/actions/propAmm.js.map +1 -0
- package/dist/tempo/actions/receivePolicy/burnSync.d.ts.map +1 -1
- package/dist/tempo/actions/receivePolicy/burnSync.js +2 -0
- package/dist/tempo/actions/receivePolicy/burnSync.js.map +1 -1
- package/dist/tempo/actions/receivePolicy/claimSync.d.ts.map +1 -1
- package/dist/tempo/actions/receivePolicy/claimSync.js +2 -0
- package/dist/tempo/actions/receivePolicy/claimSync.js.map +1 -1
- package/dist/tempo/actions/receivePolicy/setSync.d.ts.map +1 -1
- package/dist/tempo/actions/receivePolicy/setSync.js +2 -0
- package/dist/tempo/actions/receivePolicy/setSync.js.map +1 -1
- package/dist/tempo/actions/token/approveSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/approveSync.js +2 -0
- package/dist/tempo/actions/token/approveSync.js.map +1 -1
- package/dist/tempo/actions/token/burn.d.ts +38 -9
- package/dist/tempo/actions/token/burn.d.ts.map +1 -1
- package/dist/tempo/actions/token/burn.js +12 -5
- package/dist/tempo/actions/token/burn.js.map +1 -1
- package/dist/tempo/actions/token/burnBlockedSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/burnBlockedSync.js +2 -0
- package/dist/tempo/actions/token/burnBlockedSync.js.map +1 -1
- package/dist/tempo/actions/token/burnSync.d.ts +2 -0
- package/dist/tempo/actions/token/burnSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/burnSync.js +2 -0
- package/dist/tempo/actions/token/burnSync.js.map +1 -1
- package/dist/tempo/actions/token/changeTransferPolicySync.d.ts.map +1 -1
- package/dist/tempo/actions/token/changeTransferPolicySync.js +2 -0
- package/dist/tempo/actions/token/changeTransferPolicySync.js.map +1 -1
- package/dist/tempo/actions/token/createSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/createSync.js +2 -0
- package/dist/tempo/actions/token/createSync.js.map +1 -1
- package/dist/tempo/actions/token/grantRolesSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/grantRolesSync.js +2 -0
- package/dist/tempo/actions/token/grantRolesSync.js.map +1 -1
- package/dist/tempo/actions/token/mintSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/mintSync.js +2 -0
- package/dist/tempo/actions/token/mintSync.js.map +1 -1
- package/dist/tempo/actions/token/pauseSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/pauseSync.js +2 -0
- package/dist/tempo/actions/token/pauseSync.js.map +1 -1
- package/dist/tempo/actions/token/prepareUpdateQuoteTokenSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/prepareUpdateQuoteTokenSync.js +2 -0
- package/dist/tempo/actions/token/prepareUpdateQuoteTokenSync.js.map +1 -1
- package/dist/tempo/actions/token/renounceRolesSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/renounceRolesSync.js +2 -0
- package/dist/tempo/actions/token/renounceRolesSync.js.map +1 -1
- package/dist/tempo/actions/token/revokeRolesSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/revokeRolesSync.js +2 -0
- package/dist/tempo/actions/token/revokeRolesSync.js.map +1 -1
- package/dist/tempo/actions/token/setRoleAdminSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/setRoleAdminSync.js +2 -0
- package/dist/tempo/actions/token/setRoleAdminSync.js.map +1 -1
- package/dist/tempo/actions/token/setSupplyCapSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/setSupplyCapSync.js +2 -0
- package/dist/tempo/actions/token/setSupplyCapSync.js.map +1 -1
- package/dist/tempo/actions/token/transferSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/transferSync.js +2 -0
- package/dist/tempo/actions/token/transferSync.js.map +1 -1
- package/dist/tempo/actions/token/unpauseSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/unpauseSync.js +2 -0
- package/dist/tempo/actions/token/unpauseSync.js.map +1 -1
- package/dist/tempo/actions/token/updateQuoteTokenSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/updateQuoteTokenSync.js +2 -0
- package/dist/tempo/actions/token/updateQuoteTokenSync.js.map +1 -1
- package/dist/tempo/actions/virtualAddress/registerMasterSync.d.ts.map +1 -1
- package/dist/tempo/actions/virtualAddress/registerMasterSync.js +2 -0
- package/dist/tempo/actions/virtualAddress/registerMasterSync.js.map +1 -1
- package/dist/tempo/actions/zone/deposit.d.ts +56 -13
- package/dist/tempo/actions/zone/deposit.d.ts.map +1 -1
- package/dist/tempo/actions/zone/deposit.js +8 -10
- package/dist/tempo/actions/zone/deposit.js.map +1 -1
- package/dist/tempo/actions/zone/depositSync.d.ts.map +1 -1
- package/dist/tempo/actions/zone/depositSync.js +2 -0
- package/dist/tempo/actions/zone/depositSync.js.map +1 -1
- package/dist/tempo/actions/zone/encryptedDeposit.d.ts +15 -15
- package/dist/tempo/actions/zone/encryptedDeposit.d.ts.map +1 -1
- package/dist/tempo/actions/zone/encryptedDeposit.js +12 -12
- package/dist/tempo/actions/zone/encryptedDeposit.js.map +1 -1
- package/dist/tempo/actions/zone/getEncryptionKey.d.ts +3 -4
- package/dist/tempo/actions/zone/getEncryptionKey.d.ts.map +1 -1
- package/dist/tempo/actions/zone/getEncryptionKey.js +18 -7
- package/dist/tempo/actions/zone/getEncryptionKey.js.map +1 -1
- package/dist/tempo/actions/zone/getPortalInfo.d.ts +61 -0
- package/dist/tempo/actions/zone/getPortalInfo.d.ts.map +1 -0
- package/dist/tempo/actions/zone/getPortalInfo.js +63 -0
- package/dist/tempo/actions/zone/getPortalInfo.js.map +1 -0
- package/dist/tempo/actions/zone/getWithdrawalFee.d.ts.map +1 -1
- package/dist/tempo/actions/zone/getWithdrawalFee.js +1 -1
- package/dist/tempo/actions/zone/getWithdrawalFee.js.map +1 -1
- package/dist/tempo/actions/zone/index.d.ts +1 -0
- package/dist/tempo/actions/zone/index.d.ts.map +1 -1
- package/dist/tempo/actions/zone/index.js +1 -0
- package/dist/tempo/actions/zone/index.js.map +1 -1
- package/dist/tempo/actions/zone/requestVerifiableWithdrawal.d.ts +8 -8
- package/dist/tempo/actions/zone/requestVerifiableWithdrawal.d.ts.map +1 -1
- package/dist/tempo/actions/zone/requestVerifiableWithdrawal.js +1 -1
- package/dist/tempo/actions/zone/requestVerifiableWithdrawal.js.map +1 -1
- package/dist/tempo/actions/zone/requestWithdrawal.d.ts +8 -8
- package/dist/tempo/actions/zone/requestWithdrawal.d.ts.map +1 -1
- package/dist/tempo/actions/zone/requestWithdrawal.js +1 -1
- package/dist/tempo/actions/zone/requestWithdrawal.js.map +1 -1
- package/dist/tempo/actions/zone/requestWithdrawalSync.d.ts.map +1 -1
- package/dist/tempo/actions/zone/requestWithdrawalSync.js +2 -0
- package/dist/tempo/actions/zone/requestWithdrawalSync.js.map +1 -1
- package/dist/tempo/actions/zone/signAuthorizationToken.d.ts +3 -3
- package/dist/tempo/actions/zone/signAuthorizationToken.d.ts.map +1 -1
- package/dist/tempo/actions/zone/signAuthorizationToken.js +5 -5
- package/dist/tempo/actions/zone/signAuthorizationToken.js.map +1 -1
- package/dist/tempo/actions/zone/types.d.ts +1 -1
- package/dist/tempo/actions/zone/types.d.ts.map +1 -1
- package/dist/tempo/chainConfig.d.ts +33 -17
- package/dist/tempo/chainConfig.d.ts.map +1 -1
- package/dist/tempo/chainConfig.js +188 -72
- package/dist/tempo/chainConfig.js.map +1 -1
- package/dist/tempo/index.d.ts +11 -5
- package/dist/tempo/index.d.ts.map +1 -1
- package/dist/tempo/index.js +9 -3
- package/dist/tempo/index.js.map +1 -1
- package/dist/tempo/internal/relay/cache.d.ts +9 -0
- package/dist/tempo/internal/relay/cache.d.ts.map +1 -0
- package/dist/tempo/internal/relay/cache.js +72 -0
- package/dist/tempo/internal/relay/cache.js.map +1 -0
- package/dist/tempo/internal/relay/deadline.d.ts +4 -0
- package/dist/tempo/internal/relay/deadline.d.ts.map +1 -0
- package/dist/tempo/internal/relay/deadline.js +34 -0
- package/dist/tempo/internal/relay/deadline.js.map +1 -0
- package/dist/tempo/internal/relay/error.d.ts +47 -0
- package/dist/tempo/internal/relay/error.d.ts.map +1 -0
- package/dist/tempo/internal/relay/error.js +101 -0
- package/dist/tempo/internal/relay/error.js.map +1 -0
- package/dist/tempo/internal/relay/feePayer.d.ts +70 -0
- package/dist/tempo/internal/relay/feePayer.d.ts.map +1 -0
- package/dist/tempo/internal/relay/feePayer.js +442 -0
- package/dist/tempo/internal/relay/feePayer.js.map +1 -0
- package/dist/tempo/internal/relay/feeToken.d.ts +38 -0
- package/dist/tempo/internal/relay/feeToken.d.ts.map +1 -0
- package/dist/tempo/internal/relay/feeToken.js +143 -0
- package/dist/tempo/internal/relay/feeToken.js.map +1 -0
- package/dist/tempo/internal/relay/multisig.d.ts +4 -0
- package/dist/tempo/internal/relay/multisig.d.ts.map +1 -0
- package/dist/tempo/internal/relay/multisig.js +1039 -0
- package/dist/tempo/internal/relay/multisig.js.map +1 -0
- package/dist/tempo/internal/relay/plugin.d.ts +5 -0
- package/dist/tempo/internal/relay/plugin.d.ts.map +1 -0
- package/dist/tempo/internal/relay/plugin.js +10 -0
- package/dist/tempo/internal/relay/plugin.js.map +1 -0
- package/dist/tempo/internal/relay/preflight.d.ts +17 -0
- package/dist/tempo/internal/relay/preflight.d.ts.map +1 -0
- package/dist/tempo/internal/relay/preflight.js +53 -0
- package/dist/tempo/internal/relay/preflight.js.map +1 -0
- package/dist/tempo/internal/relay/request.d.ts +16 -0
- package/dist/tempo/internal/relay/request.d.ts.map +1 -0
- package/dist/tempo/internal/relay/request.js +327 -0
- package/dist/tempo/internal/relay/request.js.map +1 -0
- package/dist/tempo/internal/relay/simulate.d.ts +62 -0
- package/dist/tempo/internal/relay/simulate.d.ts.map +1 -0
- package/dist/tempo/internal/relay/simulate.js +284 -0
- package/dist/tempo/internal/relay/simulate.js.map +1 -0
- package/dist/tempo/internal/relay/utils.d.ts +346 -0
- package/dist/tempo/internal/relay/utils.d.ts.map +1 -0
- package/dist/tempo/internal/relay/utils.js +185 -0
- package/dist/tempo/internal/relay/utils.js.map +1 -0
- package/dist/tempo/internal/relay/virtualAddress.d.ts +9 -0
- package/dist/tempo/internal/relay/virtualAddress.d.ts.map +1 -0
- package/dist/tempo/internal/relay/virtualAddress.js +73 -0
- package/dist/tempo/internal/relay/virtualAddress.js.map +1 -0
- package/dist/tempo/internal/relay.d.ts +4 -0
- package/dist/tempo/internal/relay.d.ts.map +1 -0
- package/dist/tempo/internal/relay.js +132 -0
- package/dist/tempo/internal/relay.js.map +1 -0
- package/dist/tempo/internal/types.d.ts +2 -2
- package/dist/tempo/internal/types.d.ts.map +1 -1
- package/dist/tempo/internal/utils.d.ts +1 -0
- package/dist/tempo/internal/utils.d.ts.map +1 -1
- package/dist/tempo/internal/utils.js +2 -1
- package/dist/tempo/internal/utils.js.map +1 -1
- package/dist/tempo/multisig/Config.d.ts +43 -0
- package/dist/tempo/multisig/Config.d.ts.map +1 -0
- package/dist/tempo/multisig/Config.js +92 -0
- package/dist/tempo/multisig/Config.js.map +1 -0
- package/dist/tempo/multisig/Operation.d.ts +34 -0
- package/dist/tempo/multisig/Operation.d.ts.map +1 -0
- package/dist/tempo/multisig/Operation.js +179 -0
- package/dist/tempo/multisig/Operation.js.map +1 -0
- package/dist/tempo/multisig/Signature.d.ts +4 -0
- package/dist/tempo/multisig/Signature.d.ts.map +1 -0
- package/dist/tempo/multisig/Signature.js +9 -0
- package/dist/tempo/multisig/Signature.js.map +1 -0
- package/dist/tempo/zones/Abis.d.ts +2 -2
- package/dist/tempo/zones/Abis.d.ts.map +1 -1
- package/dist/tempo/zones/Abis.js +2 -2
- package/dist/tempo/zones/Abis.js.map +1 -1
- package/dist/tempo/zones/transport.d.ts +1 -33
- package/dist/tempo/zones/transport.d.ts.map +1 -1
- package/dist/tempo/zones/transport.js +1 -49
- package/dist/tempo/zones/transport.js.map +1 -1
- package/dist/tokens/definitions/cirbtc.d.ts +1 -0
- package/dist/tokens/definitions/cirbtc.d.ts.map +1 -1
- package/dist/tokens/definitions/cirbtc.js +1 -0
- package/dist/tokens/definitions/cirbtc.js.map +1 -1
- package/dist/tokens/definitions/eurc.d.ts +2 -0
- package/dist/tokens/definitions/eurc.d.ts.map +1 -1
- package/dist/tokens/definitions/eurc.js +2 -0
- package/dist/tokens/definitions/eurc.js.map +1 -1
- package/dist/tokens/definitions/ousd.d.ts +26 -0
- package/dist/tokens/definitions/ousd.d.ts.map +1 -0
- package/dist/tokens/definitions/ousd.js +26 -0
- package/dist/tokens/definitions/ousd.js.map +1 -0
- package/dist/tokens/definitions/usdc.d.ts +2 -0
- package/dist/tokens/definitions/usdc.d.ts.map +1 -1
- package/dist/tokens/definitions/usdc.js +2 -0
- package/dist/tokens/definitions/usdc.js.map +1 -1
- package/dist/tokens/index.d.ts +2 -0
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +2 -0
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/sets.d.ts +40 -0
- package/dist/tokens/sets.d.ts.map +1 -1
- package/dist/tokens/sets.js +4 -1
- package/dist/tokens/sets.js.map +1 -1
- package/dist/utils/Siwe.d.ts +7 -0
- package/dist/utils/Siwe.d.ts.map +1 -1
- package/dist/utils/Siwe.js +28 -0
- package/dist/utils/Siwe.js.map +1 -1
- package/dist/utils/TxEnvelope.d.ts.map +1 -1
- package/dist/utils/TxEnvelope.js +2 -1
- package/dist/utils/TxEnvelope.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/src/chains/definitions/arc.ts +19 -1
- package/src/chains/definitions/berachainBepolia.ts +1 -1
- package/src/chains/definitions/blockdag.ts +18 -0
- package/src/chains/definitions/candyChain.ts +26 -0
- package/src/chains/definitions/creditCoin3Devnet.ts +6 -0
- package/src/chains/definitions/creditCoin3Mainnet.ts +4 -0
- package/src/chains/definitions/creditCoin3Testnet.ts +4 -0
- package/src/chains/definitions/crymad.ts +23 -0
- package/src/chains/definitions/crymadL2.ts +24 -0
- package/src/chains/definitions/eCanna.ts +18 -0
- package/src/chains/definitions/eCannaTestnet.ts +19 -0
- package/src/chains/definitions/hausTestnet.ts +18 -0
- package/src/chains/definitions/hyveChain.ts +22 -0
- package/src/chains/definitions/kortana.ts +16 -0
- package/src/chains/definitions/morphTachyon.ts +16 -0
- package/src/chains/definitions/morphTachyonTestnet.ts +17 -0
- package/src/chains/definitions/rabbitChainTestnet.ts +19 -0
- package/src/chains/definitions/robinhood.ts +6 -2
- package/src/chains/definitions/tempo.ts +10 -0
- package/src/chains/definitions/tempoModerato.ts +10 -0
- package/src/chains/definitions/whitechainSepolia.ts +28 -3
- package/src/chains/definitions/xgrTestnet.ts +19 -0
- package/src/chains/definitions/ynxTestnet.ts +17 -0
- package/src/chains/definitions/zagros.ts +26 -0
- package/src/chains/index.ts +17 -0
- package/src/core/actions/address/getStorageValues.ts +55 -0
- package/src/core/actions/address/index.ts +1 -0
- package/src/core/actions/block/simulate.ts +6 -0
- package/src/core/actions/multicall.ts +8 -1
- package/src/core/actions/siwe/verify.ts +3 -1
- package/src/core/actions/transaction/Errors.ts +1 -0
- package/src/core/actions/transaction/fill.ts +83 -41
- package/src/core/actions/transaction/prepare.ts +6 -1
- package/src/core/actions/transaction/sign.ts +4 -1
- package/src/core/actions/wallet/sendCalls.ts +1 -0
- package/src/core/internal/transport.ts +1 -1
- package/src/erc4337/actions/userOperation/get.ts +3 -1
- package/src/erc4337/actions/userOperation/waitForReceipt.ts +1 -1
- package/src/internal/inference.ts +24 -0
- package/src/node/transports/ipc.ts +17 -2
- package/src/op-stack/actions/l1/getGame.ts +1 -1
- package/src/op-stack/actions/l1/getGames.ts +1 -1
- package/src/op-stack/actions/l1/getTimeToNextGame.ts +1 -1
- package/src/op-stack/actions/l1/getTimeToNextL2Output.ts +1 -1
- package/src/tempo/Abis.ts +5619 -1513
- package/src/tempo/Account.ts +387 -82
- package/src/tempo/Addresses.ts +46 -17
- package/src/tempo/Capabilities.ts +7 -15
- package/src/tempo/Client.ts +1 -1
- package/src/tempo/Decorator.ts +304 -22
- package/src/tempo/ExecutionError.ts +428 -0
- package/src/tempo/Relay.ts +430 -0
- package/src/tempo/Selectors.ts +248 -78
- package/src/tempo/Store.ts +170 -0
- package/src/tempo/Transport.ts +202 -5
- package/src/tempo/Zone.ts +72 -0
- package/src/tempo/actions/accessKey/authorizeSync.ts +4 -0
- package/src/tempo/actions/accessKey/burnWitnessSync.ts +4 -0
- package/src/tempo/actions/accessKey/index.ts +2 -0
- package/src/tempo/actions/accessKey/prepareAuthorization.ts +132 -0
- package/src/tempo/actions/accessKey/revokeSync.ts +4 -0
- package/src/tempo/actions/accessKey/signAuthorization.ts +222 -53
- package/src/tempo/actions/accessKey/updateLimitSync.ts +4 -0
- package/src/tempo/actions/amm/burnSync.ts +4 -0
- package/src/tempo/actions/amm/mintSync.ts +4 -0
- package/src/tempo/actions/amm/rebalanceSwapSync.ts +4 -0
- package/src/tempo/actions/channel/closeSync.ts +4 -0
- package/src/tempo/actions/channel/openSync.ts +4 -0
- package/src/tempo/actions/channel/requestCloseSync.ts +4 -0
- package/src/tempo/actions/channel/settleSync.ts +4 -0
- package/src/tempo/actions/channel/topUpSync.ts +4 -0
- package/src/tempo/actions/channel/withdrawSync.ts +4 -0
- package/src/tempo/actions/dex/cancelStaleSync.ts +4 -0
- package/src/tempo/actions/dex/cancelSync.ts +4 -0
- package/src/tempo/actions/dex/createPairSync.ts +4 -0
- package/src/tempo/actions/dex/placeFlipSync.ts +4 -0
- package/src/tempo/actions/dex/placeSync.ts +4 -0
- package/src/tempo/actions/dex/withdrawSync.ts +4 -0
- package/src/tempo/actions/earn/deployment.ts +108 -42
- package/src/tempo/actions/earn.ts +35 -15
- package/src/tempo/actions/fee/setUserTokenSync.ts +4 -0
- package/src/tempo/actions/fee/setValidatorTokenSync.ts +4 -0
- package/src/tempo/actions/index.ts +4 -0
- package/src/tempo/actions/multisig/getConfig.ts +46 -0
- package/src/tempo/actions/multisig/getConfigCommitment.ts +79 -0
- package/src/tempo/actions/multisig/getOperation.ts +37 -0
- package/src/tempo/actions/multisig/index.ts +5 -0
- package/src/tempo/actions/multisig/updateConfig.ts +210 -0
- package/src/tempo/actions/multisig/updateConfigSync.ts +80 -0
- package/src/tempo/actions/policy/createSync.ts +4 -0
- package/src/tempo/actions/policy/modifyBlacklistSync.ts +4 -0
- package/src/tempo/actions/policy/modifyWhitelistSync.ts +4 -0
- package/src/tempo/actions/policy/setAdminSync.ts +4 -0
- package/src/tempo/actions/propAmm.ts +985 -0
- package/src/tempo/actions/receivePolicy/burnSync.ts +4 -0
- package/src/tempo/actions/receivePolicy/claimSync.ts +4 -0
- package/src/tempo/actions/receivePolicy/setSync.ts +5 -1
- package/src/tempo/actions/token/approveSync.ts +5 -1
- package/src/tempo/actions/token/burn.ts +21 -9
- package/src/tempo/actions/token/burnBlockedSync.ts +5 -1
- package/src/tempo/actions/token/burnSync.ts +7 -1
- package/src/tempo/actions/token/changeTransferPolicySync.ts +4 -0
- package/src/tempo/actions/token/createSync.ts +4 -0
- package/src/tempo/actions/token/grantRolesSync.ts +4 -0
- package/src/tempo/actions/token/mintSync.ts +5 -1
- package/src/tempo/actions/token/pauseSync.ts +4 -0
- package/src/tempo/actions/token/prepareUpdateQuoteTokenSync.ts +4 -0
- package/src/tempo/actions/token/renounceRolesSync.ts +4 -0
- package/src/tempo/actions/token/revokeRolesSync.ts +4 -0
- package/src/tempo/actions/token/setRoleAdminSync.ts +4 -0
- package/src/tempo/actions/token/setSupplyCapSync.ts +4 -0
- package/src/tempo/actions/token/transferSync.ts +5 -1
- package/src/tempo/actions/token/unpauseSync.ts +4 -0
- package/src/tempo/actions/token/updateQuoteTokenSync.ts +4 -0
- package/src/tempo/actions/virtualAddress/registerMasterSync.ts +4 -0
- package/src/tempo/actions/zone/deposit.ts +13 -24
- package/src/tempo/actions/zone/depositSync.ts +4 -0
- package/src/tempo/actions/zone/encryptedDeposit.ts +18 -26
- package/src/tempo/actions/zone/getEncryptionKey.ts +20 -8
- package/src/tempo/actions/zone/getPortalInfo.ts +126 -0
- package/src/tempo/actions/zone/getWithdrawalFee.ts +1 -1
- package/src/tempo/actions/zone/index.ts +2 -0
- package/src/tempo/actions/zone/requestVerifiableWithdrawal.ts +1 -1
- package/src/tempo/actions/zone/requestWithdrawal.ts +1 -1
- package/src/tempo/actions/zone/requestWithdrawalSync.ts +4 -0
- package/src/tempo/actions/zone/signAuthorizationToken.ts +7 -7
- package/src/tempo/actions/zone/types.ts +1 -1
- package/src/tempo/chainConfig.ts +287 -86
- package/src/tempo/index.ts +15 -4
- package/src/tempo/internal/relay/cache.ts +82 -0
- package/src/tempo/internal/relay/deadline.ts +45 -0
- package/src/tempo/internal/relay/error.ts +129 -0
- package/src/tempo/internal/relay/feePayer.ts +693 -0
- package/src/tempo/internal/relay/feeToken.ts +190 -0
- package/src/tempo/internal/relay/multisig.ts +1357 -0
- package/src/tempo/internal/relay/plugin.ts +13 -0
- package/src/tempo/internal/relay/preflight.ts +83 -0
- package/src/tempo/internal/relay/request.ts +401 -0
- package/src/tempo/internal/relay/simulate.ts +394 -0
- package/src/tempo/internal/relay/utils.ts +213 -0
- package/src/tempo/internal/relay/virtualAddress.ts +95 -0
- package/src/tempo/internal/relay.ts +149 -0
- package/src/tempo/internal/types.ts +2 -1
- package/src/tempo/internal/utils.ts +2 -0
- package/src/tempo/multisig/Config.ts +139 -0
- package/src/tempo/multisig/Operation.ts +213 -0
- package/src/tempo/multisig/Signature.ts +11 -0
- package/src/tempo/zones/Abis.ts +2 -2
- package/src/tempo/zones/transport.ts +1 -66
- package/src/tokens/definitions/cirbtc.ts +1 -0
- package/src/tokens/definitions/eurc.ts +2 -0
- package/src/tokens/definitions/ousd.ts +26 -0
- package/src/tokens/definitions/usdc.ts +2 -0
- package/src/tokens/index.ts +2 -0
- package/src/tokens/sets.ts +4 -1
- package/src/utils/Siwe.ts +36 -0
- package/src/utils/TxEnvelope.ts +3 -1
- package/src/version.ts +1 -1
- package/dist/tempo/Storage.d.ts +0 -43
- package/dist/tempo/Storage.d.ts.map +0 -1
- package/dist/tempo/Storage.js +0 -96
- package/dist/tempo/Storage.js.map +0 -1
- package/src/tempo/Storage.ts +0 -119
package/src/tempo/Transport.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import type { Hex } from 'ox'
|
|
2
2
|
import { TxEnvelopeTempo } from 'ox/tempo'
|
|
3
3
|
|
|
4
|
+
import { RpcResponse } from 'ox'
|
|
4
5
|
import * as Transport from '../core/Transport.js'
|
|
6
|
+
import { http as http_ } from '../core/transports/http.js'
|
|
7
|
+
import * as Plugin from './internal/relay/plugin.js'
|
|
8
|
+
import * as Request from './internal/relay/request.js'
|
|
9
|
+
import type * as Relay_ from './Relay.js'
|
|
10
|
+
import * as Store from './Store.js'
|
|
5
11
|
|
|
6
12
|
/** A relay {@link Transport.Transport}: routes fee sponsorship traffic to a relay (fee payer service). */
|
|
7
|
-
export type Relay = Transport.Transport<'relay'>
|
|
13
|
+
export type Relay = Transport.Transport<'relay', { multisig: true }>
|
|
8
14
|
|
|
9
15
|
/**
|
|
10
16
|
* Creates a {@link Transport.Transport} that routes requests between a
|
|
@@ -22,7 +28,9 @@ export type Relay = Transport.Transport<'relay'>
|
|
|
22
28
|
* - `'sign-and-broadcast'`: the submission is forwarded to the relay, which
|
|
23
29
|
* co-signs and broadcasts it itself.
|
|
24
30
|
*
|
|
25
|
-
*
|
|
31
|
+
* Multisig approvals and submissions are sent to the relay. Transaction and
|
|
32
|
+
* receipt lookups fall back to the relay for pending multisig operations.
|
|
33
|
+
* Other requests are forwarded to the default transport.
|
|
26
34
|
*
|
|
27
35
|
* @example
|
|
28
36
|
* ```ts
|
|
@@ -38,17 +46,55 @@ export type Relay = Transport.Transport<'relay'>
|
|
|
38
46
|
* @param options - Options.
|
|
39
47
|
* @returns A relay transport.
|
|
40
48
|
*/
|
|
49
|
+
export function withRelay<
|
|
50
|
+
transport extends Transport.Transport,
|
|
51
|
+
const plugins extends readonly Relay_.Plugin[] = readonly [],
|
|
52
|
+
>(
|
|
53
|
+
defaultTransport: transport,
|
|
54
|
+
options: withRelay.LocalOptions<plugins>,
|
|
55
|
+
): withRelay.LocalReturnValue<transport, plugins>
|
|
41
56
|
export function withRelay(
|
|
42
57
|
defaultTransport: Transport.Transport,
|
|
43
58
|
relayTransport: Transport.Transport,
|
|
59
|
+
options?: withRelay.Options,
|
|
60
|
+
): Relay
|
|
61
|
+
export function withRelay(
|
|
62
|
+
defaultTransport: Transport.Transport,
|
|
63
|
+
relayTransport: Transport.Transport | withRelay.LocalOptions,
|
|
44
64
|
options: withRelay.Options = {},
|
|
45
|
-
):
|
|
65
|
+
): Transport.Transport {
|
|
66
|
+
if (!('setup' in relayTransport))
|
|
67
|
+
return {
|
|
68
|
+
...defaultTransport,
|
|
69
|
+
setup(config = {}) {
|
|
70
|
+
const transport = defaultTransport.setup(config)
|
|
71
|
+
const request = Request.compose(
|
|
72
|
+
(request, options) => transport.request(request, options),
|
|
73
|
+
relayTransport,
|
|
74
|
+
config.chain ? () => ({ chain: config.chain! }) : undefined,
|
|
75
|
+
)
|
|
76
|
+
return {
|
|
77
|
+
...transport,
|
|
78
|
+
request: ((request_, options) =>
|
|
79
|
+
request(request_ as Relay_.handleRequest.Request, {
|
|
80
|
+
chainId: config.chain?.id,
|
|
81
|
+
...options,
|
|
82
|
+
})) as typeof transport.request,
|
|
83
|
+
...(relayTransport.plugins?.some((plugin) =>
|
|
84
|
+
Plugin.isMultisig(plugin),
|
|
85
|
+
)
|
|
86
|
+
? { multisig: true }
|
|
87
|
+
: {}),
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
}
|
|
91
|
+
|
|
46
92
|
const { policy = 'sign-only' } = options
|
|
47
93
|
return Transport.from({
|
|
48
94
|
key: options.key ?? 'relay',
|
|
49
95
|
name: options.name ?? 'Relay Proxy',
|
|
50
96
|
type: 'relay',
|
|
51
|
-
setup({ chain,
|
|
97
|
+
setup({ chain, timeout }) {
|
|
52
98
|
const transport = defaultTransport.setup({
|
|
53
99
|
chain,
|
|
54
100
|
retryCount: 0,
|
|
@@ -57,8 +103,9 @@ export function withRelay(
|
|
|
57
103
|
const relay = relayTransport.setup({ chain, retryCount: 0, timeout })
|
|
58
104
|
|
|
59
105
|
return {
|
|
106
|
+
multisig: true as const,
|
|
60
107
|
methods: options.methods,
|
|
61
|
-
retryCount:
|
|
108
|
+
retryCount: 0,
|
|
62
109
|
retryDelay: options.retryDelay,
|
|
63
110
|
async request(args, opts) {
|
|
64
111
|
const { method, params } = args
|
|
@@ -66,12 +113,77 @@ export function withRelay(
|
|
|
66
113
|
// The relay decides whether to sponsor from the fill request's `feePayer`.
|
|
67
114
|
if (method === 'eth_fillTransaction') return relay.request(args, opts)
|
|
68
115
|
|
|
116
|
+
if (
|
|
117
|
+
method === 'eth_getTransactionByHash' ||
|
|
118
|
+
method === 'eth_getTransactionReceipt'
|
|
119
|
+
) {
|
|
120
|
+
const result = await transport.request(
|
|
121
|
+
{ method, params: params as [Hex.Hex] },
|
|
122
|
+
opts,
|
|
123
|
+
)
|
|
124
|
+
if (result !== null && typeof result !== 'undefined') return result
|
|
125
|
+
|
|
126
|
+
const operation = await (async () => {
|
|
127
|
+
try {
|
|
128
|
+
return await relay.request(
|
|
129
|
+
{ method: 'multisig_getOperation', params },
|
|
130
|
+
opts,
|
|
131
|
+
)
|
|
132
|
+
} catch (error) {
|
|
133
|
+
if (
|
|
134
|
+
error instanceof RpcResponse.MethodNotFoundError ||
|
|
135
|
+
error instanceof RpcResponse.MethodNotSupportedError
|
|
136
|
+
) {
|
|
137
|
+
// Relays created before multisig coordination do not expose this method.
|
|
138
|
+
return null
|
|
139
|
+
}
|
|
140
|
+
throw error
|
|
141
|
+
}
|
|
142
|
+
})()
|
|
143
|
+
if (
|
|
144
|
+
!operation ||
|
|
145
|
+
typeof operation !== 'object' ||
|
|
146
|
+
!('type' in operation) ||
|
|
147
|
+
operation.type !== 'transaction'
|
|
148
|
+
)
|
|
149
|
+
return result
|
|
150
|
+
return relay.request({ method, params: params as [Hex.Hex] }, opts)
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (
|
|
154
|
+
method === 'multisig_approveKeyAuthorization' ||
|
|
155
|
+
method === 'multisig_approveRawTransaction' ||
|
|
156
|
+
method === 'multisig_approveRawTransactionSync' ||
|
|
157
|
+
method === 'multisig_getConfig' ||
|
|
158
|
+
method === 'multisig_getOperation'
|
|
159
|
+
)
|
|
160
|
+
return relay.request({ method, params: params as [Hex.Hex] }, opts)
|
|
161
|
+
|
|
69
162
|
if (
|
|
70
163
|
method === 'eth_sendRawTransaction' ||
|
|
71
164
|
method === 'eth_sendRawTransactionSync'
|
|
72
165
|
) {
|
|
73
166
|
const serialized = (params as readonly unknown[])?.[0]
|
|
74
167
|
// A pending fee payer signature marks the envelope as awaiting relay co-signature.
|
|
168
|
+
if (
|
|
169
|
+
typeof serialized === 'string' &&
|
|
170
|
+
serialized.startsWith(TxEnvelopeTempo.serializedType)
|
|
171
|
+
) {
|
|
172
|
+
const envelope = (() => {
|
|
173
|
+
try {
|
|
174
|
+
return TxEnvelopeTempo.deserialize(
|
|
175
|
+
serialized as TxEnvelopeTempo.Serialized,
|
|
176
|
+
)
|
|
177
|
+
} catch {
|
|
178
|
+
return undefined
|
|
179
|
+
}
|
|
180
|
+
})()
|
|
181
|
+
if (envelope?.signature?.type === 'multisig')
|
|
182
|
+
return relay.request(
|
|
183
|
+
{ method, params: [serialized as Hex.Hex] },
|
|
184
|
+
opts,
|
|
185
|
+
)
|
|
186
|
+
}
|
|
75
187
|
const sponsored = toFeePayerFormat(serialized)
|
|
76
188
|
if (sponsored) {
|
|
77
189
|
if (policy === 'sign-and-broadcast')
|
|
@@ -94,6 +206,33 @@ export function withRelay(
|
|
|
94
206
|
}
|
|
95
207
|
|
|
96
208
|
export declare namespace withRelay {
|
|
209
|
+
/** Plugins applied directly to the default transport. */
|
|
210
|
+
type LocalOptions<
|
|
211
|
+
plugins extends readonly Relay_.Plugin[] = readonly Relay_.Plugin[],
|
|
212
|
+
> = Pick<Relay_.handleRequest.Options, 'resolveTokens'> & {
|
|
213
|
+
/** Ordered relay plugins. Defaults to an empty list. */
|
|
214
|
+
plugins?: plugins | undefined
|
|
215
|
+
}
|
|
216
|
+
/** Wrapped transport preserving its attributes and RPC schema. */
|
|
217
|
+
type LocalReturnValue<
|
|
218
|
+
transport extends Transport.Transport,
|
|
219
|
+
plugins extends readonly Relay_.Plugin[] = readonly [],
|
|
220
|
+
> =
|
|
221
|
+
transport extends Transport.Transport<
|
|
222
|
+
infer type,
|
|
223
|
+
infer properties,
|
|
224
|
+
infer request
|
|
225
|
+
>
|
|
226
|
+
? Transport.Transport<
|
|
227
|
+
type,
|
|
228
|
+
properties &
|
|
229
|
+
(Extract<plugins[number], Relay_.multisig.ReturnType> extends never
|
|
230
|
+
? {}
|
|
231
|
+
: { multisig: true }),
|
|
232
|
+
request
|
|
233
|
+
>
|
|
234
|
+
: never
|
|
235
|
+
|
|
97
236
|
type Options = {
|
|
98
237
|
/** Transport key. @default 'relay' */
|
|
99
238
|
key?: string | undefined
|
|
@@ -135,3 +274,61 @@ function toFeePayerFormat(serialized: unknown): Hex.Hex | undefined {
|
|
|
135
274
|
return undefined
|
|
136
275
|
}
|
|
137
276
|
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Creates an HTTP JSON-RPC transport with support for Zone authorization
|
|
280
|
+
* tokens.
|
|
281
|
+
*
|
|
282
|
+
* Reads the authorization token for the client's chain from {@link Store}
|
|
283
|
+
* and injects the `X-Authorization-Token` header on every request. Batching
|
|
284
|
+
* is not supported because zone tokens are account-scoped.
|
|
285
|
+
*
|
|
286
|
+
* @example
|
|
287
|
+
* ```ts
|
|
288
|
+
* import { Client, http, Zone } from 'viem/tempo'
|
|
289
|
+
*
|
|
290
|
+
* const client = Client.create({
|
|
291
|
+
* chain: Zone.a,
|
|
292
|
+
* transport: http(),
|
|
293
|
+
* })
|
|
294
|
+
* ```
|
|
295
|
+
*
|
|
296
|
+
* @param url - RPC URL. Defaults to the chain's default RPC URL.
|
|
297
|
+
* @param options - Options.
|
|
298
|
+
* @returns An HTTP transport.
|
|
299
|
+
*/
|
|
300
|
+
export function http(
|
|
301
|
+
url?: string | undefined,
|
|
302
|
+
options: http.Options = {},
|
|
303
|
+
): Transport.Http {
|
|
304
|
+
const { onFetchRequest, store = Store.defaultStore(), ...rest } = options
|
|
305
|
+
return {
|
|
306
|
+
key: rest.key ?? 'http',
|
|
307
|
+
name: rest.name ?? 'HTTP JSON-RPC',
|
|
308
|
+
type: 'http',
|
|
309
|
+
setup(setupOptions = {}) {
|
|
310
|
+
const chainId = setupOptions.chain?.id
|
|
311
|
+
return http_(url, {
|
|
312
|
+
...rest,
|
|
313
|
+
async onFetchRequest(request, init) {
|
|
314
|
+
const next = (await onFetchRequest?.(request, init)) ?? init
|
|
315
|
+
const headers = new Headers(next.headers)
|
|
316
|
+
|
|
317
|
+
if (chainId) {
|
|
318
|
+
const token = await store.getItem(`auth:token:${chainId}`)
|
|
319
|
+
if (token) headers.set('X-Authorization-Token', token)
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
return { ...next, headers }
|
|
323
|
+
},
|
|
324
|
+
}).setup(setupOptions)
|
|
325
|
+
},
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export declare namespace http {
|
|
330
|
+
type Options = Omit<http_.Options, 'batch' | 'raw'> & {
|
|
331
|
+
/** Store for reading zone authorization tokens. Defaults to session storage (web) or memory (server). */
|
|
332
|
+
store?: Store.Store | undefined
|
|
333
|
+
}
|
|
334
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as Chain from '../core/Chain.js'
|
|
2
|
+
import type { Assign } from '../core/internal/types.js'
|
|
3
|
+
import { type ChainConfig, chainConfig } from './chainConfig.js'
|
|
4
|
+
|
|
5
|
+
type Defaults = {
|
|
6
|
+
contracts: undefined
|
|
7
|
+
nativeCurrency: {
|
|
8
|
+
decimals: number
|
|
9
|
+
name: string
|
|
10
|
+
symbol: string
|
|
11
|
+
}
|
|
12
|
+
rpcUrls: { http: string[] }
|
|
13
|
+
supportsTransactionReplacementDetection: boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Defines a Tempo Zone chain. */
|
|
17
|
+
export function from<const config extends from.Parameters>(
|
|
18
|
+
config: config,
|
|
19
|
+
): from.ReturnValue<config>
|
|
20
|
+
export function from(config: from.Parameters) {
|
|
21
|
+
const chain = {
|
|
22
|
+
...chainConfig,
|
|
23
|
+
contracts: undefined,
|
|
24
|
+
nativeCurrency: {
|
|
25
|
+
name: 'USD',
|
|
26
|
+
symbol: 'USD',
|
|
27
|
+
decimals: 6,
|
|
28
|
+
},
|
|
29
|
+
rpcUrls: { http: [] as string[] },
|
|
30
|
+
supportsTransactionReplacementDetection: false,
|
|
31
|
+
...config,
|
|
32
|
+
}
|
|
33
|
+
return Chain.from(chain)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export declare namespace from {
|
|
37
|
+
type Parameters = Pick<Chain.Chain, 'id' | 'name'> &
|
|
38
|
+
Partial<Omit<Chain.Chain, 'id' | 'name' | 'sourceId'>> & {
|
|
39
|
+
sourceId: number
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
type ReturnValue<config extends Parameters = Parameters> = Assign<
|
|
43
|
+
Assign<Chain.from.ReturnType<ChainConfig>, Defaults>,
|
|
44
|
+
config
|
|
45
|
+
>
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const a = /*#__PURE__*/ from({
|
|
49
|
+
id: 4_217_000_006,
|
|
50
|
+
name: 'Zone A',
|
|
51
|
+
rpcUrls: { http: ['https://rpc-zone-a.testnet.tempo.xyz'] },
|
|
52
|
+
sourceId: 42_431,
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
export const b = /*#__PURE__*/ from({
|
|
56
|
+
id: 4_217_000_007,
|
|
57
|
+
name: 'Zone B',
|
|
58
|
+
rpcUrls: { http: ['https://rpc-zone-b.testnet.tempo.xyz'] },
|
|
59
|
+
sourceId: 42_431,
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
export const internal = /*#__PURE__*/ from({
|
|
63
|
+
id: 421_700_001,
|
|
64
|
+
name: 'Internal Zone',
|
|
65
|
+
sourceId: 4_217, // tempo mainnet
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
export const internalTestnet = /*#__PURE__*/ from({
|
|
69
|
+
id: 1_424_310_003,
|
|
70
|
+
name: 'Internal Testnet Zone',
|
|
71
|
+
sourceId: 42_431, // tempo testnet
|
|
72
|
+
})
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Address, Errors } from 'ox'
|
|
2
|
+
import type { TransactionReceipt } from '../../chainConfig.js'
|
|
2
3
|
|
|
3
4
|
import type * as Account from '../../../core/Account.js'
|
|
4
5
|
import type * as Chain from '../../../core/Chain.js'
|
|
@@ -47,6 +48,9 @@ export async function authorizeSync<
|
|
|
47
48
|
...options,
|
|
48
49
|
throwOnReceiptRevert,
|
|
49
50
|
})
|
|
51
|
+
if ((receipt as TransactionReceipt).status === 'pending')
|
|
52
|
+
return { receipt } as authorizeSync.ReturnType
|
|
53
|
+
|
|
50
54
|
const { args } = authorize.extractEvent(receipt.logs)
|
|
51
55
|
return { ...args, receipt }
|
|
52
56
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Address, Errors, Hex } from 'ox'
|
|
2
|
+
import type { TransactionReceipt } from '../../chainConfig.js'
|
|
2
3
|
|
|
3
4
|
import type * as Account from '../../../core/Account.js'
|
|
4
5
|
import type * as Chain from '../../../core/Chain.js'
|
|
@@ -43,6 +44,9 @@ export async function burnWitnessSync<
|
|
|
43
44
|
...options,
|
|
44
45
|
throwOnReceiptRevert,
|
|
45
46
|
})
|
|
47
|
+
if ((receipt as TransactionReceipt).status === 'pending')
|
|
48
|
+
return { receipt } as burnWitnessSync.ReturnType
|
|
49
|
+
|
|
46
50
|
const { args } = burnWitness.extractEvent(receipt.logs)
|
|
47
51
|
return { ...args, receipt }
|
|
48
52
|
}
|
|
@@ -16,3 +16,5 @@ export { verifyHash } from './verifyHash.js'
|
|
|
16
16
|
export { watchAdminAuthorized } from './watchAdminAuthorized.js'
|
|
17
17
|
export { watchWitness } from './watchWitness.js'
|
|
18
18
|
export { watchWitnessBurned } from './watchWitnessBurned.js'
|
|
19
|
+
|
|
20
|
+
export { prepareAuthorization } from './prepareAuthorization.js'
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { Address, type Hex } from 'ox'
|
|
2
|
+
import { KeyAuthorization, MultisigConfig } from 'ox/tempo'
|
|
3
|
+
import * as CoreAccount from '../../../core/Account.js'
|
|
4
|
+
import type * as Chain from '../../../core/Chain.js'
|
|
5
|
+
import type * as Client from '../../../core/Client.js'
|
|
6
|
+
import type { Compute } from '../../../core/internal/types.js'
|
|
7
|
+
import {
|
|
8
|
+
getKeyAuthorizationSignPayload,
|
|
9
|
+
resolveAccessKey,
|
|
10
|
+
signKeyAuthorization,
|
|
11
|
+
type MultisigAccount,
|
|
12
|
+
} from '../../Account.js'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Prepares a key authorization for signing.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const authorization = await Actions.accessKey.prepareAuthorization(client, {
|
|
20
|
+
* account,
|
|
21
|
+
* accessKey,
|
|
22
|
+
* })
|
|
23
|
+
* const keyAuthorization = await Actions.accessKey.signAuthorization(
|
|
24
|
+
* client,
|
|
25
|
+
* authorization,
|
|
26
|
+
* )
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @param client - Client.
|
|
30
|
+
* @param parameters - Parameters.
|
|
31
|
+
* @returns Prepared key authorization parameters.
|
|
32
|
+
*/
|
|
33
|
+
export async function prepareAuthorization<
|
|
34
|
+
chain extends Chain.Chain | undefined,
|
|
35
|
+
account extends CoreAccount.Account | undefined,
|
|
36
|
+
>(
|
|
37
|
+
client: Client.Client<chain, account>,
|
|
38
|
+
parameters: prepareAuthorization.Options<account>,
|
|
39
|
+
): Promise<prepareAuthorization.ReturnType> {
|
|
40
|
+
const { chainId = client.chain?.id } = parameters
|
|
41
|
+
const account_ = parameters.account ?? client.account
|
|
42
|
+
if (!account_) throw new Error('account is required.')
|
|
43
|
+
if (!chainId) throw new Error('chainId is required.')
|
|
44
|
+
const parsed = CoreAccount.from(account_)
|
|
45
|
+
const multisigState = await (async () => {
|
|
46
|
+
if ('multisig' in parameters) return parameters.multisig
|
|
47
|
+
if (!('source' in parsed) || parsed.source !== 'multisig') return undefined
|
|
48
|
+
const account = parsed as MultisigAccount
|
|
49
|
+
if (!account.config)
|
|
50
|
+
throw new Error(
|
|
51
|
+
'A multisig config is required to prepare a key authorization.',
|
|
52
|
+
)
|
|
53
|
+
return { config: account.config }
|
|
54
|
+
})()
|
|
55
|
+
const authorizationSignPayload = getKeyAuthorizationSignPayload(
|
|
56
|
+
parsed as CoreAccount.Local,
|
|
57
|
+
{
|
|
58
|
+
...parameters,
|
|
59
|
+
chainId: BigInt(chainId),
|
|
60
|
+
key: parameters.accessKey,
|
|
61
|
+
},
|
|
62
|
+
)
|
|
63
|
+
const signPayload =
|
|
64
|
+
'source' in parsed && parsed.source === 'multisig' && multisigState
|
|
65
|
+
? MultisigConfig.getSignPayload({
|
|
66
|
+
account: parsed.address,
|
|
67
|
+
config: multisigState.config,
|
|
68
|
+
payload: authorizationSignPayload,
|
|
69
|
+
})
|
|
70
|
+
: authorizationSignPayload
|
|
71
|
+
return {
|
|
72
|
+
...parameters,
|
|
73
|
+
account: parsed,
|
|
74
|
+
chainId,
|
|
75
|
+
multisig: multisigState,
|
|
76
|
+
signPayload,
|
|
77
|
+
} as prepareAuthorization.ReturnType
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export namespace prepareAuthorization {
|
|
81
|
+
export type Options<
|
|
82
|
+
account extends CoreAccount.Account | undefined =
|
|
83
|
+
| CoreAccount.Account
|
|
84
|
+
| undefined,
|
|
85
|
+
> = {
|
|
86
|
+
account?: account | CoreAccount.Account | Address.Address | undefined
|
|
87
|
+
} & {
|
|
88
|
+
/** The access key to authorize. */
|
|
89
|
+
accessKey: resolveAccessKey.Parameters
|
|
90
|
+
/**
|
|
91
|
+
* Whether to authorize the key as an admin key. Admin keys are unrestricted
|
|
92
|
+
* and can manage the account's other access keys; `expiry`, `limits`, and
|
|
93
|
+
* `scopes` are ignored. Requires the T6 hardfork.
|
|
94
|
+
*
|
|
95
|
+
* [TIP-1049](https://tips.sh/1049)
|
|
96
|
+
*/
|
|
97
|
+
admin?: boolean | undefined
|
|
98
|
+
/** The chain ID. */
|
|
99
|
+
chainId?: number | undefined
|
|
100
|
+
/** Unix timestamp when the key expires. */
|
|
101
|
+
expiry?: number | undefined
|
|
102
|
+
/** Spending limits per token. */
|
|
103
|
+
limits?:
|
|
104
|
+
| { token: Address.Address; limit: bigint; period?: number | undefined }[]
|
|
105
|
+
| undefined
|
|
106
|
+
/** @internal Prepared multisig state. */
|
|
107
|
+
multisig?: signKeyAuthorization.Parameters['multisig']
|
|
108
|
+
/** Call scopes restricting which contracts/selectors this key can call. */
|
|
109
|
+
scopes?: KeyAuthorization.Scope[] | undefined
|
|
110
|
+
/**
|
|
111
|
+
* Optional 32-byte witness bound into the authorization's signing hash.
|
|
112
|
+
*
|
|
113
|
+
* Applications use this to bind a single signature to an arbitrary offchain
|
|
114
|
+
* context (e.g. a server-issued challenge), or as a revocation handle that
|
|
115
|
+
* can be burned onchain (see {@link burnWitness}) to invalidate the
|
|
116
|
+
* authorization before it is submitted.
|
|
117
|
+
*
|
|
118
|
+
* [TIP-1053](https://tips.sh/1053)
|
|
119
|
+
*/
|
|
120
|
+
witness?: Hex.Hex | undefined
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type ReturnType = Compute<
|
|
124
|
+
Omit<Options<CoreAccount.Account | undefined>, 'account' | 'chainId'> & {
|
|
125
|
+
account: CoreAccount.Account
|
|
126
|
+
chainId: number
|
|
127
|
+
multisig: signKeyAuthorization.Parameters['multisig']
|
|
128
|
+
/** Payload that the authorizing account or multisig owners sign. */
|
|
129
|
+
signPayload: Hex.Hex
|
|
130
|
+
}
|
|
131
|
+
>
|
|
132
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Address, Errors } from 'ox'
|
|
2
|
+
import type { TransactionReceipt } from '../../chainConfig.js'
|
|
2
3
|
|
|
3
4
|
import type * as Account from '../../../core/Account.js'
|
|
4
5
|
import type * as Chain from '../../../core/Chain.js'
|
|
@@ -41,6 +42,9 @@ export async function revokeSync<
|
|
|
41
42
|
...options,
|
|
42
43
|
throwOnReceiptRevert,
|
|
43
44
|
})
|
|
45
|
+
if ((receipt as TransactionReceipt).status === 'pending')
|
|
46
|
+
return { receipt } as revokeSync.ReturnType
|
|
47
|
+
|
|
44
48
|
const { args } = revoke.extractEvent(receipt.logs)
|
|
45
49
|
return { ...args, receipt }
|
|
46
50
|
}
|