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/chainConfig.ts
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import type { TransactionEnvelope as ox_TxEnvelope } from 'ox'
|
|
2
|
+
import {
|
|
3
|
+
Address,
|
|
4
|
+
Hash,
|
|
5
|
+
Hex,
|
|
6
|
+
TransactionRequest as ox_TransactionRequest,
|
|
7
|
+
} from 'ox'
|
|
3
8
|
import {
|
|
4
9
|
MultisigConfig,
|
|
10
|
+
MultisigOperation,
|
|
11
|
+
type MultisigSimulation,
|
|
5
12
|
SignatureEnvelope,
|
|
6
|
-
Transaction as TransactionTempo,
|
|
7
13
|
TransactionReceipt as TransactionReceiptTempo,
|
|
8
14
|
TransactionRequest as TransactionRequestTempo,
|
|
15
|
+
Transaction as TransactionTempo,
|
|
9
16
|
TxEnvelopeTempo,
|
|
10
17
|
} from 'ox/tempo'
|
|
11
18
|
|
|
@@ -13,13 +20,17 @@ import type * as viem_Account from '../core/Account.js'
|
|
|
13
20
|
import * as Chain from '../core/Chain.js'
|
|
14
21
|
import { getCode } from '../core/actions/address/getCode.js'
|
|
15
22
|
import { read } from '../core/actions/contract/read.js'
|
|
23
|
+
import { get as getTransaction } from '../core/actions/transaction/get.js'
|
|
16
24
|
import { verifyDefault, type verifyHash } from '../core/actions/verifyHash.js'
|
|
17
25
|
import * as Contracts from '../core/internal/contracts.js'
|
|
18
26
|
import * as Abis from './Abis.js'
|
|
27
|
+
import type { MultisigAccount, RootAccount } from './Account.js'
|
|
19
28
|
import * as Addresses from './Addresses.js'
|
|
20
29
|
import type * as Capabilities from './Capabilities.js'
|
|
21
30
|
import type { Hardfork } from './Hardfork.js'
|
|
22
31
|
import type * as KeyAuthorizationManager from './KeyAuthorizationManager.js'
|
|
32
|
+
import { getConfig } from './actions/multisig/getConfig.js'
|
|
33
|
+
import { parseApproval } from './multisig/Signature.js'
|
|
23
34
|
import * as Concurrent from './internal/concurrent.js'
|
|
24
35
|
|
|
25
36
|
const maxExpirySecs = 25
|
|
@@ -42,18 +53,21 @@ export type TransactionRequest = Omit<
|
|
|
42
53
|
Hex.Hex | bigint | number,
|
|
43
54
|
Hex.Hex | number
|
|
44
55
|
>,
|
|
45
|
-
'capabilities' | 'feePayer' | 'nonceKey'
|
|
56
|
+
'capabilities' | 'feePayer' | 'nonceKey' | 'signatures'
|
|
46
57
|
> & {
|
|
47
58
|
/** Capabilities to pass to `eth_fillTransaction`. */
|
|
48
59
|
capabilities?: Capabilities.FillTransactionRequestCapabilities | undefined
|
|
49
60
|
/**
|
|
50
|
-
* Fee payer
|
|
51
|
-
*
|
|
52
|
-
* co-sign the transaction as the fee payer.
|
|
61
|
+
* Fee payer for TIP-1 gas sponsorship. Pass `true` for relay sponsorship,
|
|
62
|
+
* an Account to co-sign locally, or an external sponsor URL allowed by the relay.
|
|
53
63
|
*/
|
|
54
|
-
feePayer?: viem_Account.Account | boolean | undefined
|
|
55
|
-
/**
|
|
56
|
-
|
|
64
|
+
feePayer?: viem_Account.Account | boolean | string | undefined
|
|
65
|
+
/** Stored multisig operation to approve. */
|
|
66
|
+
hash?: Hex.Hex | undefined
|
|
67
|
+
/** Owner signing a multisig approval. */
|
|
68
|
+
owner?: RootAccount | undefined
|
|
69
|
+
/** Multisig account, config, and modeled approvals for gas estimation. */
|
|
70
|
+
multisigSimulation?: MultisigSimulation.Spec | undefined
|
|
57
71
|
/**
|
|
58
72
|
* Nonce key for the 2D nonce system (TIP-1009). `'expiring'` selects an
|
|
59
73
|
* expiring nonce (resolved while the request is prepared); `'random'`
|
|
@@ -75,9 +89,11 @@ export type TransactionRequestRpc = TransactionRequestTempo.Rpc
|
|
|
75
89
|
*/
|
|
76
90
|
export type Envelope = TxEnvelopeTempo.TxEnvelopeTempo & {
|
|
77
91
|
/** Fee payer of the transaction (TIP-1 gas sponsorship). */
|
|
78
|
-
feePayer?: viem_Account.Account | boolean | undefined
|
|
79
|
-
/**
|
|
80
|
-
|
|
92
|
+
feePayer?: viem_Account.Account | boolean | string | undefined
|
|
93
|
+
/** Owner signing a multisig approval. */
|
|
94
|
+
owner?: RootAccount | undefined
|
|
95
|
+
/** Multisig account, config, and modeled approvals for gas estimation. */
|
|
96
|
+
multisigSimulation?: MultisigSimulation.Spec | undefined
|
|
81
97
|
/** Owner approvals to combine into a multisig signature (TIP-1061). */
|
|
82
98
|
signatures?: readonly SignatureEnvelope.Serialized[] | undefined
|
|
83
99
|
}
|
|
@@ -135,6 +151,7 @@ type PrepareAccount = {
|
|
|
135
151
|
address: Address.Address
|
|
136
152
|
accessKeyAddress?: Address.Address | undefined
|
|
137
153
|
config?: MultisigConfig.Config | undefined
|
|
154
|
+
owners?: MultisigAccount['owners'] | undefined
|
|
138
155
|
keyAuthorizationManager?:
|
|
139
156
|
| KeyAuthorizationManager.KeyAuthorizationManager
|
|
140
157
|
| undefined
|
|
@@ -153,7 +170,10 @@ type PrepareRequest = TransactionRequest & {
|
|
|
153
170
|
* decoded via the chain codecs by then). @internal
|
|
154
171
|
*/
|
|
155
172
|
type ToEnvelopeRequest = TransactionRequestTempo.TransactionRequest &
|
|
156
|
-
Pick<
|
|
173
|
+
Pick<
|
|
174
|
+
TransactionRequest,
|
|
175
|
+
'feePayer' | 'multisigSimulation' | 'owner' | 'signatures'
|
|
176
|
+
>
|
|
157
177
|
|
|
158
178
|
/**
|
|
159
179
|
* Shared Tempo chain configuration: RPC converters, transaction hooks
|
|
@@ -167,8 +187,41 @@ export const chainConfig = {
|
|
|
167
187
|
hardfork?: Hardfork | undefined
|
|
168
188
|
}>(),
|
|
169
189
|
codecs: {
|
|
170
|
-
transaction: {
|
|
171
|
-
|
|
190
|
+
transaction: {
|
|
191
|
+
fromRpc(rpc: TransactionRpc): Transaction {
|
|
192
|
+
const transaction = TransactionTempo.fromRpc(rpc)
|
|
193
|
+
return {
|
|
194
|
+
...transaction,
|
|
195
|
+
...(rpc.multisig
|
|
196
|
+
? {
|
|
197
|
+
multisig: MultisigOperation.fromRpc(
|
|
198
|
+
rpc.multisig,
|
|
199
|
+
) as MultisigOperation.TransactionOperation,
|
|
200
|
+
}
|
|
201
|
+
: {}),
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
transactionReceipt: {
|
|
206
|
+
fromRpc(rpc: TransactionReceiptRpc): TransactionReceipt {
|
|
207
|
+
const receipt = TransactionReceiptTempo.fromRpc(
|
|
208
|
+
rpc as TransactionReceiptTempo.Rpc,
|
|
209
|
+
)
|
|
210
|
+
return {
|
|
211
|
+
...receipt,
|
|
212
|
+
...(rpc.status === 'pending'
|
|
213
|
+
? { status: 'pending' as const, type: 'tempo' as const }
|
|
214
|
+
: {}),
|
|
215
|
+
...(rpc.multisig
|
|
216
|
+
? {
|
|
217
|
+
multisig: MultisigOperation.fromRpc(
|
|
218
|
+
rpc.multisig,
|
|
219
|
+
) as MultisigOperation.TransactionOperation,
|
|
220
|
+
}
|
|
221
|
+
: {}),
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
},
|
|
172
225
|
transactionRequest: {
|
|
173
226
|
fromRpc: decodeRequest,
|
|
174
227
|
toRpc: encodeRequest,
|
|
@@ -192,6 +245,68 @@ export const chainConfig = {
|
|
|
192
245
|
const account_ = request.account
|
|
193
246
|
const account = typeof account_ === 'string' ? undefined : account_
|
|
194
247
|
|
|
248
|
+
if (request.hash) {
|
|
249
|
+
if (
|
|
250
|
+
!request.account ||
|
|
251
|
+
typeof request.account === 'string' ||
|
|
252
|
+
request.account.source !== 'multisig'
|
|
253
|
+
)
|
|
254
|
+
throw new Error(
|
|
255
|
+
'A local multisig account is required to approve a stored multisig transaction.',
|
|
256
|
+
)
|
|
257
|
+
if (!request.owner || typeof request.owner === 'string')
|
|
258
|
+
throw new Error(
|
|
259
|
+
'A local owner account is required to approve a stored multisig transaction.',
|
|
260
|
+
)
|
|
261
|
+
if (request.owner.source !== 'root')
|
|
262
|
+
throw new Error(
|
|
263
|
+
'A Tempo owner account is required to approve a stored multisig transaction.',
|
|
264
|
+
)
|
|
265
|
+
const transaction = await getTransaction(client, {
|
|
266
|
+
hash: request.hash,
|
|
267
|
+
})
|
|
268
|
+
const operation =
|
|
269
|
+
'multisig' in transaction
|
|
270
|
+
? (transaction.multisig as
|
|
271
|
+
| MultisigOperation.TransactionOperation
|
|
272
|
+
| undefined)
|
|
273
|
+
: undefined
|
|
274
|
+
if (!operation)
|
|
275
|
+
throw new Error('Expected a multisig operation transaction.')
|
|
276
|
+
if (!Address.isEqual(operation.account, request.account.address))
|
|
277
|
+
throw new Error(
|
|
278
|
+
'Multisig operation account does not match the requested account.',
|
|
279
|
+
)
|
|
280
|
+
const storedTransaction = TxEnvelopeTempo.deserialize(
|
|
281
|
+
operation.transaction as TxEnvelopeTempo.Serialized,
|
|
282
|
+
)
|
|
283
|
+
const hash = MultisigOperation.getHash({
|
|
284
|
+
account: operation.account,
|
|
285
|
+
config: operation.config,
|
|
286
|
+
transaction: operation.transaction as TxEnvelopeTempo.Serialized,
|
|
287
|
+
type: 'transaction',
|
|
288
|
+
})
|
|
289
|
+
if (hash.toLowerCase() !== request.hash.toLowerCase())
|
|
290
|
+
throw new Error(
|
|
291
|
+
'Multisig operation hash does not match transaction.',
|
|
292
|
+
)
|
|
293
|
+
Object.assign(request, {
|
|
294
|
+
...storedTransaction,
|
|
295
|
+
gas: storedTransaction.gas ?? 0n,
|
|
296
|
+
maxFeePerGas: storedTransaction.maxFeePerGas ?? 0n,
|
|
297
|
+
maxPriorityFeePerGas: storedTransaction.maxPriorityFeePerGas ?? 0n,
|
|
298
|
+
nonce: Number(storedTransaction.nonce ?? 0n),
|
|
299
|
+
account: request.account,
|
|
300
|
+
from: operation.account,
|
|
301
|
+
multisigSimulation: getMultisigSimulation({
|
|
302
|
+
config: operation.config,
|
|
303
|
+
local: request.account as MultisigAccount,
|
|
304
|
+
}),
|
|
305
|
+
owner: request.owner,
|
|
306
|
+
})
|
|
307
|
+
return request as Record<string, unknown>
|
|
308
|
+
}
|
|
309
|
+
|
|
195
310
|
if (phase === 'afterFillParameters') {
|
|
196
311
|
if (
|
|
197
312
|
typeof request.gas !== 'undefined' &&
|
|
@@ -229,8 +344,9 @@ export const chainConfig = {
|
|
|
229
344
|
// The node's gas estimator prices the (larger) envelope signature
|
|
230
345
|
// from `keyType`/`keyData`/`keyId` hints; derive them from the
|
|
231
346
|
// signing account.
|
|
232
|
-
|
|
233
|
-
|
|
347
|
+
const signer = request.owner ?? account
|
|
348
|
+
if (signer && typeof signer !== 'string') {
|
|
349
|
+
const type = signer.keyType ?? signer.source
|
|
234
350
|
if (type === 'webAuthn') {
|
|
235
351
|
request.keyType = 'webAuthn'
|
|
236
352
|
// A 2-byte big-endian length hint (1400 = 0x0578) instead of a
|
|
@@ -240,41 +356,60 @@ export const chainConfig = {
|
|
|
240
356
|
request.keyType = type
|
|
241
357
|
request.keyData = undefined
|
|
242
358
|
}
|
|
243
|
-
if (
|
|
359
|
+
if ('accessKeyAddress' in signer && signer.accessKeyAddress)
|
|
360
|
+
request.keyId = signer.accessKeyAddress
|
|
244
361
|
}
|
|
245
362
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
if (
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
363
|
+
const multisigIdentity = (() => {
|
|
364
|
+
if (account?.source === 'multisig')
|
|
365
|
+
return {
|
|
366
|
+
account: account.address,
|
|
367
|
+
config: (account as MultisigAccount).config,
|
|
368
|
+
local: account as MultisigAccount,
|
|
369
|
+
}
|
|
370
|
+
return undefined
|
|
371
|
+
})()
|
|
372
|
+
if (request.owner && !multisigIdentity)
|
|
373
|
+
throw new Error(
|
|
374
|
+
'A multisig account is required when an owner is provided.',
|
|
375
|
+
)
|
|
376
|
+
if (request.owner && typeof request.owner === 'string')
|
|
377
|
+
throw new Error(
|
|
378
|
+
'A local owner account is required to approve a multisig transaction.',
|
|
379
|
+
)
|
|
380
|
+
if (request.owner && request.owner.source !== 'root')
|
|
381
|
+
throw new Error(
|
|
382
|
+
'A Tempo owner account is required to approve a multisig transaction.',
|
|
383
|
+
)
|
|
384
|
+
const coordinatedMultisig =
|
|
385
|
+
!!multisigIdentity &&
|
|
386
|
+
!!request.owner &&
|
|
387
|
+
(client.transport as { multisig?: boolean }).multisig === true
|
|
388
|
+
if (multisigIdentity) {
|
|
389
|
+
const { account, local } = multisigIdentity
|
|
390
|
+
if (!account)
|
|
391
|
+
throw new Error(
|
|
392
|
+
'A multisig account address is required with a current config.',
|
|
393
|
+
)
|
|
394
|
+
const config = await (async () => {
|
|
395
|
+
if (multisigIdentity.config) return multisigIdentity.config
|
|
396
|
+
if (!coordinatedMultisig) return undefined
|
|
397
|
+
const cachedConfig = await getConfig(client, { address: account })
|
|
398
|
+
if (!cachedConfig)
|
|
399
|
+
throw new Error(
|
|
400
|
+
`No current multisig config is cached for account ${account}. Provide the current config.`,
|
|
401
|
+
)
|
|
402
|
+
return cachedConfig
|
|
403
|
+
})()
|
|
404
|
+
if (!config)
|
|
405
|
+
throw new Error(
|
|
406
|
+
'A multisig config is required to prepare a transaction.',
|
|
407
|
+
)
|
|
408
|
+
request.from = account
|
|
409
|
+
request.multisigSimulation = getMultisigSimulation({
|
|
410
|
+
config,
|
|
411
|
+
local,
|
|
412
|
+
})
|
|
278
413
|
}
|
|
279
414
|
|
|
280
415
|
// Use expiring nonces for concurrent transactions (TIP-1009).
|
|
@@ -286,7 +421,7 @@ export const chainConfig = {
|
|
|
286
421
|
request.nonceKey === maxUint256
|
|
287
422
|
)
|
|
288
423
|
return true
|
|
289
|
-
if (
|
|
424
|
+
if (multisigIdentity) return false
|
|
290
425
|
if (request.feePayer && typeof request.nonceKey === 'undefined')
|
|
291
426
|
return true
|
|
292
427
|
const address =
|
|
@@ -298,9 +433,12 @@ export const chainConfig = {
|
|
|
298
433
|
return false
|
|
299
434
|
})()
|
|
300
435
|
|
|
301
|
-
if (
|
|
302
|
-
request.nonceKey =
|
|
436
|
+
if (coordinatedMultisig && typeof request.nonceKey === 'undefined') {
|
|
437
|
+
request.nonceKey = Hex.toBigInt(Hex.random(31)) + 1n
|
|
303
438
|
request.nonce = 0
|
|
439
|
+
} else if (useExpiringNonce) {
|
|
440
|
+
request.nonceKey = maxUint256
|
|
441
|
+
request.nonce ??= 0
|
|
304
442
|
if (typeof request.validAfter === 'undefined')
|
|
305
443
|
request.validAfter = randomValidAfter()
|
|
306
444
|
if (typeof request.validBefore === 'undefined')
|
|
@@ -382,28 +520,30 @@ export const chainConfig = {
|
|
|
382
520
|
return SignatureEnvelope.from(signature)
|
|
383
521
|
})()
|
|
384
522
|
|
|
385
|
-
// Combine owner approvals
|
|
386
|
-
// (TIP-1061) before fee-payer handling. Bootstrap (`init`) is detected
|
|
387
|
-
// from the true first transaction: nonce 0 on the default nonce key.
|
|
523
|
+
// Combine owner approvals before fee-payer handling.
|
|
388
524
|
const signature = (() => {
|
|
389
525
|
if (signature_provided) return signature_provided
|
|
390
|
-
if (!envelope.
|
|
526
|
+
if (!envelope.multisigSimulation || !envelope.signatures)
|
|
527
|
+
return undefined
|
|
391
528
|
|
|
529
|
+
if (!envelope.from)
|
|
530
|
+
throw new Error('A multisig sender is required for signing.')
|
|
392
531
|
const payload = TxEnvelopeTempo.getSignPayload(
|
|
393
532
|
TxEnvelopeTempo.from(envelope),
|
|
394
533
|
)
|
|
395
534
|
const signatures = envelope.signatures.map((approval) =>
|
|
396
|
-
|
|
535
|
+
parseApproval(approval),
|
|
397
536
|
)
|
|
398
537
|
const sorted = SignatureEnvelope.sortMultisigApprovals({
|
|
399
538
|
payload,
|
|
400
539
|
signatures,
|
|
401
|
-
|
|
540
|
+
account: envelope.from!,
|
|
541
|
+
config: MultisigConfig.from(envelope.multisigSimulation.config),
|
|
402
542
|
})
|
|
403
543
|
return SignatureEnvelope.from({
|
|
404
|
-
|
|
544
|
+
account: envelope.from!,
|
|
545
|
+
config: MultisigConfig.from(envelope.multisigSimulation.config),
|
|
405
546
|
signatures: sorted,
|
|
406
|
-
...(envelope.nonce || envelope.nonceKey ? {} : { init: true }),
|
|
407
547
|
})
|
|
408
548
|
})()
|
|
409
549
|
|
|
@@ -441,7 +581,7 @@ export const chainConfig = {
|
|
|
441
581
|
// Non-tempo requests delegate to the generic default.
|
|
442
582
|
if (!isTempoRequest(request)) return undefined
|
|
443
583
|
|
|
444
|
-
const { feePayer,
|
|
584
|
+
const { feePayer, multisigSimulation, owner, signatures, ...rest } =
|
|
445
585
|
request as ToEnvelopeRequest
|
|
446
586
|
|
|
447
587
|
const envelope = TransactionRequestTempo.toEnvelope({
|
|
@@ -454,7 +594,8 @@ export const chainConfig = {
|
|
|
454
594
|
return {
|
|
455
595
|
...envelope,
|
|
456
596
|
...(typeof feePayer !== 'undefined' ? { feePayer } : {}),
|
|
457
|
-
...(
|
|
597
|
+
...(multisigSimulation ? { multisigSimulation } : {}),
|
|
598
|
+
...(owner ? { owner } : {}),
|
|
458
599
|
...(signatures ? { signatures } : {}),
|
|
459
600
|
} as Envelope
|
|
460
601
|
},
|
|
@@ -577,9 +718,8 @@ function isTempoRequest(request: Record<string, unknown>): boolean {
|
|
|
577
718
|
typeof request.keyData !== 'undefined' ||
|
|
578
719
|
typeof request.keyId !== 'undefined' ||
|
|
579
720
|
typeof request.keyType !== 'undefined' ||
|
|
580
|
-
typeof request.
|
|
581
|
-
typeof request.
|
|
582
|
-
typeof request.multisigSignatureCount !== 'undefined' ||
|
|
721
|
+
typeof request.multisigSimulation !== 'undefined' ||
|
|
722
|
+
typeof request.owner !== 'undefined' ||
|
|
583
723
|
typeof request.nonceKey !== 'undefined' ||
|
|
584
724
|
typeof request.signature !== 'undefined' ||
|
|
585
725
|
typeof request.signatures !== 'undefined' ||
|
|
@@ -607,7 +747,7 @@ function encodeRequest(
|
|
|
607
747
|
// reaches the wire.
|
|
608
748
|
const {
|
|
609
749
|
feePayer,
|
|
610
|
-
|
|
750
|
+
owner: _owner,
|
|
611
751
|
nonceKey,
|
|
612
752
|
signatures: _signatures,
|
|
613
753
|
...rest
|
|
@@ -627,32 +767,93 @@ function encodeRequest(
|
|
|
627
767
|
// fee payer commits to it when co-signing. (ox withholds `feeToken` only
|
|
628
768
|
// for external sponsorship, where the fee payer picks the token.)
|
|
629
769
|
if (typeof feePayer === 'object') rpc.feePayer = true
|
|
770
|
+
if (typeof feePayer === 'string') Object.assign(rpc, { feePayer })
|
|
630
771
|
|
|
631
772
|
return rpc
|
|
632
773
|
}
|
|
633
774
|
|
|
634
|
-
/**
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
const
|
|
640
|
-
|
|
641
|
-
.map((owner) =>
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
775
|
+
/** Builds a bounded multisig spec for gas simulation. */
|
|
776
|
+
function getMultisigSimulation(options: {
|
|
777
|
+
config: MultisigConfig.Config
|
|
778
|
+
local?: MultisigAccount | undefined
|
|
779
|
+
}): MultisigSimulation.Spec {
|
|
780
|
+
const { config, local } = options
|
|
781
|
+
return {
|
|
782
|
+
approvals: selectOwners(config).map((owner) => {
|
|
783
|
+
const localOwner = local?.owners.find((account) =>
|
|
784
|
+
Address.isEqual(account.address, owner.owner),
|
|
785
|
+
)
|
|
786
|
+
return {
|
|
787
|
+
...getSimulationKey(localOwner),
|
|
788
|
+
owner: owner.owner,
|
|
789
|
+
}
|
|
790
|
+
}),
|
|
791
|
+
config,
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
/** Returns signature metadata for conservative gas estimation. */
|
|
796
|
+
function getSimulationKey(
|
|
797
|
+
account: unknown,
|
|
798
|
+
):
|
|
799
|
+
| { keyData: Hex.Hex; keyType: 'webAuthn' }
|
|
800
|
+
| { keyType: 'p256' | 'secp256k1' } {
|
|
801
|
+
const keyType = (() => {
|
|
802
|
+
if (
|
|
803
|
+
account &&
|
|
804
|
+
typeof account === 'object' &&
|
|
805
|
+
'keyType' in account &&
|
|
806
|
+
typeof account.keyType === 'string'
|
|
807
|
+
)
|
|
808
|
+
return account.keyType
|
|
809
|
+
return undefined
|
|
810
|
+
})()
|
|
811
|
+
if (!keyType || keyType === 'webAuthn')
|
|
812
|
+
return { keyData: '0x0578' as const, keyType: 'webAuthn' as const }
|
|
813
|
+
if (keyType === 'p256' || keyType === 'secp256k1') return { keyType }
|
|
814
|
+
return { keyData: '0x0578' as const, keyType: 'webAuthn' as const }
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
/** Selects a deterministic minimum-cardinality owner quorum. */
|
|
818
|
+
function selectOwners(config: MultisigConfig.Config) {
|
|
819
|
+
const owners = [...config.owners].sort(
|
|
820
|
+
(a, b) =>
|
|
821
|
+
Number(b.weight) - Number(a.weight) ||
|
|
822
|
+
a.owner.toLowerCase().localeCompare(b.owner.toLowerCase()),
|
|
823
|
+
)
|
|
824
|
+
const selected: typeof owners = []
|
|
825
|
+
let weight = 0
|
|
826
|
+
for (const owner of owners.slice(0, MultisigConfig.maxSignatures)) {
|
|
827
|
+
if (weight >= Number(config.threshold)) break
|
|
828
|
+
selected.push(owner)
|
|
829
|
+
weight += Number(owner.weight)
|
|
647
830
|
}
|
|
648
|
-
return
|
|
831
|
+
return selected.sort((a, b) =>
|
|
832
|
+
a.owner.toLowerCase().localeCompare(b.owner.toLowerCase()),
|
|
833
|
+
)
|
|
649
834
|
}
|
|
650
835
|
|
|
651
836
|
// Exported so consumer declaration emit can name them. See `internal/inference.ts`.
|
|
652
|
-
export type Transaction = TransactionTempo.Transaction
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
export type
|
|
837
|
+
export type Transaction = TransactionTempo.Transaction & {
|
|
838
|
+
multisig?: MultisigOperation.TransactionOperation | undefined
|
|
839
|
+
}
|
|
840
|
+
export type TransactionRpc = TransactionTempo.Rpc & {
|
|
841
|
+
multisig?: MultisigOperation.TransactionRpc | undefined
|
|
842
|
+
}
|
|
843
|
+
export type TransactionReceipt = Omit<
|
|
844
|
+
TransactionReceiptTempo.TransactionReceipt,
|
|
845
|
+
'status'
|
|
846
|
+
> & {
|
|
847
|
+
status: 'success' | 'reverted' | 'pending'
|
|
848
|
+
multisig?: MultisigOperation.TransactionOperation | undefined
|
|
849
|
+
}
|
|
850
|
+
export type TransactionReceiptRpc = Omit<
|
|
851
|
+
TransactionReceiptTempo.Rpc,
|
|
852
|
+
'status'
|
|
853
|
+
> & {
|
|
854
|
+
status: '0x0' | '0x1' | 'pending'
|
|
855
|
+
multisig?: MultisigOperation.TransactionRpc | undefined
|
|
856
|
+
}
|
|
656
857
|
export type TxEnvelope = ox_TxEnvelope.TxEnvelope
|
|
657
858
|
export type SerializeOptions = TxEnvelopeTempo.serialize.Options
|
|
658
859
|
|
package/src/tempo/index.ts
CHANGED
|
@@ -6,6 +6,8 @@ export {
|
|
|
6
6
|
EarnShares,
|
|
7
7
|
KeyAuthorization,
|
|
8
8
|
MultisigConfig,
|
|
9
|
+
MultisigOperation,
|
|
10
|
+
MultisigSimulation,
|
|
9
11
|
Period,
|
|
10
12
|
ReceivePolicyReceipt,
|
|
11
13
|
SignatureEnvelope,
|
|
@@ -24,7 +26,7 @@ export { custom } from '../core/transports/custom.js'
|
|
|
24
26
|
export { fallback } from '../core/transports/fallback.js'
|
|
25
27
|
|
|
26
28
|
/** Creates an HTTP JSON-RPC transport. */
|
|
27
|
-
export { http } from '
|
|
29
|
+
export { http } from './Transport.js'
|
|
28
30
|
|
|
29
31
|
/** Creates a WebSocket JSON-RPC transport. */
|
|
30
32
|
export { webSocket } from '../core/transports/webSocket.js'
|
|
@@ -51,11 +53,14 @@ export * as Chain from './Chain.js'
|
|
|
51
53
|
export * as Client from './Client.js'
|
|
52
54
|
|
|
53
55
|
/** Tempo action decorator for a Client's `.extend`. */
|
|
54
|
-
export { type Decorator as TempoActions
|
|
56
|
+
export { tempoActions, type Decorator as TempoActions } from './Decorator.js'
|
|
55
57
|
|
|
56
58
|
/** Tempo errors. */
|
|
57
59
|
export * from './errors.js'
|
|
58
60
|
|
|
61
|
+
/** Decodes Tempo precompile reverts into readable execution errors. */
|
|
62
|
+
export * as ExecutionError from './ExecutionError.js'
|
|
63
|
+
|
|
59
64
|
/** Helpers producing unix timestamps for key expiries. */
|
|
60
65
|
export * as Expiry from './Expiry.js'
|
|
61
66
|
|
|
@@ -68,6 +73,9 @@ export * as KeyAuthorizationManager from './KeyAuthorizationManager.js'
|
|
|
68
73
|
/** P256 (secp256r1) key utilities. Re-exports `ox/P256`. */
|
|
69
74
|
export * as P256 from './P256.js'
|
|
70
75
|
|
|
76
|
+
/** Composable relay request handlers. */
|
|
77
|
+
export * as Relay from './Relay.js'
|
|
78
|
+
|
|
71
79
|
/** Call scopes restricting access keys to targets & selectors. */
|
|
72
80
|
export * as Scopes from './Scopes.js'
|
|
73
81
|
|
|
@@ -75,10 +83,10 @@ export * as Scopes from './Scopes.js'
|
|
|
75
83
|
export * as Selectors from './Selectors.js'
|
|
76
84
|
|
|
77
85
|
/** Minimal async key-value storages (memory, session). */
|
|
78
|
-
export * as
|
|
86
|
+
export * as Store from './Store.js'
|
|
79
87
|
|
|
80
88
|
/** Relay transport: routes fee sponsorship traffic to a fee payer service. */
|
|
81
|
-
export {
|
|
89
|
+
export { withRelay } from './Transport.js'
|
|
82
90
|
|
|
83
91
|
/** WebAuthn P256 credential creation & signing. */
|
|
84
92
|
export * as WebAuthnP256 from './WebAuthnP256.js'
|
|
@@ -90,3 +98,6 @@ export * as WebCryptoP256 from './WebCryptoP256.js'
|
|
|
90
98
|
// export tables of modules the consumer imports, and a consumer importing only
|
|
91
99
|
// `viem/tempo` never imports `viem`. See `internal/inference.ts`.
|
|
92
100
|
export type * from '../internal/inference.js'
|
|
101
|
+
|
|
102
|
+
/** Tempo Zone chains. */
|
|
103
|
+
export * as Zone from './Zone.js'
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { withTimeout } from '../../../core/internal/promise.js'
|
|
2
|
+
import type * as Store_ from '../../Store.js'
|
|
3
|
+
|
|
4
|
+
export type Store = Store_.Store
|
|
5
|
+
|
|
6
|
+
// Scope in-flight work to one request so Workers never share request-owned I/O.
|
|
7
|
+
const flights = new WeakMap<Store, Map<string, Promise<unknown>>>()
|
|
8
|
+
const prefix = 'viem:relay:cache:'
|
|
9
|
+
|
|
10
|
+
export function scoped(store: Store | undefined): Store | undefined {
|
|
11
|
+
if (!store) return undefined
|
|
12
|
+
return {
|
|
13
|
+
getItem: (key) => store.getItem(key),
|
|
14
|
+
setItem: (key, value) => store.setItem(key, value),
|
|
15
|
+
removeItem: (key) => store.removeItem(key),
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export async function memoize<value>(
|
|
20
|
+
fetch: () => Promise<value>,
|
|
21
|
+
options: { key: string; store: Store; ttl: number },
|
|
22
|
+
): Promise<value> {
|
|
23
|
+
const { store, ttl } = options
|
|
24
|
+
const key = `${prefix}${options.key}`
|
|
25
|
+
let active = true
|
|
26
|
+
const timeoutError = new Error('Relay cache operation timed out.')
|
|
27
|
+
return withTimeout(
|
|
28
|
+
async () => {
|
|
29
|
+
const raw = await store.getItem(key)
|
|
30
|
+
if (!active) throw timeoutError
|
|
31
|
+
if (raw) {
|
|
32
|
+
try {
|
|
33
|
+
const entry = JSON.parse(raw, (_key, item) => {
|
|
34
|
+
if (typeof item !== 'string' || !item.startsWith(prefix))
|
|
35
|
+
return item
|
|
36
|
+
if (item.startsWith(`${prefix}string:`))
|
|
37
|
+
return item.slice(`${prefix}string:`.length)
|
|
38
|
+
if (item.startsWith(`${prefix}bigint:`))
|
|
39
|
+
return BigInt(item.slice(`${prefix}bigint:`.length))
|
|
40
|
+
throw new TypeError('Invalid relay cache value.')
|
|
41
|
+
}) as { value: value; expiresAt: number }
|
|
42
|
+
if (entry.expiresAt > Date.now()) return entry.value
|
|
43
|
+
} catch {
|
|
44
|
+
// Refresh malformed or older entries.
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
let pending = flights.get(store)
|
|
48
|
+
if (!pending) {
|
|
49
|
+
pending = new Map()
|
|
50
|
+
flights.set(store, pending)
|
|
51
|
+
}
|
|
52
|
+
const existing = pending.get(key)
|
|
53
|
+
if (existing) return existing as Promise<value>
|
|
54
|
+
const result = (async () => {
|
|
55
|
+
const value = await fetch()
|
|
56
|
+
if (!active) throw timeoutError
|
|
57
|
+
if (value !== undefined)
|
|
58
|
+
await store.setItem(
|
|
59
|
+
key,
|
|
60
|
+
JSON.stringify(
|
|
61
|
+
{ value, expiresAt: Date.now() + ttl },
|
|
62
|
+
(_key, item) => {
|
|
63
|
+
if (typeof item === 'bigint') return `${prefix}bigint:${item}`
|
|
64
|
+
if (typeof item === 'string' && item.startsWith(prefix))
|
|
65
|
+
return `${prefix}string:${item}`
|
|
66
|
+
return item
|
|
67
|
+
},
|
|
68
|
+
),
|
|
69
|
+
)
|
|
70
|
+
return value
|
|
71
|
+
})().finally(() => pending.delete(key))
|
|
72
|
+
pending.set(key, result)
|
|
73
|
+
return result
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
timeout: 30_000,
|
|
77
|
+
errorInstance: timeoutError,
|
|
78
|
+
},
|
|
79
|
+
).finally(() => {
|
|
80
|
+
active = false
|
|
81
|
+
})
|
|
82
|
+
}
|