decentralcardgame-cardchain-client-ts 0.0.9 → 0.0.11
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/DecentralCardGame.cardchain.cardchain/module.js +322 -322
- package/DecentralCardGame.cardchain.cardchain/module.ts +486 -486
- package/DecentralCardGame.cardchain.cardchain/registry.js +71 -71
- package/DecentralCardGame.cardchain.cardchain/registry.ts +71 -71
- package/DecentralCardGame.cardchain.cardchain/rest.js +1 -1
- package/DecentralCardGame.cardchain.cardchain/rest.ts +8 -3
- package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/genesis.js +1 -1
- package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/genesis.ts +1 -1
- package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/tx.js +44 -13
- package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/tx.ts +44 -13
- package/DecentralCardGame.cardchain.cardchain/types/amino/amino.js +2 -0
- package/DecentralCardGame.cardchain.cardchain/types/amino/amino.ts +2 -0
- package/DecentralCardGame.cardchain.cardchain/types.js +22 -22
- package/DecentralCardGame.cardchain.cardchain/types.ts +22 -22
- package/client.js +7 -7
- package/client.ts +11 -10
- package/cosmos.auth.v1beta1/module.js +2 -0
- package/cosmos.auth.v1beta1/module.ts +2 -0
- package/cosmos.auth.v1beta1/rest.js +18 -3
- package/cosmos.auth.v1beta1/rest.ts +113 -3
- package/cosmos.auth.v1beta1/types/amino/amino.js +2 -0
- package/cosmos.auth.v1beta1/types/amino/amino.ts +2 -0
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/auth.js +84 -0
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/auth.ts +104 -0
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/genesis.ts +1 -1
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/query.js +104 -3
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/query.ts +157 -4
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/tx.js +105 -0
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/tx.ts +172 -0
- package/cosmos.auth.v1beta1/types/cosmos/msg/v1/msg.js +2 -0
- package/cosmos.auth.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
- package/cosmos.auth.v1beta1/types/cosmos/query/v1/query.js +2 -0
- package/cosmos.auth.v1beta1/types/cosmos/query/v1/query.ts +2 -0
- package/cosmos.auth.v1beta1/types.js +2 -1
- package/cosmos.auth.v1beta1/types.ts +2 -0
- package/cosmos.authz.v1beta1/module.js +19 -19
- package/cosmos.authz.v1beta1/module.ts +29 -29
- package/cosmos.authz.v1beta1/registry.js +2 -2
- package/cosmos.authz.v1beta1/registry.ts +2 -2
- package/cosmos.authz.v1beta1/types/amino/amino.js +2 -0
- package/cosmos.authz.v1beta1/types/amino/amino.ts +2 -0
- package/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/tx.ts +1 -1
- package/cosmos.bank.v1beta1/module.js +16 -16
- package/cosmos.bank.v1beta1/module.ts +24 -24
- package/cosmos.bank.v1beta1/registry.js +2 -2
- package/cosmos.bank.v1beta1/registry.ts +2 -2
- package/cosmos.bank.v1beta1/rest.js +37 -6
- package/cosmos.bank.v1beta1/rest.ts +99 -6
- package/cosmos.bank.v1beta1/types/amino/amino.js +2 -0
- package/cosmos.bank.v1beta1/types/amino/amino.ts +2 -0
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/authz.js +18 -2
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/authz.ts +24 -2
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/bank.ts +9 -0
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/genesis.js +18 -2
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/genesis.ts +25 -4
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/query.js +230 -1
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/query.ts +356 -5
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/tx.js +206 -1
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/tx.ts +305 -1
- package/cosmos.bank.v1beta1/types/cosmos/query/v1/query.js +2 -0
- package/cosmos.bank.v1beta1/types/cosmos/query/v1/query.ts +2 -0
- package/cosmos.base.tendermint.v1beta1/rest.js +3 -3
- package/cosmos.base.tendermint.v1beta1/rest.ts +18 -27
- package/cosmos.base.tendermint.v1beta1/types/amino/amino.js +2 -0
- package/cosmos.base.tendermint.v1beta1/types/amino/amino.ts +2 -0
- package/cosmos.base.tendermint.v1beta1/types/cosmos/base/tendermint/v1beta1/query.ts +16 -46
- package/cosmos.consensus.v1/index.js +5 -0
- package/cosmos.consensus.v1/index.ts +6 -0
- package/cosmos.consensus.v1/module.js +81 -0
- package/cosmos.consensus.v1/module.ts +129 -0
- package/cosmos.consensus.v1/registry.js +5 -0
- package/cosmos.consensus.v1/registry.ts +9 -0
- package/cosmos.consensus.v1/rest.js +100 -0
- package/cosmos.consensus.v1/rest.ts +268 -0
- package/cosmos.consensus.v1/types/cosmos/consensus/v1/query.js +94 -0
- package/cosmos.consensus.v1/types/cosmos/consensus/v1/query.ts +147 -0
- package/cosmos.consensus.v1/types/cosmos/consensus/v1/tx.js +129 -0
- package/cosmos.consensus.v1/types/cosmos/consensus/v1/tx.ts +196 -0
- package/cosmos.consensus.v1/types/cosmos/msg/v1/msg.js +2 -0
- package/cosmos.consensus.v1/types/cosmos/msg/v1/msg.ts +2 -0
- package/cosmos.consensus.v1/types/cosmos_proto/cosmos.js +171 -0
- package/cosmos.consensus.v1/types/cosmos_proto/cosmos.ts +247 -0
- package/cosmos.consensus.v1/types/gogoproto/gogo.js +2 -0
- package/cosmos.consensus.v1/types/gogoproto/gogo.ts +2 -0
- package/cosmos.consensus.v1/types/google/api/annotations.js +2 -0
- package/cosmos.consensus.v1/types/google/api/annotations.ts +2 -0
- package/cosmos.consensus.v1/types/google/api/http.js +260 -0
- package/cosmos.consensus.v1/types/google/api/http.ts +589 -0
- package/cosmos.consensus.v1/types/google/protobuf/descriptor.js +2830 -0
- package/cosmos.consensus.v1/types/google/protobuf/descriptor.ts +3753 -0
- package/cosmos.consensus.v1/types/google/protobuf/duration.js +84 -0
- package/cosmos.consensus.v1/types/google/protobuf/duration.ts +187 -0
- package/cosmos.consensus.v1/types/tendermint/types/params.js +369 -0
- package/cosmos.consensus.v1/types/tendermint/types/params.ts +498 -0
- package/cosmos.consensus.v1/types.js +1 -0
- package/cosmos.consensus.v1/types.ts +5 -0
- package/cosmos.crisis.v1beta1/module.js +24 -1
- package/cosmos.crisis.v1beta1/module.ts +34 -1
- package/cosmos.crisis.v1beta1/registry.js +2 -0
- package/cosmos.crisis.v1beta1/registry.ts +2 -0
- package/cosmos.crisis.v1beta1/rest.ts +19 -0
- package/cosmos.crisis.v1beta1/types/amino/amino.js +2 -0
- package/cosmos.crisis.v1beta1/types/amino/amino.ts +2 -0
- package/cosmos.crisis.v1beta1/types/cosmos/crisis/v1beta1/tx.js +95 -0
- package/cosmos.crisis.v1beta1/types/cosmos/crisis/v1beta1/tx.ts +140 -1
- package/cosmos.distribution.v1beta1/module.js +63 -17
- package/cosmos.distribution.v1beta1/module.ts +91 -25
- package/cosmos.distribution.v1beta1/registry.js +8 -4
- package/cosmos.distribution.v1beta1/registry.ts +8 -4
- package/cosmos.distribution.v1beta1/rest.js +14 -0
- package/cosmos.distribution.v1beta1/rest.ts +66 -7
- package/cosmos.distribution.v1beta1/types/amino/amino.js +2 -0
- package/cosmos.distribution.v1beta1/types/amino/amino.ts +2 -0
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/distribution.ts +19 -0
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/genesis.ts +4 -4
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/query.js +120 -0
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/query.ts +158 -1
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/tx.js +199 -0
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/tx.ts +300 -3
- package/cosmos.evidence.v1beta1/rest.js +4 -3
- package/cosmos.evidence.v1beta1/rest.ts +4 -3
- package/cosmos.evidence.v1beta1/types/amino/amino.js +2 -0
- package/cosmos.evidence.v1beta1/types/amino/amino.ts +2 -0
- package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/evidence.ts +7 -1
- package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/query.js +13 -2
- package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/query.ts +25 -3
- package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/tx.ts +2 -0
- package/cosmos.feegrant.v1beta1/types/amino/amino.js +2 -0
- package/cosmos.feegrant.v1beta1/types/amino/amino.ts +2 -0
- package/cosmos.gov.v1/module.js +44 -19
- package/cosmos.gov.v1/module.ts +62 -27
- package/cosmos.gov.v1/registry.js +4 -2
- package/cosmos.gov.v1/registry.ts +4 -2
- package/cosmos.gov.v1/rest.ts +155 -41
- package/cosmos.gov.v1/types/amino/amino.js +2 -0
- package/cosmos.gov.v1/types/amino/amino.ts +2 -0
- package/cosmos.gov.v1/types/cosmos/gov/v1/genesis.js +13 -1
- package/cosmos.gov.v1/types/cosmos/gov/v1/genesis.ts +40 -5
- package/cosmos.gov.v1/types/cosmos/gov/v1/gov.js +179 -0
- package/cosmos.gov.v1/types/cosmos/gov/v1/gov.ts +277 -6
- package/cosmos.gov.v1/types/cosmos/gov/v1/query.js +13 -2
- package/cosmos.gov.v1/types/cosmos/gov/v1/query.ts +45 -7
- package/cosmos.gov.v1/types/cosmos/gov/v1/tx.js +113 -2
- package/cosmos.gov.v1/types/cosmos/gov/v1/tx.ts +186 -3
- package/cosmos.gov.v1/types.js +2 -1
- package/cosmos.gov.v1/types.ts +2 -0
- package/cosmos.gov.v1beta1/module.js +24 -24
- package/cosmos.gov.v1beta1/module.ts +36 -36
- package/cosmos.gov.v1beta1/registry.js +4 -4
- package/cosmos.gov.v1beta1/registry.ts +4 -4
- package/cosmos.gov.v1beta1/rest.ts +65 -96
- package/cosmos.gov.v1beta1/types/amino/amino.js +2 -0
- package/cosmos.gov.v1beta1/types/amino/amino.ts +2 -0
- package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/genesis.ts +3 -3
- package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/gov.ts +45 -10
- package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/query.ts +4 -2
- package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/tx.ts +16 -1
- package/cosmos.group.v1/module.js +98 -96
- package/cosmos.group.v1/module.ts +149 -147
- package/cosmos.group.v1/registry.js +16 -16
- package/cosmos.group.v1/registry.ts +16 -16
- package/cosmos.group.v1/rest.js +3 -3
- package/cosmos.group.v1/rest.ts +29 -9
- package/cosmos.group.v1/types/amino/amino.js +2 -0
- package/cosmos.group.v1/types/amino/amino.ts +2 -0
- package/cosmos.group.v1/types/cosmos/group/v1/events.js +65 -1
- package/cosmos.group.v1/types/cosmos/group/v1/events.ts +89 -1
- package/cosmos.group.v1/types/cosmos/group/v1/query.ts +5 -5
- package/cosmos.group.v1/types/cosmos/group/v1/tx.js +52 -34
- package/cosmos.group.v1/types/cosmos/group/v1/tx.ts +79 -49
- package/cosmos.group.v1/types/cosmos/group/v1/types.js +20 -0
- package/cosmos.group.v1/types/cosmos/group/v1/types.ts +46 -6
- package/cosmos.group.v1/types.js +2 -1
- package/cosmos.group.v1/types.ts +2 -0
- package/cosmos.mint.v1beta1/rest.ts +9 -1
- package/cosmos.mint.v1beta1/types/amino/amino.js +2 -0
- package/cosmos.mint.v1beta1/types/amino/amino.ts +2 -0
- package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/genesis.ts +1 -1
- package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/mint.ts +1 -1
- package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/tx.js +105 -0
- package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/tx.ts +172 -0
- package/cosmos.mint.v1beta1/types/cosmos/msg/v1/msg.js +2 -0
- package/cosmos.mint.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
- package/cosmos.nft.v1beta1/rest.ts +18 -22
- package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/event.ts +10 -0
- package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/genesis.ts +1 -0
- package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/query.ts +20 -0
- package/cosmos.nft.v1beta1/types/cosmos_proto/cosmos.js +171 -0
- package/cosmos.nft.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
- package/cosmos.params.v1beta1/types/amino/amino.js +2 -0
- package/cosmos.params.v1beta1/types/amino/amino.ts +2 -0
- package/cosmos.slashing.v1beta1/rest.ts +8 -0
- package/cosmos.slashing.v1beta1/types/amino/amino.js +2 -0
- package/cosmos.slashing.v1beta1/types/amino/amino.ts +2 -0
- package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/genesis.ts +1 -1
- package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/tx.js +94 -0
- package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/tx.ts +139 -0
- package/cosmos.staking.v1beta1/module.js +34 -32
- package/cosmos.staking.v1beta1/module.ts +50 -48
- package/cosmos.staking.v1beta1/registry.js +6 -6
- package/cosmos.staking.v1beta1/registry.ts +6 -6
- package/cosmos.staking.v1beta1/rest.js +7 -7
- package/cosmos.staking.v1beta1/rest.ts +49 -8
- package/cosmos.staking.v1beta1/types/amino/amino.js +2 -0
- package/cosmos.staking.v1beta1/types/amino/amino.ts +2 -0
- package/cosmos.staking.v1beta1/types/cosmos/query/v1/query.js +2 -0
- package/cosmos.staking.v1beta1/types/cosmos/query/v1/query.ts +2 -0
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/genesis.ts +1 -1
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/query.ts +36 -5
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/staking.js +180 -2
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/staking.ts +206 -3
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/tx.js +94 -1
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/tx.ts +138 -1
- package/cosmos.staking.v1beta1/types/tendermint/abci/types.js +3812 -0
- package/cosmos.staking.v1beta1/types/tendermint/abci/types.ts +4525 -0
- package/cosmos.staking.v1beta1/types/tendermint/types/params.js +369 -0
- package/cosmos.staking.v1beta1/types/tendermint/types/params.ts +498 -0
- package/cosmos.staking.v1beta1/types.js +2 -1
- package/cosmos.staking.v1beta1/types.ts +2 -0
- package/cosmos.tx.v1beta1/rest.js +66 -2
- package/cosmos.tx.v1beta1/rest.ts +177 -16
- package/cosmos.tx.v1beta1/types/amino/amino.js +2 -0
- package/cosmos.tx.v1beta1/types/amino/amino.ts +2 -0
- package/cosmos.tx.v1beta1/types/cosmos/tx/v1beta1/service.js +360 -2
- package/cosmos.tx.v1beta1/types/cosmos/tx/v1beta1/service.ts +524 -2
- package/cosmos.tx.v1beta1/types/tendermint/abci/types.js +592 -266
- package/cosmos.tx.v1beta1/types/tendermint/abci/types.ts +703 -332
- package/cosmos.tx.v1beta1/types/tendermint/types/params.js +8 -17
- package/cosmos.tx.v1beta1/types/tendermint/types/params.ts +9 -25
- package/cosmos.upgrade.v1beta1/rest.ts +0 -1
- package/cosmos.upgrade.v1beta1/types/amino/amino.js +2 -0
- package/cosmos.upgrade.v1beta1/types/amino/amino.ts +2 -0
- package/cosmos.upgrade.v1beta1/types/cosmos/upgrade/v1beta1/tx.ts +3 -3
- package/cosmos.upgrade.v1beta1/types/cosmos/upgrade/v1beta1/upgrade.ts +6 -4
- package/cosmos.vesting.v1beta1/module.js +19 -19
- package/cosmos.vesting.v1beta1/module.ts +29 -29
- package/cosmos.vesting.v1beta1/registry.js +2 -2
- package/cosmos.vesting.v1beta1/registry.ts +2 -2
- package/cosmos.vesting.v1beta1/types/amino/amino.js +2 -0
- package/cosmos.vesting.v1beta1/types/amino/amino.ts +2 -0
- package/cosmos.vesting.v1beta1/types/cosmos/auth/v1beta1/auth.js +84 -0
- package/cosmos.vesting.v1beta1/types/cosmos/auth/v1beta1/auth.ts +104 -0
- package/ibc.applications.interchain_accounts.controller.v1/rest.ts +1 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/tx.js +13 -2
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/tx.ts +16 -4
- package/ibc.applications.transfer.v1/module.js +5 -27
- package/ibc.applications.transfer.v1/module.ts +5 -34
- package/ibc.applications.transfer.v1/registry.js +1 -4
- package/ibc.applications.transfer.v1/registry.ts +0 -2
- package/ibc.applications.transfer.v1/rest.js +15 -1
- package/ibc.applications.transfer.v1/rest.ts +30 -1
- package/ibc.applications.transfer.v1/types/amino/amino.js +2 -0
- package/ibc.applications.transfer.v1/types/amino/amino.ts +2 -0
- package/ibc.applications.transfer.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +6 -4
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/authz.js +135 -0
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/authz.ts +178 -0
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/genesis.js +16 -1
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/genesis.ts +23 -2
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/query.js +91 -0
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/query.ts +120 -0
- package/ibc.applications.transfer.v1/types/ibc/core/client/v1/client.ts +5 -1
- package/ibc.applications.transfer.v1/types.js +3 -1
- package/ibc.applications.transfer.v1/types.ts +4 -0
- package/ibc.core.channel.v1/rest.ts +1 -0
- package/ibc.core.channel.v1/types/amino/amino.js +2 -0
- package/ibc.core.channel.v1/types/amino/amino.ts +2 -0
- package/ibc.core.channel.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +6 -4
- package/ibc.core.channel.v1/types/ibc/core/channel/v1/tx.js +13 -2
- package/ibc.core.channel.v1/types/ibc/core/channel/v1/tx.ts +14 -2
- package/ibc.core.channel.v1/types/ibc/core/client/v1/client.ts +5 -1
- package/ibc.core.client.v1/rest.ts +5 -1
- package/ibc.core.client.v1/types/amino/amino.js +2 -0
- package/ibc.core.client.v1/types/amino/amino.ts +2 -0
- package/ibc.core.client.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +6 -4
- package/ibc.core.client.v1/types/ibc/core/client/v1/client.ts +5 -1
- package/ibc.core.client.v1/types/ibc/core/client/v1/tx.js +9 -8
- package/ibc.core.client.v1/types/ibc/core/client/v1/tx.ts +28 -14
- package/ibc.core.connection.v1/types/amino/amino.js +2 -0
- package/ibc.core.connection.v1/types/amino/amino.ts +2 -0
- package/ibc.core.connection.v1/types/{proofs.js → cosmos/ics23/v1/proofs.js} +1 -1
- package/ibc.core.connection.v1/types/{proofs.ts → cosmos/ics23/v1/proofs.ts} +1 -1
- package/ibc.core.connection.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +6 -4
- package/ibc.core.connection.v1/types/ibc/core/client/v1/client.ts +5 -1
- package/ibc.core.connection.v1/types/ibc/core/commitment/v1/commitment.js +1 -1
- package/ibc.core.connection.v1/types/ibc/core/commitment/v1/commitment.ts +1 -1
- package/ibc.core.connection.v1/types/ibc/core/connection/v1/tx.js +26 -0
- package/ibc.core.connection.v1/types/ibc/core/connection/v1/tx.ts +34 -0
- package/index.js +3 -1
- package/index.ts +3 -1
- package/package.json +1 -4
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/card.js +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/card.ts +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/collection.js +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/collection.ts +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/collection_proposal.js +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/collection_proposal.ts +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/copyright_proposal.js +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/copyright_proposal.ts +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/council.js +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/council.ts +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/image.js +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/image.ts +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/match.js +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/match.ts +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/match_reporter_proposal.js +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/match_reporter_proposal.ts +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/num.js +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/num.ts +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/params.js +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/params.ts +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/query.js +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/query.ts +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/running_average.js +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/running_average.ts +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/sell_offer.js +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/sell_offer.ts +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/server.js +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/server.ts +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/user.js +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/user.ts +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/vote_right.js +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/vote_right.ts +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/voting_result.js +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/voting_result.ts +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/voting_results.js +0 -0
- /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/voting_results.ts +0 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
import { Params } from "./auth";
|
|
4
|
+
|
|
5
|
+
export const protobufPackage = "cosmos.auth.v1beta1";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* MsgUpdateParams is the Msg/UpdateParams request type.
|
|
9
|
+
*
|
|
10
|
+
* Since: cosmos-sdk 0.47
|
|
11
|
+
*/
|
|
12
|
+
export interface MsgUpdateParams {
|
|
13
|
+
/** authority is the address that controls the module (defaults to x/gov unless overwritten). */
|
|
14
|
+
authority: string;
|
|
15
|
+
/**
|
|
16
|
+
* params defines the x/auth parameters to update.
|
|
17
|
+
*
|
|
18
|
+
* NOTE: All parameters must be supplied.
|
|
19
|
+
*/
|
|
20
|
+
params: Params | undefined;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* MsgUpdateParamsResponse defines the response structure for executing a
|
|
25
|
+
* MsgUpdateParams message.
|
|
26
|
+
*
|
|
27
|
+
* Since: cosmos-sdk 0.47
|
|
28
|
+
*/
|
|
29
|
+
export interface MsgUpdateParamsResponse {
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function createBaseMsgUpdateParams(): MsgUpdateParams {
|
|
33
|
+
return { authority: "", params: undefined };
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const MsgUpdateParams = {
|
|
37
|
+
encode(message: MsgUpdateParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
38
|
+
if (message.authority !== "") {
|
|
39
|
+
writer.uint32(10).string(message.authority);
|
|
40
|
+
}
|
|
41
|
+
if (message.params !== undefined) {
|
|
42
|
+
Params.encode(message.params, writer.uint32(18).fork()).ldelim();
|
|
43
|
+
}
|
|
44
|
+
return writer;
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateParams {
|
|
48
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
49
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
50
|
+
const message = createBaseMsgUpdateParams();
|
|
51
|
+
while (reader.pos < end) {
|
|
52
|
+
const tag = reader.uint32();
|
|
53
|
+
switch (tag >>> 3) {
|
|
54
|
+
case 1:
|
|
55
|
+
message.authority = reader.string();
|
|
56
|
+
break;
|
|
57
|
+
case 2:
|
|
58
|
+
message.params = Params.decode(reader, reader.uint32());
|
|
59
|
+
break;
|
|
60
|
+
default:
|
|
61
|
+
reader.skipType(tag & 7);
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return message;
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
fromJSON(object: any): MsgUpdateParams {
|
|
69
|
+
return {
|
|
70
|
+
authority: isSet(object.authority) ? String(object.authority) : "",
|
|
71
|
+
params: isSet(object.params) ? Params.fromJSON(object.params) : undefined,
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
toJSON(message: MsgUpdateParams): unknown {
|
|
76
|
+
const obj: any = {};
|
|
77
|
+
message.authority !== undefined && (obj.authority = message.authority);
|
|
78
|
+
message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined);
|
|
79
|
+
return obj;
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
fromPartial<I extends Exact<DeepPartial<MsgUpdateParams>, I>>(object: I): MsgUpdateParams {
|
|
83
|
+
const message = createBaseMsgUpdateParams();
|
|
84
|
+
message.authority = object.authority ?? "";
|
|
85
|
+
message.params = (object.params !== undefined && object.params !== null)
|
|
86
|
+
? Params.fromPartial(object.params)
|
|
87
|
+
: undefined;
|
|
88
|
+
return message;
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse {
|
|
93
|
+
return {};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export const MsgUpdateParamsResponse = {
|
|
97
|
+
encode(_: MsgUpdateParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
98
|
+
return writer;
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateParamsResponse {
|
|
102
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
103
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
104
|
+
const message = createBaseMsgUpdateParamsResponse();
|
|
105
|
+
while (reader.pos < end) {
|
|
106
|
+
const tag = reader.uint32();
|
|
107
|
+
switch (tag >>> 3) {
|
|
108
|
+
default:
|
|
109
|
+
reader.skipType(tag & 7);
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return message;
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
fromJSON(_: any): MsgUpdateParamsResponse {
|
|
117
|
+
return {};
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
toJSON(_: MsgUpdateParamsResponse): unknown {
|
|
121
|
+
const obj: any = {};
|
|
122
|
+
return obj;
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
fromPartial<I extends Exact<DeepPartial<MsgUpdateParamsResponse>, I>>(_: I): MsgUpdateParamsResponse {
|
|
126
|
+
const message = createBaseMsgUpdateParamsResponse();
|
|
127
|
+
return message;
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
/** Msg defines the x/auth Msg service. */
|
|
132
|
+
export interface Msg {
|
|
133
|
+
/**
|
|
134
|
+
* UpdateParams defines a (governance) operation for updating the x/auth module
|
|
135
|
+
* parameters. The authority defaults to the x/gov module account.
|
|
136
|
+
*
|
|
137
|
+
* Since: cosmos-sdk 0.47
|
|
138
|
+
*/
|
|
139
|
+
UpdateParams(request: MsgUpdateParams): Promise<MsgUpdateParamsResponse>;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export class MsgClientImpl implements Msg {
|
|
143
|
+
private readonly rpc: Rpc;
|
|
144
|
+
constructor(rpc: Rpc) {
|
|
145
|
+
this.rpc = rpc;
|
|
146
|
+
this.UpdateParams = this.UpdateParams.bind(this);
|
|
147
|
+
}
|
|
148
|
+
UpdateParams(request: MsgUpdateParams): Promise<MsgUpdateParamsResponse> {
|
|
149
|
+
const data = MsgUpdateParams.encode(request).finish();
|
|
150
|
+
const promise = this.rpc.request("cosmos.auth.v1beta1.Msg", "UpdateParams", data);
|
|
151
|
+
return promise.then((data) => MsgUpdateParamsResponse.decode(new _m0.Reader(data)));
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
interface Rpc {
|
|
156
|
+
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
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 isSet(value: any): boolean {
|
|
171
|
+
return value !== null && value !== undefined;
|
|
172
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseAccount } from "./types/cosmos/auth/v1beta1/auth";
|
|
2
2
|
import { ModuleAccount } from "./types/cosmos/auth/v1beta1/auth";
|
|
3
|
+
import { ModuleCredential } from "./types/cosmos/auth/v1beta1/auth";
|
|
3
4
|
import { Params } from "./types/cosmos/auth/v1beta1/auth";
|
|
4
|
-
export { BaseAccount, ModuleAccount, Params, };
|
|
5
|
+
export { BaseAccount, ModuleAccount, ModuleCredential, Params, };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { BaseAccount } from "./types/cosmos/auth/v1beta1/auth"
|
|
2
2
|
import { ModuleAccount } from "./types/cosmos/auth/v1beta1/auth"
|
|
3
|
+
import { ModuleCredential } from "./types/cosmos/auth/v1beta1/auth"
|
|
3
4
|
import { Params } from "./types/cosmos/auth/v1beta1/auth"
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
export {
|
|
7
8
|
BaseAccount,
|
|
8
9
|
ModuleAccount,
|
|
10
|
+
ModuleCredential,
|
|
9
11
|
Params,
|
|
10
12
|
|
|
11
13
|
}
|
|
@@ -3,16 +3,16 @@ import { SigningStargateClient } from "@cosmjs/stargate";
|
|
|
3
3
|
import { Registry } from "@cosmjs/proto-signing";
|
|
4
4
|
import { msgTypes } from './registry';
|
|
5
5
|
import { Api } from "./rest";
|
|
6
|
+
import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx";
|
|
6
7
|
import { MsgExec } from "./types/cosmos/authz/v1beta1/tx";
|
|
7
8
|
import { MsgRevoke } from "./types/cosmos/authz/v1beta1/tx";
|
|
8
|
-
import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx";
|
|
9
9
|
import { GenericAuthorization as typeGenericAuthorization } from "./types";
|
|
10
10
|
import { Grant as typeGrant } from "./types";
|
|
11
11
|
import { GrantAuthorization as typeGrantAuthorization } from "./types";
|
|
12
12
|
import { GrantQueueItem as typeGrantQueueItem } from "./types";
|
|
13
13
|
import { EventGrant as typeEventGrant } from "./types";
|
|
14
14
|
import { EventRevoke as typeEventRevoke } from "./types";
|
|
15
|
-
export { MsgExec, MsgRevoke
|
|
15
|
+
export { MsgGrant, MsgExec, MsgRevoke };
|
|
16
16
|
export const registry = new Registry(msgTypes);
|
|
17
17
|
function getStructure(template) {
|
|
18
18
|
const structure = { fields: [] };
|
|
@@ -28,6 +28,20 @@ const defaultFee = {
|
|
|
28
28
|
};
|
|
29
29
|
export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
|
|
30
30
|
return {
|
|
31
|
+
async sendMsgGrant({ value, fee, memo }) {
|
|
32
|
+
if (!signer) {
|
|
33
|
+
throw new Error('TxClient:sendMsgGrant: Unable to sign Tx. Signer is not present.');
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
const { address } = (await signer.getAccounts())[0];
|
|
37
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
38
|
+
let msg = this.msgGrant({ value: MsgGrant.fromPartial(value) });
|
|
39
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
40
|
+
}
|
|
41
|
+
catch (e) {
|
|
42
|
+
throw new Error('TxClient:sendMsgGrant: Could not broadcast Tx: ' + e.message);
|
|
43
|
+
}
|
|
44
|
+
},
|
|
31
45
|
async sendMsgExec({ value, fee, memo }) {
|
|
32
46
|
if (!signer) {
|
|
33
47
|
throw new Error('TxClient:sendMsgExec: Unable to sign Tx. Signer is not present.');
|
|
@@ -56,18 +70,12 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
56
70
|
throw new Error('TxClient:sendMsgRevoke: Could not broadcast Tx: ' + e.message);
|
|
57
71
|
}
|
|
58
72
|
},
|
|
59
|
-
|
|
60
|
-
if (!signer) {
|
|
61
|
-
throw new Error('TxClient:sendMsgGrant: Unable to sign Tx. Signer is not present.');
|
|
62
|
-
}
|
|
73
|
+
msgGrant({ value }) {
|
|
63
74
|
try {
|
|
64
|
-
|
|
65
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
66
|
-
let msg = this.msgGrant({ value: MsgGrant.fromPartial(value) });
|
|
67
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
75
|
+
return { typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value: MsgGrant.fromPartial(value) };
|
|
68
76
|
}
|
|
69
77
|
catch (e) {
|
|
70
|
-
throw new Error('TxClient:
|
|
78
|
+
throw new Error('TxClient:MsgGrant: Could not create message: ' + e.message);
|
|
71
79
|
}
|
|
72
80
|
},
|
|
73
81
|
msgExec({ value }) {
|
|
@@ -86,14 +94,6 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
86
94
|
throw new Error('TxClient:MsgRevoke: Could not create message: ' + e.message);
|
|
87
95
|
}
|
|
88
96
|
},
|
|
89
|
-
msgGrant({ value }) {
|
|
90
|
-
try {
|
|
91
|
-
return { typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value: MsgGrant.fromPartial(value) };
|
|
92
|
-
}
|
|
93
|
-
catch (e) {
|
|
94
|
-
throw new Error('TxClient:MsgGrant: Could not create message: ' + e.message);
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
97
|
};
|
|
98
98
|
};
|
|
99
99
|
export const queryClient = ({ addr: addr } = { addr: "http://localhost:1317" }) => {
|
|
@@ -7,9 +7,9 @@ import { msgTypes } from './registry';
|
|
|
7
7
|
import { IgniteClient } from "../client"
|
|
8
8
|
import { MissingWalletError } from "../helpers"
|
|
9
9
|
import { Api } from "./rest";
|
|
10
|
+
import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx";
|
|
10
11
|
import { MsgExec } from "./types/cosmos/authz/v1beta1/tx";
|
|
11
12
|
import { MsgRevoke } from "./types/cosmos/authz/v1beta1/tx";
|
|
12
|
-
import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx";
|
|
13
13
|
|
|
14
14
|
import { GenericAuthorization as typeGenericAuthorization} from "./types"
|
|
15
15
|
import { Grant as typeGrant} from "./types"
|
|
@@ -18,7 +18,13 @@ import { GrantQueueItem as typeGrantQueueItem} from "./types"
|
|
|
18
18
|
import { EventGrant as typeEventGrant} from "./types"
|
|
19
19
|
import { EventRevoke as typeEventRevoke} from "./types"
|
|
20
20
|
|
|
21
|
-
export { MsgExec, MsgRevoke
|
|
21
|
+
export { MsgGrant, MsgExec, MsgRevoke };
|
|
22
|
+
|
|
23
|
+
type sendMsgGrantParams = {
|
|
24
|
+
value: MsgGrant,
|
|
25
|
+
fee?: StdFee,
|
|
26
|
+
memo?: string
|
|
27
|
+
};
|
|
22
28
|
|
|
23
29
|
type sendMsgExecParams = {
|
|
24
30
|
value: MsgExec,
|
|
@@ -32,13 +38,11 @@ type sendMsgRevokeParams = {
|
|
|
32
38
|
memo?: string
|
|
33
39
|
};
|
|
34
40
|
|
|
35
|
-
|
|
41
|
+
|
|
42
|
+
type msgGrantParams = {
|
|
36
43
|
value: MsgGrant,
|
|
37
|
-
fee?: StdFee,
|
|
38
|
-
memo?: string
|
|
39
44
|
};
|
|
40
45
|
|
|
41
|
-
|
|
42
46
|
type msgExecParams = {
|
|
43
47
|
value: MsgExec,
|
|
44
48
|
};
|
|
@@ -47,10 +51,6 @@ type msgRevokeParams = {
|
|
|
47
51
|
value: MsgRevoke,
|
|
48
52
|
};
|
|
49
53
|
|
|
50
|
-
type msgGrantParams = {
|
|
51
|
-
value: MsgGrant,
|
|
52
|
-
};
|
|
53
|
-
|
|
54
54
|
|
|
55
55
|
export const registry = new Registry(msgTypes);
|
|
56
56
|
|
|
@@ -81,6 +81,20 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
81
81
|
|
|
82
82
|
return {
|
|
83
83
|
|
|
84
|
+
async sendMsgGrant({ value, fee, memo }: sendMsgGrantParams): Promise<DeliverTxResponse> {
|
|
85
|
+
if (!signer) {
|
|
86
|
+
throw new Error('TxClient:sendMsgGrant: Unable to sign Tx. Signer is not present.')
|
|
87
|
+
}
|
|
88
|
+
try {
|
|
89
|
+
const { address } = (await signer.getAccounts())[0];
|
|
90
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
91
|
+
let msg = this.msgGrant({ value: MsgGrant.fromPartial(value) })
|
|
92
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
93
|
+
} catch (e: any) {
|
|
94
|
+
throw new Error('TxClient:sendMsgGrant: Could not broadcast Tx: '+ e.message)
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
|
|
84
98
|
async sendMsgExec({ value, fee, memo }: sendMsgExecParams): Promise<DeliverTxResponse> {
|
|
85
99
|
if (!signer) {
|
|
86
100
|
throw new Error('TxClient:sendMsgExec: Unable to sign Tx. Signer is not present.')
|
|
@@ -109,21 +123,15 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
109
123
|
}
|
|
110
124
|
},
|
|
111
125
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
try {
|
|
117
|
-
const { address } = (await signer.getAccounts())[0];
|
|
118
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
119
|
-
let msg = this.msgGrant({ value: MsgGrant.fromPartial(value) })
|
|
120
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
126
|
+
|
|
127
|
+
msgGrant({ value }: msgGrantParams): EncodeObject {
|
|
128
|
+
try {
|
|
129
|
+
return { typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value: MsgGrant.fromPartial( value ) }
|
|
121
130
|
} catch (e: any) {
|
|
122
|
-
throw new Error('TxClient:
|
|
131
|
+
throw new Error('TxClient:MsgGrant: Could not create message: ' + e.message)
|
|
123
132
|
}
|
|
124
133
|
},
|
|
125
134
|
|
|
126
|
-
|
|
127
135
|
msgExec({ value }: msgExecParams): EncodeObject {
|
|
128
136
|
try {
|
|
129
137
|
return { typeUrl: "/cosmos.authz.v1beta1.MsgExec", value: MsgExec.fromPartial( value ) }
|
|
@@ -140,14 +148,6 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
140
148
|
}
|
|
141
149
|
},
|
|
142
150
|
|
|
143
|
-
msgGrant({ value }: msgGrantParams): EncodeObject {
|
|
144
|
-
try {
|
|
145
|
-
return { typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value: MsgGrant.fromPartial( value ) }
|
|
146
|
-
} catch (e: any) {
|
|
147
|
-
throw new Error('TxClient:MsgGrant: Could not create message: ' + e.message)
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
153
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx";
|
|
1
2
|
import { MsgExec } from "./types/cosmos/authz/v1beta1/tx";
|
|
2
3
|
import { MsgRevoke } from "./types/cosmos/authz/v1beta1/tx";
|
|
3
|
-
import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx";
|
|
4
4
|
const msgTypes = [
|
|
5
|
+
["/cosmos.authz.v1beta1.MsgGrant", MsgGrant],
|
|
5
6
|
["/cosmos.authz.v1beta1.MsgExec", MsgExec],
|
|
6
7
|
["/cosmos.authz.v1beta1.MsgRevoke", MsgRevoke],
|
|
7
|
-
["/cosmos.authz.v1beta1.MsgGrant", MsgGrant],
|
|
8
8
|
];
|
|
9
9
|
export { msgTypes };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { GeneratedType } from "@cosmjs/proto-signing";
|
|
2
|
+
import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx";
|
|
2
3
|
import { MsgExec } from "./types/cosmos/authz/v1beta1/tx";
|
|
3
4
|
import { MsgRevoke } from "./types/cosmos/authz/v1beta1/tx";
|
|
4
|
-
import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx";
|
|
5
5
|
|
|
6
6
|
const msgTypes: Array<[string, GeneratedType]> = [
|
|
7
|
+
["/cosmos.authz.v1beta1.MsgGrant", MsgGrant],
|
|
7
8
|
["/cosmos.authz.v1beta1.MsgExec", MsgExec],
|
|
8
9
|
["/cosmos.authz.v1beta1.MsgRevoke", MsgRevoke],
|
|
9
|
-
["/cosmos.authz.v1beta1.MsgGrant", MsgGrant],
|
|
10
10
|
|
|
11
11
|
];
|
|
12
12
|
|
|
@@ -30,7 +30,7 @@ export interface MsgExecResponse {
|
|
|
30
30
|
export interface MsgExec {
|
|
31
31
|
grantee: string;
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Execute Msg.
|
|
34
34
|
* The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg))
|
|
35
35
|
* triple and validate it.
|
|
36
36
|
*/
|
|
@@ -3,8 +3,8 @@ import { SigningStargateClient } from "@cosmjs/stargate";
|
|
|
3
3
|
import { Registry } from "@cosmjs/proto-signing";
|
|
4
4
|
import { msgTypes } from './registry';
|
|
5
5
|
import { Api } from "./rest";
|
|
6
|
-
import { MsgSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
7
6
|
import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
7
|
+
import { MsgSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
8
8
|
import { SendAuthorization as typeSendAuthorization } from "./types";
|
|
9
9
|
import { Params as typeParams } from "./types";
|
|
10
10
|
import { SendEnabled as typeSendEnabled } from "./types";
|
|
@@ -15,7 +15,7 @@ import { DenomUnit as typeDenomUnit } from "./types";
|
|
|
15
15
|
import { Metadata as typeMetadata } from "./types";
|
|
16
16
|
import { Balance as typeBalance } from "./types";
|
|
17
17
|
import { DenomOwner as typeDenomOwner } from "./types";
|
|
18
|
-
export {
|
|
18
|
+
export { MsgMultiSend, MsgSend };
|
|
19
19
|
export const registry = new Registry(msgTypes);
|
|
20
20
|
function getStructure(template) {
|
|
21
21
|
const structure = { fields: [] };
|
|
@@ -31,48 +31,48 @@ const defaultFee = {
|
|
|
31
31
|
};
|
|
32
32
|
export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
|
|
33
33
|
return {
|
|
34
|
-
async
|
|
34
|
+
async sendMsgMultiSend({ value, fee, memo }) {
|
|
35
35
|
if (!signer) {
|
|
36
|
-
throw new Error('TxClient:
|
|
36
|
+
throw new Error('TxClient:sendMsgMultiSend: Unable to sign Tx. Signer is not present.');
|
|
37
37
|
}
|
|
38
38
|
try {
|
|
39
39
|
const { address } = (await signer.getAccounts())[0];
|
|
40
40
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
41
|
-
let msg = this.
|
|
41
|
+
let msg = this.msgMultiSend({ value: MsgMultiSend.fromPartial(value) });
|
|
42
42
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
43
43
|
}
|
|
44
44
|
catch (e) {
|
|
45
|
-
throw new Error('TxClient:
|
|
45
|
+
throw new Error('TxClient:sendMsgMultiSend: Could not broadcast Tx: ' + e.message);
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
-
async
|
|
48
|
+
async sendMsgSend({ value, fee, memo }) {
|
|
49
49
|
if (!signer) {
|
|
50
|
-
throw new Error('TxClient:
|
|
50
|
+
throw new Error('TxClient:sendMsgSend: Unable to sign Tx. Signer is not present.');
|
|
51
51
|
}
|
|
52
52
|
try {
|
|
53
53
|
const { address } = (await signer.getAccounts())[0];
|
|
54
54
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
55
|
-
let msg = this.
|
|
55
|
+
let msg = this.msgSend({ value: MsgSend.fromPartial(value) });
|
|
56
56
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
57
57
|
}
|
|
58
58
|
catch (e) {
|
|
59
|
-
throw new Error('TxClient:
|
|
59
|
+
throw new Error('TxClient:sendMsgSend: Could not broadcast Tx: ' + e.message);
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
|
-
|
|
62
|
+
msgMultiSend({ value }) {
|
|
63
63
|
try {
|
|
64
|
-
return { typeUrl: "/cosmos.bank.v1beta1.
|
|
64
|
+
return { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", value: MsgMultiSend.fromPartial(value) };
|
|
65
65
|
}
|
|
66
66
|
catch (e) {
|
|
67
|
-
throw new Error('TxClient:
|
|
67
|
+
throw new Error('TxClient:MsgMultiSend: Could not create message: ' + e.message);
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
|
-
|
|
70
|
+
msgSend({ value }) {
|
|
71
71
|
try {
|
|
72
|
-
return { typeUrl: "/cosmos.bank.v1beta1.
|
|
72
|
+
return { typeUrl: "/cosmos.bank.v1beta1.MsgSend", value: MsgSend.fromPartial(value) };
|
|
73
73
|
}
|
|
74
74
|
catch (e) {
|
|
75
|
-
throw new Error('TxClient:
|
|
75
|
+
throw new Error('TxClient:MsgSend: Could not create message: ' + e.message);
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
};
|
|
@@ -7,8 +7,8 @@ import { msgTypes } from './registry';
|
|
|
7
7
|
import { IgniteClient } from "../client"
|
|
8
8
|
import { MissingWalletError } from "../helpers"
|
|
9
9
|
import { Api } from "./rest";
|
|
10
|
-
import { MsgSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
11
10
|
import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
11
|
+
import { MsgSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
12
12
|
|
|
13
13
|
import { SendAuthorization as typeSendAuthorization} from "./types"
|
|
14
14
|
import { Params as typeParams} from "./types"
|
|
@@ -21,13 +21,7 @@ import { Metadata as typeMetadata} from "./types"
|
|
|
21
21
|
import { Balance as typeBalance} from "./types"
|
|
22
22
|
import { DenomOwner as typeDenomOwner} from "./types"
|
|
23
23
|
|
|
24
|
-
export {
|
|
25
|
-
|
|
26
|
-
type sendMsgSendParams = {
|
|
27
|
-
value: MsgSend,
|
|
28
|
-
fee?: StdFee,
|
|
29
|
-
memo?: string
|
|
30
|
-
};
|
|
24
|
+
export { MsgMultiSend, MsgSend };
|
|
31
25
|
|
|
32
26
|
type sendMsgMultiSendParams = {
|
|
33
27
|
value: MsgMultiSend,
|
|
@@ -35,15 +29,21 @@ type sendMsgMultiSendParams = {
|
|
|
35
29
|
memo?: string
|
|
36
30
|
};
|
|
37
31
|
|
|
38
|
-
|
|
39
|
-
type msgSendParams = {
|
|
32
|
+
type sendMsgSendParams = {
|
|
40
33
|
value: MsgSend,
|
|
34
|
+
fee?: StdFee,
|
|
35
|
+
memo?: string
|
|
41
36
|
};
|
|
42
37
|
|
|
38
|
+
|
|
43
39
|
type msgMultiSendParams = {
|
|
44
40
|
value: MsgMultiSend,
|
|
45
41
|
};
|
|
46
42
|
|
|
43
|
+
type msgSendParams = {
|
|
44
|
+
value: MsgSend,
|
|
45
|
+
};
|
|
46
|
+
|
|
47
47
|
|
|
48
48
|
export const registry = new Registry(msgTypes);
|
|
49
49
|
|
|
@@ -74,48 +74,48 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
74
74
|
|
|
75
75
|
return {
|
|
76
76
|
|
|
77
|
-
async
|
|
77
|
+
async sendMsgMultiSend({ value, fee, memo }: sendMsgMultiSendParams): Promise<DeliverTxResponse> {
|
|
78
78
|
if (!signer) {
|
|
79
|
-
throw new Error('TxClient:
|
|
79
|
+
throw new Error('TxClient:sendMsgMultiSend: Unable to sign Tx. Signer is not present.')
|
|
80
80
|
}
|
|
81
81
|
try {
|
|
82
82
|
const { address } = (await signer.getAccounts())[0];
|
|
83
83
|
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
84
|
-
let msg = this.
|
|
84
|
+
let msg = this.msgMultiSend({ value: MsgMultiSend.fromPartial(value) })
|
|
85
85
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
86
86
|
} catch (e: any) {
|
|
87
|
-
throw new Error('TxClient:
|
|
87
|
+
throw new Error('TxClient:sendMsgMultiSend: Could not broadcast Tx: '+ e.message)
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
90
|
|
|
91
|
-
async
|
|
91
|
+
async sendMsgSend({ value, fee, memo }: sendMsgSendParams): Promise<DeliverTxResponse> {
|
|
92
92
|
if (!signer) {
|
|
93
|
-
throw new Error('TxClient:
|
|
93
|
+
throw new Error('TxClient:sendMsgSend: Unable to sign Tx. Signer is not present.')
|
|
94
94
|
}
|
|
95
95
|
try {
|
|
96
96
|
const { address } = (await signer.getAccounts())[0];
|
|
97
97
|
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
98
|
-
let msg = this.
|
|
98
|
+
let msg = this.msgSend({ value: MsgSend.fromPartial(value) })
|
|
99
99
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
100
100
|
} catch (e: any) {
|
|
101
|
-
throw new Error('TxClient:
|
|
101
|
+
throw new Error('TxClient:sendMsgSend: Could not broadcast Tx: '+ e.message)
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
msgMultiSend({ value }: msgMultiSendParams): EncodeObject {
|
|
107
107
|
try {
|
|
108
|
-
return { typeUrl: "/cosmos.bank.v1beta1.
|
|
108
|
+
return { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", value: MsgMultiSend.fromPartial( value ) }
|
|
109
109
|
} catch (e: any) {
|
|
110
|
-
throw new Error('TxClient:
|
|
110
|
+
throw new Error('TxClient:MsgMultiSend: Could not create message: ' + e.message)
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
msgSend({ value }: msgSendParams): EncodeObject {
|
|
115
115
|
try {
|
|
116
|
-
return { typeUrl: "/cosmos.bank.v1beta1.
|
|
116
|
+
return { typeUrl: "/cosmos.bank.v1beta1.MsgSend", value: MsgSend.fromPartial( value ) }
|
|
117
117
|
} catch (e: any) {
|
|
118
|
-
throw new Error('TxClient:
|
|
118
|
+
throw new Error('TxClient:MsgSend: Could not create message: ' + e.message)
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MsgSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
2
1
|
import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
2
|
+
import { MsgSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
3
3
|
const msgTypes = [
|
|
4
|
-
["/cosmos.bank.v1beta1.MsgSend", MsgSend],
|
|
5
4
|
["/cosmos.bank.v1beta1.MsgMultiSend", MsgMultiSend],
|
|
5
|
+
["/cosmos.bank.v1beta1.MsgSend", MsgSend],
|
|
6
6
|
];
|
|
7
7
|
export { msgTypes };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { GeneratedType } from "@cosmjs/proto-signing";
|
|
2
|
-
import { MsgSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
3
2
|
import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
3
|
+
import { MsgSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
4
4
|
|
|
5
5
|
const msgTypes: Array<[string, GeneratedType]> = [
|
|
6
|
-
["/cosmos.bank.v1beta1.MsgSend", MsgSend],
|
|
7
6
|
["/cosmos.bank.v1beta1.MsgMultiSend", MsgMultiSend],
|
|
7
|
+
["/cosmos.bank.v1beta1.MsgSend", MsgSend],
|
|
8
8
|
|
|
9
9
|
];
|
|
10
10
|
|