viem 2.18.8 → 2.19.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +34 -0
- package/README.md +1 -1
- package/_cjs/account-abstraction/errors/bundler.js +36 -216
- package/_cjs/account-abstraction/errors/bundler.js.map +1 -1
- package/_cjs/account-abstraction/errors/userOperation.js +5 -26
- package/_cjs/account-abstraction/errors/userOperation.js.map +1 -1
- package/_cjs/accounts/index.js +3 -1
- package/_cjs/accounts/index.js.map +1 -1
- package/_cjs/accounts/privateKeyToAccount.js +4 -0
- package/_cjs/accounts/privateKeyToAccount.js.map +1 -1
- package/_cjs/accounts/toAccount.js +1 -0
- package/_cjs/accounts/toAccount.js.map +1 -1
- package/_cjs/accounts/utils/signAuthorization.js +22 -0
- package/_cjs/accounts/utils/signAuthorization.js.map +1 -0
- package/_cjs/actions/public/estimateGas.js +48 -10
- package/_cjs/actions/public/estimateGas.js.map +1 -1
- package/_cjs/actions/public/simulateContract.js.map +1 -1
- package/_cjs/actions/wallet/prepareTransactionRequest.js.map +1 -1
- package/_cjs/actions/wallet/sendTransaction.js +21 -3
- package/_cjs/actions/wallet/sendTransaction.js.map +1 -1
- package/_cjs/actions/wallet/writeContract.js.map +1 -1
- package/_cjs/chains/definitions/abstractTestnet.js +2 -0
- package/_cjs/chains/definitions/abstractTestnet.js.map +1 -1
- package/_cjs/chains/definitions/{zkSync.js → zksync.js} +6 -5
- package/_cjs/chains/definitions/{zkSync.js.map → zksync.js.map} +1 -1
- package/_cjs/chains/definitions/{zkSyncInMemoryNode.js → zksyncInMemoryNode.js} +4 -4
- package/_cjs/chains/definitions/{zkSyncInMemoryNode.js.map → zksyncInMemoryNode.js.map} +1 -1
- package/_cjs/chains/definitions/{zkSyncLocalNode.js → zksyncLocalNode.js} +4 -4
- package/_cjs/chains/definitions/{zkSyncLocalNode.js.map → zksyncLocalNode.js.map} +1 -1
- package/_cjs/chains/definitions/{zkSyncSepoliaTestnet.js → zksyncSepoliaTestnet.js} +7 -5
- package/_cjs/chains/definitions/zksyncSepoliaTestnet.js.map +1 -0
- package/_cjs/chains/index.js +13 -11
- package/_cjs/chains/index.js.map +1 -1
- package/_cjs/errors/abi.js +32 -163
- package/_cjs/errors/abi.js.map +1 -1
- package/_cjs/errors/account.js +2 -12
- package/_cjs/errors/account.js.map +1 -1
- package/_cjs/errors/address.js +1 -6
- package/_cjs/errors/address.js.map +1 -1
- package/_cjs/errors/base.js +29 -18
- package/_cjs/errors/base.js.map +1 -1
- package/_cjs/errors/blob.js +4 -25
- package/_cjs/errors/blob.js.map +1 -1
- package/_cjs/errors/block.js +1 -7
- package/_cjs/errors/block.js.map +1 -1
- package/_cjs/errors/ccip.js +3 -18
- package/_cjs/errors/ccip.js.map +1 -1
- package/_cjs/errors/chain.js +7 -31
- package/_cjs/errors/chain.js.map +1 -1
- package/_cjs/errors/contract.js +6 -37
- package/_cjs/errors/contract.js.map +1 -1
- package/_cjs/errors/cursor.js +4 -20
- package/_cjs/errors/cursor.js.map +1 -1
- package/_cjs/errors/data.js +3 -21
- package/_cjs/errors/data.js.map +1 -1
- package/_cjs/errors/eip712.js +1 -6
- package/_cjs/errors/eip712.js.map +1 -1
- package/_cjs/errors/encoding.js +6 -34
- package/_cjs/errors/encoding.js.map +1 -1
- package/_cjs/errors/ens.js +5 -26
- package/_cjs/errors/ens.js.map +1 -1
- package/_cjs/errors/estimateGas.js +1 -6
- package/_cjs/errors/estimateGas.js.map +1 -1
- package/_cjs/errors/fee.js +5 -19
- package/_cjs/errors/fee.js.map +1 -1
- package/_cjs/errors/log.js +2 -6
- package/_cjs/errors/log.js.map +1 -1
- package/_cjs/errors/node.js +12 -75
- package/_cjs/errors/node.js.map +1 -1
- package/_cjs/errors/request.js +5 -30
- package/_cjs/errors/request.js.map +1 -1
- package/_cjs/errors/rpc.js +22 -122
- package/_cjs/errors/rpc.js.map +1 -1
- package/_cjs/errors/siwe.js +1 -7
- package/_cjs/errors/siwe.js.map +1 -1
- package/_cjs/errors/stateOverride.js +4 -12
- package/_cjs/errors/stateOverride.js.map +1 -1
- package/_cjs/errors/transaction.js +15 -63
- package/_cjs/errors/transaction.js.map +1 -1
- package/_cjs/errors/transport.js +1 -0
- package/_cjs/errors/transport.js.map +1 -1
- package/_cjs/errors/utils.js +1 -4
- package/_cjs/errors/utils.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/experimental/eip5792/decorators/eip5792.js +2 -2
- package/_cjs/experimental/eip5792/decorators/eip5792.js.map +1 -1
- package/_cjs/experimental/eip7702/actions/signAuthorization.js +41 -0
- package/_cjs/experimental/eip7702/actions/signAuthorization.js.map +1 -0
- package/_cjs/experimental/eip7702/decorators/eip7702.js +12 -0
- package/_cjs/experimental/eip7702/decorators/eip7702.js.map +1 -0
- package/_cjs/experimental/eip7702/types/authorization.js +3 -0
- package/_cjs/experimental/eip7702/types/authorization.js.map +1 -0
- package/_cjs/experimental/eip7702/types/rpc.js +3 -0
- package/_cjs/experimental/eip7702/types/rpc.js.map +1 -0
- package/_cjs/experimental/eip7702/utils/hashAuthorization.js +23 -0
- package/_cjs/experimental/eip7702/utils/hashAuthorization.js.map +1 -0
- package/_cjs/experimental/eip7702/utils/recoverAuthorizationAddress.js +13 -0
- package/_cjs/experimental/eip7702/utils/recoverAuthorizationAddress.js.map +1 -0
- package/_cjs/experimental/eip7702/utils/serializeAuthorizationList.js +21 -0
- package/_cjs/experimental/eip7702/utils/serializeAuthorizationList.js.map +1 -0
- package/_cjs/experimental/eip7702/utils/verifyAuthorization.js +13 -0
- package/_cjs/experimental/eip7702/utils/verifyAuthorization.js.map +1 -0
- package/_cjs/experimental/erc7715/decorators/erc7715.js +2 -2
- package/_cjs/experimental/erc7715/decorators/erc7715.js.map +1 -1
- package/_cjs/experimental/index.js +22 -8
- package/_cjs/experimental/index.js.map +1 -1
- package/_cjs/index.js +7 -6
- package/_cjs/index.js.map +1 -1
- package/_cjs/op-stack/errors/withdrawal.js +2 -14
- package/_cjs/op-stack/errors/withdrawal.js.map +1 -1
- package/_cjs/utils/formatters/transaction.js +19 -0
- package/_cjs/utils/formatters/transaction.js.map +1 -1
- package/_cjs/utils/formatters/transactionRequest.js +19 -0
- package/_cjs/utils/formatters/transactionRequest.js.map +1 -1
- package/_cjs/utils/transaction/assertTransaction.js +15 -3
- package/_cjs/utils/transaction/assertTransaction.js.map +1 -1
- package/_cjs/utils/transaction/getSerializedTransactionType.js +2 -0
- package/_cjs/utils/transaction/getSerializedTransactionType.js.map +1 -1
- package/_cjs/utils/transaction/getTransactionType.js +2 -0
- package/_cjs/utils/transaction/getTransactionType.js.map +1 -1
- package/_cjs/utils/transaction/parseTransaction.js +70 -0
- package/_cjs/utils/transaction/parseTransaction.js.map +1 -1
- package/_cjs/utils/transaction/serializeTransaction.js +25 -0
- package/_cjs/utils/transaction/serializeTransaction.js.map +1 -1
- package/_cjs/zksync/chains.js +9 -7
- package/_cjs/zksync/chains.js.map +1 -1
- package/_cjs/zksync/errors/bytecode.js +3 -21
- package/_cjs/zksync/errors/bytecode.js.map +1 -1
- package/_cjs/zksync/errors/token-is-eth.js +1 -7
- package/_cjs/zksync/errors/token-is-eth.js.map +1 -1
- package/_cjs/zksync/errors/transaction.js +1 -7
- package/_cjs/zksync/errors/transaction.js.map +1 -1
- package/_cjs/zksync/index.js +9 -4
- package/_cjs/zksync/index.js.map +1 -1
- package/_cjs/zksync/utils/getEip712Domain.js +1 -1
- package/_cjs/zksync/utils/isEip712Transaction.js.map +1 -1
- package/_esm/account-abstraction/errors/bundler.js +36 -216
- package/_esm/account-abstraction/errors/bundler.js.map +1 -1
- package/_esm/account-abstraction/errors/userOperation.js +5 -26
- package/_esm/account-abstraction/errors/userOperation.js.map +1 -1
- package/_esm/accounts/index.js +1 -0
- package/_esm/accounts/index.js.map +1 -1
- package/_esm/accounts/privateKeyToAccount.js +4 -0
- package/_esm/accounts/privateKeyToAccount.js.map +1 -1
- package/_esm/accounts/toAccount.js +1 -0
- package/_esm/accounts/toAccount.js.map +1 -1
- package/_esm/accounts/utils/signAuthorization.js +22 -0
- package/_esm/accounts/utils/signAuthorization.js.map +1 -0
- package/_esm/actions/public/estimateGas.js +55 -10
- package/_esm/actions/public/estimateGas.js.map +1 -1
- package/_esm/actions/public/simulateContract.js.map +1 -1
- package/_esm/actions/wallet/prepareTransactionRequest.js.map +1 -1
- package/_esm/actions/wallet/sendTransaction.js +25 -3
- package/_esm/actions/wallet/sendTransaction.js.map +1 -1
- package/_esm/actions/wallet/writeContract.js.map +1 -1
- package/_esm/chains/definitions/abstractTestnet.js +2 -0
- package/_esm/chains/definitions/abstractTestnet.js.map +1 -1
- package/_esm/chains/definitions/{zkSync.js → zksync.js} +5 -4
- package/_esm/chains/definitions/{zkSync.js.map → zksync.js.map} +1 -1
- package/_esm/chains/definitions/{zkSyncInMemoryNode.js → zksyncInMemoryNode.js} +3 -3
- package/_esm/chains/definitions/{zkSyncInMemoryNode.js.map → zksyncInMemoryNode.js.map} +1 -1
- package/_esm/chains/definitions/{zkSyncLocalNode.js → zksyncLocalNode.js} +3 -3
- package/_esm/chains/definitions/{zkSyncLocalNode.js.map → zksyncLocalNode.js.map} +1 -1
- package/_esm/chains/definitions/{zkSyncSepoliaTestnet.js → zksyncSepoliaTestnet.js} +6 -4
- package/_esm/chains/definitions/{zkSyncSepoliaTestnet.js.map → zksyncSepoliaTestnet.js.map} +1 -1
- package/_esm/chains/index.js +12 -5
- package/_esm/chains/index.js.map +1 -1
- package/_esm/errors/abi.js +32 -163
- package/_esm/errors/abi.js.map +1 -1
- package/_esm/errors/account.js +2 -12
- package/_esm/errors/account.js.map +1 -1
- package/_esm/errors/address.js +1 -6
- package/_esm/errors/address.js.map +1 -1
- package/_esm/errors/base.js +27 -17
- package/_esm/errors/base.js.map +1 -1
- package/_esm/errors/blob.js +4 -25
- package/_esm/errors/blob.js.map +1 -1
- package/_esm/errors/block.js +1 -7
- package/_esm/errors/block.js.map +1 -1
- package/_esm/errors/ccip.js +3 -18
- package/_esm/errors/ccip.js.map +1 -1
- package/_esm/errors/chain.js +7 -31
- package/_esm/errors/chain.js.map +1 -1
- package/_esm/errors/contract.js +6 -37
- package/_esm/errors/contract.js.map +1 -1
- package/_esm/errors/cursor.js +4 -20
- package/_esm/errors/cursor.js.map +1 -1
- package/_esm/errors/data.js +3 -21
- package/_esm/errors/data.js.map +1 -1
- package/_esm/errors/eip712.js +1 -6
- package/_esm/errors/eip712.js.map +1 -1
- package/_esm/errors/encoding.js +6 -34
- package/_esm/errors/encoding.js.map +1 -1
- package/_esm/errors/ens.js +5 -26
- package/_esm/errors/ens.js.map +1 -1
- package/_esm/errors/estimateGas.js +1 -6
- package/_esm/errors/estimateGas.js.map +1 -1
- package/_esm/errors/fee.js +5 -19
- package/_esm/errors/fee.js.map +1 -1
- package/_esm/errors/log.js +2 -6
- package/_esm/errors/log.js.map +1 -1
- package/_esm/errors/node.js +12 -75
- package/_esm/errors/node.js.map +1 -1
- package/_esm/errors/request.js +5 -30
- package/_esm/errors/request.js.map +1 -1
- package/_esm/errors/rpc.js +22 -122
- package/_esm/errors/rpc.js.map +1 -1
- package/_esm/errors/siwe.js +1 -7
- package/_esm/errors/siwe.js.map +1 -1
- package/_esm/errors/stateOverride.js +4 -12
- package/_esm/errors/stateOverride.js.map +1 -1
- package/_esm/errors/transaction.js +15 -63
- package/_esm/errors/transaction.js.map +1 -1
- package/_esm/errors/transport.js +1 -0
- package/_esm/errors/transport.js.map +1 -1
- package/_esm/errors/utils.js +0 -2
- package/_esm/errors/utils.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/experimental/eip5792/decorators/eip5792.js +3 -3
- package/_esm/experimental/eip5792/decorators/eip5792.js.map +1 -1
- package/_esm/experimental/eip7702/actions/signAuthorization.js +80 -0
- package/_esm/experimental/eip7702/actions/signAuthorization.js.map +1 -0
- package/_esm/experimental/eip7702/decorators/eip7702.js +24 -0
- package/_esm/experimental/eip7702/decorators/eip7702.js.map +1 -0
- package/_esm/experimental/eip7702/types/authorization.js +2 -0
- package/_esm/experimental/eip7702/types/authorization.js.map +1 -0
- package/_esm/experimental/eip7702/types/rpc.js +2 -0
- package/_esm/experimental/eip7702/types/rpc.js.map +1 -0
- package/_esm/experimental/eip7702/utils/hashAuthorization.js +23 -0
- package/_esm/experimental/eip7702/utils/hashAuthorization.js.map +1 -0
- package/_esm/experimental/eip7702/utils/recoverAuthorizationAddress.js +10 -0
- package/_esm/experimental/eip7702/utils/recoverAuthorizationAddress.js.map +1 -0
- package/_esm/experimental/eip7702/utils/serializeAuthorizationList.js +21 -0
- package/_esm/experimental/eip7702/utils/serializeAuthorizationList.js.map +1 -0
- package/_esm/experimental/eip7702/utils/verifyAuthorization.js +18 -0
- package/_esm/experimental/eip7702/utils/verifyAuthorization.js.map +1 -0
- package/_esm/experimental/erc7715/decorators/erc7715.js +3 -3
- package/_esm/experimental/erc7715/decorators/erc7715.js.map +1 -1
- package/_esm/experimental/index.js +16 -4
- package/_esm/experimental/index.js.map +1 -1
- package/_esm/index.js +1 -1
- package/_esm/index.js.map +1 -1
- package/_esm/op-stack/errors/withdrawal.js +2 -14
- package/_esm/op-stack/errors/withdrawal.js.map +1 -1
- package/_esm/utils/formatters/transaction.js +20 -0
- package/_esm/utils/formatters/transaction.js.map +1 -1
- package/_esm/utils/formatters/transactionRequest.js +20 -0
- package/_esm/utils/formatters/transactionRequest.js.map +1 -1
- package/_esm/utils/transaction/assertTransaction.js +14 -3
- package/_esm/utils/transaction/assertTransaction.js.map +1 -1
- package/_esm/utils/transaction/getSerializedTransactionType.js +2 -0
- package/_esm/utils/transaction/getSerializedTransactionType.js.map +1 -1
- package/_esm/utils/transaction/getTransactionType.js +2 -0
- package/_esm/utils/transaction/getTransactionType.js.map +1 -1
- package/_esm/utils/transaction/parseTransaction.js +71 -1
- package/_esm/utils/transaction/parseTransaction.js.map +1 -1
- package/_esm/utils/transaction/serializeTransaction.js +26 -1
- package/_esm/utils/transaction/serializeTransaction.js.map +1 -1
- package/_esm/zksync/actions/deployContract.js +1 -1
- package/_esm/zksync/actions/sendEip712Transaction.js +4 -4
- package/_esm/zksync/actions/sendTransaction.js +4 -4
- package/_esm/zksync/actions/signEip712Transaction.js +4 -4
- package/_esm/zksync/actions/signTransaction.js +4 -4
- package/_esm/zksync/chains.js +4 -3
- package/_esm/zksync/chains.js.map +1 -1
- package/_esm/zksync/errors/bytecode.js +3 -21
- package/_esm/zksync/errors/bytecode.js.map +1 -1
- package/_esm/zksync/errors/token-is-eth.js +1 -7
- package/_esm/zksync/errors/token-is-eth.js.map +1 -1
- package/_esm/zksync/errors/transaction.js +1 -7
- package/_esm/zksync/errors/transaction.js.map +1 -1
- package/_esm/zksync/index.js +9 -1
- package/_esm/zksync/index.js.map +1 -1
- package/_esm/zksync/utils/getEip712Domain.js +1 -1
- package/_esm/zksync/utils/isEip712Transaction.js.map +1 -1
- package/_types/account-abstraction/errors/bundler.d.ts +0 -36
- package/_types/account-abstraction/errors/bundler.d.ts.map +1 -1
- package/_types/account-abstraction/errors/userOperation.d.ts +0 -4
- package/_types/account-abstraction/errors/userOperation.d.ts.map +1 -1
- package/_types/accounts/index.d.ts +1 -0
- package/_types/accounts/index.d.ts.map +1 -1
- package/_types/accounts/privateKeyToAccount.d.ts.map +1 -1
- package/_types/accounts/toAccount.d.ts.map +1 -1
- package/_types/accounts/types.d.ts +7 -3
- package/_types/accounts/types.d.ts.map +1 -1
- package/_types/accounts/utils/signAuthorization.d.ts +20 -0
- package/_types/accounts/utils/signAuthorization.d.ts.map +1 -0
- package/_types/actions/public/estimateGas.d.ts +2 -1
- package/_types/actions/public/estimateGas.d.ts.map +1 -1
- package/_types/actions/public/simulateContract.d.ts +18 -6
- package/_types/actions/public/simulateContract.d.ts.map +1 -1
- package/_types/actions/wallet/prepareTransactionRequest.d.ts +2 -2
- package/_types/actions/wallet/prepareTransactionRequest.d.ts.map +1 -1
- package/_types/actions/wallet/sendTransaction.d.ts +2 -1
- package/_types/actions/wallet/sendTransaction.d.ts.map +1 -1
- package/_types/actions/wallet/writeContract.d.ts +3 -2
- package/_types/actions/wallet/writeContract.d.ts.map +1 -1
- package/_types/celo/chainConfig.d.ts +144 -20
- package/_types/celo/chainConfig.d.ts.map +1 -1
- package/_types/celo/formatters.d.ts +72 -10
- package/_types/celo/formatters.d.ts.map +1 -1
- package/_types/celo/serializers.d.ts +1 -1
- package/_types/celo/serializers.d.ts.map +1 -1
- package/_types/chains/definitions/abstractTestnet.d.ts +373 -3
- package/_types/chains/definitions/abstractTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/ancient8.d.ts +32 -0
- package/_types/chains/definitions/ancient8.d.ts.map +1 -1
- package/_types/chains/definitions/ancient8Sepolia.d.ts +32 -0
- package/_types/chains/definitions/ancient8Sepolia.d.ts.map +1 -1
- package/_types/chains/definitions/base.d.ts +32 -0
- package/_types/chains/definitions/base.d.ts.map +1 -1
- package/_types/chains/definitions/baseGoerli.d.ts +32 -0
- package/_types/chains/definitions/baseGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/baseSepolia.d.ts +32 -0
- package/_types/chains/definitions/baseSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/celo.d.ts +144 -20
- package/_types/chains/definitions/celo.d.ts.map +1 -1
- package/_types/chains/definitions/celoAlfajores.d.ts +144 -20
- package/_types/chains/definitions/celoAlfajores.d.ts.map +1 -1
- package/_types/chains/definitions/dchain.d.ts +32 -0
- package/_types/chains/definitions/dchain.d.ts.map +1 -1
- package/_types/chains/definitions/dchainTestnet.d.ts +32 -0
- package/_types/chains/definitions/dchainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/fraxtal.d.ts +32 -0
- package/_types/chains/definitions/fraxtal.d.ts.map +1 -1
- package/_types/chains/definitions/fraxtalTestnet.d.ts +32 -0
- package/_types/chains/definitions/fraxtalTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/funkiMainnet.d.ts +32 -0
- package/_types/chains/definitions/funkiMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/funkiSepolia.d.ts +32 -0
- package/_types/chains/definitions/funkiSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/lisk.d.ts +32 -0
- package/_types/chains/definitions/lisk.d.ts.map +1 -1
- package/_types/chains/definitions/liskSepolia.d.ts +32 -0
- package/_types/chains/definitions/liskSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/metalL2.d.ts +32 -0
- package/_types/chains/definitions/metalL2.d.ts.map +1 -1
- package/_types/chains/definitions/modeTestnet.d.ts +32 -0
- package/_types/chains/definitions/modeTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/optimism.d.ts +32 -0
- package/_types/chains/definitions/optimism.d.ts.map +1 -1
- package/_types/chains/definitions/optimismGoerli.d.ts +32 -0
- package/_types/chains/definitions/optimismGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/optimismSepolia.d.ts +32 -0
- package/_types/chains/definitions/optimismSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/pgn.d.ts +32 -0
- package/_types/chains/definitions/pgn.d.ts.map +1 -1
- package/_types/chains/definitions/pgnTestnet.d.ts +32 -0
- package/_types/chains/definitions/pgnTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/playfiAlbireo.d.ts +64 -10
- package/_types/chains/definitions/playfiAlbireo.d.ts.map +1 -1
- package/_types/chains/definitions/rss3.d.ts +32 -0
- package/_types/chains/definitions/rss3.d.ts.map +1 -1
- package/_types/chains/definitions/rss3Sepolia.d.ts +32 -0
- package/_types/chains/definitions/rss3Sepolia.d.ts.map +1 -1
- package/_types/chains/definitions/{zkSync.d.ts → zksync.d.ts} +69 -14
- package/_types/chains/definitions/{zkSync.d.ts.map → zksync.d.ts.map} +1 -1
- package/_types/chains/definitions/{zkSyncInMemoryNode.d.ts → zksyncInMemoryNode.d.ts} +67 -13
- package/_types/chains/definitions/{zkSyncInMemoryNode.d.ts.map → zksyncInMemoryNode.d.ts.map} +1 -1
- package/_types/chains/definitions/{zkSyncLocalNode.d.ts → zksyncLocalNode.d.ts} +67 -13
- package/_types/chains/definitions/{zkSyncLocalNode.d.ts.map → zksyncLocalNode.d.ts.map} +1 -1
- package/_types/chains/definitions/{zkSyncSepoliaTestnet.d.ts → zksyncSepoliaTestnet.d.ts} +70 -14
- package/_types/chains/definitions/{zkSyncSepoliaTestnet.d.ts.map → zksyncSepoliaTestnet.d.ts.map} +1 -1
- package/_types/chains/definitions/zora.d.ts +32 -0
- package/_types/chains/definitions/zora.d.ts.map +1 -1
- package/_types/chains/definitions/zoraSepolia.d.ts +32 -0
- package/_types/chains/definitions/zoraSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/zoraTestnet.d.ts +32 -0
- package/_types/chains/definitions/zoraTestnet.d.ts.map +1 -1
- package/_types/chains/index.d.ts +77 -10
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/errors/abi.d.ts +0 -26
- package/_types/errors/abi.d.ts.map +1 -1
- package/_types/errors/account.d.ts +0 -2
- package/_types/errors/account.d.ts.map +1 -1
- package/_types/errors/address.d.ts +0 -1
- package/_types/errors/address.d.ts.map +1 -1
- package/_types/errors/base.d.ts +7 -1
- package/_types/errors/base.d.ts.map +1 -1
- package/_types/errors/blob.d.ts +0 -4
- package/_types/errors/blob.d.ts.map +1 -1
- package/_types/errors/block.d.ts +0 -1
- package/_types/errors/block.d.ts.map +1 -1
- package/_types/errors/ccip.d.ts +0 -3
- package/_types/errors/ccip.d.ts.map +1 -1
- package/_types/errors/chain.d.ts +0 -5
- package/_types/errors/chain.d.ts.map +1 -1
- package/_types/errors/contract.d.ts +0 -6
- package/_types/errors/contract.d.ts.map +1 -1
- package/_types/errors/cursor.d.ts +0 -3
- package/_types/errors/cursor.d.ts.map +1 -1
- package/_types/errors/data.d.ts +0 -3
- package/_types/errors/data.d.ts.map +1 -1
- package/_types/errors/eip712.d.ts +0 -1
- package/_types/errors/eip712.d.ts.map +1 -1
- package/_types/errors/encoding.d.ts +0 -5
- package/_types/errors/encoding.d.ts.map +1 -1
- package/_types/errors/ens.d.ts +0 -4
- package/_types/errors/ens.d.ts.map +1 -1
- package/_types/errors/estimateGas.d.ts +0 -1
- package/_types/errors/estimateGas.d.ts.map +1 -1
- package/_types/errors/fee.d.ts +0 -3
- package/_types/errors/fee.d.ts.map +1 -1
- package/_types/errors/log.d.ts +0 -1
- package/_types/errors/log.d.ts.map +1 -1
- package/_types/errors/node.d.ts +0 -12
- package/_types/errors/node.d.ts.map +1 -1
- package/_types/errors/request.d.ts +0 -5
- package/_types/errors/request.d.ts.map +1 -1
- package/_types/errors/rpc.d.ts +2 -22
- package/_types/errors/rpc.d.ts.map +1 -1
- package/_types/errors/siwe.d.ts +0 -1
- package/_types/errors/siwe.d.ts.map +1 -1
- package/_types/errors/stateOverride.d.ts +0 -2
- package/_types/errors/stateOverride.d.ts.map +1 -1
- package/_types/errors/transaction.d.ts +0 -10
- package/_types/errors/transaction.d.ts.map +1 -1
- package/_types/errors/transport.d.ts.map +1 -1
- package/_types/errors/utils.d.ts +0 -1
- package/_types/errors/utils.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/experimental/eip5792/decorators/eip5792.d.ts +12 -12
- package/_types/experimental/eip5792/decorators/eip5792.d.ts.map +1 -1
- package/_types/experimental/eip7702/actions/signAuthorization.d.ts +59 -0
- package/_types/experimental/eip7702/actions/signAuthorization.d.ts.map +1 -0
- package/_types/experimental/eip7702/decorators/eip7702.d.ts +69 -0
- package/_types/experimental/eip7702/decorators/eip7702.d.ts.map +1 -0
- package/_types/experimental/eip7702/types/authorization.d.ts +24 -0
- package/_types/experimental/eip7702/types/authorization.d.ts.map +1 -0
- package/_types/experimental/eip7702/types/rpc.d.ts +12 -0
- package/_types/experimental/eip7702/types/rpc.d.ts.map +1 -0
- package/_types/experimental/eip7702/utils/hashAuthorization.d.ts +21 -0
- package/_types/experimental/eip7702/utils/hashAuthorization.d.ts.map +1 -0
- package/_types/experimental/eip7702/utils/recoverAuthorizationAddress.d.ts +26 -0
- package/_types/experimental/eip7702/utils/recoverAuthorizationAddress.d.ts.map +1 -0
- package/_types/experimental/eip7702/utils/serializeAuthorizationList.d.ts +6 -0
- package/_types/experimental/eip7702/utils/serializeAuthorizationList.d.ts.map +1 -0
- package/_types/experimental/eip7702/utils/verifyAuthorization.d.ts +21 -0
- package/_types/experimental/eip7702/utils/verifyAuthorization.d.ts.map +1 -0
- package/_types/experimental/erc7715/decorators/erc7715.d.ts +6 -6
- package/_types/experimental/erc7715/decorators/erc7715.d.ts.map +1 -1
- package/_types/experimental/index.d.ts +20 -4
- package/_types/experimental/index.d.ts.map +1 -1
- package/_types/index.d.ts +3 -3
- package/_types/index.d.ts.map +1 -1
- package/_types/op-stack/chainConfig.d.ts +32 -0
- package/_types/op-stack/chainConfig.d.ts.map +1 -1
- package/_types/op-stack/errors/withdrawal.d.ts +0 -2
- package/_types/op-stack/errors/withdrawal.d.ts.map +1 -1
- package/_types/op-stack/formatters.d.ts +32 -0
- package/_types/op-stack/formatters.d.ts.map +1 -1
- package/_types/op-stack/serializers.d.ts +1 -1
- package/_types/op-stack/serializers.d.ts.map +1 -1
- package/_types/types/rpc.d.ts +9 -4
- package/_types/types/rpc.d.ts.map +1 -1
- package/_types/types/transaction.d.ts +50 -36
- package/_types/types/transaction.d.ts.map +1 -1
- package/_types/types/utils.d.ts +0 -14
- package/_types/types/utils.d.ts.map +1 -1
- package/_types/utils/formatters/transaction.d.ts +2 -1
- package/_types/utils/formatters/transaction.d.ts.map +1 -1
- package/_types/utils/formatters/transactionRequest.d.ts +2 -1
- package/_types/utils/formatters/transactionRequest.d.ts.map +1 -1
- package/_types/utils/index.d.ts +1 -1
- package/_types/utils/index.d.ts.map +1 -1
- package/_types/utils/signature/hashMessage.d.ts +2 -2
- package/_types/utils/signature/hashMessage.d.ts.map +1 -1
- package/_types/utils/transaction/assertTransaction.d.ts +3 -1
- package/_types/utils/transaction/assertTransaction.d.ts.map +1 -1
- package/_types/utils/transaction/getSerializedTransactionType.d.ts +2 -2
- package/_types/utils/transaction/getSerializedTransactionType.d.ts.map +1 -1
- package/_types/utils/transaction/getTransactionType.d.ts +12 -5
- package/_types/utils/transaction/getTransactionType.d.ts.map +1 -1
- package/_types/utils/transaction/parseTransaction.d.ts +6 -4
- package/_types/utils/transaction/parseTransaction.d.ts.map +1 -1
- package/_types/utils/transaction/serializeTransaction.d.ts +4 -2
- package/_types/utils/transaction/serializeTransaction.d.ts.map +1 -1
- package/_types/zksync/actions/deployContract.d.ts +1 -1
- package/_types/zksync/actions/estimateFee.d.ts +4 -4
- package/_types/zksync/actions/estimateGasL1ToL2.d.ts +2 -2
- package/_types/zksync/actions/getAllBalances.d.ts +2 -2
- package/_types/zksync/actions/getBaseTokenL1Address.d.ts +2 -2
- package/_types/zksync/actions/getBlockDetails.d.ts +5 -5
- package/_types/zksync/actions/getBridgehubContractAddress.d.ts +2 -2
- package/_types/zksync/actions/getDefaultBridgeAddresses.d.ts +2 -2
- package/_types/zksync/actions/getL1BatchBlockRange.d.ts +2 -2
- package/_types/zksync/actions/getL1BatchDetails.d.ts +5 -5
- package/_types/zksync/actions/getL1BatchNumber.d.ts +2 -2
- package/_types/zksync/actions/getL1ChainId.d.ts +2 -2
- package/_types/zksync/actions/getLogProof.d.ts +2 -2
- package/_types/zksync/actions/getMainContractAddress.d.ts +2 -2
- package/_types/zksync/actions/getRawBlockTransactions.d.ts +6 -6
- package/_types/zksync/actions/getTestnetPaymasterAddress.d.ts +2 -2
- package/_types/zksync/actions/getTransactionDetails.d.ts +4 -4
- package/_types/zksync/actions/sendEip712Transaction.d.ts +4 -4
- package/_types/zksync/actions/sendTransaction.d.ts +4 -4
- package/_types/zksync/actions/signEip712Transaction.d.ts +4 -4
- package/_types/zksync/actions/signTransaction.d.ts +4 -4
- package/_types/zksync/chainConfig.d.ts +65 -11
- package/_types/zksync/chainConfig.d.ts.map +1 -1
- package/_types/zksync/chains.d.ts +4 -3
- package/_types/zksync/chains.d.ts.map +1 -1
- package/_types/zksync/decorators/eip712.d.ts +13 -13
- package/_types/zksync/decorators/publicL2.d.ts +37 -37
- package/_types/zksync/errors/bytecode.d.ts +0 -3
- package/_types/zksync/errors/bytecode.d.ts.map +1 -1
- package/_types/zksync/errors/token-is-eth.d.ts +0 -1
- package/_types/zksync/errors/token-is-eth.d.ts.map +1 -1
- package/_types/zksync/errors/transaction.d.ts +0 -1
- package/_types/zksync/errors/transaction.d.ts.map +1 -1
- package/_types/zksync/formatters.d.ts +75 -21
- package/_types/zksync/formatters.d.ts.map +1 -1
- package/_types/zksync/index.d.ts +77 -7
- package/_types/zksync/index.d.ts.map +1 -1
- package/_types/zksync/serializers.d.ts +2 -2
- package/_types/zksync/serializers.d.ts.map +1 -1
- package/_types/zksync/types/block.d.ts +6 -6
- package/_types/zksync/types/chain.d.ts +2 -2
- package/_types/zksync/types/eip1193.d.ts +8 -8
- package/_types/zksync/types/eip712.d.ts +3 -3
- package/_types/zksync/types/fee.d.ts +2 -2
- package/_types/zksync/types/log.d.ts +4 -4
- package/_types/zksync/types/transaction.d.ts +31 -31
- package/_types/zksync/utils/assertEip712Request.d.ts +2 -2
- package/_types/zksync/utils/assertEip712Transaction.d.ts +2 -2
- package/_types/zksync/utils/getEip712Domain.d.ts +2 -2
- package/_types/zksync/utils/isEip712Transaction.d.ts +3 -3
- package/_types/zksync/utils/isEip712Transaction.d.ts.map +1 -1
- package/account-abstraction/errors/bundler.ts +36 -48
- package/account-abstraction/errors/userOperation.ts +6 -6
- package/accounts/index.ts +6 -0
- package/accounts/privateKeyToAccount.ts +4 -0
- package/accounts/toAccount.ts +1 -0
- package/accounts/types.ts +11 -3
- package/accounts/utils/signAuthorization.ts +63 -0
- package/actions/public/estimateGas.ts +74 -11
- package/actions/public/simulateContract.ts +48 -14
- package/actions/wallet/prepareTransactionRequest.ts +3 -1
- package/actions/wallet/sendTransaction.ts +33 -4
- package/actions/wallet/writeContract.ts +5 -3
- package/chains/definitions/abstractTestnet.ts +2 -0
- package/chains/definitions/{zkSync.ts → zksync.ts} +4 -3
- package/chains/definitions/{zkSyncInMemoryNode.ts → zksyncInMemoryNode.ts} +2 -2
- package/chains/definitions/{zkSyncLocalNode.ts → zksyncLocalNode.ts} +2 -2
- package/chains/definitions/{zkSyncSepoliaTestnet.ts → zksyncSepoliaTestnet.ts} +5 -3
- package/chains/index.ts +113 -34
- package/errors/abi.ts +37 -37
- package/errors/account.ts +2 -2
- package/errors/address.ts +1 -1
- package/errors/base.ts +41 -22
- package/errors/blob.ts +4 -5
- package/errors/block.ts +1 -2
- package/errors/ccip.ts +3 -3
- package/errors/chain.ts +9 -10
- package/errors/contract.ts +6 -10
- package/errors/cursor.ts +5 -4
- package/errors/data.ts +3 -3
- package/errors/eip712.ts +1 -1
- package/errors/encoding.ts +7 -5
- package/errors/ens.ts +6 -5
- package/errors/estimateGas.ts +1 -2
- package/errors/fee.ts +7 -5
- package/errors/log.ts +3 -2
- package/errors/node.ts +12 -17
- package/errors/request.ts +5 -10
- package/errors/rpc.ts +29 -26
- package/errors/siwe.ts +1 -2
- package/errors/stateOverride.ts +6 -4
- package/errors/transaction.ts +19 -19
- package/errors/transport.ts +1 -0
- package/errors/utils.ts +0 -3
- package/errors/version.ts +1 -1
- package/experimental/eip5792/decorators/eip5792.ts +13 -13
- package/experimental/eip7702/actions/signAuthorization.ts +136 -0
- package/experimental/eip7702/decorators/eip7702.ts +86 -0
- package/experimental/eip7702/types/authorization.ts +30 -0
- package/experimental/eip7702/types/rpc.ts +12 -0
- package/experimental/eip7702/utils/hashAuthorization.ts +60 -0
- package/experimental/eip7702/utils/recoverAuthorizationAddress.ts +61 -0
- package/experimental/eip7702/utils/serializeAuthorizationList.ts +33 -0
- package/experimental/eip7702/utils/verifyAuthorization.ts +52 -0
- package/experimental/erc7715/decorators/erc7715.ts +7 -7
- package/experimental/index.ts +72 -18
- package/index.ts +29 -4
- package/op-stack/errors/withdrawal.ts +2 -3
- package/package.json +1 -1
- package/types/rpc.ts +21 -1
- package/types/transaction.ts +103 -54
- package/types/utils.ts +0 -15
- package/utils/formatters/transaction.ts +32 -0
- package/utils/formatters/transactionRequest.ts +31 -0
- package/utils/index.ts +1 -1
- package/utils/signature/hashMessage.ts +2 -2
- package/utils/transaction/assertTransaction.ts +24 -12
- package/utils/transaction/getSerializedTransactionType.ts +7 -0
- package/utils/transaction/getTransactionType.ts +95 -60
- package/utils/transaction/parseTransaction.ts +127 -0
- package/utils/transaction/serializeTransaction.ts +66 -0
- package/zksync/actions/deployContract.ts +1 -1
- package/zksync/actions/estimateFee.ts +4 -4
- package/zksync/actions/estimateGasL1ToL2.ts +2 -2
- package/zksync/actions/getAllBalances.ts +2 -2
- package/zksync/actions/getBaseTokenL1Address.ts +2 -2
- package/zksync/actions/getBlockDetails.ts +6 -6
- package/zksync/actions/getBridgehubContractAddress.ts +2 -2
- package/zksync/actions/getDefaultBridgeAddresses.ts +2 -2
- package/zksync/actions/getL1BatchBlockRange.ts +2 -2
- package/zksync/actions/getL1BatchDetails.ts +6 -6
- package/zksync/actions/getL1BatchNumber.ts +2 -2
- package/zksync/actions/getL1ChainId.ts +2 -2
- package/zksync/actions/getLogProof.ts +2 -2
- package/zksync/actions/getMainContractAddress.ts +2 -2
- package/zksync/actions/getRawBlockTransactions.ts +6 -6
- package/zksync/actions/getTestnetPaymasterAddress.ts +2 -2
- package/zksync/actions/getTransactionDetails.ts +4 -4
- package/zksync/actions/sendEip712Transaction.ts +4 -4
- package/zksync/actions/sendTransaction.ts +4 -4
- package/zksync/actions/signEip712Transaction.ts +4 -4
- package/zksync/actions/signTransaction.ts +4 -4
- package/zksync/chains.ts +4 -3
- package/zksync/decorators/eip712.ts +13 -13
- package/zksync/decorators/publicL2.ts +37 -37
- package/zksync/errors/bytecode.ts +3 -3
- package/zksync/errors/token-is-eth.ts +1 -2
- package/zksync/errors/transaction.ts +1 -2
- package/zksync/formatters.ts +22 -22
- package/zksync/index.ts +111 -32
- package/zksync/serializers.ts +7 -7
- package/zksync/types/block.ts +9 -9
- package/zksync/types/chain.ts +5 -5
- package/zksync/types/eip1193.ts +8 -8
- package/zksync/types/eip712.ts +3 -3
- package/zksync/types/fee.ts +2 -2
- package/zksync/types/log.ts +4 -4
- package/zksync/types/transaction.ts +45 -45
- package/zksync/utils/assertEip712Request.ts +2 -2
- package/zksync/utils/assertEip712Transaction.ts +4 -4
- package/zksync/utils/getEip712Domain.ts +9 -9
- package/zksync/utils/isEip712Transaction.ts +8 -3
- package/_cjs/chains/definitions/zkSyncSepoliaTestnet.js.map +0 -1
- package/_cjs/chains/definitions/zkSyncTestnet.js +0 -31
- package/_cjs/chains/definitions/zkSyncTestnet.js.map +0 -1
- package/_esm/chains/definitions/zkSyncTestnet.js +0 -29
- package/_esm/chains/definitions/zkSyncTestnet.js.map +0 -1
- package/_types/chains/definitions/zkSyncTestnet.d.ts +0 -351
- package/_types/chains/definitions/zkSyncTestnet.d.ts.map +0 -1
- package/chains/definitions/zkSyncTestnet.ts +0 -29
@@ -3,7 +3,7 @@ import type { Client } from '../../clients/createClient.js';
|
|
3
3
|
import type { Transport } from '../../clients/transports/createTransport.js';
|
4
4
|
import type { Account } from '../../types/account.js';
|
5
5
|
import type { Chain } from '../../types/chain.js';
|
6
|
-
import type {
|
6
|
+
import type { PublicZksyncRpcSchema } from '../types/eip1193.js';
|
7
7
|
export type GetMainContractAddressReturnType = Address;
|
8
|
-
export declare function getMainContractAddress<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account,
|
8
|
+
export declare function getMainContractAddress<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account, PublicZksyncRpcSchema>): Promise<GetMainContractAddressReturnType>;
|
9
9
|
//# sourceMappingURL=getMainContractAddress.d.ts.map
|
@@ -2,10 +2,10 @@ import type { Client } from '../../clients/createClient.js';
|
|
2
2
|
import type { Transport } from '../../clients/transports/createTransport.js';
|
3
3
|
import type { Account } from '../../types/account.js';
|
4
4
|
import type { Chain } from '../../types/chain.js';
|
5
|
-
import type {
|
6
|
-
import type {
|
7
|
-
import type {
|
8
|
-
export type GetRawBlockTransactionsParameters =
|
9
|
-
export type GetRawBlockTransactionsReturnType =
|
10
|
-
export declare function getRawBlockTransactions<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account,
|
5
|
+
import type { ZksyncNumberParameter } from '../types/block.js';
|
6
|
+
import type { PublicZksyncRpcSchema } from '../types/eip1193.js';
|
7
|
+
import type { ZksyncRawBlockTransactions } from '../types/transaction.js';
|
8
|
+
export type GetRawBlockTransactionsParameters = ZksyncNumberParameter;
|
9
|
+
export type GetRawBlockTransactionsReturnType = ZksyncRawBlockTransactions;
|
10
|
+
export declare function getRawBlockTransactions<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account, PublicZksyncRpcSchema>, parameters: GetRawBlockTransactionsParameters): Promise<GetRawBlockTransactionsReturnType>;
|
11
11
|
//# sourceMappingURL=getRawBlockTransactions.d.ts.map
|
@@ -3,7 +3,7 @@ import type { Client } from '../../clients/createClient.js';
|
|
3
3
|
import type { Transport } from '../../clients/transports/createTransport.js';
|
4
4
|
import type { Account } from '../../types/account.js';
|
5
5
|
import type { Chain } from '../../types/chain.js';
|
6
|
-
import type {
|
6
|
+
import type { PublicZksyncRpcSchema } from '../types/eip1193.js';
|
7
7
|
export type GetTestnetPaymasterAddressReturnType = Address | null;
|
8
|
-
export declare function getTestnetPaymasterAddress<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account,
|
8
|
+
export declare function getTestnetPaymasterAddress<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account, PublicZksyncRpcSchema>): Promise<GetTestnetPaymasterAddressReturnType>;
|
9
9
|
//# sourceMappingURL=getTestnetPaymasterAddress.d.ts.map
|
@@ -3,11 +3,11 @@ import type { Transport } from '../../clients/transports/createTransport.js';
|
|
3
3
|
import type { Account } from '../../types/account.js';
|
4
4
|
import type { Chain } from '../../types/chain.js';
|
5
5
|
import type { Hash } from '../../types/misc.js';
|
6
|
-
import type {
|
7
|
-
import type {
|
6
|
+
import type { PublicZksyncRpcSchema } from '../types/eip1193.js';
|
7
|
+
import type { ZksyncTransactionDetails } from '../types/transaction.js';
|
8
8
|
export type GetTransactionDetailsParameters = {
|
9
9
|
txHash: Hash;
|
10
10
|
};
|
11
|
-
export type GetTransactionDetailsReturnType =
|
12
|
-
export declare function getTransactionDetails<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account,
|
11
|
+
export type GetTransactionDetailsReturnType = ZksyncTransactionDetails;
|
12
|
+
export declare function getTransactionDetails<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account, PublicZksyncRpcSchema>, parameters: GetTransactionDetailsParameters): Promise<GetTransactionDetailsReturnType>;
|
13
13
|
//# sourceMappingURL=getTransactionDetails.d.ts.map
|
@@ -15,11 +15,11 @@ export type SendEip712TransactionErrorType = SendTransactionErrorType;
|
|
15
15
|
*
|
16
16
|
* @example
|
17
17
|
* import { createWalletClient, custom } from 'viem'
|
18
|
-
* import {
|
18
|
+
* import { zksync } from 'viem/chains'
|
19
19
|
* import { sendEip712Transaction } from 'viem/zksync'
|
20
20
|
*
|
21
21
|
* const client = createWalletClient({
|
22
|
-
* chain:
|
22
|
+
* chain: zksync,
|
23
23
|
* transport: custom(window.ethereum),
|
24
24
|
* })
|
25
25
|
* const hash = await sendEip712Transaction(client, {
|
@@ -32,12 +32,12 @@ export type SendEip712TransactionErrorType = SendTransactionErrorType;
|
|
32
32
|
* // Account Hoisting
|
33
33
|
* import { createWalletClient, http } from 'viem'
|
34
34
|
* import { privateKeyToAccount } from 'viem/accounts'
|
35
|
-
* import {
|
35
|
+
* import { zksync } from 'viem/chains'
|
36
36
|
* import { sendEip712Transaction } from 'viem/zksync'
|
37
37
|
*
|
38
38
|
* const client = createWalletClient({
|
39
39
|
* account: privateKeyToAccount('0x…'),
|
40
|
-
* chain:
|
40
|
+
* chain: zksync,
|
41
41
|
* transport: http(),
|
42
42
|
* })
|
43
43
|
*
|
@@ -20,11 +20,11 @@ export type SendTransactionErrorType = core_SendTransactionErrorType;
|
|
20
20
|
*
|
21
21
|
* @example
|
22
22
|
* import { createWalletClient, custom } from 'viem'
|
23
|
-
* import {
|
23
|
+
* import { zksync } from 'viem/chains'
|
24
24
|
* import { sendTransaction } from 'viem/zksync'
|
25
25
|
*
|
26
26
|
* const client = createWalletClient({
|
27
|
-
* chain:
|
27
|
+
* chain: zksync,
|
28
28
|
* transport: custom(window.ethereum),
|
29
29
|
* })
|
30
30
|
* const hash = await sendTransaction(client, {
|
@@ -37,12 +37,12 @@ export type SendTransactionErrorType = core_SendTransactionErrorType;
|
|
37
37
|
* // Account Hoisting
|
38
38
|
* import { createWalletClient, http } from 'viem'
|
39
39
|
* import { privateKeyToAccount } from 'viem/accounts'
|
40
|
-
* import {
|
40
|
+
* import { zksync } from 'viem/chains'
|
41
41
|
* import { sendTransaction } from 'viem/zksync'
|
42
42
|
*
|
43
43
|
* const client = createWalletClient({
|
44
44
|
* account: privateKeyToAccount('0x…'),
|
45
|
-
* chain:
|
45
|
+
* chain: zksync,
|
46
46
|
* transport: http(),
|
47
47
|
* })
|
48
48
|
* const hash = await sendTransaction(client, {
|
@@ -19,11 +19,11 @@ export type SignEip712TransactionErrorType = SignTransactionErrorType;
|
|
19
19
|
*
|
20
20
|
* @example
|
21
21
|
* import { createWalletClient, custom } from 'viem'
|
22
|
-
* import {
|
22
|
+
* import { zksync } from 'viem/chains'
|
23
23
|
* import { signEip712Transaction } from 'viem/zksync'
|
24
24
|
*
|
25
25
|
* const client = createWalletClient({
|
26
|
-
* chain:
|
26
|
+
* chain: zksync,
|
27
27
|
* transport: custom(window.ethereum),
|
28
28
|
* })
|
29
29
|
* const signature = await signEip712Transaction(client, {
|
@@ -36,12 +36,12 @@ export type SignEip712TransactionErrorType = SignTransactionErrorType;
|
|
36
36
|
* // Account Hoisting
|
37
37
|
* import { createWalletClient, http } from 'viem'
|
38
38
|
* import { privateKeyToAccount } from 'viem/accounts'
|
39
|
-
* import {
|
39
|
+
* import { zksync } from 'viem/chains'
|
40
40
|
* import { signEip712Transaction } from 'viem/zksync'
|
41
41
|
*
|
42
42
|
* const client = createWalletClient({
|
43
43
|
* account: privateKeyToAccount('0x…'),
|
44
|
-
* chain:
|
44
|
+
* chain: zksync,
|
45
45
|
* transport: custom(window.ethereum),
|
46
46
|
* })
|
47
47
|
* const signature = await signEip712Transaction(client, {
|
@@ -21,11 +21,11 @@ export type SignTransactionErrorType = SignTransactionErrorType_;
|
|
21
21
|
*
|
22
22
|
* @example
|
23
23
|
* import { createWalletClient, custom } from 'viem'
|
24
|
-
* import {
|
24
|
+
* import { zksync } from 'viem/chains'
|
25
25
|
* import { signTransaction } from 'viem/zksync'
|
26
26
|
*
|
27
27
|
* const client = createWalletClient({
|
28
|
-
* chain:
|
28
|
+
* chain: zksync,
|
29
29
|
* transport: custom(window.ethereum),
|
30
30
|
* })
|
31
31
|
* const signature = await signTransaction(client, {
|
@@ -38,12 +38,12 @@ export type SignTransactionErrorType = SignTransactionErrorType_;
|
|
38
38
|
* // Account Hoisting
|
39
39
|
* import { createWalletClient, http } from 'viem'
|
40
40
|
* import { privateKeyToAccount } from 'viem/accounts'
|
41
|
-
* import {
|
41
|
+
* import { zksync } from 'viem/chains'
|
42
42
|
* import { signTransaction } from 'viem/zksync'
|
43
43
|
*
|
44
44
|
* const client = createWalletClient({
|
45
45
|
* account: privateKeyToAccount('0x…'),
|
46
|
-
* chain:
|
46
|
+
* chain: zksync,
|
47
47
|
* transport: custom(window.ethereum),
|
48
48
|
* })
|
49
49
|
* const signature = await signTransaction(client, {
|
@@ -52,6 +52,7 @@ export declare const chainConfig: {
|
|
52
52
|
transactionIndex: number | null;
|
53
53
|
typeHex: import("../index.js").Hex | null;
|
54
54
|
accessList?: undefined;
|
55
|
+
authorizationList?: undefined;
|
55
56
|
blobVersionedHashes?: undefined;
|
56
57
|
chainId?: number | undefined;
|
57
58
|
yParity?: undefined;
|
@@ -79,6 +80,7 @@ export declare const chainConfig: {
|
|
79
80
|
value: bigint;
|
80
81
|
yParity: number;
|
81
82
|
accessList: import("../index.js").AccessList;
|
83
|
+
authorizationList?: undefined;
|
82
84
|
blobVersionedHashes?: undefined;
|
83
85
|
chainId: number;
|
84
86
|
type: "eip2930";
|
@@ -105,6 +107,7 @@ export declare const chainConfig: {
|
|
105
107
|
value: bigint;
|
106
108
|
yParity: number;
|
107
109
|
accessList: import("../index.js").AccessList;
|
110
|
+
authorizationList?: undefined;
|
108
111
|
blobVersionedHashes?: undefined;
|
109
112
|
chainId: number;
|
110
113
|
type: "eip1559";
|
@@ -131,6 +134,7 @@ export declare const chainConfig: {
|
|
131
134
|
value: bigint;
|
132
135
|
yParity: number;
|
133
136
|
accessList: import("../index.js").AccessList;
|
137
|
+
authorizationList?: undefined;
|
134
138
|
blobVersionedHashes: readonly import("../index.js").Hex[];
|
135
139
|
chainId: number;
|
136
140
|
type: "eip4844";
|
@@ -140,6 +144,33 @@ export declare const chainConfig: {
|
|
140
144
|
maxPriorityFeePerGas: bigint;
|
141
145
|
l1BatchNumber: bigint | null;
|
142
146
|
l1BatchTxIndex: bigint | null;
|
147
|
+
} | {
|
148
|
+
blockHash: `0x${string}` | null;
|
149
|
+
blockNumber: bigint | null;
|
150
|
+
from: import("abitype").Address;
|
151
|
+
gas: bigint;
|
152
|
+
hash: import("../index.js").Hash;
|
153
|
+
input: import("../index.js").Hex;
|
154
|
+
nonce: number;
|
155
|
+
r: import("../index.js").Hex;
|
156
|
+
s: import("../index.js").Hex;
|
157
|
+
to: import("abitype").Address | null;
|
158
|
+
transactionIndex: number | null;
|
159
|
+
typeHex: import("../index.js").Hex | null;
|
160
|
+
v: bigint;
|
161
|
+
value: bigint;
|
162
|
+
yParity: number;
|
163
|
+
accessList: import("../index.js").AccessList;
|
164
|
+
authorizationList: import("../experimental/index.js").SignedAuthorizationList;
|
165
|
+
blobVersionedHashes?: undefined;
|
166
|
+
chainId: number;
|
167
|
+
type: "eip7702";
|
168
|
+
gasPrice?: undefined;
|
169
|
+
maxFeePerBlobGas?: undefined;
|
170
|
+
maxFeePerGas: bigint;
|
171
|
+
maxPriorityFeePerGas: bigint;
|
172
|
+
l1BatchNumber: bigint | null;
|
173
|
+
l1BatchTxIndex: bigint | null;
|
143
174
|
} | {
|
144
175
|
blockHash: `0x${string}` | null;
|
145
176
|
blockNumber: bigint | null;
|
@@ -191,7 +222,7 @@ export declare const chainConfig: {
|
|
191
222
|
};
|
192
223
|
readonly transactionReceipt: {
|
193
224
|
exclude: [] | undefined;
|
194
|
-
format: (args: import("./
|
225
|
+
format: (args: import("./index.js").ZkSyncRpcTransactionReceipt) => {
|
195
226
|
type: import("./index.js").ZkSyncTransactionType;
|
196
227
|
to: import("abitype").Address | null;
|
197
228
|
from: import("abitype").Address;
|
@@ -223,14 +254,15 @@ export declare const chainConfig: {
|
|
223
254
|
gas?: `0x${string}` | undefined;
|
224
255
|
nonce?: `0x${string}` | undefined;
|
225
256
|
to?: import("abitype").Address | null | undefined;
|
226
|
-
value?: `0x${string}` | undefined;
|
227
|
-
accessList?: undefined;
|
228
|
-
blobs?: undefined;
|
229
257
|
type?: "0x0" | undefined;
|
258
|
+
value?: `0x${string}` | undefined;
|
230
259
|
gasPrice?: `0x${string}` | undefined;
|
231
260
|
maxFeePerBlobGas?: undefined;
|
232
261
|
maxFeePerGas?: undefined;
|
233
262
|
maxPriorityFeePerGas?: undefined;
|
263
|
+
blobs?: undefined;
|
264
|
+
accessList?: undefined;
|
265
|
+
authorizationList?: undefined;
|
234
266
|
blobVersionedHashes?: undefined;
|
235
267
|
kzg?: undefined;
|
236
268
|
sidecars?: undefined;
|
@@ -241,14 +273,15 @@ export declare const chainConfig: {
|
|
241
273
|
gas?: `0x${string}` | undefined;
|
242
274
|
nonce?: `0x${string}` | undefined;
|
243
275
|
to?: import("abitype").Address | null | undefined;
|
244
|
-
value?: `0x${string}` | undefined;
|
245
|
-
accessList?: import("../index.js").AccessList | undefined;
|
246
|
-
blobs?: undefined;
|
247
276
|
type?: "0x1" | undefined;
|
277
|
+
value?: `0x${string}` | undefined;
|
248
278
|
gasPrice?: `0x${string}` | undefined;
|
249
279
|
maxFeePerBlobGas?: undefined;
|
250
280
|
maxFeePerGas?: undefined;
|
251
281
|
maxPriorityFeePerGas?: undefined;
|
282
|
+
accessList?: import("../index.js").AccessList | undefined;
|
283
|
+
blobs?: undefined;
|
284
|
+
authorizationList?: undefined;
|
252
285
|
blobVersionedHashes?: undefined;
|
253
286
|
kzg?: undefined;
|
254
287
|
sidecars?: undefined;
|
@@ -259,6 +292,7 @@ export declare const chainConfig: {
|
|
259
292
|
gas?: `0x${string}` | undefined;
|
260
293
|
nonce?: `0x${string}` | undefined;
|
261
294
|
to?: import("abitype").Address | null | undefined;
|
295
|
+
type?: "0x2" | undefined;
|
262
296
|
value?: `0x${string}` | undefined;
|
263
297
|
gasPrice?: undefined;
|
264
298
|
maxFeePerBlobGas?: undefined;
|
@@ -266,28 +300,48 @@ export declare const chainConfig: {
|
|
266
300
|
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
267
301
|
accessList?: import("../index.js").AccessList | undefined;
|
268
302
|
blobs?: undefined;
|
269
|
-
|
303
|
+
authorizationList?: undefined;
|
270
304
|
blobVersionedHashes?: undefined;
|
271
305
|
kzg?: undefined;
|
272
306
|
sidecars?: undefined;
|
273
307
|
eip712Meta?: undefined;
|
274
308
|
} | {
|
309
|
+
type?: "0x3" | undefined;
|
275
310
|
data?: import("../index.js").Hex | undefined;
|
276
311
|
from: import("abitype").Address;
|
277
312
|
gas?: `0x${string}` | undefined;
|
278
313
|
nonce?: `0x${string}` | undefined;
|
279
314
|
value?: `0x${string}` | undefined;
|
280
315
|
to: `0x${string}` | null;
|
316
|
+
gasPrice?: undefined;
|
317
|
+
maxFeePerGas?: `0x${string}` | undefined;
|
318
|
+
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
319
|
+
maxFeePerBlobGas: `0x${string}`;
|
281
320
|
accessList?: import("../index.js").AccessList | undefined;
|
282
321
|
blobs: readonly import("../index.js").Hex[] | readonly import("../index.js").ByteArray[];
|
283
322
|
blobVersionedHashes?: readonly import("../index.js").Hex[] | undefined;
|
284
323
|
kzg?: import("../index.js").Kzg | undefined;
|
285
324
|
sidecars?: readonly import("../index.js").BlobSidecar<import("../index.js").Hex>[] | undefined;
|
286
|
-
|
325
|
+
authorizationList?: undefined;
|
326
|
+
eip712Meta?: undefined;
|
327
|
+
} | {
|
328
|
+
type?: "0x4" | undefined;
|
287
329
|
gasPrice?: undefined;
|
330
|
+
maxFeePerBlobGas?: undefined;
|
288
331
|
maxFeePerGas?: `0x${string}` | undefined;
|
289
332
|
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
290
|
-
|
333
|
+
to?: import("abitype").Address | null | undefined;
|
334
|
+
data?: import("../index.js").Hex | undefined;
|
335
|
+
from: import("abitype").Address;
|
336
|
+
gas?: `0x${string}` | undefined;
|
337
|
+
nonce?: `0x${string}` | undefined;
|
338
|
+
value?: `0x${string}` | undefined;
|
339
|
+
accessList?: import("../index.js").AccessList | undefined;
|
340
|
+
authorizationList?: import("../experimental/index.js").RpcAuthorizationList | undefined;
|
341
|
+
blobs?: undefined;
|
342
|
+
blobVersionedHashes?: undefined;
|
343
|
+
kzg?: undefined;
|
344
|
+
sidecars?: undefined;
|
291
345
|
eip712Meta?: undefined;
|
292
346
|
} | {
|
293
347
|
data?: import("../index.js").Hex | undefined;
|
@@ -295,13 +349,13 @@ export declare const chainConfig: {
|
|
295
349
|
gas?: `0x${string}` | undefined;
|
296
350
|
nonce?: `0x${string}` | undefined;
|
297
351
|
to?: import("abitype").Address | null | undefined;
|
352
|
+
type: "0xff" | "0x71";
|
298
353
|
value?: `0x${string}` | undefined;
|
299
354
|
gasPrice?: undefined;
|
300
355
|
maxFeePerBlobGas?: undefined;
|
301
356
|
maxFeePerGas?: `0x${string}` | undefined;
|
302
357
|
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
303
358
|
eip712Meta: import("./index.js").ZkSyncEip712Meta;
|
304
|
-
type: "0x71" | "0xff";
|
305
359
|
}) & {
|
306
360
|
paymaster: never;
|
307
361
|
gasPerPubdata: never;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"chainConfig.d.ts","sourceRoot":"","sources":["../../zksync/chainConfig.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW
|
1
|
+
{"version":3,"file":"chainConfig.d.ts","sourceRoot":"","sources":["../../zksync/chainConfig.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMd,CAAA"}
|
@@ -1,4 +1,5 @@
|
|
1
|
-
export {
|
2
|
-
export {
|
3
|
-
export {
|
1
|
+
export { zksync } from '../chains/definitions/zksync.js';
|
2
|
+
export { zksyncInMemoryNode } from '../chains/definitions/zksyncInMemoryNode.js';
|
3
|
+
export { zksyncLocalNode } from '../chains/definitions/zksyncLocalNode.js';
|
4
|
+
export { zksyncSepoliaTestnet } from '../chains/definitions/zksyncSepoliaTestnet.js';
|
4
5
|
//# sourceMappingURL=chains.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["../../zksync/chains.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxD,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["../../zksync/chains.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAA;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAA;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAA"}
|
@@ -23,11 +23,11 @@ export type Eip712WalletActions<chain extends ChainEIP712 | undefined = ChainEIP
|
|
23
23
|
*
|
24
24
|
* @example
|
25
25
|
* import { createWalletClient, custom } from 'viem'
|
26
|
-
* import {
|
26
|
+
* import { zksync } from 'viem/chains'
|
27
27
|
* import { eip712WalletActions } from 'viem/zksync'
|
28
28
|
*
|
29
29
|
* const client = createWalletClient({
|
30
|
-
* chain:
|
30
|
+
* chain: zksync,
|
31
31
|
* transport: custom(window.ethereum),
|
32
32
|
* }).extend(eip712WalletActions())
|
33
33
|
* const hash = await client.sendTransaction({
|
@@ -40,12 +40,12 @@ export type Eip712WalletActions<chain extends ChainEIP712 | undefined = ChainEIP
|
|
40
40
|
* // Account Hoisting
|
41
41
|
* import { createWalletClient, http } from 'viem'
|
42
42
|
* import { privateKeyToAccount } from 'viem/accounts'
|
43
|
-
* import {
|
43
|
+
* import { zksync } from 'viem/chains'
|
44
44
|
* import { eip712WalletActions } from 'viem/zksync'
|
45
45
|
*
|
46
46
|
* const client = createWalletClient({
|
47
47
|
* account: privateKeyToAccount('0x…'),
|
48
|
-
* chain:
|
48
|
+
* chain: zksync,
|
49
49
|
* transport: http(),
|
50
50
|
* }).extend(eip712WalletActions())
|
51
51
|
* const hash = await client.sendTransaction({
|
@@ -67,11 +67,11 @@ export type Eip712WalletActions<chain extends ChainEIP712 | undefined = ChainEIP
|
|
67
67
|
*
|
68
68
|
* @example
|
69
69
|
* import { createWalletClient, custom } from 'viem'
|
70
|
-
* import {
|
70
|
+
* import { zksync } from 'viem/chains'
|
71
71
|
* import { eip712WalletActions } from 'viem/zksync'
|
72
72
|
*
|
73
73
|
* const client = createWalletClient({
|
74
|
-
* chain:
|
74
|
+
* chain: zksync,
|
75
75
|
* transport: custom(window.ethereum),
|
76
76
|
* }).extend(eip712WalletActions())
|
77
77
|
* const signature = await client.signTransaction({
|
@@ -84,12 +84,12 @@ export type Eip712WalletActions<chain extends ChainEIP712 | undefined = ChainEIP
|
|
84
84
|
* // Account Hoisting
|
85
85
|
* import { createWalletClient, http } from 'viem'
|
86
86
|
* import { privateKeyToAccount } from 'viem/accounts'
|
87
|
-
* import {
|
87
|
+
* import { zksync } from 'viem/chains'
|
88
88
|
* import { eip712WalletActions } from 'viem/zksync'
|
89
89
|
*
|
90
90
|
* const client = createWalletClient({
|
91
91
|
* account: privateKeyToAccount('0x…'),
|
92
|
-
* chain:
|
92
|
+
* chain: zksync,
|
93
93
|
* transport: custom(window.ethereum),
|
94
94
|
* }).extend(eip712WalletActions())
|
95
95
|
* const signature = await client.signTransaction({
|
@@ -110,7 +110,7 @@ export type Eip712WalletActions<chain extends ChainEIP712 | undefined = ChainEIP
|
|
110
110
|
* @example
|
111
111
|
* import { createWalletClient, custom } from 'viem'
|
112
112
|
* import { privateKeyToAccount } from 'viem/accounts'
|
113
|
-
* import {
|
113
|
+
* import { zksync } from 'viem/chains'
|
114
114
|
* import { deployContract } from 'viem/contract'
|
115
115
|
*
|
116
116
|
* const client = createWalletClient({
|
@@ -146,11 +146,11 @@ export type Eip712WalletActions<chain extends ChainEIP712 | undefined = ChainEIP
|
|
146
146
|
*
|
147
147
|
* @example
|
148
148
|
* import { createWalletClient, custom, parseAbi } from 'viem'
|
149
|
-
* import {
|
149
|
+
* import { zksync } from 'viem/chains'
|
150
150
|
* import { eip712WalletActions } from 'viem/zksync'
|
151
151
|
*
|
152
152
|
* const client = createWalletClient({
|
153
|
-
* chain:
|
153
|
+
* chain: zksync,
|
154
154
|
* transport: custom(window.ethereum),
|
155
155
|
* }).extend(eip712WalletActions())
|
156
156
|
* const hash = await client.writeContract({
|
@@ -163,11 +163,11 @@ export type Eip712WalletActions<chain extends ChainEIP712 | undefined = ChainEIP
|
|
163
163
|
* @example
|
164
164
|
* // With Validation
|
165
165
|
* import { createWalletClient, http, parseAbi } from 'viem'
|
166
|
-
* import {
|
166
|
+
* import { zksync } from 'viem/chains'
|
167
167
|
* import { eip712WalletActions } from 'viem/zksync'
|
168
168
|
*
|
169
169
|
* const client = createWalletClient({
|
170
|
-
* chain:
|
170
|
+
* chain: zksync,
|
171
171
|
* transport: http(),
|
172
172
|
* }).extend(eip712WalletActions())
|
173
173
|
* const { request } = await client.simulateContract({
|