@initia/initia.js 0.0.1
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/LICENSE +201 -0
- package/README.md +2 -0
- package/dist/bundle.js +3 -0
- package/dist/bundle.js.LICENSE.txt +39 -0
- package/dist/bundle.js.map +1 -0
- package/dist/bundle.node.js +3 -0
- package/dist/bundle.node.js.LICENSE.txt +33 -0
- package/dist/bundle.node.js.map +1 -0
- package/dist/client/LocalInitia.d.ts +18 -0
- package/dist/client/LocalInitia.js +59 -0
- package/dist/client/LocalInitia.js.map +1 -0
- package/dist/client/WebSocketClient.d.ts +83 -0
- package/dist/client/WebSocketClient.js +216 -0
- package/dist/client/WebSocketClient.js.map +1 -0
- package/dist/client/index.d.ts +5 -0
- package/dist/client/index.js +25 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/lcd/APIRequester.d.ts +25 -0
- package/dist/client/lcd/APIRequester.js +95 -0
- package/dist/client/lcd/APIRequester.js.map +1 -0
- package/dist/client/lcd/LCDClient.d.ts +67 -0
- package/dist/client/lcd/LCDClient.js +77 -0
- package/dist/client/lcd/LCDClient.js.map +1 -0
- package/dist/client/lcd/LCDUtils.d.ts +18 -0
- package/dist/client/lcd/LCDUtils.js +93 -0
- package/dist/client/lcd/LCDUtils.js.map +1 -0
- package/dist/client/lcd/Wallet.d.ts +24 -0
- package/dist/client/lcd/Wallet.js +127 -0
- package/dist/client/lcd/Wallet.js.map +1 -0
- package/dist/client/lcd/api/AuthAPI.d.ts +29 -0
- package/dist/client/lcd/api/AuthAPI.js +104 -0
- package/dist/client/lcd/api/AuthAPI.js.map +1 -0
- package/dist/client/lcd/api/AuthzAPI.d.ts +18 -0
- package/dist/client/lcd/api/AuthzAPI.js +108 -0
- package/dist/client/lcd/api/AuthzAPI.js.map +1 -0
- package/dist/client/lcd/api/BankAPI.d.ts +40 -0
- package/dist/client/lcd/api/BankAPI.js +122 -0
- package/dist/client/lcd/api/BankAPI.js.map +1 -0
- package/dist/client/lcd/api/BaseAPI.d.ts +5 -0
- package/dist/client/lcd/api/BaseAPI.js +11 -0
- package/dist/client/lcd/api/BaseAPI.js.map +1 -0
- package/dist/client/lcd/api/DistributionAPI.d.ts +78 -0
- package/dist/client/lcd/api/DistributionAPI.js +156 -0
- package/dist/client/lcd/api/DistributionAPI.js.map +1 -0
- package/dist/client/lcd/api/FeeGrantAPI.d.ts +23 -0
- package/dist/client/lcd/api/FeeGrantAPI.js +108 -0
- package/dist/client/lcd/api/FeeGrantAPI.js.map +1 -0
- package/dist/client/lcd/api/GovAPI.d.ts +119 -0
- package/dist/client/lcd/api/GovAPI.js +343 -0
- package/dist/client/lcd/api/GovAPI.js.map +1 -0
- package/dist/client/lcd/api/IbcAPI.d.ts +87 -0
- package/dist/client/lcd/api/IbcAPI.js +229 -0
- package/dist/client/lcd/api/IbcAPI.js.map +1 -0
- package/dist/client/lcd/api/IbcTransferAPI.d.ts +25 -0
- package/dist/client/lcd/api/IbcTransferAPI.js +117 -0
- package/dist/client/lcd/api/IbcTransferAPI.js.map +1 -0
- package/dist/client/lcd/api/MintAPI.d.ts +35 -0
- package/dist/client/lcd/api/MintAPI.js +113 -0
- package/dist/client/lcd/api/MintAPI.js.map +1 -0
- package/dist/client/lcd/api/MoveAPI.d.ts +29 -0
- package/dist/client/lcd/api/MoveAPI.js +148 -0
- package/dist/client/lcd/api/MoveAPI.js.map +1 -0
- package/dist/client/lcd/api/SlashingAPI.d.ts +56 -0
- package/dist/client/lcd/api/SlashingAPI.js +125 -0
- package/dist/client/lcd/api/SlashingAPI.js.map +1 -0
- package/dist/client/lcd/api/StakingAPI.d.ts +98 -0
- package/dist/client/lcd/api/StakingAPI.js +296 -0
- package/dist/client/lcd/api/StakingAPI.js.map +1 -0
- package/dist/client/lcd/api/TendermintAPI.d.ts +23 -0
- package/dist/client/lcd/api/TendermintAPI.js +122 -0
- package/dist/client/lcd/api/TendermintAPI.js.map +1 -0
- package/dist/client/lcd/api/TxAPI.d.ts +243 -0
- package/dist/client/lcd/api/TxAPI.js +491 -0
- package/dist/client/lcd/api/TxAPI.js.map +1 -0
- package/dist/client/lcd/api/UpgradeAPI.d.ts +28 -0
- package/dist/client/lcd/api/UpgradeAPI.js +109 -0
- package/dist/client/lcd/api/UpgradeAPI.js.map +1 -0
- package/dist/client/lcd/api/index.d.ts +15 -0
- package/dist/client/lcd/api/index.js +32 -0
- package/dist/client/lcd/api/index.js.map +1 -0
- package/dist/core/Block.d.ts +58 -0
- package/dist/core/Block.js +3 -0
- package/dist/core/Block.js.map +1 -0
- package/dist/core/Coin.d.ts +87 -0
- package/dist/core/Coin.js +195 -0
- package/dist/core/Coin.js.map +1 -0
- package/dist/core/Coins.d.ts +120 -0
- package/dist/core/Coins.js +259 -0
- package/dist/core/Coins.js.map +1 -0
- package/dist/core/CompactBitArray.d.ts +23 -0
- package/dist/core/CompactBitArray.js +94 -0
- package/dist/core/CompactBitArray.js.map +1 -0
- package/dist/core/Denom.d.ts +1 -0
- package/dist/core/Denom.js +3 -0
- package/dist/core/Denom.js.map +1 -0
- package/dist/core/Deposit.d.ts +37 -0
- package/dist/core/Deposit.js +81 -0
- package/dist/core/Deposit.js.map +1 -0
- package/dist/core/Fee.d.ts +42 -0
- package/dist/core/Fee.js +88 -0
- package/dist/core/Fee.js.map +1 -0
- package/dist/core/Msg.d.ts +24 -0
- package/dist/core/Msg.js +335 -0
- package/dist/core/Msg.js.map +1 -0
- package/dist/core/MultiSignature.d.ts +17 -0
- package/dist/core/MultiSignature.js +57 -0
- package/dist/core/MultiSignature.js.map +1 -0
- package/dist/core/PublicKey.d.ts +99 -0
- package/dist/core/PublicKey.js +274 -0
- package/dist/core/PublicKey.js.map +1 -0
- package/dist/core/SignDoc.d.ts +54 -0
- package/dist/core/SignDoc.js +96 -0
- package/dist/core/SignDoc.js.map +1 -0
- package/dist/core/SignatureV2.d.ts +66 -0
- package/dist/core/SignatureV2.js +131 -0
- package/dist/core/SignatureV2.js.map +1 -0
- package/dist/core/Tx.d.ts +147 -0
- package/dist/core/Tx.js +279 -0
- package/dist/core/Tx.js.map +1 -0
- package/dist/core/TxInfo.d.ts +91 -0
- package/dist/core/TxInfo.js +115 -0
- package/dist/core/TxInfo.js.map +1 -0
- package/dist/core/ValidatorSet.d.ts +11 -0
- package/dist/core/ValidatorSet.js +3 -0
- package/dist/core/ValidatorSet.js.map +1 -0
- package/dist/core/auth/Account.d.ts +18 -0
- package/dist/core/auth/Account.js +62 -0
- package/dist/core/auth/Account.js.map +1 -0
- package/dist/core/auth/BaseAccount.d.ts +57 -0
- package/dist/core/auth/BaseAccount.js +113 -0
- package/dist/core/auth/BaseAccount.js.map +1 -0
- package/dist/core/auth/BaseVestingAccount.d.ts +58 -0
- package/dist/core/auth/BaseVestingAccount.js +123 -0
- package/dist/core/auth/BaseVestingAccount.js.map +1 -0
- package/dist/core/auth/ContinuousVestingAccount.d.ts +45 -0
- package/dist/core/auth/ContinuousVestingAccount.js +116 -0
- package/dist/core/auth/ContinuousVestingAccount.js.map +1 -0
- package/dist/core/auth/DelayedVestingAccount.d.ts +42 -0
- package/dist/core/auth/DelayedVestingAccount.js +108 -0
- package/dist/core/auth/DelayedVestingAccount.js.map +1 -0
- package/dist/core/auth/PeriodicVestingAccount.d.ts +72 -0
- package/dist/core/auth/PeriodicVestingAccount.js +170 -0
- package/dist/core/auth/PeriodicVestingAccount.js.map +1 -0
- package/dist/core/auth/index.d.ts +6 -0
- package/dist/core/auth/index.js +23 -0
- package/dist/core/auth/index.js.map +1 -0
- package/dist/core/authz/authorizations/Authorization.d.ts +37 -0
- package/dist/core/authz/authorizations/Authorization.js +103 -0
- package/dist/core/authz/authorizations/Authorization.js.map +1 -0
- package/dist/core/authz/authorizations/GenericAuthorization.d.ts +28 -0
- package/dist/core/authz/authorizations/GenericAuthorization.js +71 -0
- package/dist/core/authz/authorizations/GenericAuthorization.js.map +1 -0
- package/dist/core/authz/authorizations/SendAuthorization.d.ts +29 -0
- package/dist/core/authz/authorizations/SendAuthorization.js +72 -0
- package/dist/core/authz/authorizations/SendAuthorization.js.map +1 -0
- package/dist/core/authz/authorizations/StakeAuthorization.d.ts +48 -0
- package/dist/core/authz/authorizations/StakeAuthorization.js +122 -0
- package/dist/core/authz/authorizations/StakeAuthorization.js.map +1 -0
- package/dist/core/authz/authorizations/index.d.ts +4 -0
- package/dist/core/authz/authorizations/index.js +21 -0
- package/dist/core/authz/authorizations/index.js.map +1 -0
- package/dist/core/authz/msgs/MsgExecAuthorized.d.ts +37 -0
- package/dist/core/authz/msgs/MsgExecAuthorized.js +85 -0
- package/dist/core/authz/msgs/MsgExecAuthorized.js.map +1 -0
- package/dist/core/authz/msgs/MsgGrantAuthorization.d.ts +40 -0
- package/dist/core/authz/msgs/MsgGrantAuthorization.js +87 -0
- package/dist/core/authz/msgs/MsgGrantAuthorization.js.map +1 -0
- package/dist/core/authz/msgs/MsgRevokeAuthorization.d.ts +40 -0
- package/dist/core/authz/msgs/MsgRevokeAuthorization.js +87 -0
- package/dist/core/authz/msgs/MsgRevokeAuthorization.js.map +1 -0
- package/dist/core/authz/msgs/index.d.ts +12 -0
- package/dist/core/authz/msgs/index.js +20 -0
- package/dist/core/authz/msgs/index.js.map +1 -0
- package/dist/core/bank/msgs/MsgMultiSend.d.ts +136 -0
- package/dist/core/bank/msgs/MsgMultiSend.js +221 -0
- package/dist/core/bank/msgs/MsgMultiSend.js.map +1 -0
- package/dist/core/bank/msgs/MsgSend.d.ts +47 -0
- package/dist/core/bank/msgs/MsgSend.js +91 -0
- package/dist/core/bank/msgs/MsgSend.js.map +1 -0
- package/dist/core/bank/msgs/index.d.ts +10 -0
- package/dist/core/bank/msgs/index.js +19 -0
- package/dist/core/bank/msgs/index.js.map +1 -0
- package/dist/core/bech32.d.ts +68 -0
- package/dist/core/bech32.js +108 -0
- package/dist/core/bech32.js.map +1 -0
- package/dist/core/crisis/MsgVerifyInvariant.d.ts +43 -0
- package/dist/core/crisis/MsgVerifyInvariant.js +77 -0
- package/dist/core/crisis/MsgVerifyInvariant.js.map +1 -0
- package/dist/core/crisis/index.d.ts +8 -0
- package/dist/core/crisis/index.js +18 -0
- package/dist/core/crisis/index.js.map +1 -0
- package/dist/core/distribution/msgs/MsgFundCommunityPool.d.ts +37 -0
- package/dist/core/distribution/msgs/MsgFundCommunityPool.js +83 -0
- package/dist/core/distribution/msgs/MsgFundCommunityPool.js.map +1 -0
- package/dist/core/distribution/msgs/MsgSetWithdrawAddress.d.ts +41 -0
- package/dist/core/distribution/msgs/MsgSetWithdrawAddress.js +87 -0
- package/dist/core/distribution/msgs/MsgSetWithdrawAddress.js.map +1 -0
- package/dist/core/distribution/msgs/MsgWithdrawDelegatorReward.d.ts +43 -0
- package/dist/core/distribution/msgs/MsgWithdrawDelegatorReward.js +89 -0
- package/dist/core/distribution/msgs/MsgWithdrawDelegatorReward.js.map +1 -0
- package/dist/core/distribution/msgs/MsgWithdrawValidatorCommission.d.ts +37 -0
- package/dist/core/distribution/msgs/MsgWithdrawValidatorCommission.js +82 -0
- package/dist/core/distribution/msgs/MsgWithdrawValidatorCommission.js.map +1 -0
- package/dist/core/distribution/msgs/index.d.ts +14 -0
- package/dist/core/distribution/msgs/index.js +21 -0
- package/dist/core/distribution/msgs/index.js.map +1 -0
- package/dist/core/distribution/proposals/CommunityPoolSpendProposal.d.ts +49 -0
- package/dist/core/distribution/proposals/CommunityPoolSpendProposal.js +97 -0
- package/dist/core/distribution/proposals/CommunityPoolSpendProposal.js.map +1 -0
- package/dist/core/distribution/proposals/index.d.ts +1 -0
- package/dist/core/distribution/proposals/index.js +18 -0
- package/dist/core/distribution/proposals/index.js.map +1 -0
- package/dist/core/feegrant/allowances/AllowedMsgAllowance.d.ts +40 -0
- package/dist/core/feegrant/allowances/AllowedMsgAllowance.js +94 -0
- package/dist/core/feegrant/allowances/AllowedMsgAllowance.js.map +1 -0
- package/dist/core/feegrant/allowances/BasicAllowance.d.ts +40 -0
- package/dist/core/feegrant/allowances/BasicAllowance.js +103 -0
- package/dist/core/feegrant/allowances/BasicAllowance.js.map +1 -0
- package/dist/core/feegrant/allowances/PeriodicAllowance.d.ts +53 -0
- package/dist/core/feegrant/allowances/PeriodicAllowance.js +108 -0
- package/dist/core/feegrant/allowances/PeriodicAllowance.js.map +1 -0
- package/dist/core/feegrant/allowances/index.d.ts +16 -0
- package/dist/core/feegrant/allowances/index.js +61 -0
- package/dist/core/feegrant/allowances/index.js.map +1 -0
- package/dist/core/feegrant/msgs/MsgGrantAllowance.d.ts +46 -0
- package/dist/core/feegrant/msgs/MsgGrantAllowance.js +93 -0
- package/dist/core/feegrant/msgs/MsgGrantAllowance.js.map +1 -0
- package/dist/core/feegrant/msgs/MsgRevokeAllowance.d.ts +40 -0
- package/dist/core/feegrant/msgs/MsgRevokeAllowance.js +86 -0
- package/dist/core/feegrant/msgs/MsgRevokeAllowance.js.map +1 -0
- package/dist/core/feegrant/msgs/index.d.ts +10 -0
- package/dist/core/feegrant/msgs/index.js +19 -0
- package/dist/core/feegrant/msgs/index.js.map +1 -0
- package/dist/core/gov/Proposal.d.ts +96 -0
- package/dist/core/gov/Proposal.js +232 -0
- package/dist/core/gov/Proposal.js.map +1 -0
- package/dist/core/gov/Vote.d.ts +61 -0
- package/dist/core/gov/Vote.js +131 -0
- package/dist/core/gov/Vote.js.map +1 -0
- package/dist/core/gov/msgs/MsgDeposit.d.ts +44 -0
- package/dist/core/gov/msgs/MsgDeposit.js +95 -0
- package/dist/core/gov/msgs/MsgDeposit.js.map +1 -0
- package/dist/core/gov/msgs/MsgSubmitProposal.d.ts +45 -0
- package/dist/core/gov/msgs/MsgSubmitProposal.js +92 -0
- package/dist/core/gov/msgs/MsgSubmitProposal.js.map +1 -0
- package/dist/core/gov/msgs/MsgVote.d.ts +46 -0
- package/dist/core/gov/msgs/MsgVote.js +99 -0
- package/dist/core/gov/msgs/MsgVote.js.map +1 -0
- package/dist/core/gov/msgs/MsgVoteWeighted.d.ts +44 -0
- package/dist/core/gov/msgs/MsgVoteWeighted.js +95 -0
- package/dist/core/gov/msgs/MsgVoteWeighted.js.map +1 -0
- package/dist/core/gov/msgs/index.d.ts +14 -0
- package/dist/core/gov/msgs/index.js +21 -0
- package/dist/core/gov/msgs/index.js.map +1 -0
- package/dist/core/gov/proposals/TextProposal.d.ts +40 -0
- package/dist/core/gov/proposals/TextProposal.js +87 -0
- package/dist/core/gov/proposals/TextProposal.js.map +1 -0
- package/dist/core/gov/proposals/index.d.ts +1 -0
- package/dist/core/gov/proposals/index.js +18 -0
- package/dist/core/gov/proposals/index.js.map +1 -0
- package/dist/core/ibc/applications/fee/Fee.d.ts +39 -0
- package/dist/core/ibc/applications/fee/Fee.js +79 -0
- package/dist/core/ibc/applications/fee/Fee.js.map +1 -0
- package/dist/core/ibc/applications/fee/IdentifiedPacketFee.d.ts +33 -0
- package/dist/core/ibc/applications/fee/IdentifiedPacketFee.js +76 -0
- package/dist/core/ibc/applications/fee/IdentifiedPacketFee.js.map +1 -0
- package/dist/core/ibc/applications/fee/Metadata.d.ts +32 -0
- package/dist/core/ibc/applications/fee/Metadata.js +74 -0
- package/dist/core/ibc/applications/fee/Metadata.js.map +1 -0
- package/dist/core/ibc/applications/fee/PacketFee.d.ts +37 -0
- package/dist/core/ibc/applications/fee/PacketFee.js +80 -0
- package/dist/core/ibc/applications/fee/PacketFee.js.map +1 -0
- package/dist/core/ibc/applications/fee/index.d.ts +7 -0
- package/dist/core/ibc/applications/fee/index.js +24 -0
- package/dist/core/ibc/applications/fee/index.js.map +1 -0
- package/dist/core/ibc/applications/fee/msgs/MsgPayPacketFee.d.ts +42 -0
- package/dist/core/ibc/applications/fee/msgs/MsgPayPacketFee.js +92 -0
- package/dist/core/ibc/applications/fee/msgs/MsgPayPacketFee.js.map +1 -0
- package/dist/core/ibc/applications/fee/msgs/MsgPayPacketFeeAsync.d.ts +34 -0
- package/dist/core/ibc/applications/fee/msgs/MsgPayPacketFeeAsync.js +81 -0
- package/dist/core/ibc/applications/fee/msgs/MsgPayPacketFeeAsync.js.map +1 -0
- package/dist/core/ibc/applications/fee/msgs/MsgRegisterCounterpartAddress.d.ts +34 -0
- package/dist/core/ibc/applications/fee/msgs/MsgRegisterCounterpartAddress.js +82 -0
- package/dist/core/ibc/applications/fee/msgs/MsgRegisterCounterpartAddress.js.map +1 -0
- package/dist/core/ibc/applications/interchain-account/Account.d.ts +32 -0
- package/dist/core/ibc/applications/interchain-account/Account.js +74 -0
- package/dist/core/ibc/applications/interchain-account/Account.js.map +1 -0
- package/dist/core/ibc/applications/interchain-account/Metadata.d.ts +48 -0
- package/dist/core/ibc/applications/interchain-account/Metadata.js +94 -0
- package/dist/core/ibc/applications/interchain-account/Metadata.js.map +1 -0
- package/dist/core/ibc/applications/interchain-account/controller/Params.d.ts +28 -0
- package/dist/core/ibc/applications/interchain-account/controller/Params.js +69 -0
- package/dist/core/ibc/applications/interchain-account/controller/Params.js.map +1 -0
- package/dist/core/ibc/applications/interchain-account/host/Params.d.ts +31 -0
- package/dist/core/ibc/applications/interchain-account/host/Params.js +73 -0
- package/dist/core/ibc/applications/interchain-account/host/Params.js.map +1 -0
- package/dist/core/ibc/applications/interchain-account/index.d.ts +4 -0
- package/dist/core/ibc/applications/interchain-account/index.js +24 -0
- package/dist/core/ibc/applications/interchain-account/index.js.map +1 -0
- package/dist/core/ibc/applications/transfer/index.d.ts +10 -0
- package/dist/core/ibc/applications/transfer/index.js +20 -0
- package/dist/core/ibc/applications/transfer/index.js.map +1 -0
- package/dist/core/ibc/applications/transfer/v1/DenomTrace.d.ts +40 -0
- package/dist/core/ibc/applications/transfer/v1/DenomTrace.js +79 -0
- package/dist/core/ibc/applications/transfer/v1/DenomTrace.js.map +1 -0
- package/dist/core/ibc/applications/transfer/v1/msgs/MsgTransfer.d.ts +61 -0
- package/dist/core/ibc/applications/transfer/v1/msgs/MsgTransfer.js +130 -0
- package/dist/core/ibc/applications/transfer/v1/msgs/MsgTransfer.js.map +1 -0
- package/dist/core/ibc/applications/transfer/v2/FungibleTokenPacketData.d.ts +41 -0
- package/dist/core/ibc/applications/transfer/v2/FungibleTokenPacketData.js +85 -0
- package/dist/core/ibc/applications/transfer/v2/FungibleTokenPacketData.js.map +1 -0
- package/dist/core/ibc/core/channel/Channel.d.ts +53 -0
- package/dist/core/ibc/core/channel/Channel.js +100 -0
- package/dist/core/ibc/core/channel/Channel.js.map +1 -0
- package/dist/core/ibc/core/channel/Counterparty.d.ts +29 -0
- package/dist/core/ibc/core/channel/Counterparty.js +71 -0
- package/dist/core/ibc/core/channel/Counterparty.js.map +1 -0
- package/dist/core/ibc/core/channel/Packet.d.ts +48 -0
- package/dist/core/ibc/core/channel/Packet.js +100 -0
- package/dist/core/ibc/core/channel/Packet.js.map +1 -0
- package/dist/core/ibc/core/channel/PacketId.d.ts +37 -0
- package/dist/core/ibc/core/channel/PacketId.js +84 -0
- package/dist/core/ibc/core/channel/PacketId.js.map +1 -0
- package/dist/core/ibc/core/channel/index.d.ts +2 -0
- package/dist/core/ibc/core/channel/index.js +19 -0
- package/dist/core/ibc/core/channel/index.js.map +1 -0
- package/dist/core/ibc/core/client/ClientConsensusStates.d.ts +32 -0
- package/dist/core/ibc/core/client/ClientConsensusStates.js +76 -0
- package/dist/core/ibc/core/client/ClientConsensusStates.js.map +1 -0
- package/dist/core/ibc/core/client/ConsensusStateWithHeight.d.ts +32 -0
- package/dist/core/ibc/core/client/ConsensusStateWithHeight.js +74 -0
- package/dist/core/ibc/core/client/ConsensusStateWithHeight.js.map +1 -0
- package/dist/core/ibc/core/client/Height.d.ts +40 -0
- package/dist/core/ibc/core/client/Height.js +86 -0
- package/dist/core/ibc/core/client/Height.js.map +1 -0
- package/dist/core/ibc/core/client/IdentifiedClient.d.ts +31 -0
- package/dist/core/ibc/core/client/IdentifiedClient.js +73 -0
- package/dist/core/ibc/core/client/IdentifiedClient.js.map +1 -0
- package/dist/core/ibc/core/commitment/MerklePrefix.d.ts +24 -0
- package/dist/core/ibc/core/commitment/MerklePrefix.js +70 -0
- package/dist/core/ibc/core/commitment/MerklePrefix.js.map +1 -0
- package/dist/core/ibc/core/commitment/MerkleRoot.d.ts +24 -0
- package/dist/core/ibc/core/commitment/MerkleRoot.js +60 -0
- package/dist/core/ibc/core/commitment/MerkleRoot.js.map +1 -0
- package/dist/core/ibc/core/commitment/index.d.ts +2 -0
- package/dist/core/ibc/core/commitment/index.js +19 -0
- package/dist/core/ibc/core/commitment/index.js.map +1 -0
- package/dist/core/ibc/core/connection/Counterparty.d.ts +34 -0
- package/dist/core/ibc/core/connection/Counterparty.js +77 -0
- package/dist/core/ibc/core/connection/Counterparty.js.map +1 -0
- package/dist/core/ibc/core/connection/IdentifiedConnection.d.ts +51 -0
- package/dist/core/ibc/core/connection/IdentifiedConnection.js +105 -0
- package/dist/core/ibc/core/connection/IdentifiedConnection.js.map +1 -0
- package/dist/core/ibc/core/connection/Version.d.ts +28 -0
- package/dist/core/ibc/core/connection/Version.js +70 -0
- package/dist/core/ibc/core/connection/Version.js.map +1 -0
- package/dist/core/ibc/core/connection/index.d.ts +3 -0
- package/dist/core/ibc/core/connection/index.js +20 -0
- package/dist/core/ibc/core/connection/index.js.map +1 -0
- package/dist/core/ibc/core/index.d.ts +3 -0
- package/dist/core/ibc/core/index.js +20 -0
- package/dist/core/ibc/core/index.js.map +1 -0
- package/dist/core/ibc/lightclient/index.d.ts +1 -0
- package/dist/core/ibc/lightclient/index.js +18 -0
- package/dist/core/ibc/lightclient/index.js.map +1 -0
- package/dist/core/ibc/lightclient/tendermint/Header.d.ts +49 -0
- package/dist/core/ibc/lightclient/tendermint/Header.js +99 -0
- package/dist/core/ibc/lightclient/tendermint/Header.js.map +1 -0
- package/dist/core/ibc/msgs/channel/MsgChannelCloseConfirm.d.ts +42 -0
- package/dist/core/ibc/msgs/channel/MsgChannelCloseConfirm.js +91 -0
- package/dist/core/ibc/msgs/channel/MsgChannelCloseConfirm.js.map +1 -0
- package/dist/core/ibc/msgs/channel/MsgChannelCloseInit.d.ts +35 -0
- package/dist/core/ibc/msgs/channel/MsgChannelCloseInit.js +82 -0
- package/dist/core/ibc/msgs/channel/MsgChannelCloseInit.js.map +1 -0
- package/dist/core/ibc/msgs/channel/MsgChannelOpenAck.d.ts +48 -0
- package/dist/core/ibc/msgs/channel/MsgChannelOpenAck.js +99 -0
- package/dist/core/ibc/msgs/channel/MsgChannelOpenAck.js.map +1 -0
- package/dist/core/ibc/msgs/channel/MsgChannelOpenConfirm.d.ts +42 -0
- package/dist/core/ibc/msgs/channel/MsgChannelOpenConfirm.js +91 -0
- package/dist/core/ibc/msgs/channel/MsgChannelOpenConfirm.js.map +1 -0
- package/dist/core/ibc/msgs/channel/MsgChannelOpenInit.d.ts +36 -0
- package/dist/core/ibc/msgs/channel/MsgChannelOpenInit.js +83 -0
- package/dist/core/ibc/msgs/channel/MsgChannelOpenInit.js.map +1 -0
- package/dist/core/ibc/msgs/channel/MsgChannelOpenTry.d.ts +49 -0
- package/dist/core/ibc/msgs/channel/MsgChannelOpenTry.js +100 -0
- package/dist/core/ibc/msgs/channel/MsgChannelOpenTry.js.map +1 -0
- package/dist/core/ibc/msgs/channel/MsgRecvAcknowledgement.d.ts +43 -0
- package/dist/core/ibc/msgs/channel/MsgRecvAcknowledgement.js +92 -0
- package/dist/core/ibc/msgs/channel/MsgRecvAcknowledgement.js.map +1 -0
- package/dist/core/ibc/msgs/channel/MsgRecvPacket.d.ts +40 -0
- package/dist/core/ibc/msgs/channel/MsgRecvPacket.js +88 -0
- package/dist/core/ibc/msgs/channel/MsgRecvPacket.js.map +1 -0
- package/dist/core/ibc/msgs/channel/MsgTimeout.d.ts +43 -0
- package/dist/core/ibc/msgs/channel/MsgTimeout.js +96 -0
- package/dist/core/ibc/msgs/channel/MsgTimeout.js.map +1 -0
- package/dist/core/ibc/msgs/channel/MsgTimeoutClose.d.ts +46 -0
- package/dist/core/ibc/msgs/channel/MsgTimeoutClose.js +100 -0
- package/dist/core/ibc/msgs/channel/MsgTimeoutClose.js.map +1 -0
- package/dist/core/ibc/msgs/channel/index.d.ts +25 -0
- package/dist/core/ibc/msgs/channel/index.js +27 -0
- package/dist/core/ibc/msgs/channel/index.js.map +1 -0
- package/dist/core/ibc/msgs/client/MsgCreateClient.d.ts +35 -0
- package/dist/core/ibc/msgs/client/MsgCreateClient.js +82 -0
- package/dist/core/ibc/msgs/client/MsgCreateClient.js.map +1 -0
- package/dist/core/ibc/msgs/client/MsgSubmitMisbehaviour.d.ts +35 -0
- package/dist/core/ibc/msgs/client/MsgSubmitMisbehaviour.js +82 -0
- package/dist/core/ibc/msgs/client/MsgSubmitMisbehaviour.js.map +1 -0
- package/dist/core/ibc/msgs/client/MsgUpdateClient.d.ts +36 -0
- package/dist/core/ibc/msgs/client/MsgUpdateClient.js +83 -0
- package/dist/core/ibc/msgs/client/MsgUpdateClient.js.map +1 -0
- package/dist/core/ibc/msgs/client/MsgUpgradeClient.d.ts +44 -0
- package/dist/core/ibc/msgs/client/MsgUpgradeClient.js +94 -0
- package/dist/core/ibc/msgs/client/MsgUpgradeClient.js.map +1 -0
- package/dist/core/ibc/msgs/client/Params.d.ts +27 -0
- package/dist/core/ibc/msgs/client/Params.js +68 -0
- package/dist/core/ibc/msgs/client/Params.js.map +1 -0
- package/dist/core/ibc/msgs/client/index.d.ts +13 -0
- package/dist/core/ibc/msgs/client/index.js +21 -0
- package/dist/core/ibc/msgs/client/index.js.map +1 -0
- package/dist/core/ibc/msgs/client/tendermint/crypto.d.ts +54 -0
- package/dist/core/ibc/msgs/client/tendermint/crypto.js +124 -0
- package/dist/core/ibc/msgs/client/tendermint/crypto.js.map +1 -0
- package/dist/core/ibc/msgs/client/tendermint/types.d.ts +233 -0
- package/dist/core/ibc/msgs/client/tendermint/types.js +461 -0
- package/dist/core/ibc/msgs/client/tendermint/types.js.map +1 -0
- package/dist/core/ibc/msgs/client/tendermint/version.d.ts +57 -0
- package/dist/core/ibc/msgs/client/tendermint/version.js +124 -0
- package/dist/core/ibc/msgs/client/tendermint/version.js.map +1 -0
- package/dist/core/ibc/msgs/connection/MsgConnectionOpenAck.d.ts +59 -0
- package/dist/core/ibc/msgs/connection/MsgConnectionOpenAck.js +119 -0
- package/dist/core/ibc/msgs/connection/MsgConnectionOpenAck.js.map +1 -0
- package/dist/core/ibc/msgs/connection/MsgConnectionOpenConfirm.d.ts +40 -0
- package/dist/core/ibc/msgs/connection/MsgConnectionOpenConfirm.js +88 -0
- package/dist/core/ibc/msgs/connection/MsgConnectionOpenConfirm.js.map +1 -0
- package/dist/core/ibc/msgs/connection/MsgConnectionOpenInit.d.ts +43 -0
- package/dist/core/ibc/msgs/connection/MsgConnectionOpenInit.js +98 -0
- package/dist/core/ibc/msgs/connection/MsgConnectionOpenInit.js.map +1 -0
- package/dist/core/ibc/msgs/connection/MsgConnectionOpenTry.d.ts +65 -0
- package/dist/core/ibc/msgs/connection/MsgConnectionOpenTry.js +141 -0
- package/dist/core/ibc/msgs/connection/MsgConnectionOpenTry.js.map +1 -0
- package/dist/core/ibc/msgs/connection/index.d.ts +13 -0
- package/dist/core/ibc/msgs/connection/index.js +21 -0
- package/dist/core/ibc/msgs/connection/index.js.map +1 -0
- package/dist/core/ibc/proposals/ClientUpdateProposal.d.ts +47 -0
- package/dist/core/ibc/proposals/ClientUpdateProposal.js +96 -0
- package/dist/core/ibc/proposals/ClientUpdateProposal.js.map +1 -0
- package/dist/core/ibc/proposals/index.d.ts +1 -0
- package/dist/core/ibc/proposals/index.js +18 -0
- package/dist/core/ibc/proposals/index.js.map +1 -0
- package/dist/core/index.d.ts +48 -0
- package/dist/core/index.js +80 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/move/MoveCoin.d.ts +28 -0
- package/dist/core/move/MoveCoin.js +67 -0
- package/dist/core/move/MoveCoin.js.map +1 -0
- package/dist/core/move/msgs/MsgConvertMoveCoin.d.ts +37 -0
- package/dist/core/move/msgs/MsgConvertMoveCoin.js +83 -0
- package/dist/core/move/msgs/MsgConvertMoveCoin.js.map +1 -0
- package/dist/core/move/msgs/MsgConvertNativeCoin.d.ts +37 -0
- package/dist/core/move/msgs/MsgConvertNativeCoin.js +83 -0
- package/dist/core/move/msgs/MsgConvertNativeCoin.js.map +1 -0
- package/dist/core/move/msgs/MsgExecuteEntryFunction.d.ts +52 -0
- package/dist/core/move/msgs/MsgExecuteEntryFunction.js +102 -0
- package/dist/core/move/msgs/MsgExecuteEntryFunction.js.map +1 -0
- package/dist/core/move/msgs/MsgExecuteScript.d.ts +44 -0
- package/dist/core/move/msgs/MsgExecuteScript.js +92 -0
- package/dist/core/move/msgs/MsgExecuteScript.js.map +1 -0
- package/dist/core/move/msgs/MsgPublishModuleBundle.d.ts +36 -0
- package/dist/core/move/msgs/MsgPublishModuleBundle.js +82 -0
- package/dist/core/move/msgs/MsgPublishModuleBundle.js.map +1 -0
- package/dist/core/move/msgs/index.d.ts +16 -0
- package/dist/core/move/msgs/index.js +22 -0
- package/dist/core/move/msgs/index.js.map +1 -0
- package/dist/core/move/proposals/PublishStdModuleProposal.d.ts +42 -0
- package/dist/core/move/proposals/PublishStdModuleProposal.js +90 -0
- package/dist/core/move/proposals/PublishStdModuleProposal.js.map +1 -0
- package/dist/core/move/proposals/index.d.ts +1 -0
- package/dist/core/move/proposals/index.js +18 -0
- package/dist/core/move/proposals/index.js.map +1 -0
- package/dist/core/num.d.ts +4 -0
- package/dist/core/num.js +28 -0
- package/dist/core/num.js.map +1 -0
- package/dist/core/params/ParamChange.d.ts +42 -0
- package/dist/core/params/ParamChange.js +96 -0
- package/dist/core/params/ParamChange.js.map +1 -0
- package/dist/core/params/proposals/ParameterChangeProposal.d.ts +68 -0
- package/dist/core/params/proposals/ParameterChangeProposal.js +121 -0
- package/dist/core/params/proposals/ParameterChangeProposal.js.map +1 -0
- package/dist/core/params/proposals/index.d.ts +1 -0
- package/dist/core/params/proposals/index.js +18 -0
- package/dist/core/params/proposals/index.js.map +1 -0
- package/dist/core/slashing/msgs/MsgUnjail.d.ts +40 -0
- package/dist/core/slashing/msgs/MsgUnjail.js +85 -0
- package/dist/core/slashing/msgs/MsgUnjail.js.map +1 -0
- package/dist/core/slashing/msgs/index.d.ts +8 -0
- package/dist/core/slashing/msgs/index.js +18 -0
- package/dist/core/slashing/msgs/index.js.map +1 -0
- package/dist/core/staking/Delegation.d.ts +45 -0
- package/dist/core/staking/Delegation.js +91 -0
- package/dist/core/staking/Delegation.js.map +1 -0
- package/dist/core/staking/Redelegation.d.ts +96 -0
- package/dist/core/staking/Redelegation.js +177 -0
- package/dist/core/staking/Redelegation.js.map +1 -0
- package/dist/core/staking/UnbondingDelegation.d.ts +74 -0
- package/dist/core/staking/UnbondingDelegation.js +145 -0
- package/dist/core/staking/UnbondingDelegation.js.map +1 -0
- package/dist/core/staking/Validator.d.ts +169 -0
- package/dist/core/staking/Validator.js +283 -0
- package/dist/core/staking/Validator.js.map +1 -0
- package/dist/core/staking/msgs/MsgBeginRedelegate.d.ts +51 -0
- package/dist/core/staking/msgs/MsgBeginRedelegate.js +99 -0
- package/dist/core/staking/msgs/MsgBeginRedelegate.js.map +1 -0
- package/dist/core/staking/msgs/MsgCreateValidator.d.ts +64 -0
- package/dist/core/staking/msgs/MsgCreateValidator.js +117 -0
- package/dist/core/staking/msgs/MsgCreateValidator.js.map +1 -0
- package/dist/core/staking/msgs/MsgDelegate.d.ts +46 -0
- package/dist/core/staking/msgs/MsgDelegate.js +93 -0
- package/dist/core/staking/msgs/MsgDelegate.js.map +1 -0
- package/dist/core/staking/msgs/MsgEditValidator.d.ts +54 -0
- package/dist/core/staking/msgs/MsgEditValidator.js +120 -0
- package/dist/core/staking/msgs/MsgEditValidator.js.map +1 -0
- package/dist/core/staking/msgs/MsgUndelegate.d.ts +46 -0
- package/dist/core/staking/msgs/MsgUndelegate.js +93 -0
- package/dist/core/staking/msgs/MsgUndelegate.js.map +1 -0
- package/dist/core/staking/msgs/index.d.ts +16 -0
- package/dist/core/staking/msgs/index.js +22 -0
- package/dist/core/staking/msgs/index.js.map +1 -0
- package/dist/core/upgrade/Plan.d.ts +40 -0
- package/dist/core/upgrade/Plan.js +92 -0
- package/dist/core/upgrade/Plan.js.map +1 -0
- package/dist/core/upgrade/index.d.ts +2 -0
- package/dist/core/upgrade/index.js +19 -0
- package/dist/core/upgrade/index.js.map +1 -0
- package/dist/core/upgrade/proposals/CancelSoftwareUpgradeProposal.d.ts +39 -0
- package/dist/core/upgrade/proposals/CancelSoftwareUpgradeProposal.js +86 -0
- package/dist/core/upgrade/proposals/CancelSoftwareUpgradeProposal.js.map +1 -0
- package/dist/core/upgrade/proposals/SoftwareUpgradeProposal.d.ts +44 -0
- package/dist/core/upgrade/proposals/SoftwareUpgradeProposal.js +92 -0
- package/dist/core/upgrade/proposals/SoftwareUpgradeProposal.js.map +1 -0
- package/dist/core/upgrade/proposals/index.d.ts +2 -0
- package/dist/core/upgrade/proposals/index.js +19 -0
- package/dist/core/upgrade/proposals/index.js.map +1 -0
- package/dist/core/vesting/Period.d.ts +32 -0
- package/dist/core/vesting/Period.js +78 -0
- package/dist/core/vesting/Period.js.map +1 -0
- package/dist/core/vesting/index.d.ts +2 -0
- package/dist/core/vesting/index.js +19 -0
- package/dist/core/vesting/index.js.map +1 -0
- package/dist/core/vesting/msgs/MsgCreatePeriodicVestingAccount.d.ts +46 -0
- package/dist/core/vesting/msgs/MsgCreatePeriodicVestingAccount.js +98 -0
- package/dist/core/vesting/msgs/MsgCreatePeriodicVestingAccount.js.map +1 -0
- package/dist/core/vesting/msgs/MsgCreateVestingAccount.d.ts +50 -0
- package/dist/core/vesting/msgs/MsgCreateVestingAccount.js +103 -0
- package/dist/core/vesting/msgs/MsgCreateVestingAccount.js.map +1 -0
- package/dist/core/vesting/msgs/MsgDonateAllVestingTokens.d.ts +35 -0
- package/dist/core/vesting/msgs/MsgDonateAllVestingTokens.js +75 -0
- package/dist/core/vesting/msgs/MsgDonateAllVestingTokens.js.map +1 -0
- package/dist/core/vesting/msgs/index.d.ts +12 -0
- package/dist/core/vesting/msgs/index.js +20 -0
- package/dist/core/vesting/msgs/index.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/key/CLIKey.d.ts +44 -0
- package/dist/key/CLIKey.js +164 -0
- package/dist/key/CLIKey.js.map +1 -0
- package/dist/key/Key.d.ts +60 -0
- package/dist/key/Key.js +185 -0
- package/dist/key/Key.js.map +1 -0
- package/dist/key/MnemonicKey.d.ts +55 -0
- package/dist/key/MnemonicKey.js +114 -0
- package/dist/key/MnemonicKey.js.map +1 -0
- package/dist/key/RawKey.d.ts +17 -0
- package/dist/key/RawKey.js +110 -0
- package/dist/key/RawKey.js.map +1 -0
- package/dist/key/index.d.ts +4 -0
- package/dist/key/index.js +21 -0
- package/dist/key/index.js.map +1 -0
- package/dist/util/bcs.d.ts +11 -0
- package/dist/util/bcs.js +102 -0
- package/dist/util/bcs.js.map +1 -0
- package/dist/util/contract.d.ts +9 -0
- package/dist/util/contract.js +57 -0
- package/dist/util/contract.js.map +1 -0
- package/dist/util/convert.d.ts +8 -0
- package/dist/util/convert.js +12 -0
- package/dist/util/convert.js.map +1 -0
- package/dist/util/hash.d.ts +11 -0
- package/dist/util/hash.js +37 -0
- package/dist/util/hash.js.map +1 -0
- package/dist/util/index.d.ts +2 -0
- package/dist/util/index.js +19 -0
- package/dist/util/index.js.map +1 -0
- package/dist/util/json.d.ts +9 -0
- package/dist/util/json.js +62 -0
- package/dist/util/json.js.map +1 -0
- package/package.json +110 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BaseAPI } from './BaseAPI';
|
|
2
|
+
import { Coins, AccAddress } from '../../../core';
|
|
3
|
+
import { APIParams, Pagination, PaginationOptions } from '../APIRequester';
|
|
4
|
+
export interface SendEnabled {
|
|
5
|
+
denom: string;
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare namespace SendEnabled {
|
|
9
|
+
interface Data {
|
|
10
|
+
denom: string;
|
|
11
|
+
enabled: boolean;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export interface BankParams {
|
|
15
|
+
send_enabled: SendEnabled[];
|
|
16
|
+
default_send_enabled: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare namespace BankParams {
|
|
19
|
+
interface Data {
|
|
20
|
+
send_enabled: SendEnabled.Data[];
|
|
21
|
+
default_send_enabled: boolean;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export declare class BankAPI extends BaseAPI {
|
|
25
|
+
/**
|
|
26
|
+
* Look up the balance of an account by its address.
|
|
27
|
+
* @param address address of account to look up.
|
|
28
|
+
*/
|
|
29
|
+
balance(address: AccAddress, params?: Partial<PaginationOptions & APIParams>): Promise<[Coins, Pagination]>;
|
|
30
|
+
/**
|
|
31
|
+
* Get the total supply of tokens in circulation for all denominations.
|
|
32
|
+
*/
|
|
33
|
+
total(params?: Partial<PaginationOptions & APIParams>): Promise<[Coins, Pagination]>;
|
|
34
|
+
/**
|
|
35
|
+
* Lqueries the spenable balance of all coins for a single account.
|
|
36
|
+
* @param address address of account to look up.
|
|
37
|
+
*/
|
|
38
|
+
spendableBalances(address: AccAddress, params?: Partial<PaginationOptions & APIParams>): Promise<[Coins, Pagination]>;
|
|
39
|
+
parameters(params?: APIParams): Promise<BankParams>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (_) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.BankAPI = void 0;
|
|
55
|
+
var BaseAPI_1 = require("./BaseAPI");
|
|
56
|
+
var core_1 = require("../../../core");
|
|
57
|
+
var BankAPI = /** @class */ (function (_super) {
|
|
58
|
+
__extends(BankAPI, _super);
|
|
59
|
+
function BankAPI() {
|
|
60
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Look up the balance of an account by its address.
|
|
64
|
+
* @param address address of account to look up.
|
|
65
|
+
*/
|
|
66
|
+
BankAPI.prototype.balance = function (address, params) {
|
|
67
|
+
if (params === void 0) { params = {}; }
|
|
68
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
69
|
+
return __generator(this, function (_a) {
|
|
70
|
+
return [2 /*return*/, this.c
|
|
71
|
+
.get("/cosmos/bank/v1beta1/balances/".concat(address), params)
|
|
72
|
+
.then(function (d) { return [core_1.Coins.fromData(d.balances), d.pagination]; })];
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Get the total supply of tokens in circulation for all denominations.
|
|
78
|
+
*/
|
|
79
|
+
BankAPI.prototype.total = function (params) {
|
|
80
|
+
if (params === void 0) { params = {}; }
|
|
81
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
82
|
+
return __generator(this, function (_a) {
|
|
83
|
+
return [2 /*return*/, this.c
|
|
84
|
+
.get("/cosmos/bank/v1beta1/supply", params)
|
|
85
|
+
.then(function (d) { return [core_1.Coins.fromData(d.supply), d.pagination]; })];
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Lqueries the spenable balance of all coins for a single account.
|
|
91
|
+
* @param address address of account to look up.
|
|
92
|
+
*/
|
|
93
|
+
BankAPI.prototype.spendableBalances = function (address, params) {
|
|
94
|
+
if (params === void 0) { params = {}; }
|
|
95
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
96
|
+
return __generator(this, function (_a) {
|
|
97
|
+
return [2 /*return*/, this.c
|
|
98
|
+
.get("/cosmos/bank/v1beta1/spendable_balances/".concat(address), params)
|
|
99
|
+
.then(function (d) { return [core_1.Coins.fromData(d.balances), d.pagination]; })];
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
BankAPI.prototype.parameters = function (params) {
|
|
104
|
+
if (params === void 0) { params = {}; }
|
|
105
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
106
|
+
return __generator(this, function (_a) {
|
|
107
|
+
return [2 /*return*/, this.c
|
|
108
|
+
.get("/cosmos/bank/v1beta1/params", params)
|
|
109
|
+
.then(function (_a) {
|
|
110
|
+
var d = _a.params;
|
|
111
|
+
return ({
|
|
112
|
+
send_enabled: d.send_enabled,
|
|
113
|
+
default_send_enabled: d.default_send_enabled,
|
|
114
|
+
});
|
|
115
|
+
})];
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
return BankAPI;
|
|
120
|
+
}(BaseAPI_1.BaseAPI));
|
|
121
|
+
exports.BankAPI = BankAPI;
|
|
122
|
+
//# sourceMappingURL=BankAPI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BankAPI.js","sourceRoot":"","sources":["../../../../src/client/lcd/api/BankAPI.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AACpC,sCAAkD;AA0BlD;IAA6B,2BAAO;IAApC;;IAuDA,CAAC;IAtDC;;;OAGG;IACU,yBAAO,GAApB,UACE,OAAmB,EACnB,MAAmD;QAAnD,uBAAA,EAAA,WAAmD;;;gBAEnD,sBAAO,IAAI,CAAC,CAAC;yBACV,GAAG,CAGD,wCAAiC,OAAO,CAAE,EAAE,MAAM,CAAC;yBACrD,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,YAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,EAA1C,CAA0C,CAAC,EAAC;;;KAC1D;IAED;;OAEG;IACU,uBAAK,GAAlB,UACE,MAAmD;QAAnD,uBAAA,EAAA,WAAmD;;;gBAEnD,sBAAO,IAAI,CAAC,CAAC;yBACV,GAAG,CACF,6BAA6B,EAC7B,MAAM,CACP;yBACA,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,YAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,EAAxC,CAAwC,CAAC,EAAC;;;KACxD;IAED;;;OAGG;IACW,mCAAiB,GAA9B,UACC,OAAmB,EACnB,MAAmD;QAAnD,uBAAA,EAAA,WAAmD;;;gBAEnD,sBAAO,IAAI,CAAC,CAAC;yBACV,GAAG,CAGD,kDAA2C,OAAO,CAAE,EAAE,MAAM,CAAC;yBAC/D,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,YAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,EAA1C,CAA0C,CAAC,EAAC;;;KAC1D;IAEY,4BAAU,GAAvB,UAAwB,MAAsB;QAAtB,uBAAA,EAAA,WAAsB;;;gBAC5C,sBAAO,IAAI,CAAC,CAAC;yBACV,GAAG,CAA8B,6BAA6B,EAAE,MAAM,CAAC;yBACvE,IAAI,CAAC,UAAC,EAAa;4BAAH,CAAC,YAAA;wBAAO,OAAA,CAAC;4BACxB,YAAY,EAAE,CAAC,CAAC,YAAY;4BAC5B,oBAAoB,EAAE,CAAC,CAAC,oBAAoB;yBAC7C,CAAC;oBAHuB,CAGvB,CAAC,EAAC;;;KACP;IACH,cAAC;AAAD,CAAC,AAvDD,CAA6B,iBAAO,GAuDnC;AAvDY,0BAAO"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseAPI = void 0;
|
|
4
|
+
var BaseAPI = /** @class */ (function () {
|
|
5
|
+
function BaseAPI(c) {
|
|
6
|
+
this.c = c;
|
|
7
|
+
}
|
|
8
|
+
return BaseAPI;
|
|
9
|
+
}());
|
|
10
|
+
exports.BaseAPI = BaseAPI;
|
|
11
|
+
//# sourceMappingURL=BaseAPI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseAPI.js","sourceRoot":"","sources":["../../../../src/client/lcd/api/BaseAPI.ts"],"names":[],"mappings":";;;AAEA;IACE,iBAAsB,CAAe;QAAf,MAAC,GAAD,CAAC,CAAc;IAAG,CAAC;IAC3C,cAAC;AAAD,CAAC,AAFD,IAEC;AAFqB,0BAAO"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { BaseAPI } from './BaseAPI';
|
|
2
|
+
import { Coins, AccAddress, ValAddress } from '../../../core';
|
|
3
|
+
import { APIParams } from '../APIRequester';
|
|
4
|
+
export interface DistributionParams {
|
|
5
|
+
/**
|
|
6
|
+
* Community tax rate.
|
|
7
|
+
*/
|
|
8
|
+
community_tax: string;
|
|
9
|
+
/**
|
|
10
|
+
* Base reward for proposer of block.
|
|
11
|
+
*/
|
|
12
|
+
base_proposer_reward: string;
|
|
13
|
+
/**
|
|
14
|
+
* Bonus reward for proposer of block.
|
|
15
|
+
*/
|
|
16
|
+
bonus_proposer_reward: string;
|
|
17
|
+
/**
|
|
18
|
+
* Whether withdrawals are currently enabled.
|
|
19
|
+
*/
|
|
20
|
+
withdraw_addr_enabled: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare namespace DistributionParams {
|
|
23
|
+
interface Data {
|
|
24
|
+
community_tax: string;
|
|
25
|
+
base_proposer_reward: string;
|
|
26
|
+
bonus_proposer_reward: string;
|
|
27
|
+
withdraw_addr_enabled: boolean;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Holds the resonse of delegator rewards query
|
|
32
|
+
*/
|
|
33
|
+
export interface Rewards {
|
|
34
|
+
/**
|
|
35
|
+
* An object that maps validator addresses to corresponding rewards earned with that validator
|
|
36
|
+
*/
|
|
37
|
+
rewards: {
|
|
38
|
+
[validator: string]: Coins;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Total cumulative rewards across delegations with all validators
|
|
42
|
+
*/
|
|
43
|
+
total: Coins;
|
|
44
|
+
}
|
|
45
|
+
export declare namespace Rewards {
|
|
46
|
+
interface Data {
|
|
47
|
+
rewards: {
|
|
48
|
+
validator_address: ValAddress;
|
|
49
|
+
reward: Coins.Data;
|
|
50
|
+
}[];
|
|
51
|
+
total: Coins.Data;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export declare class DistributionAPI extends BaseAPI {
|
|
55
|
+
/**
|
|
56
|
+
* Gets a delegator's rewards.
|
|
57
|
+
* @param delegator delegator's account address
|
|
58
|
+
*/
|
|
59
|
+
rewards(delegator: AccAddress, params?: APIParams): Promise<Rewards>;
|
|
60
|
+
/**
|
|
61
|
+
* Gets a validator's rewards.
|
|
62
|
+
* @param validator validator's operator address
|
|
63
|
+
*/
|
|
64
|
+
validatorCommission(validator: ValAddress, params?: APIParams): Promise<Coins>;
|
|
65
|
+
/**
|
|
66
|
+
* Gets the withdraw address of a delegator, the address to which rewards are withdrawn.
|
|
67
|
+
* @param delegator
|
|
68
|
+
*/
|
|
69
|
+
withdrawAddress(delegator: AccAddress, params?: APIParams): Promise<AccAddress>;
|
|
70
|
+
/**
|
|
71
|
+
* Gets the current value of the community pool.
|
|
72
|
+
*/
|
|
73
|
+
communityPool(params?: APIParams): Promise<Coins>;
|
|
74
|
+
/**
|
|
75
|
+
* Gets the current distribution parameters.
|
|
76
|
+
*/
|
|
77
|
+
parameters(params?: APIParams): Promise<DistributionParams>;
|
|
78
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (_) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.DistributionAPI = void 0;
|
|
55
|
+
var BaseAPI_1 = require("./BaseAPI");
|
|
56
|
+
var core_1 = require("../../../core");
|
|
57
|
+
var DistributionAPI = /** @class */ (function (_super) {
|
|
58
|
+
__extends(DistributionAPI, _super);
|
|
59
|
+
function DistributionAPI() {
|
|
60
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Gets a delegator's rewards.
|
|
64
|
+
* @param delegator delegator's account address
|
|
65
|
+
*/
|
|
66
|
+
DistributionAPI.prototype.rewards = function (delegator, params) {
|
|
67
|
+
if (params === void 0) { params = {}; }
|
|
68
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
69
|
+
var rewardsData, rewards, _i, _a, reward;
|
|
70
|
+
return __generator(this, function (_b) {
|
|
71
|
+
switch (_b.label) {
|
|
72
|
+
case 0: return [4 /*yield*/, this.c
|
|
73
|
+
.get("/cosmos/distribution/v1beta1/delegators/".concat(delegator, "/rewards"), params)
|
|
74
|
+
.then(function (d) { return d; })];
|
|
75
|
+
case 1:
|
|
76
|
+
rewardsData = _b.sent();
|
|
77
|
+
rewards = {};
|
|
78
|
+
for (_i = 0, _a = rewardsData.rewards; _i < _a.length; _i++) {
|
|
79
|
+
reward = _a[_i];
|
|
80
|
+
rewards[reward.validator_address] = core_1.Coins.fromData(reward.reward);
|
|
81
|
+
}
|
|
82
|
+
return [2 /*return*/, {
|
|
83
|
+
rewards: rewards,
|
|
84
|
+
total: core_1.Coins.fromData(rewardsData.total),
|
|
85
|
+
}];
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Gets a validator's rewards.
|
|
92
|
+
* @param validator validator's operator address
|
|
93
|
+
*/
|
|
94
|
+
DistributionAPI.prototype.validatorCommission = function (validator, params) {
|
|
95
|
+
if (params === void 0) { params = {}; }
|
|
96
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
97
|
+
return __generator(this, function (_a) {
|
|
98
|
+
return [2 /*return*/, this.c
|
|
99
|
+
.get("/cosmos/distribution/v1beta1/validators/".concat(validator, "/commission"), params)
|
|
100
|
+
.then(function (d) { return d.commission; })
|
|
101
|
+
.then(function (d) { return core_1.Coins.fromData(d.commission); })];
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Gets the withdraw address of a delegator, the address to which rewards are withdrawn.
|
|
107
|
+
* @param delegator
|
|
108
|
+
*/
|
|
109
|
+
DistributionAPI.prototype.withdrawAddress = function (delegator, params) {
|
|
110
|
+
if (params === void 0) { params = {}; }
|
|
111
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
112
|
+
return __generator(this, function (_a) {
|
|
113
|
+
return [2 /*return*/, this.c
|
|
114
|
+
.get("/cosmos/distribution/v1beta1/delegators/".concat(delegator, "/withdraw_address"), params)
|
|
115
|
+
.then(function (d) { return d.withdraw_address; })];
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Gets the current value of the community pool.
|
|
121
|
+
*/
|
|
122
|
+
DistributionAPI.prototype.communityPool = function (params) {
|
|
123
|
+
if (params === void 0) { params = {}; }
|
|
124
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
125
|
+
return __generator(this, function (_a) {
|
|
126
|
+
return [2 /*return*/, this.c
|
|
127
|
+
.get("/cosmos/distribution/v1beta1/community_pool", params)
|
|
128
|
+
.then(function (d) { return core_1.Coins.fromData(d.pool); })];
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* Gets the current distribution parameters.
|
|
134
|
+
*/
|
|
135
|
+
DistributionAPI.prototype.parameters = function (params) {
|
|
136
|
+
if (params === void 0) { params = {}; }
|
|
137
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
138
|
+
return __generator(this, function (_a) {
|
|
139
|
+
return [2 /*return*/, this.c
|
|
140
|
+
.get("/cosmos/distribution/v1beta1/params", params)
|
|
141
|
+
.then(function (_a) {
|
|
142
|
+
var d = _a.params;
|
|
143
|
+
return ({
|
|
144
|
+
base_proposer_reward: d.base_proposer_reward,
|
|
145
|
+
community_tax: d.community_tax,
|
|
146
|
+
bonus_proposer_reward: d.bonus_proposer_reward,
|
|
147
|
+
withdraw_addr_enabled: d.withdraw_addr_enabled,
|
|
148
|
+
});
|
|
149
|
+
})];
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
return DistributionAPI;
|
|
154
|
+
}(BaseAPI_1.BaseAPI));
|
|
155
|
+
exports.DistributionAPI = DistributionAPI;
|
|
156
|
+
//# sourceMappingURL=DistributionAPI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DistributionAPI.js","sourceRoot":"","sources":["../../../../src/client/lcd/api/DistributionAPI.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AACpC,sCAA8D;AA6D9D;IAAqC,mCAAO;IAA5C;;IA2FA,CAAC;IA1FC;;;OAGG;IACU,iCAAO,GAApB,UACE,SAAqB,EACrB,MAAsB;QAAtB,uBAAA,EAAA,WAAsB;;;;;4BAEF,qBAAM,IAAI,CAAC,CAAC;6BAC7B,GAAG,CACF,kDAA2C,SAAS,aAAU,EAC9D,MAAM,CACP;6BACA,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,EAAD,CAAC,CAAC,EAAA;;wBALT,WAAW,GAAG,SAKL;wBAET,OAAO,GAAuB,EAAE,CAAC;wBACvC,WAAwC,EAAnB,KAAA,WAAW,CAAC,OAAO,EAAnB,cAAmB,EAAnB,IAAmB,EAAE;4BAA/B,MAAM;4BACf,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,GAAG,YAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;yBACnE;wBACD,sBAAO;gCACL,OAAO,SAAA;gCACP,KAAK,EAAE,YAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC;6BACzC,EAAC;;;;KACH;IAED;;;OAGG;IACU,6CAAmB,GAAhC,UACE,SAAqB,EACrB,MAAsB;QAAtB,uBAAA,EAAA,WAAsB;;;gBAEtB,sBAAO,IAAI,CAAC,CAAC;yBACV,GAAG,CAKF,kDAA2C,SAAS,gBAAa,EACjE,MAAM,CACP;yBACA,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,UAAU,EAAZ,CAAY,CAAC;yBACvB,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,YAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,EAA5B,CAA4B,CAAC,EAAC;;;KAC5C;IAED;;;OAGG;IACU,yCAAe,GAA5B,UACE,SAAqB,EACrB,MAAsB;QAAtB,uBAAA,EAAA,WAAsB;;;gBAEtB,sBAAO,IAAI,CAAC,CAAC;yBACV,GAAG,CACF,kDAA2C,SAAS,sBAAmB,EACvE,MAAM,CACP;yBACA,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,gBAAgB,EAAlB,CAAkB,CAAC,EAAC;;;KAClC;IAED;;OAEG;IACU,uCAAa,GAA1B,UAA2B,MAAsB;QAAtB,uBAAA,EAAA,WAAsB;;;gBAC/C,sBAAO,IAAI,CAAC,CAAC;yBACV,GAAG,CACF,6CAA6C,EAC7C,MAAM,CACP;yBACA,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,YAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,EAAtB,CAAsB,CAAC,EAAC;;;KACtC;IAED;;OAEG;IACU,oCAAU,GAAvB,UAAwB,MAAsB;QAAtB,uBAAA,EAAA,WAAsB;;;gBAC5C,sBAAO,IAAI,CAAC,CAAC;yBACV,GAAG,CACF,qCAAqC,EACrC,MAAM,CACP;yBACA,IAAI,CAAC,UAAC,EAAa;4BAAH,CAAC,YAAA;wBAAO,OAAA,CAAC;4BACxB,oBAAoB,EAAE,CAAC,CAAC,oBAAoB;4BAC5C,aAAa,EAAE,CAAC,CAAC,aAAa;4BAC9B,qBAAqB,EAAE,CAAC,CAAC,qBAAqB;4BAC9C,qBAAqB,EAAE,CAAC,CAAC,qBAAqB;yBAC/C,CAAC;oBALuB,CAKvB,CAAC,EAAC;;;KACP;IACH,sBAAC;AAAD,CAAC,AA3FD,CAAqC,iBAAO,GA2F3C;AA3FY,0CAAe"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AccAddress } from '../../../core';
|
|
2
|
+
import { BaseAPI } from './BaseAPI';
|
|
3
|
+
import { Allowance } from '../../../core/feegrant/allowances';
|
|
4
|
+
import { Pagination, PaginationOptions } from '../APIRequester';
|
|
5
|
+
export declare class FeeGrantAPI extends BaseAPI {
|
|
6
|
+
allowances(grantee: AccAddress, params?: Partial<PaginationOptions>): Promise<{
|
|
7
|
+
allowances: {
|
|
8
|
+
granter: AccAddress;
|
|
9
|
+
grantee: AccAddress;
|
|
10
|
+
allowance: Allowance;
|
|
11
|
+
}[];
|
|
12
|
+
pagination: Pagination;
|
|
13
|
+
}>;
|
|
14
|
+
allowance(granter: AccAddress, grantee: AccAddress): Promise<Allowance>;
|
|
15
|
+
allowancesByGranter(granter: AccAddress, params?: Partial<PaginationOptions>): Promise<{
|
|
16
|
+
allowances: {
|
|
17
|
+
granter: AccAddress;
|
|
18
|
+
grantee: AccAddress;
|
|
19
|
+
allowance: Allowance;
|
|
20
|
+
}[];
|
|
21
|
+
pagination: Pagination;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (_) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.FeeGrantAPI = void 0;
|
|
55
|
+
var BaseAPI_1 = require("./BaseAPI");
|
|
56
|
+
var allowances_1 = require("../../../core/feegrant/allowances");
|
|
57
|
+
var FeeGrantAPI = /** @class */ (function (_super) {
|
|
58
|
+
__extends(FeeGrantAPI, _super);
|
|
59
|
+
function FeeGrantAPI() {
|
|
60
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
61
|
+
}
|
|
62
|
+
FeeGrantAPI.prototype.allowances = function (grantee, params) {
|
|
63
|
+
if (params === void 0) { params = {}; }
|
|
64
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
65
|
+
return __generator(this, function (_a) {
|
|
66
|
+
return [2 /*return*/, this.c
|
|
67
|
+
.get("/cosmos/feegrant/v1beta1/allowances/".concat(grantee), params)
|
|
68
|
+
.then(function (d) { return ({
|
|
69
|
+
allowances: d.allowances.map(function (allowance) { return ({
|
|
70
|
+
granter: allowance.granter,
|
|
71
|
+
grantee: allowance.grantee,
|
|
72
|
+
allowance: allowances_1.Allowance.fromData(allowance.allowance),
|
|
73
|
+
}); }),
|
|
74
|
+
pagination: d.pagination,
|
|
75
|
+
}); })];
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
FeeGrantAPI.prototype.allowance = function (granter, grantee) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
81
|
+
return __generator(this, function (_a) {
|
|
82
|
+
return [2 /*return*/, this.c
|
|
83
|
+
.get("/cosmos/feegrant/v1beta1/allowance/".concat(granter, "/").concat(grantee))
|
|
84
|
+
.then(function (d) { return allowances_1.Allowance.fromData(d.allowance.allowance); })];
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
FeeGrantAPI.prototype.allowancesByGranter = function (granter, params) {
|
|
89
|
+
if (params === void 0) { params = {}; }
|
|
90
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
91
|
+
return __generator(this, function (_a) {
|
|
92
|
+
return [2 /*return*/, this.c
|
|
93
|
+
.get("/cosmos/feegrant/v1beta1/issued/".concat(granter), params)
|
|
94
|
+
.then(function (d) { return ({
|
|
95
|
+
allowances: d.allowances.map(function (allowance) { return ({
|
|
96
|
+
granter: allowance.granter,
|
|
97
|
+
grantee: allowance.grantee,
|
|
98
|
+
allowance: allowances_1.Allowance.fromData(allowance.allowance),
|
|
99
|
+
}); }),
|
|
100
|
+
pagination: d.pagination,
|
|
101
|
+
}); })];
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
return FeeGrantAPI;
|
|
106
|
+
}(BaseAPI_1.BaseAPI));
|
|
107
|
+
exports.FeeGrantAPI = FeeGrantAPI;
|
|
108
|
+
//# sourceMappingURL=FeeGrantAPI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeeGrantAPI.js","sourceRoot":"","sources":["../../../../src/client/lcd/api/FeeGrantAPI.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,qCAAoC;AACpC,gEAA8D;AAG9D;IAAiC,+BAAO;IAAxC;;IA2EA,CAAC;IA1Ec,gCAAU,GAAvB,UACE,OAAmB,EACnB,MAAuC;QAAvC,uBAAA,EAAA,WAAuC;;;gBASvC,sBAAO,IAAI,CAAC,CAAC;yBACV,GAAG,CAOD,8CAAuC,OAAO,CAAE,EAAE,MAAM,CAAC;yBAC3D,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC;wBACV,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,UAAA,SAAS,IAAI,OAAA,CAAC;4BACzC,OAAO,EAAE,SAAS,CAAC,OAAO;4BAC1B,OAAO,EAAE,SAAS,CAAC,OAAO;4BAC1B,SAAS,EAAE,sBAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC;yBACnD,CAAC,EAJwC,CAIxC,CAAC;wBACH,UAAU,EAAE,CAAC,CAAC,UAAU;qBACzB,CAAC,EAPS,CAOT,CAAC,EAAC;;;KACP;IAEY,+BAAS,GAAtB,UACE,OAAmB,EACnB,OAAmB;;;gBAEnB,sBAAO,IAAI,CAAC,CAAC;yBACV,GAAG,CAMD,6CAAsC,OAAO,cAAI,OAAO,CAAE,CAAC;yBAC7D,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,sBAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,EAAzC,CAAyC,CAAC,EAAC;;;KACzD;IAEY,yCAAmB,GAAhC,UACE,OAAmB,EACnB,MAAuC;QAAvC,uBAAA,EAAA,WAAuC;;;gBASvC,sBAAO,IAAI,CAAC,CAAC;yBACV,GAAG,CAOD,0CAAmC,OAAO,CAAE,EAAE,MAAM,CAAC;yBACvD,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC;wBACV,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,UAAA,SAAS,IAAI,OAAA,CAAC;4BACzC,OAAO,EAAE,SAAS,CAAC,OAAO;4BAC1B,OAAO,EAAE,SAAS,CAAC,OAAO;4BAC1B,SAAS,EAAE,sBAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC;yBACnD,CAAC,EAJwC,CAIxC,CAAC;wBACH,UAAU,EAAE,CAAC,CAAC,UAAU;qBACzB,CAAC,EAPS,CAOT,CAAC,EAAC;;;KACP;IACH,kBAAC;AAAD,CAAC,AA3ED,CAAiC,iBAAO,GA2EvC;AA3EY,kCAAW"}
|