viem 2.13.6 → 2.13.7
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +8 -0
- package/README.md +0 -6
- package/_cjs/celo/fees.js.map +1 -1
- package/_cjs/celo/formatters.js.map +1 -1
- package/_cjs/celo/serializers.js.map +1 -1
- package/_cjs/chains/definitions/defichainEvm.js +1 -1
- package/_cjs/chains/definitions/defichainEvm.js.map +1 -1
- package/_cjs/chains/definitions/defichainEvmTestnet.js +1 -1
- package/_cjs/chains/definitions/defichainEvmTestnet.js.map +1 -1
- package/_cjs/clients/transports/fallback.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/index.js +2 -1
- package/_cjs/index.js.map +1 -1
- package/_cjs/utils/index.js +4 -3
- package/_cjs/utils/index.js.map +1 -1
- package/_cjs/utils/transaction/parseTransaction.js.map +1 -1
- package/_cjs/zksync/actions/sendTransaction.js.map +1 -1
- package/_esm/celo/fees.js.map +1 -1
- package/_esm/celo/formatters.js.map +1 -1
- package/_esm/celo/serializers.js.map +1 -1
- package/_esm/chains/definitions/defichainEvm.js +1 -1
- package/_esm/chains/definitions/defichainEvm.js.map +1 -1
- package/_esm/chains/definitions/defichainEvmTestnet.js +1 -1
- package/_esm/chains/definitions/defichainEvmTestnet.js.map +1 -1
- package/_esm/clients/transports/fallback.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/index.js +1 -1
- package/_esm/index.js.map +1 -1
- package/_esm/utils/index.js +1 -1
- package/_esm/utils/index.js.map +1 -1
- package/_esm/utils/transaction/parseTransaction.js.map +1 -1
- package/_esm/zksync/actions/sendTransaction.js.map +1 -1
- package/_types/celo/chainConfig.d.ts +682 -704
- package/_types/celo/chainConfig.d.ts.map +1 -1
- package/_types/celo/fees.d.ts.map +1 -1
- package/_types/celo/formatters.d.ts +341 -352
- package/_types/celo/formatters.d.ts.map +1 -1
- package/_types/celo/serializers.d.ts.map +1 -1
- package/_types/celo/types.d.ts +27 -27
- package/_types/celo/types.d.ts.map +1 -1
- package/_types/chains/definitions/acala.d.ts +2 -2
- package/_types/chains/definitions/ancient8.d.ts +192 -203
- package/_types/chains/definitions/ancient8.d.ts.map +1 -1
- package/_types/chains/definitions/ancient8Sepolia.d.ts +192 -203
- package/_types/chains/definitions/ancient8Sepolia.d.ts.map +1 -1
- package/_types/chains/definitions/anvil.d.ts +2 -2
- package/_types/chains/definitions/apexTestnet.d.ts +2 -2
- package/_types/chains/definitions/arbitrum.d.ts +2 -2
- package/_types/chains/definitions/arbitrumGoerli.d.ts +2 -2
- package/_types/chains/definitions/arbitrumNova.d.ts +2 -2
- package/_types/chains/definitions/arbitrumSepolia.d.ts +2 -2
- package/_types/chains/definitions/areonNetwork.d.ts +2 -2
- package/_types/chains/definitions/areonNetworkTestnet.d.ts +2 -2
- package/_types/chains/definitions/astar.d.ts +2 -2
- package/_types/chains/definitions/astarZkEVM.d.ts +2 -2
- package/_types/chains/definitions/astarZkyoto.d.ts +2 -2
- package/_types/chains/definitions/aurora.d.ts +2 -2
- package/_types/chains/definitions/auroraTestnet.d.ts +2 -2
- package/_types/chains/definitions/auroria.d.ts +2 -2
- package/_types/chains/definitions/avalanche.d.ts +2 -2
- package/_types/chains/definitions/avalancheFuji.d.ts +2 -2
- package/_types/chains/definitions/bahamut.d.ts +2 -2
- package/_types/chains/definitions/base.d.ts +192 -203
- package/_types/chains/definitions/base.d.ts.map +1 -1
- package/_types/chains/definitions/baseGoerli.d.ts +192 -203
- package/_types/chains/definitions/baseGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/baseSepolia.d.ts +192 -203
- package/_types/chains/definitions/baseSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/beam.d.ts +2 -2
- package/_types/chains/definitions/beamTestnet.d.ts +2 -2
- package/_types/chains/definitions/bearNetworkChainMainnet.d.ts +2 -2
- package/_types/chains/definitions/bearNetworkChainTestnet.d.ts +2 -2
- package/_types/chains/definitions/berachainTestnet.d.ts +2 -2
- package/_types/chains/definitions/bevmMainnet.d.ts +2 -2
- package/_types/chains/definitions/bitTorrent.d.ts +2 -2
- package/_types/chains/definitions/bitTorrentTestnet.d.ts +2 -2
- package/_types/chains/definitions/bitkub.d.ts +2 -2
- package/_types/chains/definitions/bitkubTestnet.d.ts +2 -2
- package/_types/chains/definitions/blast.d.ts +2 -2
- package/_types/chains/definitions/blastSepolia.d.ts +2 -2
- package/_types/chains/definitions/bob.d.ts +2 -2
- package/_types/chains/definitions/boba.d.ts +2 -2
- package/_types/chains/definitions/bronos.d.ts +2 -2
- package/_types/chains/definitions/bronosTestnet.d.ts +2 -2
- package/_types/chains/definitions/bsc.d.ts +2 -2
- package/_types/chains/definitions/bscGreenfield.d.ts +2 -2
- package/_types/chains/definitions/bscTestnet.d.ts +2 -2
- package/_types/chains/definitions/btr.d.ts +2 -2
- package/_types/chains/definitions/btrTestnet.d.ts +2 -2
- package/_types/chains/definitions/bxn.d.ts +2 -2
- package/_types/chains/definitions/bxnTestnet.d.ts +2 -2
- package/_types/chains/definitions/canto.d.ts +2 -2
- package/_types/chains/definitions/celo.d.ts +690 -712
- package/_types/chains/definitions/celo.d.ts.map +1 -1
- package/_types/chains/definitions/celoAlfajores.d.ts +690 -712
- package/_types/chains/definitions/celoAlfajores.d.ts.map +1 -1
- package/_types/chains/definitions/chiliz.d.ts +2 -2
- package/_types/chains/definitions/classic.d.ts +2 -2
- package/_types/chains/definitions/confluxESpace.d.ts +2 -2
- package/_types/chains/definitions/confluxESpaceTestnet.d.ts +2 -2
- package/_types/chains/definitions/coreDao.d.ts +2 -2
- package/_types/chains/definitions/cronos.d.ts +2 -2
- package/_types/chains/definitions/cronosTestnet.d.ts +2 -2
- package/_types/chains/definitions/crossbell.d.ts +2 -2
- package/_types/chains/definitions/cyber.d.ts +2 -2
- package/_types/chains/definitions/cyberTestnet.d.ts +2 -2
- package/_types/chains/definitions/darwinia.d.ts +2 -2
- package/_types/chains/definitions/defichainEvm.d.ts +3 -3
- package/_types/chains/definitions/defichainEvmTestnet.d.ts +3 -3
- package/_types/chains/definitions/degen.d.ts +2 -2
- package/_types/chains/definitions/dfk.d.ts +2 -2
- package/_types/chains/definitions/dodochainTestnet.d.ts +2 -2
- package/_types/chains/definitions/dogechain.d.ts +2 -2
- package/_types/chains/definitions/dreyerxMainnet.d.ts +2 -2
- package/_types/chains/definitions/edgeless.d.ts +2 -2
- package/_types/chains/definitions/edgelessTestnet.d.ts +2 -2
- package/_types/chains/definitions/edgeware.d.ts +2 -2
- package/_types/chains/definitions/edgewareTestnet.d.ts +2 -2
- package/_types/chains/definitions/ekta.d.ts +2 -2
- package/_types/chains/definitions/ektaTestnet.d.ts +2 -2
- package/_types/chains/definitions/eon.d.ts +2 -2
- package/_types/chains/definitions/eos.d.ts +2 -2
- package/_types/chains/definitions/eosTestnet.d.ts +2 -2
- package/_types/chains/definitions/etherlinkTestnet.d.ts +2 -2
- package/_types/chains/definitions/evmos.d.ts +2 -2
- package/_types/chains/definitions/evmosTestnet.d.ts +2 -2
- package/_types/chains/definitions/fantom.d.ts +2 -2
- package/_types/chains/definitions/fantomSonicTestnet.d.ts +2 -2
- package/_types/chains/definitions/fantomTestnet.d.ts +2 -2
- package/_types/chains/definitions/fibo.d.ts +2 -2
- package/_types/chains/definitions/filecoin.d.ts +2 -2
- package/_types/chains/definitions/filecoinCalibration.d.ts +2 -2
- package/_types/chains/definitions/filecoinHyperspace.d.ts +2 -2
- package/_types/chains/definitions/flare.d.ts +2 -2
- package/_types/chains/definitions/flareTestnet.d.ts +2 -2
- package/_types/chains/definitions/flowMainnet.d.ts +2 -2
- package/_types/chains/definitions/flowPreviewnet.d.ts +2 -2
- package/_types/chains/definitions/flowTestnet.d.ts +2 -2
- package/_types/chains/definitions/foundry.d.ts +2 -2
- package/_types/chains/definitions/fraxtal.d.ts +192 -203
- package/_types/chains/definitions/fraxtal.d.ts.map +1 -1
- package/_types/chains/definitions/fraxtalTestnet.d.ts +192 -203
- package/_types/chains/definitions/fraxtalTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/funkiSepolia.d.ts +192 -203
- package/_types/chains/definitions/funkiSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/fuse.d.ts +2 -2
- package/_types/chains/definitions/fuseSparknet.d.ts +2 -2
- package/_types/chains/definitions/gnosis.d.ts +2 -2
- package/_types/chains/definitions/gnosisChiado.d.ts +2 -2
- package/_types/chains/definitions/gobi.d.ts +2 -2
- package/_types/chains/definitions/goerli.d.ts +2 -2
- package/_types/chains/definitions/haqqMainnet.d.ts +2 -2
- package/_types/chains/definitions/haqqTestedge2.d.ts +2 -2
- package/_types/chains/definitions/hardhat.d.ts +2 -2
- package/_types/chains/definitions/harmonyOne.d.ts +2 -2
- package/_types/chains/definitions/hedera.d.ts +2 -2
- package/_types/chains/definitions/hederaPreviewnet.d.ts +2 -2
- package/_types/chains/definitions/hederaTestnet.d.ts +2 -2
- package/_types/chains/definitions/holesky.d.ts +2 -2
- package/_types/chains/definitions/immutableZkEvm.d.ts +2 -2
- package/_types/chains/definitions/immutableZkEvmTestnet.d.ts +2 -2
- package/_types/chains/definitions/inEVM.d.ts +2 -2
- package/_types/chains/definitions/iotex.d.ts +2 -2
- package/_types/chains/definitions/iotexTestnet.d.ts +2 -2
- package/_types/chains/definitions/jbc.d.ts +2 -2
- package/_types/chains/definitions/jbcTestnet.d.ts +2 -2
- package/_types/chains/definitions/kakarotSepolia.d.ts +2 -2
- package/_types/chains/definitions/karura.d.ts +2 -2
- package/_types/chains/definitions/kava.d.ts +2 -2
- package/_types/chains/definitions/kavaTestnet.d.ts +2 -2
- package/_types/chains/definitions/kcc.d.ts +2 -2
- package/_types/chains/definitions/klaytn.d.ts +2 -2
- package/_types/chains/definitions/klaytnBaobab.d.ts +2 -2
- package/_types/chains/definitions/kroma.d.ts +2 -2
- package/_types/chains/definitions/kromaSepolia.d.ts +2 -2
- package/_types/chains/definitions/l3x.d.ts +2 -2
- package/_types/chains/definitions/l3xTestnet.d.ts +2 -2
- package/_types/chains/definitions/lightlinkPegasus.d.ts +2 -2
- package/_types/chains/definitions/lightlinkPhoenix.d.ts +2 -2
- package/_types/chains/definitions/linea.d.ts +2 -2
- package/_types/chains/definitions/lineaGoerli.d.ts +2 -2
- package/_types/chains/definitions/lineaSepolia.d.ts +2 -2
- package/_types/chains/definitions/lineaTestnet.d.ts +2 -2
- package/_types/chains/definitions/lisk.d.ts +171 -171
- package/_types/chains/definitions/liskSepolia.d.ts +192 -203
- package/_types/chains/definitions/liskSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/localhost.d.ts +2 -2
- package/_types/chains/definitions/lukso.d.ts +2 -2
- package/_types/chains/definitions/luksoTestnet.d.ts +2 -2
- package/_types/chains/definitions/lycan.d.ts +2 -2
- package/_types/chains/definitions/mainnet.d.ts +2 -2
- package/_types/chains/definitions/mandala.d.ts +2 -2
- package/_types/chains/definitions/manta.d.ts +2 -2
- package/_types/chains/definitions/mantaSepoliaTestnet.d.ts +2 -2
- package/_types/chains/definitions/mantaTestnet.d.ts +2 -2
- package/_types/chains/definitions/mantle.d.ts +2 -2
- package/_types/chains/definitions/mantleSepoliaTestnet.d.ts +2 -2
- package/_types/chains/definitions/mantleTestnet.d.ts +2 -2
- package/_types/chains/definitions/merlin.d.ts +2 -2
- package/_types/chains/definitions/metachain.d.ts +2 -2
- package/_types/chains/definitions/metachainIstanbul.d.ts +2 -2
- package/_types/chains/definitions/metalL2.d.ts +192 -203
- package/_types/chains/definitions/metalL2.d.ts.map +1 -1
- package/_types/chains/definitions/meter.d.ts +2 -2
- package/_types/chains/definitions/meterTestnet.d.ts +2 -2
- package/_types/chains/definitions/metis.d.ts +2 -2
- package/_types/chains/definitions/metisGoerli.d.ts +2 -2
- package/_types/chains/definitions/mev.d.ts +2 -2
- package/_types/chains/definitions/mevTestnet.d.ts +2 -2
- package/_types/chains/definitions/mintSepoliaTestnet.d.ts +2 -2
- package/_types/chains/definitions/mode.d.ts +2 -2
- package/_types/chains/definitions/modeTestnet.d.ts +2 -2
- package/_types/chains/definitions/moonbaseAlpha.d.ts +2 -2
- package/_types/chains/definitions/moonbeam.d.ts +2 -2
- package/_types/chains/definitions/moonbeamDev.d.ts +2 -2
- package/_types/chains/definitions/moonriver.d.ts +2 -2
- package/_types/chains/definitions/morphSepolia.d.ts +2 -2
- package/_types/chains/definitions/nautilus.d.ts +2 -2
- package/_types/chains/definitions/neonDevnet.d.ts +2 -2
- package/_types/chains/definitions/neonMainnet.d.ts +2 -2
- package/_types/chains/definitions/nexi.d.ts +2 -2
- package/_types/chains/definitions/nexilix.d.ts +2 -2
- package/_types/chains/definitions/oasisTestnet.d.ts +2 -2
- package/_types/chains/definitions/oasys.d.ts +2 -2
- package/_types/chains/definitions/okc.d.ts +2 -2
- package/_types/chains/definitions/oortmainnetDev.d.ts +2 -2
- package/_types/chains/definitions/opBNB.d.ts +2 -2
- package/_types/chains/definitions/opBNBTestnet.d.ts +2 -2
- package/_types/chains/definitions/optimism.d.ts +192 -203
- package/_types/chains/definitions/optimism.d.ts.map +1 -1
- package/_types/chains/definitions/optimismGoerli.d.ts +192 -203
- package/_types/chains/definitions/optimismGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/optimismSepolia.d.ts +192 -203
- package/_types/chains/definitions/optimismSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/otimDevnet.d.ts +2 -2
- package/_types/chains/definitions/palm.d.ts +2 -2
- package/_types/chains/definitions/palmTestnet.d.ts +2 -2
- package/_types/chains/definitions/pgn.d.ts +193 -204
- package/_types/chains/definitions/pgn.d.ts.map +1 -1
- package/_types/chains/definitions/pgnTestnet.d.ts +193 -204
- package/_types/chains/definitions/pgnTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/phoenix.d.ts +2 -2
- package/_types/chains/definitions/playfiAlbireo.d.ts +171 -171
- package/_types/chains/definitions/plinga.d.ts +2 -2
- package/_types/chains/definitions/plumeTestnet.d.ts +2 -2
- package/_types/chains/definitions/polygon.d.ts +2 -2
- package/_types/chains/definitions/polygonAmoy.d.ts +2 -2
- package/_types/chains/definitions/polygonMumbai.d.ts +2 -2
- package/_types/chains/definitions/polygonZkEvm.d.ts +2 -2
- package/_types/chains/definitions/polygonZkEvmCardona.d.ts +2 -2
- package/_types/chains/definitions/polygonZkEvmTestnet.d.ts +2 -2
- package/_types/chains/definitions/pulsechain.d.ts +2 -2
- package/_types/chains/definitions/pulsechainV4.d.ts +2 -2
- package/_types/chains/definitions/qMainnet.d.ts +2 -2
- package/_types/chains/definitions/qTestnet.d.ts +2 -2
- package/_types/chains/definitions/redstone.d.ts +2 -2
- package/_types/chains/definitions/reyaNetwork.d.ts +2 -2
- package/_types/chains/definitions/rollux.d.ts +2 -2
- package/_types/chains/definitions/rolluxTestnet.d.ts +2 -2
- package/_types/chains/definitions/ronin.d.ts +2 -2
- package/_types/chains/definitions/rootstock.d.ts +2 -2
- package/_types/chains/definitions/rootstockTestnet.d.ts +2 -2
- package/_types/chains/definitions/rss3.d.ts +192 -203
- package/_types/chains/definitions/rss3.d.ts.map +1 -1
- package/_types/chains/definitions/rss3Sepolia.d.ts +192 -203
- package/_types/chains/definitions/rss3Sepolia.d.ts.map +1 -1
- package/_types/chains/definitions/saigon.d.ts +2 -2
- package/_types/chains/definitions/sapphire.d.ts +2 -2
- package/_types/chains/definitions/sapphireTestnet.d.ts +2 -2
- package/_types/chains/definitions/satoshivm.d.ts +2 -2
- package/_types/chains/definitions/satoshivmTestnet.d.ts +2 -2
- package/_types/chains/definitions/scroll.d.ts +2 -2
- package/_types/chains/definitions/scrollSepolia.d.ts +2 -2
- package/_types/chains/definitions/sei.d.ts +2 -2
- package/_types/chains/definitions/seiDevnet.d.ts +2 -2
- package/_types/chains/definitions/sepolia.d.ts +2 -2
- package/_types/chains/definitions/shardeumSphinx.d.ts +2 -2
- package/_types/chains/definitions/shibarium.d.ts +2 -2
- package/_types/chains/definitions/shimmer.d.ts +2 -2
- package/_types/chains/definitions/shimmerTestnet.d.ts +2 -2
- package/_types/chains/definitions/skale/brawl.d.ts +2 -2
- package/_types/chains/definitions/skale/calypso.d.ts +2 -2
- package/_types/chains/definitions/skale/calypsoTestnet.d.ts +2 -2
- package/_types/chains/definitions/skale/cryptoBlades.d.ts +2 -2
- package/_types/chains/definitions/skale/cryptoColosseum.d.ts +2 -2
- package/_types/chains/definitions/skale/europa.d.ts +2 -2
- package/_types/chains/definitions/skale/europaTestnet.d.ts +2 -2
- package/_types/chains/definitions/skale/exorde.d.ts +2 -2
- package/_types/chains/definitions/skale/humanProtocol.d.ts +2 -2
- package/_types/chains/definitions/skale/nebula.d.ts +2 -2
- package/_types/chains/definitions/skale/nebulaTestnet.d.ts +2 -2
- package/_types/chains/definitions/skale/razor.d.ts +2 -2
- package/_types/chains/definitions/skale/titan.d.ts +2 -2
- package/_types/chains/definitions/skale/titanTestnet.d.ts +2 -2
- package/_types/chains/definitions/songbird.d.ts +2 -2
- package/_types/chains/definitions/songbirdTestnet.d.ts +2 -2
- package/_types/chains/definitions/spicy.d.ts +2 -2
- package/_types/chains/definitions/stratis.d.ts +2 -2
- package/_types/chains/definitions/syscoin.d.ts +2 -2
- package/_types/chains/definitions/syscoinTestnet.d.ts +2 -2
- package/_types/chains/definitions/taiko.d.ts +2 -2
- package/_types/chains/definitions/taikoHekla.d.ts +2 -2
- package/_types/chains/definitions/taikoJolnir.d.ts +2 -2
- package/_types/chains/definitions/taikoKatla.d.ts +2 -2
- package/_types/chains/definitions/taikoTestnetSepolia.d.ts +2 -2
- package/_types/chains/definitions/taraxa.d.ts +2 -2
- package/_types/chains/definitions/taraxaTestnet.d.ts +2 -2
- package/_types/chains/definitions/telcoinTestnet.d.ts +2 -2
- package/_types/chains/definitions/telos.d.ts +2 -2
- package/_types/chains/definitions/telosTestnet.d.ts +2 -2
- package/_types/chains/definitions/tenet.d.ts +2 -2
- package/_types/chains/definitions/thaiChain.d.ts +2 -2
- package/_types/chains/definitions/thunderTestnet.d.ts +2 -2
- package/_types/chains/definitions/vechain.d.ts +2 -2
- package/_types/chains/definitions/wanchain.d.ts +2 -2
- package/_types/chains/definitions/wanchainTestnet.d.ts +2 -2
- package/_types/chains/definitions/wemix.d.ts +2 -2
- package/_types/chains/definitions/wemixTestnet.d.ts +2 -2
- package/_types/chains/definitions/xLayer.d.ts +2 -2
- package/_types/chains/definitions/xLayerTestnet.d.ts +2 -2
- package/_types/chains/definitions/xdc.d.ts +2 -2
- package/_types/chains/definitions/xdcTestnet.d.ts +2 -2
- package/_types/chains/definitions/yooldoVerse.d.ts +2 -2
- package/_types/chains/definitions/yooldoVerseTestnet.d.ts +2 -2
- package/_types/chains/definitions/zetachain.d.ts +2 -2
- package/_types/chains/definitions/zetachainAthensTestnet.d.ts +2 -2
- package/_types/chains/definitions/zhejiang.d.ts +2 -2
- package/_types/chains/definitions/zilliqa.d.ts +2 -2
- package/_types/chains/definitions/zilliqaTestnet.d.ts +2 -2
- package/_types/chains/definitions/zkFair.d.ts +2 -2
- package/_types/chains/definitions/zkFairTestnet.d.ts +2 -2
- package/_types/chains/definitions/zkSync.d.ts +171 -171
- package/_types/chains/definitions/zkSyncInMemoryNode.d.ts +171 -171
- package/_types/chains/definitions/zkSyncLocalNode.d.ts +171 -171
- package/_types/chains/definitions/zkSyncSepoliaTestnet.d.ts +171 -171
- package/_types/chains/definitions/zkSyncTestnet.d.ts +171 -171
- package/_types/chains/definitions/zora.d.ts +192 -203
- package/_types/chains/definitions/zora.d.ts.map +1 -1
- package/_types/chains/definitions/zoraSepolia.d.ts +192 -203
- package/_types/chains/definitions/zoraSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/zoraTestnet.d.ts +192 -203
- package/_types/chains/definitions/zoraTestnet.d.ts.map +1 -1
- package/_types/clients/transports/fallback.d.ts +4 -4
- package/_types/clients/transports/fallback.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/index.d.ts +1 -1
- package/_types/index.d.ts.map +1 -1
- package/_types/op-stack/chainConfig.d.ts +191 -202
- package/_types/op-stack/chainConfig.d.ts.map +1 -1
- package/_types/op-stack/formatters.d.ts +191 -202
- package/_types/op-stack/formatters.d.ts.map +1 -1
- package/_types/types/block.d.ts +15 -15
- package/_types/types/block.d.ts.map +1 -1
- package/_types/types/chain.d.ts +28 -39
- package/_types/types/chain.d.ts.map +1 -1
- package/_types/types/eip1193.d.ts +2 -2
- package/_types/types/eip1193.d.ts.map +1 -1
- package/_types/types/fee.d.ts +20 -15
- package/_types/types/fee.d.ts.map +1 -1
- package/_types/types/rpc.d.ts +13 -13
- package/_types/types/rpc.d.ts.map +1 -1
- package/_types/types/transaction.d.ts +77 -77
- package/_types/types/transaction.d.ts.map +1 -1
- package/_types/types/transport.d.ts +1 -1
- package/_types/types/transport.d.ts.map +1 -1
- package/_types/types/utils.d.ts +9 -4
- package/_types/types/utils.d.ts.map +1 -1
- package/_types/utils/chain/extractChain.d.ts +4 -2
- package/_types/utils/chain/extractChain.d.ts.map +1 -1
- package/_types/utils/formatters/transaction.d.ts +64 -64
- package/_types/utils/formatters/transactionRequest.d.ts +40 -40
- package/_types/utils/index.d.ts +1 -1
- package/_types/utils/index.d.ts.map +1 -1
- package/_types/utils/transaction/parseTransaction.d.ts.map +1 -1
- package/_types/zksync/actions/sendTransaction.d.ts.map +1 -1
- package/_types/zksync/chainConfig.d.ts +170 -170
- package/_types/zksync/formatters.d.ts +170 -170
- package/celo/fees.ts +0 -1
- package/celo/formatters.ts +3 -3
- package/celo/serializers.ts +0 -1
- package/celo/types.ts +89 -96
- package/chains/definitions/defichainEvm.ts +1 -1
- package/chains/definitions/defichainEvmTestnet.ts +1 -1
- package/clients/transports/fallback.ts +13 -12
- package/errors/version.ts +1 -1
- package/index.ts +2 -0
- package/package.json +3 -2
- package/types/block.ts +16 -16
- package/types/chain.ts +44 -60
- package/types/eip1193.ts +2 -2
- package/types/fee.ts +23 -21
- package/types/rpc.ts +30 -31
- package/types/transaction.ts +216 -207
- package/types/transport.ts +3 -1
- package/types/utils.ts +14 -4
- package/utils/chain/extractChain.ts +2 -2
- package/utils/index.ts +3 -0
- package/utils/transaction/parseTransaction.ts +2 -2
- package/zksync/actions/sendTransaction.ts +1 -2
package/celo/fees.ts
CHANGED
package/celo/formatters.ts
CHANGED
@@ -22,10 +22,10 @@ export const formatters = {
|
|
22
22
|
exclude: ['difficulty', 'gasLimit', 'mixHash', 'nonce', 'uncles'],
|
23
23
|
format(
|
24
24
|
args: CeloBlockOverrides & {
|
25
|
-
transactions: Hash[] | CeloRpcTransaction[]
|
25
|
+
transactions: readonly Hash[] | readonly CeloRpcTransaction[]
|
26
26
|
},
|
27
27
|
): CeloBlockOverrides & {
|
28
|
-
transactions: Hash[] | CeloTransaction[]
|
28
|
+
transactions: readonly Hash[] | readonly CeloTransaction[]
|
29
29
|
} {
|
30
30
|
const transactions = args.transactions?.map((transaction) => {
|
31
31
|
if (typeof transaction === 'string') return transaction
|
@@ -41,7 +41,7 @@ export const formatters = {
|
|
41
41
|
}
|
42
42
|
: {}),
|
43
43
|
}
|
44
|
-
}) as Hash[] | CeloTransaction[]
|
44
|
+
}) as readonly Hash[] | readonly CeloTransaction[]
|
45
45
|
return {
|
46
46
|
randomness: args.randomness,
|
47
47
|
transactions,
|
package/celo/serializers.ts
CHANGED
package/celo/types.ts
CHANGED
@@ -7,19 +7,19 @@ import type {
|
|
7
7
|
Index,
|
8
8
|
Quantity,
|
9
9
|
RpcBlock,
|
10
|
-
RpcTransactionRequest as RpcTransactionRequest_,
|
11
|
-
RpcTransaction as RpcTransaction_,
|
12
10
|
TransactionType,
|
11
|
+
RpcTransaction as core_RpcTransaction,
|
12
|
+
RpcTransactionRequest as core_RpcTransactionRequest,
|
13
13
|
} from '../types/rpc.js'
|
14
14
|
import type {
|
15
15
|
AccessList,
|
16
16
|
TransactionBase,
|
17
17
|
TransactionRequestBase,
|
18
|
-
TransactionRequest as TransactionRequest_,
|
19
18
|
TransactionSerializable,
|
20
19
|
TransactionSerializableBase,
|
21
20
|
TransactionSerialized,
|
22
|
-
Transaction as
|
21
|
+
Transaction as core_Transaction,
|
22
|
+
TransactionRequest as core_TransactionRequest,
|
23
23
|
} from '../types/transaction.js'
|
24
24
|
import type { ExactPartial, NeverBy, OneOf } from '../types/utils.js'
|
25
25
|
|
@@ -36,15 +36,16 @@ export type CeloBlockOverrides = {
|
|
36
36
|
revealed: Hex
|
37
37
|
}
|
38
38
|
}
|
39
|
+
|
39
40
|
export type CeloBlock<
|
40
|
-
|
41
|
-
|
41
|
+
includeTransactions extends boolean = boolean,
|
42
|
+
blockTag extends BlockTag = BlockTag,
|
42
43
|
> = NeverBy<
|
43
44
|
Block<
|
44
45
|
bigint,
|
45
|
-
|
46
|
-
|
47
|
-
CeloTransaction<
|
46
|
+
includeTransactions,
|
47
|
+
blockTag,
|
48
|
+
CeloTransaction<blockTag extends 'pending' ? true : false>
|
48
49
|
>,
|
49
50
|
CeloBlockExclude
|
50
51
|
> &
|
@@ -57,31 +58,31 @@ export type CeloRpcBlockOverrides = {
|
|
57
58
|
}
|
58
59
|
}
|
59
60
|
export type CeloRpcBlock<
|
60
|
-
|
61
|
-
|
61
|
+
blockTag extends BlockTag = BlockTag,
|
62
|
+
includeTransactions extends boolean = boolean,
|
62
63
|
> = NeverBy<
|
63
64
|
RpcBlock<
|
64
|
-
|
65
|
-
|
66
|
-
RpcTransaction<
|
65
|
+
blockTag,
|
66
|
+
includeTransactions,
|
67
|
+
RpcTransaction<blockTag extends 'pending' ? true : false>
|
67
68
|
>,
|
68
69
|
CeloBlockExclude
|
69
70
|
> &
|
70
71
|
CeloRpcBlockOverrides
|
71
72
|
|
72
|
-
export type CeloRpcTransaction<
|
73
|
-
| RpcTransaction<
|
74
|
-
| RpcTransactionCIP42<
|
75
|
-
| RpcTransactionCIP64<
|
73
|
+
export type CeloRpcTransaction<isPending extends boolean = boolean> =
|
74
|
+
| RpcTransaction<isPending>
|
75
|
+
| RpcTransactionCIP42<isPending>
|
76
|
+
| RpcTransactionCIP64<isPending>
|
76
77
|
|
77
78
|
export type CeloRpcTransactionRequest =
|
78
79
|
| RpcTransactionRequest
|
79
80
|
| RpcTransactionRequestCIP64
|
80
81
|
|
81
|
-
export type CeloTransaction<
|
82
|
-
| Transaction<
|
83
|
-
| TransactionCIP42<
|
84
|
-
| TransactionCIP64<
|
82
|
+
export type CeloTransaction<isPending extends boolean = boolean> =
|
83
|
+
| Transaction<isPending>
|
84
|
+
| TransactionCIP42<isPending>
|
85
|
+
| TransactionCIP64<isPending>
|
85
86
|
|
86
87
|
export type CeloTransactionRequest =
|
87
88
|
| TransactionRequest
|
@@ -100,111 +101,103 @@ export type CeloTransactionSerialized<
|
|
100
101
|
|
101
102
|
export type CeloTransactionType = TransactionType | 'cip42' | 'cip64'
|
102
103
|
|
103
|
-
type RpcTransaction<
|
104
|
-
|
104
|
+
type RpcTransaction<isPending extends boolean = boolean> =
|
105
|
+
core_RpcTransaction<isPending> & {
|
105
106
|
feeCurrency: Address | null
|
106
107
|
gatewayFee: Hex | null
|
107
108
|
gatewayFeeRecipient: Address | null
|
108
109
|
}
|
109
110
|
|
110
|
-
type RpcTransactionRequest =
|
111
|
+
type RpcTransactionRequest = core_RpcTransactionRequest & {
|
111
112
|
feeCurrency?: Address | undefined
|
112
113
|
}
|
113
114
|
|
114
|
-
export type RpcTransactionCIP42<
|
115
|
-
TransactionBase<Quantity, Index,
|
115
|
+
export type RpcTransactionCIP42<isPending extends boolean = boolean> = Omit<
|
116
|
+
TransactionBase<Quantity, Index, isPending>,
|
116
117
|
'typeHex'
|
117
|
-
> &
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
}
|
118
|
+
> & {
|
119
|
+
feeCurrency: Address | null
|
120
|
+
gatewayFee: Hex | null
|
121
|
+
gatewayFeeRecipient: Address | null
|
122
|
+
type: '0x7c'
|
123
|
+
} & FeeValuesEIP1559<Quantity>
|
124
124
|
|
125
|
-
export type RpcTransactionCIP64<
|
126
|
-
TransactionBase<Quantity, Index,
|
125
|
+
export type RpcTransactionCIP64<isPending extends boolean = boolean> = Omit<
|
126
|
+
TransactionBase<Quantity, Index, isPending>,
|
127
127
|
'typeHex'
|
128
|
-
> &
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
}
|
128
|
+
> & {
|
129
|
+
feeCurrency: Address | null
|
130
|
+
gatewayFee?: undefined
|
131
|
+
gatewayFeeRecipient?: undefined
|
132
|
+
type: '0x7b'
|
133
|
+
} & FeeValuesEIP1559<Quantity>
|
135
134
|
|
136
135
|
export type RpcTransactionRequestCIP64 = TransactionRequestBase<
|
137
136
|
Quantity,
|
138
137
|
Index
|
139
|
-
> &
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
}
|
138
|
+
> & {
|
139
|
+
accessList?: AccessList | undefined
|
140
|
+
feeCurrency?: Address | undefined
|
141
|
+
type?: '0x7b' | undefined
|
142
|
+
} & ExactPartial<FeeValuesEIP1559<Quantity>>
|
145
143
|
|
146
|
-
type Transaction<
|
144
|
+
type Transaction<isPending extends boolean = boolean> = core_Transaction<
|
147
145
|
bigint,
|
148
146
|
number,
|
149
|
-
|
147
|
+
isPending
|
150
148
|
> & {
|
151
149
|
feeCurrency: Address | null
|
152
150
|
gatewayFee?: undefined
|
153
151
|
gatewayFeeRecipient?: undefined
|
154
152
|
}
|
155
153
|
|
156
|
-
export type TransactionCIP42<
|
157
|
-
TransactionBase<bigint, number,
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
type TransactionRequest = TransactionRequest_ & {
|
154
|
+
export type TransactionCIP42<isPending extends boolean = boolean> =
|
155
|
+
TransactionBase<bigint, number, isPending> & {
|
156
|
+
feeCurrency: Address | null
|
157
|
+
gatewayFee: bigint | null
|
158
|
+
gatewayFeeRecipient: Address | null
|
159
|
+
type: 'cip42'
|
160
|
+
} & FeeValuesEIP1559
|
161
|
+
|
162
|
+
export type TransactionCIP64<isPending extends boolean = boolean> =
|
163
|
+
TransactionBase<bigint, number, isPending> & {
|
164
|
+
feeCurrency: Address | null
|
165
|
+
gatewayFee?: undefined
|
166
|
+
gatewayFeeRecipient?: undefined
|
167
|
+
type: 'cip64'
|
168
|
+
} & FeeValuesEIP1559
|
169
|
+
|
170
|
+
type TransactionRequest = core_TransactionRequest & {
|
175
171
|
feeCurrency?: Address | undefined
|
176
172
|
}
|
177
173
|
|
178
|
-
export type TransactionRequestCIP64 = TransactionRequestBase &
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
}
|
174
|
+
export type TransactionRequestCIP64 = TransactionRequestBase & {
|
175
|
+
accessList?: AccessList | undefined
|
176
|
+
feeCurrency?: Address | undefined
|
177
|
+
type?: 'cip64' | undefined
|
178
|
+
} & ExactPartial<FeeValuesEIP1559>
|
184
179
|
|
185
180
|
export type TransactionSerializableCIP42<
|
186
|
-
|
187
|
-
|
188
|
-
> = TransactionSerializableBase<
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
}
|
181
|
+
quantity = bigint,
|
182
|
+
index = number,
|
183
|
+
> = TransactionSerializableBase<quantity, index> & {
|
184
|
+
accessList?: AccessList | undefined
|
185
|
+
feeCurrency?: Address | undefined
|
186
|
+
gatewayFeeRecipient?: Address | undefined
|
187
|
+
gatewayFee?: quantity | undefined
|
188
|
+
chainId: number
|
189
|
+
type?: 'cip42' | undefined
|
190
|
+
} & ExactPartial<FeeValuesEIP1559<quantity>>
|
197
191
|
|
198
192
|
export type TransactionSerializableCIP64<
|
199
|
-
|
200
|
-
|
201
|
-
> = TransactionSerializableBase<
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
}
|
193
|
+
quantity = bigint,
|
194
|
+
index = number,
|
195
|
+
> = TransactionSerializableBase<quantity, index> & {
|
196
|
+
accessList?: AccessList | undefined
|
197
|
+
feeCurrency?: Address | undefined
|
198
|
+
chainId: number
|
199
|
+
type?: 'cip64' | undefined
|
200
|
+
} & ExactPartial<FeeValuesEIP1559<quantity>>
|
208
201
|
|
209
202
|
export type TransactionSerializedCIP42 = `0x7c${string}`
|
210
203
|
export type TransactionSerializedCIP64 = `0x7b${string}`
|
@@ -80,20 +80,21 @@ export type FallbackTransportConfig = {
|
|
80
80
|
retryDelay?: TransportConfig['retryDelay'] | undefined
|
81
81
|
}
|
82
82
|
|
83
|
-
export type FallbackTransport<
|
84
|
-
Transport
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
83
|
+
export type FallbackTransport<
|
84
|
+
transports extends readonly Transport[] = readonly Transport[],
|
85
|
+
> = Transport<
|
86
|
+
'fallback',
|
87
|
+
{
|
88
|
+
onResponse: (fn: OnResponseFn) => void
|
89
|
+
transports: {
|
90
|
+
[key in keyof transports]: ReturnType<transports[key]>
|
91
91
|
}
|
92
|
-
|
92
|
+
}
|
93
|
+
>
|
93
94
|
|
94
95
|
export type FallbackTransportErrorType = CreateTransportErrorType | ErrorType
|
95
96
|
|
96
|
-
export function fallback<const transports extends Transport[]>(
|
97
|
+
export function fallback<const transports extends readonly Transport[]>(
|
97
98
|
transports_: transports,
|
98
99
|
config: FallbackTransportConfig = {},
|
99
100
|
): FallbackTransport<transports> {
|
@@ -205,10 +206,10 @@ export function rankTransports({
|
|
205
206
|
}: {
|
206
207
|
chain?: Chain | undefined
|
207
208
|
interval: RankOptions['interval']
|
208
|
-
onTransports: (transports: Transport[]) => void
|
209
|
+
onTransports: (transports: readonly Transport[]) => void
|
209
210
|
sampleCount?: RankOptions['sampleCount'] | undefined
|
210
211
|
timeout?: RankOptions['timeout'] | undefined
|
211
|
-
transports: Transport[]
|
212
|
+
transports: readonly Transport[]
|
212
213
|
weights?: RankOptions['weights'] | undefined
|
213
214
|
}) {
|
214
215
|
const { stability: stabilityWeight = 0.7, latency: latencyWeight = 0.3 } =
|
package/errors/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = '2.13.
|
1
|
+
export const version = '2.13.7'
|
package/index.ts
CHANGED
@@ -1617,7 +1617,9 @@ export {
|
|
1617
1617
|
export {
|
1618
1618
|
type DomainSeparatorErrorType,
|
1619
1619
|
type GetTypesForEIP712DomainErrorType,
|
1620
|
+
type SerializeTypedDataErrorType,
|
1620
1621
|
type ValidateTypedDataErrorType,
|
1622
|
+
serializeTypedData,
|
1621
1623
|
validateTypedData,
|
1622
1624
|
domainSeparator,
|
1623
1625
|
getTypesForEIP712Domain,
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "viem",
|
3
3
|
"description": "TypeScript Interface for Ethereum",
|
4
|
-
"version": "2.13.
|
4
|
+
"version": "2.13.7",
|
5
5
|
"main": "./_cjs/index.js",
|
6
6
|
"module": "./_esm/index.js",
|
7
7
|
"types": "./_types/index.d.ts",
|
@@ -170,6 +170,7 @@
|
|
170
170
|
"ethereum",
|
171
171
|
"dapps",
|
172
172
|
"wallet",
|
173
|
-
"web3"
|
173
|
+
"web3",
|
174
|
+
"typescript"
|
174
175
|
]
|
175
176
|
}
|
package/types/block.ts
CHANGED
@@ -5,7 +5,7 @@ import type { Transaction } from './transaction.js'
|
|
5
5
|
import type { Withdrawal } from './withdrawal.js'
|
6
6
|
|
7
7
|
export type Block<
|
8
|
-
|
8
|
+
quantity = bigint,
|
9
9
|
TIncludeTransactions extends boolean = boolean,
|
10
10
|
TBlockTag extends BlockTag = BlockTag,
|
11
11
|
TTransaction = Transaction<
|
@@ -15,19 +15,19 @@ export type Block<
|
|
15
15
|
>,
|
16
16
|
> = {
|
17
17
|
/** Base fee per gas */
|
18
|
-
baseFeePerGas:
|
18
|
+
baseFeePerGas: quantity | null
|
19
19
|
/** Total used blob gas by all transactions in this block */
|
20
|
-
blobGasUsed:
|
20
|
+
blobGasUsed: quantity
|
21
21
|
/** Difficulty for this block */
|
22
|
-
difficulty:
|
22
|
+
difficulty: quantity
|
23
23
|
/** Excess blob gas */
|
24
|
-
excessBlobGas:
|
24
|
+
excessBlobGas: quantity
|
25
25
|
/** "Extra data" field of this block */
|
26
26
|
extraData: Hex
|
27
27
|
/** Maximum gas allowed in this block */
|
28
|
-
gasLimit:
|
28
|
+
gasLimit: quantity
|
29
29
|
/** Total used gas by all transactions in this block */
|
30
|
-
gasUsed:
|
30
|
+
gasUsed: quantity
|
31
31
|
/** Block hash or `null` if pending */
|
32
32
|
hash: TBlockTag extends 'pending' ? null : Hash
|
33
33
|
/** Logs bloom filter or `null` if pending */
|
@@ -39,7 +39,7 @@ export type Block<
|
|
39
39
|
/** Proof-of-work hash or `null` if pending */
|
40
40
|
nonce: TBlockTag extends 'pending' ? null : Hex
|
41
41
|
/** Block number or `null` if pending */
|
42
|
-
number: TBlockTag extends 'pending' ? null :
|
42
|
+
number: TBlockTag extends 'pending' ? null : quantity
|
43
43
|
/** Parent block hash */
|
44
44
|
parentHash: Hash
|
45
45
|
/** Root of the this block’s receipts trie */
|
@@ -48,13 +48,13 @@ export type Block<
|
|
48
48
|
/** SHA3 of the uncles data in this block */
|
49
49
|
sha3Uncles: Hash
|
50
50
|
/** Size of this block in bytes */
|
51
|
-
size:
|
51
|
+
size: quantity
|
52
52
|
/** Root of this block’s final state trie */
|
53
53
|
stateRoot: Hash
|
54
54
|
/** Unix timestamp of when this block was collated */
|
55
|
-
timestamp:
|
55
|
+
timestamp: quantity
|
56
56
|
/** Total difficulty of the chain until this block */
|
57
|
-
totalDifficulty:
|
57
|
+
totalDifficulty: quantity | null
|
58
58
|
/** List of transaction objects or hashes */
|
59
59
|
transactions: TIncludeTransactions extends true ? TTransaction[] : Hash[]
|
60
60
|
/** Root of this block’s transaction trie */
|
@@ -67,13 +67,13 @@ export type Block<
|
|
67
67
|
withdrawalsRoot?: Hex | undefined
|
68
68
|
}
|
69
69
|
|
70
|
-
export type BlockIdentifier<
|
70
|
+
export type BlockIdentifier<quantity = bigint> = {
|
71
71
|
/** Whether or not to throw an error if the block is not in the canonical chain as described below. Only allowed in conjunction with the blockHash tag. Defaults to false. */
|
72
72
|
requireCanonical?: boolean | undefined
|
73
73
|
} & (
|
74
74
|
| {
|
75
75
|
/** The block in the canonical chain with this number */
|
76
|
-
blockNumber: BlockNumber<
|
76
|
+
blockNumber: BlockNumber<quantity>
|
77
77
|
}
|
78
78
|
| {
|
79
79
|
/** The block uniquely identified by this hash. The `blockNumber` and `blockHash` properties are mutually exclusive; exactly one of them must be set. */
|
@@ -81,12 +81,12 @@ export type BlockIdentifier<TQuantity = bigint> = {
|
|
81
81
|
}
|
82
82
|
)
|
83
83
|
|
84
|
-
export type BlockNumber<
|
84
|
+
export type BlockNumber<quantity = bigint> = quantity
|
85
85
|
|
86
86
|
export type BlockTag = 'latest' | 'earliest' | 'pending' | 'safe' | 'finalized'
|
87
87
|
|
88
88
|
export type Uncle<
|
89
|
-
|
89
|
+
quantity = bigint,
|
90
90
|
TIncludeTransactions extends boolean = boolean,
|
91
91
|
TBlockTag extends BlockTag = BlockTag,
|
92
92
|
TTransaction = Transaction<
|
@@ -94,4 +94,4 @@ export type Uncle<
|
|
94
94
|
number,
|
95
95
|
TBlockTag extends 'pending' ? true : false
|
96
96
|
>,
|
97
|
-
> = Block<
|
97
|
+
> = Block<quantity, TIncludeTransactions, TBlockTag, TTransaction>
|
package/types/chain.ts
CHANGED
@@ -61,41 +61,12 @@ export type Chain<
|
|
61
61
|
|
62
62
|
/** Custom chain data. */
|
63
63
|
custom?: custom | undefined
|
64
|
-
/**
|
65
|
-
* Modifies how chain data structures (ie. Blocks, Transactions, etc)
|
66
|
-
* are formatted & typed.
|
67
|
-
*/
|
68
|
-
formatters?: formatters | undefined
|
69
|
-
/** Modifies how data (ie. Transactions) is serialized. */
|
70
|
-
serializers?: ChainSerializers<formatters> | undefined
|
71
64
|
/** Modifies how fees are derived. */
|
72
65
|
fees?: ChainFees<formatters | undefined> | undefined
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
type ChainBlockExplorer = {
|
79
|
-
name: string
|
80
|
-
url: string
|
81
|
-
apiUrl?: string | undefined
|
82
|
-
}
|
83
|
-
|
84
|
-
export type ChainContract = {
|
85
|
-
address: Address
|
86
|
-
blockCreated?: number | undefined
|
87
|
-
}
|
88
|
-
|
89
|
-
type ChainNativeCurrency = {
|
90
|
-
name: string
|
91
|
-
/** 2-6 characters long */
|
92
|
-
symbol: string
|
93
|
-
decimals: number
|
94
|
-
}
|
95
|
-
|
96
|
-
type ChainRpcUrls = {
|
97
|
-
http: readonly string[]
|
98
|
-
webSocket?: readonly string[] | undefined
|
66
|
+
/** Modifies how data is formatted and typed (e.g. blocks and transactions) */
|
67
|
+
formatters?: formatters | undefined
|
68
|
+
/** Modifies how data is serialized (e.g. transactions). */
|
69
|
+
serializers?: ChainSerializers<formatters> | undefined
|
99
70
|
}
|
100
71
|
|
101
72
|
/////////////////////////////////////////////////////////////////////
|
@@ -129,17 +100,13 @@ export type ChainFees<
|
|
129
100
|
* Overrides the return value in the [`estimateFeesPerGas` Action](/docs/actions/public/estimateFeesPerGas).
|
130
101
|
*/
|
131
102
|
estimateFeesPerGas?:
|
132
|
-
| ChainEstimateFeesPerGasFn<formatters>
|
133
103
|
| bigint
|
104
|
+
| ((
|
105
|
+
args: ChainEstimateFeesPerGasFnParameters<formatters>,
|
106
|
+
) => Promise<EstimateFeesPerGasReturnType | null>)
|
134
107
|
| undefined
|
135
108
|
}
|
136
109
|
|
137
|
-
export type ChainEstimateFeesPerGasFn<
|
138
|
-
formatters extends ChainFormatters | undefined = ChainFormatters | undefined,
|
139
|
-
> = (
|
140
|
-
args: ChainEstimateFeesPerGasFnParameters<formatters>,
|
141
|
-
) => Promise<EstimateFeesPerGasReturnType | null>
|
142
|
-
|
143
110
|
export type ChainFormatters = {
|
144
111
|
/** Modifies how the Block structure is formatted & typed. */
|
145
112
|
block?: ChainFormatter<'block'> | undefined
|
@@ -158,18 +125,18 @@ export type ChainFormatter<type extends string = string> = {
|
|
158
125
|
|
159
126
|
export type ChainSerializers<
|
160
127
|
formatters extends ChainFormatters | undefined = undefined,
|
128
|
+
///
|
129
|
+
transaction extends
|
130
|
+
TransactionSerializableGeneric = formatters extends ChainFormatters
|
131
|
+
? formatters['transactionRequest'] extends ChainFormatter
|
132
|
+
? TransactionSerializableGeneric &
|
133
|
+
Parameters<formatters['transactionRequest']['format']>[0]
|
134
|
+
: TransactionSerializable
|
135
|
+
: TransactionSerializable,
|
161
136
|
> = {
|
162
137
|
/** Modifies how Transactions are serialized. */
|
163
138
|
transaction?:
|
164
|
-
| SerializeTransactionFn<
|
165
|
-
formatters extends ChainFormatters
|
166
|
-
? formatters['transactionRequest'] extends ChainFormatter
|
167
|
-
? TransactionSerializableGeneric &
|
168
|
-
Parameters<formatters['transactionRequest']['format']>[0]
|
169
|
-
: TransactionSerializable
|
170
|
-
: TransactionSerializable,
|
171
|
-
TransactionSerializedGeneric
|
172
|
-
>
|
139
|
+
| SerializeTransactionFn<transaction, TransactionSerializedGeneric>
|
173
140
|
| undefined
|
174
141
|
}
|
175
142
|
|
@@ -201,24 +168,15 @@ export type ChainFeesFnParameters<
|
|
201
168
|
export type ChainEstimateFeesPerGasFnParameters<
|
202
169
|
formatters extends ChainFormatters | undefined = ChainFormatters | undefined,
|
203
170
|
> = {
|
204
|
-
/**
|
205
|
-
* A function to multiply the base fee based on the `baseFeeMultiplier` value.
|
206
|
-
*/
|
171
|
+
/** A function to multiply the base fee based on the `baseFeeMultiplier` value. */
|
207
172
|
multiply(x: bigint): bigint
|
208
|
-
/**
|
209
|
-
* The type of fees to return.
|
210
|
-
*/
|
173
|
+
/** The type of fees to return. */
|
211
174
|
type: FeeValuesType
|
212
175
|
} & ChainFeesFnParameters<formatters>
|
213
176
|
|
214
177
|
/////////////////////////////////////////////////////////////////////
|
215
178
|
// Utils
|
216
179
|
|
217
|
-
export type ExtractChain<
|
218
|
-
chains extends readonly Chain[],
|
219
|
-
chainId extends Chain['id'],
|
220
|
-
> = Extract<chains[number], { id: chainId }>
|
221
|
-
|
222
180
|
export type ExtractChainFormatterExclude<
|
223
181
|
chain extends Chain | undefined,
|
224
182
|
type extends keyof ChainFormatters,
|
@@ -267,3 +225,29 @@ export type GetChainParameter<
|
|
267
225
|
> = IsUndefined<chain> extends true
|
268
226
|
? { chain: chainOverride | null }
|
269
227
|
: { chain?: chainOverride | null | undefined }
|
228
|
+
|
229
|
+
/////////////////////////////////////////////////////////////////////
|
230
|
+
// Constants
|
231
|
+
|
232
|
+
type ChainBlockExplorer = {
|
233
|
+
name: string
|
234
|
+
url: string
|
235
|
+
apiUrl?: string | undefined
|
236
|
+
}
|
237
|
+
|
238
|
+
export type ChainContract = {
|
239
|
+
address: Address
|
240
|
+
blockCreated?: number | undefined
|
241
|
+
}
|
242
|
+
|
243
|
+
type ChainNativeCurrency = {
|
244
|
+
name: string
|
245
|
+
/** 2-6 characters long */
|
246
|
+
symbol: string
|
247
|
+
decimals: number
|
248
|
+
}
|
249
|
+
|
250
|
+
type ChainRpcUrls = {
|
251
|
+
http: readonly string[]
|
252
|
+
webSocket?: readonly string[] | undefined
|
253
|
+
}
|