@iconlake/client 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/client.ts +170 -0
- package/cosmos.auth.v1beta1/index.ts +6 -0
- package/cosmos.auth.v1beta1/module.ts +102 -0
- package/cosmos.auth.v1beta1/registry.ts +7 -0
- package/cosmos.auth.v1beta1/rest.ts +641 -0
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/auth.ts +324 -0
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/genesis.ts +95 -0
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/query.ts +1212 -0
- package/cosmos.auth.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/cosmos.auth.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
- package/cosmos.auth.v1beta1/types/gogoproto/gogo.ts +2 -0
- package/cosmos.auth.v1beta1/types/google/api/annotations.ts +2 -0
- package/cosmos.auth.v1beta1/types/google/api/http.ts +589 -0
- package/cosmos.auth.v1beta1/types/google/protobuf/any.ts +240 -0
- package/cosmos.auth.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.auth.v1beta1/types.ts +11 -0
- package/cosmos.authz.v1beta1/index.ts +6 -0
- package/cosmos.authz.v1beta1/module.ts +207 -0
- package/cosmos.authz.v1beta1/registry.ts +13 -0
- package/cosmos.authz.v1beta1/rest.ts +604 -0
- package/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/authz.ts +325 -0
- package/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/event.ts +175 -0
- package/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/genesis.ts +78 -0
- package/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/query.ts +516 -0
- package/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/tx.ts +493 -0
- package/cosmos.authz.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/cosmos.authz.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
- package/cosmos.authz.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
- package/cosmos.authz.v1beta1/types/gogoproto/gogo.ts +2 -0
- package/cosmos.authz.v1beta1/types/google/api/annotations.ts +2 -0
- package/cosmos.authz.v1beta1/types/google/api/http.ts +589 -0
- package/cosmos.authz.v1beta1/types/google/protobuf/any.ts +240 -0
- package/cosmos.authz.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.authz.v1beta1/types/google/protobuf/timestamp.ts +216 -0
- package/cosmos.authz.v1beta1/types.ts +17 -0
- package/cosmos.bank.v1beta1/index.ts +6 -0
- package/cosmos.bank.v1beta1/module.ts +182 -0
- package/cosmos.bank.v1beta1/registry.ts +11 -0
- package/cosmos.bank.v1beta1/rest.ts +656 -0
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/authz.ts +77 -0
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/bank.ts +604 -0
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/genesis.ts +203 -0
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/query.ts +1366 -0
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/tx.ts +289 -0
- package/cosmos.bank.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/cosmos.bank.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
- package/cosmos.bank.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
- package/cosmos.bank.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
- package/cosmos.bank.v1beta1/types/gogoproto/gogo.ts +2 -0
- package/cosmos.bank.v1beta1/types/google/api/annotations.ts +2 -0
- package/cosmos.bank.v1beta1/types/google/api/http.ts +589 -0
- package/cosmos.bank.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.bank.v1beta1/types.ts +25 -0
- package/cosmos.base.node.v1beta1/index.ts +6 -0
- package/cosmos.base.node.v1beta1/module.ts +96 -0
- package/cosmos.base.node.v1beta1/registry.ts +7 -0
- package/cosmos.base.node.v1beta1/rest.ts +170 -0
- package/cosmos.base.node.v1beta1/types/cosmos/base/node/v1beta1/query.ts +137 -0
- package/cosmos.base.node.v1beta1/types/google/api/annotations.ts +2 -0
- package/cosmos.base.node.v1beta1/types/google/api/http.ts +589 -0
- package/cosmos.base.node.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.base.node.v1beta1/types.ts +5 -0
- package/cosmos.base.tendermint.v1beta1/index.ts +6 -0
- package/cosmos.base.tendermint.v1beta1/module.ts +110 -0
- package/cosmos.base.tendermint.v1beta1/registry.ts +7 -0
- package/cosmos.base.tendermint.v1beta1/rest.ts +1147 -0
- package/cosmos.base.tendermint.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/cosmos.base.tendermint.v1beta1/types/cosmos/base/tendermint/v1beta1/query.ts +1646 -0
- package/cosmos.base.tendermint.v1beta1/types/cosmos/base/tendermint/v1beta1/types.ts +442 -0
- package/cosmos.base.tendermint.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
- package/cosmos.base.tendermint.v1beta1/types/gogoproto/gogo.ts +2 -0
- package/cosmos.base.tendermint.v1beta1/types/google/api/annotations.ts +2 -0
- package/cosmos.base.tendermint.v1beta1/types/google/api/http.ts +589 -0
- package/cosmos.base.tendermint.v1beta1/types/google/protobuf/any.ts +240 -0
- package/cosmos.base.tendermint.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.base.tendermint.v1beta1/types/google/protobuf/timestamp.ts +216 -0
- package/cosmos.base.tendermint.v1beta1/types/tendermint/crypto/keys.ts +129 -0
- package/cosmos.base.tendermint.v1beta1/types/tendermint/crypto/proof.ts +439 -0
- package/cosmos.base.tendermint.v1beta1/types/tendermint/p2p/types.ts +423 -0
- package/cosmos.base.tendermint.v1beta1/types/tendermint/types/block.ts +112 -0
- package/cosmos.base.tendermint.v1beta1/types/tendermint/types/evidence.ts +412 -0
- package/cosmos.base.tendermint.v1beta1/types/tendermint/types/types.ts +1452 -0
- package/cosmos.base.tendermint.v1beta1/types/tendermint/types/validator.ts +308 -0
- package/cosmos.base.tendermint.v1beta1/types/tendermint/version/types.ts +184 -0
- package/cosmos.base.tendermint.v1beta1/types.ts +19 -0
- package/cosmos.crisis.v1beta1/index.ts +6 -0
- package/cosmos.crisis.v1beta1/module.ts +129 -0
- package/cosmos.crisis.v1beta1/registry.ts +9 -0
- package/cosmos.crisis.v1beta1/rest.ts +152 -0
- package/cosmos.crisis.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
- package/cosmos.crisis.v1beta1/types/cosmos/crisis/v1beta1/genesis.ts +79 -0
- package/cosmos.crisis.v1beta1/types/cosmos/crisis/v1beta1/tx.ts +159 -0
- package/cosmos.crisis.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
- package/cosmos.crisis.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
- package/cosmos.crisis.v1beta1/types/gogoproto/gogo.ts +2 -0
- package/cosmos.crisis.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.crisis.v1beta1/types.ts +5 -0
- package/cosmos.distribution.v1beta1/index.ts +6 -0
- package/cosmos.distribution.v1beta1/module.ts +266 -0
- package/cosmos.distribution.v1beta1/registry.ts +15 -0
- package/cosmos.distribution.v1beta1/rest.ts +557 -0
- package/cosmos.distribution.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/cosmos.distribution.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/distribution.ts +945 -0
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/genesis.ts +849 -0
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/query.ts +1289 -0
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/tx.ts +550 -0
- package/cosmos.distribution.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
- package/cosmos.distribution.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
- package/cosmos.distribution.v1beta1/types/gogoproto/gogo.ts +2 -0
- package/cosmos.distribution.v1beta1/types/google/api/annotations.ts +2 -0
- package/cosmos.distribution.v1beta1/types/google/api/http.ts +589 -0
- package/cosmos.distribution.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.distribution.v1beta1/types.ts +43 -0
- package/cosmos.evidence.v1beta1/index.ts +6 -0
- package/cosmos.evidence.v1beta1/module.ts +131 -0
- package/cosmos.evidence.v1beta1/registry.ts +9 -0
- package/cosmos.evidence.v1beta1/rest.ts +402 -0
- package/cosmos.evidence.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/evidence.ts +161 -0
- package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/genesis.ts +73 -0
- package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/query.ts +343 -0
- package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/tx.ts +213 -0
- package/cosmos.evidence.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
- package/cosmos.evidence.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
- package/cosmos.evidence.v1beta1/types/gogoproto/gogo.ts +2 -0
- package/cosmos.evidence.v1beta1/types/google/api/annotations.ts +2 -0
- package/cosmos.evidence.v1beta1/types/google/api/http.ts +589 -0
- package/cosmos.evidence.v1beta1/types/google/protobuf/any.ts +240 -0
- package/cosmos.evidence.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.evidence.v1beta1/types/google/protobuf/timestamp.ts +216 -0
- package/cosmos.evidence.v1beta1/types.ts +7 -0
- package/cosmos.feegrant.v1beta1/index.ts +6 -0
- package/cosmos.feegrant.v1beta1/module.ts +170 -0
- package/cosmos.feegrant.v1beta1/registry.ts +11 -0
- package/cosmos.feegrant.v1beta1/rest.ts +452 -0
- package/cosmos.feegrant.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/cosmos.feegrant.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
- package/cosmos.feegrant.v1beta1/types/cosmos/feegrant/v1beta1/feegrant.ts +409 -0
- package/cosmos.feegrant.v1beta1/types/cosmos/feegrant/v1beta1/genesis.ts +76 -0
- package/cosmos.feegrant.v1beta1/types/cosmos/feegrant/v1beta1/query.ts +484 -0
- package/cosmos.feegrant.v1beta1/types/cosmos/feegrant/v1beta1/tx.ts +294 -0
- package/cosmos.feegrant.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
- package/cosmos.feegrant.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
- package/cosmos.feegrant.v1beta1/types/gogoproto/gogo.ts +2 -0
- package/cosmos.feegrant.v1beta1/types/google/api/annotations.ts +2 -0
- package/cosmos.feegrant.v1beta1/types/google/api/http.ts +589 -0
- package/cosmos.feegrant.v1beta1/types/google/protobuf/any.ts +240 -0
- package/cosmos.feegrant.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.feegrant.v1beta1/types/google/protobuf/duration.ts +187 -0
- package/cosmos.feegrant.v1beta1/types/google/protobuf/timestamp.ts +216 -0
- package/cosmos.feegrant.v1beta1/types.ts +13 -0
- package/cosmos.gov.v1/index.ts +6 -0
- package/cosmos.gov.v1/module.ts +244 -0
- package/cosmos.gov.v1/registry.ts +15 -0
- package/cosmos.gov.v1/rest.ts +798 -0
- package/cosmos.gov.v1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/cosmos.gov.v1/types/cosmos/base/v1beta1/coin.ts +261 -0
- package/cosmos.gov.v1/types/cosmos/gov/v1/genesis.ts +208 -0
- package/cosmos.gov.v1/types/cosmos/gov/v1/gov.ts +925 -0
- package/cosmos.gov.v1/types/cosmos/gov/v1/query.ts +1202 -0
- package/cosmos.gov.v1/types/cosmos/gov/v1/tx.ts +763 -0
- package/cosmos.gov.v1/types/cosmos/msg/v1/msg.ts +2 -0
- package/cosmos.gov.v1/types/cosmos_proto/cosmos.ts +247 -0
- package/cosmos.gov.v1/types/gogoproto/gogo.ts +2 -0
- package/cosmos.gov.v1/types/google/api/annotations.ts +2 -0
- package/cosmos.gov.v1/types/google/api/http.ts +589 -0
- package/cosmos.gov.v1/types/google/protobuf/any.ts +240 -0
- package/cosmos.gov.v1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.gov.v1/types/google/protobuf/duration.ts +187 -0
- package/cosmos.gov.v1/types/google/protobuf/timestamp.ts +216 -0
- package/cosmos.gov.v1/types.ts +21 -0
- package/cosmos.gov.v1beta1/index.ts +6 -0
- package/cosmos.gov.v1beta1/module.ts +246 -0
- package/cosmos.gov.v1beta1/registry.ts +15 -0
- package/cosmos.gov.v1beta1/rest.ts +864 -0
- package/cosmos.gov.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/cosmos.gov.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
- package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/genesis.ts +206 -0
- package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/gov.ts +1015 -0
- package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/query.ts +1200 -0
- package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/tx.ts +612 -0
- package/cosmos.gov.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
- package/cosmos.gov.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
- package/cosmos.gov.v1beta1/types/gogoproto/gogo.ts +2 -0
- package/cosmos.gov.v1beta1/types/google/api/annotations.ts +2 -0
- package/cosmos.gov.v1beta1/types/google/api/http.ts +589 -0
- package/cosmos.gov.v1beta1/types/google/protobuf/any.ts +240 -0
- package/cosmos.gov.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.gov.v1beta1/types/google/protobuf/duration.ts +187 -0
- package/cosmos.gov.v1beta1/types/google/protobuf/timestamp.ts +216 -0
- package/cosmos.gov.v1beta1/types.ts +23 -0
- package/cosmos.group.v1/index.ts +6 -0
- package/cosmos.group.v1/module.ts +598 -0
- package/cosmos.group.v1/registry.ts +35 -0
- package/cosmos.group.v1/rest.ts +1162 -0
- package/cosmos.group.v1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/cosmos.group.v1/types/cosmos/group/v1/events.ts +568 -0
- package/cosmos.group.v1/types/cosmos/group/v1/genesis.ts +228 -0
- package/cosmos.group.v1/types/cosmos/group/v1/query.ts +1897 -0
- package/cosmos.group.v1/types/cosmos/group/v1/tx.ts +2113 -0
- package/cosmos.group.v1/types/cosmos/group/v1/types.ts +1422 -0
- package/cosmos.group.v1/types/cosmos/msg/v1/msg.ts +2 -0
- package/cosmos.group.v1/types/cosmos_proto/cosmos.ts +247 -0
- package/cosmos.group.v1/types/gogoproto/gogo.ts +2 -0
- package/cosmos.group.v1/types/google/api/annotations.ts +2 -0
- package/cosmos.group.v1/types/google/api/http.ts +589 -0
- package/cosmos.group.v1/types/google/protobuf/any.ts +240 -0
- package/cosmos.group.v1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.group.v1/types/google/protobuf/duration.ts +187 -0
- package/cosmos.group.v1/types/google/protobuf/timestamp.ts +216 -0
- package/cosmos.group.v1/types.ts +45 -0
- package/cosmos.mint.v1beta1/index.ts +6 -0
- package/cosmos.mint.v1beta1/module.ts +100 -0
- package/cosmos.mint.v1beta1/registry.ts +7 -0
- package/cosmos.mint.v1beta1/rest.ts +253 -0
- package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/genesis.ts +92 -0
- package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/mint.ts +234 -0
- package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/query.ts +412 -0
- package/cosmos.mint.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
- package/cosmos.mint.v1beta1/types/gogoproto/gogo.ts +2 -0
- package/cosmos.mint.v1beta1/types/google/api/annotations.ts +2 -0
- package/cosmos.mint.v1beta1/types/google/api/http.ts +589 -0
- package/cosmos.mint.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.mint.v1beta1/types.ts +9 -0
- package/cosmos.nft.v1beta1/index.ts +6 -0
- package/cosmos.nft.v1beta1/module.ts +108 -0
- package/cosmos.nft.v1beta1/registry.ts +7 -0
- package/cosmos.nft.v1beta1/rest.ts +685 -0
- package/cosmos.nft.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/cosmos.nft.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
- package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/event.ts +251 -0
- package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/genesis.ts +163 -0
- package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/nft.ts +240 -0
- package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/query.ts +964 -0
- package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/tx.ts +173 -0
- package/cosmos.nft.v1beta1/types/google/api/annotations.ts +2 -0
- package/cosmos.nft.v1beta1/types/google/api/http.ts +589 -0
- package/cosmos.nft.v1beta1/types/google/protobuf/any.ts +240 -0
- package/cosmos.nft.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.nft.v1beta1/types.ts +17 -0
- package/cosmos.params.v1beta1/index.ts +6 -0
- package/cosmos.params.v1beta1/module.ts +102 -0
- package/cosmos.params.v1beta1/registry.ts +7 -0
- package/cosmos.params.v1beta1/rest.ts +220 -0
- package/cosmos.params.v1beta1/types/cosmos/params/v1beta1/params.ts +174 -0
- package/cosmos.params.v1beta1/types/cosmos/params/v1beta1/query.ts +364 -0
- package/cosmos.params.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
- package/cosmos.params.v1beta1/types/gogoproto/gogo.ts +2 -0
- package/cosmos.params.v1beta1/types/google/api/annotations.ts +2 -0
- package/cosmos.params.v1beta1/types/google/api/http.ts +589 -0
- package/cosmos.params.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.params.v1beta1/types.ts +11 -0
- package/cosmos.slashing.v1beta1/index.ts +6 -0
- package/cosmos.slashing.v1beta1/module.ts +139 -0
- package/cosmos.slashing.v1beta1/registry.ts +9 -0
- package/cosmos.slashing.v1beta1/rest.ts +368 -0
- package/cosmos.slashing.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/cosmos.slashing.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
- package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/genesis.ts +364 -0
- package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/query.ts +411 -0
- package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/slashing.ts +352 -0
- package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/tx.ts +141 -0
- package/cosmos.slashing.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
- package/cosmos.slashing.v1beta1/types/gogoproto/gogo.ts +2 -0
- package/cosmos.slashing.v1beta1/types/google/api/annotations.ts +2 -0
- package/cosmos.slashing.v1beta1/types/google/api/http.ts +589 -0
- package/cosmos.slashing.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.slashing.v1beta1/types/google/protobuf/duration.ts +187 -0
- package/cosmos.slashing.v1beta1/types/google/protobuf/timestamp.ts +216 -0
- package/cosmos.slashing.v1beta1/types.ts +15 -0
- package/cosmos.staking.v1beta1/index.ts +6 -0
- package/cosmos.staking.v1beta1/module.ts +340 -0
- package/cosmos.staking.v1beta1/registry.ts +19 -0
- package/cosmos.staking.v1beta1/rest.ts +1239 -0
- package/cosmos.staking.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/cosmos.staking.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
- package/cosmos.staking.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/authz.ts +245 -0
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/genesis.ts +322 -0
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/query.ts +2109 -0
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/staking.ts +1829 -0
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/tx.ts +1005 -0
- package/cosmos.staking.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
- package/cosmos.staking.v1beta1/types/gogoproto/gogo.ts +2 -0
- package/cosmos.staking.v1beta1/types/google/api/annotations.ts +2 -0
- package/cosmos.staking.v1beta1/types/google/api/http.ts +589 -0
- package/cosmos.staking.v1beta1/types/google/protobuf/any.ts +240 -0
- package/cosmos.staking.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.staking.v1beta1/types/google/protobuf/duration.ts +187 -0
- package/cosmos.staking.v1beta1/types/google/protobuf/timestamp.ts +216 -0
- package/cosmos.staking.v1beta1/types/tendermint/crypto/keys.ts +129 -0
- package/cosmos.staking.v1beta1/types/tendermint/crypto/proof.ts +439 -0
- package/cosmos.staking.v1beta1/types/tendermint/types/types.ts +1452 -0
- package/cosmos.staking.v1beta1/types/tendermint/types/validator.ts +308 -0
- package/cosmos.staking.v1beta1/types/tendermint/version/types.ts +184 -0
- package/cosmos.staking.v1beta1/types.ts +51 -0
- package/cosmos.tx.v1beta1/index.ts +6 -0
- package/cosmos.tx.v1beta1/module.ts +122 -0
- package/cosmos.tx.v1beta1/registry.ts +7 -0
- package/cosmos.tx.v1beta1/rest.ts +1372 -0
- package/cosmos.tx.v1beta1/types/cosmos/base/abci/v1beta1/abci.ts +1040 -0
- package/cosmos.tx.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/cosmos.tx.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
- package/cosmos.tx.v1beta1/types/cosmos/crypto/multisig/v1beta1/multisig.ts +195 -0
- package/cosmos.tx.v1beta1/types/cosmos/tx/signing/v1beta1/signing.ts +556 -0
- package/cosmos.tx.v1beta1/types/cosmos/tx/v1beta1/service.ts +1057 -0
- package/cosmos.tx.v1beta1/types/cosmos/tx/v1beta1/tx.ts +1355 -0
- package/cosmos.tx.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
- package/cosmos.tx.v1beta1/types/gogoproto/gogo.ts +2 -0
- package/cosmos.tx.v1beta1/types/google/api/annotations.ts +2 -0
- package/cosmos.tx.v1beta1/types/google/api/http.ts +589 -0
- package/cosmos.tx.v1beta1/types/google/protobuf/any.ts +240 -0
- package/cosmos.tx.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.tx.v1beta1/types/google/protobuf/duration.ts +187 -0
- package/cosmos.tx.v1beta1/types/google/protobuf/timestamp.ts +216 -0
- package/cosmos.tx.v1beta1/types/tendermint/abci/types.ts +4154 -0
- package/cosmos.tx.v1beta1/types/tendermint/crypto/keys.ts +129 -0
- package/cosmos.tx.v1beta1/types/tendermint/crypto/proof.ts +439 -0
- package/cosmos.tx.v1beta1/types/tendermint/types/block.ts +112 -0
- package/cosmos.tx.v1beta1/types/tendermint/types/evidence.ts +412 -0
- package/cosmos.tx.v1beta1/types/tendermint/types/params.ts +514 -0
- package/cosmos.tx.v1beta1/types/tendermint/types/types.ts +1452 -0
- package/cosmos.tx.v1beta1/types/tendermint/types/validator.ts +308 -0
- package/cosmos.tx.v1beta1/types/tendermint/version/types.ts +184 -0
- package/cosmos.tx.v1beta1/types.ts +31 -0
- package/cosmos.upgrade.v1beta1/index.ts +6 -0
- package/cosmos.upgrade.v1beta1/module.ts +170 -0
- package/cosmos.upgrade.v1beta1/registry.ts +11 -0
- package/cosmos.upgrade.v1beta1/rest.ts +468 -0
- package/cosmos.upgrade.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
- package/cosmos.upgrade.v1beta1/types/cosmos/upgrade/v1beta1/query.ts +728 -0
- package/cosmos.upgrade.v1beta1/types/cosmos/upgrade/v1beta1/tx.ts +284 -0
- package/cosmos.upgrade.v1beta1/types/cosmos/upgrade/v1beta1/upgrade.ts +429 -0
- package/cosmos.upgrade.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
- package/cosmos.upgrade.v1beta1/types/gogoproto/gogo.ts +2 -0
- package/cosmos.upgrade.v1beta1/types/google/api/annotations.ts +2 -0
- package/cosmos.upgrade.v1beta1/types/google/api/http.ts +589 -0
- package/cosmos.upgrade.v1beta1/types/google/protobuf/any.ts +240 -0
- package/cosmos.upgrade.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.upgrade.v1beta1/types/google/protobuf/timestamp.ts +216 -0
- package/cosmos.upgrade.v1beta1/types.ts +13 -0
- package/cosmos.vesting.v1beta1/index.ts +6 -0
- package/cosmos.vesting.v1beta1/module.ts +207 -0
- package/cosmos.vesting.v1beta1/registry.ts +13 -0
- package/cosmos.vesting.v1beta1/rest.ts +297 -0
- package/cosmos.vesting.v1beta1/types/cosmos/auth/v1beta1/auth.ts +324 -0
- package/cosmos.vesting.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
- package/cosmos.vesting.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
- package/cosmos.vesting.v1beta1/types/cosmos/vesting/v1beta1/tx.ts +540 -0
- package/cosmos.vesting.v1beta1/types/cosmos/vesting/v1beta1/vesting.ts +529 -0
- package/cosmos.vesting.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
- package/cosmos.vesting.v1beta1/types/gogoproto/gogo.ts +2 -0
- package/cosmos.vesting.v1beta1/types/google/protobuf/any.ts +240 -0
- package/cosmos.vesting.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.vesting.v1beta1/types.ts +17 -0
- package/env.ts +7 -0
- package/helpers.ts +32 -0
- package/ibc.applications.interchain_accounts.controller.v1/index.ts +6 -0
- package/ibc.applications.interchain_accounts.controller.v1/module.ts +98 -0
- package/ibc.applications.interchain_accounts.controller.v1/registry.ts +7 -0
- package/ibc.applications.interchain_accounts.controller.v1/rest.ts +346 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/gogoproto/gogo.ts +2 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/google/api/annotations.ts +2 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/google/api/http.ts +589 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/google/protobuf/any.ts +240 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/google/protobuf/descriptor.ts +3753 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/controller.ts +75 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/query.ts +274 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/tx.ts +361 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/v1/packet.ts +234 -0
- package/ibc.applications.interchain_accounts.controller.v1/types.ts +7 -0
- package/ibc.applications.interchain_accounts.host.v1/index.ts +6 -0
- package/ibc.applications.interchain_accounts.host.v1/module.ts +98 -0
- package/ibc.applications.interchain_accounts.host.v1/registry.ts +7 -0
- package/ibc.applications.interchain_accounts.host.v1/rest.ts +183 -0
- package/ibc.applications.interchain_accounts.host.v1/types/gogoproto/gogo.ts +2 -0
- package/ibc.applications.interchain_accounts.host.v1/types/google/api/annotations.ts +2 -0
- package/ibc.applications.interchain_accounts.host.v1/types/google/api/http.ts +589 -0
- package/ibc.applications.interchain_accounts.host.v1/types/google/protobuf/descriptor.ts +3753 -0
- package/ibc.applications.interchain_accounts.host.v1/types/ibc/applications/interchain_accounts/host/v1/host.ts +92 -0
- package/ibc.applications.interchain_accounts.host.v1/types/ibc/applications/interchain_accounts/host/v1/query.ts +141 -0
- package/ibc.applications.interchain_accounts.host.v1/types.ts +7 -0
- package/ibc.applications.transfer.v1/index.ts +6 -0
- package/ibc.applications.transfer.v1/module.ts +133 -0
- package/ibc.applications.transfer.v1/registry.ts +9 -0
- package/ibc.applications.transfer.v1/rest.ts +544 -0
- package/ibc.applications.transfer.v1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/ibc.applications.transfer.v1/types/cosmos/base/v1beta1/coin.ts +261 -0
- package/ibc.applications.transfer.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +429 -0
- package/ibc.applications.transfer.v1/types/cosmos_proto/cosmos.ts +247 -0
- package/ibc.applications.transfer.v1/types/gogoproto/gogo.ts +2 -0
- package/ibc.applications.transfer.v1/types/google/api/annotations.ts +2 -0
- package/ibc.applications.transfer.v1/types/google/api/http.ts +589 -0
- package/ibc.applications.transfer.v1/types/google/protobuf/any.ts +240 -0
- package/ibc.applications.transfer.v1/types/google/protobuf/descriptor.ts +3753 -0
- package/ibc.applications.transfer.v1/types/google/protobuf/timestamp.ts +216 -0
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/genesis.ts +100 -0
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/query.ts +659 -0
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/transfer.ts +168 -0
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/tx.ts +287 -0
- package/ibc.applications.transfer.v1/types/ibc/core/client/v1/client.ts +608 -0
- package/ibc.applications.transfer.v1/types.ts +9 -0
- package/ibc.core.channel.v1/index.ts +6 -0
- package/ibc.core.channel.v1/module.ts +112 -0
- package/ibc.core.channel.v1/registry.ts +7 -0
- package/ibc.core.channel.v1/rest.ts +1375 -0
- package/ibc.core.channel.v1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/ibc.core.channel.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +429 -0
- package/ibc.core.channel.v1/types/cosmos_proto/cosmos.ts +247 -0
- package/ibc.core.channel.v1/types/gogoproto/gogo.ts +2 -0
- package/ibc.core.channel.v1/types/google/api/annotations.ts +2 -0
- package/ibc.core.channel.v1/types/google/api/http.ts +589 -0
- package/ibc.core.channel.v1/types/google/protobuf/any.ts +240 -0
- package/ibc.core.channel.v1/types/google/protobuf/descriptor.ts +3753 -0
- package/ibc.core.channel.v1/types/google/protobuf/timestamp.ts +216 -0
- package/ibc.core.channel.v1/types/ibc/core/channel/v1/channel.ts +905 -0
- package/ibc.core.channel.v1/types/ibc/core/channel/v1/genesis.ts +301 -0
- package/ibc.core.channel.v1/types/ibc/core/channel/v1/query.ts +2472 -0
- package/ibc.core.channel.v1/types/ibc/core/channel/v1/tx.ts +1784 -0
- package/ibc.core.channel.v1/types/ibc/core/client/v1/client.ts +608 -0
- package/ibc.core.channel.v1/types.ts +21 -0
- package/ibc.core.client.v1/index.ts +6 -0
- package/ibc.core.client.v1/module.ts +114 -0
- package/ibc.core.client.v1/registry.ts +7 -0
- package/ibc.core.client.v1/rest.ts +1084 -0
- package/ibc.core.client.v1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/ibc.core.client.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +429 -0
- package/ibc.core.client.v1/types/cosmos_proto/cosmos.ts +247 -0
- package/ibc.core.client.v1/types/gogoproto/gogo.ts +2 -0
- package/ibc.core.client.v1/types/google/api/annotations.ts +2 -0
- package/ibc.core.client.v1/types/google/api/http.ts +589 -0
- package/ibc.core.client.v1/types/google/protobuf/any.ts +240 -0
- package/ibc.core.client.v1/types/google/protobuf/descriptor.ts +3753 -0
- package/ibc.core.client.v1/types/google/protobuf/timestamp.ts +216 -0
- package/ibc.core.client.v1/types/ibc/core/client/v1/client.ts +608 -0
- package/ibc.core.client.v1/types/ibc/core/client/v1/genesis.ts +357 -0
- package/ibc.core.client.v1/types/ibc/core/client/v1/query.ts +1390 -0
- package/ibc.core.client.v1/types/ibc/core/client/v1/tx.ts +691 -0
- package/ibc.core.client.v1/types.ts +23 -0
- package/ibc.core.connection.v1/index.ts +6 -0
- package/ibc.core.connection.v1/module.ts +110 -0
- package/ibc.core.connection.v1/registry.ts +7 -0
- package/ibc.core.connection.v1/rest.ts +889 -0
- package/ibc.core.connection.v1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/ibc.core.connection.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +429 -0
- package/ibc.core.connection.v1/types/cosmos_proto/cosmos.ts +247 -0
- package/ibc.core.connection.v1/types/gogoproto/gogo.ts +2 -0
- package/ibc.core.connection.v1/types/google/api/annotations.ts +2 -0
- package/ibc.core.connection.v1/types/google/api/http.ts +589 -0
- package/ibc.core.connection.v1/types/google/protobuf/any.ts +240 -0
- package/ibc.core.connection.v1/types/google/protobuf/descriptor.ts +3753 -0
- package/ibc.core.connection.v1/types/google/protobuf/timestamp.ts +216 -0
- package/ibc.core.connection.v1/types/ibc/core/client/v1/client.ts +608 -0
- package/ibc.core.connection.v1/types/ibc/core/commitment/v1/commitment.ts +299 -0
- package/ibc.core.connection.v1/types/ibc/core/connection/v1/connection.ts +698 -0
- package/ibc.core.connection.v1/types/ibc/core/connection/v1/genesis.ts +152 -0
- package/ibc.core.connection.v1/types/ibc/core/connection/v1/query.ts +1041 -0
- package/ibc.core.connection.v1/types/ibc/core/connection/v1/tx.ts +908 -0
- package/ibc.core.connection.v1/types/proofs.ts +1408 -0
- package/ibc.core.connection.v1/types.ts +19 -0
- package/iconlake.icon/index.ts +6 -0
- package/iconlake.icon/module.ts +135 -0
- package/iconlake.icon/registry.ts +9 -0
- package/iconlake.icon/rest.ts +206 -0
- package/iconlake.icon/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/iconlake.icon/types/gogoproto/gogo.ts +2 -0
- package/iconlake.icon/types/google/api/annotations.ts +2 -0
- package/iconlake.icon/types/google/api/http.ts +589 -0
- package/iconlake.icon/types/google/protobuf/descriptor.ts +3753 -0
- package/iconlake.icon/types/iconlake/icon/genesis.ts +74 -0
- package/iconlake.icon/types/iconlake/icon/params.ts +58 -0
- package/iconlake.icon/types/iconlake/icon/query.ts +276 -0
- package/iconlake.icon/types/iconlake/icon/tx.ts +374 -0
- package/iconlake.icon/types.ts +11 -0
- package/iconlake.iconlake/index.ts +6 -0
- package/iconlake.iconlake/module.ts +133 -0
- package/iconlake.iconlake/registry.ts +9 -0
- package/iconlake.iconlake/rest.ts +342 -0
- package/iconlake.iconlake/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/iconlake.iconlake/types/cosmos/base/v1beta1/coin.ts +261 -0
- package/iconlake.iconlake/types/cosmos_proto/cosmos.ts +247 -0
- package/iconlake.iconlake/types/gogoproto/gogo.ts +2 -0
- package/iconlake.iconlake/types/google/api/annotations.ts +2 -0
- package/iconlake.iconlake/types/google/api/http.ts +589 -0
- package/iconlake.iconlake/types/google/protobuf/descriptor.ts +3753 -0
- package/iconlake.iconlake/types/iconlake/iconlake/account.ts +140 -0
- package/iconlake.iconlake/types/iconlake/iconlake/genesis.ts +91 -0
- package/iconlake.iconlake/types/iconlake/iconlake/params.ts +58 -0
- package/iconlake.iconlake/types/iconlake/iconlake/query.ts +388 -0
- package/iconlake.iconlake/types/iconlake/iconlake/tx.ts +214 -0
- package/iconlake.iconlake/types.ts +9 -0
- package/index.ts +75 -0
- package/modules.ts +5 -0
- package/package.json +35 -0
- package/tsconfig.json +12 -0
- package/types.d.ts +21 -0
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import Long from "long";
|
|
3
|
+
import _m0 from "protobufjs/minimal";
|
|
4
|
+
import { PublicKey } from "../crypto/keys";
|
|
5
|
+
|
|
6
|
+
export const protobufPackage = "tendermint.types";
|
|
7
|
+
|
|
8
|
+
export interface ValidatorSet {
|
|
9
|
+
validators: Validator[];
|
|
10
|
+
proposer: Validator | undefined;
|
|
11
|
+
totalVotingPower: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface Validator {
|
|
15
|
+
address: Uint8Array;
|
|
16
|
+
pubKey: PublicKey | undefined;
|
|
17
|
+
votingPower: number;
|
|
18
|
+
proposerPriority: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface SimpleValidator {
|
|
22
|
+
pubKey: PublicKey | undefined;
|
|
23
|
+
votingPower: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function createBaseValidatorSet(): ValidatorSet {
|
|
27
|
+
return { validators: [], proposer: undefined, totalVotingPower: 0 };
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const ValidatorSet = {
|
|
31
|
+
encode(message: ValidatorSet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
32
|
+
for (const v of message.validators) {
|
|
33
|
+
Validator.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
34
|
+
}
|
|
35
|
+
if (message.proposer !== undefined) {
|
|
36
|
+
Validator.encode(message.proposer, writer.uint32(18).fork()).ldelim();
|
|
37
|
+
}
|
|
38
|
+
if (message.totalVotingPower !== 0) {
|
|
39
|
+
writer.uint32(24).int64(message.totalVotingPower);
|
|
40
|
+
}
|
|
41
|
+
return writer;
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): ValidatorSet {
|
|
45
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
46
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
47
|
+
const message = createBaseValidatorSet();
|
|
48
|
+
while (reader.pos < end) {
|
|
49
|
+
const tag = reader.uint32();
|
|
50
|
+
switch (tag >>> 3) {
|
|
51
|
+
case 1:
|
|
52
|
+
message.validators.push(Validator.decode(reader, reader.uint32()));
|
|
53
|
+
break;
|
|
54
|
+
case 2:
|
|
55
|
+
message.proposer = Validator.decode(reader, reader.uint32());
|
|
56
|
+
break;
|
|
57
|
+
case 3:
|
|
58
|
+
message.totalVotingPower = longToNumber(reader.int64() as Long);
|
|
59
|
+
break;
|
|
60
|
+
default:
|
|
61
|
+
reader.skipType(tag & 7);
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return message;
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
fromJSON(object: any): ValidatorSet {
|
|
69
|
+
return {
|
|
70
|
+
validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromJSON(e)) : [],
|
|
71
|
+
proposer: isSet(object.proposer) ? Validator.fromJSON(object.proposer) : undefined,
|
|
72
|
+
totalVotingPower: isSet(object.totalVotingPower) ? Number(object.totalVotingPower) : 0,
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
toJSON(message: ValidatorSet): unknown {
|
|
77
|
+
const obj: any = {};
|
|
78
|
+
if (message.validators) {
|
|
79
|
+
obj.validators = message.validators.map((e) => e ? Validator.toJSON(e) : undefined);
|
|
80
|
+
} else {
|
|
81
|
+
obj.validators = [];
|
|
82
|
+
}
|
|
83
|
+
message.proposer !== undefined
|
|
84
|
+
&& (obj.proposer = message.proposer ? Validator.toJSON(message.proposer) : undefined);
|
|
85
|
+
message.totalVotingPower !== undefined && (obj.totalVotingPower = Math.round(message.totalVotingPower));
|
|
86
|
+
return obj;
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
fromPartial<I extends Exact<DeepPartial<ValidatorSet>, I>>(object: I): ValidatorSet {
|
|
90
|
+
const message = createBaseValidatorSet();
|
|
91
|
+
message.validators = object.validators?.map((e) => Validator.fromPartial(e)) || [];
|
|
92
|
+
message.proposer = (object.proposer !== undefined && object.proposer !== null)
|
|
93
|
+
? Validator.fromPartial(object.proposer)
|
|
94
|
+
: undefined;
|
|
95
|
+
message.totalVotingPower = object.totalVotingPower ?? 0;
|
|
96
|
+
return message;
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
function createBaseValidator(): Validator {
|
|
101
|
+
return { address: new Uint8Array(), pubKey: undefined, votingPower: 0, proposerPriority: 0 };
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export const Validator = {
|
|
105
|
+
encode(message: Validator, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
106
|
+
if (message.address.length !== 0) {
|
|
107
|
+
writer.uint32(10).bytes(message.address);
|
|
108
|
+
}
|
|
109
|
+
if (message.pubKey !== undefined) {
|
|
110
|
+
PublicKey.encode(message.pubKey, writer.uint32(18).fork()).ldelim();
|
|
111
|
+
}
|
|
112
|
+
if (message.votingPower !== 0) {
|
|
113
|
+
writer.uint32(24).int64(message.votingPower);
|
|
114
|
+
}
|
|
115
|
+
if (message.proposerPriority !== 0) {
|
|
116
|
+
writer.uint32(32).int64(message.proposerPriority);
|
|
117
|
+
}
|
|
118
|
+
return writer;
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): Validator {
|
|
122
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
123
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
124
|
+
const message = createBaseValidator();
|
|
125
|
+
while (reader.pos < end) {
|
|
126
|
+
const tag = reader.uint32();
|
|
127
|
+
switch (tag >>> 3) {
|
|
128
|
+
case 1:
|
|
129
|
+
message.address = reader.bytes();
|
|
130
|
+
break;
|
|
131
|
+
case 2:
|
|
132
|
+
message.pubKey = PublicKey.decode(reader, reader.uint32());
|
|
133
|
+
break;
|
|
134
|
+
case 3:
|
|
135
|
+
message.votingPower = longToNumber(reader.int64() as Long);
|
|
136
|
+
break;
|
|
137
|
+
case 4:
|
|
138
|
+
message.proposerPriority = longToNumber(reader.int64() as Long);
|
|
139
|
+
break;
|
|
140
|
+
default:
|
|
141
|
+
reader.skipType(tag & 7);
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return message;
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
fromJSON(object: any): Validator {
|
|
149
|
+
return {
|
|
150
|
+
address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(),
|
|
151
|
+
pubKey: isSet(object.pubKey) ? PublicKey.fromJSON(object.pubKey) : undefined,
|
|
152
|
+
votingPower: isSet(object.votingPower) ? Number(object.votingPower) : 0,
|
|
153
|
+
proposerPriority: isSet(object.proposerPriority) ? Number(object.proposerPriority) : 0,
|
|
154
|
+
};
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
toJSON(message: Validator): unknown {
|
|
158
|
+
const obj: any = {};
|
|
159
|
+
message.address !== undefined
|
|
160
|
+
&& (obj.address = base64FromBytes(message.address !== undefined ? message.address : new Uint8Array()));
|
|
161
|
+
message.pubKey !== undefined && (obj.pubKey = message.pubKey ? PublicKey.toJSON(message.pubKey) : undefined);
|
|
162
|
+
message.votingPower !== undefined && (obj.votingPower = Math.round(message.votingPower));
|
|
163
|
+
message.proposerPriority !== undefined && (obj.proposerPriority = Math.round(message.proposerPriority));
|
|
164
|
+
return obj;
|
|
165
|
+
},
|
|
166
|
+
|
|
167
|
+
fromPartial<I extends Exact<DeepPartial<Validator>, I>>(object: I): Validator {
|
|
168
|
+
const message = createBaseValidator();
|
|
169
|
+
message.address = object.address ?? new Uint8Array();
|
|
170
|
+
message.pubKey = (object.pubKey !== undefined && object.pubKey !== null)
|
|
171
|
+
? PublicKey.fromPartial(object.pubKey)
|
|
172
|
+
: undefined;
|
|
173
|
+
message.votingPower = object.votingPower ?? 0;
|
|
174
|
+
message.proposerPriority = object.proposerPriority ?? 0;
|
|
175
|
+
return message;
|
|
176
|
+
},
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
function createBaseSimpleValidator(): SimpleValidator {
|
|
180
|
+
return { pubKey: undefined, votingPower: 0 };
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export const SimpleValidator = {
|
|
184
|
+
encode(message: SimpleValidator, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
185
|
+
if (message.pubKey !== undefined) {
|
|
186
|
+
PublicKey.encode(message.pubKey, writer.uint32(10).fork()).ldelim();
|
|
187
|
+
}
|
|
188
|
+
if (message.votingPower !== 0) {
|
|
189
|
+
writer.uint32(16).int64(message.votingPower);
|
|
190
|
+
}
|
|
191
|
+
return writer;
|
|
192
|
+
},
|
|
193
|
+
|
|
194
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): SimpleValidator {
|
|
195
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
196
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
197
|
+
const message = createBaseSimpleValidator();
|
|
198
|
+
while (reader.pos < end) {
|
|
199
|
+
const tag = reader.uint32();
|
|
200
|
+
switch (tag >>> 3) {
|
|
201
|
+
case 1:
|
|
202
|
+
message.pubKey = PublicKey.decode(reader, reader.uint32());
|
|
203
|
+
break;
|
|
204
|
+
case 2:
|
|
205
|
+
message.votingPower = longToNumber(reader.int64() as Long);
|
|
206
|
+
break;
|
|
207
|
+
default:
|
|
208
|
+
reader.skipType(tag & 7);
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return message;
|
|
213
|
+
},
|
|
214
|
+
|
|
215
|
+
fromJSON(object: any): SimpleValidator {
|
|
216
|
+
return {
|
|
217
|
+
pubKey: isSet(object.pubKey) ? PublicKey.fromJSON(object.pubKey) : undefined,
|
|
218
|
+
votingPower: isSet(object.votingPower) ? Number(object.votingPower) : 0,
|
|
219
|
+
};
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
toJSON(message: SimpleValidator): unknown {
|
|
223
|
+
const obj: any = {};
|
|
224
|
+
message.pubKey !== undefined && (obj.pubKey = message.pubKey ? PublicKey.toJSON(message.pubKey) : undefined);
|
|
225
|
+
message.votingPower !== undefined && (obj.votingPower = Math.round(message.votingPower));
|
|
226
|
+
return obj;
|
|
227
|
+
},
|
|
228
|
+
|
|
229
|
+
fromPartial<I extends Exact<DeepPartial<SimpleValidator>, I>>(object: I): SimpleValidator {
|
|
230
|
+
const message = createBaseSimpleValidator();
|
|
231
|
+
message.pubKey = (object.pubKey !== undefined && object.pubKey !== null)
|
|
232
|
+
? PublicKey.fromPartial(object.pubKey)
|
|
233
|
+
: undefined;
|
|
234
|
+
message.votingPower = object.votingPower ?? 0;
|
|
235
|
+
return message;
|
|
236
|
+
},
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
declare var self: any | undefined;
|
|
240
|
+
declare var window: any | undefined;
|
|
241
|
+
declare var global: any | undefined;
|
|
242
|
+
var globalThis: any = (() => {
|
|
243
|
+
if (typeof globalThis !== "undefined") {
|
|
244
|
+
return globalThis;
|
|
245
|
+
}
|
|
246
|
+
if (typeof self !== "undefined") {
|
|
247
|
+
return self;
|
|
248
|
+
}
|
|
249
|
+
if (typeof window !== "undefined") {
|
|
250
|
+
return window;
|
|
251
|
+
}
|
|
252
|
+
if (typeof global !== "undefined") {
|
|
253
|
+
return global;
|
|
254
|
+
}
|
|
255
|
+
throw "Unable to locate global object";
|
|
256
|
+
})();
|
|
257
|
+
|
|
258
|
+
function bytesFromBase64(b64: string): Uint8Array {
|
|
259
|
+
if (globalThis.Buffer) {
|
|
260
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
261
|
+
} else {
|
|
262
|
+
const bin = globalThis.atob(b64);
|
|
263
|
+
const arr = new Uint8Array(bin.length);
|
|
264
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
265
|
+
arr[i] = bin.charCodeAt(i);
|
|
266
|
+
}
|
|
267
|
+
return arr;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
function base64FromBytes(arr: Uint8Array): string {
|
|
272
|
+
if (globalThis.Buffer) {
|
|
273
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
274
|
+
} else {
|
|
275
|
+
const bin: string[] = [];
|
|
276
|
+
arr.forEach((byte) => {
|
|
277
|
+
bin.push(String.fromCharCode(byte));
|
|
278
|
+
});
|
|
279
|
+
return globalThis.btoa(bin.join(""));
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
284
|
+
|
|
285
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
286
|
+
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
287
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
288
|
+
: Partial<T>;
|
|
289
|
+
|
|
290
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
291
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
292
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
293
|
+
|
|
294
|
+
function longToNumber(long: Long): number {
|
|
295
|
+
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
296
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
297
|
+
}
|
|
298
|
+
return long.toNumber();
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
if (_m0.util.Long !== Long) {
|
|
302
|
+
_m0.util.Long = Long as any;
|
|
303
|
+
_m0.configure();
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
function isSet(value: any): boolean {
|
|
307
|
+
return value !== null && value !== undefined;
|
|
308
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import Long from "long";
|
|
3
|
+
import _m0 from "protobufjs/minimal";
|
|
4
|
+
|
|
5
|
+
export const protobufPackage = "tendermint.version";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* App includes the protocol and software version for the application.
|
|
9
|
+
* This information is included in ResponseInfo. The App.Protocol can be
|
|
10
|
+
* updated in ResponseEndBlock.
|
|
11
|
+
*/
|
|
12
|
+
export interface App {
|
|
13
|
+
protocol: number;
|
|
14
|
+
software: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Consensus captures the consensus rules for processing a block in the blockchain,
|
|
19
|
+
* including all blockchain data structures and the rules of the application's
|
|
20
|
+
* state transition machine.
|
|
21
|
+
*/
|
|
22
|
+
export interface Consensus {
|
|
23
|
+
block: number;
|
|
24
|
+
app: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function createBaseApp(): App {
|
|
28
|
+
return { protocol: 0, software: "" };
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const App = {
|
|
32
|
+
encode(message: App, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
33
|
+
if (message.protocol !== 0) {
|
|
34
|
+
writer.uint32(8).uint64(message.protocol);
|
|
35
|
+
}
|
|
36
|
+
if (message.software !== "") {
|
|
37
|
+
writer.uint32(18).string(message.software);
|
|
38
|
+
}
|
|
39
|
+
return writer;
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): App {
|
|
43
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
44
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
45
|
+
const message = createBaseApp();
|
|
46
|
+
while (reader.pos < end) {
|
|
47
|
+
const tag = reader.uint32();
|
|
48
|
+
switch (tag >>> 3) {
|
|
49
|
+
case 1:
|
|
50
|
+
message.protocol = longToNumber(reader.uint64() as Long);
|
|
51
|
+
break;
|
|
52
|
+
case 2:
|
|
53
|
+
message.software = reader.string();
|
|
54
|
+
break;
|
|
55
|
+
default:
|
|
56
|
+
reader.skipType(tag & 7);
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return message;
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
fromJSON(object: any): App {
|
|
64
|
+
return {
|
|
65
|
+
protocol: isSet(object.protocol) ? Number(object.protocol) : 0,
|
|
66
|
+
software: isSet(object.software) ? String(object.software) : "",
|
|
67
|
+
};
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
toJSON(message: App): unknown {
|
|
71
|
+
const obj: any = {};
|
|
72
|
+
message.protocol !== undefined && (obj.protocol = Math.round(message.protocol));
|
|
73
|
+
message.software !== undefined && (obj.software = message.software);
|
|
74
|
+
return obj;
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
fromPartial<I extends Exact<DeepPartial<App>, I>>(object: I): App {
|
|
78
|
+
const message = createBaseApp();
|
|
79
|
+
message.protocol = object.protocol ?? 0;
|
|
80
|
+
message.software = object.software ?? "";
|
|
81
|
+
return message;
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
function createBaseConsensus(): Consensus {
|
|
86
|
+
return { block: 0, app: 0 };
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export const Consensus = {
|
|
90
|
+
encode(message: Consensus, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
91
|
+
if (message.block !== 0) {
|
|
92
|
+
writer.uint32(8).uint64(message.block);
|
|
93
|
+
}
|
|
94
|
+
if (message.app !== 0) {
|
|
95
|
+
writer.uint32(16).uint64(message.app);
|
|
96
|
+
}
|
|
97
|
+
return writer;
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): Consensus {
|
|
101
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
102
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
103
|
+
const message = createBaseConsensus();
|
|
104
|
+
while (reader.pos < end) {
|
|
105
|
+
const tag = reader.uint32();
|
|
106
|
+
switch (tag >>> 3) {
|
|
107
|
+
case 1:
|
|
108
|
+
message.block = longToNumber(reader.uint64() as Long);
|
|
109
|
+
break;
|
|
110
|
+
case 2:
|
|
111
|
+
message.app = longToNumber(reader.uint64() as Long);
|
|
112
|
+
break;
|
|
113
|
+
default:
|
|
114
|
+
reader.skipType(tag & 7);
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return message;
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
fromJSON(object: any): Consensus {
|
|
122
|
+
return { block: isSet(object.block) ? Number(object.block) : 0, app: isSet(object.app) ? Number(object.app) : 0 };
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
toJSON(message: Consensus): unknown {
|
|
126
|
+
const obj: any = {};
|
|
127
|
+
message.block !== undefined && (obj.block = Math.round(message.block));
|
|
128
|
+
message.app !== undefined && (obj.app = Math.round(message.app));
|
|
129
|
+
return obj;
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
fromPartial<I extends Exact<DeepPartial<Consensus>, I>>(object: I): Consensus {
|
|
133
|
+
const message = createBaseConsensus();
|
|
134
|
+
message.block = object.block ?? 0;
|
|
135
|
+
message.app = object.app ?? 0;
|
|
136
|
+
return message;
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
declare var self: any | undefined;
|
|
141
|
+
declare var window: any | undefined;
|
|
142
|
+
declare var global: any | undefined;
|
|
143
|
+
var globalThis: any = (() => {
|
|
144
|
+
if (typeof globalThis !== "undefined") {
|
|
145
|
+
return globalThis;
|
|
146
|
+
}
|
|
147
|
+
if (typeof self !== "undefined") {
|
|
148
|
+
return self;
|
|
149
|
+
}
|
|
150
|
+
if (typeof window !== "undefined") {
|
|
151
|
+
return window;
|
|
152
|
+
}
|
|
153
|
+
if (typeof global !== "undefined") {
|
|
154
|
+
return global;
|
|
155
|
+
}
|
|
156
|
+
throw "Unable to locate global object";
|
|
157
|
+
})();
|
|
158
|
+
|
|
159
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
160
|
+
|
|
161
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
162
|
+
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
163
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
164
|
+
: Partial<T>;
|
|
165
|
+
|
|
166
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
167
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
168
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
169
|
+
|
|
170
|
+
function longToNumber(long: Long): number {
|
|
171
|
+
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
172
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
173
|
+
}
|
|
174
|
+
return long.toNumber();
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (_m0.util.Long !== Long) {
|
|
178
|
+
_m0.util.Long = Long as any;
|
|
179
|
+
_m0.configure();
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function isSet(value: any): boolean {
|
|
183
|
+
return value !== null && value !== undefined;
|
|
184
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Tx } from "./types/cosmos/tx/v1beta1/tx"
|
|
2
|
+
import { TxRaw } from "./types/cosmos/tx/v1beta1/tx"
|
|
3
|
+
import { SignDoc } from "./types/cosmos/tx/v1beta1/tx"
|
|
4
|
+
import { SignDocDirectAux } from "./types/cosmos/tx/v1beta1/tx"
|
|
5
|
+
import { TxBody } from "./types/cosmos/tx/v1beta1/tx"
|
|
6
|
+
import { AuthInfo } from "./types/cosmos/tx/v1beta1/tx"
|
|
7
|
+
import { SignerInfo } from "./types/cosmos/tx/v1beta1/tx"
|
|
8
|
+
import { ModeInfo } from "./types/cosmos/tx/v1beta1/tx"
|
|
9
|
+
import { ModeInfo_Single } from "./types/cosmos/tx/v1beta1/tx"
|
|
10
|
+
import { ModeInfo_Multi } from "./types/cosmos/tx/v1beta1/tx"
|
|
11
|
+
import { Fee } from "./types/cosmos/tx/v1beta1/tx"
|
|
12
|
+
import { Tip } from "./types/cosmos/tx/v1beta1/tx"
|
|
13
|
+
import { AuxSignerData } from "./types/cosmos/tx/v1beta1/tx"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
Tx,
|
|
18
|
+
TxRaw,
|
|
19
|
+
SignDoc,
|
|
20
|
+
SignDocDirectAux,
|
|
21
|
+
TxBody,
|
|
22
|
+
AuthInfo,
|
|
23
|
+
SignerInfo,
|
|
24
|
+
ModeInfo,
|
|
25
|
+
ModeInfo_Single,
|
|
26
|
+
ModeInfo_Multi,
|
|
27
|
+
Fee,
|
|
28
|
+
Tip,
|
|
29
|
+
AuxSignerData,
|
|
30
|
+
|
|
31
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
// Generated by Ignite ignite.com/cli
|
|
2
|
+
|
|
3
|
+
import { StdFee } from "@cosmjs/launchpad";
|
|
4
|
+
import { SigningStargateClient, DeliverTxResponse } from "@cosmjs/stargate";
|
|
5
|
+
import { EncodeObject, GeneratedType, OfflineSigner, Registry } from "@cosmjs/proto-signing";
|
|
6
|
+
import { msgTypes } from './registry';
|
|
7
|
+
import { IgniteClient } from "../client"
|
|
8
|
+
import { MissingWalletError } from "../helpers"
|
|
9
|
+
import { Api } from "./rest";
|
|
10
|
+
import { MsgSoftwareUpgrade } from "./types/cosmos/upgrade/v1beta1/tx";
|
|
11
|
+
import { MsgCancelUpgrade } from "./types/cosmos/upgrade/v1beta1/tx";
|
|
12
|
+
|
|
13
|
+
import { Plan as typePlan} from "./types"
|
|
14
|
+
import { SoftwareUpgradeProposal as typeSoftwareUpgradeProposal} from "./types"
|
|
15
|
+
import { CancelSoftwareUpgradeProposal as typeCancelSoftwareUpgradeProposal} from "./types"
|
|
16
|
+
import { ModuleVersion as typeModuleVersion} from "./types"
|
|
17
|
+
|
|
18
|
+
export { MsgSoftwareUpgrade, MsgCancelUpgrade };
|
|
19
|
+
|
|
20
|
+
type sendMsgSoftwareUpgradeParams = {
|
|
21
|
+
value: MsgSoftwareUpgrade,
|
|
22
|
+
fee?: StdFee,
|
|
23
|
+
memo?: string
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
type sendMsgCancelUpgradeParams = {
|
|
27
|
+
value: MsgCancelUpgrade,
|
|
28
|
+
fee?: StdFee,
|
|
29
|
+
memo?: string
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
type msgSoftwareUpgradeParams = {
|
|
34
|
+
value: MsgSoftwareUpgrade,
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
type msgCancelUpgradeParams = {
|
|
38
|
+
value: MsgCancelUpgrade,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
export const registry = new Registry(msgTypes);
|
|
43
|
+
|
|
44
|
+
type Field = {
|
|
45
|
+
name: string;
|
|
46
|
+
type: unknown;
|
|
47
|
+
}
|
|
48
|
+
function getStructure(template) {
|
|
49
|
+
const structure: {fields: Field[]} = { fields: [] }
|
|
50
|
+
for (let [key, value] of Object.entries(template)) {
|
|
51
|
+
let field = { name: key, type: typeof value }
|
|
52
|
+
structure.fields.push(field)
|
|
53
|
+
}
|
|
54
|
+
return structure
|
|
55
|
+
}
|
|
56
|
+
const defaultFee = {
|
|
57
|
+
amount: [],
|
|
58
|
+
gas: "200000",
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
interface TxClientOptions {
|
|
62
|
+
addr: string
|
|
63
|
+
prefix: string
|
|
64
|
+
signer?: OfflineSigner
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
async sendMsgSoftwareUpgrade({ value, fee, memo }: sendMsgSoftwareUpgradeParams): Promise<DeliverTxResponse> {
|
|
72
|
+
if (!signer) {
|
|
73
|
+
throw new Error('TxClient:sendMsgSoftwareUpgrade: Unable to sign Tx. Signer is not present.')
|
|
74
|
+
}
|
|
75
|
+
try {
|
|
76
|
+
const { address } = (await signer.getAccounts())[0];
|
|
77
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
78
|
+
let msg = this.msgSoftwareUpgrade({ value: MsgSoftwareUpgrade.fromPartial(value) })
|
|
79
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
80
|
+
} catch (e: any) {
|
|
81
|
+
throw new Error('TxClient:sendMsgSoftwareUpgrade: Could not broadcast Tx: '+ e.message)
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
async sendMsgCancelUpgrade({ value, fee, memo }: sendMsgCancelUpgradeParams): Promise<DeliverTxResponse> {
|
|
86
|
+
if (!signer) {
|
|
87
|
+
throw new Error('TxClient:sendMsgCancelUpgrade: Unable to sign Tx. Signer is not present.')
|
|
88
|
+
}
|
|
89
|
+
try {
|
|
90
|
+
const { address } = (await signer.getAccounts())[0];
|
|
91
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
92
|
+
let msg = this.msgCancelUpgrade({ value: MsgCancelUpgrade.fromPartial(value) })
|
|
93
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
94
|
+
} catch (e: any) {
|
|
95
|
+
throw new Error('TxClient:sendMsgCancelUpgrade: Could not broadcast Tx: '+ e.message)
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
msgSoftwareUpgrade({ value }: msgSoftwareUpgradeParams): EncodeObject {
|
|
101
|
+
try {
|
|
102
|
+
return { typeUrl: "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", value: MsgSoftwareUpgrade.fromPartial( value ) }
|
|
103
|
+
} catch (e: any) {
|
|
104
|
+
throw new Error('TxClient:MsgSoftwareUpgrade: Could not create message: ' + e.message)
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
msgCancelUpgrade({ value }: msgCancelUpgradeParams): EncodeObject {
|
|
109
|
+
try {
|
|
110
|
+
return { typeUrl: "/cosmos.upgrade.v1beta1.MsgCancelUpgrade", value: MsgCancelUpgrade.fromPartial( value ) }
|
|
111
|
+
} catch (e: any) {
|
|
112
|
+
throw new Error('TxClient:MsgCancelUpgrade: Could not create message: ' + e.message)
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
interface QueryClientOptions {
|
|
120
|
+
addr: string
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export const queryClient = ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => {
|
|
124
|
+
return new Api({ baseURL: addr });
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
class SDKModule {
|
|
128
|
+
public query: ReturnType<typeof queryClient>;
|
|
129
|
+
public tx: ReturnType<typeof txClient>;
|
|
130
|
+
public structure: Record<string,unknown>;
|
|
131
|
+
public registry: Array<[string, GeneratedType]> = [];
|
|
132
|
+
|
|
133
|
+
constructor(client: IgniteClient) {
|
|
134
|
+
|
|
135
|
+
this.query = queryClient({ addr: client.env.apiURL });
|
|
136
|
+
this.updateTX(client);
|
|
137
|
+
this.structure = {
|
|
138
|
+
Plan: getStructure(typePlan.fromPartial({})),
|
|
139
|
+
SoftwareUpgradeProposal: getStructure(typeSoftwareUpgradeProposal.fromPartial({})),
|
|
140
|
+
CancelSoftwareUpgradeProposal: getStructure(typeCancelSoftwareUpgradeProposal.fromPartial({})),
|
|
141
|
+
ModuleVersion: getStructure(typeModuleVersion.fromPartial({})),
|
|
142
|
+
|
|
143
|
+
};
|
|
144
|
+
client.on('signer-changed',(signer) => {
|
|
145
|
+
this.updateTX(client);
|
|
146
|
+
})
|
|
147
|
+
}
|
|
148
|
+
updateTX(client: IgniteClient) {
|
|
149
|
+
const methods = txClient({
|
|
150
|
+
signer: client.signer,
|
|
151
|
+
addr: client.env.rpcURL,
|
|
152
|
+
prefix: client.env.prefix ?? "cosmos",
|
|
153
|
+
})
|
|
154
|
+
|
|
155
|
+
this.tx = methods;
|
|
156
|
+
for (let m in methods) {
|
|
157
|
+
this.tx[m] = methods[m].bind(this.tx);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
const Module = (test: IgniteClient) => {
|
|
163
|
+
return {
|
|
164
|
+
module: {
|
|
165
|
+
CosmosUpgradeV1Beta1: new SDKModule(test)
|
|
166
|
+
},
|
|
167
|
+
registry: msgTypes
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
export default Module;
|