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
|
@@ -0,0 +1,890 @@
|
|
|
1
|
+
import type { Address } from 'ox'
|
|
2
|
+
|
|
3
|
+
import type * as Account from '../core/Account.js'
|
|
4
|
+
import type * as Chain from '../core/Chain.js'
|
|
5
|
+
import type * as Client from '../core/Client.js'
|
|
6
|
+
import type * as Transport from '../core/Transport.js'
|
|
7
|
+
import { read } from '../core/actions/contract/read.js'
|
|
8
|
+
import * as Abis from './Abis.js'
|
|
9
|
+
import * as ai from './actions/ai/index.js'
|
|
10
|
+
import * as bucket from './actions/bucket/index.js'
|
|
11
|
+
import * as compute from './actions/compute/index.js'
|
|
12
|
+
import * as gateway from './actions/gateway/index.js'
|
|
13
|
+
import * as kv from './actions/kv/index.js'
|
|
14
|
+
import * as Gateway from './Gateway.js'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Adds Gateway inference (`client.ai`), object storage (`client.bucket`),
|
|
18
|
+
* sandboxed compute (`client.compute`), and key-value state (`client.kv`) to a
|
|
19
|
+
* Client.
|
|
20
|
+
*
|
|
21
|
+
* When the Client has a local account, requests are paid with it through
|
|
22
|
+
* `mppx` (an optional peer dependency, loaded on the first paid request).
|
|
23
|
+
* Other Clients use `globalThis.fetch`, which the Accounts SDK makes
|
|
24
|
+
* payment-aware for Tempo Wallet. Pass `fetch` to pay another way. Data is
|
|
25
|
+
* scoped by chain, the paying wallet, and `app`.
|
|
26
|
+
*
|
|
27
|
+
* @experimental
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
32
|
+
*
|
|
33
|
+
* const client = Client.create({
|
|
34
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
35
|
+
* }).extend(gatewayActions())
|
|
36
|
+
*
|
|
37
|
+
* const { text } = await client.ai.generateText({
|
|
38
|
+
* model: '@cf/meta/llama-3.3-70b-instruct-fp8-fast',
|
|
39
|
+
* prompt: 'Describe this app in one sentence.',
|
|
40
|
+
* })
|
|
41
|
+
* await client.kv.set({ key: 'description', value: text })
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @param options - Gateway connection options.
|
|
45
|
+
* @returns A Client decorator.
|
|
46
|
+
*/
|
|
47
|
+
export function gatewayActions(options: gatewayActions.Options = {}) {
|
|
48
|
+
return <
|
|
49
|
+
chain extends Chain.Chain | undefined,
|
|
50
|
+
account extends Account.Account | undefined,
|
|
51
|
+
>(
|
|
52
|
+
client: Client.Client<chain, account, Transport.Transport>,
|
|
53
|
+
): Decorator => {
|
|
54
|
+
const connection = Gateway.from({
|
|
55
|
+
...options,
|
|
56
|
+
fetch:
|
|
57
|
+
options.fetch ??
|
|
58
|
+
(client.account?.type === 'local'
|
|
59
|
+
? pay(client as Client.Client)
|
|
60
|
+
: undefined),
|
|
61
|
+
})
|
|
62
|
+
return {
|
|
63
|
+
ai: {
|
|
64
|
+
embed: (options) => ai.embed(connection, options),
|
|
65
|
+
generateText: (options) => ai.generateText(connection, options),
|
|
66
|
+
streamText: (options) => ai.streamText(connection, options),
|
|
67
|
+
},
|
|
68
|
+
bucket: {
|
|
69
|
+
delete: (options) => bucket.delete(connection, options),
|
|
70
|
+
get: (options) => bucket.get(connection, options),
|
|
71
|
+
head: (options) => bucket.head(connection, options),
|
|
72
|
+
list: (options) => bucket.list(connection, options),
|
|
73
|
+
put: (options) => bucket.put(connection, options),
|
|
74
|
+
},
|
|
75
|
+
compute: {
|
|
76
|
+
create: (options) => compute.create(connection, options),
|
|
77
|
+
exec: (options) => compute.exec(connection, options),
|
|
78
|
+
list: (options) => compute.list(connection, options),
|
|
79
|
+
logs: (options) => compute.logs(connection, options),
|
|
80
|
+
read: (options) => compute.read(connection, options),
|
|
81
|
+
renew: (options) => compute.renew(connection, options),
|
|
82
|
+
snapshot: (options) => compute.snapshot(connection, options),
|
|
83
|
+
spawn: (options) => compute.spawn(connection, options),
|
|
84
|
+
status: (options) => compute.status(connection, options),
|
|
85
|
+
stream: (options) => compute.stream(connection, options),
|
|
86
|
+
terminate: (options) => compute.terminate(connection, options),
|
|
87
|
+
write: (options) => compute.write(connection, options),
|
|
88
|
+
},
|
|
89
|
+
gateway: {
|
|
90
|
+
getCapabilities: (options) =>
|
|
91
|
+
gateway.getCapabilities(connection, options),
|
|
92
|
+
},
|
|
93
|
+
kv: {
|
|
94
|
+
delete: (options) => kv.delete(connection, options),
|
|
95
|
+
get: (options) => kv.get(connection, options),
|
|
96
|
+
list: (options) => kv.list(connection, options),
|
|
97
|
+
set: (options) => kv.set(connection, options),
|
|
98
|
+
},
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export declare namespace gatewayActions {
|
|
104
|
+
type Options = Gateway.from.Options
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Gateway actions added to a Client by {@link gatewayActions}.
|
|
109
|
+
*
|
|
110
|
+
* @experimental
|
|
111
|
+
*/
|
|
112
|
+
export type Decorator = {
|
|
113
|
+
/** Inference. */
|
|
114
|
+
ai: {
|
|
115
|
+
/**
|
|
116
|
+
* Embeds text with a Gateway model. Paid per request.
|
|
117
|
+
*
|
|
118
|
+
* @experimental
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```ts
|
|
122
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
123
|
+
*
|
|
124
|
+
* const client = Client.create({
|
|
125
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
126
|
+
* }).extend(gatewayActions())
|
|
127
|
+
*
|
|
128
|
+
* const { embeddings } = await client.ai.embed({
|
|
129
|
+
* input: ['hello world'],
|
|
130
|
+
* model: '@cf/baai/bge-m3',
|
|
131
|
+
* })
|
|
132
|
+
* ```
|
|
133
|
+
*
|
|
134
|
+
* @param options - Options.
|
|
135
|
+
* @returns The embeddings and their shape.
|
|
136
|
+
*/
|
|
137
|
+
embed: (options: ai.embed.Options) => Promise<ai.embed.ReturnType>
|
|
138
|
+
/**
|
|
139
|
+
* Generates text with a Gateway model. Paid per request.
|
|
140
|
+
*
|
|
141
|
+
* Pass either `prompt` or `messages`.
|
|
142
|
+
*
|
|
143
|
+
* @experimental
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```ts
|
|
147
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
148
|
+
*
|
|
149
|
+
* const client = Client.create({
|
|
150
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
151
|
+
* }).extend(gatewayActions())
|
|
152
|
+
*
|
|
153
|
+
* const { text } = await client.ai.generateText({
|
|
154
|
+
* model: '@cf/meta/llama-3.3-70b-instruct-fp8-fast',
|
|
155
|
+
* prompt: 'Describe this app in one sentence.',
|
|
156
|
+
* })
|
|
157
|
+
* ```
|
|
158
|
+
*
|
|
159
|
+
* @param options - Options.
|
|
160
|
+
* @returns The generated text and token usage.
|
|
161
|
+
*/
|
|
162
|
+
generateText: (
|
|
163
|
+
options: ai.generateText.Options,
|
|
164
|
+
) => Promise<ai.generateText.ReturnType>
|
|
165
|
+
/**
|
|
166
|
+
* Generates text with a Gateway model and yields it as it is produced.
|
|
167
|
+
* Paid per request.
|
|
168
|
+
*
|
|
169
|
+
* @experimental
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* ```ts
|
|
173
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
174
|
+
*
|
|
175
|
+
* const client = Client.create({
|
|
176
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
177
|
+
* }).extend(gatewayActions())
|
|
178
|
+
*
|
|
179
|
+
* for await (const event of client.ai.streamText({
|
|
180
|
+
* model: '@cf/zai-org/glm-5.3',
|
|
181
|
+
* prompt: 'Write a haiku about Tempo.',
|
|
182
|
+
* })) {
|
|
183
|
+
* if (event.type === 'text') process.stdout.write(event.delta)
|
|
184
|
+
* }
|
|
185
|
+
* ```
|
|
186
|
+
*
|
|
187
|
+
* @param options - Options.
|
|
188
|
+
* @returns Text and reasoning deltas, then usage.
|
|
189
|
+
*/
|
|
190
|
+
streamText: (
|
|
191
|
+
options: ai.streamText.Options,
|
|
192
|
+
) => AsyncGenerator<ai.streamText.Event>
|
|
193
|
+
}
|
|
194
|
+
/** Object storage, private to the payer and app. */
|
|
195
|
+
bucket: {
|
|
196
|
+
/**
|
|
197
|
+
* Deletes an object from the app's bucket. Paid per request.
|
|
198
|
+
*
|
|
199
|
+
* @experimental
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* ```ts
|
|
203
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
204
|
+
*
|
|
205
|
+
* const client = Client.create({
|
|
206
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
207
|
+
* }).extend(gatewayActions())
|
|
208
|
+
*
|
|
209
|
+
* await client.bucket.delete({ key: 'notes/today.txt' })
|
|
210
|
+
* ```
|
|
211
|
+
*
|
|
212
|
+
* @param options - Options.
|
|
213
|
+
* @returns Whether the request succeeded.
|
|
214
|
+
*/
|
|
215
|
+
delete: (
|
|
216
|
+
options: bucket.delete.Options,
|
|
217
|
+
) => Promise<bucket.delete.ReturnType>
|
|
218
|
+
/**
|
|
219
|
+
* Reads an object from the app's bucket as a stream. Returns `null` when
|
|
220
|
+
* the object does not exist or expired. Paid per request.
|
|
221
|
+
*
|
|
222
|
+
* @experimental
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* ```ts
|
|
226
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
227
|
+
*
|
|
228
|
+
* const client = Client.create({
|
|
229
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
230
|
+
* }).extend(gatewayActions())
|
|
231
|
+
*
|
|
232
|
+
* const object = await client.bucket.get({ key: 'notes/today.txt' })
|
|
233
|
+
* const text = object ? await new Response(object.body).text() : null
|
|
234
|
+
* ```
|
|
235
|
+
*
|
|
236
|
+
* @param options - Options.
|
|
237
|
+
* @returns The object body and metadata, or `null`.
|
|
238
|
+
*/
|
|
239
|
+
get: (options: bucket.get.Options) => Promise<bucket.get.ReturnType>
|
|
240
|
+
/**
|
|
241
|
+
* Reads the metadata of an object in the app's bucket. Returns `null` when
|
|
242
|
+
* the object does not exist or expired. Paid per request.
|
|
243
|
+
*
|
|
244
|
+
* @experimental
|
|
245
|
+
*
|
|
246
|
+
* @example
|
|
247
|
+
* ```ts
|
|
248
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
249
|
+
*
|
|
250
|
+
* const client = Client.create({
|
|
251
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
252
|
+
* }).extend(gatewayActions())
|
|
253
|
+
*
|
|
254
|
+
* const metadata = await client.bucket.head({ key: 'notes/today.txt' })
|
|
255
|
+
* ```
|
|
256
|
+
*
|
|
257
|
+
* @param options - Options.
|
|
258
|
+
* @returns The object metadata, or `null`.
|
|
259
|
+
*/
|
|
260
|
+
head: (options: bucket.head.Options) => Promise<bucket.head.ReturnType>
|
|
261
|
+
/**
|
|
262
|
+
* Lists objects in the app's bucket by key prefix. Paid per request.
|
|
263
|
+
*
|
|
264
|
+
* @experimental
|
|
265
|
+
*
|
|
266
|
+
* @example
|
|
267
|
+
* ```ts
|
|
268
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
269
|
+
*
|
|
270
|
+
* const client = Client.create({
|
|
271
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
272
|
+
* }).extend(gatewayActions())
|
|
273
|
+
*
|
|
274
|
+
* const { objects } = await client.bucket.list({ prefix: 'notes/' })
|
|
275
|
+
* ```
|
|
276
|
+
*
|
|
277
|
+
* @param options - Options.
|
|
278
|
+
* @returns A page of object metadata and the next cursor.
|
|
279
|
+
*/
|
|
280
|
+
list: (
|
|
281
|
+
options?: bucket.list.Options | undefined,
|
|
282
|
+
) => Promise<bucket.list.ReturnType>
|
|
283
|
+
/**
|
|
284
|
+
* Writes an object to the app's bucket for a retention period. Paid per
|
|
285
|
+
* request.
|
|
286
|
+
*
|
|
287
|
+
* @experimental
|
|
288
|
+
*
|
|
289
|
+
* @example
|
|
290
|
+
* ```ts
|
|
291
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
292
|
+
*
|
|
293
|
+
* const client = Client.create({
|
|
294
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
295
|
+
* }).extend(gatewayActions())
|
|
296
|
+
*
|
|
297
|
+
* const metadata = await client.bucket.put({
|
|
298
|
+
* key: 'notes/today.txt',
|
|
299
|
+
* retention: 86_400,
|
|
300
|
+
* value: new Blob(['hello'], { type: 'text/plain' }),
|
|
301
|
+
* })
|
|
302
|
+
* ```
|
|
303
|
+
*
|
|
304
|
+
* @param options - Options.
|
|
305
|
+
* @returns The object metadata.
|
|
306
|
+
*/
|
|
307
|
+
put: (options: bucket.put.Options) => Promise<bucket.put.ReturnType>
|
|
308
|
+
}
|
|
309
|
+
/** Sandboxed CPU and GPU compute, private to the payer and app. */
|
|
310
|
+
compute: {
|
|
311
|
+
/**
|
|
312
|
+
* Starts a sandbox that can live up to `timeout` seconds, from a container
|
|
313
|
+
* image with optional `apt/pip` layers or from a snapshot. Compute is
|
|
314
|
+
* metered: creation pays for `lease` seconds at the sandbox's GPU, CPU,
|
|
315
|
+
* and memory rate, and `renew` pays for more. `ports` are served over
|
|
316
|
+
* public HTTPS tunnels.
|
|
317
|
+
*
|
|
318
|
+
* @experimental
|
|
319
|
+
*
|
|
320
|
+
* @example
|
|
321
|
+
* ```ts
|
|
322
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
323
|
+
*
|
|
324
|
+
* const client = Client.create({
|
|
325
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
326
|
+
* }).extend(gatewayActions())
|
|
327
|
+
*
|
|
328
|
+
* const sandbox = await client.compute.create({
|
|
329
|
+
* gpu: 'T4',
|
|
330
|
+
* image: 'pytorch/pytorch:2.5.1-cuda12.4-cudnn9-runtime',
|
|
331
|
+
* timeout: 1200,
|
|
332
|
+
* })
|
|
333
|
+
* ```
|
|
334
|
+
*
|
|
335
|
+
* @param options - Options.
|
|
336
|
+
* @returns The sandbox and its tunnels.
|
|
337
|
+
*/
|
|
338
|
+
create: <const ports extends readonly number[] = readonly []>(
|
|
339
|
+
options?: compute.create.Options<ports> | undefined,
|
|
340
|
+
) => Promise<compute.create.ReturnType<ports>>
|
|
341
|
+
/**
|
|
342
|
+
* Runs a command in a sandbox and waits up to `timeout` seconds (at most
|
|
343
|
+
* 120). Use `spawn` for longer jobs. Paid per request.
|
|
344
|
+
*
|
|
345
|
+
* @experimental
|
|
346
|
+
*
|
|
347
|
+
* @example
|
|
348
|
+
* ```ts
|
|
349
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
350
|
+
*
|
|
351
|
+
* const client = Client.create({
|
|
352
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
353
|
+
* }).extend(gatewayActions())
|
|
354
|
+
*
|
|
355
|
+
* const { stdout } = await client.compute.exec({
|
|
356
|
+
* command: ['nvidia-smi'],
|
|
357
|
+
* sandboxId: sandbox.sandboxId,
|
|
358
|
+
* })
|
|
359
|
+
* ```
|
|
360
|
+
*
|
|
361
|
+
* @param options - Options.
|
|
362
|
+
* @returns The command's output and exit code.
|
|
363
|
+
*/
|
|
364
|
+
exec: (options: compute.exec.Options) => Promise<compute.exec.ReturnType>
|
|
365
|
+
/**
|
|
366
|
+
* Lists the app's sandboxes that have not ended. Paid per request.
|
|
367
|
+
*
|
|
368
|
+
* @experimental
|
|
369
|
+
*
|
|
370
|
+
* @example
|
|
371
|
+
* ```ts
|
|
372
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
373
|
+
*
|
|
374
|
+
* const client = Client.create({
|
|
375
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
376
|
+
* }).extend(gatewayActions())
|
|
377
|
+
*
|
|
378
|
+
* const { sandboxes } = await client.compute.list()
|
|
379
|
+
* ```
|
|
380
|
+
*
|
|
381
|
+
* @param options - Options.
|
|
382
|
+
* @returns A page of sandboxes and the next cursor.
|
|
383
|
+
*/
|
|
384
|
+
list: (
|
|
385
|
+
options?: compute.list.Options | undefined,
|
|
386
|
+
) => Promise<compute.list.ReturnType>
|
|
387
|
+
/**
|
|
388
|
+
* Follows the log of a command started with `spawn` and yields it as it
|
|
389
|
+
* grows, then the exit code. Paid per request.
|
|
390
|
+
*
|
|
391
|
+
* @experimental
|
|
392
|
+
*
|
|
393
|
+
* @example
|
|
394
|
+
* ```ts
|
|
395
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
396
|
+
*
|
|
397
|
+
* const client = Client.create({
|
|
398
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
399
|
+
* }).extend(gatewayActions())
|
|
400
|
+
*
|
|
401
|
+
* for await (const event of client.compute.logs({
|
|
402
|
+
* logPath: job.logPath,
|
|
403
|
+
* sandboxId: sandbox.sandboxId,
|
|
404
|
+
* })) {
|
|
405
|
+
* if (event.type === 'log') process.stdout.write(event.data)
|
|
406
|
+
* }
|
|
407
|
+
* ```
|
|
408
|
+
*
|
|
409
|
+
* @param options - Options.
|
|
410
|
+
* @returns Log, exit, and end events.
|
|
411
|
+
*/
|
|
412
|
+
logs: (options: compute.logs.Options) => AsyncGenerator<compute.logs.Event>
|
|
413
|
+
/**
|
|
414
|
+
* Reads a file from a sandbox from `offset`, up to 8 MiB per request.
|
|
415
|
+
* Returns `null` when the file does not exist. Paid per request.
|
|
416
|
+
*
|
|
417
|
+
* @experimental
|
|
418
|
+
*
|
|
419
|
+
* @example
|
|
420
|
+
* ```ts
|
|
421
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
422
|
+
*
|
|
423
|
+
* const client = Client.create({
|
|
424
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
425
|
+
* }).extend(gatewayActions())
|
|
426
|
+
*
|
|
427
|
+
* const log = await client.compute.read({
|
|
428
|
+
* path: job.logPath,
|
|
429
|
+
* sandboxId: sandbox.sandboxId,
|
|
430
|
+
* })
|
|
431
|
+
* ```
|
|
432
|
+
*
|
|
433
|
+
* @param options - Options.
|
|
434
|
+
* @returns The bytes read and the whole file size, or `null`.
|
|
435
|
+
*/
|
|
436
|
+
read: (options: compute.read.Options) => Promise<compute.read.ReturnType>
|
|
437
|
+
/**
|
|
438
|
+
* Pays for more seconds of a sandbox at its per-second rate, up to its
|
|
439
|
+
* `timeout`. Paid per request.
|
|
440
|
+
*
|
|
441
|
+
* @experimental
|
|
442
|
+
*
|
|
443
|
+
* @example
|
|
444
|
+
* ```ts
|
|
445
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
446
|
+
*
|
|
447
|
+
* const client = Client.create({
|
|
448
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
449
|
+
* }).extend(gatewayActions())
|
|
450
|
+
*
|
|
451
|
+
* await client.compute.renew({ sandboxId: sandbox.sandboxId, seconds: 300 })
|
|
452
|
+
* ```
|
|
453
|
+
*
|
|
454
|
+
* @param options - Options.
|
|
455
|
+
* @returns The sandbox with its new `paidUntil`.
|
|
456
|
+
*/
|
|
457
|
+
renew: (options: compute.renew.Options) => Promise<compute.renew.ReturnType>
|
|
458
|
+
/**
|
|
459
|
+
* Saves a sandbox's filesystem as a snapshot kept for 30 days. Paid per
|
|
460
|
+
* request.
|
|
461
|
+
*
|
|
462
|
+
* @experimental
|
|
463
|
+
*
|
|
464
|
+
* @example
|
|
465
|
+
* ```ts
|
|
466
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
467
|
+
*
|
|
468
|
+
* const client = Client.create({
|
|
469
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
470
|
+
* }).extend(gatewayActions())
|
|
471
|
+
*
|
|
472
|
+
* const { snapshot } = await client.compute.snapshot({
|
|
473
|
+
* sandboxId: sandbox.sandboxId,
|
|
474
|
+
* })
|
|
475
|
+
* ```
|
|
476
|
+
*
|
|
477
|
+
* @param options - Options.
|
|
478
|
+
* @returns The snapshot ID and its expiry.
|
|
479
|
+
*/
|
|
480
|
+
snapshot: (
|
|
481
|
+
options: compute.snapshot.Options,
|
|
482
|
+
) => Promise<compute.snapshot.ReturnType>
|
|
483
|
+
/**
|
|
484
|
+
* Starts a command in the background; its output goes to `logPath` and its
|
|
485
|
+
* exit code to `exitPath`. Paid per request.
|
|
486
|
+
*
|
|
487
|
+
* @experimental
|
|
488
|
+
*
|
|
489
|
+
* @example
|
|
490
|
+
* ```ts
|
|
491
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
492
|
+
*
|
|
493
|
+
* const client = Client.create({
|
|
494
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
495
|
+
* }).extend(gatewayActions())
|
|
496
|
+
*
|
|
497
|
+
* const job = await client.compute.spawn({
|
|
498
|
+
* command: ['python', 'train.py'],
|
|
499
|
+
* sandboxId: sandbox.sandboxId,
|
|
500
|
+
* })
|
|
501
|
+
* ```
|
|
502
|
+
*
|
|
503
|
+
* @param options - Options.
|
|
504
|
+
* @returns The process ID and the paths of its log and exit code.
|
|
505
|
+
*/
|
|
506
|
+
spawn: (options: compute.spawn.Options) => Promise<compute.spawn.ReturnType>
|
|
507
|
+
/**
|
|
508
|
+
* Reads whether a sandbox is running. Paid per request.
|
|
509
|
+
*
|
|
510
|
+
* @experimental
|
|
511
|
+
*
|
|
512
|
+
* @example
|
|
513
|
+
* ```ts
|
|
514
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
515
|
+
*
|
|
516
|
+
* const client = Client.create({
|
|
517
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
518
|
+
* }).extend(gatewayActions())
|
|
519
|
+
*
|
|
520
|
+
* const { status } = await client.compute.status({
|
|
521
|
+
* sandboxId: sandbox.sandboxId,
|
|
522
|
+
* })
|
|
523
|
+
* ```
|
|
524
|
+
*
|
|
525
|
+
* @param options - Options.
|
|
526
|
+
* @returns The sandbox and its status.
|
|
527
|
+
*/
|
|
528
|
+
status: (
|
|
529
|
+
options: compute.status.Options,
|
|
530
|
+
) => Promise<compute.status.ReturnType>
|
|
531
|
+
/**
|
|
532
|
+
* Runs a command and yields its output as it is written, then its exit.
|
|
533
|
+
* Paid per request.
|
|
534
|
+
*
|
|
535
|
+
* @experimental
|
|
536
|
+
*
|
|
537
|
+
* @example
|
|
538
|
+
* ```ts
|
|
539
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
540
|
+
*
|
|
541
|
+
* const client = Client.create({
|
|
542
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
543
|
+
* }).extend(gatewayActions())
|
|
544
|
+
*
|
|
545
|
+
* for await (const event of client.compute.stream({
|
|
546
|
+
* command: ['python', 'train.py'],
|
|
547
|
+
* sandboxId: sandbox.sandboxId,
|
|
548
|
+
* })) {
|
|
549
|
+
* if (event.type !== 'exit') process.stdout.write(event.data)
|
|
550
|
+
* }
|
|
551
|
+
* ```
|
|
552
|
+
*
|
|
553
|
+
* @param options - Options.
|
|
554
|
+
* @returns Output and exit events.
|
|
555
|
+
*/
|
|
556
|
+
stream: (
|
|
557
|
+
options: compute.stream.Options,
|
|
558
|
+
) => AsyncGenerator<compute.stream.Event>
|
|
559
|
+
/**
|
|
560
|
+
* Terminates a sandbox. The Gateway credits the unused rest of its lease
|
|
561
|
+
* back to the payment channel. Paid per request.
|
|
562
|
+
*
|
|
563
|
+
* @experimental
|
|
564
|
+
*
|
|
565
|
+
* @example
|
|
566
|
+
* ```ts
|
|
567
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
568
|
+
*
|
|
569
|
+
* const client = Client.create({
|
|
570
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
571
|
+
* }).extend(gatewayActions())
|
|
572
|
+
*
|
|
573
|
+
* await client.compute.terminate({ sandboxId: sandbox.sandboxId })
|
|
574
|
+
* ```
|
|
575
|
+
*
|
|
576
|
+
* @param options - Options.
|
|
577
|
+
* @returns The final status.
|
|
578
|
+
*/
|
|
579
|
+
terminate: (
|
|
580
|
+
options: compute.terminate.Options,
|
|
581
|
+
) => Promise<compute.terminate.ReturnType>
|
|
582
|
+
/**
|
|
583
|
+
* Writes a file into a sandbox, up to 8 MiB. Paid per request.
|
|
584
|
+
*
|
|
585
|
+
* @experimental
|
|
586
|
+
*
|
|
587
|
+
* @example
|
|
588
|
+
* ```ts
|
|
589
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
590
|
+
*
|
|
591
|
+
* const client = Client.create({
|
|
592
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
593
|
+
* }).extend(gatewayActions())
|
|
594
|
+
*
|
|
595
|
+
* await client.compute.write({
|
|
596
|
+
* path: '/root/train.py',
|
|
597
|
+
* sandboxId: sandbox.sandboxId,
|
|
598
|
+
* value: 'print("training")',
|
|
599
|
+
* })
|
|
600
|
+
* ```
|
|
601
|
+
*
|
|
602
|
+
* @param options - Options.
|
|
603
|
+
* @returns The path and size written.
|
|
604
|
+
*/
|
|
605
|
+
write: (options: compute.write.Options) => Promise<compute.write.ReturnType>
|
|
606
|
+
}
|
|
607
|
+
/** Gateway discovery. */
|
|
608
|
+
gateway: {
|
|
609
|
+
/**
|
|
610
|
+
* Reads the Gateway's free discovery document: chain, currencies, prices,
|
|
611
|
+
* limits, and models.
|
|
612
|
+
*
|
|
613
|
+
* @experimental
|
|
614
|
+
*
|
|
615
|
+
* @example
|
|
616
|
+
* ```ts
|
|
617
|
+
* import { Client, gatewayActions } from 'viem/tempo'
|
|
618
|
+
*
|
|
619
|
+
* const client = Client.create().extend(gatewayActions())
|
|
620
|
+
*
|
|
621
|
+
* const capabilities = await client.gateway.getCapabilities()
|
|
622
|
+
* ```
|
|
623
|
+
*
|
|
624
|
+
* @param options - Options.
|
|
625
|
+
* @returns The Gateway capabilities.
|
|
626
|
+
*/
|
|
627
|
+
getCapabilities: (
|
|
628
|
+
options?: gateway.getCapabilities.Options | undefined,
|
|
629
|
+
) => Promise<gateway.getCapabilities.ReturnType>
|
|
630
|
+
}
|
|
631
|
+
/** Key-value state, private to the payer and app. */
|
|
632
|
+
kv: {
|
|
633
|
+
/**
|
|
634
|
+
* Deletes a key from the app's key-value store. Paid per request.
|
|
635
|
+
*
|
|
636
|
+
* @experimental
|
|
637
|
+
*
|
|
638
|
+
* @example
|
|
639
|
+
* ```ts
|
|
640
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
641
|
+
*
|
|
642
|
+
* const client = Client.create({
|
|
643
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
644
|
+
* }).extend(gatewayActions())
|
|
645
|
+
*
|
|
646
|
+
* const { deleted } = await client.kv.delete({ key: 'counter' })
|
|
647
|
+
* ```
|
|
648
|
+
*
|
|
649
|
+
* @param options - Options.
|
|
650
|
+
* @returns Whether the key existed.
|
|
651
|
+
*/
|
|
652
|
+
delete: (options: kv.delete.Options) => Promise<kv.delete.ReturnType>
|
|
653
|
+
/**
|
|
654
|
+
* Reads a key from the app's key-value store. Returns `null` when the key
|
|
655
|
+
* does not exist or expired. Paid per request.
|
|
656
|
+
*
|
|
657
|
+
* @experimental
|
|
658
|
+
*
|
|
659
|
+
* @example
|
|
660
|
+
* ```ts
|
|
661
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
662
|
+
*
|
|
663
|
+
* const client = Client.create({
|
|
664
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
665
|
+
* }).extend(gatewayActions())
|
|
666
|
+
*
|
|
667
|
+
* const entry = await client.kv.get({ key: 'counter' })
|
|
668
|
+
* ```
|
|
669
|
+
*
|
|
670
|
+
* @param options - Options.
|
|
671
|
+
* @returns The entry, or `null`.
|
|
672
|
+
*/
|
|
673
|
+
get: (options: kv.get.Options) => Promise<kv.get.ReturnType>
|
|
674
|
+
/**
|
|
675
|
+
* Lists entries in the app's key-value store by key prefix, in key order.
|
|
676
|
+
* Paid per request.
|
|
677
|
+
*
|
|
678
|
+
* @experimental
|
|
679
|
+
*
|
|
680
|
+
* @example
|
|
681
|
+
* ```ts
|
|
682
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
683
|
+
*
|
|
684
|
+
* const client = Client.create({
|
|
685
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
686
|
+
* }).extend(gatewayActions())
|
|
687
|
+
*
|
|
688
|
+
* const { entries } = await client.kv.list({ prefix: 'settings/' })
|
|
689
|
+
* ```
|
|
690
|
+
*
|
|
691
|
+
* @param options - Options.
|
|
692
|
+
* @returns A page of entries and the next cursor.
|
|
693
|
+
*/
|
|
694
|
+
list: (options?: kv.list.Options | undefined) => Promise<kv.list.ReturnType>
|
|
695
|
+
/**
|
|
696
|
+
* Writes a JSON value to the app's key-value store. Paid per request.
|
|
697
|
+
*
|
|
698
|
+
* Pass `ifVersion` to write conditionally: `null` creates the key only if
|
|
699
|
+
* it does not exist, and a version replaces the value only if it is still
|
|
700
|
+
* that version. A failed condition throws `Gateway.VersionConflictError`.
|
|
701
|
+
*
|
|
702
|
+
* @experimental
|
|
703
|
+
*
|
|
704
|
+
* @example
|
|
705
|
+
* ```ts
|
|
706
|
+
* import { Account, Client, gatewayActions } from 'viem/tempo'
|
|
707
|
+
*
|
|
708
|
+
* const client = Client.create({
|
|
709
|
+
* account: Account.fromSecp256k1('0x…'),
|
|
710
|
+
* }).extend(gatewayActions())
|
|
711
|
+
*
|
|
712
|
+
* const entry = await client.kv.set({
|
|
713
|
+
* ifVersion: null,
|
|
714
|
+
* key: 'counter',
|
|
715
|
+
* value: { count: 1 },
|
|
716
|
+
* })
|
|
717
|
+
* ```
|
|
718
|
+
*
|
|
719
|
+
* @param options - Options.
|
|
720
|
+
* @returns The written entry.
|
|
721
|
+
*/
|
|
722
|
+
set: (options: kv.set.Options) => Promise<kv.set.ReturnType>
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Pays Gateway requests with the Client's account through `mppx`. Requests go
|
|
728
|
+
* through `globalThis.fetch` until the Gateway first asks for payment, so free
|
|
729
|
+
* routes work without `mppx` installed. `mppx` is loaded then, paying in the
|
|
730
|
+
* Gateway currency the account holds most of. When the account runs out, the
|
|
731
|
+
* next request reads its balances again, so funding it is enough to continue.
|
|
732
|
+
*/
|
|
733
|
+
function pay(client: Client.Client): Gateway.Fetch {
|
|
734
|
+
let mppx: Promise<Gateway.Fetch> | undefined
|
|
735
|
+
let funds: Funds | undefined
|
|
736
|
+
return async (input, init) => {
|
|
737
|
+
if (!mppx) {
|
|
738
|
+
const response = await globalThis.fetch(input, init)
|
|
739
|
+
if (response.status !== 402) return response
|
|
740
|
+
await response.body?.cancel().catch(() => {})
|
|
741
|
+
funds = await balances(client, new URL(input).origin)
|
|
742
|
+
const [best] = funds.balances
|
|
743
|
+
if (!best || best.amount === 0n)
|
|
744
|
+
throw new Gateway.InsufficientFundsError(funds)
|
|
745
|
+
mppx = load().then(
|
|
746
|
+
({ Mppx, tempo }) =>
|
|
747
|
+
Mppx.create({
|
|
748
|
+
methods: [
|
|
749
|
+
tempo({
|
|
750
|
+
account: client.account,
|
|
751
|
+
getClient: ({ chainId }) => {
|
|
752
|
+
const expected = client.chain?.id
|
|
753
|
+
if (
|
|
754
|
+
chainId !== undefined &&
|
|
755
|
+
expected !== undefined &&
|
|
756
|
+
chainId !== expected
|
|
757
|
+
)
|
|
758
|
+
throw new Gateway.ChainMismatchError({ chainId, expected })
|
|
759
|
+
return client
|
|
760
|
+
},
|
|
761
|
+
}),
|
|
762
|
+
],
|
|
763
|
+
orderChallenges: (candidates) =>
|
|
764
|
+
[...candidates].sort(
|
|
765
|
+
(a, b) =>
|
|
766
|
+
Number(!isCurrency(a, best.currency)) -
|
|
767
|
+
Number(!isCurrency(b, best.currency)),
|
|
768
|
+
),
|
|
769
|
+
polyfill: false,
|
|
770
|
+
}).fetch,
|
|
771
|
+
(error: unknown) => {
|
|
772
|
+
mppx = undefined
|
|
773
|
+
throw error
|
|
774
|
+
},
|
|
775
|
+
)
|
|
776
|
+
}
|
|
777
|
+
const underfunded = async (error: unknown) => {
|
|
778
|
+
if (!(error instanceof Error) || !isUnderfunded(error)) return error
|
|
779
|
+
mppx = undefined
|
|
780
|
+
const current = await balances(client, new URL(input).origin).catch(
|
|
781
|
+
() => funds,
|
|
782
|
+
)
|
|
783
|
+
return new Gateway.InsufficientFundsError({
|
|
784
|
+
...(current ?? { address: '0x', balances: [] }),
|
|
785
|
+
cause: error,
|
|
786
|
+
})
|
|
787
|
+
}
|
|
788
|
+
const response = await (
|
|
789
|
+
await mppx
|
|
790
|
+
)(input, init).catch(async (error) => {
|
|
791
|
+
throw await underfunded(error)
|
|
792
|
+
})
|
|
793
|
+
if (!response.body) return response
|
|
794
|
+
const reader = response.body.getReader()
|
|
795
|
+
const body = new ReadableStream<Uint8Array>({
|
|
796
|
+
cancel: (reason) => reader.cancel(reason),
|
|
797
|
+
async pull(controller) {
|
|
798
|
+
try {
|
|
799
|
+
const { done, value } = await reader.read()
|
|
800
|
+
if (done) controller.close()
|
|
801
|
+
else controller.enqueue(value)
|
|
802
|
+
} catch (error) {
|
|
803
|
+
controller.error(await underfunded(error))
|
|
804
|
+
}
|
|
805
|
+
},
|
|
806
|
+
})
|
|
807
|
+
const wrapped = new Response(body, {
|
|
808
|
+
headers: response.headers,
|
|
809
|
+
status: response.status,
|
|
810
|
+
statusText: response.statusText,
|
|
811
|
+
})
|
|
812
|
+
Object.defineProperty(wrapped, 'url', { value: response.url })
|
|
813
|
+
return wrapped
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
type Funds = Gateway.InsufficientFundsError.Options
|
|
818
|
+
|
|
819
|
+
/** Reads the account's balance of each Gateway currency, largest first. */
|
|
820
|
+
async function balances(client: Client.Client, origin: string): Promise<Funds> {
|
|
821
|
+
const { address } = client.account!
|
|
822
|
+
const response = await globalThis.fetch(`${origin}/v1/capabilities`)
|
|
823
|
+
const { chainId, currencies } = (await response.json()) as {
|
|
824
|
+
chainId: number
|
|
825
|
+
currencies: Record<string, Address.Address>
|
|
826
|
+
}
|
|
827
|
+
const expected = client.chain?.id
|
|
828
|
+
if (expected !== undefined && chainId !== expected)
|
|
829
|
+
throw new Gateway.ChainMismatchError({ chainId, expected })
|
|
830
|
+
const balances = await Promise.all(
|
|
831
|
+
Object.entries(currencies).map(async ([symbol, currency]) => ({
|
|
832
|
+
amount: await read(client, {
|
|
833
|
+
abi: Abis.tip20,
|
|
834
|
+
address: currency,
|
|
835
|
+
args: [address],
|
|
836
|
+
functionName: 'balanceOf',
|
|
837
|
+
}),
|
|
838
|
+
currency,
|
|
839
|
+
symbol: symbol.toUpperCase(),
|
|
840
|
+
})),
|
|
841
|
+
)
|
|
842
|
+
return {
|
|
843
|
+
address,
|
|
844
|
+
balances: balances.sort((a, b) => (b.amount > a.amount ? 1 : -1)),
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
function isCurrency(candidate: unknown, currency: Address.Address) {
|
|
849
|
+
const requested = (
|
|
850
|
+
candidate as { challenge?: { request?: { currency?: string } } }
|
|
851
|
+
).challenge?.request?.currency
|
|
852
|
+
return requested?.toLowerCase() === currency.toLowerCase()
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
/** Whether a payment failed because the account could not cover it. */
|
|
856
|
+
function isUnderfunded(error: Error) {
|
|
857
|
+
for (let cause: unknown = error; cause instanceof Error; cause = cause.cause)
|
|
858
|
+
if (/InsufficientBalance/.test(cause.message)) return true
|
|
859
|
+
return false
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
type MppxClient = {
|
|
863
|
+
Mppx: {
|
|
864
|
+
create: (options: {
|
|
865
|
+
methods: readonly unknown[]
|
|
866
|
+
orderChallenges: (candidates: readonly unknown[]) => unknown[]
|
|
867
|
+
polyfill: boolean
|
|
868
|
+
}) => {
|
|
869
|
+
fetch: Gateway.Fetch
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
tempo: (options: {
|
|
873
|
+
account: unknown
|
|
874
|
+
getClient: (options: { chainId?: number | undefined }) => unknown
|
|
875
|
+
}) => unknown
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* Loads `mppx/client`. The specifier is cast so TypeScript doesn't pull the
|
|
880
|
+
* optional peer dependency's types into Viem's, while bundlers still see a
|
|
881
|
+
* literal import. The `try` marks the import optional for webpack, so a build
|
|
882
|
+
* without `mppx` warns instead of failing, and the import rejects at runtime.
|
|
883
|
+
*/
|
|
884
|
+
async function load(): Promise<MppxClient> {
|
|
885
|
+
try {
|
|
886
|
+
return await import('mppx/client' as string)
|
|
887
|
+
} catch (error) {
|
|
888
|
+
throw new Gateway.MppxNotInstalledError({ cause: error as Error })
|
|
889
|
+
}
|
|
890
|
+
}
|