@depup/viem 2.56.3-depup.0 → 2.56.9-depup.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 +92 -0
- package/README.md +4 -4
- package/_cjs/account-abstraction/actions/bundler/getUserOperation.js +3 -3
- package/_cjs/account-abstraction/actions/bundler/getUserOperation.js.map +1 -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/simulateCalls.js +6 -1
- package/_cjs/actions/public/simulateCalls.js.map +1 -1
- package/_cjs/chains/definitions/arc.js +19 -1
- package/_cjs/chains/definitions/arc.js.map +1 -1
- package/_cjs/chains/definitions/eCanna.js +23 -0
- package/_cjs/chains/definitions/eCanna.js.map +1 -0
- package/_cjs/chains/definitions/eCannaTestnet.js +24 -0
- package/_cjs/chains/definitions/eCannaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/hyveChain.js +29 -0
- package/_cjs/chains/definitions/hyveChain.js.map +1 -0
- package/_cjs/chains/definitions/rabbitChainTestnet.js +24 -0
- package/_cjs/chains/definitions/rabbitChainTestnet.js.map +1 -0
- package/_cjs/chains/definitions/robinhood.js +5 -1
- package/_cjs/chains/definitions/robinhood.js.map +1 -1
- package/_cjs/chains/definitions/tempo.js +8 -0
- package/_cjs/chains/definitions/tempo.js.map +1 -1
- package/_cjs/chains/definitions/tempoModerato.js +8 -0
- package/_cjs/chains/definitions/tempoModerato.js.map +1 -1
- package/_cjs/chains/definitions/whitechainSepolia.js +25 -1
- package/_cjs/chains/definitions/whitechainSepolia.js.map +1 -1
- package/_cjs/chains/definitions/xgrTestnet.js +26 -0
- package/_cjs/chains/definitions/xgrTestnet.js.map +1 -0
- package/_cjs/chains/definitions/zagros.js +33 -0
- package/_cjs/chains/definitions/zagros.js.map +1 -0
- package/_cjs/chains/index.js +24 -12
- package/_cjs/chains/index.js.map +1 -1
- 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.map +1 -1
- package/_cjs/linea/actions/estimateGas.js +10 -2
- package/_cjs/linea/actions/estimateGas.js.map +1 -1
- package/_cjs/op-stack/chains.js +3 -1
- package/_cjs/op-stack/chains.js.map +1 -1
- package/_cjs/tempo/Abis.js +1211 -32
- package/_cjs/tempo/Abis.js.map +1 -1
- package/_cjs/tempo/Account.js +21 -30
- package/_cjs/tempo/Account.js.map +1 -1
- package/_cjs/tempo/Addresses.js +3 -1
- package/_cjs/tempo/Addresses.js.map +1 -1
- package/_cjs/tempo/Decorator.js +12 -0
- package/_cjs/tempo/Decorator.js.map +1 -1
- package/_cjs/tempo/Multisig.js +14 -107
- package/_cjs/tempo/Multisig.js.map +1 -1
- package/_cjs/tempo/Selectors.js +7 -4
- package/_cjs/tempo/Selectors.js.map +1 -1
- package/_cjs/tempo/Transaction.js +5 -2
- package/_cjs/tempo/Transaction.js.map +1 -1
- package/_cjs/tempo/actions/accessKey.js +2 -1
- package/_cjs/tempo/actions/accessKey.js.map +1 -1
- package/_cjs/tempo/actions/earn/deployment.js +24 -6
- package/_cjs/tempo/actions/earn/deployment.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 -31
- package/_cjs/tempo/chainConfig.js.map +1 -1
- package/_cjs/tempo/multisig/Config.js +8 -4
- package/_cjs/tempo/multisig/Config.js.map +1 -1
- package/_cjs/tempo/multisig/Signature.js +11 -0
- package/_cjs/tempo/multisig/Signature.js.map +1 -0
- package/_cjs/tokens/definitions/cirbtc.js +1 -0
- package/_cjs/tokens/definitions/cirbtc.js.map +1 -1
- package/_cjs/tokens/definitions/eurc.js +2 -0
- package/_cjs/tokens/definitions/eurc.js.map +1 -1
- package/_cjs/tokens/definitions/usdc.js +2 -0
- package/_cjs/tokens/definitions/usdc.js.map +1 -1
- package/_cjs/utils/buildRequest.js +2 -0
- package/_cjs/utils/buildRequest.js.map +1 -1
- package/_cjs/utils/formatters/formatter.js.map +1 -1
- package/_cjs/utils/siwe/createSiweMessage.js +1 -1
- package/_cjs/utils/siwe/createSiweMessage.js.map +1 -1
- package/_cjs/utils/siwe/parseSiweMessage.js +1 -1
- package/_cjs/utils/siwe/parseSiweMessage.js.map +1 -1
- package/_esm/account-abstraction/actions/bundler/getUserOperation.js +3 -3
- package/_esm/account-abstraction/actions/bundler/getUserOperation.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/simulateCalls.js +7 -1
- package/_esm/actions/public/simulateCalls.js.map +1 -1
- package/_esm/chains/definitions/arc.js +19 -1
- package/_esm/chains/definitions/arc.js.map +1 -1
- package/_esm/chains/definitions/eCanna.js +20 -0
- package/_esm/chains/definitions/eCanna.js.map +1 -0
- package/_esm/chains/definitions/eCannaTestnet.js +21 -0
- package/_esm/chains/definitions/eCannaTestnet.js.map +1 -0
- package/_esm/chains/definitions/hyveChain.js +26 -0
- package/_esm/chains/definitions/hyveChain.js.map +1 -0
- package/_esm/chains/definitions/rabbitChainTestnet.js +21 -0
- package/_esm/chains/definitions/rabbitChainTestnet.js.map +1 -0
- package/_esm/chains/definitions/robinhood.js +5 -1
- package/_esm/chains/definitions/robinhood.js.map +1 -1
- package/_esm/chains/definitions/tempo.js +8 -0
- package/_esm/chains/definitions/tempo.js.map +1 -1
- package/_esm/chains/definitions/tempoModerato.js +8 -0
- package/_esm/chains/definitions/tempoModerato.js.map +1 -1
- package/_esm/chains/definitions/whitechainSepolia.js +25 -1
- package/_esm/chains/definitions/whitechainSepolia.js.map +1 -1
- package/_esm/chains/definitions/xgrTestnet.js +23 -0
- package/_esm/chains/definitions/xgrTestnet.js.map +1 -0
- package/_esm/chains/definitions/zagros.js +30 -0
- package/_esm/chains/definitions/zagros.js.map +1 -0
- package/_esm/chains/index.js +6 -0
- package/_esm/chains/index.js.map +1 -1
- 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.map +1 -1
- package/_esm/linea/actions/estimateGas.js +10 -2
- package/_esm/linea/actions/estimateGas.js.map +1 -1
- package/_esm/op-stack/chains.js +1 -0
- package/_esm/op-stack/chains.js.map +1 -1
- package/_esm/tempo/Abis.js +1214 -34
- package/_esm/tempo/Abis.js.map +1 -1
- package/_esm/tempo/Account.js +21 -30
- package/_esm/tempo/Account.js.map +1 -1
- package/_esm/tempo/Addresses.js +4 -0
- package/_esm/tempo/Addresses.js.map +1 -1
- package/_esm/tempo/Decorator.js +12 -0
- package/_esm/tempo/Decorator.js.map +1 -1
- package/_esm/tempo/Multisig.js +15 -111
- package/_esm/tempo/Multisig.js.map +1 -1
- package/_esm/tempo/Selectors.js +6 -3
- package/_esm/tempo/Selectors.js.map +1 -1
- package/_esm/tempo/Transaction.js +5 -2
- package/_esm/tempo/Transaction.js.map +1 -1
- package/_esm/tempo/actions/accessKey.js +2 -1
- package/_esm/tempo/actions/accessKey.js.map +1 -1
- package/_esm/tempo/actions/earn/deployment.js +24 -7
- package/_esm/tempo/actions/earn/deployment.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 +3 -31
- package/_esm/tempo/chainConfig.js.map +1 -1
- package/_esm/tempo/multisig/Config.js +10 -5
- package/_esm/tempo/multisig/Config.js.map +1 -1
- package/_esm/tempo/multisig/Signature.js +9 -0
- package/_esm/tempo/multisig/Signature.js.map +1 -0
- package/_esm/tokens/definitions/cirbtc.js +1 -0
- package/_esm/tokens/definitions/cirbtc.js.map +1 -1
- package/_esm/tokens/definitions/eurc.js +2 -0
- package/_esm/tokens/definitions/eurc.js.map +1 -1
- package/_esm/tokens/definitions/usdc.js +2 -0
- package/_esm/tokens/definitions/usdc.js.map +1 -1
- package/_esm/utils/buildRequest.js +7 -0
- package/_esm/utils/buildRequest.js.map +1 -1
- package/_esm/utils/formatters/formatter.js +1 -0
- package/_esm/utils/formatters/formatter.js.map +1 -1
- package/_esm/utils/siwe/createSiweMessage.js +1 -1
- package/_esm/utils/siwe/createSiweMessage.js.map +1 -1
- package/_esm/utils/siwe/parseSiweMessage.js +1 -1
- package/_esm/utils/siwe/parseSiweMessage.js.map +1 -1
- package/_types/account-abstraction/actions/bundler/getUserOperation.d.ts +9 -9
- package/_types/account-abstraction/actions/bundler/getUserOperation.d.ts.map +1 -1
- package/_types/account-abstraction/types/userOperation.d.ts +6 -3
- package/_types/account-abstraction/types/userOperation.d.ts.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/simulateCalls.d.ts.map +1 -1
- package/_types/celo/chainConfig.d.ts +6 -840
- package/_types/celo/chainConfig.d.ts.map +1 -1
- package/_types/celo/formatters.d.ts +4 -421
- package/_types/celo/formatters.d.ts.map +1 -1
- package/_types/chains/definitions/abstract.d.ts +4 -371
- package/_types/chains/definitions/abstract.d.ts.map +1 -1
- package/_types/chains/definitions/abstractTestnet.d.ts +4 -371
- package/_types/chains/definitions/abstractTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/ancient8.d.ts +3 -226
- package/_types/chains/definitions/ancient8.d.ts.map +1 -1
- package/_types/chains/definitions/ancient8Sepolia.d.ts +3 -226
- package/_types/chains/definitions/ancient8Sepolia.d.ts.map +1 -1
- package/_types/chains/definitions/arc.d.ts +13 -21
- package/_types/chains/definitions/arc.d.ts.map +1 -1
- package/_types/chains/definitions/base.d.ts +6 -452
- package/_types/chains/definitions/base.d.ts.map +1 -1
- package/_types/chains/definitions/baseGoerli.d.ts +3 -226
- package/_types/chains/definitions/baseGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/baseSepolia.d.ts +6 -452
- package/_types/chains/definitions/baseSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/battlechain.d.ts +4 -371
- package/_types/chains/definitions/battlechain.d.ts.map +1 -1
- package/_types/chains/definitions/battlechainTestnet.d.ts +4 -371
- package/_types/chains/definitions/battlechainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/blast.d.ts +3 -226
- package/_types/chains/definitions/blast.d.ts.map +1 -1
- package/_types/chains/definitions/bob.d.ts +3 -226
- package/_types/chains/definitions/bob.d.ts.map +1 -1
- package/_types/chains/definitions/bobSepolia.d.ts +3 -226
- package/_types/chains/definitions/bobSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/celo.d.ts +6 -840
- package/_types/chains/definitions/celo.d.ts.map +1 -1
- package/_types/chains/definitions/celoAlfajores.d.ts +6 -840
- package/_types/chains/definitions/celoAlfajores.d.ts.map +1 -1
- package/_types/chains/definitions/celoSepolia.d.ts +6 -840
- package/_types/chains/definitions/celoSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/codex.d.ts +3 -226
- package/_types/chains/definitions/codex.d.ts.map +1 -1
- package/_types/chains/definitions/codexTestnet.d.ts +3 -226
- package/_types/chains/definitions/codexTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/dchain.d.ts +3 -226
- package/_types/chains/definitions/dchain.d.ts.map +1 -1
- package/_types/chains/definitions/dchainTestnet.d.ts +3 -226
- package/_types/chains/definitions/dchainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/eCanna.d.ts +51 -0
- package/_types/chains/definitions/eCanna.d.ts.map +1 -0
- package/_types/chains/definitions/eCannaTestnet.d.ts +51 -0
- package/_types/chains/definitions/eCannaTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/elysiumTestnet.d.ts +3 -226
- package/_types/chains/definitions/elysiumTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/fraxtal.d.ts +3 -226
- package/_types/chains/definitions/fraxtal.d.ts.map +1 -1
- package/_types/chains/definitions/fraxtalTestnet.d.ts +3 -226
- package/_types/chains/definitions/fraxtalTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/funkiMainnet.d.ts +3 -226
- package/_types/chains/definitions/funkiMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/funkiSepolia.d.ts +3 -226
- package/_types/chains/definitions/funkiSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/garnet.d.ts +3 -226
- package/_types/chains/definitions/garnet.d.ts.map +1 -1
- package/_types/chains/definitions/giwaSepolia.d.ts +6 -452
- package/_types/chains/definitions/giwaSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/hyveChain.d.ts +49 -0
- package/_types/chains/definitions/hyveChain.d.ts.map +1 -0
- package/_types/chains/definitions/ink.d.ts +3 -226
- package/_types/chains/definitions/ink.d.ts.map +1 -1
- package/_types/chains/definitions/inkSepolia.d.ts +3 -226
- package/_types/chains/definitions/inkSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/lisk.d.ts +3 -226
- package/_types/chains/definitions/lisk.d.ts.map +1 -1
- package/_types/chains/definitions/liskSepolia.d.ts +3 -226
- package/_types/chains/definitions/liskSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/megaeth.d.ts +3 -226
- package/_types/chains/definitions/megaeth.d.ts.map +1 -1
- package/_types/chains/definitions/metalL2.d.ts +3 -226
- package/_types/chains/definitions/metalL2.d.ts.map +1 -1
- package/_types/chains/definitions/mode.d.ts +3 -226
- package/_types/chains/definitions/mode.d.ts.map +1 -1
- package/_types/chains/definitions/modeTestnet.d.ts +3 -226
- package/_types/chains/definitions/modeTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/optimism.d.ts +3 -226
- package/_types/chains/definitions/optimism.d.ts.map +1 -1
- package/_types/chains/definitions/optimismGoerli.d.ts +3 -226
- package/_types/chains/definitions/optimismGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/optimismSepolia.d.ts +3 -226
- package/_types/chains/definitions/optimismSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/pgn.d.ts +3 -226
- package/_types/chains/definitions/pgn.d.ts.map +1 -1
- package/_types/chains/definitions/pgnTestnet.d.ts +3 -226
- package/_types/chains/definitions/pgnTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/playfiAlbireo.d.ts +4 -371
- package/_types/chains/definitions/playfiAlbireo.d.ts.map +1 -1
- package/_types/chains/definitions/pyrope.d.ts +3 -226
- package/_types/chains/definitions/pyrope.d.ts.map +1 -1
- package/_types/chains/definitions/rabbitChainTestnet.d.ts +51 -0
- package/_types/chains/definitions/rabbitChainTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/redstone.d.ts +3 -226
- package/_types/chains/definitions/redstone.d.ts.map +1 -1
- package/_types/chains/definitions/robinhood.d.ts +2 -1
- package/_types/chains/definitions/robinhood.d.ts.map +1 -1
- package/_types/chains/definitions/rss3.d.ts +3 -226
- package/_types/chains/definitions/rss3.d.ts.map +1 -1
- package/_types/chains/definitions/rss3Sepolia.d.ts +3 -226
- package/_types/chains/definitions/rss3Sepolia.d.ts.map +1 -1
- package/_types/chains/definitions/shape.d.ts +3 -226
- package/_types/chains/definitions/shape.d.ts.map +1 -1
- package/_types/chains/definitions/shapeSepolia.d.ts +3 -226
- package/_types/chains/definitions/shapeSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/snax.d.ts +3 -226
- package/_types/chains/definitions/snax.d.ts.map +1 -1
- package/_types/chains/definitions/snaxTestnet.d.ts +3 -226
- package/_types/chains/definitions/snaxTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/soneium.d.ts +3 -226
- package/_types/chains/definitions/soneium.d.ts.map +1 -1
- package/_types/chains/definitions/soneiumMinato.d.ts +3 -226
- package/_types/chains/definitions/soneiumMinato.d.ts.map +1 -1
- package/_types/chains/definitions/sophon.d.ts +4 -371
- package/_types/chains/definitions/sophon.d.ts.map +1 -1
- package/_types/chains/definitions/sophonTestnet.d.ts +4 -371
- package/_types/chains/definitions/sophonTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/superseed.d.ts +3 -226
- package/_types/chains/definitions/superseed.d.ts.map +1 -1
- package/_types/chains/definitions/superseedSepolia.d.ts +3 -226
- package/_types/chains/definitions/superseedSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/swellchain.d.ts +3 -226
- package/_types/chains/definitions/swellchain.d.ts.map +1 -1
- package/_types/chains/definitions/swellchainTestnet.d.ts +3 -226
- package/_types/chains/definitions/swellchainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/tempo.d.ts +22 -921
- package/_types/chains/definitions/tempo.d.ts.map +1 -1
- package/_types/chains/definitions/tempoDevnet.d.ts +6 -912
- package/_types/chains/definitions/tempoDevnet.d.ts.map +1 -1
- package/_types/chains/definitions/tempoLocalnet.d.ts +6 -912
- package/_types/chains/definitions/tempoLocalnet.d.ts.map +1 -1
- package/_types/chains/definitions/tempoModerato.d.ts +22 -921
- package/_types/chains/definitions/tempoModerato.d.ts.map +1 -1
- package/_types/chains/definitions/treasure.d.ts +4 -371
- package/_types/chains/definitions/treasure.d.ts.map +1 -1
- package/_types/chains/definitions/treasureTopaz.d.ts +4 -371
- package/_types/chains/definitions/treasureTopaz.d.ts.map +1 -1
- package/_types/chains/definitions/unichain.d.ts +3 -226
- package/_types/chains/definitions/unichain.d.ts.map +1 -1
- package/_types/chains/definitions/unichainSepolia.d.ts +3 -226
- package/_types/chains/definitions/unichainSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/whitechainSepolia.d.ts +58 -4
- package/_types/chains/definitions/whitechainSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/worldchain.d.ts +3 -226
- package/_types/chains/definitions/worldchain.d.ts.map +1 -1
- package/_types/chains/definitions/worldchainSepolia.d.ts +3 -226
- package/_types/chains/definitions/worldchainSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/xgrTestnet.d.ts +51 -0
- package/_types/chains/definitions/xgrTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/zagros.d.ts +50 -0
- package/_types/chains/definitions/zagros.d.ts.map +1 -0
- package/_types/chains/definitions/zircuit.d.ts +3 -226
- package/_types/chains/definitions/zircuit.d.ts.map +1 -1
- package/_types/chains/definitions/zircuitGarfieldTestnet.d.ts +3 -226
- package/_types/chains/definitions/zircuitGarfieldTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/zksync.d.ts +4 -371
- package/_types/chains/definitions/zksync.d.ts.map +1 -1
- package/_types/chains/definitions/zksyncInMemoryNode.d.ts +4 -371
- package/_types/chains/definitions/zksyncInMemoryNode.d.ts.map +1 -1
- package/_types/chains/definitions/zksyncLocalCustomHyperchain.d.ts +4 -371
- package/_types/chains/definitions/zksyncLocalCustomHyperchain.d.ts.map +1 -1
- package/_types/chains/definitions/zksyncLocalHyperchain.d.ts +4 -371
- package/_types/chains/definitions/zksyncLocalHyperchain.d.ts.map +1 -1
- package/_types/chains/definitions/zksyncLocalNode.d.ts +4 -371
- package/_types/chains/definitions/zksyncLocalNode.d.ts.map +1 -1
- package/_types/chains/definitions/zksyncSepoliaTestnet.d.ts +4 -371
- package/_types/chains/definitions/zksyncSepoliaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/zora.d.ts +3 -226
- package/_types/chains/definitions/zora.d.ts.map +1 -1
- package/_types/chains/definitions/zoraSepolia.d.ts +3 -226
- package/_types/chains/definitions/zoraSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/zoraTestnet.d.ts +3 -226
- package/_types/chains/definitions/zoraTestnet.d.ts.map +1 -1
- package/_types/chains/index.d.ts +6 -0
- package/_types/chains/index.d.ts.map +1 -1
- 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 +1 -0
- package/_types/index.d.ts.map +1 -1
- package/_types/linea/actions/estimateGas.d.ts.map +1 -1
- package/_types/linea/types/rpc.d.ts +2 -2
- package/_types/linea/types/rpc.d.ts.map +1 -1
- package/_types/op-stack/chainConfig.d.ts +3 -226
- package/_types/op-stack/chainConfig.d.ts.map +1 -1
- package/_types/op-stack/chains.d.ts +1 -0
- package/_types/op-stack/chains.d.ts.map +1 -1
- package/_types/op-stack/formatters.d.ts +5 -228
- package/_types/op-stack/formatters.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/Account.d.ts +9 -3
- package/_types/tempo/Account.d.ts.map +1 -1
- package/_types/tempo/Addresses.d.ts +4 -0
- package/_types/tempo/Addresses.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/Multisig.d.ts.map +1 -1
- package/_types/tempo/Selectors.d.ts +6 -3
- package/_types/tempo/Selectors.d.ts.map +1 -1
- package/_types/tempo/Transaction.d.ts +16 -7
- package/_types/tempo/Transaction.d.ts.map +1 -1
- package/_types/tempo/actions/accessKey.d.ts +2 -2
- package/_types/tempo/actions/accessKey.d.ts.map +1 -1
- package/_types/tempo/actions/earn/deployment.d.ts +2 -3
- package/_types/tempo/actions/earn/deployment.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 +4 -459
- package/_types/tempo/chainConfig.d.ts.map +1 -1
- package/_types/tempo/multisig/Config.d.ts.map +1 -1
- package/_types/tempo/multisig/Signature.d.ts +4 -0
- package/_types/tempo/multisig/Signature.d.ts.map +1 -0
- package/_types/tokens/definitions/cirbtc.d.ts +1 -0
- package/_types/tokens/definitions/cirbtc.d.ts.map +1 -1
- package/_types/tokens/definitions/eurc.d.ts +2 -0
- package/_types/tokens/definitions/eurc.d.ts.map +1 -1
- package/_types/tokens/definitions/usdc.d.ts +2 -0
- package/_types/tokens/definitions/usdc.d.ts.map +1 -1
- package/_types/tokens/sets.d.ts +7 -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/buildRequest.d.ts.map +1 -1
- package/_types/utils/formatters/block.d.ts +1 -1
- package/_types/utils/formatters/formatter.d.ts +1 -2
- package/_types/utils/formatters/formatter.d.ts.map +1 -1
- package/_types/utils/formatters/transaction.d.ts +1 -1
- package/_types/utils/formatters/transactionReceipt.d.ts +1 -1
- package/_types/utils/formatters/transactionRequest.d.ts +1 -1
- package/_types/zksync/chainConfig.d.ts +4 -371
- package/_types/zksync/chainConfig.d.ts.map +1 -1
- package/_types/zksync/formatters.d.ts +6 -374
- package/_types/zksync/formatters.d.ts.map +1 -1
- package/account-abstraction/actions/bundler/getUserOperation.ts +9 -9
- package/account-abstraction/types/userOperation.ts +6 -3
- package/actions/index.ts +6 -0
- package/actions/public/getStorageValues.ts +93 -0
- package/actions/public/simulateBlocks.ts +13 -0
- package/actions/public/simulateCalls.ts +8 -1
- package/chains/definitions/arc.ts +19 -1
- package/chains/definitions/eCanna.ts +20 -0
- package/chains/definitions/eCannaTestnet.ts +21 -0
- package/chains/definitions/hyveChain.ts +26 -0
- package/chains/definitions/rabbitChainTestnet.ts +21 -0
- package/chains/definitions/robinhood.ts +5 -1
- package/chains/definitions/tempo.ts +8 -0
- package/chains/definitions/tempoModerato.ts +8 -0
- package/chains/definitions/whitechainSepolia.ts +26 -1
- package/chains/definitions/xgrTestnet.ts +23 -0
- package/chains/definitions/zagros.ts +30 -0
- package/chains/index.ts +6 -0
- package/changes.json +4 -4
- package/clients/decorators/public.ts +18 -0
- package/errors/version.ts +1 -1
- package/index.ts +5 -0
- package/linea/actions/estimateGas.ts +11 -1
- package/linea/types/rpc.ts +2 -1
- package/op-stack/chains.ts +1 -0
- package/package.json +8 -8
- package/tempo/Abis.ts +1218 -34
- package/tempo/Account.ts +32 -43
- package/tempo/Addresses.ts +5 -0
- package/tempo/Decorator.ts +239 -3
- package/tempo/Multisig.ts +19 -132
- package/tempo/Selectors.ts +10 -4
- package/tempo/Transaction.ts +24 -9
- package/tempo/actions/accessKey.ts +4 -3
- package/tempo/actions/earn/deployment.ts +24 -9
- package/tempo/actions/index.ts +1 -0
- package/tempo/actions/propAmm.ts +998 -0
- package/tempo/chainConfig.ts +3 -42
- package/tempo/multisig/Config.ts +15 -5
- package/tempo/multisig/Signature.ts +11 -0
- package/tokens/definitions/cirbtc.ts +1 -0
- package/tokens/definitions/eurc.ts +2 -0
- package/tokens/definitions/usdc.ts +2 -0
- package/types/eip1193.ts +20 -0
- package/utils/buildRequest.ts +6 -0
- package/utils/formatters/formatter.ts +4 -4
- package/utils/siwe/createSiweMessage.ts +1 -1
- package/utils/siwe/parseSiweMessage.ts +1 -1
package/tempo/Account.ts
CHANGED
|
@@ -24,7 +24,9 @@ import { keccak256 } from '../utils/hash/keccak256.js'
|
|
|
24
24
|
import { hashMessage } from '../utils/signature/hashMessage.js'
|
|
25
25
|
import { hashTypedData } from '../utils/signature/hashTypedData.js'
|
|
26
26
|
import type { SerializeTransactionFn } from '../utils/transaction/serializeTransaction.js'
|
|
27
|
+
import { nativeMultisigFactory } from './Addresses.js'
|
|
27
28
|
import type { KeyAuthorizationManager } from './KeyAuthorizationManager.js'
|
|
29
|
+
import { parseApproval } from './multisig/Signature.js'
|
|
28
30
|
import * as Transaction from './Transaction.js'
|
|
29
31
|
|
|
30
32
|
export type Account_base<source extends string = string> = RequiredBy<
|
|
@@ -284,7 +286,7 @@ export declare namespace fromSecp256k1 {
|
|
|
284
286
|
*
|
|
285
287
|
* Owners can be accounts or addresses directly, or weighted `{ owner, weight }`
|
|
286
288
|
* entries. Direct owners default to weight `1`, and `threshold` defaults to `1`.
|
|
287
|
-
* Local owner accounts are retained for signing,
|
|
289
|
+
* Local owner accounts are retained for signing, using primitive signatures.
|
|
288
290
|
* Configs containing only owner addresses require external approvals through
|
|
289
291
|
* `signatures`.
|
|
290
292
|
*
|
|
@@ -359,11 +361,13 @@ export function fromMultisig(value: fromMultisig.Parameters): MultisigAccount {
|
|
|
359
361
|
(() => {
|
|
360
362
|
if (typeof value === 'string') return value
|
|
361
363
|
if (value.address === undefined || value.address === 'infer')
|
|
362
|
-
return MultisigConfig.getAddress(config
|
|
364
|
+
return MultisigConfig.getAddress(config!, {
|
|
365
|
+
factory: nativeMultisigFactory,
|
|
366
|
+
})
|
|
363
367
|
return value.address
|
|
364
368
|
})(),
|
|
365
369
|
)
|
|
366
|
-
const ownerAccounts = (() => {
|
|
370
|
+
const ownerAccounts: LocalAccount[] = (() => {
|
|
367
371
|
if (!configInput) return []
|
|
368
372
|
return configInput.owners.flatMap((value) => {
|
|
369
373
|
const owner =
|
|
@@ -371,6 +375,12 @@ export function fromMultisig(value: fromMultisig.Parameters): MultisigAccount {
|
|
|
371
375
|
return typeof owner === 'string' ? [] : [parseAccount(owner)]
|
|
372
376
|
})
|
|
373
377
|
})()
|
|
378
|
+
if (
|
|
379
|
+
ownerAccounts.some(
|
|
380
|
+
(owner) => owner.source === 'multisig' || isAccessKeyAccount(owner),
|
|
381
|
+
)
|
|
382
|
+
)
|
|
383
|
+
throw new Error('Multisig owners must use primitive signatures.')
|
|
374
384
|
const owners =
|
|
375
385
|
config?.owners.flatMap(({ owner }) => {
|
|
376
386
|
const account = ownerAccounts.find((account) =>
|
|
@@ -403,7 +413,7 @@ export function fromMultisig(value: fromMultisig.Parameters): MultisigAccount {
|
|
|
403
413
|
throw new Error(
|
|
404
414
|
'A local owner account is required to approve a multisig transaction.',
|
|
405
415
|
)
|
|
406
|
-
if (owner.source !== 'root'
|
|
416
|
+
if (owner.source !== 'root')
|
|
407
417
|
throw new Error(
|
|
408
418
|
'A Tempo owner account is required to approve a multisig transaction.',
|
|
409
419
|
)
|
|
@@ -422,29 +432,16 @@ export function fromMultisig(value: fromMultisig.Parameters): MultisigAccount {
|
|
|
422
432
|
}
|
|
423
433
|
const payload = keccak256(await serializer(presign as never))
|
|
424
434
|
const simulation = request.multisigSimulation
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
if (!simulation)
|
|
429
|
-
throw new Error('A multisig config is required for local signing.')
|
|
430
|
-
const parentConfig = MultisigConfig.from(simulation.config)
|
|
431
|
-
const parentDigest = MultisigConfig.getSignPayload({
|
|
432
|
-
account: requestAccount,
|
|
433
|
-
config: parentConfig,
|
|
434
|
-
payload,
|
|
435
|
-
})
|
|
436
|
-
return SignatureEnvelope.serialize(
|
|
437
|
-
await signMultisig(account, {
|
|
438
|
-
payload: parentDigest,
|
|
439
|
-
}),
|
|
435
|
+
if (request.from && !Address.isEqual(request.from, address))
|
|
436
|
+
throw new Error(
|
|
437
|
+
'Multisig account does not match the transaction sender.',
|
|
440
438
|
)
|
|
441
|
-
}
|
|
442
439
|
|
|
443
440
|
const signature = await signMultisig(account, {
|
|
444
441
|
config: simulation?.config,
|
|
445
442
|
payload,
|
|
446
443
|
signatures: request.signatures?.map((signature) =>
|
|
447
|
-
|
|
444
|
+
parseApproval(signature),
|
|
448
445
|
),
|
|
449
446
|
})
|
|
450
447
|
return (await serializer(
|
|
@@ -494,9 +491,11 @@ export declare namespace fromMultisig {
|
|
|
494
491
|
/** Multisig owner account or address, optionally with an explicit weight. */
|
|
495
492
|
export type Owner =
|
|
496
493
|
| Address.Address
|
|
497
|
-
| LocalAccount
|
|
494
|
+
| (LocalAccount & { accessKeyAddress?: never; owners?: never })
|
|
498
495
|
| (Omit<MultisigConfig.Owner, 'owner'> & {
|
|
499
|
-
owner:
|
|
496
|
+
owner:
|
|
497
|
+
| Address.Address
|
|
498
|
+
| (LocalAccount & { accessKeyAddress?: never; owners?: never })
|
|
500
499
|
})
|
|
501
500
|
|
|
502
501
|
/** Parameters for {@link fromMultisig}. */
|
|
@@ -523,7 +522,7 @@ async function signMultisig(
|
|
|
523
522
|
parameters: {
|
|
524
523
|
config?: MultisigConfig.Config | undefined
|
|
525
524
|
payload: Hex.Hex
|
|
526
|
-
signatures?: readonly SignatureEnvelope.
|
|
525
|
+
signatures?: readonly SignatureEnvelope.Primitive[] | undefined
|
|
527
526
|
},
|
|
528
527
|
): Promise<SignatureEnvelope.Multisig> {
|
|
529
528
|
const { config, payload, signatures: providedSignatures = [] } = parameters
|
|
@@ -558,6 +557,7 @@ async function signMultisig(
|
|
|
558
557
|
a.owner.toLowerCase().localeCompare(b.owner.toLowerCase()),
|
|
559
558
|
)
|
|
560
559
|
for (const owner of owners) {
|
|
560
|
+
if (weight >= Number(currentConfig.threshold)) break
|
|
561
561
|
const address = owner.owner.toLowerCase() as Address.Address
|
|
562
562
|
if (signedOwners.has(address)) continue
|
|
563
563
|
const ownerAccount = account.owners.find((account) =>
|
|
@@ -565,19 +565,9 @@ async function signMultisig(
|
|
|
565
565
|
)
|
|
566
566
|
if (!ownerAccount) continue
|
|
567
567
|
|
|
568
|
-
if (
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
payload: digest,
|
|
572
|
-
}),
|
|
573
|
-
)
|
|
574
|
-
} else {
|
|
575
|
-
if (!ownerAccount.sign)
|
|
576
|
-
throw new Error('Multisig owner account cannot sign.')
|
|
577
|
-
signatures.push(
|
|
578
|
-
SignatureEnvelope.from(await ownerAccount.sign({ hash: digest })),
|
|
579
|
-
)
|
|
580
|
-
}
|
|
568
|
+
if (!ownerAccount.sign)
|
|
569
|
+
throw new Error('Multisig owner account cannot sign.')
|
|
570
|
+
signatures.push(parseApproval(await ownerAccount.sign({ hash: digest })))
|
|
581
571
|
|
|
582
572
|
signedOwners.add(address)
|
|
583
573
|
weight += Number(owner.weight)
|
|
@@ -856,9 +846,7 @@ export async function signKeyAuthorization(
|
|
|
856
846
|
await signMultisig(account, {
|
|
857
847
|
config: multisigState.config,
|
|
858
848
|
payload: hash,
|
|
859
|
-
signatures: signatures?.map((signature) =>
|
|
860
|
-
SignatureEnvelope.from(signature),
|
|
861
|
-
),
|
|
849
|
+
signatures: signatures?.map((signature) => parseApproval(signature)),
|
|
862
850
|
}),
|
|
863
851
|
)
|
|
864
852
|
}
|
|
@@ -982,16 +970,17 @@ function fromBase(parameters: fromBase.Parameters): Account_base {
|
|
|
982
970
|
// primitive signature over the multisig owner approval digest, instead of
|
|
983
971
|
// a full serialized transaction. Approvals are combined later in
|
|
984
972
|
// `sendTransaction({ signatures })`.
|
|
985
|
-
const { multisigSimulation } = transaction as {
|
|
973
|
+
const { multisigSimulation, from } = transaction as {
|
|
974
|
+
from?: Address.Address
|
|
986
975
|
multisigSimulation?: {
|
|
987
|
-
account: Address.Address
|
|
988
976
|
config: MultisigConfig.Config
|
|
989
977
|
}
|
|
990
978
|
}
|
|
991
979
|
if (multisigSimulation) {
|
|
980
|
+
if (!from) throw new Error('A multisig sender is required for signing.')
|
|
992
981
|
const config = MultisigConfig.from(multisigSimulation.config)
|
|
993
982
|
const digest = MultisigConfig.getSignPayload({
|
|
994
|
-
account:
|
|
983
|
+
account: from,
|
|
995
984
|
config,
|
|
996
985
|
payload,
|
|
997
986
|
})
|
package/tempo/Addresses.ts
CHANGED
|
@@ -12,8 +12,13 @@ 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'
|
|
19
|
+
/** Temporary recovery factory until the production address is finalized. */
|
|
20
|
+
export const nativeMultisigFactory =
|
|
21
|
+
'0x7171717171717171717171717171717171717171'
|
|
17
22
|
export const nonceManager = '0x4e4F4E4345000000000000000000000000000000'
|
|
18
23
|
export const pathUsd = '0x20c0000000000000000000000000000000000000'
|
|
19
24
|
export const receivePolicyGuard = '0xB10C000000000000000000000000000000000000'
|
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',
|