viem 2.56.8 → 2.57.0
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/CHANGELOG.md +78 -0
- package/README.md +0 -1
- package/_cjs/actions/index.js +5 -3
- package/_cjs/actions/index.js.map +1 -1
- package/_cjs/actions/public/getStorageValues.js +17 -0
- package/_cjs/actions/public/getStorageValues.js.map +1 -0
- package/_cjs/actions/public/simulateBlocks.js +2 -0
- package/_cjs/actions/public/simulateBlocks.js.map +1 -1
- package/_cjs/actions/public/waitForTransactionReceipt.js +12 -1
- package/_cjs/actions/public/waitForTransactionReceipt.js.map +1 -1
- package/_cjs/chains/definitions/blockdag.js +23 -0
- package/_cjs/chains/definitions/blockdag.js.map +1 -0
- package/_cjs/chains/definitions/candyChain.js +29 -0
- package/_cjs/chains/definitions/candyChain.js.map +1 -0
- package/_cjs/chains/definitions/creditCoin3Devnet.js +6 -0
- package/_cjs/chains/definitions/creditCoin3Devnet.js.map +1 -1
- package/_cjs/chains/definitions/creditCoin3Mainnet.js +6 -0
- package/_cjs/chains/definitions/creditCoin3Mainnet.js.map +1 -1
- package/_cjs/chains/definitions/creditCoin3Testnet.js +6 -0
- package/_cjs/chains/definitions/creditCoin3Testnet.js.map +1 -1
- package/_cjs/chains/definitions/kortana.js +23 -0
- package/_cjs/chains/definitions/kortana.js.map +1 -0
- package/_cjs/chains/definitions/rabbitChainTestnet.js +24 -0
- package/_cjs/chains/definitions/rabbitChainTestnet.js.map +1 -0
- package/_cjs/chains/index.js +22 -14
- package/_cjs/chains/index.js.map +1 -1
- package/_cjs/clients/createClientResolver.js +45 -0
- package/_cjs/clients/createClientResolver.js.map +1 -0
- package/_cjs/clients/decorators/public.js +2 -0
- package/_cjs/clients/decorators/public.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/index.js +13 -9
- package/_cjs/index.js.map +1 -1
- package/_cjs/op-stack/actions/getGame.js +1 -1
- package/_cjs/op-stack/actions/getGame.js.map +1 -1
- package/_cjs/op-stack/actions/getGames.js +1 -1
- package/_cjs/op-stack/actions/getGames.js.map +1 -1
- package/_cjs/op-stack/actions/getTimeToNextGame.js +1 -1
- package/_cjs/op-stack/actions/getTimeToNextGame.js.map +1 -1
- package/_cjs/op-stack/actions/getTimeToNextL2Output.js +1 -1
- package/_cjs/op-stack/actions/getTimeToNextL2Output.js.map +1 -1
- package/_cjs/tempo/Abis.js +1211 -32
- package/_cjs/tempo/Abis.js.map +1 -1
- package/_cjs/tempo/Addresses.js +2 -1
- package/_cjs/tempo/Addresses.js.map +1 -1
- package/_cjs/tempo/Client.js +2 -10
- package/_cjs/tempo/Client.js.map +1 -1
- package/_cjs/tempo/Decorator.js +12 -0
- package/_cjs/tempo/Decorator.js.map +1 -1
- package/_cjs/tempo/ExecutionError.js +290 -0
- package/_cjs/tempo/ExecutionError.js.map +1 -0
- package/_cjs/tempo/Relay.js +88 -0
- package/_cjs/tempo/Relay.js.map +1 -0
- package/_cjs/tempo/Selectors.js +7 -4
- package/_cjs/tempo/Selectors.js.map +1 -1
- package/_cjs/tempo/Transaction.js.map +1 -1
- package/_cjs/tempo/Transport.js +21 -12
- package/_cjs/tempo/Transport.js.map +1 -1
- package/_cjs/tempo/actions/index.js +2 -1
- package/_cjs/tempo/actions/index.js.map +1 -1
- package/_cjs/tempo/actions/propAmm.js +349 -0
- package/_cjs/tempo/actions/propAmm.js.map +1 -0
- package/_cjs/tempo/chainConfig.js +3 -0
- package/_cjs/tempo/chainConfig.js.map +1 -1
- package/_cjs/tempo/index.js +3 -3
- package/_cjs/tempo/index.js.map +1 -1
- package/_cjs/tempo/internal/relay/cache.js +74 -0
- package/_cjs/tempo/internal/relay/cache.js.map +1 -0
- package/_cjs/tempo/internal/relay/deadline.js +35 -0
- package/_cjs/tempo/internal/relay/deadline.js.map +1 -0
- package/_cjs/tempo/internal/relay/error.js +102 -0
- package/_cjs/tempo/internal/relay/error.js.map +1 -0
- package/_cjs/tempo/internal/relay/feePayer.js +426 -0
- package/_cjs/tempo/internal/relay/feePayer.js.map +1 -0
- package/_cjs/tempo/internal/relay/feeToken.js +143 -0
- package/_cjs/tempo/internal/relay/feeToken.js.map +1 -0
- package/_cjs/tempo/{Multisig.js → internal/relay/multisig.js} +132 -122
- package/_cjs/tempo/internal/relay/multisig.js.map +1 -0
- package/_cjs/tempo/internal/relay/plugin.js +13 -0
- package/_cjs/tempo/internal/relay/plugin.js.map +1 -0
- package/_cjs/tempo/internal/relay/preflight.js +58 -0
- package/_cjs/tempo/internal/relay/preflight.js.map +1 -0
- package/_cjs/tempo/internal/relay/request.js +319 -0
- package/_cjs/tempo/internal/relay/request.js.map +1 -0
- package/_cjs/tempo/internal/relay/simulate.js +267 -0
- package/_cjs/tempo/internal/relay/simulate.js.map +1 -0
- package/_cjs/tempo/internal/relay/utils.js +174 -0
- package/_cjs/tempo/internal/relay/utils.js.map +1 -0
- package/_cjs/tempo/internal/relay/virtualAddress.js +78 -0
- package/_cjs/tempo/internal/relay/virtualAddress.js.map +1 -0
- package/_cjs/tempo/internal/relay.js +139 -0
- package/_cjs/tempo/internal/relay.js.map +1 -0
- package/_cjs/tempo/multisig/Config.js +0 -2
- package/_cjs/tempo/multisig/Config.js.map +1 -1
- package/_cjs/tempo/multisig/Operation.js +1 -2
- package/_cjs/tempo/multisig/Operation.js.map +1 -1
- package/_cjs/tokens/definitions/eurc.js +1 -0
- package/_cjs/tokens/definitions/eurc.js.map +1 -1
- package/_cjs/tokens/definitions/usdc.js +1 -0
- package/_cjs/tokens/definitions/usdc.js.map +1 -1
- package/_cjs/utils/siwe/parseSiweMessage.js +3 -3
- package/_cjs/utils/siwe/parseSiweMessage.js.map +1 -1
- package/_esm/actions/index.js +1 -0
- package/_esm/actions/index.js.map +1 -1
- package/_esm/actions/public/getStorageValues.js +39 -0
- package/_esm/actions/public/getStorageValues.js.map +1 -0
- package/_esm/actions/public/simulateBlocks.js +4 -0
- package/_esm/actions/public/simulateBlocks.js.map +1 -1
- package/_esm/actions/public/waitForTransactionReceipt.js +15 -1
- package/_esm/actions/public/waitForTransactionReceipt.js.map +1 -1
- package/_esm/chains/definitions/blockdag.js +20 -0
- package/_esm/chains/definitions/blockdag.js.map +1 -0
- package/_esm/chains/definitions/candyChain.js +26 -0
- package/_esm/chains/definitions/candyChain.js.map +1 -0
- package/_esm/chains/definitions/creditCoin3Devnet.js +6 -0
- package/_esm/chains/definitions/creditCoin3Devnet.js.map +1 -1
- package/_esm/chains/definitions/creditCoin3Mainnet.js +6 -0
- package/_esm/chains/definitions/creditCoin3Mainnet.js.map +1 -1
- package/_esm/chains/definitions/creditCoin3Testnet.js +6 -0
- package/_esm/chains/definitions/creditCoin3Testnet.js.map +1 -1
- package/_esm/chains/definitions/kortana.js +20 -0
- package/_esm/chains/definitions/kortana.js.map +1 -0
- package/_esm/chains/definitions/rabbitChainTestnet.js +21 -0
- package/_esm/chains/definitions/rabbitChainTestnet.js.map +1 -0
- package/_esm/chains/index.js +4 -0
- package/_esm/chains/index.js.map +1 -1
- package/_esm/clients/createClientResolver.js +64 -0
- package/_esm/clients/createClientResolver.js.map +1 -0
- package/_esm/clients/decorators/public.js +2 -0
- package/_esm/clients/decorators/public.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/index.js +2 -0
- package/_esm/index.js.map +1 -1
- package/_esm/op-stack/actions/getGame.js +1 -1
- package/_esm/op-stack/actions/getGame.js.map +1 -1
- package/_esm/op-stack/actions/getGames.js +1 -1
- package/_esm/op-stack/actions/getGames.js.map +1 -1
- package/_esm/op-stack/actions/getTimeToNextGame.js +2 -2
- package/_esm/op-stack/actions/getTimeToNextGame.js.map +1 -1
- package/_esm/op-stack/actions/getTimeToNextL2Output.js +2 -2
- package/_esm/op-stack/actions/getTimeToNextL2Output.js.map +1 -1
- package/_esm/tempo/Abis.js +1214 -34
- package/_esm/tempo/Abis.js.map +1 -1
- package/_esm/tempo/Addresses.js +2 -0
- package/_esm/tempo/Addresses.js.map +1 -1
- package/_esm/tempo/Client.js +8 -14
- package/_esm/tempo/Client.js.map +1 -1
- package/_esm/tempo/Decorator.js +12 -0
- package/_esm/tempo/Decorator.js.map +1 -1
- package/_esm/tempo/ExecutionError.js +306 -0
- package/_esm/tempo/ExecutionError.js.map +1 -0
- package/_esm/tempo/Relay.js +170 -0
- package/_esm/tempo/Relay.js.map +1 -0
- package/_esm/tempo/Selectors.js +6 -3
- package/_esm/tempo/Selectors.js.map +1 -1
- package/_esm/tempo/Transaction.js.map +1 -1
- package/_esm/tempo/Transport.js +21 -46
- package/_esm/tempo/Transport.js.map +1 -1
- package/_esm/tempo/actions/index.js +1 -0
- package/_esm/tempo/actions/index.js.map +1 -1
- package/_esm/tempo/actions/propAmm.js +539 -0
- package/_esm/tempo/actions/propAmm.js.map +1 -0
- package/_esm/tempo/chainConfig.js +4 -0
- package/_esm/tempo/chainConfig.js.map +1 -1
- package/_esm/tempo/index.js +8 -3
- package/_esm/tempo/index.js.map +1 -1
- package/_esm/tempo/internal/relay/cache.js +72 -0
- package/_esm/tempo/internal/relay/cache.js.map +1 -0
- package/_esm/tempo/internal/relay/deadline.js +34 -0
- package/_esm/tempo/internal/relay/deadline.js.map +1 -0
- package/_esm/tempo/internal/relay/error.js +101 -0
- package/_esm/tempo/internal/relay/error.js.map +1 -0
- package/_esm/tempo/internal/relay/feePayer.js +442 -0
- package/_esm/tempo/internal/relay/feePayer.js.map +1 -0
- package/_esm/tempo/internal/relay/feeToken.js +143 -0
- package/_esm/tempo/internal/relay/feeToken.js.map +1 -0
- package/_esm/tempo/{Multisig.js → internal/relay/multisig.js} +133 -129
- package/_esm/tempo/internal/relay/multisig.js.map +1 -0
- package/_esm/tempo/internal/relay/plugin.js +10 -0
- package/_esm/tempo/internal/relay/plugin.js.map +1 -0
- package/_esm/tempo/internal/relay/preflight.js +57 -0
- package/_esm/tempo/internal/relay/preflight.js.map +1 -0
- package/_esm/tempo/internal/relay/request.js +321 -0
- package/_esm/tempo/internal/relay/request.js.map +1 -0
- package/_esm/tempo/internal/relay/simulate.js +277 -0
- package/_esm/tempo/internal/relay/simulate.js.map +1 -0
- package/_esm/tempo/internal/relay/utils.js +174 -0
- package/_esm/tempo/internal/relay/utils.js.map +1 -0
- package/_esm/tempo/internal/relay/virtualAddress.js +73 -0
- package/_esm/tempo/internal/relay/virtualAddress.js.map +1 -0
- package/_esm/tempo/internal/relay.js +138 -0
- package/_esm/tempo/internal/relay.js.map +1 -0
- package/_esm/tempo/multisig/Config.js +2 -1
- package/_esm/tempo/multisig/Config.js.map +1 -1
- package/_esm/tempo/multisig/Operation.js +1 -1
- package/_esm/tempo/multisig/Operation.js.map +1 -1
- package/_esm/tokens/definitions/eurc.js +1 -0
- package/_esm/tokens/definitions/eurc.js.map +1 -1
- package/_esm/tokens/definitions/usdc.js +1 -0
- package/_esm/tokens/definitions/usdc.js.map +1 -1
- package/_esm/utils/siwe/parseSiweMessage.js +3 -3
- package/_esm/utils/siwe/parseSiweMessage.js.map +1 -1
- package/_types/actions/index.d.ts +1 -0
- package/_types/actions/index.d.ts.map +1 -1
- package/_types/actions/public/getStorageValues.d.ts +59 -0
- package/_types/actions/public/getStorageValues.d.ts.map +1 -0
- package/_types/actions/public/simulateBlocks.d.ts +8 -0
- package/_types/actions/public/simulateBlocks.d.ts.map +1 -1
- package/_types/actions/public/waitForTransactionReceipt.d.ts.map +1 -1
- package/_types/chains/definitions/blockdag.d.ts +51 -0
- package/_types/chains/definitions/blockdag.d.ts.map +1 -0
- package/_types/chains/definitions/candyChain.d.ts +48 -0
- package/_types/chains/definitions/candyChain.d.ts.map +1 -0
- package/_types/chains/definitions/creditCoin3Devnet.d.ts +6 -9
- package/_types/chains/definitions/creditCoin3Devnet.d.ts.map +1 -1
- package/_types/chains/definitions/creditCoin3Mainnet.d.ts +6 -9
- package/_types/chains/definitions/creditCoin3Mainnet.d.ts.map +1 -1
- package/_types/chains/definitions/creditCoin3Testnet.d.ts +6 -9
- package/_types/chains/definitions/creditCoin3Testnet.d.ts.map +1 -1
- package/_types/chains/definitions/kortana.d.ts +51 -0
- package/_types/chains/definitions/kortana.d.ts.map +1 -0
- package/_types/chains/definitions/rabbitChainTestnet.d.ts +51 -0
- package/_types/chains/definitions/rabbitChainTestnet.d.ts.map +1 -0
- package/_types/chains/index.d.ts +4 -0
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/clients/createClientResolver.d.ts +76 -0
- package/_types/clients/createClientResolver.d.ts.map +1 -0
- package/_types/clients/decorators/public.d.ts +11 -0
- package/_types/clients/decorators/public.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/index.d.ts +3 -0
- package/_types/index.d.ts.map +1 -1
- package/_types/op-stack/actions/getGame.d.ts.map +1 -1
- package/_types/tempo/Abis.d.ts +14686 -9568
- package/_types/tempo/Abis.d.ts.map +1 -1
- package/_types/tempo/Addresses.d.ts +2 -0
- package/_types/tempo/Addresses.d.ts.map +1 -1
- package/_types/tempo/Capabilities.d.ts +7 -28
- package/_types/tempo/Capabilities.d.ts.map +1 -1
- package/_types/tempo/Client.d.ts +6 -15
- package/_types/tempo/Client.d.ts.map +1 -1
- package/_types/tempo/Decorator.d.ts +205 -1
- package/_types/tempo/Decorator.d.ts.map +1 -1
- package/_types/tempo/ExecutionError.d.ts +79 -0
- package/_types/tempo/ExecutionError.d.ts.map +1 -0
- package/_types/tempo/Relay.d.ts +302 -0
- package/_types/tempo/Relay.d.ts.map +1 -0
- package/_types/tempo/Selectors.d.ts +6 -3
- package/_types/tempo/Selectors.d.ts.map +1 -1
- package/_types/tempo/Transaction.d.ts +2 -1
- package/_types/tempo/Transaction.d.ts.map +1 -1
- package/_types/tempo/Transport.d.ts +15 -29
- package/_types/tempo/Transport.d.ts.map +1 -1
- package/_types/tempo/actions/earn.d.ts +621 -1
- package/_types/tempo/actions/earn.d.ts.map +1 -1
- package/_types/tempo/actions/index.d.ts +1 -0
- package/_types/tempo/actions/index.d.ts.map +1 -1
- package/_types/tempo/actions/propAmm.d.ts +2228 -0
- package/_types/tempo/actions/propAmm.d.ts.map +1 -0
- package/_types/tempo/chainConfig.d.ts.map +1 -1
- package/_types/tempo/index.d.ts +8 -3
- package/_types/tempo/index.d.ts.map +1 -1
- package/_types/tempo/internal/relay/cache.d.ts +9 -0
- package/_types/tempo/internal/relay/cache.d.ts.map +1 -0
- package/_types/tempo/internal/relay/deadline.d.ts +4 -0
- package/_types/tempo/internal/relay/deadline.d.ts.map +1 -0
- package/_types/tempo/internal/relay/error.d.ts +47 -0
- package/_types/tempo/internal/relay/error.d.ts.map +1 -0
- package/_types/tempo/internal/relay/feePayer.d.ts +70 -0
- package/_types/tempo/internal/relay/feePayer.d.ts.map +1 -0
- package/_types/tempo/internal/relay/feeToken.d.ts +38 -0
- package/_types/tempo/internal/relay/feeToken.d.ts.map +1 -0
- package/_types/tempo/internal/relay/multisig.d.ts +4 -0
- package/_types/tempo/internal/relay/multisig.d.ts.map +1 -0
- package/_types/tempo/internal/relay/plugin.d.ts +5 -0
- package/_types/tempo/internal/relay/plugin.d.ts.map +1 -0
- package/_types/tempo/internal/relay/preflight.d.ts +17 -0
- package/_types/tempo/internal/relay/preflight.d.ts.map +1 -0
- package/_types/tempo/internal/relay/request.d.ts +16 -0
- package/_types/tempo/internal/relay/request.d.ts.map +1 -0
- package/_types/tempo/internal/relay/simulate.d.ts +59 -0
- package/_types/tempo/internal/relay/simulate.d.ts.map +1 -0
- package/_types/tempo/internal/relay/utils.d.ts +294 -0
- package/_types/tempo/internal/relay/utils.d.ts.map +1 -0
- package/_types/tempo/internal/relay/virtualAddress.d.ts +9 -0
- package/_types/tempo/internal/relay/virtualAddress.d.ts.map +1 -0
- package/_types/tempo/internal/relay.d.ts +4 -0
- package/_types/tempo/internal/relay.d.ts.map +1 -0
- package/_types/tempo/multisig/Config.d.ts +0 -13
- package/_types/tempo/multisig/Config.d.ts.map +1 -1
- package/_types/tempo/multisig/Operation.d.ts +0 -5
- package/_types/tempo/multisig/Operation.d.ts.map +1 -1
- package/_types/tokens/definitions/eurc.d.ts +1 -0
- package/_types/tokens/definitions/eurc.d.ts.map +1 -1
- package/_types/tokens/definitions/usdc.d.ts +1 -0
- package/_types/tokens/definitions/usdc.d.ts.map +1 -1
- package/_types/tokens/sets.d.ts +3 -0
- package/_types/tokens/sets.d.ts.map +1 -1
- package/_types/types/eip1193.d.ts +20 -0
- package/_types/types/eip1193.d.ts.map +1 -1
- package/_types/utils/siwe/parseSiweMessage.d.ts.map +1 -1
- package/actions/index.ts +6 -0
- package/actions/public/getStorageValues.ts +93 -0
- package/actions/public/simulateBlocks.ts +13 -0
- package/actions/public/waitForTransactionReceipt.ts +16 -2
- package/chains/definitions/blockdag.ts +20 -0
- package/chains/definitions/candyChain.ts +26 -0
- package/chains/definitions/creditCoin3Devnet.ts +6 -0
- package/chains/definitions/creditCoin3Mainnet.ts +6 -0
- package/chains/definitions/creditCoin3Testnet.ts +6 -0
- package/chains/definitions/kortana.ts +20 -0
- package/chains/definitions/rabbitChainTestnet.ts +21 -0
- package/chains/index.ts +4 -0
- package/clients/createClientResolver.ts +191 -0
- package/clients/decorators/public.ts +18 -0
- package/errors/version.ts +1 -1
- package/index.ts +11 -0
- package/op-stack/actions/getGame.ts +3 -1
- package/op-stack/actions/getGames.ts +1 -1
- package/op-stack/actions/getTimeToNextGame.ts +2 -2
- package/op-stack/actions/getTimeToNextL2Output.ts +2 -2
- package/package.json +1 -1
- package/tempo/Abis.ts +1218 -34
- package/tempo/Addresses.ts +2 -0
- package/tempo/Capabilities.ts +7 -29
- package/tempo/Client.ts +8 -38
- package/tempo/Decorator.ts +239 -3
- package/tempo/ExecutionError.ts +418 -0
- package/tempo/Relay.ts +428 -0
- package/tempo/Selectors.ts +10 -4
- package/tempo/Transaction.ts +2 -1
- package/tempo/Transport.ts +69 -60
- package/tempo/actions/index.ts +1 -0
- package/tempo/actions/propAmm.ts +998 -0
- package/tempo/chainConfig.ts +4 -0
- package/tempo/index.ts +7 -3
- package/tempo/internal/relay/cache.ts +82 -0
- package/tempo/internal/relay/deadline.ts +45 -0
- package/tempo/internal/relay/error.ts +128 -0
- package/tempo/internal/relay/feePayer.ts +692 -0
- package/tempo/internal/relay/feeToken.ts +190 -0
- package/tempo/{Multisig.ts → internal/relay/multisig.ts} +162 -193
- package/tempo/internal/relay/plugin.ts +13 -0
- package/tempo/internal/relay/preflight.ts +81 -0
- package/tempo/internal/relay/request.ts +391 -0
- package/tempo/internal/relay/simulate.ts +367 -0
- package/tempo/internal/relay/utils.ts +202 -0
- package/tempo/internal/relay/virtualAddress.ts +95 -0
- package/tempo/internal/relay.ts +158 -0
- package/tempo/multisig/Config.ts +3 -2
- package/tempo/multisig/Operation.ts +1 -1
- package/tokens/definitions/eurc.ts +1 -0
- package/tokens/definitions/usdc.ts +1 -0
- package/types/eip1193.ts +20 -0
- package/utils/siwe/parseSiweMessage.ts +21 -13
- package/_cjs/tempo/Multisig.js.map +0 -1
- package/_esm/tempo/Multisig.js.map +0 -1
- package/_types/tempo/Multisig.d.ts +0 -37
- package/_types/tempo/Multisig.d.ts.map +0 -1
package/tempo/Addresses.ts
CHANGED
|
@@ -12,6 +12,8 @@ export const accountImplementation =
|
|
|
12
12
|
export const accountKeychain = '0xaAAAaaAA00000000000000000000000000000000'
|
|
13
13
|
export const accountRegistrar = '0x7702ac0000000000000000000000000000000000'
|
|
14
14
|
export const addressRegistry = '0xfdc0000000000000000000000000000000000000'
|
|
15
|
+
/** Current consensus committee precompile address, used with `Abis.currentCommittee` to read committee members. */
|
|
16
|
+
export const currentCommittee = '0xC077e00000000000000000000000000000000000'
|
|
15
17
|
export const feeManager = '0xfeec000000000000000000000000000000000000'
|
|
16
18
|
export const nativeMultisig = '0xAACC000000000000000000000000000000000000'
|
|
17
19
|
/** Temporary recovery factory until the production address is finalized. */
|
package/tempo/Capabilities.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Address } from 'abitype'
|
|
2
2
|
import type { DefaultCapabilitiesSchema } from '../types/capabilities.js'
|
|
3
3
|
import type { Hex } from '../types/misc.js'
|
|
4
|
-
import type { ExactPartial
|
|
5
|
-
import type
|
|
4
|
+
import type { ExactPartial } from '../types/utils.js'
|
|
5
|
+
import type * as ExecutionError from './ExecutionError.js'
|
|
6
6
|
import type { TransactionRequestTempo } from './Transaction.js'
|
|
7
7
|
|
|
8
8
|
export type Schema = Omit<DefaultCapabilitiesSchema, 'sendCalls'> & {
|
|
@@ -18,27 +18,13 @@ export type Schema = Omit<DefaultCapabilitiesSchema, 'sendCalls'> & {
|
|
|
18
18
|
export type FillTransactionRequestCapabilities = {
|
|
19
19
|
/** Whether to include `balanceDiffs` in the response. */
|
|
20
20
|
balanceDiffs?: boolean | undefined
|
|
21
|
+
/** Whether execution reverts return error capabilities instead of throwing. */
|
|
22
|
+
errors?: boolean | undefined
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export type FillTransactionCapabilities = {
|
|
24
|
-
autoSwap?:
|
|
25
|
-
| {
|
|
26
|
-
calls: readonly { to: Address; data: Hex; value: Hex }[]
|
|
27
|
-
maxIn: SwapAmount
|
|
28
|
-
minOut: SwapAmount
|
|
29
|
-
slippage: number
|
|
30
|
-
}
|
|
31
|
-
| undefined
|
|
32
26
|
balanceDiffs?: Readonly<Record<Address, readonly BalanceDiff[]>> | undefined
|
|
33
|
-
error?:
|
|
34
|
-
| OneOf<
|
|
35
|
-
| (DecodeErrorResultReturnType & {
|
|
36
|
-
data: Hex
|
|
37
|
-
message: string
|
|
38
|
-
})
|
|
39
|
-
| { errorName: 'unknown'; message: string }
|
|
40
|
-
>
|
|
41
|
-
| undefined
|
|
27
|
+
error?: ExecutionError.Rpc | undefined
|
|
42
28
|
fee?:
|
|
43
29
|
| {
|
|
44
30
|
amount: Hex
|
|
@@ -47,7 +33,7 @@ export type FillTransactionCapabilities = {
|
|
|
47
33
|
symbol: string
|
|
48
34
|
}
|
|
49
35
|
| undefined
|
|
50
|
-
|
|
36
|
+
insufficientFunds?:
|
|
51
37
|
| {
|
|
52
38
|
amount: Hex
|
|
53
39
|
decimals: number
|
|
@@ -68,6 +54,7 @@ export type FillTransactionCapabilities = {
|
|
|
68
54
|
virtualAddresses?: Readonly<Record<Address, Address | null>> | undefined
|
|
69
55
|
}
|
|
70
56
|
|
|
57
|
+
/** A token balance preview. Incoming funds and outgoing approval exposure can produce separate entries for the same token. */
|
|
71
58
|
export type BalanceDiff = {
|
|
72
59
|
address: Address
|
|
73
60
|
decimals: number
|
|
@@ -78,12 +65,3 @@ export type BalanceDiff = {
|
|
|
78
65
|
symbol: string
|
|
79
66
|
value: Hex
|
|
80
67
|
}
|
|
81
|
-
|
|
82
|
-
export type SwapAmount = {
|
|
83
|
-
decimals: number
|
|
84
|
-
formatted: string
|
|
85
|
-
name: string
|
|
86
|
-
symbol: string
|
|
87
|
-
token: Address
|
|
88
|
-
value: Hex
|
|
89
|
-
}
|
package/tempo/Client.ts
CHANGED
|
@@ -25,8 +25,6 @@ import type { RpcSchema } from '../types/eip1193.js'
|
|
|
25
25
|
import type { Prettify } from '../types/utils.js'
|
|
26
26
|
import { tempo, tempoTestnet } from './Chain.js'
|
|
27
27
|
import { type Decorator, decorator as tempoActions } from './Decorator.js'
|
|
28
|
-
import * as Store from './Store.js'
|
|
29
|
-
import { withMultisig } from './Transport.js'
|
|
30
28
|
|
|
31
29
|
/**
|
|
32
30
|
* Configuration for a Tempo {@link Client}.
|
|
@@ -54,19 +52,6 @@ export type ClientConfig<
|
|
|
54
52
|
* @default tempo (or `tempoTestnet` when `testnet` is truthy)
|
|
55
53
|
*/
|
|
56
54
|
chain?: chain | Chain | undefined
|
|
57
|
-
/**
|
|
58
|
-
* Enables native multisig approval coordination. Pass `true` to use an
|
|
59
|
-
* in-memory store or provide a shared store.
|
|
60
|
-
*
|
|
61
|
-
* @default undefined
|
|
62
|
-
*/
|
|
63
|
-
experimental_multisig?:
|
|
64
|
-
| true
|
|
65
|
-
| {
|
|
66
|
-
/** Store shared by multisig coordinators. */
|
|
67
|
-
store: Store.Atomic
|
|
68
|
-
}
|
|
69
|
-
| undefined
|
|
70
55
|
/**
|
|
71
56
|
* Default fee token for the Client. Extended onto the chain so it applies
|
|
72
57
|
* to every transaction sent with the Client.
|
|
@@ -121,8 +106,8 @@ export type CreateClientErrorType = ErrorType
|
|
|
121
106
|
* Defaults to the `tempo` mainnet chain and `http` transport, so a minimal
|
|
122
107
|
* client can be created with `createClient()`. Pass `testnet` to use the
|
|
123
108
|
* Tempo testnet, or `chain` to override the chain entirely. Pass `feeToken`
|
|
124
|
-
* to set a default fee token for every transaction.
|
|
125
|
-
* `
|
|
109
|
+
* to set a default fee token for every transaction. Use `withRelay` with a
|
|
110
|
+
* `Relay.multisig` plugin to coordinate multisig owner approvals.
|
|
126
111
|
*
|
|
127
112
|
* @example
|
|
128
113
|
* ```ts
|
|
@@ -156,11 +141,13 @@ export type CreateClientErrorType = ErrorType
|
|
|
156
141
|
*
|
|
157
142
|
* @example
|
|
158
143
|
* ```ts
|
|
159
|
-
* import { createClient } from 'viem/tempo'
|
|
144
|
+
* import { createClient, http, Relay, Store, withRelay } from 'viem/tempo'
|
|
160
145
|
*
|
|
161
146
|
* // Multisig coordination with a client-local in-memory store.
|
|
162
147
|
* const client = createClient({
|
|
163
|
-
*
|
|
148
|
+
* transport: withRelay(http(), {
|
|
149
|
+
* plugins: [Relay.multisig({ store: Store.memory() })],
|
|
150
|
+
* }),
|
|
164
151
|
* })
|
|
165
152
|
* ```
|
|
166
153
|
*
|
|
@@ -182,15 +169,7 @@ export function createClient<
|
|
|
182
169
|
: accountOrAddress,
|
|
183
170
|
rpcSchema
|
|
184
171
|
> {
|
|
185
|
-
const {
|
|
186
|
-
chain,
|
|
187
|
-
experimental_multisig,
|
|
188
|
-
feeToken,
|
|
189
|
-
testnet,
|
|
190
|
-
tokens,
|
|
191
|
-
transport,
|
|
192
|
-
...rest
|
|
193
|
-
} = parameters
|
|
172
|
+
const { chain, feeToken, testnet, tokens, transport, ...rest } = parameters
|
|
194
173
|
const baseChain = chain ?? (testnet ? tempoTestnet : tempo)
|
|
195
174
|
const resolvedChain =
|
|
196
175
|
feeToken && typeof (baseChain as { extend?: unknown }).extend === 'function'
|
|
@@ -198,20 +177,11 @@ export function createClient<
|
|
|
198
177
|
feeToken,
|
|
199
178
|
})
|
|
200
179
|
: baseChain
|
|
201
|
-
const transport_ = transport ?? http()
|
|
202
|
-
const resolvedTransport = experimental_multisig
|
|
203
|
-
? withMultisig(
|
|
204
|
-
transport_,
|
|
205
|
-
experimental_multisig === true
|
|
206
|
-
? { store: Store.memory() }
|
|
207
|
-
: experimental_multisig,
|
|
208
|
-
)
|
|
209
|
-
: transport_
|
|
210
180
|
return createClient_({
|
|
211
181
|
...rest,
|
|
212
182
|
chain: resolvedChain,
|
|
213
183
|
tokens: tokens ?? tokenSets.tempo,
|
|
214
|
-
transport:
|
|
184
|
+
transport: transport ?? http(),
|
|
215
185
|
} as ClientConfig_)
|
|
216
186
|
.extend(publicActions)
|
|
217
187
|
.extend(walletActions)
|
package/tempo/Decorator.ts
CHANGED
|
@@ -13,6 +13,7 @@ import * as feeActions from './actions/fee.js'
|
|
|
13
13
|
import * as multisigActions from './actions/multisig.js'
|
|
14
14
|
import * as nonceActions from './actions/nonce.js'
|
|
15
15
|
import * as policyActions from './actions/policy.js'
|
|
16
|
+
import * as propAmmActions from './actions/propAmm.js'
|
|
16
17
|
import * as receivePolicyActions from './actions/receivePolicy.js'
|
|
17
18
|
import * as rewardActions from './actions/reward.js'
|
|
18
19
|
import * as simulateActions from './actions/simulate.js'
|
|
@@ -3015,6 +3016,228 @@ type DecoratorBase<
|
|
|
3015
3016
|
parameters: policyActions.watchBlacklistUpdated.Parameters,
|
|
3016
3017
|
) => () => void
|
|
3017
3018
|
}
|
|
3019
|
+
propAmm: {
|
|
3020
|
+
/**
|
|
3021
|
+
* Reads the base token of a propAMM pool.
|
|
3022
|
+
*
|
|
3023
|
+
* @example
|
|
3024
|
+
* ```ts
|
|
3025
|
+
* import { createClient, http } from 'viem'
|
|
3026
|
+
* import { tempo } from 'viem/chains'
|
|
3027
|
+
* import { tempoActions } from 'viem/tempo'
|
|
3028
|
+
*
|
|
3029
|
+
* const client = createClient({ chain: tempo, transport: http() }).extend(tempoActions())
|
|
3030
|
+
*
|
|
3031
|
+
* const base = await client.propAmm.baseToken({ pool: '0x...' })
|
|
3032
|
+
* ```
|
|
3033
|
+
*
|
|
3034
|
+
* @param parameters - Pool and read options.
|
|
3035
|
+
* @returns The base token address.
|
|
3036
|
+
*/
|
|
3037
|
+
baseToken: (
|
|
3038
|
+
parameters: propAmmActions.baseToken.Parameters,
|
|
3039
|
+
) => Promise<propAmmActions.baseToken.ReturnValue>
|
|
3040
|
+
/**
|
|
3041
|
+
* Quotes an exact input or output for a caller, recipient, and customer route.
|
|
3042
|
+
*
|
|
3043
|
+
* @example
|
|
3044
|
+
* ```ts
|
|
3045
|
+
* import { createClient, http } from 'viem'
|
|
3046
|
+
* import { tempo } from 'viem/chains'
|
|
3047
|
+
* import { tempoActions } from 'viem/tempo'
|
|
3048
|
+
*
|
|
3049
|
+
* const client = createClient({ chain: tempo, transport: http() }).extend(tempoActions())
|
|
3050
|
+
*
|
|
3051
|
+
* const { amountOut, price, updatedAt } = await client.propAmm.getSwapQuote({
|
|
3052
|
+
* amountIn: 1_000_000n,
|
|
3053
|
+
* mode: 'exactInput',
|
|
3054
|
+
* pool: '0x...',
|
|
3055
|
+
* recipient: '0x...',
|
|
3056
|
+
* taker: '0x...',
|
|
3057
|
+
* })
|
|
3058
|
+
* ```
|
|
3059
|
+
*
|
|
3060
|
+
* @param parameters - Route, swap mode, amount, and read options.
|
|
3061
|
+
* @returns Quoted amount, oracle observation, rounding credit, and swap request.
|
|
3062
|
+
*/
|
|
3063
|
+
getSwapQuote: <
|
|
3064
|
+
const parameters extends propAmmActions.getSwapQuote.Parameters,
|
|
3065
|
+
>(
|
|
3066
|
+
parameters: parameters,
|
|
3067
|
+
) => Promise<propAmmActions.getSwapQuote.ReturnValue<parameters>>
|
|
3068
|
+
/**
|
|
3069
|
+
* Reads whether a propAMM pool is paused.
|
|
3070
|
+
*
|
|
3071
|
+
* @example
|
|
3072
|
+
* ```ts
|
|
3073
|
+
* import { createClient, http } from 'viem'
|
|
3074
|
+
* import { tempo } from 'viem/chains'
|
|
3075
|
+
* import { tempoActions } from 'viem/tempo'
|
|
3076
|
+
*
|
|
3077
|
+
* const client = createClient({ chain: tempo, transport: http() }).extend(tempoActions())
|
|
3078
|
+
*
|
|
3079
|
+
* const paused = await client.propAmm.paused({ pool: '0x...' })
|
|
3080
|
+
* ```
|
|
3081
|
+
*
|
|
3082
|
+
* @param parameters - Pool and read options.
|
|
3083
|
+
* @returns Whether swaps are paused.
|
|
3084
|
+
*/
|
|
3085
|
+
paused: (
|
|
3086
|
+
parameters: propAmmActions.paused.Parameters,
|
|
3087
|
+
) => Promise<propAmmActions.paused.ReturnValue>
|
|
3088
|
+
/**
|
|
3089
|
+
* Reads whether a resolved address may receive swap output.
|
|
3090
|
+
*
|
|
3091
|
+
* @example
|
|
3092
|
+
* ```ts
|
|
3093
|
+
* import { createClient, http } from 'viem'
|
|
3094
|
+
* import { tempo } from 'viem/chains'
|
|
3095
|
+
* import { tempoActions } from 'viem/tempo'
|
|
3096
|
+
*
|
|
3097
|
+
* const client = createClient({ chain: tempo, transport: http() }).extend(tempoActions())
|
|
3098
|
+
*
|
|
3099
|
+
* const allowed = await client.propAmm.recipientAllowed({
|
|
3100
|
+
* pool: '0x...',
|
|
3101
|
+
* recipient: '0x...',
|
|
3102
|
+
* })
|
|
3103
|
+
* ```
|
|
3104
|
+
*
|
|
3105
|
+
* @param parameters - Pool, resolved recipient, and read options.
|
|
3106
|
+
* @returns Whether the recipient is allowed.
|
|
3107
|
+
*/
|
|
3108
|
+
recipientAllowed: (
|
|
3109
|
+
parameters: propAmmActions.recipientAllowed.Parameters,
|
|
3110
|
+
) => Promise<propAmmActions.recipientAllowed.ReturnValue>
|
|
3111
|
+
/**
|
|
3112
|
+
* Resolves a Tempo recipient to the address checked by the pool's allowlist.
|
|
3113
|
+
*
|
|
3114
|
+
* @example
|
|
3115
|
+
* ```ts
|
|
3116
|
+
* import { createClient, http } from 'viem'
|
|
3117
|
+
* import { tempo } from 'viem/chains'
|
|
3118
|
+
* import { tempoActions } from 'viem/tempo'
|
|
3119
|
+
*
|
|
3120
|
+
* const client = createClient({ chain: tempo, transport: http() }).extend(tempoActions())
|
|
3121
|
+
*
|
|
3122
|
+
* const resolved = await client.propAmm.resolveRecipient({
|
|
3123
|
+
* pool: '0x...',
|
|
3124
|
+
* recipient: '0x...',
|
|
3125
|
+
* })
|
|
3126
|
+
* ```
|
|
3127
|
+
*
|
|
3128
|
+
* @param parameters - Pool, recipient, and read options.
|
|
3129
|
+
* @returns The resolved recipient address.
|
|
3130
|
+
*/
|
|
3131
|
+
resolveRecipient: (
|
|
3132
|
+
parameters: propAmmActions.resolveRecipient.Parameters,
|
|
3133
|
+
) => Promise<propAmmActions.resolveRecipient.ReturnValue>
|
|
3134
|
+
/**
|
|
3135
|
+
* Reads the quote token of a propAMM pool.
|
|
3136
|
+
*
|
|
3137
|
+
* @example
|
|
3138
|
+
* ```ts
|
|
3139
|
+
* import { createClient, http } from 'viem'
|
|
3140
|
+
* import { tempo } from 'viem/chains'
|
|
3141
|
+
* import { tempoActions } from 'viem/tempo'
|
|
3142
|
+
*
|
|
3143
|
+
* const client = createClient({ chain: tempo, transport: http() }).extend(tempoActions())
|
|
3144
|
+
*
|
|
3145
|
+
* const quote = await client.propAmm.quoteToken({ pool: '0x...' })
|
|
3146
|
+
* ```
|
|
3147
|
+
*
|
|
3148
|
+
* @param parameters - Pool and read options.
|
|
3149
|
+
* @returns The quote token address.
|
|
3150
|
+
*/
|
|
3151
|
+
quoteToken: (
|
|
3152
|
+
parameters: propAmmActions.quoteToken.Parameters,
|
|
3153
|
+
) => Promise<propAmmActions.quoteToken.ReturnValue>
|
|
3154
|
+
/**
|
|
3155
|
+
* Approves the input token and swaps an exact input or output in one transaction.
|
|
3156
|
+
*
|
|
3157
|
+
* @example
|
|
3158
|
+
* ```ts
|
|
3159
|
+
* import { createClient, http } from 'viem'
|
|
3160
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
3161
|
+
* import { tempo } from 'viem/chains'
|
|
3162
|
+
* import { tempoActions } from 'viem/tempo'
|
|
3163
|
+
*
|
|
3164
|
+
* const client = createClient({
|
|
3165
|
+
* account: privateKeyToAccount('0x...'),
|
|
3166
|
+
* chain: tempo,
|
|
3167
|
+
* transport: http(),
|
|
3168
|
+
* }).extend(tempoActions())
|
|
3169
|
+
* const hash = await client.propAmm.swap({
|
|
3170
|
+
* amountIn: 1_000_000n,
|
|
3171
|
+
* expectedOraclePrice: 1_000_000_000_000_000_000n,
|
|
3172
|
+
* minAmountOut: 1_000_000n,
|
|
3173
|
+
* minimumOracleUpdatedAt: 1_799_999_000n,
|
|
3174
|
+
* mode: 'exactInput',
|
|
3175
|
+
* pool: '0x...',
|
|
3176
|
+
* })
|
|
3177
|
+
* ```
|
|
3178
|
+
*
|
|
3179
|
+
* @param parameters - Swap and transaction options.
|
|
3180
|
+
* @returns The transaction hash.
|
|
3181
|
+
*/
|
|
3182
|
+
swap: (
|
|
3183
|
+
parameters: propAmmActions.swap.Parameters<chain, account>,
|
|
3184
|
+
) => Promise<propAmmActions.swap.ReturnValue>
|
|
3185
|
+
/**
|
|
3186
|
+
* Approves the input token, swaps, and returns the confirmed trade and receipt.
|
|
3187
|
+
*
|
|
3188
|
+
* @example
|
|
3189
|
+
* ```ts
|
|
3190
|
+
* import { createClient, http } from 'viem'
|
|
3191
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
3192
|
+
* import { tempo } from 'viem/chains'
|
|
3193
|
+
* import { tempoActions } from 'viem/tempo'
|
|
3194
|
+
*
|
|
3195
|
+
* const client = createClient({
|
|
3196
|
+
* account: privateKeyToAccount('0x...'),
|
|
3197
|
+
* chain: tempo,
|
|
3198
|
+
* transport: http(),
|
|
3199
|
+
* }).extend(tempoActions())
|
|
3200
|
+
* const trade = await client.propAmm.swapSync({
|
|
3201
|
+
* amountOut: 1_000_000n,
|
|
3202
|
+
* baseToQuote: false,
|
|
3203
|
+
* expectedOraclePrice: 1_000_000_000_000_000_000n,
|
|
3204
|
+
* maxAmountIn: 1_010_000n,
|
|
3205
|
+
* minimumOracleUpdatedAt: 1_799_999_000n,
|
|
3206
|
+
* mode: 'exactOutput',
|
|
3207
|
+
* pool: '0x...',
|
|
3208
|
+
* })
|
|
3209
|
+
* ```
|
|
3210
|
+
*
|
|
3211
|
+
* @param parameters - Swap and transaction options.
|
|
3212
|
+
* @returns Confirmed trade data and receipt.
|
|
3213
|
+
*/
|
|
3214
|
+
swapSync: (
|
|
3215
|
+
parameters: propAmmActions.swapSync.Parameters<chain, account>,
|
|
3216
|
+
) => Promise<propAmmActions.swapSync.ReturnValue>
|
|
3217
|
+
/**
|
|
3218
|
+
* Reads whether an address may call swaps on a propAMM pool.
|
|
3219
|
+
*
|
|
3220
|
+
* @example
|
|
3221
|
+
* ```ts
|
|
3222
|
+
* import { createClient, http } from 'viem'
|
|
3223
|
+
* import { tempo } from 'viem/chains'
|
|
3224
|
+
* import { tempoActions } from 'viem/tempo'
|
|
3225
|
+
*
|
|
3226
|
+
* const client = createClient({ chain: tempo, transport: http() }).extend(tempoActions())
|
|
3227
|
+
*
|
|
3228
|
+
* const allowed = await client.propAmm.takerAllowed({
|
|
3229
|
+
* pool: '0x...',
|
|
3230
|
+
* taker: '0x...',
|
|
3231
|
+
* })
|
|
3232
|
+
* ```
|
|
3233
|
+
*
|
|
3234
|
+
* @param parameters - Pool, taker, and read options.
|
|
3235
|
+
* @returns Whether the taker is allowed.
|
|
3236
|
+
*/
|
|
3237
|
+
takerAllowed: (
|
|
3238
|
+
parameters: propAmmActions.takerAllowed.Parameters,
|
|
3239
|
+
) => Promise<propAmmActions.takerAllowed.ReturnValue>
|
|
3240
|
+
}
|
|
3018
3241
|
receivePolicy: {
|
|
3019
3242
|
/**
|
|
3020
3243
|
* Burns the funds backing a blocked receipt.
|
|
@@ -5774,9 +5997,7 @@ type BoundHelper<helper> = helper extends (
|
|
|
5774
5997
|
? (args: args) => returnType
|
|
5775
5998
|
: parameters extends [Client<any, any, any>]
|
|
5776
5999
|
? () => returnType
|
|
5777
|
-
:
|
|
5778
|
-
? (args: args) => returnType
|
|
5779
|
-
: () => returnType
|
|
6000
|
+
: helper
|
|
5780
6001
|
: never
|
|
5781
6002
|
|
|
5782
6003
|
type BoundActionHelpers<action> = (action extends { call: infer helper }
|
|
@@ -5879,6 +6100,10 @@ export type Decorator<
|
|
|
5879
6100
|
DecoratorBase<chain, account>['policy'],
|
|
5880
6101
|
typeof policyActions
|
|
5881
6102
|
>
|
|
6103
|
+
propAmm: DecorateNamespace<
|
|
6104
|
+
DecoratorBase<chain, account>['propAmm'],
|
|
6105
|
+
typeof propAmmActions
|
|
6106
|
+
>
|
|
5882
6107
|
receivePolicy: DecorateNamespace<
|
|
5883
6108
|
DecoratorBase<chain, account>['receivePolicy'],
|
|
5884
6109
|
typeof receivePolicyActions
|
|
@@ -6075,6 +6300,17 @@ export function decorator() {
|
|
|
6075
6300
|
'watchWhitelistUpdated',
|
|
6076
6301
|
'watchBlacklistUpdated',
|
|
6077
6302
|
]),
|
|
6303
|
+
propAmm: bindActions(client, propAmmActions, [
|
|
6304
|
+
'baseToken',
|
|
6305
|
+
'paused',
|
|
6306
|
+
'getSwapQuote',
|
|
6307
|
+
'quoteToken',
|
|
6308
|
+
'recipientAllowed',
|
|
6309
|
+
'resolveRecipient',
|
|
6310
|
+
'swap',
|
|
6311
|
+
'swapSync',
|
|
6312
|
+
'takerAllowed',
|
|
6313
|
+
]),
|
|
6078
6314
|
receivePolicy: bindActions(client, receivePolicyActions, [
|
|
6079
6315
|
'burn',
|
|
6080
6316
|
'burnSync',
|