@initia/initia.js 1.0.20 → 2.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +232 -154
- package/dist/abi-helpers-DdwdqhMQ.mjs +51 -0
- package/dist/abi-helpers-DdwdqhMQ.mjs.map +1 -0
- package/dist/address-DwAkzgJk.mjs +156 -0
- package/dist/address-DwAkzgJk.mjs.map +1 -0
- package/dist/address-profile-DjdaEBxo.d.mts +112 -0
- package/dist/address-profile-DlAFvgdg.mjs +241 -0
- package/dist/address-profile-DlAFvgdg.mjs.map +1 -0
- package/dist/amino-CMQN7Frn.mjs +220 -0
- package/dist/amino-CMQN7Frn.mjs.map +1 -0
- package/dist/amino_pb-Bi6YDY_U.mjs +88 -0
- package/dist/amino_pb-Bi6YDY_U.mjs.map +1 -0
- package/dist/amount-B0J9TTNF.mjs +90 -0
- package/dist/amount-B0J9TTNF.mjs.map +1 -0
- package/dist/any-DElm7qF7.mjs +19 -0
- package/dist/any-DElm7qF7.mjs.map +1 -0
- package/dist/auth_pb-DN4URGLh.mjs +26 -0
- package/dist/auth_pb-DN4URGLh.mjs.map +1 -0
- package/dist/auth_pb-DfXfdvrY.mjs +16 -0
- package/dist/auth_pb-DfXfdvrY.mjs.map +1 -0
- package/dist/base-provider-CLnd7kte.d.mts +68 -0
- package/dist/base-provider-LNp6K7Mt.mjs +96 -0
- package/dist/base-provider-LNp6K7Mt.mjs.map +1 -0
- package/dist/bcs-DiRcL4n9.mjs +533 -0
- package/dist/bcs-DiRcL4n9.mjs.map +1 -0
- package/dist/bridge-DL-q-7P7.mjs +1222 -0
- package/dist/bridge-DL-q-7P7.mjs.map +1 -0
- package/dist/bridge-cQoOjppA.d.mts +606 -0
- package/dist/broadcast-De8MdmYa.mjs +974 -0
- package/dist/broadcast-De8MdmYa.mjs.map +1 -0
- package/dist/chain-utils-C61cU5nd.mjs +139 -0
- package/dist/chain-utils-C61cU5nd.mjs.map +1 -0
- package/dist/codegen/cli.d.mts +1 -0
- package/dist/codegen/cli.mjs +274 -0
- package/dist/codegen/cli.mjs.map +1 -0
- package/dist/coin-DPWbtAFA.mjs +543 -0
- package/dist/coin-DPWbtAFA.mjs.map +1 -0
- package/dist/coin_pb--WuIu4sX.mjs +25 -0
- package/dist/coin_pb--WuIu4sX.mjs.map +1 -0
- package/dist/composite-provider-DbxNrdny.mjs +203 -0
- package/dist/composite-provider-DbxNrdny.mjs.map +1 -0
- package/dist/constants-W6V0E-3W.mjs +42 -0
- package/dist/constants-W6V0E-3W.mjs.map +1 -0
- package/dist/contract-Dpvu4wLO.mjs +657 -0
- package/dist/contract-Dpvu4wLO.mjs.map +1 -0
- package/dist/cosmos-Bqh8qNfP.mjs +540 -0
- package/dist/cosmos-Bqh8qNfP.mjs.map +1 -0
- package/dist/cosmos-registry-provider-DCrEEhJ-.d.mts +123 -0
- package/dist/cw20-BTpdgMXC.mjs +63 -0
- package/dist/cw20-BTpdgMXC.mjs.map +1 -0
- package/dist/decode-CXGawqIZ.mjs +29 -0
- package/dist/decode-CXGawqIZ.mjs.map +1 -0
- package/dist/entry.bridge.browser.d.mts +21 -0
- package/dist/entry.bridge.browser.mjs +25 -0
- package/dist/entry.bridge.browser.mjs.map +1 -0
- package/dist/entry.bridge.node.d.mts +21 -0
- package/dist/entry.bridge.node.mjs +25 -0
- package/dist/entry.bridge.node.mjs.map +1 -0
- package/dist/entry.browser.d.mts +49 -0
- package/dist/entry.browser.mjs +46 -0
- package/dist/entry.browser.mjs.map +1 -0
- package/dist/entry.chain.initia.browser.d.mts +8 -0
- package/dist/entry.chain.initia.browser.mjs +17 -0
- package/dist/entry.chain.initia.browser.mjs.map +1 -0
- package/dist/entry.chain.initia.node.d.mts +8 -0
- package/dist/entry.chain.initia.node.mjs +17 -0
- package/dist/entry.chain.initia.node.mjs.map +1 -0
- package/dist/entry.chain.minievm.browser.d.mts +8 -0
- package/dist/entry.chain.minievm.browser.mjs +17 -0
- package/dist/entry.chain.minievm.browser.mjs.map +1 -0
- package/dist/entry.chain.minievm.node.d.mts +8 -0
- package/dist/entry.chain.minievm.node.mjs +17 -0
- package/dist/entry.chain.minievm.node.mjs.map +1 -0
- package/dist/entry.chain.minimove.browser.d.mts +8 -0
- package/dist/entry.chain.minimove.browser.mjs +17 -0
- package/dist/entry.chain.minimove.browser.mjs.map +1 -0
- package/dist/entry.chain.minimove.node.d.mts +8 -0
- package/dist/entry.chain.minimove.node.mjs +17 -0
- package/dist/entry.chain.minimove.node.mjs.map +1 -0
- package/dist/entry.chain.miniwasm.browser.d.mts +8 -0
- package/dist/entry.chain.miniwasm.browser.mjs +17 -0
- package/dist/entry.chain.miniwasm.browser.mjs.map +1 -0
- package/dist/entry.chain.miniwasm.node.d.mts +8 -0
- package/dist/entry.chain.miniwasm.node.mjs +17 -0
- package/dist/entry.chain.miniwasm.node.mjs.map +1 -0
- package/dist/entry.client.browser-CQsfUmx1.d.mts +1 -0
- package/dist/entry.client.browser.d.mts +3 -0
- package/dist/entry.client.browser.mjs +6 -0
- package/dist/entry.client.node.d.mts +3 -0
- package/dist/entry.client.node.mjs +6 -0
- package/dist/entry.codegen.d.mts +251 -0
- package/dist/entry.codegen.mjs +2 -0
- package/dist/entry.cosmos.d.mts +2 -0
- package/dist/entry.cosmos.mjs +355 -0
- package/dist/entry.cosmos.mjs.map +1 -0
- package/dist/entry.events.d.mts +338 -0
- package/dist/entry.events.mjs +383 -0
- package/dist/entry.events.mjs.map +1 -0
- package/dist/entry.evm.d.mts +544 -0
- package/dist/entry.evm.mjs +761 -0
- package/dist/entry.evm.mjs.map +1 -0
- package/dist/entry.modules.d.mts +2 -0
- package/dist/entry.modules.mjs +7 -0
- package/dist/entry.move.d.mts +523 -0
- package/dist/entry.move.mjs +7 -0
- package/dist/entry.msgs.d.mts +2 -0
- package/dist/entry.msgs.mjs +3 -0
- package/dist/entry.node.d.mts +118 -0
- package/dist/entry.node.mjs +278 -0
- package/dist/entry.node.mjs.map +1 -0
- package/dist/entry.provider.d.mts +355 -0
- package/dist/entry.provider.mjs +416 -0
- package/dist/entry.provider.mjs.map +1 -0
- package/dist/entry.signer.d.mts +2 -0
- package/dist/entry.signer.mjs +674 -0
- package/dist/entry.signer.mjs.map +1 -0
- package/dist/entry.tx.d.mts +2 -0
- package/dist/entry.tx.mjs +6 -0
- package/dist/entry.usernames.d.mts +42 -0
- package/dist/entry.usernames.mjs +2 -0
- package/dist/entry.util.d.mts +103 -0
- package/dist/entry.util.mjs +70 -0
- package/dist/entry.util.mjs.map +1 -0
- package/dist/entry.vip.d.mts +1917 -0
- package/dist/entry.vip.mjs +3793 -0
- package/dist/entry.vip.mjs.map +1 -0
- package/dist/entry.wasm.d.mts +447 -0
- package/dist/entry.wasm.mjs +600 -0
- package/dist/entry.wasm.mjs.map +1 -0
- package/dist/erc20-CDs3j7vt.mjs +168 -0
- package/dist/erc20-CDs3j7vt.mjs.map +1 -0
- package/dist/errors-CN1MFOLv.mjs +253 -0
- package/dist/errors-CN1MFOLv.mjs.map +1 -0
- package/dist/evm-rpc-BxpgXIAF.mjs +338 -0
- package/dist/evm-rpc-BxpgXIAF.mjs.map +1 -0
- package/dist/fetch-Bq_aay6V.mjs +55 -0
- package/dist/fetch-Bq_aay6V.mjs.map +1 -0
- package/dist/fungible-asset-aHBTYpoT.mjs +64 -0
- package/dist/fungible-asset-aHBTYpoT.mjs.map +1 -0
- package/dist/get-tx-0P40z_A4.mjs +99 -0
- package/dist/get-tx-0P40z_A4.mjs.map +1 -0
- package/dist/grpc-client-DGyZjGcT.mjs +254 -0
- package/dist/grpc-client-DGyZjGcT.mjs.map +1 -0
- package/dist/hash-D40mxOlF.mjs +14 -0
- package/dist/hash-D40mxOlF.mjs.map +1 -0
- package/dist/hash-Doo89wm3.d.mts +31 -0
- package/dist/headers-CMO7ia_D.mjs +83 -0
- package/dist/headers-CMO7ia_D.mjs.map +1 -0
- package/dist/http-client-BrdVurTg.mjs +40 -0
- package/dist/http-client-BrdVurTg.mjs.map +1 -0
- package/dist/initia-B8l_x6sT.mjs +426 -0
- package/dist/initia-B8l_x6sT.mjs.map +1 -0
- package/dist/initia-Cj4bZ1dR.mjs +26 -0
- package/dist/initia-Cj4bZ1dR.mjs.map +1 -0
- package/dist/json-CGak0DqP.mjs +41 -0
- package/dist/json-CGak0DqP.mjs.map +1 -0
- package/dist/minievm-BAnGHa00.mjs +39 -0
- package/dist/minievm-BAnGHa00.mjs.map +1 -0
- package/dist/minievm-DZ8AhnD8.mjs +61 -0
- package/dist/minievm-DZ8AhnD8.mjs.map +1 -0
- package/dist/minimove-B8U85g-_.mjs +23 -0
- package/dist/minimove-B8U85g-_.mjs.map +1 -0
- package/dist/minimove-BBXTyhIv.mjs +24 -0
- package/dist/minimove-BBXTyhIv.mjs.map +1 -0
- package/dist/miniwasm-CB0XfStg.mjs +50 -0
- package/dist/miniwasm-CB0XfStg.mjs.map +1 -0
- package/dist/miniwasm-QdyYzmQ1.mjs +139 -0
- package/dist/miniwasm-QdyYzmQ1.mjs.map +1 -0
- package/dist/move-BaCv0oRX.mjs +64 -0
- package/dist/move-BaCv0oRX.mjs.map +1 -0
- package/dist/msg_pb-DxYxctLM.mjs +11 -0
- package/dist/msg_pb-DxYxctLM.mjs.map +1 -0
- package/dist/pagination_pb-DlkDYAcN.mjs +18 -0
- package/dist/pagination_pb-DlkDYAcN.mjs.map +1 -0
- package/dist/public-key-DV-uGaUC.mjs +550 -0
- package/dist/public-key-DV-uGaUC.mjs.map +1 -0
- package/dist/query_pb-cZ3szo3y.mjs +20 -0
- package/dist/query_pb-cZ3szo3y.mjs.map +1 -0
- package/dist/registry-provider-NzblVZQr.mjs +368 -0
- package/dist/registry-provider-NzblVZQr.mjs.map +1 -0
- package/dist/resolve-DdtY7KDz.mjs +50 -0
- package/dist/resolve-DdtY7KDz.mjs.map +1 -0
- package/dist/rolldown-runtime-wcPFST8Q.mjs +13 -0
- package/dist/service-BaMjxPNo.mjs +412 -0
- package/dist/service-BaMjxPNo.mjs.map +1 -0
- package/dist/service-CVFxsMp_.d.mts +151 -0
- package/dist/service_pb-Be-O-2-c.mjs +121 -0
- package/dist/service_pb-Be-O-2-c.mjs.map +1 -0
- package/dist/sign-DqagxLcg.mjs +212 -0
- package/dist/sign-DqagxLcg.mjs.map +1 -0
- package/dist/transport-common-BsPYcFQl.mjs +182 -0
- package/dist/transport-common-BsPYcFQl.mjs.map +1 -0
- package/dist/transport.browser-CCUWv3ta.mjs +31 -0
- package/dist/transport.browser-CCUWv3ta.mjs.map +1 -0
- package/dist/transport.node-DXcJtCnx.mjs +33 -0
- package/dist/transport.node-DXcJtCnx.mjs.map +1 -0
- package/dist/tx_pb-BJzY8SXE.mjs +38 -0
- package/dist/tx_pb-BJzY8SXE.mjs.map +1 -0
- package/dist/tx_pb-BVCXH992.mjs +39 -0
- package/dist/tx_pb-BVCXH992.mjs.map +1 -0
- package/dist/tx_pb-CnFNMLIq.mjs +107 -0
- package/dist/tx_pb-CnFNMLIq.mjs.map +1 -0
- package/dist/tx_pb-DYspoJTt.mjs +50 -0
- package/dist/tx_pb-DYspoJTt.mjs.map +1 -0
- package/dist/tx_pb-u3CoQYge.mjs +79 -0
- package/dist/tx_pb-u3CoQYge.mjs.map +1 -0
- package/dist/typed-context-Cg0If0M9.mjs +118 -0
- package/dist/typed-context-Cg0If0M9.mjs.map +1 -0
- package/dist/types-CLfdsa48.mjs +41 -0
- package/dist/types-CLfdsa48.mjs.map +1 -0
- package/dist/types-CSS5rfW1.mjs +303 -0
- package/dist/types-CSS5rfW1.mjs.map +1 -0
- package/dist/types-DGrP9Ro_.d.mts +39609 -0
- package/dist/types_pb-CrjtO9sB.mjs +21 -0
- package/dist/types_pb-CrjtO9sB.mjs.map +1 -0
- package/dist/types_pb-K7pKBvcg.mjs +1433 -0
- package/dist/types_pb-K7pKBvcg.mjs.map +1 -0
- package/dist/utils-B2carKSi.mjs +2 -0
- package/dist/waiting-BigHYRNN.mjs +1081 -0
- package/dist/waiting-BigHYRNN.mjs.map +1 -0
- package/dist/wasm-DdunGtLM.mjs +396 -0
- package/dist/wasm-DdunGtLM.mjs.map +1 -0
- package/package.json +195 -66
- package/dist/client/WebSocketClient.d.ts +0 -30
- package/dist/client/index.d.ts +0 -5
- package/dist/client/rest/APIRequester.d.ts +0 -27
- package/dist/client/rest/RESTClient.d.ts +0 -48
- package/dist/client/rest/Wallet.d.ts +0 -26
- package/dist/client/rest/api/AuctionAPI.d.ts +0 -6
- package/dist/client/rest/api/AuthAPI.d.ts +0 -8
- package/dist/client/rest/api/AuthzAPI.d.ts +0 -8
- package/dist/client/rest/api/BankAPI.d.ts +0 -10
- package/dist/client/rest/api/BaseAPI.d.ts +0 -5
- package/dist/client/rest/api/DistributionAPI.d.ts +0 -35
- package/dist/client/rest/api/EvidenceAPI.d.ts +0 -7
- package/dist/client/rest/api/EvmAPI.d.ts +0 -44
- package/dist/client/rest/api/FeeGrantAPI.d.ts +0 -22
- package/dist/client/rest/api/ForwardingAPI.d.ts +0 -20
- package/dist/client/rest/api/GovAPI.d.ts +0 -12
- package/dist/client/rest/api/GroupAPI.d.ts +0 -19
- package/dist/client/rest/api/IbcAPI.d.ts +0 -48
- package/dist/client/rest/api/IbcHooksAPI.d.ts +0 -8
- package/dist/client/rest/api/IbcNftAPI.d.ts +0 -10
- package/dist/client/rest/api/IbcPermAPI.d.ts +0 -12
- package/dist/client/rest/api/IbcTransferAPI.d.ts +0 -10
- package/dist/client/rest/api/InterTxAPI.d.ts +0 -6
- package/dist/client/rest/api/MarketmapAPI.d.ts +0 -18
- package/dist/client/rest/api/MoveAPI.d.ts +0 -62
- package/dist/client/rest/api/MstakingAPI.d.ts +0 -28
- package/dist/client/rest/api/OpchildAPI.d.ts +0 -12
- package/dist/client/rest/api/OphostAPI.d.ts +0 -33
- package/dist/client/rest/api/OracleAPI.d.ts +0 -22
- package/dist/client/rest/api/RewardAPI.d.ts +0 -8
- package/dist/client/rest/api/SlashingAPI.d.ts +0 -8
- package/dist/client/rest/api/TendermintAPI.d.ts +0 -16
- package/dist/client/rest/api/TokenfactoryAPI.d.ts +0 -12
- package/dist/client/rest/api/TxAPI.d.ts +0 -190
- package/dist/client/rest/api/UpgradeAPI.d.ts +0 -18
- package/dist/client/rest/api/WasmAPI.d.ts +0 -78
- package/dist/client/rest/api/index.d.ts +0 -30
- package/dist/core/Block.d.ts +0 -55
- package/dist/core/Coin.d.ts +0 -40
- package/dist/core/Coins.d.ts +0 -43
- package/dist/core/Denom.d.ts +0 -1
- package/dist/core/Duration.d.ts +0 -19
- package/dist/core/Msg.d.ts +0 -45
- package/dist/core/PublicKey.d.ts +0 -122
- package/dist/core/auction/AuctionParams.d.ts +0 -41
- package/dist/core/auction/index.d.ts +0 -2
- package/dist/core/auction/msgs/MsgAuctionBid.d.ts +0 -36
- package/dist/core/auction/msgs/MsgUpdateAuctionParams.d.ts +0 -33
- package/dist/core/auction/msgs/index.d.ts +0 -10
- package/dist/core/auth/Account.d.ts +0 -12
- package/dist/core/auth/AuthParams.d.ts +0 -37
- package/dist/core/auth/BaseAccount.d.ts +0 -45
- package/dist/core/auth/ModuleAccount.d.ts +0 -39
- package/dist/core/auth/index.d.ts +0 -5
- package/dist/core/auth/msgs/MsgUpdateAuthParams.d.ts +0 -33
- package/dist/core/auth/msgs/index.d.ts +0 -8
- package/dist/core/authz/authorizations/Authorization.d.ts +0 -41
- package/dist/core/authz/authorizations/ExecuteAuthorization.d.ts +0 -54
- package/dist/core/authz/authorizations/GenericAuthorization.d.ts +0 -28
- package/dist/core/authz/authorizations/PublishAuthorization.d.ts +0 -28
- package/dist/core/authz/authorizations/SendAuthorization.d.ts +0 -33
- package/dist/core/authz/authorizations/StakeAuthorization.d.ts +0 -60
- package/dist/core/authz/authorizations/index.d.ts +0 -6
- package/dist/core/authz/index.d.ts +0 -2
- package/dist/core/authz/msgs/MsgExecAuthorized.d.ts +0 -33
- package/dist/core/authz/msgs/MsgGrantAuthorization.d.ts +0 -36
- package/dist/core/authz/msgs/MsgRevokeAuthorization.d.ts +0 -35
- package/dist/core/authz/msgs/index.d.ts +0 -12
- package/dist/core/bank/BankParams.d.ts +0 -29
- package/dist/core/bank/DenomMetadata.d.ts +0 -43
- package/dist/core/bank/DenomUnit.d.ts +0 -28
- package/dist/core/bank/SendEnabled.d.ts +0 -25
- package/dist/core/bank/index.d.ts +0 -5
- package/dist/core/bank/msgs/MsgMultiSend.d.ts +0 -78
- package/dist/core/bank/msgs/MsgSend.d.ts +0 -36
- package/dist/core/bank/msgs/MsgSetDenomMetadata.d.ts +0 -33
- package/dist/core/bank/msgs/MsgSetSendEnabled.d.ts +0 -37
- package/dist/core/bank/msgs/MsgUpdateBankParams.d.ts +0 -33
- package/dist/core/bank/msgs/index.d.ts +0 -16
- package/dist/core/bech32.d.ts +0 -27
- package/dist/core/celestia/Blob.d.ts +0 -24
- package/dist/core/celestia/BlobTx.d.ts +0 -25
- package/dist/core/celestia/index.d.ts +0 -3
- package/dist/core/celestia/msgs/MsgPayForBlobs.d.ts +0 -31
- package/dist/core/celestia/msgs/index.d.ts +0 -7
- package/dist/core/consensus/ABCIParams.d.ts +0 -21
- package/dist/core/consensus/BlockParams.d.ts +0 -24
- package/dist/core/consensus/EvidenceParams.d.ts +0 -28
- package/dist/core/consensus/ValidatorParams.d.ts +0 -21
- package/dist/core/consensus/index.d.ts +0 -5
- package/dist/core/consensus/msgs/MsgUpdateConsensusParams.d.ts +0 -45
- package/dist/core/consensus/msgs/index.d.ts +0 -8
- package/dist/core/crisis/index.d.ts +0 -1
- package/dist/core/crisis/msgs/MsgUpdateCrisisParams.d.ts +0 -33
- package/dist/core/crisis/msgs/MsgVerifyInvariant.d.ts +0 -35
- package/dist/core/crisis/msgs/index.d.ts +0 -10
- package/dist/core/distribution/DistributionParams.d.ts +0 -32
- package/dist/core/distribution/RewardWeight.d.ts +0 -25
- package/dist/core/distribution/index.d.ts +0 -3
- package/dist/core/distribution/msgs/MsgCommunityPoolSpend.d.ts +0 -36
- package/dist/core/distribution/msgs/MsgDepositValidatorRewardsPool.d.ts +0 -40
- package/dist/core/distribution/msgs/MsgFundCommunityPool.d.ts +0 -33
- package/dist/core/distribution/msgs/MsgSetWithdrawAddress.d.ts +0 -32
- package/dist/core/distribution/msgs/MsgUpdateDistrParams.d.ts +0 -33
- package/dist/core/distribution/msgs/MsgWithdrawDelegatorReward.d.ts +0 -32
- package/dist/core/distribution/msgs/MsgWithdrawValidatorCommission.d.ts +0 -29
- package/dist/core/distribution/msgs/index.d.ts +0 -20
- package/dist/core/evidence/Equivocation.d.ts +0 -38
- package/dist/core/evidence/Evidence.d.ts +0 -11
- package/dist/core/evidence/index.d.ts +0 -3
- package/dist/core/evidence/msgs/MsgSubmitEvidence.d.ts +0 -33
- package/dist/core/evidence/msgs/index.d.ts +0 -8
- package/dist/core/evm/AccessTuple.d.ts +0 -25
- package/dist/core/evm/EvmParams.d.ts +0 -39
- package/dist/core/evm/index.d.ts +0 -3
- package/dist/core/evm/msgs/MsgCall.d.ts +0 -42
- package/dist/core/evm/msgs/MsgCreate.d.ts +0 -39
- package/dist/core/evm/msgs/MsgCreate2.d.ts +0 -42
- package/dist/core/evm/msgs/MsgUpdateEvmParams.d.ts +0 -33
- package/dist/core/evm/msgs/index.d.ts +0 -14
- package/dist/core/feegrant/allowances/AllowedMsgAllowance.d.ts +0 -33
- package/dist/core/feegrant/allowances/BasicAllowance.d.ts +0 -32
- package/dist/core/feegrant/allowances/PeriodicAllowance.d.ts +0 -43
- package/dist/core/feegrant/allowances/index.d.ts +0 -16
- package/dist/core/feegrant/index.d.ts +0 -2
- package/dist/core/feegrant/msgs/MsgGrantAllowance.d.ts +0 -36
- package/dist/core/feegrant/msgs/MsgRevokeAllowance.d.ts +0 -32
- package/dist/core/feegrant/msgs/index.d.ts +0 -10
- package/dist/core/forwarding/index.d.ts +0 -1
- package/dist/core/forwarding/msgs/MsgClearForwardingAccount.d.ts +0 -32
- package/dist/core/forwarding/msgs/MsgRegisterForwardingAccount.d.ts +0 -38
- package/dist/core/forwarding/msgs/index.d.ts +0 -10
- package/dist/core/gov/Deposit.d.ts +0 -29
- package/dist/core/gov/GovParams.d.ts +0 -82
- package/dist/core/gov/TallyResult.d.ts +0 -36
- package/dist/core/gov/Vesting.d.ts +0 -28
- package/dist/core/gov/Vote.d.ts +0 -55
- package/dist/core/gov/index.d.ts +0 -6
- package/dist/core/gov/msgs/MsgCancelProposal.d.ts +0 -32
- package/dist/core/gov/msgs/MsgDeposit.d.ts +0 -36
- package/dist/core/gov/msgs/MsgDepositLegacy.d.ts +0 -36
- package/dist/core/gov/msgs/MsgSubmitProposal.d.ts +0 -49
- package/dist/core/gov/msgs/MsgSubmitProposalLegacy.d.ts +0 -37
- package/dist/core/gov/msgs/MsgUpdateGovParams.d.ts +0 -33
- package/dist/core/gov/msgs/MsgVote.d.ts +0 -41
- package/dist/core/gov/msgs/MsgVoteLegacy.d.ts +0 -38
- package/dist/core/gov/msgs/MsgVoteWeighted.d.ts +0 -39
- package/dist/core/gov/msgs/MsgVoteWeightedLegacy.d.ts +0 -36
- package/dist/core/gov/msgs/index.d.ts +0 -26
- package/dist/core/gov/proposals/Content.d.ts +0 -12
- package/dist/core/gov/proposals/Proposal.d.ts +0 -79
- package/dist/core/gov/proposals/TextProposal.d.ts +0 -31
- package/dist/core/gov/proposals/index.d.ts +0 -3
- package/dist/core/group/GroupInfo.d.ts +0 -37
- package/dist/core/group/GroupMember.d.ts +0 -78
- package/dist/core/group/GroupPolicyInfo.d.ts +0 -41
- package/dist/core/group/GroupProposal.d.ts +0 -82
- package/dist/core/group/GroupVote.d.ts +0 -36
- package/dist/core/group/index.d.ts +0 -7
- package/dist/core/group/msgs/MsgCreateGroup.d.ts +0 -36
- package/dist/core/group/msgs/MsgCreateGroupPolicy.d.ts +0 -39
- package/dist/core/group/msgs/MsgCreateGroupWithPolicy.d.ts +0 -46
- package/dist/core/group/msgs/MsgGroupExec.d.ts +0 -32
- package/dist/core/group/msgs/MsgGroupVote.d.ts +0 -46
- package/dist/core/group/msgs/MsgLeaveGroup.d.ts +0 -32
- package/dist/core/group/msgs/MsgSubmitGroupProposal.d.ts +0 -50
- package/dist/core/group/msgs/MsgUpdateGroupAdmin.d.ts +0 -35
- package/dist/core/group/msgs/MsgUpdateGroupDecisionPolicy.d.ts +0 -36
- package/dist/core/group/msgs/MsgUpdateGroupMembers.d.ts +0 -36
- package/dist/core/group/msgs/MsgUpdateGroupMetadata.d.ts +0 -35
- package/dist/core/group/msgs/MsgUpdateGroupPolicyAdmin.d.ts +0 -35
- package/dist/core/group/msgs/MsgUpdateGroupPolicyMetadata.d.ts +0 -35
- package/dist/core/group/msgs/MsgWithdrawProposal.d.ts +0 -32
- package/dist/core/group/msgs/index.d.ts +0 -32
- package/dist/core/group/policies/DecisionPolicyWindows.d.ts +0 -25
- package/dist/core/group/policies/PercentageDecisionPolicy.d.ts +0 -32
- package/dist/core/group/policies/ThresholdDecisionPolicy.d.ts +0 -32
- package/dist/core/group/policies/index.d.ts +0 -15
- package/dist/core/ibc/applications/fee/IbcFee.d.ts +0 -28
- package/dist/core/ibc/applications/fee/IdentifiedPacketFee.d.ts +0 -26
- package/dist/core/ibc/applications/fee/Metadata.d.ts +0 -24
- package/dist/core/ibc/applications/fee/PacketFee.d.ts +0 -29
- package/dist/core/ibc/applications/fee/index.d.ts +0 -5
- package/dist/core/ibc/applications/fee/msgs/MsgPayPacketFee.d.ts +0 -31
- package/dist/core/ibc/applications/fee/msgs/MsgPayPacketFeeAsync.d.ts +0 -26
- package/dist/core/ibc/applications/fee/msgs/MsgRegisterCounterpartyPayee.d.ts +0 -28
- package/dist/core/ibc/applications/fee/msgs/MsgRegisterPayee.d.ts +0 -28
- package/dist/core/ibc/applications/fee/msgs/index.d.ts +0 -13
- package/dist/core/ibc/applications/index.d.ts +0 -4
- package/dist/core/ibc/applications/interchain-account/Account.d.ts +0 -25
- package/dist/core/ibc/applications/interchain-account/Metadata.d.ts +0 -36
- package/dist/core/ibc/applications/interchain-account/controller/Params.d.ts +0 -21
- package/dist/core/ibc/applications/interchain-account/host/Params.d.ts +0 -24
- package/dist/core/ibc/applications/interchain-account/index.d.ts +0 -4
- package/dist/core/ibc/applications/nft-transfer/IbcNftParams.d.ts +0 -28
- package/dist/core/ibc/applications/nft-transfer/NftClassTrace.d.ts +0 -24
- package/dist/core/ibc/applications/nft-transfer/NonFungibleTokenPacketData.d.ts +0 -45
- package/dist/core/ibc/applications/nft-transfer/index.d.ts +0 -4
- package/dist/core/ibc/applications/nft-transfer/msgs/MsgNftTransfer.d.ts +0 -54
- package/dist/core/ibc/applications/nft-transfer/msgs/MsgUpdateIbcNftParams.d.ts +0 -33
- package/dist/core/ibc/applications/nft-transfer/msgs/index.d.ts +0 -10
- package/dist/core/ibc/applications/perm/index.d.ts +0 -1
- package/dist/core/ibc/applications/perm/msgs/MsgUpdateIbcPermAdmin.d.ts +0 -38
- package/dist/core/ibc/applications/perm/msgs/MsgUpdatePermissionedRelayers.d.ts +0 -38
- package/dist/core/ibc/applications/perm/msgs/index.d.ts +0 -10
- package/dist/core/ibc/applications/transfer/DenomTrace.d.ts +0 -24
- package/dist/core/ibc/applications/transfer/FungibleTokenPacketData.d.ts +0 -33
- package/dist/core/ibc/applications/transfer/IbcTransferParams.d.ts +0 -24
- package/dist/core/ibc/applications/transfer/authorizations/Allocation.d.ts +0 -34
- package/dist/core/ibc/applications/transfer/authorizations/TransferAuthorization.d.ts +0 -23
- package/dist/core/ibc/applications/transfer/authorizations/index.d.ts +0 -2
- package/dist/core/ibc/applications/transfer/index.d.ts +0 -5
- package/dist/core/ibc/applications/transfer/msgs/MsgTransfer.d.ts +0 -52
- package/dist/core/ibc/applications/transfer/msgs/MsgUpdateIbcTransferParams.d.ts +0 -26
- package/dist/core/ibc/applications/transfer/msgs/index.d.ts +0 -10
- package/dist/core/ibc/core/channel/Channel.d.ts +0 -39
- package/dist/core/ibc/core/channel/ChannelCounterparty.d.ts +0 -24
- package/dist/core/ibc/core/channel/ChannelOrder.d.ts +0 -3
- package/dist/core/ibc/core/channel/ChannelState.d.ts +0 -3
- package/dist/core/ibc/core/channel/ErrorReceipt.d.ts +0 -20
- package/dist/core/ibc/core/channel/IbcChannelParams.d.ts +0 -22
- package/dist/core/ibc/core/channel/IdentifiedChannel.d.ts +0 -45
- package/dist/core/ibc/core/channel/Packet.d.ts +0 -43
- package/dist/core/ibc/core/channel/PacketId.d.ts +0 -27
- package/dist/core/ibc/core/channel/Timeout.d.ts +0 -25
- package/dist/core/ibc/core/channel/Upgrade.d.ts +0 -24
- package/dist/core/ibc/core/channel/UpgradeFields.d.ts +0 -23
- package/dist/core/ibc/core/channel/index.d.ts +0 -13
- package/dist/core/ibc/core/channel/msgs/MsgChannelCloseConfirm.d.ts +0 -32
- package/dist/core/ibc/core/channel/msgs/MsgChannelCloseInit.d.ts +0 -27
- package/dist/core/ibc/core/channel/msgs/MsgChannelOpenAck.d.ts +0 -36
- package/dist/core/ibc/core/channel/msgs/MsgChannelOpenConfirm.d.ts +0 -32
- package/dist/core/ibc/core/channel/msgs/MsgChannelOpenInit.d.ts +0 -28
- package/dist/core/ibc/core/channel/msgs/MsgChannelOpenTry.d.ts +0 -36
- package/dist/core/ibc/core/channel/msgs/MsgChannelUpgradeAck.d.ts +0 -37
- package/dist/core/ibc/core/channel/msgs/MsgChannelUpgradeCancel.d.ts +0 -35
- package/dist/core/ibc/core/channel/msgs/MsgChannelUpgradeConfirm.d.ts +0 -40
- package/dist/core/ibc/core/channel/msgs/MsgChannelUpgradeInit.d.ts +0 -30
- package/dist/core/ibc/core/channel/msgs/MsgChannelUpgradeOpen.d.ts +0 -37
- package/dist/core/ibc/core/channel/msgs/MsgChannelUpgradeTimeout.d.ts +0 -35
- package/dist/core/ibc/core/channel/msgs/MsgChannelUpgradeTry.d.ts +0 -41
- package/dist/core/ibc/core/channel/msgs/MsgRecvAcknowledgement.d.ts +0 -32
- package/dist/core/ibc/core/channel/msgs/MsgRecvPacket.d.ts +0 -30
- package/dist/core/ibc/core/channel/msgs/MsgTimeout.d.ts +0 -32
- package/dist/core/ibc/core/channel/msgs/MsgTimeoutClose.d.ts +0 -34
- package/dist/core/ibc/core/channel/msgs/MsgUpdateIbcChannelParams.d.ts +0 -26
- package/dist/core/ibc/core/channel/msgs/index.d.ts +0 -41
- package/dist/core/ibc/core/client/ClientConsensusStates.d.ts +0 -25
- package/dist/core/ibc/core/client/ConsensusStateWithHeight.d.ts +0 -25
- package/dist/core/ibc/core/client/Height.d.ts +0 -24
- package/dist/core/ibc/core/client/IbcClientParams.d.ts +0 -21
- package/dist/core/ibc/core/client/IdentifiedClient.d.ts +0 -24
- package/dist/core/ibc/core/client/index.d.ts +0 -6
- package/dist/core/ibc/core/client/msgs/MsgCreateClient.d.ts +0 -27
- package/dist/core/ibc/core/client/msgs/MsgIBCSoftwareUpgrade.d.ts +0 -28
- package/dist/core/ibc/core/client/msgs/MsgRecoverClient.d.ts +0 -27
- package/dist/core/ibc/core/client/msgs/MsgSubmitMisbehaviour.d.ts +0 -27
- package/dist/core/ibc/core/client/msgs/MsgUpdateClient.d.ts +0 -27
- package/dist/core/ibc/core/client/msgs/MsgUpdateIbcClientParams.d.ts +0 -26
- package/dist/core/ibc/core/client/msgs/MsgUpgradeClient.d.ts +0 -33
- package/dist/core/ibc/core/client/msgs/index.d.ts +0 -19
- package/dist/core/ibc/core/client/msgs/tendermint/crypto.d.ts +0 -43
- package/dist/core/ibc/core/client/msgs/tendermint/types.d.ts +0 -187
- package/dist/core/ibc/core/client/msgs/tendermint/version.d.ts +0 -38
- package/dist/core/ibc/core/commitment/MerklePrefix.d.ts +0 -21
- package/dist/core/ibc/core/commitment/MerkleRoot.d.ts +0 -21
- package/dist/core/ibc/core/commitment/index.d.ts +0 -2
- package/dist/core/ibc/core/connection/ConnectionCounterparty.d.ts +0 -28
- package/dist/core/ibc/core/connection/ConnectionState.d.ts +0 -3
- package/dist/core/ibc/core/connection/IbcConnectionParams.d.ts +0 -21
- package/dist/core/ibc/core/connection/IbcVersion.d.ts +0 -24
- package/dist/core/ibc/core/connection/IdentifiedConnection.d.ts +0 -39
- package/dist/core/ibc/core/connection/index.d.ts +0 -5
- package/dist/core/ibc/core/connection/msgs/MsgConnectionOpenAck.d.ts +0 -42
- package/dist/core/ibc/core/connection/msgs/MsgConnectionOpenConfirm.d.ts +0 -30
- package/dist/core/ibc/core/connection/msgs/MsgConnectionOpenInit.d.ts +0 -33
- package/dist/core/ibc/core/connection/msgs/MsgConnectionOpenTry.d.ts +0 -46
- package/dist/core/ibc/core/connection/msgs/MsgUpdateIbcConnectionParams.d.ts +0 -26
- package/dist/core/ibc/core/connection/msgs/index.d.ts +0 -15
- package/dist/core/ibc/core/index.d.ts +0 -4
- package/dist/core/ibc/index.d.ts +0 -2
- package/dist/core/ibc/lightclient/index.d.ts +0 -1
- package/dist/core/ibc/lightclient/tendermint/Header.d.ts +0 -29
- package/dist/core/ibchooks/ACL.d.ts +0 -25
- package/dist/core/ibchooks/IbcHooksParams.d.ts +0 -25
- package/dist/core/ibchooks/index.d.ts +0 -3
- package/dist/core/ibchooks/msgs/MsgUpdateACL.d.ts +0 -35
- package/dist/core/ibchooks/msgs/MsgUpdateIbcHooksParams.d.ts +0 -33
- package/dist/core/ibchooks/msgs/index.d.ts +0 -10
- package/dist/core/index.d.ts +0 -40
- package/dist/core/intertx/index.d.ts +0 -1
- package/dist/core/intertx/msgs/MsgRegisterAccount.d.ts +0 -39
- package/dist/core/intertx/msgs/MsgSubmitTx.d.ts +0 -36
- package/dist/core/intertx/msgs/index.d.ts +0 -10
- package/dist/core/marketmap/Market.d.ts +0 -26
- package/dist/core/marketmap/MarketmapParams.d.ts +0 -25
- package/dist/core/marketmap/ProviderConfig.d.ts +0 -34
- package/dist/core/marketmap/Ticker.d.ts +0 -34
- package/dist/core/marketmap/index.d.ts +0 -5
- package/dist/core/marketmap/msgs/MsgCreateMarkets.d.ts +0 -33
- package/dist/core/marketmap/msgs/MsgRemoveMarketAuthorities.d.ts +0 -32
- package/dist/core/marketmap/msgs/MsgRemoveMarkets.d.ts +0 -32
- package/dist/core/marketmap/msgs/MsgUpdateMarketmapParams.d.ts +0 -33
- package/dist/core/marketmap/msgs/MsgUpdateMarkets.d.ts +0 -33
- package/dist/core/marketmap/msgs/MsgUpsertMarkets.d.ts +0 -33
- package/dist/core/marketmap/msgs/index.d.ts +0 -18
- package/dist/core/move/Module.d.ts +0 -36
- package/dist/core/move/MoveParams.d.ts +0 -37
- package/dist/core/move/index.d.ts +0 -3
- package/dist/core/move/msgs/MsgDelist.d.ts +0 -32
- package/dist/core/move/msgs/MsgExecute.d.ts +0 -44
- package/dist/core/move/msgs/MsgExecuteJSON.d.ts +0 -44
- package/dist/core/move/msgs/MsgGovExecute.d.ts +0 -47
- package/dist/core/move/msgs/MsgGovExecuteJSON.d.ts +0 -47
- package/dist/core/move/msgs/MsgGovPublish.d.ts +0 -41
- package/dist/core/move/msgs/MsgGovScript.d.ts +0 -41
- package/dist/core/move/msgs/MsgGovScriptJSON.d.ts +0 -41
- package/dist/core/move/msgs/MsgPublish.d.ts +0 -38
- package/dist/core/move/msgs/MsgScript.d.ts +0 -38
- package/dist/core/move/msgs/MsgScriptJSON.d.ts +0 -38
- package/dist/core/move/msgs/MsgUpdateMoveParams.d.ts +0 -33
- package/dist/core/move/msgs/MsgWhitelist.d.ts +0 -35
- package/dist/core/move/msgs/index.d.ts +0 -32
- package/dist/core/mstaking/Delegation.d.ts +0 -36
- package/dist/core/mstaking/MstakingParams.d.ts +0 -44
- package/dist/core/mstaking/Redelegation.d.ts +0 -71
- package/dist/core/mstaking/UnbondingDelegation.d.ts +0 -57
- package/dist/core/mstaking/Validator.d.ts +0 -137
- package/dist/core/mstaking/index.d.ts +0 -6
- package/dist/core/mstaking/msgs/MsgBeginRedelegate.d.ts +0 -39
- package/dist/core/mstaking/msgs/MsgCancelUnbondingDelegation.d.ts +0 -39
- package/dist/core/mstaking/msgs/MsgCreateValidator.d.ts +0 -44
- package/dist/core/mstaking/msgs/MsgDelegate.d.ts +0 -36
- package/dist/core/mstaking/msgs/MsgEditValidator.d.ts +0 -37
- package/dist/core/mstaking/msgs/MsgUndelegate.d.ts +0 -36
- package/dist/core/mstaking/msgs/MsgUpdateMstakingParams.d.ts +0 -33
- package/dist/core/mstaking/msgs/index.d.ts +0 -20
- package/dist/core/num.d.ts +0 -2
- package/dist/core/opchild/BridgeInfo.d.ts +0 -34
- package/dist/core/opchild/OpValidator.d.ts +0 -32
- package/dist/core/opchild/OpchildParams.d.ts +0 -45
- package/dist/core/opchild/index.d.ts +0 -4
- package/dist/core/opchild/msgs/MsgAddBridgeExecutor.d.ts +0 -32
- package/dist/core/opchild/msgs/MsgAddFeeWhitelistAddresses.d.ts +0 -32
- package/dist/core/opchild/msgs/MsgAddValidator.d.ts +0 -39
- package/dist/core/opchild/msgs/MsgExecuteMessages.d.ts +0 -33
- package/dist/core/opchild/msgs/MsgFinalizeTokenDeposit.d.ts +0 -52
- package/dist/core/opchild/msgs/MsgInitiateTokenWithdrawal.d.ts +0 -36
- package/dist/core/opchild/msgs/MsgRemoveBridgeExecutor.d.ts +0 -32
- package/dist/core/opchild/msgs/MsgRemoveFeeWhitelistAddresses.d.ts +0 -32
- package/dist/core/opchild/msgs/MsgRemoveValidator.d.ts +0 -32
- package/dist/core/opchild/msgs/MsgSetBridgeInfo.d.ts +0 -33
- package/dist/core/opchild/msgs/MsgSpendFeePool.d.ts +0 -36
- package/dist/core/opchild/msgs/MsgUpdateMinGasPrices.d.ts +0 -33
- package/dist/core/opchild/msgs/MsgUpdateOpchildAdmin.d.ts +0 -32
- package/dist/core/opchild/msgs/MsgUpdateOpchildParams.d.ts +0 -33
- package/dist/core/opchild/msgs/MsgUpdateOracle.d.ts +0 -35
- package/dist/core/opchild/msgs/index.d.ts +0 -36
- package/dist/core/ophost/BatchInfo.d.ts +0 -25
- package/dist/core/ophost/BatchInfoWithOutput.d.ts +0 -26
- package/dist/core/ophost/BridgeConfig.d.ts +0 -45
- package/dist/core/ophost/OphostParams.d.ts +0 -26
- package/dist/core/ophost/Output.d.ts +0 -30
- package/dist/core/ophost/index.d.ts +0 -6
- package/dist/core/ophost/msgs/MsgCreateBridge.d.ts +0 -33
- package/dist/core/ophost/msgs/MsgDeleteOutput.d.ts +0 -35
- package/dist/core/ophost/msgs/MsgFinalizeTokenWithdrawal.d.ts +0 -60
- package/dist/core/ophost/msgs/MsgInitiateTokenDeposit.d.ts +0 -42
- package/dist/core/ophost/msgs/MsgProposeOutput.d.ts +0 -41
- package/dist/core/ophost/msgs/MsgRecordBatch.d.ts +0 -35
- package/dist/core/ophost/msgs/MsgUpdateBatchInfo.d.ts +0 -36
- package/dist/core/ophost/msgs/MsgUpdateChallenger.d.ts +0 -35
- package/dist/core/ophost/msgs/MsgUpdateFinalizationPeriod.d.ts +0 -36
- package/dist/core/ophost/msgs/MsgUpdateMetadata.d.ts +0 -35
- package/dist/core/ophost/msgs/MsgUpdateOphostParams.d.ts +0 -33
- package/dist/core/ophost/msgs/MsgUpdateOracleConfig.d.ts +0 -35
- package/dist/core/ophost/msgs/MsgUpdateProposer.d.ts +0 -35
- package/dist/core/ophost/msgs/index.d.ts +0 -32
- package/dist/core/oracle/CurrencyPair.d.ts +0 -25
- package/dist/core/oracle/QuotePrice.d.ts +0 -27
- package/dist/core/oracle/index.d.ts +0 -3
- package/dist/core/oracle/msgs/MsgAddCurrencyPairs.d.ts +0 -33
- package/dist/core/oracle/msgs/MsgRemoveCurrencyPairs.d.ts +0 -32
- package/dist/core/oracle/msgs/index.d.ts +0 -10
- package/dist/core/params/ParamChange.d.ts +0 -42
- package/dist/core/params/index.d.ts +0 -2
- package/dist/core/params/proposals/ParameterChangeProposal.d.ts +0 -35
- package/dist/core/params/proposals/index.d.ts +0 -1
- package/dist/core/reward/RewardParams.d.ts +0 -38
- package/dist/core/reward/index.d.ts +0 -2
- package/dist/core/reward/msgs/MsgUpdateRewardParams.d.ts +0 -33
- package/dist/core/reward/msgs/index.d.ts +0 -8
- package/dist/core/slashing/SlashingParams.d.ts +0 -38
- package/dist/core/slashing/ValidatorSigningInfo.d.ts +0 -37
- package/dist/core/slashing/index.d.ts +0 -3
- package/dist/core/slashing/msgs/MsgUnjail.d.ts +0 -29
- package/dist/core/slashing/msgs/MsgUpdateSlashingParams.d.ts +0 -33
- package/dist/core/slashing/msgs/index.d.ts +0 -10
- package/dist/core/tokenfactory/TokenfactoryParams.d.ts +0 -25
- package/dist/core/tokenfactory/index.d.ts +0 -2
- package/dist/core/tokenfactory/msgs/MsgBurn.d.ts +0 -33
- package/dist/core/tokenfactory/msgs/MsgChangeAdmin.d.ts +0 -35
- package/dist/core/tokenfactory/msgs/MsgCreateDenom.d.ts +0 -32
- package/dist/core/tokenfactory/msgs/MsgMint.d.ts +0 -36
- package/dist/core/tokenfactory/msgs/MsgSetBeforeSendHook.d.ts +0 -35
- package/dist/core/tokenfactory/msgs/MsgSetDenomMetadataWasm.d.ts +0 -33
- package/dist/core/tokenfactory/msgs/MsgUpdateTokenfactoryParams.d.ts +0 -33
- package/dist/core/tokenfactory/msgs/index.d.ts +0 -20
- package/dist/core/tx/CompactBitArray.d.ts +0 -22
- package/dist/core/tx/Fee.d.ts +0 -31
- package/dist/core/tx/MultiSignature.d.ts +0 -13
- package/dist/core/tx/SignDoc.d.ts +0 -36
- package/dist/core/tx/SignMode.d.ts +0 -3
- package/dist/core/tx/SignatureV2.d.ts +0 -66
- package/dist/core/tx/Tx.d.ts +0 -146
- package/dist/core/tx/TxInfo.d.ts +0 -74
- package/dist/core/tx/index.d.ts +0 -7
- package/dist/core/upgrade/Plan.d.ts +0 -27
- package/dist/core/upgrade/index.d.ts +0 -2
- package/dist/core/upgrade/msgs/MsgCancelUpgrade.d.ts +0 -29
- package/dist/core/upgrade/msgs/MsgSoftwareUpgrade.d.ts +0 -33
- package/dist/core/upgrade/msgs/index.d.ts +0 -10
- package/dist/core/wasm/AbsoluteTxPosition.d.ts +0 -24
- package/dist/core/wasm/AccessConfig.d.ts +0 -27
- package/dist/core/wasm/WasmParams.d.ts +0 -29
- package/dist/core/wasm/authorizations/AcceptedMessageKeysFilter.d.ts +0 -28
- package/dist/core/wasm/authorizations/AcceptedMessagesFilter.d.ts +0 -28
- package/dist/core/wasm/authorizations/AllowAllMessagesFilter.d.ts +0 -24
- package/dist/core/wasm/authorizations/CodeGrant.d.ts +0 -25
- package/dist/core/wasm/authorizations/CombinedLimit.d.ts +0 -32
- package/dist/core/wasm/authorizations/ContractExecutionAuthorization.d.ts +0 -29
- package/dist/core/wasm/authorizations/ContractFilter.d.ts +0 -13
- package/dist/core/wasm/authorizations/ContractGrant.d.ts +0 -30
- package/dist/core/wasm/authorizations/ContractLimit.d.ts +0 -13
- package/dist/core/wasm/authorizations/ContractMigrationAuthorization.d.ts +0 -29
- package/dist/core/wasm/authorizations/MaxCallsLimit.d.ts +0 -28
- package/dist/core/wasm/authorizations/MaxFundsLimit.d.ts +0 -29
- package/dist/core/wasm/authorizations/StoreCodeAuthorization.d.ts +0 -29
- package/dist/core/wasm/authorizations/index.d.ts +0 -11
- package/dist/core/wasm/index.d.ts +0 -5
- package/dist/core/wasm/msgs/MsgAddCodeUploadParamsAddresses.d.ts +0 -32
- package/dist/core/wasm/msgs/MsgClearAdmin.d.ts +0 -32
- package/dist/core/wasm/msgs/MsgExecuteContract.d.ts +0 -39
- package/dist/core/wasm/msgs/MsgInstantiateContract.d.ts +0 -45
- package/dist/core/wasm/msgs/MsgInstantiateContractV2.d.ts +0 -51
- package/dist/core/wasm/msgs/MsgMigrateContract.d.ts +0 -38
- package/dist/core/wasm/msgs/MsgPinCodes.d.ts +0 -32
- package/dist/core/wasm/msgs/MsgRemoveCodeUploadParamsAddresses.d.ts +0 -32
- package/dist/core/wasm/msgs/MsgStoreAndInstantiateContract.d.ts +0 -61
- package/dist/core/wasm/msgs/MsgStoreAndMigrateContract.d.ts +0 -42
- package/dist/core/wasm/msgs/MsgStoreCode.d.ts +0 -36
- package/dist/core/wasm/msgs/MsgSudoContract.d.ts +0 -35
- package/dist/core/wasm/msgs/MsgUnpinCodes.d.ts +0 -32
- package/dist/core/wasm/msgs/MsgUpdateAdmin.d.ts +0 -35
- package/dist/core/wasm/msgs/MsgUpdateContractLabel.d.ts +0 -35
- package/dist/core/wasm/msgs/MsgUpdateInstantiateConfig.d.ts +0 -36
- package/dist/core/wasm/msgs/MsgUpdateWasmParams.d.ts +0 -33
- package/dist/core/wasm/msgs/index.d.ts +0 -40
- package/dist/core/wasmextension/AccessConfigExt.d.ts +0 -28
- package/dist/core/wasmextension/index.d.ts +0 -2
- package/dist/core/wasmextension/msgs/MsgStoreCodeAdmin.d.ts +0 -39
- package/dist/core/wasmextension/msgs/index.d.ts +0 -8
- package/dist/index.cjs +0 -6
- package/dist/index.d.ts +0 -4
- package/dist/index.mjs +0 -100795
- package/dist/key/Key.d.ts +0 -20
- package/dist/key/MnemonicKey.d.ts +0 -14
- package/dist/key/RawKey.d.ts +0 -9
- package/dist/key/index.d.ts +0 -3
- package/dist/util/bcs.d.ts +0 -44
- package/dist/util/hash.d.ts +0 -4
- package/dist/util/index.d.ts +0 -3
- package/dist/util/json.d.ts +0 -9
|
@@ -0,0 +1,974 @@
|
|
|
1
|
+
import { i as file_amino_amino, o as file_cosmos_proto_cosmos, s as file_gogoproto_gogo } from "./amino_pb-Bi6YDY_U.mjs";
|
|
2
|
+
import { d as ParseError, f as SimulationError, g as isNotFoundError, i as BroadcastError, t as AccountNotFoundError } from "./errors-CN1MFOLv.mjs";
|
|
3
|
+
import { n as DecCoin, t as Coin } from "./coin-DPWbtAFA.mjs";
|
|
4
|
+
import { c as normalizeMsg } from "./types-CSS5rfW1.mjs";
|
|
5
|
+
import { _ as TxBodySchema, f as AuthInfoSchema, g as SignerInfoSchema, m as ModeInfoSchema, o as MultiSignature, p as FeeSchema, v as TxRawSchema, x as SignMode, y as TxSchema } from "./public-key-DV-uGaUC.mjs";
|
|
6
|
+
import { c as makeSignBytes, n as createSignedTx } from "./sign-DqagxLcg.mjs";
|
|
7
|
+
import { r as validateHeaderConflict } from "./headers-CMO7ia_D.mjs";
|
|
8
|
+
import { t as httpRequest } from "./http-client-BrdVurTg.mjs";
|
|
9
|
+
import { t as BroadcastMode } from "./service_pb-Be-O-2-c.mjs";
|
|
10
|
+
import { create, toBinary } from "@bufbuild/protobuf";
|
|
11
|
+
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
|
|
12
|
+
import { anyIs, anyUnpack, file_google_protobuf_any } from "@bufbuild/protobuf/wkt";
|
|
13
|
+
//#region src/core/coins.ts
|
|
14
|
+
/**
|
|
15
|
+
* Coins module - Immutable, Map-backed multi-denom coin collection.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Immutable collection of coins, keyed by denom.
|
|
19
|
+
*
|
|
20
|
+
* Duplicate denoms are merged (summed) on construction and on every arithmetic
|
|
21
|
+
* operation. All mutating operations return new `Coins` instances.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* const wallet = new Coins({ uinit: 1000, uusdc: 500 })
|
|
26
|
+
* const fee = new Coins([new Coin('uinit', 200)])
|
|
27
|
+
* const after = wallet.sub(fee)
|
|
28
|
+
* console.log(after.toString()) // '800uinit,500uusdc'
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
var Coins = class Coins {
|
|
32
|
+
_map;
|
|
33
|
+
constructor(input) {
|
|
34
|
+
this._map = /* @__PURE__ */ new Map();
|
|
35
|
+
if (!input) return;
|
|
36
|
+
if (input instanceof Coins) for (const c of input) this._merge(c);
|
|
37
|
+
else if (Array.isArray(input)) for (const c of input) this._merge(new Coin(c.denom, c.amount));
|
|
38
|
+
else for (const [denom, amount] of Object.entries(input)) this._merge(new Coin(denom, amount));
|
|
39
|
+
}
|
|
40
|
+
_merge(c) {
|
|
41
|
+
const existing = this._map.get(c.denom);
|
|
42
|
+
this._map.set(c.denom, existing ? existing.add(c) : c);
|
|
43
|
+
}
|
|
44
|
+
/** Return the Coin for the given denom, or undefined. */
|
|
45
|
+
get(denom) {
|
|
46
|
+
return this._map.get(denom);
|
|
47
|
+
}
|
|
48
|
+
/** True if the collection contains the given denom. */
|
|
49
|
+
has(denom) {
|
|
50
|
+
return this._map.has(denom);
|
|
51
|
+
}
|
|
52
|
+
/** Sorted list of all denoms in this collection. */
|
|
53
|
+
denoms() {
|
|
54
|
+
return [...this._map.keys()].sort();
|
|
55
|
+
}
|
|
56
|
+
/** True when the collection has no coins. */
|
|
57
|
+
isEmpty() {
|
|
58
|
+
return this._map.size === 0;
|
|
59
|
+
}
|
|
60
|
+
[Symbol.iterator]() {
|
|
61
|
+
return this.toArray()[Symbol.iterator]();
|
|
62
|
+
}
|
|
63
|
+
/** Return all coins sorted by denom. */
|
|
64
|
+
toArray() {
|
|
65
|
+
return [...this._map.values()].sort((a, b) => a.denom.localeCompare(b.denom));
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Add a single Coin or another Coins collection.
|
|
69
|
+
* Coins with the same denom are summed; new denoms are inserted.
|
|
70
|
+
*/
|
|
71
|
+
add(other) {
|
|
72
|
+
const items = other instanceof Coin ? [other] : other.toArray();
|
|
73
|
+
return new Coins([...this.toArray(), ...items]);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Subtract coins. Allows negative amounts for intermediate calculations.
|
|
77
|
+
*/
|
|
78
|
+
sub(other) {
|
|
79
|
+
const negated = (other instanceof Coin ? [other] : other.toArray()).map((c) => new Coin(c.denom, -c.amountBigInt));
|
|
80
|
+
return new Coins([...this.toArray(), ...negated]);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Subtract coins, throwing if any resulting amount is negative.
|
|
84
|
+
* Use this when the result must be valid for on-chain submission.
|
|
85
|
+
*/
|
|
86
|
+
safeSub(other) {
|
|
87
|
+
const result = this.sub(other);
|
|
88
|
+
for (const c of result) if (c.amountBigInt < 0n) throw new Error(`Insufficient balance for ${c.denom}: would result in ${c.amount}`);
|
|
89
|
+
return result;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Multiply all coins by a scalar value.
|
|
93
|
+
*/
|
|
94
|
+
mul(n) {
|
|
95
|
+
return new Coins(this.toArray().map((c) => c.mul(n)));
|
|
96
|
+
}
|
|
97
|
+
/** Map over sorted coins and return an array of results. */
|
|
98
|
+
map(fn) {
|
|
99
|
+
return this.toArray().map(fn);
|
|
100
|
+
}
|
|
101
|
+
/** Return a new Coins containing only coins matching the predicate. */
|
|
102
|
+
filter(fn) {
|
|
103
|
+
return new Coins(this.toArray().filter(fn));
|
|
104
|
+
}
|
|
105
|
+
/** Return the first coin satisfying the predicate, or undefined. */
|
|
106
|
+
find(fn) {
|
|
107
|
+
return this.toArray().find(fn);
|
|
108
|
+
}
|
|
109
|
+
/** Return proto messages array, sorted by denom. */
|
|
110
|
+
toProto() {
|
|
111
|
+
return this.toArray().map((c) => c.toProto());
|
|
112
|
+
}
|
|
113
|
+
/** Return plain `{ denom, amount }` array (for JSON.stringify). */
|
|
114
|
+
toJSON() {
|
|
115
|
+
return this.toArray().map((c) => c.toJSON());
|
|
116
|
+
}
|
|
117
|
+
/** Return Amino-compatible `{ denom, amount }` array. */
|
|
118
|
+
toAmino() {
|
|
119
|
+
return this.toArray().map((c) => c.toAmino());
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Format as a comma-separated coin string, sorted by denom.
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```typescript
|
|
126
|
+
* new Coins({ uinit: 1000, uusdc: 500 }).toString()
|
|
127
|
+
* // '1000uinit,500uusdc'
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
toString() {
|
|
131
|
+
return this.toArray().map((c) => `${c.amount}${c.denom}`).join(",");
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Convert each Coin to a DecCoin (18 fractional decimal places) and return
|
|
135
|
+
* a DecCoins collection.
|
|
136
|
+
*/
|
|
137
|
+
toDecCoins() {
|
|
138
|
+
return new DecCoins(this.toArray().map((c) => c.toDecCoin()));
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Immutable collection of decimal coins, keyed by denom.
|
|
143
|
+
*
|
|
144
|
+
* Duplicate denoms are merged (summed) on construction and on every arithmetic
|
|
145
|
+
* operation. All mutating operations return new `DecCoins` instances.
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```typescript
|
|
149
|
+
* const fees = new DecCoins({ uinit: '1.5', uusdc: '0.5' })
|
|
150
|
+
* const extra = new DecCoins([new DecCoin('uinit', '0.5')])
|
|
151
|
+
* const total = fees.add(extra)
|
|
152
|
+
* console.log(total.toString()) // '2.000000000000000000uinit,0.5uusdc'
|
|
153
|
+
* ```
|
|
154
|
+
*/
|
|
155
|
+
var DecCoins = class DecCoins {
|
|
156
|
+
_map;
|
|
157
|
+
constructor(input) {
|
|
158
|
+
this._map = /* @__PURE__ */ new Map();
|
|
159
|
+
if (!input) return;
|
|
160
|
+
if (input instanceof DecCoins) for (const c of input) this._merge(c);
|
|
161
|
+
else if (Array.isArray(input)) for (const c of input) this._merge(new DecCoin(c.denom, c.amount));
|
|
162
|
+
else for (const [denom, amount] of Object.entries(input)) this._merge(new DecCoin(denom, amount));
|
|
163
|
+
}
|
|
164
|
+
_merge(c) {
|
|
165
|
+
const existing = this._map.get(c.denom);
|
|
166
|
+
this._map.set(c.denom, existing ? existing.add(c) : c);
|
|
167
|
+
}
|
|
168
|
+
/** Return the DecCoin for the given denom, or undefined. */
|
|
169
|
+
get(denom) {
|
|
170
|
+
return this._map.get(denom);
|
|
171
|
+
}
|
|
172
|
+
/** True if the collection contains the given denom. */
|
|
173
|
+
has(denom) {
|
|
174
|
+
return this._map.has(denom);
|
|
175
|
+
}
|
|
176
|
+
/** Sorted list of all denoms in this collection. */
|
|
177
|
+
denoms() {
|
|
178
|
+
return [...this._map.keys()].sort();
|
|
179
|
+
}
|
|
180
|
+
/** True when the collection has no coins. */
|
|
181
|
+
isEmpty() {
|
|
182
|
+
return this._map.size === 0;
|
|
183
|
+
}
|
|
184
|
+
[Symbol.iterator]() {
|
|
185
|
+
return this.toArray()[Symbol.iterator]();
|
|
186
|
+
}
|
|
187
|
+
/** Return all coins sorted by denom. */
|
|
188
|
+
toArray() {
|
|
189
|
+
return [...this._map.values()].sort((a, b) => a.denom.localeCompare(b.denom));
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Add a single DecCoin or another DecCoins collection.
|
|
193
|
+
* Coins with the same denom are summed; new denoms are inserted.
|
|
194
|
+
*/
|
|
195
|
+
add(other) {
|
|
196
|
+
const items = other instanceof DecCoin ? [other] : other.toArray();
|
|
197
|
+
return new DecCoins([...this.toArray(), ...items]);
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Subtract coins. Allows negative amounts for intermediate calculations.
|
|
201
|
+
*/
|
|
202
|
+
sub(other) {
|
|
203
|
+
const negated = (other instanceof DecCoin ? [other] : other.toArray()).map((c) => c.mul(-1));
|
|
204
|
+
return new DecCoins([...this.toArray(), ...negated]);
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Subtract coins, throwing if any resulting amount is negative.
|
|
208
|
+
* Use this when the result must be valid for on-chain submission.
|
|
209
|
+
*/
|
|
210
|
+
safeSub(other) {
|
|
211
|
+
const result = this.sub(other);
|
|
212
|
+
for (const c of result) if (c.amount.startsWith("-")) throw new Error(`Insufficient balance for ${c.denom}: would result in ${c.amount}`);
|
|
213
|
+
return result;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Multiply all coins by a scalar value.
|
|
217
|
+
*/
|
|
218
|
+
mul(n) {
|
|
219
|
+
return new DecCoins(this.toArray().map((c) => c.mul(n)));
|
|
220
|
+
}
|
|
221
|
+
/** Map over sorted coins and return an array of results. */
|
|
222
|
+
map(fn) {
|
|
223
|
+
return this.toArray().map(fn);
|
|
224
|
+
}
|
|
225
|
+
/** Return a new DecCoins containing only coins matching the predicate. */
|
|
226
|
+
filter(fn) {
|
|
227
|
+
return new DecCoins(this.toArray().filter(fn));
|
|
228
|
+
}
|
|
229
|
+
/** Return the first coin satisfying the predicate, or undefined. */
|
|
230
|
+
find(fn) {
|
|
231
|
+
return this.toArray().find(fn);
|
|
232
|
+
}
|
|
233
|
+
/** Return proto messages array, sorted by denom. */
|
|
234
|
+
toProto() {
|
|
235
|
+
return this.toArray().map((c) => c.toProto());
|
|
236
|
+
}
|
|
237
|
+
/** Return plain `{ denom, amount }` array (for JSON.stringify). */
|
|
238
|
+
toJSON() {
|
|
239
|
+
return this.toArray().map((c) => c.toJSON());
|
|
240
|
+
}
|
|
241
|
+
/** Return Amino-compatible `{ denom, amount }` array. */
|
|
242
|
+
toAmino() {
|
|
243
|
+
return this.toArray().map((c) => c.toAmino());
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Format as a comma-separated coin string, sorted by denom.
|
|
247
|
+
*
|
|
248
|
+
* @example
|
|
249
|
+
* ```typescript
|
|
250
|
+
* new DecCoins({ uinit: '1.5', uusdc: '0.5' }).toString()
|
|
251
|
+
* // '1.5uinit,0.5uusdc'
|
|
252
|
+
* ```
|
|
253
|
+
*/
|
|
254
|
+
toString() {
|
|
255
|
+
return this.toArray().map((c) => `${c.amount}${c.denom}`).join(",");
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Convert each DecCoin to an integer Coin by truncating toward zero.
|
|
259
|
+
* Collects results into a new `Coins` collection.
|
|
260
|
+
*/
|
|
261
|
+
toIntCoins() {
|
|
262
|
+
return new Coins(this.toArray().map((c) => c.toIntCoin()));
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Convert each DecCoin to an integer Coin by ceiling away from zero.
|
|
266
|
+
* Collects results into a new `Coins` collection.
|
|
267
|
+
*/
|
|
268
|
+
toIntCeilCoins() {
|
|
269
|
+
return new Coins(this.toArray().map((c) => c.toIntCeilCoin()));
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
//#endregion
|
|
273
|
+
//#region node_modules/@buf/cosmos_cosmos-sdk.bufbuild_es/cosmos/auth/v1beta1/auth_pb.js
|
|
274
|
+
/**
|
|
275
|
+
* Describes the file cosmos/auth/v1beta1/auth.proto.
|
|
276
|
+
*/
|
|
277
|
+
const file_cosmos_auth_v1beta1_auth = /* @__PURE__ */ fileDesc("Ch5jb3Ntb3MvYXV0aC92MWJldGExL2F1dGgucHJvdG8SE2Nvc21vcy5hdXRoLnYxYmV0YTEi9wEKC0Jhc2VBY2NvdW50EikKB2FkZHJlc3MYASABKAlCGNK0LRRjb3Ntb3MuQWRkcmVzc1N0cmluZxJOCgdwdWJfa2V5GAIgASgLMhQuZ29vZ2xlLnByb3RvYnVmLkFueUIn6t4fFHB1YmxpY19rZXksb21pdGVtcHR5ouewKgpwdWJsaWNfa2V5EhYKDmFjY291bnRfbnVtYmVyGAMgASgEEhAKCHNlcXVlbmNlGAQgASgEOkOIoB8A6KAfAMq0LRxjb3Ntb3MuYXV0aC52MWJldGExLkFjY291bnRJiuewKhZjb3Ntb3Mtc2RrL0Jhc2VBY2NvdW50IswBCg1Nb2R1bGVBY2NvdW50EjwKDGJhc2VfYWNjb3VudBgBIAEoCzIgLmNvc21vcy5hdXRoLnYxYmV0YTEuQmFzZUFjY291bnRCBNDeHwESDAoEbmFtZRgCIAEoCRITCgtwZXJtaXNzaW9ucxgDIAMoCTpaiKAfAMq0LSJjb3Ntb3MuYXV0aC52MWJldGExLk1vZHVsZUFjY291bnRJiuewKhhjb3Ntb3Mtc2RrL01vZHVsZUFjY291bnSS57AqDm1vZHVsZV9hY2NvdW50ImgKEE1vZHVsZUNyZWRlbnRpYWwSEwoLbW9kdWxlX25hbWUYASABKAkSFwoPZGVyaXZhdGlvbl9rZXlzGAIgAygMOiaK57AqIWNvc21vcy1zZGsvR3JvdXBBY2NvdW50Q3JlZGVudGlhbCL3AQoGUGFyYW1zEhsKE21heF9tZW1vX2NoYXJhY3RlcnMYASABKAQSFAoMdHhfc2lnX2xpbWl0GAIgASgEEh0KFXR4X3NpemVfY29zdF9wZXJfYnl0ZRgDIAEoBBI5ChdzaWdfdmVyaWZ5X2Nvc3RfZWQyNTUxORgEIAEoBEIY4t4fFFNpZ1ZlcmlmeUNvc3RFRDI1NTE5Ej0KGXNpZ192ZXJpZnlfY29zdF9zZWNwMjU2azEYBSABKARCGuLeHxZTaWdWZXJpZnlDb3N0U2VjcDI1NmsxOiHooB8BiuewKhhjb3Ntb3Mtc2RrL3gvYXV0aC9QYXJhbXNCK1opZ2l0aHViLmNvbS9jb3Ntb3MvY29zbW9zLXNkay94L2F1dGgvdHlwZXNiBnByb3RvMw", [
|
|
278
|
+
file_amino_amino,
|
|
279
|
+
file_cosmos_proto_cosmos,
|
|
280
|
+
file_gogoproto_gogo,
|
|
281
|
+
file_google_protobuf_any
|
|
282
|
+
]);
|
|
283
|
+
/**
|
|
284
|
+
* Describes the message cosmos.auth.v1beta1.BaseAccount.
|
|
285
|
+
* Use `create(BaseAccountSchema)` to create a new message.
|
|
286
|
+
*/
|
|
287
|
+
const BaseAccountSchema = /* @__PURE__ */ messageDesc(file_cosmos_auth_v1beta1_auth, 0);
|
|
288
|
+
//#endregion
|
|
289
|
+
//#region src/core/account.ts
|
|
290
|
+
/**
|
|
291
|
+
* Query account information from chain.
|
|
292
|
+
*
|
|
293
|
+
* @param client - gRPC client with auth service
|
|
294
|
+
* @param address - Bech32 address to query
|
|
295
|
+
* @param options - Query options (height for historical query)
|
|
296
|
+
* @returns Account information (address, number, sequence)
|
|
297
|
+
* @throws {AccountNotFoundError} If account doesn't exist on chain
|
|
298
|
+
*
|
|
299
|
+
* @example
|
|
300
|
+
* ```typescript
|
|
301
|
+
* const account = await getAccount(client, 'init1...')
|
|
302
|
+
* console.log('Account number:', account.number)
|
|
303
|
+
* console.log('Sequence:', account.sequence)
|
|
304
|
+
* ```
|
|
305
|
+
*/
|
|
306
|
+
async function getAccount(client, address, options) {
|
|
307
|
+
const queryOptions = options?.height !== void 0 ? { height: options.height } : void 0;
|
|
308
|
+
const response = await client.auth.account({ address }, queryOptions);
|
|
309
|
+
if (!response.account) throw new AccountNotFoundError(address);
|
|
310
|
+
if (anyIs(response.account, BaseAccountSchema)) {
|
|
311
|
+
const baseAccount = anyUnpack(response.account, BaseAccountSchema);
|
|
312
|
+
if (!baseAccount) throw new AccountNotFoundError(address);
|
|
313
|
+
return {
|
|
314
|
+
address,
|
|
315
|
+
number: baseAccount.accountNumber,
|
|
316
|
+
sequence: baseAccount.sequence
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
throw new Error(`Unsupported account type: ${response.account.typeUrl}`);
|
|
320
|
+
}
|
|
321
|
+
//#endregion
|
|
322
|
+
//#region src/client/gas.ts
|
|
323
|
+
/**
|
|
324
|
+
* Gas estimation module - Estimate gas for transactions.
|
|
325
|
+
*/
|
|
326
|
+
/**
|
|
327
|
+
* Parse gas price string into denom and amount.
|
|
328
|
+
* @param gasPrice - e.g., '0.015uinit'
|
|
329
|
+
* @returns { amount: string, denom: string }
|
|
330
|
+
*/
|
|
331
|
+
function parseGasPrice(gasPrice) {
|
|
332
|
+
const match = gasPrice.match(/^([\d.]+)(.+)$/);
|
|
333
|
+
if (!match) throw new ParseError("gasPrice", `Invalid format: ${gasPrice}`);
|
|
334
|
+
return {
|
|
335
|
+
amount: match[1],
|
|
336
|
+
denom: match[2]
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Calculate fee from gas limit and gas price.
|
|
341
|
+
*/
|
|
342
|
+
function calculateFee(gasLimit, gasPrice) {
|
|
343
|
+
const { amount, denom } = parseGasPrice(gasPrice);
|
|
344
|
+
return [new Coin(denom, mulBigIntByFloat(gasLimit, parseFloat(amount)))];
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Multiply a bigint by a float using fixed-point arithmetic.
|
|
348
|
+
* Avoids Number(bigint) precision loss for values > 2^53.
|
|
349
|
+
* The multiplier is scaled to 6 decimal places and ceiled, so the result
|
|
350
|
+
* may be slightly above the true mathematical ceiling. This is safe for
|
|
351
|
+
* gas estimation (always rounds in the user's favor).
|
|
352
|
+
*/
|
|
353
|
+
function mulBigIntByFloat(value, multiplier) {
|
|
354
|
+
if (!Number.isFinite(multiplier) || multiplier < 0) throw new ParseError("multiplier", `Expected a non-negative finite number, got: ${multiplier}`);
|
|
355
|
+
const PRECISION = 1000000n;
|
|
356
|
+
return (value * BigInt(Math.ceil(multiplier * Number(PRECISION))) + PRECISION - 1n) / PRECISION;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Estimate gas for a transaction.
|
|
360
|
+
*
|
|
361
|
+
* Uses the simulate endpoint to get accurate gas estimation.
|
|
362
|
+
*
|
|
363
|
+
* @param client - gRPC client with tx service
|
|
364
|
+
* @param msgs - Messages to estimate gas for
|
|
365
|
+
* @param signer - Signer address (for simulation)
|
|
366
|
+
* @param options - Estimation options
|
|
367
|
+
* @returns Gas estimate with fee
|
|
368
|
+
*
|
|
369
|
+
* @example
|
|
370
|
+
* ```typescript
|
|
371
|
+
* const estimate = await estimateGas(client, [sendMsg], wallet.address, {
|
|
372
|
+
* multiplier: 1.3,
|
|
373
|
+
* gasPrice: '0.015uinit'
|
|
374
|
+
* })
|
|
375
|
+
*
|
|
376
|
+
* console.log('Gas limit:', estimate.gasLimit)
|
|
377
|
+
* console.log('Fee:', estimate.fee)
|
|
378
|
+
* ```
|
|
379
|
+
*/
|
|
380
|
+
async function estimateGas(client, msgs, signer, options) {
|
|
381
|
+
const multiplier = options?.multiplier ?? 1.3;
|
|
382
|
+
const gasPrice = options?.gasPrice ?? "0.015uinit";
|
|
383
|
+
let sequence = 0n;
|
|
384
|
+
try {
|
|
385
|
+
sequence = (await getAccount(client, signer)).sequence;
|
|
386
|
+
} catch (error) {
|
|
387
|
+
if (!(error instanceof AccountNotFoundError) && !isNotFoundError(error)) throw error;
|
|
388
|
+
}
|
|
389
|
+
const txBody = create(TxBodySchema, {
|
|
390
|
+
messages: msgs.map((m) => normalizeMsg(m).toAny()),
|
|
391
|
+
memo: "",
|
|
392
|
+
timeoutHeight: 0n,
|
|
393
|
+
extensionOptions: [],
|
|
394
|
+
nonCriticalExtensionOptions: []
|
|
395
|
+
});
|
|
396
|
+
const signerInfo = create(SignerInfoSchema, {
|
|
397
|
+
publicKey: void 0,
|
|
398
|
+
modeInfo: create(ModeInfoSchema, { sum: {
|
|
399
|
+
case: "single",
|
|
400
|
+
value: { mode: SignMode.DIRECT }
|
|
401
|
+
} }),
|
|
402
|
+
sequence
|
|
403
|
+
});
|
|
404
|
+
const fee = create(FeeSchema, {
|
|
405
|
+
amount: [],
|
|
406
|
+
gasLimit: 0n,
|
|
407
|
+
payer: "",
|
|
408
|
+
granter: ""
|
|
409
|
+
});
|
|
410
|
+
const tx = create(TxSchema, {
|
|
411
|
+
body: txBody,
|
|
412
|
+
authInfo: create(AuthInfoSchema, {
|
|
413
|
+
signerInfos: [signerInfo],
|
|
414
|
+
fee,
|
|
415
|
+
tip: void 0
|
|
416
|
+
}),
|
|
417
|
+
signatures: [new Uint8Array(64)]
|
|
418
|
+
});
|
|
419
|
+
const response = await client.tx.simulate({ tx });
|
|
420
|
+
if (!response.gasInfo) throw new SimulationError("No gas info returned");
|
|
421
|
+
const gasUsed = response.gasInfo.gasUsed;
|
|
422
|
+
const gasLimit = mulBigIntByFloat(gasUsed, multiplier);
|
|
423
|
+
return {
|
|
424
|
+
gasLimit,
|
|
425
|
+
fee: calculateFee(gasLimit, gasPrice)
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Fetch the on-chain gas prices for a chain.
|
|
430
|
+
*
|
|
431
|
+
* Automatically detects chain type:
|
|
432
|
+
* - L1 (Initia): queries `initiaTx.gasPrices`
|
|
433
|
+
* - L2 (rollup): queries `opchild.params.minGasPrices`
|
|
434
|
+
*
|
|
435
|
+
* @param client - gRPC client with either `initiaTx` or `opchild` service
|
|
436
|
+
* @returns DecCoins collection of gas prices per denom
|
|
437
|
+
* @throws Error if neither `initiaTx` nor `opchild` service is available
|
|
438
|
+
*
|
|
439
|
+
* @example
|
|
440
|
+
* ```typescript
|
|
441
|
+
* // L1
|
|
442
|
+
* const prices = await getGasPrices(client)
|
|
443
|
+
* console.log(prices.get('uinit')?.amount) // '0.015000000000000000'
|
|
444
|
+
*
|
|
445
|
+
* // L2 rollup
|
|
446
|
+
* const prices = await getGasPrices(l2Client)
|
|
447
|
+
* ```
|
|
448
|
+
*/
|
|
449
|
+
async function getGasPrices(client) {
|
|
450
|
+
if (client.initiaTx) return new DecCoins((await client.initiaTx.gasPrices({})).gasPrices);
|
|
451
|
+
if (client.opchild) {
|
|
452
|
+
const res = await client.opchild.params({});
|
|
453
|
+
if (!res.params) throw new Error("getGasPrices: opchild.params() returned no params");
|
|
454
|
+
return new DecCoins(res.params.minGasPrices);
|
|
455
|
+
}
|
|
456
|
+
throw new Error("Cannot determine gas prices: client has neither initiaTx nor opchild service");
|
|
457
|
+
}
|
|
458
|
+
//#endregion
|
|
459
|
+
//#region src/tx/unsigned-tx.ts
|
|
460
|
+
/**
|
|
461
|
+
* Unsigned transaction with all structured data needed to produce a signed transaction.
|
|
462
|
+
*
|
|
463
|
+
* Encoding (bodyBytes, authInfoBytes) is deferred to the signing step based on signMode.
|
|
464
|
+
* For multisig workflows, use getMultisigSignBytes() and assembleMultisig().
|
|
465
|
+
*
|
|
466
|
+
* @example
|
|
467
|
+
* ```typescript
|
|
468
|
+
* // Standard single-key signing
|
|
469
|
+
* const signedTx = await key.sign(unsignedTx)
|
|
470
|
+
*
|
|
471
|
+
* // Multisig signing
|
|
472
|
+
* const signBytes = unsignedTx.getMultisigSignBytes(mpk)
|
|
473
|
+
* const sig = await key.sign(signBytes)
|
|
474
|
+
* const signedTx = unsignedTx.assembleMultisig(mpk, [{ index: 0, signature: sig }])
|
|
475
|
+
* ```
|
|
476
|
+
*/
|
|
477
|
+
var UnsignedTx = class {
|
|
478
|
+
/** Messages to include in the transaction */
|
|
479
|
+
msgs;
|
|
480
|
+
/** Signing mode determined for this transaction */
|
|
481
|
+
signMode;
|
|
482
|
+
/** Chain ID for signing */
|
|
483
|
+
chainId;
|
|
484
|
+
/** Account number for signing */
|
|
485
|
+
accountNumber;
|
|
486
|
+
/** Account sequence number */
|
|
487
|
+
sequence;
|
|
488
|
+
/** Fee for the transaction */
|
|
489
|
+
fee;
|
|
490
|
+
/** Gas limit */
|
|
491
|
+
gasLimit;
|
|
492
|
+
/** Memo */
|
|
493
|
+
memo;
|
|
494
|
+
/** Timeout block height (0 = no timeout) */
|
|
495
|
+
timeoutHeight;
|
|
496
|
+
constructor(data) {
|
|
497
|
+
this.msgs = data.msgs;
|
|
498
|
+
this.signMode = data.signMode;
|
|
499
|
+
this.chainId = data.chainId;
|
|
500
|
+
this.accountNumber = data.accountNumber;
|
|
501
|
+
this.sequence = data.sequence;
|
|
502
|
+
this.fee = data.fee.map((c) => c instanceof Coin ? c : new Coin(c.denom, c.amount));
|
|
503
|
+
this.gasLimit = data.gasLimit;
|
|
504
|
+
this.memo = data.memo;
|
|
505
|
+
this.timeoutHeight = data.timeoutHeight ?? 0n;
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* Compute the sign bytes for multisig SIGN_MODE_DIRECT signing.
|
|
509
|
+
*
|
|
510
|
+
* Builds bodyBytes and authInfoBytes with the multisig public key in a
|
|
511
|
+
* single-DIRECT SignerInfo (matches what the chain expects for the SignDoc),
|
|
512
|
+
* then serializes them into a protobuf SignDoc.
|
|
513
|
+
*
|
|
514
|
+
* Each co-signer must call this method and sign the returned bytes.
|
|
515
|
+
*
|
|
516
|
+
* @param mpk - The multisig public key
|
|
517
|
+
* @returns Protobuf-encoded SignDoc bytes to be signed by each co-signer
|
|
518
|
+
*/
|
|
519
|
+
getMultisigSignBytes(mpk) {
|
|
520
|
+
const { bodyBytes, authInfoBytes } = this._encodeForMultisigSignDoc(mpk);
|
|
521
|
+
return makeSignBytes(bodyBytes, authInfoBytes, this.chainId, this.accountNumber);
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* Assemble a complete signed multisig transaction from collected signatures.
|
|
525
|
+
*
|
|
526
|
+
* Builds a TxRaw with the multisig ModeInfo derived from the provided signatures
|
|
527
|
+
* and the MultiSignature proto encoding. The caller is responsible for ensuring
|
|
528
|
+
* enough signatures have been collected to meet the threshold.
|
|
529
|
+
*
|
|
530
|
+
* @param mpk - The multisig public key (defines threshold and signer order)
|
|
531
|
+
* @param signatures - Collected signatures with their signer index
|
|
532
|
+
* @returns SignedTx ready for broadcast
|
|
533
|
+
*/
|
|
534
|
+
assembleMultisig(mpk, signatures) {
|
|
535
|
+
const ms = new MultiSignature(mpk);
|
|
536
|
+
for (const { index, signature } of signatures) ms.appendSignature(index, signature);
|
|
537
|
+
if (!ms.isComplete()) throw new Error(`Multisig threshold not met: need ${mpk.threshold} signatures, got ${signatures.length}`);
|
|
538
|
+
return { txBytes: toBinary(TxRawSchema, createSignedTx(this._buildTxBody(), this._buildFeeOnlyAuthInfo(), mpk, ms, this.sequence)) };
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Build the TxBody proto from this transaction's messages and memo.
|
|
542
|
+
*/
|
|
543
|
+
_buildTxBody() {
|
|
544
|
+
return create(TxBodySchema, {
|
|
545
|
+
messages: this.msgs.map((m) => m.toAny()),
|
|
546
|
+
memo: this.memo,
|
|
547
|
+
timeoutHeight: this.timeoutHeight
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
_buildFee() {
|
|
551
|
+
return create(FeeSchema, {
|
|
552
|
+
amount: this.fee.map((c) => c.toProto()),
|
|
553
|
+
gasLimit: this.gasLimit
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* Build a minimal AuthInfo that carries only the fee (no signerInfos).
|
|
558
|
+
* createSignedTx replaces signerInfos internally, so we only need to
|
|
559
|
+
* preserve the fee for the final TxRaw.
|
|
560
|
+
*/
|
|
561
|
+
_buildFeeOnlyAuthInfo() {
|
|
562
|
+
return create(AuthInfoSchema, { fee: this._buildFee() });
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* Encode bodyBytes and authInfoBytes for the multisig SignDoc.
|
|
566
|
+
*
|
|
567
|
+
* Uses a single SIGN_MODE_DIRECT SignerInfo with the multisig public key.
|
|
568
|
+
* This is the standard form expected by the chain when verifying individual
|
|
569
|
+
* co-signer signatures against the SignDoc.
|
|
570
|
+
*/
|
|
571
|
+
_encodeForMultisigSignDoc(mpk) {
|
|
572
|
+
return {
|
|
573
|
+
bodyBytes: toBinary(TxBodySchema, this._buildTxBody()),
|
|
574
|
+
authInfoBytes: toBinary(AuthInfoSchema, create(AuthInfoSchema, {
|
|
575
|
+
signerInfos: [create(SignerInfoSchema, {
|
|
576
|
+
publicKey: mpk.packAny(),
|
|
577
|
+
modeInfo: create(ModeInfoSchema, { sum: {
|
|
578
|
+
case: "single",
|
|
579
|
+
value: { mode: SignMode.DIRECT }
|
|
580
|
+
} }),
|
|
581
|
+
sequence: this.sequence
|
|
582
|
+
})],
|
|
583
|
+
fee: this._buildFee()
|
|
584
|
+
}))
|
|
585
|
+
};
|
|
586
|
+
}
|
|
587
|
+
};
|
|
588
|
+
//#endregion
|
|
589
|
+
//#region src/client/types.ts
|
|
590
|
+
/**
|
|
591
|
+
* Factory helpers for creating AuthConfig.
|
|
592
|
+
*
|
|
593
|
+
* @example
|
|
594
|
+
* ```typescript
|
|
595
|
+
* auth.apiKey('sk-12345')
|
|
596
|
+
* auth.apiKey('key', 'x-alchemy-token')
|
|
597
|
+
* auth.bearer('eyJhbGciOiJIUzI1NiIs...')
|
|
598
|
+
* auth.basic('username', 'password')
|
|
599
|
+
* ```
|
|
600
|
+
*/
|
|
601
|
+
const auth = {
|
|
602
|
+
bearer: (token) => ({
|
|
603
|
+
type: "bearer",
|
|
604
|
+
token
|
|
605
|
+
}),
|
|
606
|
+
apiKey: (key, header) => ({
|
|
607
|
+
type: "api-key",
|
|
608
|
+
key,
|
|
609
|
+
header
|
|
610
|
+
}),
|
|
611
|
+
basic: (username, password) => ({
|
|
612
|
+
type: "basic",
|
|
613
|
+
username,
|
|
614
|
+
password
|
|
615
|
+
})
|
|
616
|
+
};
|
|
617
|
+
//#endregion
|
|
618
|
+
//#region src/client/rpc.ts
|
|
619
|
+
/**
|
|
620
|
+
* CometBFT HTTP RPC Client
|
|
621
|
+
*
|
|
622
|
+
* Provides HTTP-based RPC methods for CometBFT endpoints not available via gRPC.
|
|
623
|
+
* Primary use case: block_results (finalize_block_events, validator_updates).
|
|
624
|
+
*/
|
|
625
|
+
/**
|
|
626
|
+
* CometBFT HTTP RPC client.
|
|
627
|
+
*
|
|
628
|
+
* Provides access to CometBFT v0.38 endpoints not available via Cosmos SDK gRPC:
|
|
629
|
+
*
|
|
630
|
+
* **Block & Header:** `block`, `blockByHash`, `blockResults`, `header`, `headerByHash`, `blockchain`, `blockSearch`
|
|
631
|
+
* **Transaction:** `tx`, `txSearch`, `unconfirmedTxs`, `numUnconfirmedTxs`
|
|
632
|
+
* **Consensus:** `validators`, `commit`, `consensusParams`, `consensusState`, `dumpConsensusState`
|
|
633
|
+
* **Node:** `status`, `health`, `netInfo`, `genesis`, `genesisChunked`
|
|
634
|
+
* **ABCI:** `abciInfo`, `abciQuery`
|
|
635
|
+
*
|
|
636
|
+
* @example
|
|
637
|
+
* ```typescript
|
|
638
|
+
* const rpc = createRpcClient('https://rpc.initia.xyz')
|
|
639
|
+
*
|
|
640
|
+
* const results = await rpc.blockResults(14107946)
|
|
641
|
+
* const tx = await rpc.tx('6E7457...')
|
|
642
|
+
* const header = await rpc.header(14107946)
|
|
643
|
+
* const healthy = await rpc.health()
|
|
644
|
+
* ```
|
|
645
|
+
*/
|
|
646
|
+
var RpcClient = class {
|
|
647
|
+
config;
|
|
648
|
+
constructor(endpoint, options = {}) {
|
|
649
|
+
validateHeaderConflict(options.auth, options.headers, "context");
|
|
650
|
+
this.config = {
|
|
651
|
+
endpoint,
|
|
652
|
+
auth: options.auth,
|
|
653
|
+
headers: options.headers,
|
|
654
|
+
timeoutMs: options.timeoutMs
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* Make a GET request to a CometBFT RPC endpoint.
|
|
659
|
+
*/
|
|
660
|
+
async get(path, options) {
|
|
661
|
+
const response = await httpRequest(this.config, path, { method: "GET" }, options);
|
|
662
|
+
if (!response.ok) {
|
|
663
|
+
const body = await response.text().catch(() => "");
|
|
664
|
+
throw new Error(`HTTP error: ${response.status} ${response.statusText}${body ? ` — ${body}` : ""}`);
|
|
665
|
+
}
|
|
666
|
+
const json = await response.json();
|
|
667
|
+
if (json.error) throw new Error(`RPC error (${json.error.code}): ${json.error.message}`);
|
|
668
|
+
return json.result;
|
|
669
|
+
}
|
|
670
|
+
/**
|
|
671
|
+
* Get ABCI results for a block, including finalize_block_events.
|
|
672
|
+
*
|
|
673
|
+
* This is the primary endpoint for data not available via gRPC:
|
|
674
|
+
* - `finalize_block_events`: chain-level events (staking rewards, slashing, epoch)
|
|
675
|
+
* - `txs_results`: per-tx execution results for the entire block
|
|
676
|
+
* - `validator_updates`: validator set changes
|
|
677
|
+
* - `consensus_param_updates`: consensus parameter changes
|
|
678
|
+
*
|
|
679
|
+
* @param height - Block height (omit for latest)
|
|
680
|
+
*/
|
|
681
|
+
async blockResults(height, options) {
|
|
682
|
+
const params = height !== void 0 ? `?height=${height}` : "";
|
|
683
|
+
return this.get(`/block_results${params}`, options);
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* Get transaction by hash with block index.
|
|
687
|
+
*
|
|
688
|
+
* Unlike gRPC GetTx, includes `index` (tx position within block).
|
|
689
|
+
*
|
|
690
|
+
* @param hash - Transaction hash (hex, with or without 0x prefix)
|
|
691
|
+
*/
|
|
692
|
+
async tx(hash, options) {
|
|
693
|
+
const normalizedHash = hash.startsWith("0x") ? hash : `0x${hash}`;
|
|
694
|
+
return this.get(`/tx?hash=${normalizedHash}`, options);
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Search transactions by TMQL event query.
|
|
698
|
+
*
|
|
699
|
+
* @param query - TMQL query string (e.g., "tx.height=100", "transfer.sender='init1...'")
|
|
700
|
+
* @param searchOptions - Pagination options
|
|
701
|
+
*
|
|
702
|
+
* @example
|
|
703
|
+
* ```typescript
|
|
704
|
+
* // Find all txs at a specific height
|
|
705
|
+
* const result = await rpc.txSearch("tx.height=14107946")
|
|
706
|
+
*
|
|
707
|
+
* // Find txs by event
|
|
708
|
+
* const result = await rpc.txSearch("transfer.sender='init1abc...'", { perPage: 50 })
|
|
709
|
+
* ```
|
|
710
|
+
*/
|
|
711
|
+
async txSearch(query, searchOptions, options) {
|
|
712
|
+
const params = new URLSearchParams();
|
|
713
|
+
params.set("query", `"${query}"`);
|
|
714
|
+
if (searchOptions?.page) params.set("page", String(searchOptions.page));
|
|
715
|
+
if (searchOptions?.perPage) params.set("per_page", String(searchOptions.perPage));
|
|
716
|
+
if (searchOptions?.orderBy) params.set("order_by", `"${searchOptions.orderBy}"`);
|
|
717
|
+
return this.get(`/tx_search?${params.toString()}`, options);
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* Get block by height.
|
|
721
|
+
*
|
|
722
|
+
* @param height - Block height (omit for latest)
|
|
723
|
+
*/
|
|
724
|
+
async block(height, options) {
|
|
725
|
+
const params = height !== void 0 ? `?height=${height}` : "";
|
|
726
|
+
return this.get(`/block${params}`, options);
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* Get node status including sync info.
|
|
730
|
+
*/
|
|
731
|
+
async status(options) {
|
|
732
|
+
return this.get("/status", options);
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* Check if the node is healthy.
|
|
736
|
+
*
|
|
737
|
+
* Returns `true` if healthy, `false` otherwise. Never throws for health status.
|
|
738
|
+
*/
|
|
739
|
+
async health(options) {
|
|
740
|
+
try {
|
|
741
|
+
await this.get("/health", options);
|
|
742
|
+
return true;
|
|
743
|
+
} catch {
|
|
744
|
+
return false;
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* Get ABCI application info.
|
|
749
|
+
*/
|
|
750
|
+
async abciInfo(options) {
|
|
751
|
+
return this.get("/abci_info", options);
|
|
752
|
+
}
|
|
753
|
+
/**
|
|
754
|
+
* Get signed header (commit) at a given height.
|
|
755
|
+
*
|
|
756
|
+
* @param height - Block height (omit for latest)
|
|
757
|
+
*/
|
|
758
|
+
async commit(height, options) {
|
|
759
|
+
const params = height !== void 0 ? `?height=${height}` : "";
|
|
760
|
+
return this.get(`/commit${params}`, options);
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* Get validator set at a given height.
|
|
764
|
+
*
|
|
765
|
+
* CometBFT returns max 100 validators per page (default 30).
|
|
766
|
+
*
|
|
767
|
+
* @param height - Block height (omit for latest)
|
|
768
|
+
* @param pagination - Pagination options
|
|
769
|
+
*/
|
|
770
|
+
async validators(height, pagination, options) {
|
|
771
|
+
const params = new URLSearchParams();
|
|
772
|
+
if (height !== void 0) params.set("height", String(height));
|
|
773
|
+
if (pagination?.page) params.set("page", String(pagination.page));
|
|
774
|
+
if (pagination?.perPage) params.set("per_page", String(pagination.perPage));
|
|
775
|
+
const qs = params.toString();
|
|
776
|
+
return this.get(`/validators${qs ? `?${qs}` : ""}`, options);
|
|
777
|
+
}
|
|
778
|
+
/**
|
|
779
|
+
* Get consensus parameters at a given height.
|
|
780
|
+
*
|
|
781
|
+
* @param height - Block height (omit for latest)
|
|
782
|
+
*/
|
|
783
|
+
async consensusParams(height, options) {
|
|
784
|
+
const params = height !== void 0 ? `?height=${height}` : "";
|
|
785
|
+
return this.get(`/consensus_params${params}`, options);
|
|
786
|
+
}
|
|
787
|
+
/**
|
|
788
|
+
* Get block metadata for a range of heights.
|
|
789
|
+
*
|
|
790
|
+
* CometBFT returns max 20 block metas per call.
|
|
791
|
+
*
|
|
792
|
+
* @param minHeight - Minimum block height (optional)
|
|
793
|
+
* @param maxHeight - Maximum block height (optional)
|
|
794
|
+
*/
|
|
795
|
+
async blockchain(minHeight, maxHeight, options) {
|
|
796
|
+
const params = new URLSearchParams();
|
|
797
|
+
if (minHeight !== void 0) params.set("minHeight", String(minHeight));
|
|
798
|
+
if (maxHeight !== void 0) params.set("maxHeight", String(maxHeight));
|
|
799
|
+
const qs = params.toString();
|
|
800
|
+
return this.get(`/blockchain${qs ? `?${qs}` : ""}`, options);
|
|
801
|
+
}
|
|
802
|
+
/**
|
|
803
|
+
* Get block by hash.
|
|
804
|
+
*
|
|
805
|
+
* @param hash - Block hash (hex, with or without 0x prefix)
|
|
806
|
+
*/
|
|
807
|
+
async blockByHash(hash, options) {
|
|
808
|
+
const normalizedHash = hash.startsWith("0x") ? hash : `0x${hash}`;
|
|
809
|
+
return this.get(`/block_by_hash?hash=${normalizedHash}`, options);
|
|
810
|
+
}
|
|
811
|
+
/**
|
|
812
|
+
* Search blocks by TMQL event query.
|
|
813
|
+
*
|
|
814
|
+
* @param query - TMQL query string
|
|
815
|
+
* @param searchOptions - Pagination and ordering options
|
|
816
|
+
*/
|
|
817
|
+
async blockSearch(query, searchOptions, options) {
|
|
818
|
+
const params = new URLSearchParams();
|
|
819
|
+
params.set("query", `"${query}"`);
|
|
820
|
+
if (searchOptions?.page) params.set("page", String(searchOptions.page));
|
|
821
|
+
if (searchOptions?.perPage) params.set("per_page", String(searchOptions.perPage));
|
|
822
|
+
if (searchOptions?.orderBy) params.set("order_by", `"${searchOptions.orderBy}"`);
|
|
823
|
+
return this.get(`/block_search?${params.toString()}`, options);
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* Get unconfirmed transactions from the mempool.
|
|
827
|
+
*
|
|
828
|
+
* @param limit - Max number of transactions to return
|
|
829
|
+
*/
|
|
830
|
+
async unconfirmedTxs(limit, options) {
|
|
831
|
+
const params = limit !== void 0 ? `?limit=${limit}` : "";
|
|
832
|
+
return this.get(`/unconfirmed_txs${params}`, options);
|
|
833
|
+
}
|
|
834
|
+
/**
|
|
835
|
+
* Get number of unconfirmed transactions in the mempool.
|
|
836
|
+
*/
|
|
837
|
+
async numUnconfirmedTxs(options) {
|
|
838
|
+
return this.get("/num_unconfirmed_txs", options);
|
|
839
|
+
}
|
|
840
|
+
/**
|
|
841
|
+
* Get block header by height (lightweight alternative to block()).
|
|
842
|
+
*
|
|
843
|
+
* @param height - Block height (omit for latest)
|
|
844
|
+
*/
|
|
845
|
+
async header(height, options) {
|
|
846
|
+
const params = height !== void 0 ? `?height=${height}` : "";
|
|
847
|
+
return this.get(`/header${params}`, options);
|
|
848
|
+
}
|
|
849
|
+
/**
|
|
850
|
+
* Get block header by hash.
|
|
851
|
+
*
|
|
852
|
+
* @param hash - Block hash (hex, with or without 0x prefix)
|
|
853
|
+
*/
|
|
854
|
+
async headerByHash(hash, options) {
|
|
855
|
+
const normalizedHash = hash.startsWith("0x") ? hash : `0x${hash}`;
|
|
856
|
+
return this.get(`/header_by_hash?hash=${normalizedHash}`, options);
|
|
857
|
+
}
|
|
858
|
+
/**
|
|
859
|
+
* Get current consensus state.
|
|
860
|
+
*/
|
|
861
|
+
async consensusState(options) {
|
|
862
|
+
return this.get("/consensus_state", options);
|
|
863
|
+
}
|
|
864
|
+
/**
|
|
865
|
+
* Dump full consensus state (verbose debugging).
|
|
866
|
+
*/
|
|
867
|
+
async dumpConsensusState(options) {
|
|
868
|
+
return this.get("/dump_consensus_state", options);
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
* Get the full genesis document.
|
|
872
|
+
*
|
|
873
|
+
* Can be very large — consider using genesisChunked() for large genesis files.
|
|
874
|
+
*/
|
|
875
|
+
async genesis(options) {
|
|
876
|
+
return this.get("/genesis", options);
|
|
877
|
+
}
|
|
878
|
+
/**
|
|
879
|
+
* Get genesis document in chunks (16MB per chunk).
|
|
880
|
+
*
|
|
881
|
+
* @param chunk - 0-based chunk index
|
|
882
|
+
*/
|
|
883
|
+
async genesisChunked(chunk, options) {
|
|
884
|
+
return this.get(`/genesis_chunked?chunk=${chunk}`, options);
|
|
885
|
+
}
|
|
886
|
+
/**
|
|
887
|
+
* Get network info including connected peers.
|
|
888
|
+
*/
|
|
889
|
+
async netInfo(options) {
|
|
890
|
+
return this.get("/net_info", options);
|
|
891
|
+
}
|
|
892
|
+
/**
|
|
893
|
+
* Query the ABCI application directly.
|
|
894
|
+
*
|
|
895
|
+
* @param path - ABCI query path (e.g., "/store/bank/key")
|
|
896
|
+
* @param queryOptions - Optional data, height, and prove parameters
|
|
897
|
+
*/
|
|
898
|
+
async abciQuery(path, queryOptions, options) {
|
|
899
|
+
const params = new URLSearchParams();
|
|
900
|
+
params.set("path", `"${path}"`);
|
|
901
|
+
if (queryOptions?.data) params.set("data", `"${queryOptions.data}"`);
|
|
902
|
+
if (queryOptions?.height !== void 0) params.set("height", String(queryOptions.height));
|
|
903
|
+
if (queryOptions?.prove !== void 0) params.set("prove", String(queryOptions.prove));
|
|
904
|
+
return this.get(`/abci_query?${params.toString()}`, options);
|
|
905
|
+
}
|
|
906
|
+
};
|
|
907
|
+
/**
|
|
908
|
+
* Create a CometBFT HTTP RPC client.
|
|
909
|
+
*
|
|
910
|
+
* @param endpoint - CometBFT RPC endpoint URL (e.g., 'https://rpc.initia.xyz')
|
|
911
|
+
* @param options - Client options (auth, headers, timeout)
|
|
912
|
+
*/
|
|
913
|
+
function createRpcClient(endpoint, options) {
|
|
914
|
+
return new RpcClient(endpoint, options);
|
|
915
|
+
}
|
|
916
|
+
//#endregion
|
|
917
|
+
//#region src/client/broadcast.ts
|
|
918
|
+
/**
|
|
919
|
+
* Broadcast module - Submit signed transactions to the network.
|
|
920
|
+
*/
|
|
921
|
+
/**
|
|
922
|
+
* Helper to create BroadcastResultWithWait from BroadcastResult.
|
|
923
|
+
* @internal
|
|
924
|
+
*/
|
|
925
|
+
function createBroadcastResultWithWait(result, waitFn) {
|
|
926
|
+
return {
|
|
927
|
+
...result,
|
|
928
|
+
waitForConfirmation: (options) => waitFn(result.txHash, options)
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* Map our BroadcastMode to BSR enum.
|
|
933
|
+
*/
|
|
934
|
+
function toBsrMode(mode) {
|
|
935
|
+
switch (mode) {
|
|
936
|
+
case "sync": return BroadcastMode.SYNC;
|
|
937
|
+
case "async": return BroadcastMode.ASYNC;
|
|
938
|
+
case "block": return BroadcastMode.BLOCK;
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
/**
|
|
942
|
+
* Broadcast a signed transaction to the network.
|
|
943
|
+
*
|
|
944
|
+
* @param client - gRPC client with tx service
|
|
945
|
+
* @param signedTx - Signed transaction bytes
|
|
946
|
+
* @param options - Broadcast options (mode defaults to 'sync')
|
|
947
|
+
* @returns Broadcast result with txHash and gasUsed
|
|
948
|
+
* @throws {BroadcastError} If the transaction fails
|
|
949
|
+
*
|
|
950
|
+
* @example
|
|
951
|
+
* ```typescript
|
|
952
|
+
* const result = await broadcast(client, signedTx)
|
|
953
|
+
* console.log('Tx hash:', result.txHash)
|
|
954
|
+
* console.log('Gas used:', result.gasUsed)
|
|
955
|
+
* ```
|
|
956
|
+
*/
|
|
957
|
+
async function broadcast(client, signedTx, options) {
|
|
958
|
+
const mode = options?.mode ?? "sync";
|
|
959
|
+
const txResponse = (await client.tx.broadcastTx({
|
|
960
|
+
txBytes: signedTx.txBytes,
|
|
961
|
+
mode: toBsrMode(mode)
|
|
962
|
+
})).txResponse;
|
|
963
|
+
if (!txResponse) throw new BroadcastError("", 0, "No response from broadcast");
|
|
964
|
+
if (txResponse.code !== 0) throw new BroadcastError(txResponse.txhash, txResponse.code, txResponse.rawLog);
|
|
965
|
+
return {
|
|
966
|
+
txHash: txResponse.txhash,
|
|
967
|
+
gasUsed: txResponse.gasUsed,
|
|
968
|
+
rawLog: txResponse.rawLog || void 0
|
|
969
|
+
};
|
|
970
|
+
}
|
|
971
|
+
//#endregion
|
|
972
|
+
export { auth as a, getGasPrices as c, Coins as d, DecCoins as f, createRpcClient as i, getAccount as l, createBroadcastResultWithWait as n, UnsignedTx as o, RpcClient as r, estimateGas as s, broadcast as t, file_cosmos_auth_v1beta1_auth as u };
|
|
973
|
+
|
|
974
|
+
//# sourceMappingURL=broadcast-De8MdmYa.mjs.map
|