viem 3.0.0-next.13 → 3.0.0-next.15
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/arcTestnet.d.ts +5 -5
- package/dist/chains/definitions/arcTestnet.d.ts.map +1 -1
- package/dist/chains/definitions/arcTestnet.js +11 -8
- package/dist/chains/definitions/arcTestnet.js.map +1 -1
- package/dist/chains/definitions/hashKeyChain.d.ts +4 -4
- package/dist/chains/definitions/hashKeyChain.js +4 -4
- package/dist/chains/definitions/hashKeyChain.js.map +1 -1
- package/dist/chains/definitions/hashkeyChainTestnet.d.ts +4 -4
- package/dist/chains/definitions/hashkeyChainTestnet.js +4 -4
- package/dist/chains/definitions/hashkeyChainTestnet.js.map +1 -1
- package/dist/chains/definitions/hyperEvm.d.ts +3 -0
- package/dist/chains/definitions/hyperEvm.d.ts.map +1 -1
- package/dist/chains/definitions/hyperEvm.js +3 -0
- package/dist/chains/definitions/hyperEvm.js.map +1 -1
- package/dist/chains/definitions/hyperliquidEvmTestnet.d.ts +3 -0
- package/dist/chains/definitions/hyperliquidEvmTestnet.d.ts.map +1 -1
- package/dist/chains/definitions/hyperliquidEvmTestnet.js +3 -0
- package/dist/chains/definitions/hyperliquidEvmTestnet.js.map +1 -1
- package/dist/chains/definitions/molibra.d.ts +18 -0
- package/dist/chains/definitions/molibra.d.ts.map +1 -0
- package/dist/chains/definitions/molibra.js +14 -0
- package/dist/chains/definitions/molibra.js.map +1 -0
- package/dist/chains/definitions/monad.d.ts +1 -1
- package/dist/chains/definitions/monad.js +1 -1
- package/dist/chains/definitions/monadTestnet.d.ts +1 -1
- package/dist/chains/definitions/monadTestnet.js +1 -1
- package/dist/chains/definitions/qmsTestnet.d.ts +27 -0
- package/dist/chains/definitions/qmsTestnet.d.ts.map +1 -0
- package/dist/chains/definitions/qmsTestnet.js +23 -0
- package/dist/chains/definitions/qmsTestnet.js.map +1 -0
- package/dist/chains/definitions/rwaChain.d.ts +78 -0
- package/dist/chains/definitions/rwaChain.d.ts.map +1 -0
- package/dist/chains/definitions/rwaChain.js +45 -0
- package/dist/chains/definitions/rwaChain.js.map +1 -0
- package/dist/chains/definitions/rwaChainSepolia.d.ts +79 -0
- package/dist/chains/definitions/rwaChainSepolia.d.ts.map +1 -0
- package/dist/chains/definitions/rwaChainSepolia.js +46 -0
- package/dist/chains/definitions/rwaChainSepolia.js.map +1 -0
- package/dist/chains/definitions/tempo.d.ts +9 -1
- package/dist/chains/definitions/tempo.d.ts.map +1 -1
- package/dist/chains/definitions/tempo.js +5 -1
- package/dist/chains/definitions/tempo.js.map +1 -1
- package/dist/chains/definitions/tempoDevnet.d.ts +11 -3
- package/dist/chains/definitions/tempoDevnet.d.ts.map +1 -1
- package/dist/chains/definitions/tempoDevnet.js +7 -0
- package/dist/chains/definitions/tempoDevnet.js.map +1 -1
- package/dist/chains/definitions/tempoLocalnet.d.ts +4 -0
- package/dist/chains/definitions/tempoLocalnet.d.ts.map +1 -1
- package/dist/chains/definitions/tempoModerato.d.ts +10 -2
- package/dist/chains/definitions/tempoModerato.d.ts.map +1 -1
- package/dist/chains/definitions/tempoModerato.js +6 -2
- package/dist/chains/definitions/tempoModerato.js.map +1 -1
- package/dist/chains/definitions/turkchain.d.ts +24 -0
- package/dist/chains/definitions/turkchain.d.ts.map +1 -0
- package/dist/chains/definitions/turkchain.js +23 -0
- package/dist/chains/definitions/turkchain.js.map +1 -0
- package/dist/chains/definitions/valuechain.d.ts +25 -0
- package/dist/chains/definitions/valuechain.d.ts.map +1 -0
- package/dist/chains/definitions/valuechain.js +20 -0
- package/dist/chains/definitions/valuechain.js.map +1 -0
- package/dist/chains/definitions/valuechainTestnet.d.ts +26 -0
- package/dist/chains/definitions/valuechainTestnet.d.ts.map +1 -0
- package/dist/chains/definitions/valuechainTestnet.js +21 -0
- package/dist/chains/definitions/valuechainTestnet.js.map +1 -0
- package/dist/chains/definitions/zksync.d.ts +1 -1
- package/dist/chains/definitions/zksync.js +1 -1
- package/dist/chains/definitions/zksync.js.map +1 -1
- package/dist/chains/definitions/zksyncEraTestnet.d.ts +30 -0
- package/dist/chains/definitions/zksyncEraTestnet.d.ts.map +1 -0
- package/dist/chains/definitions/zksyncEraTestnet.js +25 -0
- package/dist/chains/definitions/zksyncEraTestnet.js.map +1 -0
- package/dist/chains/index.d.ts +8 -0
- package/dist/chains/index.d.ts.map +1 -1
- package/dist/chains/index.js +8 -0
- package/dist/chains/index.js.map +1 -1
- package/dist/core/Chain.d.ts +50 -3
- package/dist/core/Chain.d.ts.map +1 -1
- package/dist/core/Chain.js.map +1 -1
- package/dist/core/Client.d.ts +42 -2
- package/dist/core/Client.d.ts.map +1 -1
- package/dist/core/Client.js +41 -6
- package/dist/core/Client.js.map +1 -1
- package/dist/core/NonceManager.d.ts +16 -1
- package/dist/core/NonceManager.d.ts.map +1 -1
- package/dist/core/NonceManager.js.map +1 -1
- package/dist/core/RpcError.d.ts.map +1 -1
- package/dist/core/RpcError.js +11 -5
- package/dist/core/RpcError.js.map +1 -1
- package/dist/core/actions/block/watch.d.ts +6 -1
- package/dist/core/actions/block/watch.d.ts.map +1 -1
- package/dist/core/actions/block/watch.js +42 -78
- package/dist/core/actions/block/watch.js.map +1 -1
- package/dist/core/actions/block/watchHeaders.d.ts.map +1 -1
- package/dist/core/actions/block/watchHeaders.js +13 -68
- package/dist/core/actions/block/watchHeaders.js.map +1 -1
- package/dist/core/actions/block/watchNumber.d.ts +5 -1
- package/dist/core/actions/block/watchNumber.d.ts.map +1 -1
- package/dist/core/actions/block/watchNumber.js +19 -72
- package/dist/core/actions/block/watchNumber.js.map +1 -1
- package/dist/core/actions/call.d.ts.map +1 -1
- package/dist/core/actions/call.js +6 -5
- package/dist/core/actions/call.js.map +1 -1
- package/dist/core/actions/contract/watchEvent.d.ts +3 -2
- package/dist/core/actions/contract/watchEvent.d.ts.map +1 -1
- package/dist/core/actions/contract/watchEvent.js +3 -2
- package/dist/core/actions/contract/watchEvent.js.map +1 -1
- package/dist/core/actions/ens/getAddress.d.ts.map +1 -1
- package/dist/core/actions/ens/getAddress.js +10 -5
- package/dist/core/actions/ens/getAddress.js.map +1 -1
- package/dist/core/actions/ens/internal/avatar.d.ts +13 -0
- package/dist/core/actions/ens/internal/avatar.d.ts.map +1 -1
- package/dist/core/actions/ens/internal/avatar.js +22 -7
- package/dist/core/actions/ens/internal/avatar.js.map +1 -1
- package/dist/core/actions/ens/internal/batchGateway.d.ts +28 -1
- package/dist/core/actions/ens/internal/batchGateway.d.ts.map +1 -1
- package/dist/core/actions/ens/internal/batchGateway.js +45 -17
- package/dist/core/actions/ens/internal/batchGateway.js.map +1 -1
- package/dist/core/actions/event/createFilter.d.ts +1 -2
- package/dist/core/actions/event/createFilter.d.ts.map +1 -1
- package/dist/core/actions/event/createFilter.js +3 -8
- package/dist/core/actions/event/createFilter.js.map +1 -1
- package/dist/core/actions/event/getLogs.d.ts +2 -2
- package/dist/core/actions/event/getLogs.d.ts.map +1 -1
- package/dist/core/actions/event/getLogs.js +4 -9
- package/dist/core/actions/event/getLogs.js.map +1 -1
- package/dist/core/actions/event/internal.d.ts +24 -0
- package/dist/core/actions/event/internal.d.ts.map +1 -0
- package/dist/core/actions/event/internal.js +51 -0
- package/dist/core/actions/event/internal.js.map +1 -0
- package/dist/core/actions/event/watch.d.ts +4 -4
- package/dist/core/actions/event/watch.d.ts.map +1 -1
- package/dist/core/actions/event/watch.js +94 -106
- package/dist/core/actions/event/watch.js.map +1 -1
- package/dist/core/actions/filter/getChanges.d.ts +1 -1
- package/dist/core/actions/filter/getChanges.d.ts.map +1 -1
- package/dist/core/actions/filter/getChanges.js +3 -2
- package/dist/core/actions/filter/getChanges.js.map +1 -1
- package/dist/core/actions/filter/getLogs.d.ts +1 -2
- package/dist/core/actions/filter/getLogs.d.ts.map +1 -1
- package/dist/core/actions/filter/getLogs.js +3 -2
- package/dist/core/actions/filter/getLogs.js.map +1 -1
- package/dist/core/actions/internal/ccip.d.ts +25 -4
- package/dist/core/actions/internal/ccip.d.ts.map +1 -1
- package/dist/core/actions/internal/ccip.js +32 -9
- package/dist/core/actions/internal/ccip.js.map +1 -1
- package/dist/core/actions/internal/transactionRequest.js +2 -2
- package/dist/core/actions/internal/transactionRequest.js.map +1 -1
- package/dist/core/actions/transaction/fill.d.ts.map +1 -1
- package/dist/core/actions/transaction/fill.js +4 -0
- package/dist/core/actions/transaction/fill.js.map +1 -1
- package/dist/core/actions/transaction/getConfirmations.d.ts.map +1 -1
- package/dist/core/actions/transaction/getConfirmations.js +11 -1
- package/dist/core/actions/transaction/getConfirmations.js.map +1 -1
- package/dist/core/actions/transaction/prepare.d.ts +6 -1
- package/dist/core/actions/transaction/prepare.d.ts.map +1 -1
- package/dist/core/actions/transaction/prepare.js +58 -14
- package/dist/core/actions/transaction/prepare.js.map +1 -1
- package/dist/core/actions/transaction/send.d.ts.map +1 -1
- package/dist/core/actions/transaction/send.js +7 -2
- package/dist/core/actions/transaction/send.js.map +1 -1
- package/dist/core/actions/transaction/sendSync.d.ts +1 -1
- package/dist/core/actions/transaction/sendSync.d.ts.map +1 -1
- package/dist/core/actions/transaction/sendSync.js +77 -10
- package/dist/core/actions/transaction/sendSync.js.map +1 -1
- package/dist/core/actions/transaction/waitForReceipt.d.ts +37 -1
- package/dist/core/actions/transaction/waitForReceipt.d.ts.map +1 -1
- package/dist/core/actions/transaction/waitForReceipt.js +158 -26
- package/dist/core/actions/transaction/waitForReceipt.js.map +1 -1
- package/dist/core/actions/transaction/watchPending.d.ts.map +1 -1
- package/dist/core/actions/transaction/watchPending.js +13 -70
- package/dist/core/actions/transaction/watchPending.js.map +1 -1
- package/dist/core/actions/wallet/sendCalls.js +1 -1
- package/dist/core/actions/wallet/sendCalls.js.map +1 -1
- package/dist/core/actions/wallet/waitForCallsStatus.d.ts.map +1 -1
- package/dist/core/actions/wallet/waitForCallsStatus.js +24 -1
- package/dist/core/actions/wallet/waitForCallsStatus.js.map +1 -1
- package/dist/core/internal/asyncIterator.d.ts +11 -0
- package/dist/core/internal/asyncIterator.d.ts.map +1 -0
- package/dist/core/internal/asyncIterator.js +70 -0
- package/dist/core/internal/asyncIterator.js.map +1 -0
- package/dist/core/internal/promise.d.ts.map +1 -1
- package/dist/core/internal/promise.js +6 -1
- package/dist/core/internal/promise.js.map +1 -1
- package/dist/core/internal/transport.d.ts.map +1 -1
- package/dist/core/internal/transport.js +56 -17
- package/dist/core/internal/transport.js.map +1 -1
- package/dist/core/internal/wait.d.ts.map +1 -1
- package/dist/core/internal/wait.js +2 -1
- package/dist/core/internal/wait.js.map +1 -1
- package/dist/core/transports/fallback.d.ts.map +1 -1
- package/dist/core/transports/fallback.js +27 -0
- package/dist/core/transports/fallback.js.map +1 -1
- package/dist/core/transports/http.d.ts +4 -1
- package/dist/core/transports/http.d.ts.map +1 -1
- package/dist/core/transports/http.js +15 -4
- package/dist/core/transports/http.js.map +1 -1
- package/dist/erc4337/actions/userOperation/prepare.d.ts.map +1 -1
- package/dist/erc4337/actions/userOperation/prepare.js +1 -1
- package/dist/erc4337/actions/userOperation/prepare.js.map +1 -1
- package/dist/internal/inference.d.ts +7 -3
- package/dist/internal/inference.d.ts.map +1 -1
- package/dist/op-stack/Withdrawal.d.ts +12 -0
- package/dist/op-stack/Withdrawal.d.ts.map +1 -1
- package/dist/op-stack/Withdrawal.js +16 -0
- package/dist/op-stack/Withdrawal.js.map +1 -1
- package/dist/op-stack/abis.d.ts +40 -0
- package/dist/op-stack/abis.d.ts.map +1 -1
- package/dist/op-stack/abis.js +52 -0
- package/dist/op-stack/abis.js.map +1 -1
- package/dist/op-stack/actions/l1/getTimeToFinalize.d.ts +6 -2
- package/dist/op-stack/actions/l1/getTimeToFinalize.d.ts.map +1 -1
- package/dist/op-stack/actions/l1/getTimeToFinalize.js +72 -9
- package/dist/op-stack/actions/l1/getTimeToFinalize.js.map +1 -1
- package/dist/op-stack/actions/l1/getTimeToProve.d.ts +7 -3
- package/dist/op-stack/actions/l1/getTimeToProve.d.ts.map +1 -1
- package/dist/op-stack/actions/l1/getTimeToProve.js +12 -2
- package/dist/op-stack/actions/l1/getTimeToProve.js.map +1 -1
- package/dist/op-stack/actions/l1/getWithdrawalStatus.d.ts +5 -2
- package/dist/op-stack/actions/l1/getWithdrawalStatus.d.ts.map +1 -1
- package/dist/op-stack/actions/l1/getWithdrawalStatus.js +10 -3
- package/dist/op-stack/actions/l1/getWithdrawalStatus.js.map +1 -1
- package/dist/op-stack/actions/l1/internal.d.ts +13 -1
- package/dist/op-stack/actions/l1/internal.d.ts.map +1 -1
- package/dist/op-stack/actions/l1/internal.js +25 -0
- package/dist/op-stack/actions/l1/internal.js.map +1 -1
- package/dist/op-stack/actions/l1/waitToProve.d.ts +6 -3
- package/dist/op-stack/actions/l1/waitToProve.d.ts.map +1 -1
- package/dist/op-stack/actions/l1/waitToProve.js +8 -2
- package/dist/op-stack/actions/l1/waitToProve.js.map +1 -1
- package/dist/tempo/Abis.d.ts +2548 -288
- package/dist/tempo/Abis.d.ts.map +1 -1
- package/dist/tempo/Abis.js +619 -13
- package/dist/tempo/Abis.js.map +1 -1
- package/dist/tempo/Account.d.ts +221 -56
- package/dist/tempo/Account.d.ts.map +1 -1
- package/dist/tempo/Account.js +358 -115
- package/dist/tempo/Account.js.map +1 -1
- package/dist/tempo/Addresses.d.ts +6 -3
- package/dist/tempo/Addresses.d.ts.map +1 -1
- package/dist/tempo/Addresses.js +6 -3
- package/dist/tempo/Addresses.js.map +1 -1
- package/dist/tempo/Capabilities.d.ts +30 -19
- package/dist/tempo/Capabilities.d.ts.map +1 -1
- package/dist/tempo/Decorator.d.ts +123 -53
- package/dist/tempo/Decorator.d.ts.map +1 -1
- package/dist/tempo/Decorator.js +13 -10
- package/dist/tempo/Decorator.js.map +1 -1
- package/dist/tempo/ExecutionError.d.ts +3 -1
- package/dist/tempo/ExecutionError.d.ts.map +1 -1
- package/dist/tempo/ExecutionError.js +120 -4
- package/dist/tempo/ExecutionError.js.map +1 -1
- package/dist/tempo/Expiry.d.ts +12 -0
- package/dist/tempo/Expiry.d.ts.map +1 -1
- package/dist/tempo/Expiry.js +12 -0
- package/dist/tempo/Expiry.js.map +1 -1
- package/dist/tempo/Gateway.d.ts +338 -0
- package/dist/tempo/Gateway.d.ts.map +1 -0
- package/dist/tempo/Gateway.js +316 -0
- package/dist/tempo/Gateway.js.map +1 -0
- package/dist/tempo/GatewayDecorator.d.ts +642 -0
- package/dist/tempo/GatewayDecorator.d.ts.map +1 -0
- package/dist/tempo/GatewayDecorator.js +218 -0
- package/dist/tempo/GatewayDecorator.js.map +1 -0
- package/dist/tempo/Hardfork.d.ts +6 -2
- package/dist/tempo/Hardfork.d.ts.map +1 -1
- package/dist/tempo/Hardfork.js +17 -2
- package/dist/tempo/Hardfork.js.map +1 -1
- package/dist/tempo/KeyAuthorizationManager.d.ts +24 -13
- package/dist/tempo/KeyAuthorizationManager.d.ts.map +1 -1
- package/dist/tempo/KeyAuthorizationManager.js +44 -25
- package/dist/tempo/KeyAuthorizationManager.js.map +1 -1
- package/dist/tempo/Relay.d.ts +117 -14
- package/dist/tempo/Relay.d.ts.map +1 -1
- package/dist/tempo/Relay.js +68 -8
- package/dist/tempo/Relay.js.map +1 -1
- package/dist/tempo/Selectors.d.ts +19 -1
- package/dist/tempo/Selectors.d.ts.map +1 -1
- package/dist/tempo/Selectors.js +19 -1
- package/dist/tempo/Selectors.js.map +1 -1
- package/dist/tempo/Transport.d.ts +19 -6
- package/dist/tempo/Transport.d.ts.map +1 -1
- package/dist/tempo/Transport.js +21 -14
- package/dist/tempo/Transport.js.map +1 -1
- package/dist/tempo/{multisig → accounts}/Config.d.ts +18 -9
- package/dist/tempo/accounts/Config.d.ts.map +1 -0
- package/dist/tempo/{multisig → accounts}/Config.js +37 -22
- package/dist/tempo/accounts/Config.js.map +1 -0
- package/dist/tempo/{multisig → accounts}/Operation.d.ts +8 -8
- package/dist/tempo/{multisig → accounts}/Operation.d.ts.map +1 -1
- package/dist/tempo/{multisig → accounts}/Operation.js +19 -19
- package/dist/tempo/{multisig → accounts}/Operation.js.map +1 -1
- package/dist/tempo/{multisig → accounts}/Signature.d.ts +1 -1
- package/dist/tempo/accounts/Signature.d.ts.map +1 -0
- package/dist/tempo/accounts/Signature.js +9 -0
- package/dist/tempo/accounts/Signature.js.map +1 -0
- package/dist/tempo/actions/accessKey/authorize.d.ts +3 -2
- package/dist/tempo/actions/accessKey/authorize.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/authorize.js +6 -6
- package/dist/tempo/actions/accessKey/authorize.js.map +1 -1
- package/dist/tempo/actions/accessKey/authorizeSync.d.ts +2 -1
- package/dist/tempo/actions/accessKey/authorizeSync.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/authorizeSync.js.map +1 -1
- package/dist/tempo/actions/accessKey/burnWitness.d.ts +2 -1
- package/dist/tempo/actions/accessKey/burnWitness.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/burnWitness.js.map +1 -1
- package/dist/tempo/actions/accessKey/burnWitnessSync.d.ts +2 -1
- package/dist/tempo/actions/accessKey/burnWitnessSync.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/burnWitnessSync.js.map +1 -1
- package/dist/tempo/actions/accessKey/errors.d.ts +139 -0
- package/dist/tempo/actions/accessKey/errors.d.ts.map +1 -0
- package/dist/tempo/actions/accessKey/errors.js +397 -0
- package/dist/tempo/actions/accessKey/errors.js.map +1 -0
- package/dist/tempo/actions/accessKey/getMetadata.d.ts +4 -3
- package/dist/tempo/actions/accessKey/getMetadata.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/getMetadata.js +2 -9
- package/dist/tempo/actions/accessKey/getMetadata.js.map +1 -1
- package/dist/tempo/actions/accessKey/getRemainingLimit.d.ts +2 -1
- package/dist/tempo/actions/accessKey/getRemainingLimit.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/getRemainingLimit.js +1 -2
- package/dist/tempo/actions/accessKey/getRemainingLimit.js.map +1 -1
- package/dist/tempo/actions/accessKey/index.d.ts +2 -2
- package/dist/tempo/actions/accessKey/index.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/index.js +2 -2
- package/dist/tempo/actions/accessKey/index.js.map +1 -1
- package/dist/tempo/actions/accessKey/internal.d.ts +7 -0
- package/dist/tempo/actions/accessKey/internal.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/internal.js +7 -0
- package/dist/tempo/actions/accessKey/internal.js.map +1 -1
- package/dist/tempo/actions/accessKey/isWitnessBurned.d.ts +2 -1
- package/dist/tempo/actions/accessKey/isWitnessBurned.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/isWitnessBurned.js +1 -2
- package/dist/tempo/actions/accessKey/isWitnessBurned.js.map +1 -1
- package/dist/tempo/actions/accessKey/prepareAuthorization.d.ts +4 -12
- package/dist/tempo/actions/accessKey/prepareAuthorization.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/prepareAuthorization.js +10 -10
- package/dist/tempo/actions/accessKey/prepareAuthorization.js.map +1 -1
- package/dist/tempo/actions/accessKey/revoke.d.ts +2 -1
- package/dist/tempo/actions/accessKey/revoke.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/revoke.js.map +1 -1
- package/dist/tempo/actions/accessKey/revokeSync.d.ts +2 -1
- package/dist/tempo/actions/accessKey/revokeSync.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/revokeSync.js.map +1 -1
- package/dist/tempo/actions/accessKey/saveAuthorization.d.ts +40 -0
- package/dist/tempo/actions/accessKey/saveAuthorization.d.ts.map +1 -0
- package/dist/tempo/actions/accessKey/saveAuthorization.js +32 -0
- package/dist/tempo/actions/accessKey/saveAuthorization.js.map +1 -0
- package/dist/tempo/actions/accessKey/signAuthorization.d.ts +17 -13
- package/dist/tempo/actions/accessKey/signAuthorization.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/signAuthorization.js +46 -32
- package/dist/tempo/actions/accessKey/signAuthorization.js.map +1 -1
- package/dist/tempo/actions/accessKey/updateLimit.d.ts +2 -1
- package/dist/tempo/actions/accessKey/updateLimit.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/updateLimit.js.map +1 -1
- package/dist/tempo/actions/accessKey/updateLimitSync.d.ts +2 -1
- package/dist/tempo/actions/accessKey/updateLimitSync.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/updateLimitSync.js.map +1 -1
- package/dist/tempo/actions/accessKey/verifyHash.d.ts +13 -6
- package/dist/tempo/actions/accessKey/verifyHash.d.ts.map +1 -1
- package/dist/tempo/actions/accessKey/verifyHash.js +9 -4
- package/dist/tempo/actions/accessKey/verifyHash.js.map +1 -1
- package/dist/tempo/actions/accounts/deriveAccount.d.ts +97 -0
- package/dist/tempo/actions/accounts/deriveAccount.d.ts.map +1 -0
- package/dist/tempo/actions/accounts/deriveAccount.js +60 -0
- package/dist/tempo/actions/accounts/deriveAccount.js.map +1 -0
- package/dist/tempo/actions/{multisig → accounts}/getConfig.d.ts +5 -5
- package/dist/tempo/actions/accounts/getConfig.d.ts.map +1 -0
- package/dist/tempo/actions/{multisig → accounts}/getConfig.js +5 -5
- package/dist/tempo/actions/accounts/getConfig.js.map +1 -0
- package/dist/tempo/actions/{multisig → accounts}/getConfigCommitment.d.ts +5 -5
- package/dist/tempo/actions/accounts/getConfigCommitment.d.ts.map +1 -0
- package/dist/tempo/actions/{multisig → accounts}/getConfigCommitment.js +5 -6
- package/dist/tempo/actions/accounts/getConfigCommitment.js.map +1 -0
- package/dist/tempo/actions/{multisig → accounts}/getOperation.d.ts +4 -4
- package/dist/tempo/actions/{multisig → accounts}/getOperation.d.ts.map +1 -1
- package/dist/tempo/actions/{multisig → accounts}/getOperation.js +4 -4
- package/dist/tempo/actions/accounts/getOperation.js.map +1 -0
- package/dist/tempo/actions/{multisig → accounts}/index.d.ts +4 -0
- package/dist/tempo/actions/accounts/index.d.ts.map +1 -0
- package/dist/tempo/actions/{multisig → accounts}/index.js +4 -0
- package/dist/tempo/actions/accounts/index.js.map +1 -0
- package/dist/tempo/actions/{multisig → accounts}/updateConfig.d.ts +19 -15
- package/dist/tempo/actions/accounts/updateConfig.d.ts.map +1 -0
- package/dist/tempo/actions/{multisig → accounts}/updateConfig.js +26 -28
- package/dist/tempo/actions/accounts/updateConfig.js.map +1 -0
- package/dist/tempo/actions/{multisig → accounts}/updateConfigSync.d.ts +6 -6
- package/dist/tempo/actions/{multisig → accounts}/updateConfigSync.d.ts.map +1 -1
- package/dist/tempo/actions/{multisig → accounts}/updateConfigSync.js +6 -6
- package/dist/tempo/actions/{multisig → accounts}/updateConfigSync.js.map +1 -1
- package/dist/tempo/actions/accounts/upgrade.d.ts +138 -0
- package/dist/tempo/actions/accounts/upgrade.d.ts.map +1 -0
- package/dist/tempo/actions/accounts/upgrade.js +113 -0
- package/dist/tempo/actions/accounts/upgrade.js.map +1 -0
- package/dist/tempo/actions/accounts/upgradeSync.d.ts +56 -0
- package/dist/tempo/actions/accounts/upgradeSync.d.ts.map +1 -0
- package/dist/tempo/actions/accounts/upgradeSync.js +53 -0
- package/dist/tempo/actions/accounts/upgradeSync.js.map +1 -0
- package/dist/tempo/actions/accounts/verifyHash.d.ts +86 -0
- package/dist/tempo/actions/accounts/verifyHash.d.ts.map +1 -0
- package/dist/tempo/actions/accounts/verifyHash.js +60 -0
- package/dist/tempo/actions/accounts/verifyHash.js.map +1 -0
- package/dist/tempo/actions/ai/embed.d.ts +41 -0
- package/dist/tempo/actions/ai/embed.d.ts.map +1 -0
- package/dist/tempo/actions/ai/embed.js +35 -0
- package/dist/tempo/actions/ai/embed.js.map +1 -0
- package/dist/tempo/actions/ai/generateText.d.ts +67 -0
- package/dist/tempo/actions/ai/generateText.d.ts.map +1 -0
- package/dist/tempo/actions/ai/generateText.js +44 -0
- package/dist/tempo/actions/ai/generateText.js.map +1 -0
- package/dist/tempo/actions/ai/index.d.ts +4 -0
- package/dist/tempo/actions/ai/index.d.ts.map +1 -0
- package/dist/tempo/actions/ai/index.js +5 -0
- package/dist/tempo/actions/ai/index.js.map +1 -0
- package/dist/tempo/actions/ai/streamText.d.ts +42 -0
- package/dist/tempo/actions/ai/streamText.d.ts.map +1 -0
- package/dist/tempo/actions/ai/streamText.js +57 -0
- package/dist/tempo/actions/ai/streamText.js.map +1 -0
- package/dist/tempo/actions/amm/burn.d.ts +2 -1
- package/dist/tempo/actions/amm/burn.d.ts.map +1 -1
- package/dist/tempo/actions/amm/burn.js.map +1 -1
- package/dist/tempo/actions/amm/burnSync.d.ts +2 -1
- package/dist/tempo/actions/amm/burnSync.d.ts.map +1 -1
- package/dist/tempo/actions/amm/burnSync.js.map +1 -1
- package/dist/tempo/actions/amm/errors.d.ts +32 -0
- package/dist/tempo/actions/amm/errors.d.ts.map +1 -0
- package/dist/tempo/actions/amm/errors.js +91 -0
- package/dist/tempo/actions/amm/errors.js.map +1 -0
- package/dist/tempo/actions/amm/getLiquidityBalance.d.ts +2 -1
- package/dist/tempo/actions/amm/getLiquidityBalance.d.ts.map +1 -1
- package/dist/tempo/actions/amm/getLiquidityBalance.js +1 -2
- package/dist/tempo/actions/amm/getLiquidityBalance.js.map +1 -1
- package/dist/tempo/actions/amm/getPool.d.ts +2 -1
- package/dist/tempo/actions/amm/getPool.d.ts.map +1 -1
- package/dist/tempo/actions/amm/getPool.js +1 -2
- package/dist/tempo/actions/amm/getPool.js.map +1 -1
- package/dist/tempo/actions/amm/index.d.ts +1 -0
- package/dist/tempo/actions/amm/index.d.ts.map +1 -1
- package/dist/tempo/actions/amm/index.js +1 -0
- package/dist/tempo/actions/amm/index.js.map +1 -1
- package/dist/tempo/actions/amm/mint.d.ts +2 -1
- package/dist/tempo/actions/amm/mint.d.ts.map +1 -1
- package/dist/tempo/actions/amm/mint.js.map +1 -1
- package/dist/tempo/actions/amm/mintSync.d.ts +2 -1
- package/dist/tempo/actions/amm/mintSync.d.ts.map +1 -1
- package/dist/tempo/actions/amm/mintSync.js.map +1 -1
- package/dist/tempo/actions/amm/rebalanceSwap.d.ts +2 -1
- package/dist/tempo/actions/amm/rebalanceSwap.d.ts.map +1 -1
- package/dist/tempo/actions/amm/rebalanceSwap.js.map +1 -1
- package/dist/tempo/actions/amm/rebalanceSwapSync.d.ts +2 -1
- package/dist/tempo/actions/amm/rebalanceSwapSync.d.ts.map +1 -1
- package/dist/tempo/actions/amm/rebalanceSwapSync.js.map +1 -1
- package/dist/tempo/actions/bucket/delete.d.ts +34 -0
- package/dist/tempo/actions/bucket/delete.d.ts.map +1 -0
- package/dist/tempo/actions/bucket/delete.js +29 -0
- package/dist/tempo/actions/bucket/delete.js.map +1 -0
- package/dist/tempo/actions/bucket/get.d.ts +44 -0
- package/dist/tempo/actions/bucket/get.d.ts.map +1 -0
- package/dist/tempo/actions/bucket/get.js +44 -0
- package/dist/tempo/actions/bucket/get.js.map +1 -0
- package/dist/tempo/actions/bucket/head.d.ts +33 -0
- package/dist/tempo/actions/bucket/head.d.ts.map +1 -0
- package/dist/tempo/actions/bucket/head.js +30 -0
- package/dist/tempo/actions/bucket/head.js.map +1 -0
- package/dist/tempo/actions/bucket/index.d.ts +7 -0
- package/dist/tempo/actions/bucket/index.d.ts.map +1 -0
- package/dist/tempo/actions/bucket/index.js +7 -0
- package/dist/tempo/actions/bucket/index.js.map +1 -0
- package/dist/tempo/actions/bucket/list.d.ts +43 -0
- package/dist/tempo/actions/bucket/list.d.ts.map +1 -0
- package/dist/tempo/actions/bucket/list.js +31 -0
- package/dist/tempo/actions/bucket/list.js.map +1 -0
- package/dist/tempo/actions/bucket/put.d.ts +47 -0
- package/dist/tempo/actions/bucket/put.d.ts.map +1 -0
- package/dist/tempo/actions/bucket/put.js +53 -0
- package/dist/tempo/actions/bucket/put.js.map +1 -0
- package/dist/tempo/actions/bucket/types.d.ts +20 -0
- package/dist/tempo/actions/bucket/types.d.ts.map +1 -0
- package/dist/tempo/actions/bucket/types.js +2 -0
- package/dist/tempo/actions/bucket/types.js.map +1 -0
- package/dist/tempo/actions/channel/close.d.ts +2 -1
- package/dist/tempo/actions/channel/close.d.ts.map +1 -1
- package/dist/tempo/actions/channel/close.js.map +1 -1
- package/dist/tempo/actions/channel/closeSync.d.ts +2 -1
- package/dist/tempo/actions/channel/closeSync.d.ts.map +1 -1
- package/dist/tempo/actions/channel/closeSync.js.map +1 -1
- package/dist/tempo/actions/channel/errors.d.ts +65 -0
- package/dist/tempo/actions/channel/errors.d.ts.map +1 -0
- package/dist/tempo/actions/channel/errors.js +181 -0
- package/dist/tempo/actions/channel/errors.js.map +1 -0
- package/dist/tempo/actions/channel/getStates.d.ts +2 -1
- package/dist/tempo/actions/channel/getStates.d.ts.map +1 -1
- package/dist/tempo/actions/channel/getStates.js +1 -2
- package/dist/tempo/actions/channel/getStates.js.map +1 -1
- package/dist/tempo/actions/channel/index.d.ts +1 -0
- package/dist/tempo/actions/channel/index.d.ts.map +1 -1
- package/dist/tempo/actions/channel/index.js +1 -0
- package/dist/tempo/actions/channel/index.js.map +1 -1
- package/dist/tempo/actions/channel/open.d.ts +2 -1
- package/dist/tempo/actions/channel/open.d.ts.map +1 -1
- package/dist/tempo/actions/channel/open.js.map +1 -1
- package/dist/tempo/actions/channel/openSync.d.ts +2 -1
- package/dist/tempo/actions/channel/openSync.d.ts.map +1 -1
- package/dist/tempo/actions/channel/openSync.js.map +1 -1
- package/dist/tempo/actions/channel/requestClose.d.ts +2 -1
- package/dist/tempo/actions/channel/requestClose.d.ts.map +1 -1
- package/dist/tempo/actions/channel/requestClose.js.map +1 -1
- package/dist/tempo/actions/channel/requestCloseSync.d.ts +2 -1
- package/dist/tempo/actions/channel/requestCloseSync.d.ts.map +1 -1
- package/dist/tempo/actions/channel/requestCloseSync.js.map +1 -1
- package/dist/tempo/actions/channel/settle.d.ts +2 -1
- package/dist/tempo/actions/channel/settle.d.ts.map +1 -1
- package/dist/tempo/actions/channel/settle.js.map +1 -1
- package/dist/tempo/actions/channel/settleSync.d.ts +2 -1
- package/dist/tempo/actions/channel/settleSync.d.ts.map +1 -1
- package/dist/tempo/actions/channel/settleSync.js.map +1 -1
- package/dist/tempo/actions/channel/topUp.d.ts +2 -1
- package/dist/tempo/actions/channel/topUp.d.ts.map +1 -1
- package/dist/tempo/actions/channel/topUp.js.map +1 -1
- package/dist/tempo/actions/channel/topUpSync.d.ts +2 -1
- package/dist/tempo/actions/channel/topUpSync.d.ts.map +1 -1
- package/dist/tempo/actions/channel/topUpSync.js.map +1 -1
- package/dist/tempo/actions/channel/withdraw.d.ts +2 -1
- package/dist/tempo/actions/channel/withdraw.d.ts.map +1 -1
- package/dist/tempo/actions/channel/withdraw.js.map +1 -1
- package/dist/tempo/actions/channel/withdrawSync.d.ts +2 -1
- package/dist/tempo/actions/channel/withdrawSync.d.ts.map +1 -1
- package/dist/tempo/actions/channel/withdrawSync.js.map +1 -1
- package/dist/tempo/actions/compute/create.d.ts +110 -0
- package/dist/tempo/actions/compute/create.d.ts.map +1 -0
- package/dist/tempo/actions/compute/create.js +55 -0
- package/dist/tempo/actions/compute/create.js.map +1 -0
- package/dist/tempo/actions/compute/exec.d.ts +58 -0
- package/dist/tempo/actions/compute/exec.d.ts.map +1 -0
- package/dist/tempo/actions/compute/exec.js +33 -0
- package/dist/tempo/actions/compute/exec.js.map +1 -0
- package/dist/tempo/actions/compute/index.d.ts +14 -0
- package/dist/tempo/actions/compute/index.d.ts.map +1 -0
- package/dist/tempo/actions/compute/index.js +14 -0
- package/dist/tempo/actions/compute/index.js.map +1 -0
- package/dist/tempo/actions/compute/list.d.ts +39 -0
- package/dist/tempo/actions/compute/list.d.ts.map +1 -0
- package/dist/tempo/actions/compute/list.js +29 -0
- package/dist/tempo/actions/compute/list.js.map +1 -0
- package/dist/tempo/actions/compute/logs.d.ts +62 -0
- package/dist/tempo/actions/compute/logs.d.ts.map +1 -0
- package/dist/tempo/actions/compute/logs.js +37 -0
- package/dist/tempo/actions/compute/logs.js.map +1 -0
- package/dist/tempo/actions/compute/read.d.ts +54 -0
- package/dist/tempo/actions/compute/read.d.ts.map +1 -0
- package/dist/tempo/actions/compute/read.js +45 -0
- package/dist/tempo/actions/compute/read.js.map +1 -0
- package/dist/tempo/actions/compute/renew.d.ts +39 -0
- package/dist/tempo/actions/compute/renew.d.ts.map +1 -0
- package/dist/tempo/actions/compute/renew.js +34 -0
- package/dist/tempo/actions/compute/renew.js.map +1 -0
- package/dist/tempo/actions/compute/snapshot.d.ts +42 -0
- package/dist/tempo/actions/compute/snapshot.d.ts.map +1 -0
- package/dist/tempo/actions/compute/snapshot.js +33 -0
- package/dist/tempo/actions/compute/snapshot.js.map +1 -0
- package/dist/tempo/actions/compute/spawn.d.ts +49 -0
- package/dist/tempo/actions/compute/spawn.d.ts.map +1 -0
- package/dist/tempo/actions/compute/spawn.js +34 -0
- package/dist/tempo/actions/compute/spawn.js.map +1 -0
- package/dist/tempo/actions/compute/status.d.ts +39 -0
- package/dist/tempo/actions/compute/status.d.ts.map +1 -0
- package/dist/tempo/actions/compute/status.js +31 -0
- package/dist/tempo/actions/compute/status.js.map +1 -0
- package/dist/tempo/actions/compute/stream.d.ts +52 -0
- package/dist/tempo/actions/compute/stream.d.ts.map +1 -0
- package/dist/tempo/actions/compute/stream.js +37 -0
- package/dist/tempo/actions/compute/stream.js.map +1 -0
- package/dist/tempo/actions/compute/terminate.d.ts +41 -0
- package/dist/tempo/actions/compute/terminate.d.ts.map +1 -0
- package/dist/tempo/actions/compute/terminate.js +30 -0
- package/dist/tempo/actions/compute/terminate.js.map +1 -0
- package/dist/tempo/actions/compute/types.d.ts +26 -0
- package/dist/tempo/actions/compute/types.d.ts.map +1 -0
- package/dist/tempo/actions/compute/types.js +2 -0
- package/dist/tempo/actions/compute/types.js.map +1 -0
- package/dist/tempo/actions/compute/write.d.ts +45 -0
- package/dist/tempo/actions/compute/write.d.ts.map +1 -0
- package/dist/tempo/actions/compute/write.js +49 -0
- package/dist/tempo/actions/compute/write.js.map +1 -0
- package/dist/tempo/actions/dex/buy.d.ts +2 -1
- package/dist/tempo/actions/dex/buy.d.ts.map +1 -1
- package/dist/tempo/actions/dex/buy.js.map +1 -1
- package/dist/tempo/actions/dex/buySync.d.ts +2 -1
- package/dist/tempo/actions/dex/buySync.d.ts.map +1 -1
- package/dist/tempo/actions/dex/buySync.js.map +1 -1
- package/dist/tempo/actions/dex/cancel.d.ts +2 -1
- package/dist/tempo/actions/dex/cancel.d.ts.map +1 -1
- package/dist/tempo/actions/dex/cancel.js.map +1 -1
- package/dist/tempo/actions/dex/cancelStale.d.ts +2 -1
- package/dist/tempo/actions/dex/cancelStale.d.ts.map +1 -1
- package/dist/tempo/actions/dex/cancelStale.js.map +1 -1
- package/dist/tempo/actions/dex/cancelStaleSync.d.ts +2 -1
- package/dist/tempo/actions/dex/cancelStaleSync.d.ts.map +1 -1
- package/dist/tempo/actions/dex/cancelStaleSync.js.map +1 -1
- package/dist/tempo/actions/dex/cancelSync.d.ts +2 -1
- package/dist/tempo/actions/dex/cancelSync.d.ts.map +1 -1
- package/dist/tempo/actions/dex/cancelSync.js.map +1 -1
- package/dist/tempo/actions/dex/createPair.d.ts +2 -1
- package/dist/tempo/actions/dex/createPair.d.ts.map +1 -1
- package/dist/tempo/actions/dex/createPair.js.map +1 -1
- package/dist/tempo/actions/dex/createPairSync.d.ts +2 -1
- package/dist/tempo/actions/dex/createPairSync.d.ts.map +1 -1
- package/dist/tempo/actions/dex/createPairSync.js.map +1 -1
- package/dist/tempo/actions/dex/errors.d.ts +201 -0
- package/dist/tempo/actions/dex/errors.d.ts.map +1 -0
- package/dist/tempo/actions/dex/errors.js +514 -0
- package/dist/tempo/actions/dex/errors.js.map +1 -0
- package/dist/tempo/actions/dex/getBalance.d.ts +2 -1
- package/dist/tempo/actions/dex/getBalance.d.ts.map +1 -1
- package/dist/tempo/actions/dex/getBalance.js +1 -2
- package/dist/tempo/actions/dex/getBalance.js.map +1 -1
- package/dist/tempo/actions/dex/getBuyQuote.d.ts +2 -1
- package/dist/tempo/actions/dex/getBuyQuote.d.ts.map +1 -1
- package/dist/tempo/actions/dex/getBuyQuote.js +1 -2
- package/dist/tempo/actions/dex/getBuyQuote.js.map +1 -1
- package/dist/tempo/actions/dex/getOrder.d.ts +2 -1
- package/dist/tempo/actions/dex/getOrder.d.ts.map +1 -1
- package/dist/tempo/actions/dex/getOrder.js +1 -2
- package/dist/tempo/actions/dex/getOrder.js.map +1 -1
- package/dist/tempo/actions/dex/getOrderbook.d.ts +2 -1
- package/dist/tempo/actions/dex/getOrderbook.d.ts.map +1 -1
- package/dist/tempo/actions/dex/getOrderbook.js +1 -2
- package/dist/tempo/actions/dex/getOrderbook.js.map +1 -1
- package/dist/tempo/actions/dex/getSellQuote.d.ts +2 -1
- package/dist/tempo/actions/dex/getSellQuote.d.ts.map +1 -1
- package/dist/tempo/actions/dex/getSellQuote.js +1 -2
- package/dist/tempo/actions/dex/getSellQuote.js.map +1 -1
- package/dist/tempo/actions/dex/getTickLevel.d.ts +2 -1
- package/dist/tempo/actions/dex/getTickLevel.d.ts.map +1 -1
- package/dist/tempo/actions/dex/getTickLevel.js +1 -2
- package/dist/tempo/actions/dex/getTickLevel.js.map +1 -1
- package/dist/tempo/actions/dex/index.d.ts +1 -0
- package/dist/tempo/actions/dex/index.d.ts.map +1 -1
- package/dist/tempo/actions/dex/index.js +1 -0
- package/dist/tempo/actions/dex/index.js.map +1 -1
- package/dist/tempo/actions/dex/place.d.ts +2 -1
- package/dist/tempo/actions/dex/place.d.ts.map +1 -1
- package/dist/tempo/actions/dex/place.js.map +1 -1
- package/dist/tempo/actions/dex/placeFlip.d.ts +2 -1
- package/dist/tempo/actions/dex/placeFlip.d.ts.map +1 -1
- package/dist/tempo/actions/dex/placeFlip.js.map +1 -1
- package/dist/tempo/actions/dex/placeFlipSync.d.ts +2 -1
- package/dist/tempo/actions/dex/placeFlipSync.d.ts.map +1 -1
- package/dist/tempo/actions/dex/placeFlipSync.js.map +1 -1
- package/dist/tempo/actions/dex/placeSync.d.ts +2 -1
- package/dist/tempo/actions/dex/placeSync.d.ts.map +1 -1
- package/dist/tempo/actions/dex/placeSync.js.map +1 -1
- package/dist/tempo/actions/dex/sell.d.ts +2 -1
- package/dist/tempo/actions/dex/sell.d.ts.map +1 -1
- package/dist/tempo/actions/dex/sell.js.map +1 -1
- package/dist/tempo/actions/dex/sellSync.d.ts +2 -1
- package/dist/tempo/actions/dex/sellSync.d.ts.map +1 -1
- package/dist/tempo/actions/dex/sellSync.js.map +1 -1
- package/dist/tempo/actions/dex/withdraw.d.ts +2 -1
- package/dist/tempo/actions/dex/withdraw.d.ts.map +1 -1
- package/dist/tempo/actions/dex/withdraw.js.map +1 -1
- package/dist/tempo/actions/dex/withdrawSync.d.ts +2 -1
- package/dist/tempo/actions/dex/withdrawSync.d.ts.map +1 -1
- package/dist/tempo/actions/dex/withdrawSync.js.map +1 -1
- package/dist/tempo/actions/earn/deployment.d.ts +11 -9
- package/dist/tempo/actions/earn/deployment.d.ts.map +1 -1
- package/dist/tempo/actions/earn/deployment.js +7 -8
- package/dist/tempo/actions/earn/deployment.js.map +1 -1
- package/dist/tempo/actions/earn.d.ts +16 -16
- package/dist/tempo/actions/earn.d.ts.map +1 -1
- package/dist/tempo/actions/earn.js +1 -2
- package/dist/tempo/actions/earn.js.map +1 -1
- package/dist/tempo/actions/fee/errors.d.ts +26 -0
- package/dist/tempo/actions/fee/errors.d.ts.map +1 -0
- package/dist/tempo/actions/fee/errors.js +93 -0
- package/dist/tempo/actions/fee/errors.js.map +1 -0
- package/dist/tempo/actions/fee/getUserToken.d.ts +2 -1
- package/dist/tempo/actions/fee/getUserToken.d.ts.map +1 -1
- package/dist/tempo/actions/fee/getUserToken.js +1 -2
- package/dist/tempo/actions/fee/getUserToken.js.map +1 -1
- package/dist/tempo/actions/fee/getValidatorToken.d.ts +2 -1
- package/dist/tempo/actions/fee/getValidatorToken.d.ts.map +1 -1
- package/dist/tempo/actions/fee/getValidatorToken.js +1 -2
- package/dist/tempo/actions/fee/getValidatorToken.js.map +1 -1
- package/dist/tempo/actions/fee/index.d.ts +1 -0
- package/dist/tempo/actions/fee/index.d.ts.map +1 -1
- package/dist/tempo/actions/fee/index.js +1 -0
- package/dist/tempo/actions/fee/index.js.map +1 -1
- package/dist/tempo/actions/fee/setUserToken.d.ts +2 -1
- package/dist/tempo/actions/fee/setUserToken.d.ts.map +1 -1
- package/dist/tempo/actions/fee/setUserToken.js.map +1 -1
- package/dist/tempo/actions/fee/setUserTokenSync.d.ts +2 -1
- package/dist/tempo/actions/fee/setUserTokenSync.d.ts.map +1 -1
- package/dist/tempo/actions/fee/setUserTokenSync.js.map +1 -1
- package/dist/tempo/actions/fee/setValidatorToken.d.ts +2 -1
- package/dist/tempo/actions/fee/setValidatorToken.d.ts.map +1 -1
- package/dist/tempo/actions/fee/setValidatorToken.js.map +1 -1
- package/dist/tempo/actions/fee/setValidatorTokenSync.d.ts +2 -1
- package/dist/tempo/actions/fee/setValidatorTokenSync.d.ts.map +1 -1
- package/dist/tempo/actions/fee/setValidatorTokenSync.js.map +1 -1
- package/dist/tempo/actions/fee/validateToken.d.ts.map +1 -1
- package/dist/tempo/actions/fee/validateToken.js +1 -1
- package/dist/tempo/actions/fee/validateToken.js.map +1 -1
- package/dist/tempo/actions/gateway/getCapabilities.d.ts +25 -0
- package/dist/tempo/actions/gateway/getCapabilities.d.ts.map +1 -0
- package/dist/tempo/actions/gateway/getCapabilities.js +22 -0
- package/dist/tempo/actions/gateway/getCapabilities.js.map +1 -0
- package/dist/tempo/actions/gateway/index.d.ts +2 -0
- package/dist/tempo/actions/gateway/index.d.ts.map +1 -0
- package/dist/tempo/actions/gateway/index.js +3 -0
- package/dist/tempo/actions/gateway/index.js.map +1 -0
- package/dist/tempo/actions/index.d.ts +12 -2
- package/dist/tempo/actions/index.d.ts.map +1 -1
- package/dist/tempo/actions/index.js +12 -2
- package/dist/tempo/actions/index.js.map +1 -1
- package/dist/tempo/actions/kv/delete.d.ts +34 -0
- package/dist/tempo/actions/kv/delete.d.ts.map +1 -0
- package/dist/tempo/actions/kv/delete.js +29 -0
- package/dist/tempo/actions/kv/delete.js.map +1 -0
- package/dist/tempo/actions/kv/get.d.ts +33 -0
- package/dist/tempo/actions/kv/get.d.ts.map +1 -0
- package/dist/tempo/actions/kv/get.js +30 -0
- package/dist/tempo/actions/kv/get.js.map +1 -0
- package/dist/tempo/actions/kv/index.d.ts +6 -0
- package/dist/tempo/actions/kv/index.d.ts.map +1 -0
- package/dist/tempo/actions/kv/index.js +6 -0
- package/dist/tempo/actions/kv/index.js.map +1 -0
- package/dist/tempo/actions/kv/list.d.ts +44 -0
- package/dist/tempo/actions/kv/list.d.ts.map +1 -0
- package/dist/tempo/actions/kv/list.js +32 -0
- package/dist/tempo/actions/kv/list.js.map +1 -0
- package/dist/tempo/actions/kv/set.d.ts +52 -0
- package/dist/tempo/actions/kv/set.d.ts.map +1 -0
- package/dist/tempo/actions/kv/set.js +37 -0
- package/dist/tempo/actions/kv/set.js.map +1 -0
- package/dist/tempo/actions/kv/types.d.ts +16 -0
- package/dist/tempo/actions/kv/types.d.ts.map +1 -0
- package/dist/tempo/actions/kv/types.js +2 -0
- package/dist/tempo/actions/kv/types.js.map +1 -0
- package/dist/tempo/actions/nonce/errors.d.ts +33 -0
- package/dist/tempo/actions/nonce/errors.d.ts.map +1 -0
- package/dist/tempo/actions/nonce/errors.js +57 -0
- package/dist/tempo/actions/nonce/errors.js.map +1 -0
- package/dist/tempo/actions/nonce/get.d.ts +2 -1
- package/dist/tempo/actions/nonce/get.d.ts.map +1 -1
- package/dist/tempo/actions/nonce/get.js +1 -2
- package/dist/tempo/actions/nonce/get.js.map +1 -1
- package/dist/tempo/actions/nonce/index.d.ts +1 -0
- package/dist/tempo/actions/nonce/index.d.ts.map +1 -1
- package/dist/tempo/actions/nonce/index.js +1 -0
- package/dist/tempo/actions/nonce/index.js.map +1 -1
- package/dist/tempo/actions/policy/create.d.ts +2 -1
- package/dist/tempo/actions/policy/create.d.ts.map +1 -1
- package/dist/tempo/actions/policy/create.js.map +1 -1
- package/dist/tempo/actions/policy/createSync.d.ts +2 -1
- package/dist/tempo/actions/policy/createSync.d.ts.map +1 -1
- package/dist/tempo/actions/policy/createSync.js.map +1 -1
- package/dist/tempo/actions/policy/errors.d.ts +19 -0
- package/dist/tempo/actions/policy/errors.d.ts.map +1 -0
- package/dist/tempo/actions/policy/errors.js +30 -0
- package/dist/tempo/actions/policy/errors.js.map +1 -0
- package/dist/tempo/actions/policy/getData.d.ts +2 -1
- package/dist/tempo/actions/policy/getData.d.ts.map +1 -1
- package/dist/tempo/actions/policy/getData.js +1 -2
- package/dist/tempo/actions/policy/getData.js.map +1 -1
- package/dist/tempo/actions/policy/index.d.ts +1 -0
- package/dist/tempo/actions/policy/index.d.ts.map +1 -1
- package/dist/tempo/actions/policy/index.js +1 -0
- package/dist/tempo/actions/policy/index.js.map +1 -1
- package/dist/tempo/actions/policy/isAuthorized.d.ts +2 -1
- package/dist/tempo/actions/policy/isAuthorized.d.ts.map +1 -1
- package/dist/tempo/actions/policy/isAuthorized.js +1 -2
- package/dist/tempo/actions/policy/isAuthorized.js.map +1 -1
- package/dist/tempo/actions/policy/modifyBlacklist.d.ts +2 -1
- package/dist/tempo/actions/policy/modifyBlacklist.d.ts.map +1 -1
- package/dist/tempo/actions/policy/modifyBlacklist.js.map +1 -1
- package/dist/tempo/actions/policy/modifyBlacklistSync.d.ts +2 -1
- package/dist/tempo/actions/policy/modifyBlacklistSync.d.ts.map +1 -1
- package/dist/tempo/actions/policy/modifyBlacklistSync.js.map +1 -1
- package/dist/tempo/actions/policy/modifyWhitelist.d.ts +2 -1
- package/dist/tempo/actions/policy/modifyWhitelist.d.ts.map +1 -1
- package/dist/tempo/actions/policy/modifyWhitelist.js.map +1 -1
- package/dist/tempo/actions/policy/modifyWhitelistSync.d.ts +2 -1
- package/dist/tempo/actions/policy/modifyWhitelistSync.d.ts.map +1 -1
- package/dist/tempo/actions/policy/modifyWhitelistSync.js.map +1 -1
- package/dist/tempo/actions/policy/setAdmin.d.ts +2 -1
- package/dist/tempo/actions/policy/setAdmin.d.ts.map +1 -1
- package/dist/tempo/actions/policy/setAdmin.js.map +1 -1
- package/dist/tempo/actions/policy/setAdminSync.d.ts +2 -1
- package/dist/tempo/actions/policy/setAdminSync.d.ts.map +1 -1
- package/dist/tempo/actions/policy/setAdminSync.js.map +1 -1
- package/dist/tempo/actions/propAmm.d.ts +10 -3
- package/dist/tempo/actions/propAmm.d.ts.map +1 -1
- package/dist/tempo/actions/propAmm.js +1 -2
- package/dist/tempo/actions/propAmm.js.map +1 -1
- package/dist/tempo/actions/receivePolicy/burn.d.ts +2 -1
- package/dist/tempo/actions/receivePolicy/burn.d.ts.map +1 -1
- package/dist/tempo/actions/receivePolicy/burn.js.map +1 -1
- package/dist/tempo/actions/receivePolicy/burnSync.d.ts +2 -1
- package/dist/tempo/actions/receivePolicy/burnSync.d.ts.map +1 -1
- package/dist/tempo/actions/receivePolicy/burnSync.js.map +1 -1
- package/dist/tempo/actions/receivePolicy/claim.d.ts +2 -1
- package/dist/tempo/actions/receivePolicy/claim.d.ts.map +1 -1
- package/dist/tempo/actions/receivePolicy/claim.js.map +1 -1
- package/dist/tempo/actions/receivePolicy/claimSync.d.ts +2 -1
- package/dist/tempo/actions/receivePolicy/claimSync.d.ts.map +1 -1
- package/dist/tempo/actions/receivePolicy/claimSync.js.map +1 -1
- package/dist/tempo/actions/receivePolicy/get.d.ts +2 -1
- package/dist/tempo/actions/receivePolicy/get.d.ts.map +1 -1
- package/dist/tempo/actions/receivePolicy/get.js +1 -2
- package/dist/tempo/actions/receivePolicy/get.js.map +1 -1
- package/dist/tempo/actions/receivePolicy/getBlockedBalance.d.ts +3 -3
- package/dist/tempo/actions/receivePolicy/getBlockedBalance.d.ts.map +1 -1
- package/dist/tempo/actions/receivePolicy/getBlockedBalance.js +1 -2
- package/dist/tempo/actions/receivePolicy/getBlockedBalance.js.map +1 -1
- package/dist/tempo/actions/receivePolicy/set.d.ts +2 -1
- package/dist/tempo/actions/receivePolicy/set.d.ts.map +1 -1
- package/dist/tempo/actions/receivePolicy/set.js +2 -3
- package/dist/tempo/actions/receivePolicy/set.js.map +1 -1
- package/dist/tempo/actions/receivePolicy/setSync.d.ts +2 -1
- package/dist/tempo/actions/receivePolicy/setSync.d.ts.map +1 -1
- package/dist/tempo/actions/receivePolicy/setSync.js.map +1 -1
- package/dist/tempo/actions/receivePolicy/validate.d.ts +2 -1
- package/dist/tempo/actions/receivePolicy/validate.d.ts.map +1 -1
- package/dist/tempo/actions/receivePolicy/validate.js +1 -2
- package/dist/tempo/actions/receivePolicy/validate.js.map +1 -1
- package/dist/tempo/actions/token/approve.d.ts +2 -1
- package/dist/tempo/actions/token/approve.d.ts.map +1 -1
- package/dist/tempo/actions/token/approve.js.map +1 -1
- package/dist/tempo/actions/token/approveSync.d.ts +2 -1
- package/dist/tempo/actions/token/approveSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/approveSync.js.map +1 -1
- package/dist/tempo/actions/token/burn.d.ts +2 -1
- package/dist/tempo/actions/token/burn.d.ts.map +1 -1
- package/dist/tempo/actions/token/burn.js.map +1 -1
- package/dist/tempo/actions/token/burnBlocked.d.ts +2 -1
- package/dist/tempo/actions/token/burnBlocked.d.ts.map +1 -1
- package/dist/tempo/actions/token/burnBlocked.js.map +1 -1
- package/dist/tempo/actions/token/burnBlockedSync.d.ts +2 -1
- package/dist/tempo/actions/token/burnBlockedSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/burnBlockedSync.js.map +1 -1
- package/dist/tempo/actions/token/burnSync.d.ts +2 -1
- package/dist/tempo/actions/token/burnSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/burnSync.js.map +1 -1
- package/dist/tempo/actions/token/changeTransferPolicy.d.ts +2 -1
- package/dist/tempo/actions/token/changeTransferPolicy.d.ts.map +1 -1
- package/dist/tempo/actions/token/changeTransferPolicy.js.map +1 -1
- package/dist/tempo/actions/token/changeTransferPolicySync.d.ts +2 -1
- package/dist/tempo/actions/token/changeTransferPolicySync.d.ts.map +1 -1
- package/dist/tempo/actions/token/changeTransferPolicySync.js.map +1 -1
- package/dist/tempo/actions/token/create.d.ts +2 -1
- package/dist/tempo/actions/token/create.d.ts.map +1 -1
- package/dist/tempo/actions/token/create.js.map +1 -1
- package/dist/tempo/actions/token/createSync.d.ts +2 -1
- package/dist/tempo/actions/token/createSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/createSync.js.map +1 -1
- package/dist/tempo/actions/token/errors.d.ts +164 -0
- package/dist/tempo/actions/token/errors.d.ts.map +1 -0
- package/dist/tempo/actions/token/errors.js +461 -0
- package/dist/tempo/actions/token/errors.js.map +1 -0
- package/dist/tempo/actions/token/getAllowance.d.ts +2 -1
- package/dist/tempo/actions/token/getAllowance.d.ts.map +1 -1
- package/dist/tempo/actions/token/getAllowance.js +1 -2
- package/dist/tempo/actions/token/getAllowance.js.map +1 -1
- package/dist/tempo/actions/token/getBalance.d.ts +2 -1
- package/dist/tempo/actions/token/getBalance.d.ts.map +1 -1
- package/dist/tempo/actions/token/getBalance.js +1 -2
- package/dist/tempo/actions/token/getBalance.js.map +1 -1
- package/dist/tempo/actions/token/getMetadata.d.ts +2 -1
- package/dist/tempo/actions/token/getMetadata.d.ts.map +1 -1
- package/dist/tempo/actions/token/getMetadata.js +1 -2
- package/dist/tempo/actions/token/getMetadata.js.map +1 -1
- package/dist/tempo/actions/token/getRoleAdmin.d.ts +3 -3
- package/dist/tempo/actions/token/getRoleAdmin.d.ts.map +1 -1
- package/dist/tempo/actions/token/getRoleAdmin.js +1 -2
- package/dist/tempo/actions/token/getRoleAdmin.js.map +1 -1
- package/dist/tempo/actions/token/getTotalSupply.d.ts +2 -1
- package/dist/tempo/actions/token/getTotalSupply.d.ts.map +1 -1
- package/dist/tempo/actions/token/getTotalSupply.js +1 -2
- package/dist/tempo/actions/token/getTotalSupply.js.map +1 -1
- package/dist/tempo/actions/token/grantRoles.d.ts +2 -1
- package/dist/tempo/actions/token/grantRoles.d.ts.map +1 -1
- package/dist/tempo/actions/token/grantRoles.js.map +1 -1
- package/dist/tempo/actions/token/grantRolesSync.d.ts +2 -1
- package/dist/tempo/actions/token/grantRolesSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/grantRolesSync.js.map +1 -1
- package/dist/tempo/actions/token/hasRole.d.ts +3 -3
- package/dist/tempo/actions/token/hasRole.d.ts.map +1 -1
- package/dist/tempo/actions/token/hasRole.js +1 -2
- package/dist/tempo/actions/token/hasRole.js.map +1 -1
- package/dist/tempo/actions/token/index.d.ts +1 -0
- package/dist/tempo/actions/token/index.d.ts.map +1 -1
- package/dist/tempo/actions/token/index.js +1 -0
- package/dist/tempo/actions/token/index.js.map +1 -1
- package/dist/tempo/actions/token/mint.d.ts +2 -1
- package/dist/tempo/actions/token/mint.d.ts.map +1 -1
- package/dist/tempo/actions/token/mint.js +4 -3
- package/dist/tempo/actions/token/mint.js.map +1 -1
- package/dist/tempo/actions/token/mintSync.d.ts +2 -1
- package/dist/tempo/actions/token/mintSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/mintSync.js.map +1 -1
- package/dist/tempo/actions/token/pause.d.ts +2 -1
- package/dist/tempo/actions/token/pause.d.ts.map +1 -1
- package/dist/tempo/actions/token/pause.js.map +1 -1
- package/dist/tempo/actions/token/pauseSync.d.ts +2 -1
- package/dist/tempo/actions/token/pauseSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/pauseSync.js.map +1 -1
- package/dist/tempo/actions/token/prepareUpdateQuoteToken.d.ts +2 -1
- package/dist/tempo/actions/token/prepareUpdateQuoteToken.d.ts.map +1 -1
- package/dist/tempo/actions/token/prepareUpdateQuoteToken.js.map +1 -1
- package/dist/tempo/actions/token/prepareUpdateQuoteTokenSync.d.ts +2 -1
- package/dist/tempo/actions/token/prepareUpdateQuoteTokenSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/prepareUpdateQuoteTokenSync.js.map +1 -1
- package/dist/tempo/actions/token/renounceRoles.d.ts +2 -1
- package/dist/tempo/actions/token/renounceRoles.d.ts.map +1 -1
- package/dist/tempo/actions/token/renounceRoles.js.map +1 -1
- package/dist/tempo/actions/token/renounceRolesSync.d.ts +2 -1
- package/dist/tempo/actions/token/renounceRolesSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/renounceRolesSync.js.map +1 -1
- package/dist/tempo/actions/token/revokeRoles.d.ts +2 -1
- package/dist/tempo/actions/token/revokeRoles.d.ts.map +1 -1
- package/dist/tempo/actions/token/revokeRoles.js.map +1 -1
- package/dist/tempo/actions/token/revokeRolesSync.d.ts +2 -1
- package/dist/tempo/actions/token/revokeRolesSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/revokeRolesSync.js.map +1 -1
- package/dist/tempo/actions/token/setRoleAdmin.d.ts +2 -1
- package/dist/tempo/actions/token/setRoleAdmin.d.ts.map +1 -1
- package/dist/tempo/actions/token/setRoleAdmin.js.map +1 -1
- package/dist/tempo/actions/token/setRoleAdminSync.d.ts +2 -1
- package/dist/tempo/actions/token/setRoleAdminSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/setRoleAdminSync.js.map +1 -1
- package/dist/tempo/actions/token/setSupplyCap.d.ts +2 -1
- package/dist/tempo/actions/token/setSupplyCap.d.ts.map +1 -1
- package/dist/tempo/actions/token/setSupplyCap.js.map +1 -1
- package/dist/tempo/actions/token/setSupplyCapSync.d.ts +2 -1
- package/dist/tempo/actions/token/setSupplyCapSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/setSupplyCapSync.js.map +1 -1
- package/dist/tempo/actions/token/transfer.d.ts +2 -1
- package/dist/tempo/actions/token/transfer.d.ts.map +1 -1
- package/dist/tempo/actions/token/transfer.js.map +1 -1
- package/dist/tempo/actions/token/transferSync.d.ts +2 -1
- package/dist/tempo/actions/token/transferSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/transferSync.js.map +1 -1
- package/dist/tempo/actions/token/unpause.d.ts +2 -1
- package/dist/tempo/actions/token/unpause.d.ts.map +1 -1
- package/dist/tempo/actions/token/unpause.js.map +1 -1
- package/dist/tempo/actions/token/unpauseSync.d.ts +2 -1
- package/dist/tempo/actions/token/unpauseSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/unpauseSync.js.map +1 -1
- package/dist/tempo/actions/token/updateQuoteToken.d.ts +2 -1
- package/dist/tempo/actions/token/updateQuoteToken.d.ts.map +1 -1
- package/dist/tempo/actions/token/updateQuoteToken.js.map +1 -1
- package/dist/tempo/actions/token/updateQuoteTokenSync.d.ts +2 -1
- package/dist/tempo/actions/token/updateQuoteTokenSync.d.ts.map +1 -1
- package/dist/tempo/actions/token/updateQuoteTokenSync.js.map +1 -1
- package/dist/tempo/actions/validator/add.d.ts +2 -1
- package/dist/tempo/actions/validator/add.d.ts.map +1 -1
- package/dist/tempo/actions/validator/add.js.map +1 -1
- package/dist/tempo/actions/validator/addSync.d.ts +2 -1
- package/dist/tempo/actions/validator/addSync.d.ts.map +1 -1
- package/dist/tempo/actions/validator/addSync.js.map +1 -1
- package/dist/tempo/actions/validator/changeOwner.d.ts +2 -1
- package/dist/tempo/actions/validator/changeOwner.d.ts.map +1 -1
- package/dist/tempo/actions/validator/changeOwner.js.map +1 -1
- package/dist/tempo/actions/validator/changeOwnerSync.d.ts +2 -1
- package/dist/tempo/actions/validator/changeOwnerSync.d.ts.map +1 -1
- package/dist/tempo/actions/validator/changeOwnerSync.js.map +1 -1
- package/dist/tempo/actions/validator/changeStatus.d.ts +2 -1
- package/dist/tempo/actions/validator/changeStatus.d.ts.map +1 -1
- package/dist/tempo/actions/validator/changeStatus.js.map +1 -1
- package/dist/tempo/actions/validator/changeStatusSync.d.ts +2 -1
- package/dist/tempo/actions/validator/changeStatusSync.d.ts.map +1 -1
- package/dist/tempo/actions/validator/changeStatusSync.js.map +1 -1
- package/dist/tempo/actions/validator/get.d.ts +3 -3
- package/dist/tempo/actions/validator/get.d.ts.map +1 -1
- package/dist/tempo/actions/validator/get.js +1 -2
- package/dist/tempo/actions/validator/get.js.map +1 -1
- package/dist/tempo/actions/validator/getByIndex.d.ts +3 -3
- package/dist/tempo/actions/validator/getByIndex.d.ts.map +1 -1
- package/dist/tempo/actions/validator/getByIndex.js +1 -2
- package/dist/tempo/actions/validator/getByIndex.js.map +1 -1
- package/dist/tempo/actions/validator/getCount.d.ts +3 -2
- package/dist/tempo/actions/validator/getCount.d.ts.map +1 -1
- package/dist/tempo/actions/validator/getCount.js +1 -2
- package/dist/tempo/actions/validator/getCount.js.map +1 -1
- package/dist/tempo/actions/validator/getNextFullDkgCeremony.d.ts +3 -2
- package/dist/tempo/actions/validator/getNextFullDkgCeremony.d.ts.map +1 -1
- package/dist/tempo/actions/validator/getNextFullDkgCeremony.js +1 -2
- package/dist/tempo/actions/validator/getNextFullDkgCeremony.js.map +1 -1
- package/dist/tempo/actions/validator/getOwner.d.ts +3 -2
- package/dist/tempo/actions/validator/getOwner.d.ts.map +1 -1
- package/dist/tempo/actions/validator/getOwner.js +1 -2
- package/dist/tempo/actions/validator/getOwner.js.map +1 -1
- package/dist/tempo/actions/validator/list.d.ts +3 -2
- package/dist/tempo/actions/validator/list.d.ts.map +1 -1
- package/dist/tempo/actions/validator/list.js +1 -2
- package/dist/tempo/actions/validator/list.js.map +1 -1
- package/dist/tempo/actions/validator/setNextFullDkgCeremony.d.ts +2 -1
- package/dist/tempo/actions/validator/setNextFullDkgCeremony.d.ts.map +1 -1
- package/dist/tempo/actions/validator/setNextFullDkgCeremony.js.map +1 -1
- package/dist/tempo/actions/validator/setNextFullDkgCeremonySync.d.ts +2 -1
- package/dist/tempo/actions/validator/setNextFullDkgCeremonySync.d.ts.map +1 -1
- package/dist/tempo/actions/validator/setNextFullDkgCeremonySync.js.map +1 -1
- package/dist/tempo/actions/validator/update.d.ts +2 -1
- package/dist/tempo/actions/validator/update.d.ts.map +1 -1
- package/dist/tempo/actions/validator/update.js.map +1 -1
- package/dist/tempo/actions/validator/updateSync.d.ts +2 -1
- package/dist/tempo/actions/validator/updateSync.d.ts.map +1 -1
- package/dist/tempo/actions/validator/updateSync.js.map +1 -1
- package/dist/tempo/actions/virtualAddress/getMasterAddress.d.ts +2 -1
- package/dist/tempo/actions/virtualAddress/getMasterAddress.d.ts.map +1 -1
- package/dist/tempo/actions/virtualAddress/getMasterAddress.js +1 -2
- package/dist/tempo/actions/virtualAddress/getMasterAddress.js.map +1 -1
- package/dist/tempo/actions/virtualAddress/registerMaster.d.ts +2 -1
- package/dist/tempo/actions/virtualAddress/registerMaster.d.ts.map +1 -1
- package/dist/tempo/actions/virtualAddress/registerMaster.js.map +1 -1
- package/dist/tempo/actions/virtualAddress/registerMasterSync.d.ts +2 -1
- package/dist/tempo/actions/virtualAddress/registerMasterSync.d.ts.map +1 -1
- package/dist/tempo/actions/virtualAddress/registerMasterSync.js.map +1 -1
- package/dist/tempo/actions/zone/deposit.d.ts +2 -1
- package/dist/tempo/actions/zone/deposit.d.ts.map +1 -1
- package/dist/tempo/actions/zone/deposit.js.map +1 -1
- package/dist/tempo/actions/zone/depositSync.d.ts +2 -1
- package/dist/tempo/actions/zone/depositSync.d.ts.map +1 -1
- package/dist/tempo/actions/zone/depositSync.js.map +1 -1
- package/dist/tempo/actions/zone/encryptedDeposit.d.ts +3 -2
- package/dist/tempo/actions/zone/encryptedDeposit.d.ts.map +1 -1
- package/dist/tempo/actions/zone/encryptedDeposit.js.map +1 -1
- package/dist/tempo/actions/zone/encryptedDepositSync.d.ts +2 -1
- package/dist/tempo/actions/zone/encryptedDepositSync.d.ts.map +1 -1
- package/dist/tempo/actions/zone/encryptedDepositSync.js.map +1 -1
- package/dist/tempo/actions/zone/getWithdrawalFee.d.ts +2 -1
- 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/requestVerifiableWithdrawal.d.ts +2 -1
- package/dist/tempo/actions/zone/requestVerifiableWithdrawal.d.ts.map +1 -1
- package/dist/tempo/actions/zone/requestVerifiableWithdrawal.js.map +1 -1
- package/dist/tempo/actions/zone/requestVerifiableWithdrawalSync.d.ts +2 -1
- package/dist/tempo/actions/zone/requestVerifiableWithdrawalSync.d.ts.map +1 -1
- package/dist/tempo/actions/zone/requestVerifiableWithdrawalSync.js.map +1 -1
- package/dist/tempo/actions/zone/requestWithdrawal.d.ts +2 -1
- package/dist/tempo/actions/zone/requestWithdrawal.d.ts.map +1 -1
- package/dist/tempo/actions/zone/requestWithdrawal.js.map +1 -1
- package/dist/tempo/actions/zone/requestWithdrawalSync.d.ts +2 -1
- package/dist/tempo/actions/zone/requestWithdrawalSync.d.ts.map +1 -1
- package/dist/tempo/actions/zone/requestWithdrawalSync.js.map +1 -1
- package/dist/tempo/chainConfig.d.ts +24 -17
- package/dist/tempo/chainConfig.d.ts.map +1 -1
- package/dist/tempo/chainConfig.js +366 -122
- package/dist/tempo/chainConfig.js.map +1 -1
- package/dist/tempo/errors.d.ts +65 -1
- package/dist/tempo/errors.d.ts.map +1 -1
- package/dist/tempo/errors.js +76 -0
- package/dist/tempo/errors.js.map +1 -1
- package/dist/tempo/index.d.ts +18 -3
- package/dist/tempo/index.d.ts.map +1 -1
- package/dist/tempo/index.js +16 -3
- package/dist/tempo/index.js.map +1 -1
- package/dist/tempo/internal/errors.d.ts +66 -0
- package/dist/tempo/internal/errors.d.ts.map +1 -0
- package/dist/tempo/internal/errors.js +43 -0
- package/dist/tempo/internal/errors.js.map +1 -0
- package/dist/tempo/internal/ndjson.d.ts +9 -0
- package/dist/tempo/internal/ndjson.d.ts.map +1 -0
- package/dist/tempo/internal/ndjson.js +44 -0
- package/dist/tempo/internal/ndjson.js.map +1 -0
- package/dist/tempo/internal/relay/accounts.d.ts +15 -0
- package/dist/tempo/internal/relay/accounts.d.ts.map +1 -0
- package/dist/tempo/internal/relay/{multisig.js → accounts.js} +184 -110
- package/dist/tempo/internal/relay/accounts.js.map +1 -0
- package/dist/tempo/internal/relay/autoSwap.d.ts +3 -0
- package/dist/tempo/internal/relay/autoSwap.d.ts.map +1 -0
- package/dist/tempo/internal/relay/autoSwap.js +217 -0
- package/dist/tempo/internal/relay/autoSwap.js.map +1 -0
- package/dist/tempo/internal/relay/error.d.ts.map +1 -1
- package/dist/tempo/internal/relay/error.js +6 -2
- package/dist/tempo/internal/relay/error.js.map +1 -1
- package/dist/tempo/internal/relay/feePayer.d.ts +7 -3
- package/dist/tempo/internal/relay/feePayer.d.ts.map +1 -1
- package/dist/tempo/internal/relay/feePayer.js +349 -30
- package/dist/tempo/internal/relay/feePayer.js.map +1 -1
- package/dist/tempo/internal/relay/feeToken.d.ts.map +1 -1
- package/dist/tempo/internal/relay/feeToken.js +21 -6
- package/dist/tempo/internal/relay/feeToken.js.map +1 -1
- package/dist/tempo/internal/relay/keyAuthorization.d.ts +25 -0
- package/dist/tempo/internal/relay/keyAuthorization.d.ts.map +1 -0
- package/dist/tempo/internal/relay/keyAuthorization.js +338 -0
- package/dist/tempo/internal/relay/keyAuthorization.js.map +1 -0
- package/dist/tempo/internal/relay/plugin.d.ts +6 -3
- package/dist/tempo/internal/relay/plugin.d.ts.map +1 -1
- package/dist/tempo/internal/relay/plugin.js +15 -6
- package/dist/tempo/internal/relay/plugin.js.map +1 -1
- package/dist/tempo/internal/relay/request.d.ts.map +1 -1
- package/dist/tempo/internal/relay/request.js +92 -7
- package/dist/tempo/internal/relay/request.js.map +1 -1
- package/dist/tempo/internal/relay/simulate.d.ts +4 -0
- package/dist/tempo/internal/relay/simulate.d.ts.map +1 -1
- package/dist/tempo/internal/relay/simulate.js +92 -41
- package/dist/tempo/internal/relay/simulate.js.map +1 -1
- package/dist/tempo/internal/relay/utils.d.ts +8 -0
- package/dist/tempo/internal/relay/utils.d.ts.map +1 -1
- package/dist/tempo/internal/relay.d.ts.map +1 -1
- package/dist/tempo/internal/relay.js +40 -2
- package/dist/tempo/internal/relay.js.map +1 -1
- package/dist/tempo/internal/replacement.d.ts +26 -0
- package/dist/tempo/internal/replacement.d.ts.map +1 -0
- package/dist/tempo/internal/replacement.js +76 -0
- package/dist/tempo/internal/replacement.js.map +1 -0
- package/dist/tempo/internal/resolveError.d.ts +4 -0
- package/dist/tempo/internal/resolveError.d.ts.map +1 -0
- package/dist/tempo/internal/resolveError.js +129 -0
- package/dist/tempo/internal/resolveError.js.map +1 -0
- package/dist/tempo/internal/utils.d.ts +38 -2
- package/dist/tempo/internal/utils.d.ts.map +1 -1
- package/dist/tempo/internal/utils.js +44 -4
- package/dist/tempo/internal/utils.js.map +1 -1
- package/dist/tempo/zones/zone.d.ts +12 -0
- package/dist/tempo/zones/zone.d.ts.map +1 -1
- package/dist/utils/Authorization.d.ts.map +1 -1
- package/dist/utils/Authorization.js +16 -8
- package/dist/utils/Authorization.js.map +1 -1
- package/dist/utils/RpcClient.d.ts +4 -1
- package/dist/utils/RpcClient.d.ts.map +1 -1
- package/dist/utils/RpcClient.js +112 -49
- package/dist/utils/RpcClient.js.map +1 -1
- package/dist/utils/SignatureErc2098.d.ts +11 -4
- package/dist/utils/SignatureErc2098.d.ts.map +1 -1
- package/dist/utils/SignatureErc2098.js +23 -3
- package/dist/utils/SignatureErc2098.js.map +1 -1
- package/dist/utils/TypedData.d.ts +2 -14
- package/dist/utils/TypedData.d.ts.map +1 -1
- package/dist/utils/TypedData.js +2 -27
- package/dist/utils/TypedData.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/arcTestnet.ts +11 -8
- package/src/chains/definitions/hashKeyChain.ts +4 -4
- package/src/chains/definitions/hashkeyChainTestnet.ts +4 -4
- package/src/chains/definitions/hyperEvm.ts +3 -0
- package/src/chains/definitions/hyperliquidEvmTestnet.ts +3 -0
- package/src/chains/definitions/molibra.ts +14 -0
- package/src/chains/definitions/monad.ts +1 -1
- package/src/chains/definitions/monadTestnet.ts +1 -1
- package/src/chains/definitions/qmsTestnet.ts +23 -0
- package/src/chains/definitions/rwaChain.ts +46 -0
- package/src/chains/definitions/rwaChainSepolia.ts +47 -0
- package/src/chains/definitions/tempo.ts +5 -1
- package/src/chains/definitions/tempoDevnet.ts +7 -0
- package/src/chains/definitions/tempoModerato.ts +6 -2
- package/src/chains/definitions/turkchain.ts +23 -0
- package/src/chains/definitions/valuechain.ts +20 -0
- package/src/chains/definitions/valuechainTestnet.ts +21 -0
- package/src/chains/definitions/zksync.ts +1 -1
- package/src/chains/definitions/zksyncEraTestnet.ts +25 -0
- package/src/chains/index.ts +8 -0
- package/src/core/Chain.ts +67 -2
- package/src/core/Client.ts +110 -10
- package/src/core/NonceManager.ts +17 -1
- package/src/core/RpcError.ts +11 -5
- package/src/core/actions/block/watch.ts +56 -85
- package/src/core/actions/block/watchHeaders.ts +13 -74
- package/src/core/actions/block/watchNumber.ts +26 -84
- package/src/core/actions/call.ts +8 -7
- package/src/core/actions/contract/watchEvent.ts +3 -2
- package/src/core/actions/ens/getAddress.ts +11 -3
- package/src/core/actions/ens/internal/avatar.ts +29 -8
- package/src/core/actions/ens/internal/batchGateway.ts +61 -22
- package/src/core/actions/event/createFilter.ts +4 -11
- package/src/core/actions/event/getLogs.ts +5 -12
- package/src/core/actions/event/internal.ts +60 -0
- package/src/core/actions/event/watch.ts +96 -112
- package/src/core/actions/filter/getChanges.ts +5 -3
- package/src/core/actions/filter/getLogs.ts +5 -4
- package/src/core/actions/internal/ccip.ts +73 -23
- package/src/core/actions/internal/transactionRequest.ts +2 -2
- package/src/core/actions/transaction/fill.ts +4 -0
- package/src/core/actions/transaction/getConfirmations.ts +11 -1
- package/src/core/actions/transaction/prepare.ts +80 -23
- package/src/core/actions/transaction/send.ts +8 -3
- package/src/core/actions/transaction/sendSync.ts +80 -12
- package/src/core/actions/transaction/waitForReceipt.ts +235 -35
- package/src/core/actions/transaction/watchPending.ts +12 -75
- package/src/core/actions/wallet/sendCalls.ts +1 -1
- package/src/core/actions/wallet/waitForCallsStatus.ts +25 -1
- package/src/core/internal/asyncIterator.ts +87 -0
- package/src/core/internal/promise.ts +7 -1
- package/src/core/internal/transport.ts +61 -23
- package/src/core/internal/wait.ts +8 -4
- package/src/core/transports/fallback.ts +28 -0
- package/src/core/transports/http.ts +23 -5
- package/src/erc4337/actions/userOperation/prepare.ts +4 -3
- package/src/internal/inference.ts +7 -3
- package/src/op-stack/Withdrawal.ts +24 -0
- package/src/op-stack/abis.ts +52 -0
- package/src/op-stack/actions/l1/getTimeToFinalize.ts +108 -21
- package/src/op-stack/actions/l1/getTimeToProve.ts +23 -4
- package/src/op-stack/actions/l1/getWithdrawalStatus.ts +19 -5
- package/src/op-stack/actions/l1/internal.ts +36 -1
- package/src/op-stack/actions/l1/waitToProve.ts +20 -4
- package/src/tempo/Abis.ts +662 -49
- package/src/tempo/Account.ts +644 -210
- package/src/tempo/Addresses.ts +6 -4
- package/src/tempo/Capabilities.ts +31 -21
- package/src/tempo/Decorator.ts +161 -82
- package/src/tempo/ExecutionError.ts +130 -5
- package/src/tempo/Expiry.ts +13 -0
- package/src/tempo/Gateway.ts +487 -0
- package/src/tempo/GatewayDecorator.ts +890 -0
- package/src/tempo/Hardfork.ts +16 -2
- package/src/tempo/KeyAuthorizationManager.ts +53 -31
- package/src/tempo/Relay.ts +137 -16
- package/src/tempo/Selectors.ts +22 -2
- package/src/tempo/Transport.ts +52 -22
- package/src/tempo/{multisig → accounts}/Config.ts +55 -37
- package/src/tempo/{multisig → accounts}/Operation.ts +28 -28
- package/src/tempo/{multisig → accounts}/Signature.ts +5 -3
- package/src/tempo/actions/accessKey/authorize.ts +16 -9
- package/src/tempo/actions/accessKey/authorizeSync.ts +4 -1
- package/src/tempo/actions/accessKey/burnWitness.ts +4 -1
- package/src/tempo/actions/accessKey/burnWitnessSync.ts +4 -1
- package/src/tempo/actions/accessKey/errors.ts +461 -0
- package/src/tempo/actions/accessKey/getMetadata.ts +8 -12
- package/src/tempo/actions/accessKey/getRemainingLimit.ts +5 -2
- package/src/tempo/actions/accessKey/index.ts +18 -2
- package/src/tempo/actions/accessKey/internal.ts +8 -0
- package/src/tempo/actions/accessKey/isWitnessBurned.ts +5 -2
- package/src/tempo/actions/accessKey/prepareAuthorization.ts +16 -23
- package/src/tempo/actions/accessKey/revoke.ts +4 -1
- package/src/tempo/actions/accessKey/revokeSync.ts +4 -1
- package/src/tempo/actions/accessKey/saveAuthorization.ts +51 -0
- package/src/tempo/actions/accessKey/signAuthorization.ts +76 -54
- package/src/tempo/actions/accessKey/updateLimit.ts +4 -1
- package/src/tempo/actions/accessKey/updateLimitSync.ts +4 -1
- package/src/tempo/actions/accessKey/verifyHash.ts +16 -7
- package/src/tempo/actions/accounts/deriveAccount.ts +89 -0
- package/src/tempo/actions/{multisig → accounts}/getConfig.ts +7 -7
- package/src/tempo/actions/{multisig → accounts}/getConfigCommitment.ts +7 -8
- package/src/tempo/actions/{multisig → accounts}/getOperation.ts +6 -6
- package/src/tempo/actions/{multisig → accounts}/index.ts +4 -0
- package/src/tempo/actions/{multisig → accounts}/updateConfig.ts +36 -34
- package/src/tempo/actions/{multisig → accounts}/updateConfigSync.ts +7 -7
- package/src/tempo/actions/accounts/upgrade.ts +150 -0
- package/src/tempo/actions/accounts/upgradeSync.ts +91 -0
- package/src/tempo/actions/accounts/verifyHash.ts +89 -0
- package/src/tempo/actions/ai/embed.ts +58 -0
- package/src/tempo/actions/ai/generateText.ts +105 -0
- package/src/tempo/actions/ai/index.ts +4 -0
- package/src/tempo/actions/ai/streamText.ts +90 -0
- package/src/tempo/actions/amm/burn.ts +4 -1
- package/src/tempo/actions/amm/burnSync.ts +4 -1
- package/src/tempo/actions/amm/errors.ts +96 -0
- package/src/tempo/actions/amm/getLiquidityBalance.ts +5 -2
- package/src/tempo/actions/amm/getPool.ts +5 -2
- package/src/tempo/actions/amm/index.ts +5 -0
- package/src/tempo/actions/amm/mint.ts +4 -1
- package/src/tempo/actions/amm/mintSync.ts +4 -1
- package/src/tempo/actions/amm/rebalanceSwap.ts +4 -1
- package/src/tempo/actions/amm/rebalanceSwapSync.ts +4 -1
- package/src/tempo/actions/bucket/delete.ts +48 -0
- package/src/tempo/actions/bucket/get.ts +71 -0
- package/src/tempo/actions/bucket/head.ts +47 -0
- package/src/tempo/actions/bucket/index.ts +7 -0
- package/src/tempo/actions/bucket/list.ts +57 -0
- package/src/tempo/actions/bucket/put.ts +85 -0
- package/src/tempo/actions/bucket/types.ts +19 -0
- package/src/tempo/actions/channel/close.ts +4 -1
- package/src/tempo/actions/channel/closeSync.ts +4 -1
- package/src/tempo/actions/channel/errors.ts +216 -0
- package/src/tempo/actions/channel/getStates.ts +5 -2
- package/src/tempo/actions/channel/index.ts +11 -0
- package/src/tempo/actions/channel/open.ts +4 -1
- package/src/tempo/actions/channel/openSync.ts +4 -1
- package/src/tempo/actions/channel/requestClose.ts +4 -1
- package/src/tempo/actions/channel/requestCloseSync.ts +4 -1
- package/src/tempo/actions/channel/settle.ts +4 -1
- package/src/tempo/actions/channel/settleSync.ts +4 -1
- package/src/tempo/actions/channel/topUp.ts +4 -1
- package/src/tempo/actions/channel/topUpSync.ts +4 -1
- package/src/tempo/actions/channel/withdraw.ts +4 -1
- package/src/tempo/actions/channel/withdrawSync.ts +4 -1
- package/src/tempo/actions/compute/create.ts +165 -0
- package/src/tempo/actions/compute/exec.ts +72 -0
- package/src/tempo/actions/compute/index.ts +14 -0
- package/src/tempo/actions/compute/list.ts +53 -0
- package/src/tempo/actions/compute/logs.ts +80 -0
- package/src/tempo/actions/compute/read.ts +78 -0
- package/src/tempo/actions/compute/renew.ts +53 -0
- package/src/tempo/actions/compute/snapshot.ts +56 -0
- package/src/tempo/actions/compute/spawn.ts +63 -0
- package/src/tempo/actions/compute/status.ts +53 -0
- package/src/tempo/actions/compute/stream.ts +69 -0
- package/src/tempo/actions/compute/terminate.ts +55 -0
- package/src/tempo/actions/compute/types.ts +35 -0
- package/src/tempo/actions/compute/write.ts +78 -0
- package/src/tempo/actions/dex/buy.ts +4 -1
- package/src/tempo/actions/dex/buySync.ts +4 -1
- package/src/tempo/actions/dex/cancel.ts +4 -1
- package/src/tempo/actions/dex/cancelStale.ts +4 -1
- package/src/tempo/actions/dex/cancelStaleSync.ts +4 -1
- package/src/tempo/actions/dex/cancelSync.ts +4 -1
- package/src/tempo/actions/dex/createPair.ts +4 -1
- package/src/tempo/actions/dex/createPairSync.ts +4 -1
- package/src/tempo/actions/dex/errors.ts +538 -0
- package/src/tempo/actions/dex/getBalance.ts +5 -2
- package/src/tempo/actions/dex/getBuyQuote.ts +5 -2
- package/src/tempo/actions/dex/getOrder.ts +5 -2
- package/src/tempo/actions/dex/getOrderbook.ts +5 -2
- package/src/tempo/actions/dex/getSellQuote.ts +5 -2
- package/src/tempo/actions/dex/getTickLevel.ts +5 -2
- package/src/tempo/actions/dex/index.ts +23 -0
- package/src/tempo/actions/dex/place.ts +4 -1
- package/src/tempo/actions/dex/placeFlip.ts +4 -1
- package/src/tempo/actions/dex/placeFlipSync.ts +4 -1
- package/src/tempo/actions/dex/placeSync.ts +4 -1
- package/src/tempo/actions/dex/sell.ts +4 -1
- package/src/tempo/actions/dex/sellSync.ts +4 -1
- package/src/tempo/actions/dex/withdraw.ts +4 -1
- package/src/tempo/actions/dex/withdrawSync.ts +4 -1
- package/src/tempo/actions/earn/deployment.ts +30 -16
- package/src/tempo/actions/earn.ts +45 -15
- package/src/tempo/actions/fee/errors.ts +102 -0
- package/src/tempo/actions/fee/getUserToken.ts +5 -2
- package/src/tempo/actions/fee/getValidatorToken.ts +5 -2
- package/src/tempo/actions/fee/index.ts +5 -0
- package/src/tempo/actions/fee/setUserToken.ts +4 -1
- package/src/tempo/actions/fee/setUserTokenSync.ts +4 -1
- package/src/tempo/actions/fee/setValidatorToken.ts +4 -1
- package/src/tempo/actions/fee/setValidatorTokenSync.ts +4 -1
- package/src/tempo/actions/fee/validateToken.ts +1 -1
- package/src/tempo/actions/gateway/getCapabilities.ts +33 -0
- package/src/tempo/actions/gateway/index.ts +2 -0
- package/src/tempo/actions/index.ts +12 -3
- package/src/tempo/actions/kv/delete.ts +48 -0
- package/src/tempo/actions/kv/get.ts +47 -0
- package/src/tempo/actions/kv/index.ts +6 -0
- package/src/tempo/actions/kv/list.ts +58 -0
- package/src/tempo/actions/kv/set.ts +66 -0
- package/src/tempo/actions/kv/types.ts +15 -0
- package/src/tempo/actions/nonce/errors.ts +75 -0
- package/src/tempo/actions/nonce/get.ts +5 -2
- package/src/tempo/actions/nonce/index.ts +7 -0
- package/src/tempo/actions/policy/create.ts +4 -1
- package/src/tempo/actions/policy/createSync.ts +4 -1
- package/src/tempo/actions/policy/errors.ts +45 -0
- package/src/tempo/actions/policy/getData.ts +5 -2
- package/src/tempo/actions/policy/index.ts +5 -0
- package/src/tempo/actions/policy/isAuthorized.ts +5 -2
- package/src/tempo/actions/policy/modifyBlacklist.ts +4 -1
- package/src/tempo/actions/policy/modifyBlacklistSync.ts +4 -1
- package/src/tempo/actions/policy/modifyWhitelist.ts +4 -1
- package/src/tempo/actions/policy/modifyWhitelistSync.ts +4 -1
- package/src/tempo/actions/policy/setAdmin.ts +4 -1
- package/src/tempo/actions/policy/setAdminSync.ts +4 -1
- package/src/tempo/actions/propAmm.ts +31 -2
- package/src/tempo/actions/receivePolicy/burn.ts +4 -1
- package/src/tempo/actions/receivePolicy/burnSync.ts +4 -1
- package/src/tempo/actions/receivePolicy/claim.ts +4 -1
- package/src/tempo/actions/receivePolicy/claimSync.ts +4 -1
- package/src/tempo/actions/receivePolicy/get.ts +5 -2
- package/src/tempo/actions/receivePolicy/getBlockedBalance.ts +5 -2
- package/src/tempo/actions/receivePolicy/set.ts +6 -3
- package/src/tempo/actions/receivePolicy/setSync.ts +4 -1
- package/src/tempo/actions/receivePolicy/validate.ts +5 -2
- package/src/tempo/actions/token/approve.ts +4 -1
- package/src/tempo/actions/token/approveSync.ts +4 -1
- package/src/tempo/actions/token/burn.ts +4 -1
- package/src/tempo/actions/token/burnBlocked.ts +4 -1
- package/src/tempo/actions/token/burnBlockedSync.ts +4 -1
- package/src/tempo/actions/token/burnSync.ts +4 -1
- package/src/tempo/actions/token/changeTransferPolicy.ts +4 -1
- package/src/tempo/actions/token/changeTransferPolicySync.ts +4 -1
- package/src/tempo/actions/token/create.ts +4 -1
- package/src/tempo/actions/token/createSync.ts +4 -1
- package/src/tempo/actions/token/errors.ts +472 -0
- package/src/tempo/actions/token/getAllowance.ts +5 -2
- package/src/tempo/actions/token/getBalance.ts +5 -2
- package/src/tempo/actions/token/getMetadata.ts +5 -3
- package/src/tempo/actions/token/getRoleAdmin.ts +5 -2
- package/src/tempo/actions/token/getTotalSupply.ts +5 -2
- package/src/tempo/actions/token/grantRoles.ts +4 -1
- package/src/tempo/actions/token/grantRolesSync.ts +4 -1
- package/src/tempo/actions/token/hasRole.ts +5 -2
- package/src/tempo/actions/token/index.ts +15 -0
- package/src/tempo/actions/token/mint.ts +14 -5
- package/src/tempo/actions/token/mintSync.ts +4 -1
- package/src/tempo/actions/token/pause.ts +4 -1
- package/src/tempo/actions/token/pauseSync.ts +4 -1
- package/src/tempo/actions/token/prepareUpdateQuoteToken.ts +4 -1
- package/src/tempo/actions/token/prepareUpdateQuoteTokenSync.ts +4 -1
- package/src/tempo/actions/token/renounceRoles.ts +4 -1
- package/src/tempo/actions/token/renounceRolesSync.ts +4 -1
- package/src/tempo/actions/token/revokeRoles.ts +4 -1
- package/src/tempo/actions/token/revokeRolesSync.ts +4 -1
- package/src/tempo/actions/token/setRoleAdmin.ts +4 -1
- package/src/tempo/actions/token/setRoleAdminSync.ts +4 -1
- package/src/tempo/actions/token/setSupplyCap.ts +4 -1
- package/src/tempo/actions/token/setSupplyCapSync.ts +4 -1
- package/src/tempo/actions/token/transfer.ts +4 -1
- package/src/tempo/actions/token/transferSync.ts +4 -1
- package/src/tempo/actions/token/unpause.ts +4 -1
- package/src/tempo/actions/token/unpauseSync.ts +4 -1
- package/src/tempo/actions/token/updateQuoteToken.ts +4 -1
- package/src/tempo/actions/token/updateQuoteTokenSync.ts +4 -1
- package/src/tempo/actions/validator/add.ts +4 -1
- package/src/tempo/actions/validator/addSync.ts +4 -1
- package/src/tempo/actions/validator/changeOwner.ts +4 -1
- package/src/tempo/actions/validator/changeOwnerSync.ts +4 -1
- package/src/tempo/actions/validator/changeStatus.ts +4 -1
- package/src/tempo/actions/validator/changeStatusSync.ts +4 -1
- package/src/tempo/actions/validator/get.ts +5 -2
- package/src/tempo/actions/validator/getByIndex.ts +5 -2
- package/src/tempo/actions/validator/getCount.ts +5 -3
- package/src/tempo/actions/validator/getNextFullDkgCeremony.ts +5 -3
- package/src/tempo/actions/validator/getOwner.ts +5 -3
- package/src/tempo/actions/validator/list.ts +5 -3
- package/src/tempo/actions/validator/setNextFullDkgCeremony.ts +4 -1
- package/src/tempo/actions/validator/setNextFullDkgCeremonySync.ts +4 -1
- package/src/tempo/actions/validator/update.ts +4 -1
- package/src/tempo/actions/validator/updateSync.ts +4 -1
- package/src/tempo/actions/virtualAddress/getMasterAddress.ts +5 -3
- package/src/tempo/actions/virtualAddress/registerMaster.ts +4 -1
- package/src/tempo/actions/virtualAddress/registerMasterSync.ts +4 -1
- package/src/tempo/actions/zone/deposit.ts +4 -1
- package/src/tempo/actions/zone/depositSync.ts +4 -1
- package/src/tempo/actions/zone/encryptedDeposit.ts +7 -2
- package/src/tempo/actions/zone/encryptedDepositSync.ts +4 -1
- package/src/tempo/actions/zone/getWithdrawalFee.ts +5 -2
- package/src/tempo/actions/zone/requestVerifiableWithdrawal.ts +4 -1
- package/src/tempo/actions/zone/requestVerifiableWithdrawalSync.ts +4 -1
- package/src/tempo/actions/zone/requestWithdrawal.ts +4 -1
- package/src/tempo/actions/zone/requestWithdrawalSync.ts +4 -1
- package/src/tempo/chainConfig.ts +452 -161
- package/src/tempo/errors.ts +127 -1
- package/src/tempo/index.ts +27 -5
- package/src/tempo/internal/errors.ts +117 -0
- package/src/tempo/internal/ndjson.ts +50 -0
- package/src/tempo/internal/relay/{multisig.ts → accounts.ts} +223 -131
- package/src/tempo/internal/relay/autoSwap.ts +262 -0
- package/src/tempo/internal/relay/error.ts +7 -2
- package/src/tempo/internal/relay/feePayer.ts +465 -45
- package/src/tempo/internal/relay/feeToken.ts +24 -5
- package/src/tempo/internal/relay/keyAuthorization.ts +418 -0
- package/src/tempo/internal/relay/plugin.ts +20 -7
- package/src/tempo/internal/relay/request.ts +107 -8
- package/src/tempo/internal/relay/simulate.ts +163 -57
- package/src/tempo/internal/relay.ts +41 -2
- package/src/tempo/internal/replacement.ts +101 -0
- package/src/tempo/internal/resolveError.ts +173 -0
- package/src/tempo/internal/utils.ts +109 -5
- package/src/utils/Authorization.ts +15 -9
- package/src/utils/RpcClient.ts +107 -51
- package/src/utils/SignatureErc2098.ts +25 -7
- package/src/utils/TypedData.ts +4 -40
- package/src/version.ts +1 -1
- package/dist/tempo/actions/accessKey/isAdmin.d.ts +0 -78
- package/dist/tempo/actions/accessKey/isAdmin.d.ts.map +0 -1
- package/dist/tempo/actions/accessKey/isAdmin.js +0 -63
- package/dist/tempo/actions/accessKey/isAdmin.js.map +0 -1
- package/dist/tempo/actions/accessKey/watchAdminAuthorized.d.ts +0 -34
- package/dist/tempo/actions/accessKey/watchAdminAuthorized.d.ts.map +0 -1
- package/dist/tempo/actions/accessKey/watchAdminAuthorized.js +0 -35
- package/dist/tempo/actions/accessKey/watchAdminAuthorized.js.map +0 -1
- package/dist/tempo/actions/multisig/getConfig.d.ts.map +0 -1
- package/dist/tempo/actions/multisig/getConfig.js.map +0 -1
- package/dist/tempo/actions/multisig/getConfigCommitment.d.ts.map +0 -1
- package/dist/tempo/actions/multisig/getConfigCommitment.js.map +0 -1
- package/dist/tempo/actions/multisig/getOperation.js.map +0 -1
- package/dist/tempo/actions/multisig/index.d.ts.map +0 -1
- package/dist/tempo/actions/multisig/index.js.map +0 -1
- package/dist/tempo/actions/multisig/updateConfig.d.ts.map +0 -1
- package/dist/tempo/actions/multisig/updateConfig.js.map +0 -1
- package/dist/tempo/internal/relay/multisig.d.ts +0 -4
- package/dist/tempo/internal/relay/multisig.d.ts.map +0 -1
- package/dist/tempo/internal/relay/multisig.js.map +0 -1
- package/dist/tempo/multisig/Config.d.ts.map +0 -1
- package/dist/tempo/multisig/Config.js.map +0 -1
- package/dist/tempo/multisig/Signature.d.ts.map +0 -1
- package/dist/tempo/multisig/Signature.js +0 -9
- package/dist/tempo/multisig/Signature.js.map +0 -1
- package/src/tempo/actions/accessKey/isAdmin.ts +0 -92
- package/src/tempo/actions/accessKey/watchAdminAuthorized.ts +0 -56
package/src/tempo/Account.ts
CHANGED
|
@@ -15,17 +15,17 @@ import {
|
|
|
15
15
|
WebCryptoP256,
|
|
16
16
|
} from 'ox'
|
|
17
17
|
import {
|
|
18
|
+
AccountConfig,
|
|
18
19
|
Channel,
|
|
19
20
|
KeyAuthorization,
|
|
20
|
-
MultisigConfig,
|
|
21
21
|
SignatureEnvelope,
|
|
22
22
|
TxEnvelopeTempo,
|
|
23
23
|
} from 'ox/tempo'
|
|
24
24
|
|
|
25
|
-
import {
|
|
26
|
-
import { parseApproval } from './multisig/Signature.js'
|
|
25
|
+
import { parseApproval } from './accounts/Signature.js'
|
|
27
26
|
|
|
28
27
|
import * as viem_Account from '../core/Account.js'
|
|
28
|
+
import * as Errors from '../core/Errors.js'
|
|
29
29
|
import type { OneOf, RequiredBy } from '../core/internal/types.js'
|
|
30
30
|
import {
|
|
31
31
|
chainConfig,
|
|
@@ -70,9 +70,13 @@ export type RootAccount = Base<'root'> & {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
/** An access key Tempo account (signs on behalf of a parent account). */
|
|
73
|
-
export type AccessKeyAccount = Base<'accessKey'> & {
|
|
74
|
-
/** Access key address. */
|
|
73
|
+
export type AccessKeyAccount = Omit<Base<'accessKey'>, 'keyType'> & {
|
|
74
|
+
/** Access key address: the address of the key, or of the configurable account acting as the key. */
|
|
75
75
|
accessKeyAddress: Address.Address
|
|
76
|
+
/** Configurable account (TIP-1111) that signs as the access key, when the access key is one. */
|
|
77
|
+
delegate?: ConfigurableAccount | undefined
|
|
78
|
+
/** Key type. `configurable` for a configurable account acting as the access key. */
|
|
79
|
+
keyType: KeyAuthorization.KeyAuthorization['type']
|
|
76
80
|
/** Pending key authorization manager. */
|
|
77
81
|
keyAuthorizationManager?:
|
|
78
82
|
| KeyAuthorizationManager.KeyAuthorizationManager
|
|
@@ -80,7 +84,77 @@ export type AccessKeyAccount = Base<'accessKey'> & {
|
|
|
80
84
|
}
|
|
81
85
|
|
|
82
86
|
/** A Tempo account. */
|
|
83
|
-
export type Account = OneOf<
|
|
87
|
+
export type Account = OneOf<
|
|
88
|
+
RootAccount | AccessKeyAccount | ConfigurableAccount
|
|
89
|
+
>
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Rebuilds a configurable account (TIP-1107) from the value of {@link serialize},
|
|
93
|
+
* such as one read from storage, without a request.
|
|
94
|
+
*
|
|
95
|
+
* Passkeys among `credentials` sign as owners when their public key derives an
|
|
96
|
+
* owner's address; others are ignored. A version-zero config must derive
|
|
97
|
+
* `address`, and a later version keeps `address`.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```ts
|
|
101
|
+
* import { Account } from 'viem/tempo'
|
|
102
|
+
*
|
|
103
|
+
* const account = Account.deserialize(
|
|
104
|
+
* JSON.parse(localStorage.getItem('account')!),
|
|
105
|
+
* { credentials: [credential] },
|
|
106
|
+
* )
|
|
107
|
+
* ```
|
|
108
|
+
*
|
|
109
|
+
* @param value Serialized account.
|
|
110
|
+
* @param options Options.
|
|
111
|
+
* @returns Configurable account.
|
|
112
|
+
*/
|
|
113
|
+
export function deserialize(
|
|
114
|
+
value: Serialized,
|
|
115
|
+
options: deserialize.Options = {},
|
|
116
|
+
): ConfigurableAccount {
|
|
117
|
+
const { address, config } = value
|
|
118
|
+
const { credentials = [], getFn } = options
|
|
119
|
+
if (!config) return fromConfig(address)
|
|
120
|
+
|
|
121
|
+
const owners = config.owners.map(({ owner, weight }) => {
|
|
122
|
+
const credential = credentials.find((credential) =>
|
|
123
|
+
Address.isEqual(
|
|
124
|
+
Address.fromPublicKey(PublicKey.fromHex(credential.publicKey)),
|
|
125
|
+
owner,
|
|
126
|
+
),
|
|
127
|
+
)
|
|
128
|
+
if (!credential) return { owner, weight }
|
|
129
|
+
const { rpId } = credential
|
|
130
|
+
return { owner: fromWebAuthnP256(credential, { getFn, rpId }), weight }
|
|
131
|
+
})
|
|
132
|
+
const { salt, threshold } = config
|
|
133
|
+
const version = BigInt(config.version)
|
|
134
|
+
const account =
|
|
135
|
+
version === 0n
|
|
136
|
+
? fromConfig({ owners, salt, threshold })
|
|
137
|
+
: fromConfig({ address, owners, salt, threshold, version })
|
|
138
|
+
if (!Address.isEqual(account.address, address))
|
|
139
|
+
throw new AddressMismatchError({ address, derived: account.address })
|
|
140
|
+
return account
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export declare namespace deserialize {
|
|
144
|
+
type Credential = fromWebAuthnP256.Credential & {
|
|
145
|
+
/** Relying party ID of the passkey, such as `example.com`. */
|
|
146
|
+
rpId?: string | undefined
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
type Options = {
|
|
150
|
+
/** Passkeys that may hold owner keys of the account. */
|
|
151
|
+
credentials?: readonly Credential[] | undefined
|
|
152
|
+
/** Runs a passkey owner's ceremony in place of `navigator.credentials.get`. */
|
|
153
|
+
getFn?: fromWebAuthnP256.Options['getFn'] | undefined
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
type ErrorType = AddressMismatchError | Error
|
|
157
|
+
}
|
|
84
158
|
|
|
85
159
|
/**
|
|
86
160
|
* Instantiates an Account from a sign function and public key.
|
|
@@ -146,12 +220,13 @@ export function fromHeadlessWebAuthn<
|
|
|
146
220
|
privateKey: Hex.Hex,
|
|
147
221
|
options: options | fromHeadlessWebAuthn.Options,
|
|
148
222
|
): fromHeadlessWebAuthn.ReturnValue<options> {
|
|
149
|
-
const { access, keyAuthorizationManager, rpId, origin } =
|
|
223
|
+
const { access, keyAuthorization, keyAuthorizationManager, rpId, origin } =
|
|
224
|
+
options
|
|
150
225
|
|
|
151
226
|
const publicKey = P256.getPublicKey({ privateKey })
|
|
152
227
|
|
|
153
228
|
return from({
|
|
154
|
-
...(access ? { access, keyAuthorizationManager } : {}),
|
|
229
|
+
...(access ? { access, keyAuthorization, keyAuthorizationManager } : {}),
|
|
155
230
|
keyType: 'webAuthn',
|
|
156
231
|
publicKey,
|
|
157
232
|
async sign({ hash }) {
|
|
@@ -181,7 +256,10 @@ export declare namespace fromHeadlessWebAuthn {
|
|
|
181
256
|
WebAuthnP256.getSignPayload.Options,
|
|
182
257
|
'challenge' | 'rpId' | 'origin'
|
|
183
258
|
> &
|
|
184
|
-
Pick<
|
|
259
|
+
Pick<
|
|
260
|
+
from.Parameters,
|
|
261
|
+
'access' | 'keyAuthorization' | 'keyAuthorizationManager'
|
|
262
|
+
> & {
|
|
185
263
|
/** Relying Party ID. */
|
|
186
264
|
rpId: string
|
|
187
265
|
/** Origin. */
|
|
@@ -209,11 +287,11 @@ export function fromP256<const options extends fromP256.Options>(
|
|
|
209
287
|
privateKey: Hex.Hex,
|
|
210
288
|
options: options | fromP256.Options = {},
|
|
211
289
|
): fromP256.ReturnValue<options> {
|
|
212
|
-
const { access, keyAuthorizationManager } = options
|
|
290
|
+
const { access, keyAuthorization, keyAuthorizationManager } = options
|
|
213
291
|
const publicKey = P256.getPublicKey({ privateKey })
|
|
214
292
|
|
|
215
293
|
return from({
|
|
216
|
-
...(access ? { access, keyAuthorizationManager } : {}),
|
|
294
|
+
...(access ? { access, keyAuthorization, keyAuthorizationManager } : {}),
|
|
217
295
|
keyType: 'p256',
|
|
218
296
|
publicKey,
|
|
219
297
|
async sign({ hash }) {
|
|
@@ -228,7 +306,10 @@ export function fromP256<const options extends fromP256.Options>(
|
|
|
228
306
|
}
|
|
229
307
|
|
|
230
308
|
export declare namespace fromP256 {
|
|
231
|
-
type Options = Pick<
|
|
309
|
+
type Options = Pick<
|
|
310
|
+
from.Parameters,
|
|
311
|
+
'access' | 'keyAuthorization' | 'keyAuthorizationManager'
|
|
312
|
+
>
|
|
232
313
|
|
|
233
314
|
type ReturnValue<options extends Options = Options> =
|
|
234
315
|
from.ReturnValue<options>
|
|
@@ -251,11 +332,11 @@ export function fromSecp256k1<const options extends fromSecp256k1.Options>(
|
|
|
251
332
|
privateKey: Hex.Hex,
|
|
252
333
|
options: options | fromSecp256k1.Options = {},
|
|
253
334
|
): fromSecp256k1.ReturnValue<options> {
|
|
254
|
-
const { access, keyAuthorizationManager } = options
|
|
335
|
+
const { access, keyAuthorization, keyAuthorizationManager } = options
|
|
255
336
|
const publicKey = Secp256k1.getPublicKey({ privateKey })
|
|
256
337
|
|
|
257
338
|
return from({
|
|
258
|
-
...(access ? { access, keyAuthorizationManager } : {}),
|
|
339
|
+
...(access ? { access, keyAuthorization, keyAuthorizationManager } : {}),
|
|
259
340
|
keyType: 'secp256k1',
|
|
260
341
|
publicKey,
|
|
261
342
|
async sign(parameters) {
|
|
@@ -267,19 +348,24 @@ export function fromSecp256k1<const options extends fromSecp256k1.Options>(
|
|
|
267
348
|
}
|
|
268
349
|
|
|
269
350
|
export declare namespace fromSecp256k1 {
|
|
270
|
-
type Options = Pick<
|
|
351
|
+
type Options = Pick<
|
|
352
|
+
from.Parameters,
|
|
353
|
+
'access' | 'keyAuthorization' | 'keyAuthorizationManager'
|
|
354
|
+
>
|
|
271
355
|
|
|
272
356
|
type ReturnValue<options extends Options = Options> =
|
|
273
357
|
from.ReturnValue<options>
|
|
274
358
|
}
|
|
275
359
|
|
|
276
360
|
/**
|
|
277
|
-
* Instantiates an Account for a
|
|
361
|
+
* Instantiates an Account for a configurable account (TIP-1107) config.
|
|
278
362
|
*
|
|
279
363
|
* The returned account does not hold a key itself. Omit `address` or set it to
|
|
280
364
|
* `infer` to derive an account address from its initial config. For a current
|
|
281
|
-
* config, set `address` to the stable account address.
|
|
282
|
-
*
|
|
365
|
+
* config, set `address` to the stable account address. For an account
|
|
366
|
+
* upgraded in place with `Actions.accounts.upgrade`, set `address` to the
|
|
367
|
+
* upgraded account and pass the installed owners and threshold as `upgrade`.
|
|
368
|
+
* Pass the address directly for an address-only account.
|
|
283
369
|
*
|
|
284
370
|
* Owners can be accounts or addresses directly, or weighted `{ owner, weight }`
|
|
285
371
|
* entries. Direct owners default to weight `1`, and `threshold` defaults to `1`.
|
|
@@ -287,41 +373,97 @@ export declare namespace fromSecp256k1 {
|
|
|
287
373
|
* Configs containing only owner addresses require external approvals through
|
|
288
374
|
* `signatures`.
|
|
289
375
|
*
|
|
290
|
-
* Normalizes supplied config fields with `
|
|
376
|
+
* Normalizes supplied config fields with `AccountConfig.from`, so callers do
|
|
291
377
|
* not need to normalize owner ordering themselves.
|
|
292
378
|
*
|
|
379
|
+
* `sign`, `signMessage`, and `signTypedData` return a configurable signature
|
|
380
|
+
* envelope with local owner approvals up to the config threshold. Signatures
|
|
381
|
+
* verify against the account's current config, so a config update invalidates
|
|
382
|
+
* earlier signatures. Verify them with `verifyHash`, `verifyMessage`, or
|
|
383
|
+
* `verifyTypedData` on a Tempo client, which use the signature verifier
|
|
384
|
+
* precompile. A registered account (after its first transaction or an upgrade)
|
|
385
|
+
* carries the account code marker and answers ERC-1271 `isValidSignature` and
|
|
386
|
+
* `onERC721Received` through a shim. A counterfactual account has no code, so
|
|
387
|
+
* ERC-1271 verifiers do not accept its signatures until it is registered.
|
|
388
|
+
*
|
|
389
|
+
* A derived account's address is the last 20 bytes of a keccak256 hash of its
|
|
390
|
+
* version-zero config (TIP-1107), so it stays fixed across config updates. An
|
|
391
|
+
* upgraded account keeps its existing address.
|
|
392
|
+
*
|
|
393
|
+
* Tempo stores a commitment to the current config, not its fields. Retain the
|
|
394
|
+
* current config, or recover it from the account's
|
|
395
|
+
* `ConfigurableAccountConfigUpdated` events (registration emits version `0`),
|
|
396
|
+
* starting from `AccountUpgraded` for an upgraded account.
|
|
397
|
+
*
|
|
398
|
+
* Pass `access` to sign as an access key of another account (TIP-1111). The
|
|
399
|
+
* parent authorizes the account's address with key type `configurable`, and the
|
|
400
|
+
* returned access key account signs as the parent: a keychain envelope wraps
|
|
401
|
+
* the owner quorum over `keccak256(0x04 || hash || parent)`. Requires the T14
|
|
402
|
+
* hardfork.
|
|
403
|
+
*
|
|
293
404
|
* @example
|
|
294
405
|
* ```ts
|
|
295
406
|
* import { Account } from 'viem/tempo'
|
|
296
407
|
*
|
|
297
|
-
* const account = Account.
|
|
408
|
+
* const account = Account.fromConfig({
|
|
298
409
|
* address: 'infer',
|
|
299
410
|
* owners: [owner_1, owner_2],
|
|
300
411
|
* threshold: 2,
|
|
301
412
|
* })
|
|
302
413
|
*
|
|
303
|
-
* // The
|
|
414
|
+
* // The account config is inferred from the account.
|
|
304
415
|
* const { request } = await client.transaction.prepare({ account, ...rest })
|
|
305
416
|
*
|
|
306
417
|
* const transaction = await client.transaction.sign(request)
|
|
307
418
|
* ```
|
|
308
419
|
*
|
|
309
|
-
* @
|
|
310
|
-
*
|
|
420
|
+
* @example
|
|
421
|
+
* ### Access Key
|
|
422
|
+
*
|
|
423
|
+
* ```ts
|
|
424
|
+
* import { Account } from 'viem/tempo'
|
|
425
|
+
*
|
|
426
|
+
* const accessKey = Account.fromConfig(
|
|
427
|
+
* { owners: [owner_1, owner_2], threshold: 2 },
|
|
428
|
+
* { access: treasury },
|
|
429
|
+
* )
|
|
430
|
+
*
|
|
431
|
+
* await client.accessKey.authorizeSync({ account: treasury, accessKey })
|
|
432
|
+
*
|
|
433
|
+
* await client.transaction.sendSync({ account: accessKey, calls })
|
|
434
|
+
* ```
|
|
435
|
+
*
|
|
436
|
+
* @param value Initial config, current config, upgrade config, or account address.
|
|
437
|
+
* @param options Options.
|
|
438
|
+
* @returns Configurable account, or an access key account when `access` is set.
|
|
311
439
|
*/
|
|
312
|
-
export function
|
|
313
|
-
value:
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
440
|
+
export function fromConfig<const options extends fromConfig.Options = {}>(
|
|
441
|
+
value: fromConfig.InitialConfig,
|
|
442
|
+
options?: options | fromConfig.Options,
|
|
443
|
+
): fromConfig.ReturnValue<options, AccountConfig.Config>
|
|
444
|
+
export function fromConfig<const options extends fromConfig.Options = {}>(
|
|
445
|
+
value: fromConfig.CurrentConfig,
|
|
446
|
+
options?: options | fromConfig.Options,
|
|
447
|
+
): fromConfig.ReturnValue<options, AccountConfig.Config>
|
|
448
|
+
export function fromConfig<const options extends fromConfig.Options = {}>(
|
|
449
|
+
value: fromConfig.UpgradeConfig,
|
|
450
|
+
options?: options | fromConfig.Options,
|
|
451
|
+
): fromConfig.ReturnValue<options, AccountConfig.Config>
|
|
452
|
+
export function fromConfig<const options extends fromConfig.Options = {}>(
|
|
319
453
|
address: Address.Address,
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
export function
|
|
454
|
+
options?: options | fromConfig.Options,
|
|
455
|
+
): fromConfig.ReturnValue<options, undefined>
|
|
456
|
+
export function fromConfig<const options extends fromConfig.Options = {}>(
|
|
457
|
+
value: fromConfig.Parameters,
|
|
458
|
+
options?: options | fromConfig.Options,
|
|
459
|
+
): fromConfig.ReturnValue<options>
|
|
460
|
+
export function fromConfig(
|
|
461
|
+
value: fromConfig.Parameters,
|
|
462
|
+
options: fromConfig.Options = {},
|
|
463
|
+
): ConfigurableAccount | AccessKeyAccount {
|
|
323
464
|
const configInput = (() => {
|
|
324
465
|
if (typeof value === 'string') return undefined
|
|
466
|
+
if ('upgrade' in value) return value.upgrade
|
|
325
467
|
const { address: _, ...config } = value
|
|
326
468
|
return config
|
|
327
469
|
})()
|
|
@@ -332,35 +474,33 @@ export function fromMultisig(value: fromMultisig.Parameters): MultisigAccount {
|
|
|
332
474
|
? { owner: value, weight: 1 }
|
|
333
475
|
: value,
|
|
334
476
|
)
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
})
|
|
477
|
+
const owners = ownerEntries.map(({ owner, weight }) => ({
|
|
478
|
+
owner: typeof owner === 'string' ? owner : owner.address,
|
|
479
|
+
weight,
|
|
480
|
+
}))
|
|
481
|
+
const threshold = configInput.threshold ?? 1
|
|
482
|
+
if (typeof value !== 'string' && 'upgrade' in value)
|
|
483
|
+
return AccountConfig.fromUpgrade(value.address, { owners, threshold })
|
|
484
|
+
return AccountConfig.from({ ...configInput, owners, threshold })
|
|
343
485
|
})()
|
|
344
|
-
if (typeof value !== 'string') {
|
|
486
|
+
if (typeof value !== 'string' && !('upgrade' in value)) {
|
|
345
487
|
if (
|
|
346
488
|
(value.address === undefined || value.address === 'infer') &&
|
|
347
489
|
config!.version !== 0n
|
|
348
490
|
)
|
|
349
|
-
throw new Error('An initial
|
|
491
|
+
throw new Error('An initial account config must have version zero.')
|
|
350
492
|
if (
|
|
351
493
|
value.address !== undefined &&
|
|
352
494
|
value.address !== 'infer' &&
|
|
353
495
|
config!.version === 0n
|
|
354
496
|
)
|
|
355
|
-
throw new Error('A current
|
|
497
|
+
throw new Error('A current account config must have a version.')
|
|
356
498
|
}
|
|
357
499
|
const address = Address.checksum(
|
|
358
500
|
(() => {
|
|
359
501
|
if (typeof value === 'string') return value
|
|
360
502
|
if (value.address === undefined || value.address === 'infer')
|
|
361
|
-
return
|
|
362
|
-
factory: nativeMultisigFactory,
|
|
363
|
-
})
|
|
503
|
+
return AccountConfig.getAddress(config!)
|
|
364
504
|
return value.address
|
|
365
505
|
})(),
|
|
366
506
|
)
|
|
@@ -374,10 +514,12 @@ export function fromMultisig(value: fromMultisig.Parameters): MultisigAccount {
|
|
|
374
514
|
})()
|
|
375
515
|
if (
|
|
376
516
|
ownerAccounts.some(
|
|
377
|
-
(owner) =>
|
|
517
|
+
(owner) => isConfigurableAccount(owner) || isAccessKeyAccount(owner),
|
|
378
518
|
)
|
|
379
519
|
)
|
|
380
|
-
throw new Error(
|
|
520
|
+
throw new Error(
|
|
521
|
+
'Configurable account owners must use primitive signatures.',
|
|
522
|
+
)
|
|
381
523
|
const owners =
|
|
382
524
|
config?.owners.flatMap(({ owner }) => {
|
|
383
525
|
const account = ownerAccounts.find((account) =>
|
|
@@ -386,57 +528,44 @@ export function fromMultisig(value: fromMultisig.Parameters): MultisigAccount {
|
|
|
386
528
|
return account ? [account] : []
|
|
387
529
|
}) ?? []
|
|
388
530
|
|
|
389
|
-
const account:
|
|
531
|
+
const account: ConfigurableAccount = {
|
|
390
532
|
address,
|
|
391
533
|
config,
|
|
392
534
|
owners,
|
|
393
535
|
publicKey: '0x',
|
|
394
|
-
source: '
|
|
395
|
-
keyType: '
|
|
536
|
+
source: 'configurable',
|
|
537
|
+
keyType: 'configurable',
|
|
396
538
|
type: 'local',
|
|
397
539
|
async sign({ hash }) {
|
|
398
540
|
return SignatureEnvelope.serialize(
|
|
399
|
-
await
|
|
541
|
+
await signConfigurable(account, { payload: hash }),
|
|
400
542
|
)
|
|
401
543
|
},
|
|
402
|
-
async signMessage() {
|
|
403
|
-
|
|
544
|
+
async signMessage({ message }) {
|
|
545
|
+
return await account.sign({
|
|
546
|
+
hash: PersonalMessage.getSignPayload(toPayload(message)),
|
|
547
|
+
})
|
|
404
548
|
},
|
|
405
549
|
async signTransaction(envelope_, options) {
|
|
406
550
|
const request = envelope_ as unknown as Envelope
|
|
407
|
-
const
|
|
408
|
-
| ((
|
|
409
|
-
envelope: Envelope,
|
|
410
|
-
options?: SerializeOptions,
|
|
411
|
-
) => Hex.Hex | undefined)
|
|
412
|
-
| undefined
|
|
413
|
-
const serializeTransaction = async (
|
|
551
|
+
const serializeTransaction = (
|
|
414
552
|
envelope: Envelope,
|
|
415
|
-
|
|
416
|
-
) =>
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
serialized.startsWith(TxEnvelopeTempo.feePayerMagic)
|
|
423
|
-
)
|
|
424
|
-
return signFeePayer(
|
|
425
|
-
serialized,
|
|
426
|
-
envelope.feePayer,
|
|
427
|
-
envelope.from ?? address,
|
|
428
|
-
)
|
|
429
|
-
return serialized
|
|
430
|
-
}
|
|
553
|
+
serializeOptions?: Pick<SerializeOptions, 'signature'>,
|
|
554
|
+
) =>
|
|
555
|
+
serializeEnvelope(envelope, {
|
|
556
|
+
chain: options?.chain,
|
|
557
|
+
sender: address,
|
|
558
|
+
signature: serializeOptions?.signature,
|
|
559
|
+
})
|
|
431
560
|
if (request.owner) {
|
|
432
561
|
const owner = request.owner
|
|
433
562
|
if (owner.type !== 'local')
|
|
434
563
|
throw new Error(
|
|
435
|
-
'A local owner account is required to approve a
|
|
564
|
+
'A local owner account is required to approve a configurable account transaction.',
|
|
436
565
|
)
|
|
437
566
|
if (owner.source !== 'root')
|
|
438
567
|
throw new Error(
|
|
439
|
-
'A Tempo owner account is required to approve a
|
|
568
|
+
'A Tempo owner account is required to approve a configurable account transaction.',
|
|
440
569
|
)
|
|
441
570
|
const { owner: _, ...ownerRequest } = request
|
|
442
571
|
const approval = await owner.signTransaction(
|
|
@@ -452,14 +581,20 @@ export function fromMultisig(value: fromMultisig.Parameters): MultisigAccount {
|
|
|
452
581
|
})
|
|
453
582
|
}
|
|
454
583
|
if (owners.length === 0) return serializeTransaction(request)
|
|
455
|
-
|
|
456
|
-
|
|
584
|
+
// A sponsored request signs the sponsored payload (excluding
|
|
585
|
+
// `feeToken`), which the `feePayerSignature: null` marker selects.
|
|
586
|
+
const payload = TxEnvelopeTempo.getSignPayload(
|
|
587
|
+
request.feePayer && typeof request.feePayerSignature === 'undefined'
|
|
588
|
+
? { ...request, feePayerSignature: null }
|
|
589
|
+
: request,
|
|
590
|
+
)
|
|
591
|
+
const simulation = request.accountSimulation
|
|
457
592
|
if (request.from && !Address.isEqual(request.from, address))
|
|
458
593
|
throw new Error(
|
|
459
|
-
'
|
|
594
|
+
'Configurable account does not match the transaction sender.',
|
|
460
595
|
)
|
|
461
596
|
|
|
462
|
-
const signature = await
|
|
597
|
+
const signature = await signConfigurable(account, {
|
|
463
598
|
config: simulation?.config,
|
|
464
599
|
payload,
|
|
465
600
|
signatures: request.signatures?.map((signature) =>
|
|
@@ -468,91 +603,289 @@ export function fromMultisig(value: fromMultisig.Parameters): MultisigAccount {
|
|
|
468
603
|
})
|
|
469
604
|
return serializeTransaction(request, { signature })
|
|
470
605
|
},
|
|
471
|
-
async signTypedData() {
|
|
472
|
-
|
|
606
|
+
async signTypedData(typedData) {
|
|
607
|
+
return await account.sign({
|
|
608
|
+
hash: TypedData.getSignPayload(typedData as TypedData.encode.Value),
|
|
609
|
+
})
|
|
473
610
|
},
|
|
474
611
|
}
|
|
612
|
+
if (options.access)
|
|
613
|
+
return toAccessKey(account, { ...options, access: options.access })
|
|
475
614
|
return account
|
|
476
615
|
}
|
|
477
616
|
|
|
478
|
-
export declare namespace
|
|
479
|
-
/** Initial version-zero
|
|
617
|
+
export declare namespace fromConfig {
|
|
618
|
+
/** Initial version-zero account config. */
|
|
480
619
|
export type Config = InitialConfig
|
|
481
620
|
|
|
482
|
-
/** Stable
|
|
621
|
+
/** Stable configurable account address and its current config. */
|
|
483
622
|
export type CurrentConfig = {
|
|
484
|
-
/** Stable
|
|
623
|
+
/** Stable configurable account address. */
|
|
485
624
|
address: Address.Address
|
|
486
625
|
/** Weighted owners. */
|
|
487
626
|
owners: readonly Owner[]
|
|
488
627
|
/** Caller-chosen 32-byte salt. */
|
|
489
|
-
salt:
|
|
628
|
+
salt: AccountConfig.Config['salt']
|
|
490
629
|
/** Minimum total owner weight required for authorization. */
|
|
491
|
-
threshold:
|
|
630
|
+
threshold: AccountConfig.Config['threshold']
|
|
492
631
|
/** Current configuration version. */
|
|
493
|
-
version:
|
|
632
|
+
version: AccountConfig.Config<bigint | number>['version']
|
|
494
633
|
}
|
|
495
634
|
|
|
496
|
-
/** Initial version-zero
|
|
635
|
+
/** Initial version-zero account config. */
|
|
497
636
|
export type InitialConfig = {
|
|
498
637
|
/** Derives the stable account address from this initial config. */
|
|
499
638
|
address?: 'infer' | undefined
|
|
500
639
|
/** Weighted owners. */
|
|
501
640
|
owners: readonly Owner[]
|
|
502
641
|
/** Caller-chosen 32-byte salt. */
|
|
503
|
-
salt?:
|
|
642
|
+
salt?: AccountConfig.Input['salt'] | undefined
|
|
504
643
|
/** Minimum owner weight required for authorization. */
|
|
505
644
|
threshold?: number | undefined
|
|
506
645
|
/** Initial configuration version. */
|
|
507
646
|
version?: 0 | 0n | undefined
|
|
508
647
|
}
|
|
509
648
|
|
|
510
|
-
/**
|
|
649
|
+
/** Options for {@link fromConfig}. */
|
|
650
|
+
export type Options = {
|
|
651
|
+
/** Parent account whose access key the configurable account is (TIP-1111). */
|
|
652
|
+
access?: viem_Account.Account | Address.Address | undefined
|
|
653
|
+
/**
|
|
654
|
+
* Signed key authorization of the configurable account, which the access key
|
|
655
|
+
* attaches to its transactions until the chain registers it. Requires
|
|
656
|
+
* `access`, and is ignored when `keyAuthorizationManager` is set.
|
|
657
|
+
*/
|
|
658
|
+
keyAuthorization?: KeyAuthorization.Signed | undefined
|
|
659
|
+
/** Pending key authorization manager. Requires `access`. */
|
|
660
|
+
keyAuthorizationManager?:
|
|
661
|
+
| KeyAuthorizationManager.KeyAuthorizationManager
|
|
662
|
+
| undefined
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
/** Configurable account owner account or address, optionally with an explicit weight. */
|
|
511
666
|
export type Owner =
|
|
512
667
|
| Address.Address
|
|
513
668
|
| (viem_Account.Local & { accessKeyAddress?: never; owners?: never })
|
|
514
|
-
| (Omit<
|
|
669
|
+
| (Omit<AccountConfig.Owner, 'owner'> & {
|
|
515
670
|
owner:
|
|
516
671
|
| Address.Address
|
|
517
672
|
| (viem_Account.Local & { accessKeyAddress?: never; owners?: never })
|
|
518
673
|
})
|
|
519
674
|
|
|
520
|
-
/** Parameters for {@link
|
|
521
|
-
export type Parameters =
|
|
675
|
+
/** Parameters for {@link fromConfig}. */
|
|
676
|
+
export type Parameters =
|
|
677
|
+
| Address.Address
|
|
678
|
+
| CurrentConfig
|
|
679
|
+
| InitialConfig
|
|
680
|
+
| UpgradeConfig
|
|
681
|
+
|
|
682
|
+
/** Access key account when `access` is set, otherwise a configurable account. */
|
|
683
|
+
export type ReturnValue<
|
|
684
|
+
options extends Options = Options,
|
|
685
|
+
config extends AccountConfig.Config | undefined =
|
|
686
|
+
| AccountConfig.Config
|
|
687
|
+
| undefined,
|
|
688
|
+
> = options extends { access: viem_Account.Account | Address.Address }
|
|
689
|
+
? AccessKeyAccount
|
|
690
|
+
: ConfigurableAccount<config>
|
|
691
|
+
|
|
692
|
+
/** Account upgraded in place and the owners and threshold it installed. */
|
|
693
|
+
export type UpgradeConfig = {
|
|
694
|
+
/** Upgraded account address. */
|
|
695
|
+
address: Address.Address
|
|
696
|
+
/** Owners and threshold installed by the upgrade. */
|
|
697
|
+
upgrade: {
|
|
698
|
+
/** Weighted owners. */
|
|
699
|
+
owners: readonly Owner[]
|
|
700
|
+
/** Minimum owner weight required for authorization. */
|
|
701
|
+
threshold?: number | undefined
|
|
702
|
+
}
|
|
703
|
+
}
|
|
522
704
|
}
|
|
523
705
|
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
706
|
+
/**
|
|
707
|
+
* Configurable account (TIP-1107) returned by {@link fromConfig}.
|
|
708
|
+
*
|
|
709
|
+
* Its signatures verify against the account's current config through Tempo's
|
|
710
|
+
* `verifyHash`, and a config update invalidates earlier signatures. A registered
|
|
711
|
+
* account also answers ERC-1271 `isValidSignature`; a counterfactual account
|
|
712
|
+
* has no code, so only `verifyHash` verifies its signatures.
|
|
713
|
+
*/
|
|
714
|
+
export type ConfigurableAccount<
|
|
715
|
+
config extends AccountConfig.Config | undefined =
|
|
716
|
+
| AccountConfig.Config
|
|
527
717
|
| undefined,
|
|
528
|
-
> = viem_Account.Local<'
|
|
718
|
+
> = viem_Account.Local<'configurable'> & {
|
|
529
719
|
/** Account source. */
|
|
530
|
-
source: '
|
|
720
|
+
source: 'configurable'
|
|
531
721
|
/** Normalized config, or `undefined` for an address-only account. */
|
|
532
722
|
config: config
|
|
533
723
|
/** @internal Local owner accounts available for signing. */
|
|
534
724
|
owners: readonly (viem_Account.Local & { source?: string | undefined })[]
|
|
535
725
|
}
|
|
536
726
|
|
|
537
|
-
|
|
727
|
+
/** Wraps a configurable account as an access key of a parent account (TIP-1111). */
|
|
728
|
+
function toAccessKey(
|
|
729
|
+
account: ConfigurableAccount,
|
|
730
|
+
options: toAccessKey.Options,
|
|
731
|
+
): AccessKeyAccount {
|
|
732
|
+
const { access, keyAuthorization } = options
|
|
733
|
+
const parentAddress = Address.checksum(
|
|
734
|
+
typeof access === 'string' ? access : access.address,
|
|
735
|
+
)
|
|
736
|
+
const accessKeyAddress = account.address
|
|
737
|
+
if (Address.isEqual(parentAddress, accessKeyAddress))
|
|
738
|
+
throw new Error('A configurable account cannot be its own access key.')
|
|
739
|
+
if (
|
|
740
|
+
keyAuthorization &&
|
|
741
|
+
(keyAuthorization.type !== 'configurable' ||
|
|
742
|
+
!Address.isEqual(keyAuthorization.address, accessKeyAddress))
|
|
743
|
+
)
|
|
744
|
+
throw new Error('Key authorization does not authorize this access key.')
|
|
745
|
+
const keyAuthorizationManager =
|
|
746
|
+
options.keyAuthorizationManager ??
|
|
747
|
+
(keyAuthorization ? pending(keyAuthorization) : undefined)
|
|
748
|
+
|
|
749
|
+
async function sign(parameters: {
|
|
750
|
+
hash: Hex.Hex
|
|
751
|
+
raw?: boolean | undefined
|
|
752
|
+
}): Promise<Hex.Hex> {
|
|
753
|
+
const { hash, raw } = parameters
|
|
754
|
+
if (raw) return await account.sign({ hash })
|
|
755
|
+
const inner = await signConfigurable(account, {
|
|
756
|
+
payload: Hash.keccak256(Hex.concat('0x04', hash, parentAddress)),
|
|
757
|
+
})
|
|
758
|
+
return SignatureEnvelope.serialize(
|
|
759
|
+
SignatureEnvelope.from({
|
|
760
|
+
inner,
|
|
761
|
+
type: 'keychain',
|
|
762
|
+
userAddress: parentAddress,
|
|
763
|
+
version: 'v2',
|
|
764
|
+
}),
|
|
765
|
+
)
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
return {
|
|
769
|
+
accessKeyAddress,
|
|
770
|
+
address: parentAddress,
|
|
771
|
+
delegate: account,
|
|
772
|
+
keyAuthorizationManager,
|
|
773
|
+
keyType: 'configurable',
|
|
774
|
+
publicKey: '0x',
|
|
775
|
+
sign,
|
|
776
|
+
async signAuthorization() {
|
|
777
|
+
throw new Error('A configurable access key cannot sign authorizations.')
|
|
778
|
+
},
|
|
779
|
+
async signMessage({ message }) {
|
|
780
|
+
return await sign({
|
|
781
|
+
hash: PersonalMessage.getSignPayload(toPayload(message)),
|
|
782
|
+
})
|
|
783
|
+
},
|
|
784
|
+
async signTransaction(envelope_, options) {
|
|
785
|
+
const request = envelope_ as unknown as Envelope
|
|
786
|
+
// Owners approve with `signatures` instead (see `accountSimulation`).
|
|
787
|
+
if (request.owner)
|
|
788
|
+
throw new Error(
|
|
789
|
+
'A configurable account is required when an owner is provided.',
|
|
790
|
+
)
|
|
791
|
+
if (request.from && !Address.isEqual(request.from, parentAddress))
|
|
792
|
+
throw new Error(
|
|
793
|
+
'Access key account does not match the transaction sender.',
|
|
794
|
+
)
|
|
795
|
+
const serializeOptions = { chain: options?.chain, sender: parentAddress }
|
|
796
|
+
if (account.owners.length === 0)
|
|
797
|
+
return serializeEnvelope(request, serializeOptions)
|
|
798
|
+
// A sponsored request signs the sponsored payload (excluding
|
|
799
|
+
// `feeToken`), which the `feePayerSignature: null` marker selects.
|
|
800
|
+
const payload = TxEnvelopeTempo.getSignPayload(
|
|
801
|
+
request.feePayer && typeof request.feePayerSignature === 'undefined'
|
|
802
|
+
? { ...request, feePayerSignature: null }
|
|
803
|
+
: request,
|
|
804
|
+
{ from: parentAddress },
|
|
805
|
+
)
|
|
806
|
+
const inner = await signConfigurable(account, {
|
|
807
|
+
config: request.accountSimulation?.config,
|
|
808
|
+
payload,
|
|
809
|
+
signatures: request.signatures?.map((signature) =>
|
|
810
|
+
parseApproval(signature),
|
|
811
|
+
),
|
|
812
|
+
})
|
|
813
|
+
return serializeEnvelope(request, {
|
|
814
|
+
...serializeOptions,
|
|
815
|
+
signature: SignatureEnvelope.from({
|
|
816
|
+
inner,
|
|
817
|
+
type: 'keychain',
|
|
818
|
+
userAddress: parentAddress,
|
|
819
|
+
version: 'v2',
|
|
820
|
+
}),
|
|
821
|
+
})
|
|
822
|
+
},
|
|
823
|
+
async signTypedData(typedData) {
|
|
824
|
+
return await sign({
|
|
825
|
+
hash: TypedData.getSignPayload(typedData as TypedData.encode.Value),
|
|
826
|
+
})
|
|
827
|
+
},
|
|
828
|
+
async signVoucher(parameters) {
|
|
829
|
+
return await sign({ hash: getVoucherSignPayload(parameters), raw: true })
|
|
830
|
+
},
|
|
831
|
+
source: 'accessKey',
|
|
832
|
+
type: 'local',
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
declare namespace toAccessKey {
|
|
837
|
+
type Options = fromConfig.Options & {
|
|
838
|
+
access: viem_Account.Account | Address.Address
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* Serializes a Tempo envelope through the chain's `serialize` hook, and
|
|
844
|
+
* co-signs it with a local fee payer account.
|
|
845
|
+
*/
|
|
846
|
+
async function serializeEnvelope(
|
|
847
|
+
envelope: Envelope,
|
|
848
|
+
options: {
|
|
849
|
+
chain?: viem_Account.Local.SignTransactionOptions['chain'] | undefined
|
|
850
|
+
sender: Address.Address
|
|
851
|
+
signature?: SerializeOptions['signature'] | undefined
|
|
852
|
+
},
|
|
853
|
+
): Promise<Hex.Hex> {
|
|
854
|
+
const { chain, sender, signature } = options
|
|
855
|
+
const serialize = chain?.transaction?.serialize as
|
|
856
|
+
| ((envelope: Envelope, options?: SerializeOptions) => Hex.Hex | undefined)
|
|
857
|
+
| undefined
|
|
858
|
+
const serializeOptions = signature ? { signature } : undefined
|
|
859
|
+
const serialized =
|
|
860
|
+
serialize?.(envelope, serializeOptions) ??
|
|
861
|
+
chainConfig.transaction.serialize(envelope, serializeOptions)!
|
|
862
|
+
if (
|
|
863
|
+
typeof envelope.feePayer === 'object' &&
|
|
864
|
+
serialized.startsWith(TxEnvelopeTempo.feePayerMagic)
|
|
865
|
+
)
|
|
866
|
+
return signFeePayer(serialized, envelope.feePayer, envelope.from ?? sender)
|
|
867
|
+
return serialized
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
function isConfigurableAccount(
|
|
538
871
|
account: viem_Account.Local,
|
|
539
|
-
): account is
|
|
540
|
-
return 'source' in account && account.source === '
|
|
872
|
+
): account is ConfigurableAccount {
|
|
873
|
+
return 'source' in account && account.source === 'configurable'
|
|
541
874
|
}
|
|
542
875
|
|
|
543
|
-
async function
|
|
544
|
-
account:
|
|
876
|
+
async function signConfigurable(
|
|
877
|
+
account: ConfigurableAccount,
|
|
545
878
|
parameters: {
|
|
546
|
-
config?:
|
|
879
|
+
config?: AccountConfig.Config | undefined
|
|
547
880
|
payload: Hex.Hex
|
|
548
881
|
signatures?: readonly SignatureEnvelope.Primitive[] | undefined
|
|
549
882
|
},
|
|
550
|
-
): Promise<SignatureEnvelope.
|
|
883
|
+
): Promise<SignatureEnvelope.Configurable> {
|
|
551
884
|
const { config, payload, signatures: providedSignatures = [] } = parameters
|
|
552
885
|
const currentConfig = config ?? account.config
|
|
553
886
|
if (!currentConfig)
|
|
554
|
-
throw new Error('A current
|
|
555
|
-
const digest =
|
|
887
|
+
throw new Error('A current account config is required for local signing.')
|
|
888
|
+
const digest = AccountConfig.getSignPayload({
|
|
556
889
|
account: account.address,
|
|
557
890
|
config: currentConfig,
|
|
558
891
|
payload,
|
|
@@ -589,7 +922,7 @@ async function signMultisig(
|
|
|
589
922
|
if (!ownerAccount) continue
|
|
590
923
|
|
|
591
924
|
if (!ownerAccount.sign)
|
|
592
|
-
throw new Error('
|
|
925
|
+
throw new Error('Configurable account owner account cannot sign.')
|
|
593
926
|
signatures.push(parseApproval(await ownerAccount.sign({ hash: digest })))
|
|
594
927
|
|
|
595
928
|
signedOwners.add(address)
|
|
@@ -598,18 +931,18 @@ async function signMultisig(
|
|
|
598
931
|
}
|
|
599
932
|
|
|
600
933
|
if (weight < Number(currentConfig.threshold))
|
|
601
|
-
throw new Error('Local
|
|
934
|
+
throw new Error('Local owners do not meet the threshold.')
|
|
602
935
|
|
|
603
936
|
return SignatureEnvelope.from({
|
|
604
937
|
account: account.address,
|
|
605
938
|
config: currentConfig,
|
|
606
|
-
signatures: SignatureEnvelope.
|
|
939
|
+
signatures: SignatureEnvelope.sortApprovals({
|
|
607
940
|
account: account.address,
|
|
608
941
|
config: currentConfig,
|
|
609
942
|
payload,
|
|
610
943
|
signatures,
|
|
611
944
|
}),
|
|
612
|
-
}) as SignatureEnvelope.
|
|
945
|
+
}) as SignatureEnvelope.Configurable
|
|
613
946
|
}
|
|
614
947
|
|
|
615
948
|
/**
|
|
@@ -687,11 +1020,11 @@ export function fromWebCryptoP256<
|
|
|
687
1020
|
keyPair: Awaited<ReturnType<typeof WebCryptoP256.createKeyPair>>,
|
|
688
1021
|
options: options | fromWebCryptoP256.Options = {},
|
|
689
1022
|
): fromWebCryptoP256.ReturnValue<options> {
|
|
690
|
-
const { access, keyAuthorizationManager } = options
|
|
1023
|
+
const { access, keyAuthorization, keyAuthorizationManager } = options
|
|
691
1024
|
const { publicKey, privateKey } = keyPair
|
|
692
1025
|
|
|
693
1026
|
return from({
|
|
694
|
-
...(access ? { access, keyAuthorizationManager } : {}),
|
|
1027
|
+
...(access ? { access, keyAuthorization, keyAuthorizationManager } : {}),
|
|
695
1028
|
keyType: 'p256',
|
|
696
1029
|
publicKey,
|
|
697
1030
|
async sign({ hash }) {
|
|
@@ -707,7 +1040,10 @@ export function fromWebCryptoP256<
|
|
|
707
1040
|
}
|
|
708
1041
|
|
|
709
1042
|
export declare namespace fromWebCryptoP256 {
|
|
710
|
-
type Options = Pick<
|
|
1043
|
+
type Options = Pick<
|
|
1044
|
+
from.Parameters,
|
|
1045
|
+
'access' | 'keyAuthorization' | 'keyAuthorizationManager'
|
|
1046
|
+
>
|
|
711
1047
|
|
|
712
1048
|
type ReturnValue<options extends Options = Options> =
|
|
713
1049
|
from.ReturnValue<options>
|
|
@@ -778,8 +1114,8 @@ function isAccessKeyAccount(
|
|
|
778
1114
|
}
|
|
779
1115
|
|
|
780
1116
|
/**
|
|
781
|
-
* Key-authorization fields as built here: `account`
|
|
782
|
-
*
|
|
1117
|
+
* Key-authorization fields as built here: `account` is optional (ox's type
|
|
1118
|
+
* pairs it with deprecated admin fields) and `chainId` stays numberish.
|
|
783
1119
|
* @internal
|
|
784
1120
|
*/
|
|
785
1121
|
type KeyAuthorizationInput = {
|
|
@@ -787,26 +1123,24 @@ type KeyAuthorizationInput = {
|
|
|
787
1123
|
address: Address.Address
|
|
788
1124
|
chainId: number | bigint
|
|
789
1125
|
expiry?: number | null | undefined
|
|
790
|
-
isAdmin?: boolean | undefined
|
|
791
1126
|
limits?: readonly KeyAuthorization.TokenLimit[] | undefined
|
|
792
1127
|
scopes?: readonly KeyAuthorization.Scope[] | undefined
|
|
793
1128
|
signature?: SignatureEnvelope.SignatureEnvelope | undefined
|
|
794
|
-
type:
|
|
1129
|
+
type: KeyAuthorization.KeyAuthorization['type']
|
|
795
1130
|
witness?: Hex.Hex | undefined
|
|
796
1131
|
}
|
|
797
1132
|
|
|
798
1133
|
/**
|
|
799
|
-
*
|
|
1134
|
+
* Returns the payload an account signs to authorize an access key (TIP-1044).
|
|
800
1135
|
*
|
|
801
|
-
*
|
|
802
|
-
*
|
|
803
|
-
* so the signed payload cannot be replayed against another account (TIP-1049).
|
|
1136
|
+
* A configurable account binds the authorization to itself. Access keys cannot
|
|
1137
|
+
* sign key authorizations.
|
|
804
1138
|
*
|
|
805
1139
|
* @example
|
|
806
1140
|
* ```ts
|
|
807
1141
|
* import { Account } from 'viem/tempo'
|
|
808
1142
|
*
|
|
809
|
-
* const
|
|
1143
|
+
* const payload = Account.getKeyAuthorizationSignPayload(account, {
|
|
810
1144
|
* chainId: 1337,
|
|
811
1145
|
* key: accessKey,
|
|
812
1146
|
* })
|
|
@@ -816,65 +1150,71 @@ export function getKeyAuthorizationSignPayload(
|
|
|
816
1150
|
account: viem_Account.Local,
|
|
817
1151
|
parameters: signKeyAuthorization.Parameters,
|
|
818
1152
|
): Hex.Hex {
|
|
819
|
-
const {
|
|
1153
|
+
const { chainId, expiry, key, limits, scopes, witness } = parameters
|
|
820
1154
|
const { accessKeyAddress, keyType: type } = resolveAccessKey(key)
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
1155
|
+
if (isAccessKeyAccount(account))
|
|
1156
|
+
throw new Error('An access key cannot sign key authorizations.')
|
|
1157
|
+
// A configurable account binds its authorization to itself.
|
|
1158
|
+
const boundFields = isConfigurableAccount(account)
|
|
1159
|
+
? { account: account.address }
|
|
1160
|
+
: {}
|
|
1161
|
+
const authorization: KeyAuthorizationInput = {
|
|
827
1162
|
address: accessKeyAddress,
|
|
828
1163
|
chainId,
|
|
1164
|
+
expiry,
|
|
1165
|
+
limits,
|
|
1166
|
+
scopes,
|
|
829
1167
|
type,
|
|
830
1168
|
witness,
|
|
831
|
-
...(admin ? { isAdmin: true } : {}),
|
|
832
1169
|
...boundFields,
|
|
833
|
-
|
|
834
|
-
|
|
1170
|
+
}
|
|
1171
|
+
return KeyAuthorization.getSignPayload(
|
|
1172
|
+
authorization as KeyAuthorization.KeyAuthorization,
|
|
1173
|
+
)
|
|
835
1174
|
}
|
|
836
1175
|
|
|
1176
|
+
/**
|
|
1177
|
+
* Signs a key authorization for an access key (TIP-1044).
|
|
1178
|
+
*
|
|
1179
|
+
* @example
|
|
1180
|
+
* ```ts
|
|
1181
|
+
* import { Account } from 'viem/tempo'
|
|
1182
|
+
*
|
|
1183
|
+
* const keyAuthorization = await Account.signKeyAuthorization(account, {
|
|
1184
|
+
* chainId: 1337,
|
|
1185
|
+
* key: accessKey,
|
|
1186
|
+
* })
|
|
1187
|
+
* ```
|
|
1188
|
+
*/
|
|
837
1189
|
export async function signKeyAuthorization(
|
|
838
1190
|
account: viem_Account.Local,
|
|
839
1191
|
parameters: signKeyAuthorization.Parameters,
|
|
840
1192
|
): Promise<signKeyAuthorization.ReturnValue> {
|
|
841
1193
|
const {
|
|
842
|
-
admin,
|
|
843
1194
|
chainId,
|
|
844
1195
|
expiry,
|
|
845
1196
|
key,
|
|
846
1197
|
limits,
|
|
847
|
-
|
|
1198
|
+
configurable: configurableState,
|
|
848
1199
|
scopes,
|
|
849
1200
|
signatures,
|
|
850
1201
|
witness,
|
|
851
1202
|
} = parameters
|
|
852
1203
|
const { accessKeyAddress, keyType: type } = resolveAccessKey(key)
|
|
853
1204
|
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
// on behalf of, so the signed payload cannot be replayed against another
|
|
857
|
-
// account. [TIP-1049]
|
|
858
|
-
const isAccessKey = isAccessKeyAccount(account)
|
|
859
|
-
const isMultisig = isMultisigAccount(account)
|
|
860
|
-
const boundFields =
|
|
861
|
-
isAccessKey || isMultisig ? { account: account.address } : {}
|
|
862
|
-
|
|
863
|
-
// Admin key authorizations are unrestricted and must not carry expiry,
|
|
864
|
-
// limits, or call scopes (the protocol rejects them). [TIP-1049]
|
|
865
|
-
const restrictions = admin ? {} : { expiry, limits, scopes }
|
|
1205
|
+
const isConfigurable = isConfigurableAccount(account)
|
|
1206
|
+
const boundFields = isConfigurable ? { account: account.address } : {}
|
|
866
1207
|
|
|
867
1208
|
const hash = getKeyAuthorizationSignPayload(account, parameters)
|
|
868
1209
|
const signature = await (async () => {
|
|
869
|
-
if (
|
|
870
|
-
|
|
871
|
-
if (!multisigState)
|
|
1210
|
+
if (isConfigurable) {
|
|
1211
|
+
if (!configurableState)
|
|
872
1212
|
throw new Error(
|
|
873
|
-
'
|
|
1213
|
+
'Configurable account state is required to sign a key authorization.',
|
|
874
1214
|
)
|
|
875
1215
|
return SignatureEnvelope.serialize(
|
|
876
|
-
await
|
|
877
|
-
config:
|
|
1216
|
+
await signConfigurable(account, {
|
|
1217
|
+
config: configurableState.config,
|
|
878
1218
|
payload: hash,
|
|
879
1219
|
signatures: signatures?.map((signature) => parseApproval(signature)),
|
|
880
1220
|
}),
|
|
@@ -882,16 +1222,18 @@ export async function signKeyAuthorization(
|
|
|
882
1222
|
}
|
|
883
1223
|
return account.sign!({ hash })
|
|
884
1224
|
})()
|
|
885
|
-
|
|
1225
|
+
const signed: KeyAuthorizationInput = {
|
|
886
1226
|
address: accessKeyAddress,
|
|
887
1227
|
chainId,
|
|
1228
|
+
expiry,
|
|
1229
|
+
limits,
|
|
1230
|
+
scopes,
|
|
888
1231
|
signature: SignatureEnvelope.from(signature),
|
|
889
1232
|
type,
|
|
890
1233
|
...(witness ? { witness } : {}),
|
|
891
|
-
...(admin ? { isAdmin: true } : {}),
|
|
892
1234
|
...boundFields,
|
|
893
|
-
|
|
894
|
-
|
|
1235
|
+
}
|
|
1236
|
+
return KeyAuthorization.from(signed as KeyAuthorization.Signed)
|
|
895
1237
|
}
|
|
896
1238
|
|
|
897
1239
|
export declare namespace signKeyAuthorization {
|
|
@@ -899,23 +1241,15 @@ export declare namespace signKeyAuthorization {
|
|
|
899
1241
|
KeyAuthorization.KeyAuthorization,
|
|
900
1242
|
'expiry' | 'limits' | 'scopes' | 'witness'
|
|
901
1243
|
> & {
|
|
902
|
-
/**
|
|
903
|
-
* Whether to authorize the key as an admin key. Admin keys are
|
|
904
|
-
* unrestricted and can manage the account's other access keys; `expiry`,
|
|
905
|
-
* `limits`, and `scopes` are ignored. Requires the T6 hardfork.
|
|
906
|
-
*
|
|
907
|
-
* [TIP-1049](https://tips.sh/1049)
|
|
908
|
-
*/
|
|
909
1244
|
chainId: number | bigint
|
|
910
|
-
admin?: boolean | undefined
|
|
911
1245
|
key: resolveAccessKey.Parameters
|
|
912
|
-
/** @internal Current state used when a
|
|
913
|
-
|
|
1246
|
+
/** @internal Current state used when a configurable account signs the authorization. */
|
|
1247
|
+
configurable?:
|
|
914
1248
|
| {
|
|
915
|
-
config:
|
|
1249
|
+
config: AccountConfig.Config
|
|
916
1250
|
}
|
|
917
1251
|
| undefined
|
|
918
|
-
/** Serialized approvals from external
|
|
1252
|
+
/** Serialized approvals from external owners. */
|
|
919
1253
|
signatures?: readonly SignatureEnvelope.Serialized[] | undefined
|
|
920
1254
|
}
|
|
921
1255
|
|
|
@@ -949,10 +1283,10 @@ export declare namespace resolveAccessKey {
|
|
|
949
1283
|
| Pick<AccessKeyAccount, 'accessKeyAddress' | 'keyType'>
|
|
950
1284
|
| OneOf<
|
|
951
1285
|
| {
|
|
952
|
-
/** Access key address. */
|
|
1286
|
+
/** Access key address, or the address of a configurable account (TIP-1111). */
|
|
953
1287
|
address: Address.Address
|
|
954
|
-
/** Key type. */
|
|
955
|
-
type:
|
|
1288
|
+
/** Key type. `configurable` for a configurable account. */
|
|
1289
|
+
type: KeyAuthorization.KeyAuthorization['type']
|
|
956
1290
|
}
|
|
957
1291
|
| {
|
|
958
1292
|
/** Access key public key. */
|
|
@@ -964,10 +1298,40 @@ export declare namespace resolveAccessKey {
|
|
|
964
1298
|
|
|
965
1299
|
type ReturnType = {
|
|
966
1300
|
accessKeyAddress: Address.Address
|
|
967
|
-
keyType:
|
|
1301
|
+
keyType: KeyAuthorization.KeyAuthorization['type']
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
/**
|
|
1306
|
+
* Returns a configurable account (TIP-1107) as JSON-safe public values: its
|
|
1307
|
+
* address and, when known, its config. {@link deserialize} rebuilds it.
|
|
1308
|
+
*
|
|
1309
|
+
* @example
|
|
1310
|
+
* ```ts
|
|
1311
|
+
* import { Account } from 'viem/tempo'
|
|
1312
|
+
*
|
|
1313
|
+
* localStorage.setItem('account', JSON.stringify(Account.serialize(account)))
|
|
1314
|
+
* ```
|
|
1315
|
+
*
|
|
1316
|
+
* @param account Configurable account.
|
|
1317
|
+
* @returns Serialized account.
|
|
1318
|
+
*/
|
|
1319
|
+
export function serialize(account: ConfigurableAccount): Serialized {
|
|
1320
|
+
const { address, config } = account
|
|
1321
|
+
return {
|
|
1322
|
+
address,
|
|
1323
|
+
...(config ? { config: AccountConfig.toRpc(config) } : {}),
|
|
968
1324
|
}
|
|
969
1325
|
}
|
|
970
1326
|
|
|
1327
|
+
/** Configurable account as JSON, which {@link serialize} returns and {@link deserialize} rebuilds. */
|
|
1328
|
+
export type Serialized = {
|
|
1329
|
+
/** Account address. */
|
|
1330
|
+
address: Address.Address
|
|
1331
|
+
/** Current config, in RPC format. Absent for an address-only account. */
|
|
1332
|
+
config?: AccountConfig.Rpc | undefined
|
|
1333
|
+
}
|
|
1334
|
+
|
|
971
1335
|
function fromBase(parameters: fromBase.Parameters): Base {
|
|
972
1336
|
const { keyType = 'secp256k1', parentAddress } = parameters
|
|
973
1337
|
|
|
@@ -1025,13 +1389,23 @@ function fromBase(parameters: fromBase.Parameters): Base {
|
|
|
1025
1389
|
async signTransaction(envelope_, options) {
|
|
1026
1390
|
const chain = options?.chain
|
|
1027
1391
|
// The envelope originates from the tempo chain's `toEnvelope` (or is a
|
|
1028
|
-
// Tempo envelope directly); `feePayer` and `
|
|
1392
|
+
// Tempo envelope directly); `feePayer` and `accountSimulation` ride it as
|
|
1029
1393
|
// request metadata.
|
|
1030
|
-
const envelope =
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1394
|
+
const envelope = (() => {
|
|
1395
|
+
const envelope =
|
|
1396
|
+
envelope_ as unknown as TxEnvelopeTempo.TxEnvelopeTempo & {
|
|
1397
|
+
feePayer?: Envelope['feePayer'] | undefined
|
|
1398
|
+
accountSimulation?: Envelope['accountSimulation'] | undefined
|
|
1399
|
+
}
|
|
1400
|
+
// A sponsored request signs the sponsored payload (excluding
|
|
1401
|
+
// `feeToken`), which the `feePayerSignature: null` marker selects.
|
|
1402
|
+
if (
|
|
1403
|
+
envelope.feePayer &&
|
|
1404
|
+
typeof envelope.feePayerSignature === 'undefined'
|
|
1405
|
+
)
|
|
1406
|
+
return { ...envelope, feePayerSignature: null }
|
|
1407
|
+
return envelope
|
|
1408
|
+
})()
|
|
1035
1409
|
|
|
1036
1410
|
// Non-tempo envelopes take the generic path (secp256k1 signatures
|
|
1037
1411
|
// only; other key types cannot produce valid signatures for them).
|
|
@@ -1060,17 +1434,25 @@ function fromBase(parameters: fromBase.Parameters): Base {
|
|
|
1060
1434
|
const payload =
|
|
1061
1435
|
getSignPayload?.(envelope) ?? TxEnvelopeTempo.getSignPayload(envelope)
|
|
1062
1436
|
|
|
1063
|
-
//
|
|
1064
|
-
// primitive signature over the
|
|
1437
|
+
// Configurable account (TIP-1107): return this owner's approval — a
|
|
1438
|
+
// primitive signature over the owner approval digest — instead
|
|
1065
1439
|
// of a full serialized transaction. Approvals are combined later via
|
|
1066
1440
|
// `signatures`.
|
|
1067
|
-
if (envelope.
|
|
1441
|
+
if (envelope.accountSimulation) {
|
|
1068
1442
|
if (!envelope.from)
|
|
1069
|
-
throw new Error(
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1443
|
+
throw new Error(
|
|
1444
|
+
'A configurable account sender is required for signing.',
|
|
1445
|
+
)
|
|
1446
|
+
const { from } = envelope
|
|
1447
|
+
const { signer = from } = envelope.accountSimulation
|
|
1448
|
+
// Owners of a configurable access key (TIP-1111) approve its keychain
|
|
1449
|
+
// digest, bound to the sender.
|
|
1450
|
+
const digest = AccountConfig.getSignPayload({
|
|
1451
|
+
payload: Address.isEqual(signer, from)
|
|
1452
|
+
? payload
|
|
1453
|
+
: Hash.keccak256(Hex.concat('0x04', payload, from)),
|
|
1454
|
+
account: signer,
|
|
1455
|
+
config: AccountConfig.from(envelope.accountSimulation.config),
|
|
1074
1456
|
})
|
|
1075
1457
|
return await sign({ hash: digest, raw: true })
|
|
1076
1458
|
}
|
|
@@ -1082,7 +1464,9 @@ function fromBase(parameters: fromBase.Parameters): Base {
|
|
|
1082
1464
|
const signatureEnvelope = SignatureEnvelope.from(signature)
|
|
1083
1465
|
const serialized =
|
|
1084
1466
|
serialize?.(envelope, { signature: signatureEnvelope }) ??
|
|
1085
|
-
(
|
|
1467
|
+
// A prefilled fee-payer signature (e.g. from `eth_fillTransaction`)
|
|
1468
|
+
// completes the envelope; otherwise hand off in the fee payer format.
|
|
1469
|
+
(envelope.feePayer && !envelope.feePayerSignature
|
|
1086
1470
|
? TxEnvelopeTempo.serialize(envelope, {
|
|
1087
1471
|
format: 'feePayer',
|
|
1088
1472
|
sender: envelope.from ?? address,
|
|
@@ -1166,23 +1550,18 @@ function fromRoot(parameters: fromRoot.Parameters): RootAccount {
|
|
|
1166
1550
|
...account,
|
|
1167
1551
|
source: 'root',
|
|
1168
1552
|
async signKeyAuthorization(key, parameters) {
|
|
1169
|
-
const { chainId, expiry, limits, scopes, witness
|
|
1553
|
+
const { chainId, expiry, limits, scopes, witness } = parameters
|
|
1170
1554
|
const { accessKeyAddress, keyType: type } = resolveAccessKey(key)
|
|
1171
|
-
|
|
1172
|
-
// Admin key authorizations are unrestricted and must not carry expiry,
|
|
1173
|
-
// limits, or call scopes (the protocol rejects them). [TIP-1049]
|
|
1174
|
-
const restrictions = admin ? {} : { expiry, limits, scopes }
|
|
1175
|
-
|
|
1176
1555
|
const authorization: KeyAuthorizationInput = {
|
|
1177
1556
|
address: accessKeyAddress,
|
|
1178
1557
|
chainId,
|
|
1558
|
+
expiry,
|
|
1559
|
+
limits,
|
|
1560
|
+
scopes,
|
|
1179
1561
|
type,
|
|
1180
1562
|
witness,
|
|
1181
|
-
...(admin ? { isAdmin: true } : {}),
|
|
1182
|
-
...restrictions,
|
|
1183
1563
|
}
|
|
1184
1564
|
const signature = await account.sign({
|
|
1185
|
-
// The wire accepts `account`/`isAdmin` alone (see KeyAuthorizationInput).
|
|
1186
1565
|
hash: KeyAuthorization.getSignPayload(
|
|
1187
1566
|
authorization as KeyAuthorization.KeyAuthorization,
|
|
1188
1567
|
),
|
|
@@ -1190,11 +1569,12 @@ function fromRoot(parameters: fromRoot.Parameters): RootAccount {
|
|
|
1190
1569
|
const signed: KeyAuthorizationInput = {
|
|
1191
1570
|
address: accessKeyAddress,
|
|
1192
1571
|
chainId,
|
|
1572
|
+
expiry,
|
|
1573
|
+
limits,
|
|
1574
|
+
scopes,
|
|
1193
1575
|
signature: SignatureEnvelope.from(signature),
|
|
1194
1576
|
type,
|
|
1195
1577
|
...(witness ? { witness } : {}),
|
|
1196
|
-
...(admin ? { isAdmin: true } : {}),
|
|
1197
|
-
...restrictions,
|
|
1198
1578
|
}
|
|
1199
1579
|
return KeyAuthorization.from(signed as KeyAuthorization.Signed)
|
|
1200
1580
|
},
|
|
@@ -1208,14 +1588,27 @@ declare namespace fromRoot {
|
|
|
1208
1588
|
}
|
|
1209
1589
|
|
|
1210
1590
|
function fromAccessKey(parameters: fromAccessKey.Parameters): AccessKeyAccount {
|
|
1211
|
-
const { access,
|
|
1591
|
+
const { access, keyAuthorization } = parameters
|
|
1212
1592
|
const parentAddress = typeof access === 'string' ? access : access.address
|
|
1213
|
-
const
|
|
1593
|
+
const accessKeyAddress = Address.checksum(
|
|
1594
|
+
Address.fromPublicKey(parameters.publicKey),
|
|
1595
|
+
)
|
|
1596
|
+
if (
|
|
1597
|
+
keyAuthorization &&
|
|
1598
|
+
!Address.isEqual(keyAuthorization.address, accessKeyAddress)
|
|
1599
|
+
)
|
|
1600
|
+
throw new Error('Key authorization does not authorize this access key.')
|
|
1601
|
+
const keyAuthorizationManager =
|
|
1602
|
+
parameters.keyAuthorizationManager ??
|
|
1603
|
+
(keyAuthorization ? pending(keyAuthorization) : undefined)
|
|
1604
|
+
const account = fromBase({
|
|
1605
|
+
...parameters,
|
|
1606
|
+
keyAuthorizationManager,
|
|
1607
|
+
parentAddress,
|
|
1608
|
+
})
|
|
1214
1609
|
return {
|
|
1215
1610
|
...account,
|
|
1216
|
-
accessKeyAddress
|
|
1217
|
-
Address.fromPublicKey(parameters.publicKey),
|
|
1218
|
-
),
|
|
1611
|
+
accessKeyAddress,
|
|
1219
1612
|
keyAuthorizationManager,
|
|
1220
1613
|
source: 'accessKey',
|
|
1221
1614
|
}
|
|
@@ -1229,6 +1622,12 @@ declare namespace fromAccessKey {
|
|
|
1229
1622
|
* the parent account's address as the keychain address.
|
|
1230
1623
|
*/
|
|
1231
1624
|
access: viem_Account.Account | Address.Address
|
|
1625
|
+
/**
|
|
1626
|
+
* Signed key authorization of the access key, which the account attaches
|
|
1627
|
+
* to its transactions until the chain registers the access key. Ignored
|
|
1628
|
+
* when `keyAuthorizationManager` is set.
|
|
1629
|
+
*/
|
|
1630
|
+
keyAuthorization?: KeyAuthorization.Signed | undefined
|
|
1232
1631
|
/** Pending key authorization manager. */
|
|
1233
1632
|
keyAuthorizationManager?:
|
|
1234
1633
|
| KeyAuthorizationManager.KeyAuthorizationManager
|
|
@@ -1238,6 +1637,41 @@ declare namespace fromAccessKey {
|
|
|
1238
1637
|
type ReturnValue = AccessKeyAccount
|
|
1239
1638
|
}
|
|
1240
1639
|
|
|
1640
|
+
/**
|
|
1641
|
+
* Returns a key authorization manager that holds `keyAuthorization` until the
|
|
1642
|
+
* chain registers its access key.
|
|
1643
|
+
*/
|
|
1644
|
+
function pending(
|
|
1645
|
+
keyAuthorization: KeyAuthorization.Signed,
|
|
1646
|
+
): KeyAuthorizationManager.KeyAuthorizationManager {
|
|
1647
|
+
let value: KeyAuthorization.Signed | undefined = keyAuthorization
|
|
1648
|
+
const matches = (key: KeyAuthorizationManager.Key) =>
|
|
1649
|
+
Address.isEqual(key.accessKey, keyAuthorization.address) &&
|
|
1650
|
+
BigInt(key.chainId) === BigInt(keyAuthorization.chainId)
|
|
1651
|
+
return {
|
|
1652
|
+
get: (key) => (matches(key) ? value : undefined),
|
|
1653
|
+
remove(key) {
|
|
1654
|
+
if (matches(key)) value = undefined
|
|
1655
|
+
},
|
|
1656
|
+
set(key, next) {
|
|
1657
|
+
if (matches(key)) value = next
|
|
1658
|
+
},
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
/** Thrown when a version-zero config does not derive the account's address. */
|
|
1663
|
+
export class AddressMismatchError extends Errors.BaseError {
|
|
1664
|
+
override readonly name = 'Account.AddressMismatchError'
|
|
1665
|
+
/** Address the config derives. */
|
|
1666
|
+
readonly derived: Address.Address
|
|
1667
|
+
|
|
1668
|
+
constructor(options: { address: Address.Address; derived: Address.Address }) {
|
|
1669
|
+
const { address, derived } = options
|
|
1670
|
+
super(`Account config derives ${derived}, not ${address}.`)
|
|
1671
|
+
this.derived = derived
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1241
1675
|
function toPayload(
|
|
1242
1676
|
message: viem_Account.SignableMessage,
|
|
1243
1677
|
): Hex.Hex | Bytes.Bytes {
|