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
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import * as RpcResponse from 'ox/RpcResponse'
|
|
2
|
+
import { BaseError } from '../../core/Errors.js'
|
|
3
|
+
import type * as Relay from '../Relay.js'
|
|
4
|
+
import { toRpcError } from './relay/utils.js'
|
|
5
|
+
|
|
6
|
+
/** Adapts an RPC handler to the Fetch API without changing its method results. */
|
|
7
|
+
export async function fetch(
|
|
8
|
+
request: Request,
|
|
9
|
+
handler: Relay.handleRequest.Handler,
|
|
10
|
+
options: Relay.handleRequest.RequestOptions = {},
|
|
11
|
+
): Promise<Response> {
|
|
12
|
+
if (request.method !== 'POST')
|
|
13
|
+
return new Response(null, { status: 405, headers: { Allow: 'POST' } })
|
|
14
|
+
const contentType = request.headers
|
|
15
|
+
.get('content-type')
|
|
16
|
+
?.split(';')[0]
|
|
17
|
+
?.trim()
|
|
18
|
+
.toLowerCase()
|
|
19
|
+
if (contentType !== 'application/json')
|
|
20
|
+
return new Response(null, { status: 415 })
|
|
21
|
+
|
|
22
|
+
const body = await (async () => {
|
|
23
|
+
try {
|
|
24
|
+
return { value: (await request.json()) as unknown }
|
|
25
|
+
} catch {
|
|
26
|
+
return {
|
|
27
|
+
error: {
|
|
28
|
+
jsonrpc: '2.0',
|
|
29
|
+
id: null,
|
|
30
|
+
error: { code: -32700, message: 'Parse error' },
|
|
31
|
+
},
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
})()
|
|
35
|
+
if (body.error) return Response.json(body.error)
|
|
36
|
+
|
|
37
|
+
const requestOptions = {
|
|
38
|
+
...options,
|
|
39
|
+
signal: options.signal ?? request.signal,
|
|
40
|
+
}
|
|
41
|
+
const handle = async (value: unknown) => {
|
|
42
|
+
if (
|
|
43
|
+
!value ||
|
|
44
|
+
typeof value !== 'object' ||
|
|
45
|
+
Array.isArray(value) ||
|
|
46
|
+
!('jsonrpc' in value) ||
|
|
47
|
+
value.jsonrpc !== '2.0' ||
|
|
48
|
+
!('method' in value) ||
|
|
49
|
+
typeof value.method !== 'string' ||
|
|
50
|
+
('id' in value &&
|
|
51
|
+
value.id !== null &&
|
|
52
|
+
typeof value.id !== 'string' &&
|
|
53
|
+
(typeof value.id !== 'number' || !Number.isFinite(value.id))) ||
|
|
54
|
+
('params' in value &&
|
|
55
|
+
(value.params === null || typeof value.params !== 'object'))
|
|
56
|
+
)
|
|
57
|
+
return {
|
|
58
|
+
jsonrpc: '2.0',
|
|
59
|
+
id: null,
|
|
60
|
+
error: { code: -32600, message: 'Invalid Request' },
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const id = 'id' in value ? value.id : undefined
|
|
64
|
+
try {
|
|
65
|
+
if ('params' in value && !Array.isArray(value.params))
|
|
66
|
+
throw new RpcResponse.InvalidParamsError({
|
|
67
|
+
message: 'Expected positional RPC parameters.',
|
|
68
|
+
})
|
|
69
|
+
const metadata = {}
|
|
70
|
+
const result = await handler(
|
|
71
|
+
{
|
|
72
|
+
method: value.method,
|
|
73
|
+
...('params' in value
|
|
74
|
+
? { params: value.params as readonly unknown[] }
|
|
75
|
+
: {}),
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
...requestOptions,
|
|
79
|
+
response: metadata,
|
|
80
|
+
} as Relay.handleRequest.RequestOptions,
|
|
81
|
+
)
|
|
82
|
+
if (id === undefined) return undefined
|
|
83
|
+
// Serialization errors belong to this batch item, not the entire response.
|
|
84
|
+
return JSON.parse(
|
|
85
|
+
JSON.stringify({
|
|
86
|
+
jsonrpc: '2.0',
|
|
87
|
+
id,
|
|
88
|
+
result: result ?? null,
|
|
89
|
+
...metadata,
|
|
90
|
+
}),
|
|
91
|
+
) as unknown
|
|
92
|
+
} catch (error) {
|
|
93
|
+
requestOptions.signal.throwIfAborted()
|
|
94
|
+
if (id === undefined) return undefined
|
|
95
|
+
const cause =
|
|
96
|
+
error instanceof BaseError
|
|
97
|
+
? error.walk((error) => error instanceof RpcResponse.BaseError)
|
|
98
|
+
: error
|
|
99
|
+
const rpc =
|
|
100
|
+
cause instanceof RpcResponse.BaseError ? toRpcError(cause) : undefined
|
|
101
|
+
const rpcError = rpc
|
|
102
|
+
? { code: rpc.code, message: rpc.message, data: rpc.data }
|
|
103
|
+
: { code: -32603, message: 'Internal error' }
|
|
104
|
+
try {
|
|
105
|
+
return JSON.parse(
|
|
106
|
+
JSON.stringify({ jsonrpc: '2.0', id, error: rpcError }),
|
|
107
|
+
) as unknown
|
|
108
|
+
} catch {
|
|
109
|
+
return {
|
|
110
|
+
jsonrpc: '2.0',
|
|
111
|
+
id,
|
|
112
|
+
error: { code: -32603, message: 'Internal error' },
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if (Array.isArray(body.value) && body.value.length > 0) {
|
|
119
|
+
if (body.value.length > 100)
|
|
120
|
+
return Response.json({
|
|
121
|
+
jsonrpc: '2.0',
|
|
122
|
+
id: null,
|
|
123
|
+
error: {
|
|
124
|
+
code: -32600,
|
|
125
|
+
message: 'Batch exceeds the limit of 100 requests.',
|
|
126
|
+
},
|
|
127
|
+
})
|
|
128
|
+
|
|
129
|
+
const batch = body.value
|
|
130
|
+
const results = new Array<unknown>(batch.length)
|
|
131
|
+
let index = 0
|
|
132
|
+
await Promise.all(
|
|
133
|
+
Array.from({ length: Math.min(10, batch.length) }, async () => {
|
|
134
|
+
while (index < batch.length) {
|
|
135
|
+
const current = index++
|
|
136
|
+
results[current] = await handle(batch[current])
|
|
137
|
+
}
|
|
138
|
+
}),
|
|
139
|
+
)
|
|
140
|
+
const responses = results.filter((value) => value !== undefined)
|
|
141
|
+
return responses.length
|
|
142
|
+
? Response.json(responses)
|
|
143
|
+
: new Response(null, { status: 204 })
|
|
144
|
+
}
|
|
145
|
+
const response = await handle(body.value)
|
|
146
|
+
return response === undefined
|
|
147
|
+
? new Response(null, { status: 204 })
|
|
148
|
+
: Response.json(response)
|
|
149
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Address } from 'ox'
|
|
2
2
|
|
|
3
3
|
import type { writeSync } from '../../core/actions/contract/writeSync.js'
|
|
4
|
-
import type { TransactionRequest } from '../chainConfig.js'
|
|
5
4
|
import type { UnionPick } from '../../core/internal/types.js'
|
|
5
|
+
import type { TransactionRequest } from '../chainConfig.js'
|
|
6
6
|
|
|
7
7
|
export type {
|
|
8
8
|
ReadParameters,
|
|
@@ -41,6 +41,7 @@ export type WriteParameters = UnionPick<
|
|
|
41
41
|
| 'feeToken'
|
|
42
42
|
| 'keyAuthorization'
|
|
43
43
|
| 'nonceKey'
|
|
44
|
+
| 'owner'
|
|
44
45
|
| 'validAfter'
|
|
45
46
|
| 'validBefore'
|
|
46
47
|
>
|
|
@@ -121,6 +121,7 @@ export function pickWriteParameters(parameters: Record<string, unknown>) {
|
|
|
121
121
|
maxPriorityFeePerGas,
|
|
122
122
|
nonce,
|
|
123
123
|
nonceKey,
|
|
124
|
+
owner,
|
|
124
125
|
validAfter,
|
|
125
126
|
validBefore,
|
|
126
127
|
} = parameters
|
|
@@ -135,6 +136,7 @@ export function pickWriteParameters(parameters: Record<string, unknown>) {
|
|
|
135
136
|
maxPriorityFeePerGas,
|
|
136
137
|
nonce,
|
|
137
138
|
nonceKey,
|
|
139
|
+
owner,
|
|
138
140
|
validAfter,
|
|
139
141
|
validBefore,
|
|
140
142
|
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import type { Hex } from 'ox'
|
|
2
|
+
import { Address, Hash, Json } from 'ox'
|
|
3
|
+
import { MultisigConfig } from 'ox/tempo'
|
|
4
|
+
import { BaseError } from '../../core/Errors.js'
|
|
5
|
+
import { nativeMultisigFactory } from '../Addresses.js'
|
|
6
|
+
import type * as Store from '../Store.js'
|
|
7
|
+
|
|
8
|
+
/** A valid 48-owner config is much smaller; 64 KiB bounds hostile store parsing work. */
|
|
9
|
+
const maxStoredValueLength = 65_536
|
|
10
|
+
|
|
11
|
+
/** Zero commitment used before an account is initialized. */
|
|
12
|
+
const zeroCommitment = `0x${'00'.repeat(32)}` as const
|
|
13
|
+
|
|
14
|
+
/** Reads a cached multisig config. */
|
|
15
|
+
export async function read(
|
|
16
|
+
store: Store.Store,
|
|
17
|
+
options: read.Options,
|
|
18
|
+
): Promise<MultisigConfig.Config | null> {
|
|
19
|
+
const { address, commitment } = options
|
|
20
|
+
const value = await store.getItem(key({ address, commitment }))
|
|
21
|
+
if (value === null || value === undefined) return null
|
|
22
|
+
const config = deserialize(value)
|
|
23
|
+
assertKey({ address, commitment, config })
|
|
24
|
+
return config
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export declare namespace read {
|
|
28
|
+
/** Parameters for {@link read}. */
|
|
29
|
+
export type Options = {
|
|
30
|
+
/** Multisig account address. */
|
|
31
|
+
address: Address.Address
|
|
32
|
+
/** Config commitment observed onchain. */
|
|
33
|
+
commitment: Hex.Hex
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Writes a validated multisig config. */
|
|
38
|
+
export async function write(
|
|
39
|
+
store: Store.Store,
|
|
40
|
+
options: write.Options,
|
|
41
|
+
): Promise<void> {
|
|
42
|
+
const { address, commitment } = options
|
|
43
|
+
const config = MultisigConfig.from(options.config)
|
|
44
|
+
assertKey({ address, commitment, config })
|
|
45
|
+
const value = serialize(config)
|
|
46
|
+
await store.setItem(key({ address, commitment }), value)
|
|
47
|
+
// Initialization commits the version-zero config without changing its version.
|
|
48
|
+
if (commitment.toLowerCase() === zeroCommitment)
|
|
49
|
+
await store.setItem(
|
|
50
|
+
key({ address, commitment: MultisigConfig.getCommitment(config) }),
|
|
51
|
+
value,
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export declare namespace write {
|
|
56
|
+
/** Parameters for {@link write}. */
|
|
57
|
+
export type Options = {
|
|
58
|
+
/** Multisig account address. */
|
|
59
|
+
address: Address.Address
|
|
60
|
+
/** Config commitment used for lookup. */
|
|
61
|
+
commitment: Hex.Hex
|
|
62
|
+
/** Complete config. */
|
|
63
|
+
config: MultisigConfig.Config
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** Verifies that a config matches its account-and-commitment key. */
|
|
68
|
+
function assertKey(options: {
|
|
69
|
+
address: Address.Address
|
|
70
|
+
commitment: Hex.Hex
|
|
71
|
+
config: MultisigConfig.Config
|
|
72
|
+
}) {
|
|
73
|
+
const { address, commitment, config } = options
|
|
74
|
+
if (!Address.validate(address) || !Hash.validate(commitment))
|
|
75
|
+
throw new InvalidStoreValueError()
|
|
76
|
+
if (config.version === 0n) {
|
|
77
|
+
if (
|
|
78
|
+
!Address.isEqual(
|
|
79
|
+
MultisigConfig.getAddress(config, { factory: nativeMultisigFactory }),
|
|
80
|
+
address,
|
|
81
|
+
)
|
|
82
|
+
)
|
|
83
|
+
throw new InvalidStoreValueError()
|
|
84
|
+
if (commitment.toLowerCase() === zeroCommitment) return
|
|
85
|
+
}
|
|
86
|
+
if (
|
|
87
|
+
MultisigConfig.getCommitment(config).toLowerCase() !==
|
|
88
|
+
commitment.toLowerCase()
|
|
89
|
+
)
|
|
90
|
+
throw new InvalidStoreValueError()
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** Deserializes a multisig config from storage. */
|
|
94
|
+
function deserialize(value: string): MultisigConfig.Config {
|
|
95
|
+
try {
|
|
96
|
+
if (value.length > maxStoredValueLength) throw new InvalidStoreValueError()
|
|
97
|
+
return MultisigConfig.fromRpc(Json.parse(value) as never)
|
|
98
|
+
} catch (cause) {
|
|
99
|
+
if (cause instanceof InvalidStoreValueError) throw cause
|
|
100
|
+
throw new InvalidStoreValueError({ cause })
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** Returns the store key for an account and config commitment. */
|
|
105
|
+
function key(options: { address: Address.Address; commitment: Hex.Hex }) {
|
|
106
|
+
const { address, commitment } = options
|
|
107
|
+
return `multisig:config:${address.toLowerCase()}:${commitment.toLowerCase()}`
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** Serializes a multisig config for storage. */
|
|
111
|
+
function serialize(config: MultisigConfig.Config): string {
|
|
112
|
+
try {
|
|
113
|
+
const value = Json.stringify(MultisigConfig.toRpc(config))
|
|
114
|
+
if (value.length > maxStoredValueLength) throw new InvalidStoreValueError()
|
|
115
|
+
return value
|
|
116
|
+
} catch (cause) {
|
|
117
|
+
if (cause instanceof InvalidStoreValueError) throw cause
|
|
118
|
+
throw new InvalidStoreValueError({ cause })
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** Thrown when a stored multisig config is malformed or mismatched. */
|
|
123
|
+
export class InvalidStoreValueError extends BaseError<Error | undefined> {
|
|
124
|
+
override name = 'Multisig.Config.InvalidStoreValueError'
|
|
125
|
+
/** Creates an invalid store value error. */
|
|
126
|
+
constructor(options: InvalidStoreValueError.Options = {}) {
|
|
127
|
+
super('Stored multisig config is malformed or mismatched.', {
|
|
128
|
+
cause: options.cause as Error | undefined,
|
|
129
|
+
})
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export declare namespace InvalidStoreValueError {
|
|
134
|
+
/** Error construction options. */
|
|
135
|
+
export type Options = {
|
|
136
|
+
/** Underlying error. */
|
|
137
|
+
cause?: unknown | undefined
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import type { Hex } from 'ox'
|
|
2
|
+
import { Json } from 'ox'
|
|
3
|
+
import { MultisigOperation, SignatureEnvelope, TxEnvelopeTempo } from 'ox/tempo'
|
|
4
|
+
import { BaseError } from '../../core/Errors.js'
|
|
5
|
+
import type * as Store from '../Store.js'
|
|
6
|
+
|
|
7
|
+
/** Bounds parsing and serialization work if a store returns unexpectedly large data. */
|
|
8
|
+
const maxStoredValueLength = 1_048_576
|
|
9
|
+
|
|
10
|
+
/** Prevents sustained compare-and-set contention from retrying indefinitely. */
|
|
11
|
+
const maxUpdateAttempts = 32
|
|
12
|
+
|
|
13
|
+
/** Bounds abandoned operation state while allowing long-lived approval ceremonies. */
|
|
14
|
+
const pendingOperationTtl = 30 * 24 * 60 * 60 * 1_000
|
|
15
|
+
|
|
16
|
+
/** Reads a persisted multisig operation. */
|
|
17
|
+
export async function read(
|
|
18
|
+
store: Store.Store,
|
|
19
|
+
hash: Hex.Hex,
|
|
20
|
+
): Promise<MultisigOperation.Operation | null> {
|
|
21
|
+
const value = await store.getItem(operationKey(hash))
|
|
22
|
+
if (value === null || value === undefined) return null
|
|
23
|
+
const operation = deserialize(value)
|
|
24
|
+
if (operation.hash.toLowerCase() !== hash.toLowerCase())
|
|
25
|
+
throw new InvalidStoreValueError()
|
|
26
|
+
return operation
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** Atomically updates a multisig operation. */
|
|
30
|
+
export async function update(
|
|
31
|
+
store: Store.Atomic,
|
|
32
|
+
hash: Hex.Hex,
|
|
33
|
+
update: (
|
|
34
|
+
operation: MultisigOperation.Operation | null,
|
|
35
|
+
) => MultisigOperation.Operation | Promise<MultisigOperation.Operation>,
|
|
36
|
+
): Promise<MultisigOperation.Operation> {
|
|
37
|
+
const key = operationKey(hash)
|
|
38
|
+
for (let attempt = 0; attempt < maxUpdateAttempts; attempt++) {
|
|
39
|
+
const value = (await store.getItem(key)) ?? null
|
|
40
|
+
const current = value === null ? null : deserialize(value)
|
|
41
|
+
if (current && current.hash.toLowerCase() !== hash.toLowerCase())
|
|
42
|
+
throw new InvalidStoreValueError()
|
|
43
|
+
const value_ = await update(current)
|
|
44
|
+
let next: MultisigOperation.Operation
|
|
45
|
+
try {
|
|
46
|
+
next = MultisigOperation.from(value_)
|
|
47
|
+
} catch (cause) {
|
|
48
|
+
throw new InvalidStoreValueError({ cause })
|
|
49
|
+
}
|
|
50
|
+
if (next.hash.toLowerCase() !== hash.toLowerCase())
|
|
51
|
+
throw new InvalidStoreValueError()
|
|
52
|
+
const serialized = serialize(next)
|
|
53
|
+
const options =
|
|
54
|
+
next.status === 'success'
|
|
55
|
+
? undefined
|
|
56
|
+
: { expiresAt: Date.now() + pendingOperationTtl }
|
|
57
|
+
if (await store.compareAndSet(key, value, serialized, options)) return next
|
|
58
|
+
}
|
|
59
|
+
throw new StoreConflictError()
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** Reads a submission hash without rebuilding its envelope from mutable configurations. */
|
|
63
|
+
export async function readSubmission(
|
|
64
|
+
store: Store.Store,
|
|
65
|
+
operation: MultisigOperation.TransactionOperation,
|
|
66
|
+
submissionId: Hex.Hex,
|
|
67
|
+
): Promise<Hex.Hex | null> {
|
|
68
|
+
const value = await store.getItem(submissionKey(operation.hash, submissionId))
|
|
69
|
+
if (value === null || value === undefined) return null
|
|
70
|
+
try {
|
|
71
|
+
if (value.length > maxStoredValueLength) throw new InvalidStoreValueError()
|
|
72
|
+
const transaction = TxEnvelopeTempo.deserialize(
|
|
73
|
+
value as TxEnvelopeTempo.Serialized,
|
|
74
|
+
)
|
|
75
|
+
if (transaction.signature?.type !== 'multisig')
|
|
76
|
+
throw new InvalidStoreValueError()
|
|
77
|
+
const serialized = MultisigOperation.serializeTransaction(operation, {
|
|
78
|
+
approvals: transaction.signature.signatures.map((signature) =>
|
|
79
|
+
SignatureEnvelope.serialize(signature),
|
|
80
|
+
),
|
|
81
|
+
})
|
|
82
|
+
if (serialized.toLowerCase() !== value.toLowerCase())
|
|
83
|
+
throw new InvalidStoreValueError()
|
|
84
|
+
return TxEnvelopeTempo.hash(transaction as TxEnvelopeTempo.Signed)
|
|
85
|
+
} catch (cause) {
|
|
86
|
+
if (cause instanceof InvalidStoreValueError) throw cause
|
|
87
|
+
throw new InvalidStoreValueError({ cause })
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** Removes a persisted final envelope after its submission is settled. */
|
|
92
|
+
export async function removeSubmission(
|
|
93
|
+
store: Store.Store,
|
|
94
|
+
hash: Hex.Hex,
|
|
95
|
+
submissionId: Hex.Hex,
|
|
96
|
+
): Promise<void> {
|
|
97
|
+
await store.removeItem(submissionKey(hash, submissionId))
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** Persists the final envelope before broadcast so recovery uses the exact transaction. */
|
|
101
|
+
export async function writeSubmission(
|
|
102
|
+
store: Store.Atomic,
|
|
103
|
+
hash: Hex.Hex,
|
|
104
|
+
submissionId: Hex.Hex,
|
|
105
|
+
transaction: TxEnvelopeTempo.Serialized,
|
|
106
|
+
): Promise<void> {
|
|
107
|
+
try {
|
|
108
|
+
if (transaction.length > maxStoredValueLength)
|
|
109
|
+
throw new InvalidStoreValueError()
|
|
110
|
+
const envelope = TxEnvelopeTempo.deserialize(transaction)
|
|
111
|
+
if (!envelope.signature) throw new InvalidStoreValueError()
|
|
112
|
+
TxEnvelopeTempo.hash(envelope as TxEnvelopeTempo.Signed)
|
|
113
|
+
const written = await store.compareAndSet(
|
|
114
|
+
submissionKey(hash, submissionId),
|
|
115
|
+
null,
|
|
116
|
+
transaction,
|
|
117
|
+
{ expiresAt: Date.now() + pendingOperationTtl },
|
|
118
|
+
)
|
|
119
|
+
if (!written) throw new InvalidStoreValueError()
|
|
120
|
+
} catch (cause) {
|
|
121
|
+
if (cause instanceof InvalidStoreValueError) throw cause
|
|
122
|
+
throw new InvalidStoreValueError({ cause })
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** Deserializes a multisig operation from storage. */
|
|
127
|
+
function deserialize(value: string): MultisigOperation.Operation {
|
|
128
|
+
try {
|
|
129
|
+
if (value.length > maxStoredValueLength) throw new InvalidStoreValueError()
|
|
130
|
+
const operation = MultisigOperation.from(Json.parse(value) as never)
|
|
131
|
+
assertHash(operation)
|
|
132
|
+
return operation
|
|
133
|
+
} catch (cause) {
|
|
134
|
+
if (cause instanceof InvalidStoreValueError) throw cause
|
|
135
|
+
throw new InvalidStoreValueError({ cause })
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/** Serializes a multisig operation for storage. */
|
|
140
|
+
function serialize(operation: MultisigOperation.Operation): string {
|
|
141
|
+
try {
|
|
142
|
+
const operation_ = MultisigOperation.from(operation)
|
|
143
|
+
assertHash(operation_)
|
|
144
|
+
const value = Json.stringify(operation_)
|
|
145
|
+
if (value.length > maxStoredValueLength) throw new InvalidStoreValueError()
|
|
146
|
+
return value
|
|
147
|
+
} catch (cause) {
|
|
148
|
+
if (cause instanceof InvalidStoreValueError) throw cause
|
|
149
|
+
throw new InvalidStoreValueError({ cause })
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** Verifies that the operation hash commits to its stored payload. */
|
|
154
|
+
function assertHash(operation: MultisigOperation.Operation) {
|
|
155
|
+
const hash = MultisigOperation.getHash(
|
|
156
|
+
operation.type === 'transaction'
|
|
157
|
+
? {
|
|
158
|
+
account: operation.account,
|
|
159
|
+
config: operation.config,
|
|
160
|
+
transaction: operation.transaction as TxEnvelopeTempo.Serialized,
|
|
161
|
+
type: operation.type,
|
|
162
|
+
}
|
|
163
|
+
: {
|
|
164
|
+
account: operation.account,
|
|
165
|
+
config: operation.config,
|
|
166
|
+
keyAuthorization: operation.keyAuthorization,
|
|
167
|
+
type: operation.type,
|
|
168
|
+
},
|
|
169
|
+
)
|
|
170
|
+
if (hash.toLowerCase() !== operation.hash.toLowerCase())
|
|
171
|
+
throw new InvalidStoreValueError()
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/** Returns the store key for an operation hash. */
|
|
175
|
+
function operationKey(hash: Hex.Hex) {
|
|
176
|
+
return `multisig:operation:${hash.toLowerCase()}`
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/** Returns the store key for a submission attempt. */
|
|
180
|
+
function submissionKey(hash: Hex.Hex, submissionId: Hex.Hex) {
|
|
181
|
+
return `multisig:submission:${hash.toLowerCase()}:${submissionId.toLowerCase()}`
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/** Thrown when a stored multisig operation is malformed or unsupported. */
|
|
185
|
+
export class InvalidStoreValueError extends BaseError<Error | undefined> {
|
|
186
|
+
override name = 'Multisig.Operation.InvalidStoreValueError'
|
|
187
|
+
/** Creates an invalid store value error. */
|
|
188
|
+
constructor(options: InvalidStoreValueError.Options = {}) {
|
|
189
|
+
super('Stored multisig operation is malformed or unsupported.', {
|
|
190
|
+
cause: options.cause as Error | undefined,
|
|
191
|
+
})
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export declare namespace InvalidStoreValueError {
|
|
196
|
+
/** Error construction options. */
|
|
197
|
+
export type Options = {
|
|
198
|
+
/** Underlying error. */
|
|
199
|
+
cause?: unknown | undefined
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/** Thrown when a multisig operation cannot be updated due to contention. */
|
|
204
|
+
export class StoreConflictError extends BaseError<Error | undefined> {
|
|
205
|
+
override name = 'Multisig.Operation.StoreConflictError'
|
|
206
|
+
/** Creates a store conflict error. */
|
|
207
|
+
constructor() {
|
|
208
|
+
super(
|
|
209
|
+
'Multisig operation could not be updated after repeated conflicts.',
|
|
210
|
+
{},
|
|
211
|
+
)
|
|
212
|
+
}
|
|
213
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SignatureEnvelope } from 'ox/tempo'
|
|
2
|
+
|
|
3
|
+
/** Parses a primitive multisig owner approval. */
|
|
4
|
+
export function parseApproval(
|
|
5
|
+
signature: SignatureEnvelope.Serialized,
|
|
6
|
+
): SignatureEnvelope.Primitive {
|
|
7
|
+
const approval = SignatureEnvelope.from(signature)
|
|
8
|
+
if (approval.type === 'multisig' || approval.type === 'keychain')
|
|
9
|
+
throw new Error('Multisig owners must use primitive signatures.')
|
|
10
|
+
return approval
|
|
11
|
+
}
|
package/src/tempo/zones/Abis.ts
CHANGED
|
@@ -119,7 +119,7 @@ export const zonePortal = [
|
|
|
119
119
|
{ name: 'to', type: 'address' },
|
|
120
120
|
{ name: 'amount', type: 'uint128' },
|
|
121
121
|
{ name: 'memo', type: 'bytes32' },
|
|
122
|
-
{ name: '
|
|
122
|
+
{ name: 'tempoRefundRecipient', type: 'address' },
|
|
123
123
|
],
|
|
124
124
|
outputs: [{ name: '', type: 'bytes32' }],
|
|
125
125
|
},
|
|
@@ -142,7 +142,7 @@ export const zonePortal = [
|
|
|
142
142
|
{ name: 'tag', type: 'bytes16' },
|
|
143
143
|
],
|
|
144
144
|
},
|
|
145
|
-
{ name: '
|
|
145
|
+
{ name: 'tempoRefundRecipient', type: 'address' },
|
|
146
146
|
],
|
|
147
147
|
outputs: [{ name: '', type: 'bytes32' }],
|
|
148
148
|
},
|
|
@@ -1,66 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { http as http_ } from '../../core/transports/http.js'
|
|
3
|
-
import * as Storage from '../Storage.js'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Creates an HTTP JSON-RPC transport with support for Zone authorization
|
|
7
|
-
* tokens.
|
|
8
|
-
*
|
|
9
|
-
* Reads the authorization token for the client's chain from {@link Storage}
|
|
10
|
-
* and injects the `X-Authorization-Token` header on every request. Batching
|
|
11
|
-
* is not supported because zone tokens are account-scoped.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* import { Client } from 'viem/tempo'
|
|
16
|
-
* import { http, zone } from 'viem/tempo/zones'
|
|
17
|
-
*
|
|
18
|
-
* const client = Client.create({
|
|
19
|
-
* chain: zone(6),
|
|
20
|
-
* transport: http(),
|
|
21
|
-
* })
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* @param url - RPC URL. Defaults to the chain's default RPC URL.
|
|
25
|
-
* @param options - Options.
|
|
26
|
-
* @returns An HTTP transport.
|
|
27
|
-
*/
|
|
28
|
-
export function http(
|
|
29
|
-
url?: string | undefined,
|
|
30
|
-
options: http.Options = {},
|
|
31
|
-
): Transport.Http {
|
|
32
|
-
const {
|
|
33
|
-
onFetchRequest,
|
|
34
|
-
storage = Storage.defaultStorage(),
|
|
35
|
-
...rest
|
|
36
|
-
} = options
|
|
37
|
-
return {
|
|
38
|
-
key: rest.key ?? 'http',
|
|
39
|
-
name: rest.name ?? 'HTTP JSON-RPC',
|
|
40
|
-
type: 'http',
|
|
41
|
-
setup(setupOptions = {}) {
|
|
42
|
-
const chainId = setupOptions.chain?.id
|
|
43
|
-
return http_(url, {
|
|
44
|
-
...rest,
|
|
45
|
-
async onFetchRequest(request, init) {
|
|
46
|
-
const next = (await onFetchRequest?.(request, init)) ?? init
|
|
47
|
-
const headers = new Headers(next.headers)
|
|
48
|
-
|
|
49
|
-
if (chainId) {
|
|
50
|
-
const token = await storage.getItem(`auth:token:${chainId}`)
|
|
51
|
-
if (token) headers.set('X-Authorization-Token', token)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
return { ...next, headers }
|
|
55
|
-
},
|
|
56
|
-
}).setup(setupOptions)
|
|
57
|
-
},
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export declare namespace http {
|
|
62
|
-
type Options = Omit<http_.Options, 'batch' | 'raw'> & {
|
|
63
|
-
/** Storage for reading zone authorization tokens. Defaults to sessionStorage (web) or memory (server). */
|
|
64
|
-
storage?: Storage.Storage | undefined
|
|
65
|
-
}
|
|
66
|
-
}
|
|
1
|
+
export { http } from '../Transport.js'
|
|
@@ -11,6 +11,7 @@ import * as Token from '../../core/Token.js'
|
|
|
11
11
|
export const cirbtc = /*#__PURE__*/ Token.from({
|
|
12
12
|
addresses: {
|
|
13
13
|
1: '0x72DFB2E44f59C5AD2bAFE84314E5b99a7cd5075E', // mainnet
|
|
14
|
+
5042: '0x171A4217b86A807A64eB94757Db6849fb4bDbAA0', // arc
|
|
14
15
|
5042002: '0xf0C4a4CE82A5746AbAAd9425360Ab04fbBA432BF', // arcTestnet
|
|
15
16
|
11155111: '0x3a3fe695F684Bf9b9e43CF43C2b895Ea5e392bB3', // sepolia
|
|
16
17
|
},
|
|
@@ -15,7 +15,9 @@ export const eurc = /*#__PURE__*/ Token.from({
|
|
|
15
15
|
338: '0x31f7538adb53cF16350e6B0c89d03D91b7D12c46', // cronosTestnet
|
|
16
16
|
480: '0x1C60ba0A0eD1019e8Eb035E6daF4155A5cE2380B', // worldchain
|
|
17
17
|
4801: '0xe479EcA5740Ac65d6E1823bea2f1C08Bc14e954F', // worldchainSepolia
|
|
18
|
+
5042: '0xbEf5f6d51CB62b58e6A8f77868681825C6fe21c1', // arc
|
|
18
19
|
8453: '0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42', // base
|
|
20
|
+
9745: '0x3EE196E78d4d4248b849B8E1C7F44C5457FAFD2C', // plasma
|
|
19
21
|
43113: '0x5E44db7996c682E92a960b65AC713a54AD815c6B', // avalancheFuji
|
|
20
22
|
43114: '0xC891EB4cbdEFf6e073e859e987815Ed1505c2ACD', // avalanche
|
|
21
23
|
84532: '0x808456652fdb597867f38412077A9182bf77359F', // baseSepolia
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as Token from '../../core/Token.js'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* [Open USD](https://joinopenstandard.com/) token, with canonical contract
|
|
5
|
+
* addresses on Ethereum, Tempo, and Base.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { ousd } from 'viem/tokens'
|
|
10
|
+
*
|
|
11
|
+
* ousd(4217)
|
|
12
|
+
* // { address: '0x20c0000000000000000000006a37DA5C996874BE', ... }
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export const ousd = /*#__PURE__*/ Token.from({
|
|
16
|
+
addresses: {
|
|
17
|
+
1: '0x9f6F3991D525015a6F8CaF062C83b62fD3AC4436', // mainnet
|
|
18
|
+
4217: '0x20c0000000000000000000006a37DA5C996874BE', // tempo
|
|
19
|
+
8453: '0xB2000000000000000000002fEb517dFeC7415344', // base
|
|
20
|
+
},
|
|
21
|
+
currency: 'USD',
|
|
22
|
+
decimals: 6,
|
|
23
|
+
name: 'OpenUSD',
|
|
24
|
+
popular: true,
|
|
25
|
+
symbol: 'OUSD',
|
|
26
|
+
})
|
|
@@ -58,7 +58,9 @@ export const usdc = /*#__PURE__*/ Token.from({
|
|
|
58
58
|
2910: '0x7433b41C6c5e1d58D4Da99483609520255ab661B', // morphHoodi
|
|
59
59
|
3343: '0x98d2919b9A214E6Fa5384AC81E6864bA686Ad74c', // edge
|
|
60
60
|
4801: '0x66145f38cBAC35Ca6F1Dfb4914dF98F1614aeA88', // worldchainSepolia
|
|
61
|
+
5042: '0x3600000000000000000000000000000000000000', // arc
|
|
61
62
|
8453: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', // base
|
|
63
|
+
9745: '0x2d661C89D812261039AF9764eceaAee884f5F67F', // plasma
|
|
62
64
|
10143: '0x534b2f3A21130d7a60830c2Df862319e593943A3', // monadTestnet
|
|
63
65
|
33431: '0x2d9F7CAD728051AA35Ecdc472a14cf8cDF5CFD6B', // edgeTestnet
|
|
64
66
|
42161: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831', // arbitrum
|