decentralcardgame-cardchain-client-ts 0.0.31 → 0.0.33
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/lib/index.d.ts +78 -78
- package/lib/index.js +25 -25
- package/package.json +12 -1
- package/cardchain.cardchain/index.ts +0 -6
- package/cardchain.cardchain/module.ts +0 -1869
- package/cardchain.cardchain/registry.ts +0 -111
- package/cardchain.cardchain/rest.ts +0 -655
- package/cardchain.cardchain/types.ts +0 -63
- package/cardchain.featureflag/index.ts +0 -6
- package/cardchain.featureflag/module.ts +0 -165
- package/cardchain.featureflag/registry.ts +0 -11
- package/cardchain.featureflag/rest.ts +0 -256
- package/cardchain.featureflag/types.ts +0 -9
- package/client.ts +0 -164
- package/cosmos.auth.v1beta1/index.ts +0 -6
- package/cosmos.auth.v1beta1/module.ts +0 -136
- package/cosmos.auth.v1beta1/registry.ts +0 -9
- package/cosmos.auth.v1beta1/rest.ts +0 -403
- package/cosmos.auth.v1beta1/types.ts +0 -13
- package/cosmos.authz.v1beta1/index.ts +0 -6
- package/cosmos.authz.v1beta1/module.ts +0 -206
- package/cosmos.authz.v1beta1/registry.ts +0 -13
- package/cosmos.authz.v1beta1/rest.ts +0 -256
- package/cosmos.authz.v1beta1/types.ts +0 -17
- package/cosmos.bank.v1beta1/index.ts +0 -6
- package/cosmos.bank.v1beta1/module.ts +0 -247
- package/cosmos.bank.v1beta1/registry.ts +0 -15
- package/cosmos.bank.v1beta1/rest.ts +0 -466
- package/cosmos.bank.v1beta1/types.ts +0 -25
- package/cosmos.base.node.v1beta1/index.ts +0 -6
- package/cosmos.base.node.v1beta1/module.ts +0 -95
- package/cosmos.base.node.v1beta1/registry.ts +0 -7
- package/cosmos.base.node.v1beta1/rest.ts +0 -235
- package/cosmos.base.node.v1beta1/types.ts +0 -5
- package/cosmos.base.tendermint.v1beta1/index.ts +0 -6
- package/cosmos.base.tendermint.v1beta1/module.ts +0 -109
- package/cosmos.base.tendermint.v1beta1/registry.ts +0 -7
- package/cosmos.base.tendermint.v1beta1/rest.ts +0 -340
- package/cosmos.base.tendermint.v1beta1/types.ts +0 -19
- package/cosmos.circuit.v1/index.ts +0 -6
- package/cosmos.circuit.v1/module.ts +0 -198
- package/cosmos.circuit.v1/registry.ts +0 -13
- package/cosmos.circuit.v1/rest.ts +0 -256
- package/cosmos.circuit.v1/types.ts +0 -9
- package/cosmos.consensus.v1/index.ts +0 -6
- package/cosmos.consensus.v1/module.ts +0 -128
- package/cosmos.consensus.v1/registry.ts +0 -9
- package/cosmos.consensus.v1/rest.ts +0 -214
- package/cosmos.consensus.v1/types.ts +0 -5
- package/cosmos.crisis.v1beta1/index.ts +0 -6
- package/cosmos.crisis.v1beta1/module.ts +0 -161
- package/cosmos.crisis.v1beta1/registry.ts +0 -11
- package/cosmos.crisis.v1beta1/rest.ts +0 -193
- package/cosmos.crisis.v1beta1/types.ts +0 -5
- package/cosmos.distribution.v1beta1/index.ts +0 -6
- package/cosmos.distribution.v1beta1/module.ts +0 -364
- package/cosmos.distribution.v1beta1/registry.ts +0 -21
- package/cosmos.distribution.v1beta1/rest.ts +0 -403
- package/cosmos.distribution.v1beta1/types.ts +0 -43
- package/cosmos.evidence.v1beta1/index.ts +0 -6
- package/cosmos.evidence.v1beta1/module.ts +0 -130
- package/cosmos.evidence.v1beta1/registry.ts +0 -9
- package/cosmos.evidence.v1beta1/rest.ts +0 -235
- package/cosmos.evidence.v1beta1/types.ts +0 -7
- package/cosmos.feegrant.v1beta1/index.ts +0 -6
- package/cosmos.feegrant.v1beta1/module.ts +0 -202
- package/cosmos.feegrant.v1beta1/registry.ts +0 -13
- package/cosmos.feegrant.v1beta1/rest.ts +0 -256
- package/cosmos.feegrant.v1beta1/types.ts +0 -13
- package/cosmos.gov.v1/index.ts +0 -6
- package/cosmos.gov.v1/module.ts +0 -344
- package/cosmos.gov.v1/registry.ts +0 -21
- package/cosmos.gov.v1/rest.ts +0 -382
- package/cosmos.gov.v1/types.ts +0 -23
- package/cosmos.gov.v1beta1/index.ts +0 -6
- package/cosmos.gov.v1beta1/module.ts +0 -245
- package/cosmos.gov.v1beta1/registry.ts +0 -15
- package/cosmos.gov.v1beta1/rest.ts +0 -361
- package/cosmos.gov.v1beta1/types.ts +0 -23
- package/cosmos.group.v1/index.ts +0 -6
- package/cosmos.group.v1/module.ts +0 -599
- package/cosmos.group.v1/registry.ts +0 -35
- package/cosmos.group.v1/rest.ts +0 -487
- package/cosmos.group.v1/types.ts +0 -47
- package/cosmos.mint.v1beta1/index.ts +0 -6
- package/cosmos.mint.v1beta1/module.ts +0 -132
- package/cosmos.mint.v1beta1/registry.ts +0 -9
- package/cosmos.mint.v1beta1/rest.ts +0 -256
- package/cosmos.mint.v1beta1/types.ts +0 -9
- package/cosmos.nft.v1beta1/index.ts +0 -6
- package/cosmos.nft.v1beta1/module.ts +0 -140
- package/cosmos.nft.v1beta1/registry.ts +0 -9
- package/cosmos.nft.v1beta1/rest.ts +0 -340
- package/cosmos.nft.v1beta1/types.ts +0 -17
- package/cosmos.params.v1beta1/index.ts +0 -6
- package/cosmos.params.v1beta1/module.ts +0 -101
- package/cosmos.params.v1beta1/registry.ts +0 -7
- package/cosmos.params.v1beta1/rest.ts +0 -235
- package/cosmos.params.v1beta1/types.ts +0 -11
- package/cosmos.slashing.v1beta1/index.ts +0 -6
- package/cosmos.slashing.v1beta1/module.ts +0 -171
- package/cosmos.slashing.v1beta1/registry.ts +0 -11
- package/cosmos.slashing.v1beta1/rest.ts +0 -256
- package/cosmos.slashing.v1beta1/types.ts +0 -15
- package/cosmos.staking.v1beta1/index.ts +0 -6
- package/cosmos.staking.v1beta1/module.ts +0 -374
- package/cosmos.staking.v1beta1/registry.ts +0 -21
- package/cosmos.staking.v1beta1/rest.ts +0 -487
- package/cosmos.staking.v1beta1/types.ts +0 -53
- package/cosmos.tx.v1beta1/index.ts +0 -6
- package/cosmos.tx.v1beta1/module.ts +0 -121
- package/cosmos.tx.v1beta1/registry.ts +0 -7
- package/cosmos.tx.v1beta1/rest.ts +0 -382
- package/cosmos.tx.v1beta1/types.ts +0 -31
- package/cosmos.upgrade.v1beta1/index.ts +0 -6
- package/cosmos.upgrade.v1beta1/module.ts +0 -169
- package/cosmos.upgrade.v1beta1/registry.ts +0 -11
- package/cosmos.upgrade.v1beta1/rest.ts +0 -298
- package/cosmos.upgrade.v1beta1/types.ts +0 -13
- package/cosmos.vesting.v1beta1/index.ts +0 -6
- package/cosmos.vesting.v1beta1/module.ts +0 -206
- package/cosmos.vesting.v1beta1/registry.ts +0 -13
- package/cosmos.vesting.v1beta1/rest.ts +0 -193
- package/cosmos.vesting.v1beta1/types.ts +0 -17
- package/env.ts +0 -7
- package/helpers.ts +0 -32
- package/ibc.applications.fee.v1/index.ts +0 -6
- package/ibc.applications.fee.v1/module.ts +0 -247
- package/ibc.applications.fee.v1/registry.ts +0 -15
- package/ibc.applications.fee.v1/rest.ts +0 -403
- package/ibc.applications.fee.v1/types.ts +0 -25
- package/ibc.applications.interchain_accounts.controller.v1/index.ts +0 -6
- package/ibc.applications.interchain_accounts.controller.v1/module.ts +0 -196
- package/ibc.applications.interchain_accounts.controller.v1/registry.ts +0 -13
- package/ibc.applications.interchain_accounts.controller.v1/rest.ts +0 -235
- package/ibc.applications.interchain_accounts.controller.v1/types.ts +0 -7
- package/ibc.applications.interchain_accounts.host.v1/index.ts +0 -6
- package/ibc.applications.interchain_accounts.host.v1/module.ts +0 -165
- package/ibc.applications.interchain_accounts.host.v1/registry.ts +0 -11
- package/ibc.applications.interchain_accounts.host.v1/rest.ts +0 -214
- package/ibc.applications.interchain_accounts.host.v1/types.ts +0 -9
- package/ibc.applications.transfer.v1/index.ts +0 -6
- package/ibc.applications.transfer.v1/module.ts +0 -169
- package/ibc.applications.transfer.v1/registry.ts +0 -11
- package/ibc.applications.transfer.v1/rest.ts +0 -319
- package/ibc.applications.transfer.v1/types.ts +0 -13
- package/ibc.core.channel.v1/index.ts +0 -6
- package/ibc.core.channel.v1/module.ts +0 -748
- package/ibc.core.channel.v1/registry.ts +0 -45
- package/ibc.core.channel.v1/rest.ts +0 -550
- package/ibc.core.channel.v1/types.ts +0 -31
- package/ibc.core.client.v1/index.ts +0 -6
- package/ibc.core.client.v1/module.ts +0 -344
- package/ibc.core.client.v1/registry.ts +0 -21
- package/ibc.core.client.v1/rest.ts +0 -403
- package/ibc.core.client.v1/types.ts +0 -23
- package/ibc.core.connection.v1/index.ts +0 -6
- package/ibc.core.connection.v1/module.ts +0 -274
- package/ibc.core.connection.v1/registry.ts +0 -17
- package/ibc.core.connection.v1/rest.ts +0 -319
- package/ibc.core.connection.v1/types.ts +0 -19
- package/index.ts +0 -81
- package/modules.ts +0 -5
- package/tsconfig.json +0 -13
- package/types/amino/amino.ts +0 -9
- package/types/capability/v1/capability.ts +0 -263
- package/types/capability/v1/genesis.ts +0 -220
- package/types/cardchain/cardchain/card.ts +0 -712
- package/types/cardchain/cardchain/card_content.ts +0 -116
- package/types/cardchain/cardchain/card_with_image.ts +0 -134
- package/types/cardchain/cardchain/council.ts +0 -502
- package/types/cardchain/cardchain/encounter.ts +0 -307
- package/types/cardchain/cardchain/encounter_with_image.ts +0 -119
- package/types/cardchain/cardchain/genesis.ts +0 -403
- package/types/cardchain/cardchain/image.ts +0 -122
- package/types/cardchain/cardchain/match.ts +0 -453
- package/types/cardchain/cardchain/module/module.ts +0 -99
- package/types/cardchain/cardchain/params.ts +0 -544
- package/types/cardchain/cardchain/query.ts +0 -3786
- package/types/cardchain/cardchain/running_average.ts +0 -116
- package/types/cardchain/cardchain/sell_offer.ts +0 -224
- package/types/cardchain/cardchain/server.ts +0 -144
- package/types/cardchain/cardchain/set.ts +0 -537
- package/types/cardchain/cardchain/set_with_artwork.ts +0 -142
- package/types/cardchain/cardchain/tx.ts +0 -8053
- package/types/cardchain/cardchain/user.ts +0 -955
- package/types/cardchain/cardchain/voting.ts +0 -328
- package/types/cardchain/cardchain/voting_results.ts +0 -227
- package/types/cardchain/cardchain/zealy.ts +0 -116
- package/types/cardchain/featureflag/flag.ts +0 -133
- package/types/cardchain/featureflag/genesis.ts +0 -226
- package/types/cardchain/featureflag/module/module.ts +0 -99
- package/types/cardchain/featureflag/params.ts +0 -78
- package/types/cardchain/featureflag/query.ts +0 -445
- package/types/cardchain/featureflag/tx.ts +0 -373
- package/types/cosmos/app/runtime/v1alpha1/module.ts +0 -389
- package/types/cosmos/app/v1alpha1/config.ts +0 -346
- package/types/cosmos/app/v1alpha1/module.ts +0 -348
- package/types/cosmos/app/v1alpha1/query.ts +0 -175
- package/types/cosmos/auth/module/v1/module.ts +0 -229
- package/types/cosmos/auth/v1beta1/auth.ts +0 -531
- package/types/cosmos/auth/v1beta1/genesis.ts +0 -125
- package/types/cosmos/auth/v1beta1/query.ts +0 -1564
- package/types/cosmos/auth/v1beta1/tx.ts +0 -213
- package/types/cosmos/authz/module/v1/module.ts +0 -78
- package/types/cosmos/authz/v1beta1/authz.ts +0 -411
- package/types/cosmos/authz/v1beta1/event.ts +0 -241
- package/types/cosmos/authz/v1beta1/genesis.ts +0 -101
- package/types/cosmos/authz/v1beta1/query.ts +0 -643
- package/types/cosmos/authz/v1beta1/tx.ts +0 -574
- package/types/cosmos/autocli/v1/options.ts +0 -1049
- package/types/cosmos/autocli/v1/query.ts +0 -291
- package/types/cosmos/bank/module/v1/module.ts +0 -150
- package/types/cosmos/bank/v1beta1/authz.ts +0 -129
- package/types/cosmos/bank/v1beta1/bank.ts +0 -775
- package/types/cosmos/bank/v1beta1/genesis.ts +0 -277
- package/types/cosmos/bank/v1beta1/query.ts +0 -2424
- package/types/cosmos/bank/v1beta1/tx.ts +0 -697
- package/types/cosmos/base/abci/v1beta1/abci.ts +0 -1469
- package/types/cosmos/base/node/v1beta1/query.ts +0 -485
- package/types/cosmos/base/query/v1beta1/pagination.ts +0 -336
- package/types/cosmos/base/reflection/v1beta1/reflection.ts +0 -328
- package/types/cosmos/base/reflection/v2alpha1/reflection.ts +0 -2092
- package/types/cosmos/base/tendermint/v1beta1/query.ts +0 -2025
- package/types/cosmos/base/tendermint/v1beta1/types.ts +0 -548
- package/types/cosmos/base/v1beta1/coin.ts +0 -209
- package/types/cosmos/circuit/module/v1/module.ts +0 -99
- package/types/cosmos/circuit/v1/query.ts +0 -476
- package/types/cosmos/circuit/v1/tx.ts +0 -576
- package/types/cosmos/circuit/v1/types.ts +0 -362
- package/types/cosmos/consensus/module/v1/module.ts +0 -99
- package/types/cosmos/consensus/v1/query.ts +0 -181
- package/types/cosmos/consensus/v1/tx.ts +0 -271
- package/types/cosmos/crisis/module/v1/module.ts +0 -119
- package/types/cosmos/crisis/v1beta1/genesis.ts +0 -105
- package/types/cosmos/crisis/v1beta1/tx.ts +0 -367
- package/types/cosmos/crypto/ed25519/keys.ts +0 -195
- package/types/cosmos/crypto/hd/v1/hd.ts +0 -178
- package/types/cosmos/crypto/keyring/v1/record.ts +0 -440
- package/types/cosmos/crypto/multisig/keys.ts +0 -124
- package/types/cosmos/crypto/multisig/v1beta1/multisig.ts +0 -218
- package/types/cosmos/crypto/secp256k1/keys.ts +0 -192
- package/types/cosmos/crypto/secp256r1/keys.ts +0 -193
- package/types/cosmos/distribution/module/v1/module.ts +0 -118
- package/types/cosmos/distribution/v1beta1/distribution.ts +0 -1177
- package/types/cosmos/distribution/v1beta1/genesis.ts +0 -1028
- package/types/cosmos/distribution/v1beta1/query.ts +0 -1700
- package/types/cosmos/distribution/v1beta1/tx.ts +0 -1178
- package/types/cosmos/evidence/module/v1/module.ts +0 -78
- package/types/cosmos/evidence/v1beta1/evidence.ts +0 -194
- package/types/cosmos/evidence/v1beta1/genesis.ts +0 -98
- package/types/cosmos/evidence/v1beta1/query.ts +0 -414
- package/types/cosmos/evidence/v1beta1/tx.ts +0 -243
- package/types/cosmos/feegrant/module/v1/module.ts +0 -78
- package/types/cosmos/feegrant/v1beta1/feegrant.ts +0 -513
- package/types/cosmos/feegrant/v1beta1/genesis.ts +0 -101
- package/types/cosmos/feegrant/v1beta1/query.ts +0 -597
- package/types/cosmos/feegrant/v1beta1/tx.ts +0 -496
- package/types/cosmos/genutil/module/v1/module.ts +0 -78
- package/types/cosmos/genutil/v1beta1/genesis.ts +0 -122
- package/types/cosmos/gov/module/v1/module.ts +0 -133
- package/types/cosmos/gov/v1/genesis.ts +0 -313
- package/types/cosmos/gov/v1/gov.ts +0 -1712
- package/types/cosmos/gov/v1/query.ts +0 -1605
- package/types/cosmos/gov/v1/tx.ts +0 -1387
- package/types/cosmos/gov/v1beta1/genesis.ts +0 -241
- package/types/cosmos/gov/v1beta1/gov.ts +0 -1273
- package/types/cosmos/gov/v1beta1/query.ts +0 -1441
- package/types/cosmos/gov/v1beta1/tx.ts +0 -738
- package/types/cosmos/group/module/v1/module.ts +0 -141
- package/types/cosmos/group/v1/events.ts +0 -795
- package/types/cosmos/group/v1/genesis.ts +0 -265
- package/types/cosmos/group/v1/query.ts +0 -2441
- package/types/cosmos/group/v1/tx.ts +0 -2631
- package/types/cosmos/group/v1/types.ts +0 -1850
- package/types/cosmos/ics23/v1/proofs.ts +0 -1731
- package/types/cosmos/mint/module/v1/module.ts +0 -118
- package/types/cosmos/mint/v1beta1/genesis.ts +0 -126
- package/types/cosmos/mint/v1beta1/mint.ts +0 -293
- package/types/cosmos/mint/v1beta1/query.ts +0 -453
- package/types/cosmos/mint/v1beta1/tx.ts +0 -213
- package/types/cosmos/msg/textual/v1/textual.ts +0 -9
- package/types/cosmos/msg/v1/msg.ts +0 -9
- package/types/cosmos/nft/module/v1/module.ts +0 -78
- package/types/cosmos/nft/v1beta1/event.ts +0 -359
- package/types/cosmos/nft/v1beta1/genesis.ts +0 -204
- package/types/cosmos/nft/v1beta1/nft.ts +0 -348
- package/types/cosmos/nft/v1beta1/query.ts +0 -1173
- package/types/cosmos/nft/v1beta1/tx.ts +0 -228
- package/types/cosmos/orm/module/v1alpha1/module.ts +0 -82
- package/types/cosmos/orm/query/v1alpha1/query.ts +0 -933
- package/types/cosmos/orm/v1/orm.ts +0 -453
- package/types/cosmos/orm/v1alpha1/schema.ts +0 -321
- package/types/cosmos/params/module/v1/module.ts +0 -78
- package/types/cosmos/params/v1beta1/params.ts +0 -236
- package/types/cosmos/params/v1beta1/query.ts +0 -439
- package/types/cosmos/query/v1/query.ts +0 -9
- package/types/cosmos/reflection/v1/reflection.ts +0 -179
- package/types/cosmos/slashing/module/v1/module.ts +0 -99
- package/types/cosmos/slashing/v1beta1/genesis.ts +0 -424
- package/types/cosmos/slashing/v1beta1/query.ts +0 -487
- package/types/cosmos/slashing/v1beta1/slashing.ts +0 -422
- package/types/cosmos/slashing/v1beta1/tx.ts +0 -336
- package/types/cosmos/staking/module/v1/module.ts +0 -161
- package/types/cosmos/staking/v1beta1/authz.ts +0 -306
- package/types/cosmos/staking/v1beta1/genesis.ts +0 -377
- package/types/cosmos/staking/v1beta1/query.ts +0 -2540
- package/types/cosmos/staking/v1beta1/staking.ts +0 -2576
- package/types/cosmos/staking/v1beta1/tx.ts +0 -1433
- package/types/cosmos/store/internal/kv/v1beta1/kv.ts +0 -205
- package/types/cosmos/store/snapshots/v1/snapshot.ts +0 -746
- package/types/cosmos/store/streaming/abci/grpc.ts +0 -367
- package/types/cosmos/store/v1beta1/commit_info.ts +0 -370
- package/types/cosmos/store/v1beta1/listening.ts +0 -301
- package/types/cosmos/tx/config/v1/config.ts +0 -125
- package/types/cosmos/tx/signing/v1beta1/signing.ts +0 -630
- package/types/cosmos/tx/v1beta1/service.ts +0 -1889
- package/types/cosmos/tx/v1beta1/tx.ts +0 -1657
- package/types/cosmos/upgrade/module/v1/module.ts +0 -99
- package/types/cosmos/upgrade/v1beta1/query.ts +0 -819
- package/types/cosmos/upgrade/v1beta1/tx.ts +0 -340
- package/types/cosmos/upgrade/v1beta1/upgrade.ts +0 -525
- package/types/cosmos/vesting/module/v1/module.ts +0 -78
- package/types/cosmos/vesting/v1beta1/tx.ts +0 -640
- package/types/cosmos/vesting/v1beta1/vesting.ts +0 -624
- package/types/cosmos_proto/cosmos.ts +0 -307
- package/types/gogoproto/gogo.ts +0 -9
- package/types/google/api/annotations.ts +0 -9
- package/types/google/api/http.ts +0 -770
- package/types/google/protobuf/any.ts +0 -259
- package/types/google/protobuf/descriptor.ts +0 -6642
- package/types/google/protobuf/duration.ts +0 -200
- package/types/google/protobuf/timestamp.ts +0 -229
- package/types/ibc/applications/fee/v1/ack.ts +0 -166
- package/types/ibc/applications/fee/v1/fee.ts +0 -403
- package/types/ibc/applications/fee/v1/genesis.ts +0 -571
- package/types/ibc/applications/fee/v1/metadata.ts +0 -122
- package/types/ibc/applications/fee/v1/query.ts +0 -1757
- package/types/ibc/applications/fee/v1/tx.ts +0 -781
- package/types/ibc/applications/interchain_accounts/controller/v1/controller.ts +0 -104
- package/types/ibc/applications/interchain_accounts/controller/v1/query.ts +0 -333
- package/types/ibc/applications/interchain_accounts/controller/v1/tx.ts +0 -619
- package/types/ibc/applications/interchain_accounts/genesis/v1/genesis.ts +0 -590
- package/types/ibc/applications/interchain_accounts/host/v1/host.ts +0 -242
- package/types/ibc/applications/interchain_accounts/host/v1/query.ts +0 -175
- package/types/ibc/applications/interchain_accounts/host/v1/tx.ts +0 -416
- package/types/ibc/applications/interchain_accounts/v1/account.ts +0 -120
- package/types/ibc/applications/interchain_accounts/v1/metadata.ts +0 -199
- package/types/ibc/applications/interchain_accounts/v1/packet.ts +0 -264
- package/types/ibc/applications/transfer/v1/authz.ts +0 -254
- package/types/ibc/applications/transfer/v1/genesis.ts +0 -165
- package/types/ibc/applications/transfer/v1/query.ts +0 -934
- package/types/ibc/applications/transfer/v1/transfer.ts +0 -220
- package/types/ibc/applications/transfer/v1/tx.ts +0 -505
- package/types/ibc/applications/transfer/v2/packet.ts +0 -177
- package/types/ibc/core/channel/v1/channel.ts +0 -1358
- package/types/ibc/core/channel/v1/genesis.ts +0 -377
- package/types/ibc/core/channel/v1/query.ts +0 -3781
- package/types/ibc/core/channel/v1/tx.ts +0 -4424
- package/types/ibc/core/channel/v1/upgrade.ts +0 -348
- package/types/ibc/core/client/v1/client.ts +0 -753
- package/types/ibc/core/client/v1/genesis.ts +0 -423
- package/types/ibc/core/client/v1/query.ts +0 -1898
- package/types/ibc/core/client/v1/tx.ts +0 -1301
- package/types/ibc/core/commitment/v1/commitment.ts +0 -336
- package/types/ibc/core/connection/v1/connection.ts +0 -840
- package/types/ibc/core/connection/v1/genesis.ts +0 -172
- package/types/ibc/core/connection/v1/query.ts +0 -1243
- package/types/ibc/core/connection/v1/tx.ts +0 -1352
- package/types/ibc/core/types/v1/genesis.ts +0 -150
- package/types/ibc/lightclients/localhost/v2/localhost.ts +0 -102
- package/types/ibc/lightclients/solomachine/v2/solomachine.ts +0 -1765
- package/types/ibc/lightclients/solomachine/v3/solomachine.ts +0 -945
- package/types/ibc/lightclients/tendermint/v1/tendermint.ts +0 -853
- package/types/ibc/lightclients/wasm/v1/genesis.ts +0 -192
- package/types/ibc/lightclients/wasm/v1/query.ts +0 -377
- package/types/ibc/lightclients/wasm/v1/tx.ts +0 -550
- package/types/ibc/lightclients/wasm/v1/wasm.ts +0 -370
- package/types/tendermint/abci/types.ts +0 -6103
- package/types/tendermint/crypto/keys.ts +0 -142
- package/types/tendermint/crypto/proof.ts +0 -533
- package/types/tendermint/libs/bits/types.ts +0 -139
- package/types/tendermint/p2p/types.ts +0 -544
- package/types/tendermint/types/block.ts +0 -158
- package/types/tendermint/types/evidence.ts +0 -502
- package/types/tendermint/types/params.ts +0 -701
- package/types/tendermint/types/types.ts +0 -2133
- package/types/tendermint/types/validator.ts +0 -424
- package/types/tendermint/version/types.ts +0 -218
- package/types.d.ts +0 -21
|
@@ -1,599 +0,0 @@
|
|
|
1
|
-
// Generated by Ignite ignite.com/cli
|
|
2
|
-
|
|
3
|
-
import { SigningStargateClient, DeliverTxResponse, StdFee } from "@cosmjs/stargate";
|
|
4
|
-
import { EncodeObject, GeneratedType, OfflineSigner, Registry } from "@cosmjs/proto-signing";
|
|
5
|
-
import { msgTypes } from './registry';
|
|
6
|
-
import { IgniteClient } from "../client"
|
|
7
|
-
import { MissingWalletError } from "../helpers"
|
|
8
|
-
import { Api } from "./rest";
|
|
9
|
-
import { MsgCreateGroup } from "../types/cosmos/group/v1/tx";
|
|
10
|
-
import { MsgUpdateGroupMembers } from "../types/cosmos/group/v1/tx";
|
|
11
|
-
import { MsgUpdateGroupAdmin } from "../types/cosmos/group/v1/tx";
|
|
12
|
-
import { MsgUpdateGroupMetadata } from "../types/cosmos/group/v1/tx";
|
|
13
|
-
import { MsgCreateGroupPolicy } from "../types/cosmos/group/v1/tx";
|
|
14
|
-
import { MsgCreateGroupWithPolicy } from "../types/cosmos/group/v1/tx";
|
|
15
|
-
import { MsgUpdateGroupPolicyAdmin } from "../types/cosmos/group/v1/tx";
|
|
16
|
-
import { MsgUpdateGroupPolicyDecisionPolicy } from "../types/cosmos/group/v1/tx";
|
|
17
|
-
import { MsgUpdateGroupPolicyMetadata } from "../types/cosmos/group/v1/tx";
|
|
18
|
-
import { MsgSubmitProposal } from "../types/cosmos/group/v1/tx";
|
|
19
|
-
import { MsgWithdrawProposal } from "../types/cosmos/group/v1/tx";
|
|
20
|
-
import { MsgVote } from "../types/cosmos/group/v1/tx";
|
|
21
|
-
import { MsgExec } from "../types/cosmos/group/v1/tx";
|
|
22
|
-
import { MsgLeaveGroup } from "../types/cosmos/group/v1/tx";
|
|
23
|
-
|
|
24
|
-
import { EventCreateGroup as typeEventCreateGroup} from "./types"
|
|
25
|
-
import { EventUpdateGroup as typeEventUpdateGroup} from "./types"
|
|
26
|
-
import { EventCreateGroupPolicy as typeEventCreateGroupPolicy} from "./types"
|
|
27
|
-
import { EventUpdateGroupPolicy as typeEventUpdateGroupPolicy} from "./types"
|
|
28
|
-
import { EventSubmitProposal as typeEventSubmitProposal} from "./types"
|
|
29
|
-
import { EventWithdrawProposal as typeEventWithdrawProposal} from "./types"
|
|
30
|
-
import { EventVote as typeEventVote} from "./types"
|
|
31
|
-
import { EventExec as typeEventExec} from "./types"
|
|
32
|
-
import { EventLeaveGroup as typeEventLeaveGroup} from "./types"
|
|
33
|
-
import { EventProposalPruned as typeEventProposalPruned} from "./types"
|
|
34
|
-
import { Member as typeMember} from "./types"
|
|
35
|
-
import { MemberRequest as typeMemberRequest} from "./types"
|
|
36
|
-
import { ThresholdDecisionPolicy as typeThresholdDecisionPolicy} from "./types"
|
|
37
|
-
import { PercentageDecisionPolicy as typePercentageDecisionPolicy} from "./types"
|
|
38
|
-
import { DecisionPolicyWindows as typeDecisionPolicyWindows} from "./types"
|
|
39
|
-
import { GroupInfo as typeGroupInfo} from "./types"
|
|
40
|
-
import { GroupMember as typeGroupMember} from "./types"
|
|
41
|
-
import { GroupPolicyInfo as typeGroupPolicyInfo} from "./types"
|
|
42
|
-
import { Proposal as typeProposal} from "./types"
|
|
43
|
-
import { TallyResult as typeTallyResult} from "./types"
|
|
44
|
-
import { Vote as typeVote} from "./types"
|
|
45
|
-
|
|
46
|
-
export { MsgCreateGroup, MsgUpdateGroupMembers, MsgUpdateGroupAdmin, MsgUpdateGroupMetadata, MsgCreateGroupPolicy, MsgCreateGroupWithPolicy, MsgUpdateGroupPolicyAdmin, MsgUpdateGroupPolicyDecisionPolicy, MsgUpdateGroupPolicyMetadata, MsgSubmitProposal, MsgWithdrawProposal, MsgVote, MsgExec, MsgLeaveGroup };
|
|
47
|
-
|
|
48
|
-
type sendMsgCreateGroupParams = {
|
|
49
|
-
value: MsgCreateGroup,
|
|
50
|
-
fee?: StdFee,
|
|
51
|
-
memo?: string
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
type sendMsgUpdateGroupMembersParams = {
|
|
55
|
-
value: MsgUpdateGroupMembers,
|
|
56
|
-
fee?: StdFee,
|
|
57
|
-
memo?: string
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
type sendMsgUpdateGroupAdminParams = {
|
|
61
|
-
value: MsgUpdateGroupAdmin,
|
|
62
|
-
fee?: StdFee,
|
|
63
|
-
memo?: string
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
type sendMsgUpdateGroupMetadataParams = {
|
|
67
|
-
value: MsgUpdateGroupMetadata,
|
|
68
|
-
fee?: StdFee,
|
|
69
|
-
memo?: string
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
type sendMsgCreateGroupPolicyParams = {
|
|
73
|
-
value: MsgCreateGroupPolicy,
|
|
74
|
-
fee?: StdFee,
|
|
75
|
-
memo?: string
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
type sendMsgCreateGroupWithPolicyParams = {
|
|
79
|
-
value: MsgCreateGroupWithPolicy,
|
|
80
|
-
fee?: StdFee,
|
|
81
|
-
memo?: string
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
type sendMsgUpdateGroupPolicyAdminParams = {
|
|
85
|
-
value: MsgUpdateGroupPolicyAdmin,
|
|
86
|
-
fee?: StdFee,
|
|
87
|
-
memo?: string
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
type sendMsgUpdateGroupPolicyDecisionPolicyParams = {
|
|
91
|
-
value: MsgUpdateGroupPolicyDecisionPolicy,
|
|
92
|
-
fee?: StdFee,
|
|
93
|
-
memo?: string
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
type sendMsgUpdateGroupPolicyMetadataParams = {
|
|
97
|
-
value: MsgUpdateGroupPolicyMetadata,
|
|
98
|
-
fee?: StdFee,
|
|
99
|
-
memo?: string
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
type sendMsgSubmitProposalParams = {
|
|
103
|
-
value: MsgSubmitProposal,
|
|
104
|
-
fee?: StdFee,
|
|
105
|
-
memo?: string
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
type sendMsgWithdrawProposalParams = {
|
|
109
|
-
value: MsgWithdrawProposal,
|
|
110
|
-
fee?: StdFee,
|
|
111
|
-
memo?: string
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
type sendMsgVoteParams = {
|
|
115
|
-
value: MsgVote,
|
|
116
|
-
fee?: StdFee,
|
|
117
|
-
memo?: string
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
type sendMsgExecParams = {
|
|
121
|
-
value: MsgExec,
|
|
122
|
-
fee?: StdFee,
|
|
123
|
-
memo?: string
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
type sendMsgLeaveGroupParams = {
|
|
127
|
-
value: MsgLeaveGroup,
|
|
128
|
-
fee?: StdFee,
|
|
129
|
-
memo?: string
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
type msgCreateGroupParams = {
|
|
134
|
-
value: MsgCreateGroup,
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
type msgUpdateGroupMembersParams = {
|
|
138
|
-
value: MsgUpdateGroupMembers,
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
type msgUpdateGroupAdminParams = {
|
|
142
|
-
value: MsgUpdateGroupAdmin,
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
type msgUpdateGroupMetadataParams = {
|
|
146
|
-
value: MsgUpdateGroupMetadata,
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
type msgCreateGroupPolicyParams = {
|
|
150
|
-
value: MsgCreateGroupPolicy,
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
type msgCreateGroupWithPolicyParams = {
|
|
154
|
-
value: MsgCreateGroupWithPolicy,
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
type msgUpdateGroupPolicyAdminParams = {
|
|
158
|
-
value: MsgUpdateGroupPolicyAdmin,
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
type msgUpdateGroupPolicyDecisionPolicyParams = {
|
|
162
|
-
value: MsgUpdateGroupPolicyDecisionPolicy,
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
type msgUpdateGroupPolicyMetadataParams = {
|
|
166
|
-
value: MsgUpdateGroupPolicyMetadata,
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
type msgSubmitProposalParams = {
|
|
170
|
-
value: MsgSubmitProposal,
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
type msgWithdrawProposalParams = {
|
|
174
|
-
value: MsgWithdrawProposal,
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
type msgVoteParams = {
|
|
178
|
-
value: MsgVote,
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
type msgExecParams = {
|
|
182
|
-
value: MsgExec,
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
type msgLeaveGroupParams = {
|
|
186
|
-
value: MsgLeaveGroup,
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
export const registry = new Registry(msgTypes);
|
|
191
|
-
|
|
192
|
-
type Field = {
|
|
193
|
-
name: string;
|
|
194
|
-
type: unknown;
|
|
195
|
-
}
|
|
196
|
-
function getStructure(template) {
|
|
197
|
-
const structure: {fields: Field[]} = { fields: [] }
|
|
198
|
-
for (let [key, value] of Object.entries(template)) {
|
|
199
|
-
let field = { name: key, type: typeof value }
|
|
200
|
-
structure.fields.push(field)
|
|
201
|
-
}
|
|
202
|
-
return structure
|
|
203
|
-
}
|
|
204
|
-
const defaultFee = {
|
|
205
|
-
amount: [],
|
|
206
|
-
gas: "200000",
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
interface TxClientOptions {
|
|
210
|
-
addr: string
|
|
211
|
-
prefix: string
|
|
212
|
-
signer?: OfflineSigner
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
|
|
216
|
-
|
|
217
|
-
return {
|
|
218
|
-
|
|
219
|
-
async sendMsgCreateGroup({ value, fee, memo }: sendMsgCreateGroupParams): Promise<DeliverTxResponse> {
|
|
220
|
-
if (!signer) {
|
|
221
|
-
throw new Error('TxClient:sendMsgCreateGroup: Unable to sign Tx. Signer is not present.')
|
|
222
|
-
}
|
|
223
|
-
try {
|
|
224
|
-
const { address } = (await signer.getAccounts())[0];
|
|
225
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry});
|
|
226
|
-
let msg = this.msgCreateGroup({ value: MsgCreateGroup.fromPartial(value) })
|
|
227
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
228
|
-
} catch (e: any) {
|
|
229
|
-
throw new Error('TxClient:sendMsgCreateGroup: Could not broadcast Tx: '+ e.message)
|
|
230
|
-
}
|
|
231
|
-
},
|
|
232
|
-
|
|
233
|
-
async sendMsgUpdateGroupMembers({ value, fee, memo }: sendMsgUpdateGroupMembersParams): Promise<DeliverTxResponse> {
|
|
234
|
-
if (!signer) {
|
|
235
|
-
throw new Error('TxClient:sendMsgUpdateGroupMembers: Unable to sign Tx. Signer is not present.')
|
|
236
|
-
}
|
|
237
|
-
try {
|
|
238
|
-
const { address } = (await signer.getAccounts())[0];
|
|
239
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry});
|
|
240
|
-
let msg = this.msgUpdateGroupMembers({ value: MsgUpdateGroupMembers.fromPartial(value) })
|
|
241
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
242
|
-
} catch (e: any) {
|
|
243
|
-
throw new Error('TxClient:sendMsgUpdateGroupMembers: Could not broadcast Tx: '+ e.message)
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
|
|
247
|
-
async sendMsgUpdateGroupAdmin({ value, fee, memo }: sendMsgUpdateGroupAdminParams): Promise<DeliverTxResponse> {
|
|
248
|
-
if (!signer) {
|
|
249
|
-
throw new Error('TxClient:sendMsgUpdateGroupAdmin: Unable to sign Tx. Signer is not present.')
|
|
250
|
-
}
|
|
251
|
-
try {
|
|
252
|
-
const { address } = (await signer.getAccounts())[0];
|
|
253
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry});
|
|
254
|
-
let msg = this.msgUpdateGroupAdmin({ value: MsgUpdateGroupAdmin.fromPartial(value) })
|
|
255
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
256
|
-
} catch (e: any) {
|
|
257
|
-
throw new Error('TxClient:sendMsgUpdateGroupAdmin: Could not broadcast Tx: '+ e.message)
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
|
|
261
|
-
async sendMsgUpdateGroupMetadata({ value, fee, memo }: sendMsgUpdateGroupMetadataParams): Promise<DeliverTxResponse> {
|
|
262
|
-
if (!signer) {
|
|
263
|
-
throw new Error('TxClient:sendMsgUpdateGroupMetadata: Unable to sign Tx. Signer is not present.')
|
|
264
|
-
}
|
|
265
|
-
try {
|
|
266
|
-
const { address } = (await signer.getAccounts())[0];
|
|
267
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry});
|
|
268
|
-
let msg = this.msgUpdateGroupMetadata({ value: MsgUpdateGroupMetadata.fromPartial(value) })
|
|
269
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
270
|
-
} catch (e: any) {
|
|
271
|
-
throw new Error('TxClient:sendMsgUpdateGroupMetadata: Could not broadcast Tx: '+ e.message)
|
|
272
|
-
}
|
|
273
|
-
},
|
|
274
|
-
|
|
275
|
-
async sendMsgCreateGroupPolicy({ value, fee, memo }: sendMsgCreateGroupPolicyParams): Promise<DeliverTxResponse> {
|
|
276
|
-
if (!signer) {
|
|
277
|
-
throw new Error('TxClient:sendMsgCreateGroupPolicy: Unable to sign Tx. Signer is not present.')
|
|
278
|
-
}
|
|
279
|
-
try {
|
|
280
|
-
const { address } = (await signer.getAccounts())[0];
|
|
281
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry});
|
|
282
|
-
let msg = this.msgCreateGroupPolicy({ value: MsgCreateGroupPolicy.fromPartial(value) })
|
|
283
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
284
|
-
} catch (e: any) {
|
|
285
|
-
throw new Error('TxClient:sendMsgCreateGroupPolicy: Could not broadcast Tx: '+ e.message)
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
|
|
289
|
-
async sendMsgCreateGroupWithPolicy({ value, fee, memo }: sendMsgCreateGroupWithPolicyParams): Promise<DeliverTxResponse> {
|
|
290
|
-
if (!signer) {
|
|
291
|
-
throw new Error('TxClient:sendMsgCreateGroupWithPolicy: Unable to sign Tx. Signer is not present.')
|
|
292
|
-
}
|
|
293
|
-
try {
|
|
294
|
-
const { address } = (await signer.getAccounts())[0];
|
|
295
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry});
|
|
296
|
-
let msg = this.msgCreateGroupWithPolicy({ value: MsgCreateGroupWithPolicy.fromPartial(value) })
|
|
297
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
298
|
-
} catch (e: any) {
|
|
299
|
-
throw new Error('TxClient:sendMsgCreateGroupWithPolicy: Could not broadcast Tx: '+ e.message)
|
|
300
|
-
}
|
|
301
|
-
},
|
|
302
|
-
|
|
303
|
-
async sendMsgUpdateGroupPolicyAdmin({ value, fee, memo }: sendMsgUpdateGroupPolicyAdminParams): Promise<DeliverTxResponse> {
|
|
304
|
-
if (!signer) {
|
|
305
|
-
throw new Error('TxClient:sendMsgUpdateGroupPolicyAdmin: Unable to sign Tx. Signer is not present.')
|
|
306
|
-
}
|
|
307
|
-
try {
|
|
308
|
-
const { address } = (await signer.getAccounts())[0];
|
|
309
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry});
|
|
310
|
-
let msg = this.msgUpdateGroupPolicyAdmin({ value: MsgUpdateGroupPolicyAdmin.fromPartial(value) })
|
|
311
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
312
|
-
} catch (e: any) {
|
|
313
|
-
throw new Error('TxClient:sendMsgUpdateGroupPolicyAdmin: Could not broadcast Tx: '+ e.message)
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
|
-
|
|
317
|
-
async sendMsgUpdateGroupPolicyDecisionPolicy({ value, fee, memo }: sendMsgUpdateGroupPolicyDecisionPolicyParams): Promise<DeliverTxResponse> {
|
|
318
|
-
if (!signer) {
|
|
319
|
-
throw new Error('TxClient:sendMsgUpdateGroupPolicyDecisionPolicy: Unable to sign Tx. Signer is not present.')
|
|
320
|
-
}
|
|
321
|
-
try {
|
|
322
|
-
const { address } = (await signer.getAccounts())[0];
|
|
323
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry});
|
|
324
|
-
let msg = this.msgUpdateGroupPolicyDecisionPolicy({ value: MsgUpdateGroupPolicyDecisionPolicy.fromPartial(value) })
|
|
325
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
326
|
-
} catch (e: any) {
|
|
327
|
-
throw new Error('TxClient:sendMsgUpdateGroupPolicyDecisionPolicy: Could not broadcast Tx: '+ e.message)
|
|
328
|
-
}
|
|
329
|
-
},
|
|
330
|
-
|
|
331
|
-
async sendMsgUpdateGroupPolicyMetadata({ value, fee, memo }: sendMsgUpdateGroupPolicyMetadataParams): Promise<DeliverTxResponse> {
|
|
332
|
-
if (!signer) {
|
|
333
|
-
throw new Error('TxClient:sendMsgUpdateGroupPolicyMetadata: Unable to sign Tx. Signer is not present.')
|
|
334
|
-
}
|
|
335
|
-
try {
|
|
336
|
-
const { address } = (await signer.getAccounts())[0];
|
|
337
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry});
|
|
338
|
-
let msg = this.msgUpdateGroupPolicyMetadata({ value: MsgUpdateGroupPolicyMetadata.fromPartial(value) })
|
|
339
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
340
|
-
} catch (e: any) {
|
|
341
|
-
throw new Error('TxClient:sendMsgUpdateGroupPolicyMetadata: Could not broadcast Tx: '+ e.message)
|
|
342
|
-
}
|
|
343
|
-
},
|
|
344
|
-
|
|
345
|
-
async sendMsgSubmitProposal({ value, fee, memo }: sendMsgSubmitProposalParams): Promise<DeliverTxResponse> {
|
|
346
|
-
if (!signer) {
|
|
347
|
-
throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.')
|
|
348
|
-
}
|
|
349
|
-
try {
|
|
350
|
-
const { address } = (await signer.getAccounts())[0];
|
|
351
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry});
|
|
352
|
-
let msg = this.msgSubmitProposal({ value: MsgSubmitProposal.fromPartial(value) })
|
|
353
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
354
|
-
} catch (e: any) {
|
|
355
|
-
throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: '+ e.message)
|
|
356
|
-
}
|
|
357
|
-
},
|
|
358
|
-
|
|
359
|
-
async sendMsgWithdrawProposal({ value, fee, memo }: sendMsgWithdrawProposalParams): Promise<DeliverTxResponse> {
|
|
360
|
-
if (!signer) {
|
|
361
|
-
throw new Error('TxClient:sendMsgWithdrawProposal: Unable to sign Tx. Signer is not present.')
|
|
362
|
-
}
|
|
363
|
-
try {
|
|
364
|
-
const { address } = (await signer.getAccounts())[0];
|
|
365
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry});
|
|
366
|
-
let msg = this.msgWithdrawProposal({ value: MsgWithdrawProposal.fromPartial(value) })
|
|
367
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
368
|
-
} catch (e: any) {
|
|
369
|
-
throw new Error('TxClient:sendMsgWithdrawProposal: Could not broadcast Tx: '+ e.message)
|
|
370
|
-
}
|
|
371
|
-
},
|
|
372
|
-
|
|
373
|
-
async sendMsgVote({ value, fee, memo }: sendMsgVoteParams): Promise<DeliverTxResponse> {
|
|
374
|
-
if (!signer) {
|
|
375
|
-
throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.')
|
|
376
|
-
}
|
|
377
|
-
try {
|
|
378
|
-
const { address } = (await signer.getAccounts())[0];
|
|
379
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry});
|
|
380
|
-
let msg = this.msgVote({ value: MsgVote.fromPartial(value) })
|
|
381
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
382
|
-
} catch (e: any) {
|
|
383
|
-
throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: '+ e.message)
|
|
384
|
-
}
|
|
385
|
-
},
|
|
386
|
-
|
|
387
|
-
async sendMsgExec({ value, fee, memo }: sendMsgExecParams): Promise<DeliverTxResponse> {
|
|
388
|
-
if (!signer) {
|
|
389
|
-
throw new Error('TxClient:sendMsgExec: Unable to sign Tx. Signer is not present.')
|
|
390
|
-
}
|
|
391
|
-
try {
|
|
392
|
-
const { address } = (await signer.getAccounts())[0];
|
|
393
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry});
|
|
394
|
-
let msg = this.msgExec({ value: MsgExec.fromPartial(value) })
|
|
395
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
396
|
-
} catch (e: any) {
|
|
397
|
-
throw new Error('TxClient:sendMsgExec: Could not broadcast Tx: '+ e.message)
|
|
398
|
-
}
|
|
399
|
-
},
|
|
400
|
-
|
|
401
|
-
async sendMsgLeaveGroup({ value, fee, memo }: sendMsgLeaveGroupParams): Promise<DeliverTxResponse> {
|
|
402
|
-
if (!signer) {
|
|
403
|
-
throw new Error('TxClient:sendMsgLeaveGroup: Unable to sign Tx. Signer is not present.')
|
|
404
|
-
}
|
|
405
|
-
try {
|
|
406
|
-
const { address } = (await signer.getAccounts())[0];
|
|
407
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry});
|
|
408
|
-
let msg = this.msgLeaveGroup({ value: MsgLeaveGroup.fromPartial(value) })
|
|
409
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
410
|
-
} catch (e: any) {
|
|
411
|
-
throw new Error('TxClient:sendMsgLeaveGroup: Could not broadcast Tx: '+ e.message)
|
|
412
|
-
}
|
|
413
|
-
},
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
msgCreateGroup({ value }: msgCreateGroupParams): EncodeObject {
|
|
417
|
-
try {
|
|
418
|
-
return { typeUrl: "/cosmos.group.v1.MsgCreateGroup", value: MsgCreateGroup.fromPartial( value ) }
|
|
419
|
-
} catch (e: any) {
|
|
420
|
-
throw new Error('TxClient:MsgCreateGroup: Could not create message: ' + e.message)
|
|
421
|
-
}
|
|
422
|
-
},
|
|
423
|
-
|
|
424
|
-
msgUpdateGroupMembers({ value }: msgUpdateGroupMembersParams): EncodeObject {
|
|
425
|
-
try {
|
|
426
|
-
return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers", value: MsgUpdateGroupMembers.fromPartial( value ) }
|
|
427
|
-
} catch (e: any) {
|
|
428
|
-
throw new Error('TxClient:MsgUpdateGroupMembers: Could not create message: ' + e.message)
|
|
429
|
-
}
|
|
430
|
-
},
|
|
431
|
-
|
|
432
|
-
msgUpdateGroupAdmin({ value }: msgUpdateGroupAdminParams): EncodeObject {
|
|
433
|
-
try {
|
|
434
|
-
return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdmin", value: MsgUpdateGroupAdmin.fromPartial( value ) }
|
|
435
|
-
} catch (e: any) {
|
|
436
|
-
throw new Error('TxClient:MsgUpdateGroupAdmin: Could not create message: ' + e.message)
|
|
437
|
-
}
|
|
438
|
-
},
|
|
439
|
-
|
|
440
|
-
msgUpdateGroupMetadata({ value }: msgUpdateGroupMetadataParams): EncodeObject {
|
|
441
|
-
try {
|
|
442
|
-
return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata", value: MsgUpdateGroupMetadata.fromPartial( value ) }
|
|
443
|
-
} catch (e: any) {
|
|
444
|
-
throw new Error('TxClient:MsgUpdateGroupMetadata: Could not create message: ' + e.message)
|
|
445
|
-
}
|
|
446
|
-
},
|
|
447
|
-
|
|
448
|
-
msgCreateGroupPolicy({ value }: msgCreateGroupPolicyParams): EncodeObject {
|
|
449
|
-
try {
|
|
450
|
-
return { typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy", value: MsgCreateGroupPolicy.fromPartial( value ) }
|
|
451
|
-
} catch (e: any) {
|
|
452
|
-
throw new Error('TxClient:MsgCreateGroupPolicy: Could not create message: ' + e.message)
|
|
453
|
-
}
|
|
454
|
-
},
|
|
455
|
-
|
|
456
|
-
msgCreateGroupWithPolicy({ value }: msgCreateGroupWithPolicyParams): EncodeObject {
|
|
457
|
-
try {
|
|
458
|
-
return { typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicy", value: MsgCreateGroupWithPolicy.fromPartial( value ) }
|
|
459
|
-
} catch (e: any) {
|
|
460
|
-
throw new Error('TxClient:MsgCreateGroupWithPolicy: Could not create message: ' + e.message)
|
|
461
|
-
}
|
|
462
|
-
},
|
|
463
|
-
|
|
464
|
-
msgUpdateGroupPolicyAdmin({ value }: msgUpdateGroupPolicyAdminParams): EncodeObject {
|
|
465
|
-
try {
|
|
466
|
-
return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", value: MsgUpdateGroupPolicyAdmin.fromPartial( value ) }
|
|
467
|
-
} catch (e: any) {
|
|
468
|
-
throw new Error('TxClient:MsgUpdateGroupPolicyAdmin: Could not create message: ' + e.message)
|
|
469
|
-
}
|
|
470
|
-
},
|
|
471
|
-
|
|
472
|
-
msgUpdateGroupPolicyDecisionPolicy({ value }: msgUpdateGroupPolicyDecisionPolicyParams): EncodeObject {
|
|
473
|
-
try {
|
|
474
|
-
return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", value: MsgUpdateGroupPolicyDecisionPolicy.fromPartial( value ) }
|
|
475
|
-
} catch (e: any) {
|
|
476
|
-
throw new Error('TxClient:MsgUpdateGroupPolicyDecisionPolicy: Could not create message: ' + e.message)
|
|
477
|
-
}
|
|
478
|
-
},
|
|
479
|
-
|
|
480
|
-
msgUpdateGroupPolicyMetadata({ value }: msgUpdateGroupPolicyMetadataParams): EncodeObject {
|
|
481
|
-
try {
|
|
482
|
-
return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", value: MsgUpdateGroupPolicyMetadata.fromPartial( value ) }
|
|
483
|
-
} catch (e: any) {
|
|
484
|
-
throw new Error('TxClient:MsgUpdateGroupPolicyMetadata: Could not create message: ' + e.message)
|
|
485
|
-
}
|
|
486
|
-
},
|
|
487
|
-
|
|
488
|
-
msgSubmitProposal({ value }: msgSubmitProposalParams): EncodeObject {
|
|
489
|
-
try {
|
|
490
|
-
return { typeUrl: "/cosmos.group.v1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial( value ) }
|
|
491
|
-
} catch (e: any) {
|
|
492
|
-
throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message)
|
|
493
|
-
}
|
|
494
|
-
},
|
|
495
|
-
|
|
496
|
-
msgWithdrawProposal({ value }: msgWithdrawProposalParams): EncodeObject {
|
|
497
|
-
try {
|
|
498
|
-
return { typeUrl: "/cosmos.group.v1.MsgWithdrawProposal", value: MsgWithdrawProposal.fromPartial( value ) }
|
|
499
|
-
} catch (e: any) {
|
|
500
|
-
throw new Error('TxClient:MsgWithdrawProposal: Could not create message: ' + e.message)
|
|
501
|
-
}
|
|
502
|
-
},
|
|
503
|
-
|
|
504
|
-
msgVote({ value }: msgVoteParams): EncodeObject {
|
|
505
|
-
try {
|
|
506
|
-
return { typeUrl: "/cosmos.group.v1.MsgVote", value: MsgVote.fromPartial( value ) }
|
|
507
|
-
} catch (e: any) {
|
|
508
|
-
throw new Error('TxClient:MsgVote: Could not create message: ' + e.message)
|
|
509
|
-
}
|
|
510
|
-
},
|
|
511
|
-
|
|
512
|
-
msgExec({ value }: msgExecParams): EncodeObject {
|
|
513
|
-
try {
|
|
514
|
-
return { typeUrl: "/cosmos.group.v1.MsgExec", value: MsgExec.fromPartial( value ) }
|
|
515
|
-
} catch (e: any) {
|
|
516
|
-
throw new Error('TxClient:MsgExec: Could not create message: ' + e.message)
|
|
517
|
-
}
|
|
518
|
-
},
|
|
519
|
-
|
|
520
|
-
msgLeaveGroup({ value }: msgLeaveGroupParams): EncodeObject {
|
|
521
|
-
try {
|
|
522
|
-
return { typeUrl: "/cosmos.group.v1.MsgLeaveGroup", value: MsgLeaveGroup.fromPartial( value ) }
|
|
523
|
-
} catch (e: any) {
|
|
524
|
-
throw new Error('TxClient:MsgLeaveGroup: Could not create message: ' + e.message)
|
|
525
|
-
}
|
|
526
|
-
},
|
|
527
|
-
|
|
528
|
-
}
|
|
529
|
-
};
|
|
530
|
-
|
|
531
|
-
interface QueryClientOptions {
|
|
532
|
-
addr: string
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
export const queryClient = ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => {
|
|
536
|
-
return new Api({ baseURL: addr });
|
|
537
|
-
};
|
|
538
|
-
|
|
539
|
-
class SDKModule {
|
|
540
|
-
public query: ReturnType<typeof queryClient>;
|
|
541
|
-
public tx: ReturnType<typeof txClient>;
|
|
542
|
-
public structure: Record<string,unknown>;
|
|
543
|
-
public registry: Array<[string, GeneratedType]> = [];
|
|
544
|
-
|
|
545
|
-
constructor(client: IgniteClient) {
|
|
546
|
-
|
|
547
|
-
this.query = queryClient({ addr: client.env.apiURL });
|
|
548
|
-
this.updateTX(client);
|
|
549
|
-
this.structure = {
|
|
550
|
-
EventCreateGroup: getStructure(typeEventCreateGroup.fromPartial({})),
|
|
551
|
-
EventUpdateGroup: getStructure(typeEventUpdateGroup.fromPartial({})),
|
|
552
|
-
EventCreateGroupPolicy: getStructure(typeEventCreateGroupPolicy.fromPartial({})),
|
|
553
|
-
EventUpdateGroupPolicy: getStructure(typeEventUpdateGroupPolicy.fromPartial({})),
|
|
554
|
-
EventSubmitProposal: getStructure(typeEventSubmitProposal.fromPartial({})),
|
|
555
|
-
EventWithdrawProposal: getStructure(typeEventWithdrawProposal.fromPartial({})),
|
|
556
|
-
EventVote: getStructure(typeEventVote.fromPartial({})),
|
|
557
|
-
EventExec: getStructure(typeEventExec.fromPartial({})),
|
|
558
|
-
EventLeaveGroup: getStructure(typeEventLeaveGroup.fromPartial({})),
|
|
559
|
-
EventProposalPruned: getStructure(typeEventProposalPruned.fromPartial({})),
|
|
560
|
-
Member: getStructure(typeMember.fromPartial({})),
|
|
561
|
-
MemberRequest: getStructure(typeMemberRequest.fromPartial({})),
|
|
562
|
-
ThresholdDecisionPolicy: getStructure(typeThresholdDecisionPolicy.fromPartial({})),
|
|
563
|
-
PercentageDecisionPolicy: getStructure(typePercentageDecisionPolicy.fromPartial({})),
|
|
564
|
-
DecisionPolicyWindows: getStructure(typeDecisionPolicyWindows.fromPartial({})),
|
|
565
|
-
GroupInfo: getStructure(typeGroupInfo.fromPartial({})),
|
|
566
|
-
GroupMember: getStructure(typeGroupMember.fromPartial({})),
|
|
567
|
-
GroupPolicyInfo: getStructure(typeGroupPolicyInfo.fromPartial({})),
|
|
568
|
-
Proposal: getStructure(typeProposal.fromPartial({})),
|
|
569
|
-
TallyResult: getStructure(typeTallyResult.fromPartial({})),
|
|
570
|
-
Vote: getStructure(typeVote.fromPartial({})),
|
|
571
|
-
|
|
572
|
-
};
|
|
573
|
-
client.on('signer-changed',(signer) => {
|
|
574
|
-
this.updateTX(client);
|
|
575
|
-
})
|
|
576
|
-
}
|
|
577
|
-
updateTX(client: IgniteClient) {
|
|
578
|
-
const methods = txClient({
|
|
579
|
-
signer: client.signer,
|
|
580
|
-
addr: client.env.rpcURL,
|
|
581
|
-
prefix: client.env.prefix ?? "cosmos",
|
|
582
|
-
})
|
|
583
|
-
|
|
584
|
-
this.tx = methods;
|
|
585
|
-
for (let m in methods) {
|
|
586
|
-
this.tx[m] = methods[m].bind(this.tx);
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
};
|
|
590
|
-
|
|
591
|
-
const IgntModule = (test: IgniteClient) => {
|
|
592
|
-
return {
|
|
593
|
-
module: {
|
|
594
|
-
CosmosGroupV_1: new SDKModule(test)
|
|
595
|
-
},
|
|
596
|
-
registry: msgTypes
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
export default IgntModule;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { GeneratedType } from "@cosmjs/proto-signing";
|
|
2
|
-
import { MsgCreateGroup } from "../types/cosmos/group/v1/tx";
|
|
3
|
-
import { MsgUpdateGroupMembers } from "../types/cosmos/group/v1/tx";
|
|
4
|
-
import { MsgUpdateGroupAdmin } from "../types/cosmos/group/v1/tx";
|
|
5
|
-
import { MsgUpdateGroupMetadata } from "../types/cosmos/group/v1/tx";
|
|
6
|
-
import { MsgCreateGroupPolicy } from "../types/cosmos/group/v1/tx";
|
|
7
|
-
import { MsgCreateGroupWithPolicy } from "../types/cosmos/group/v1/tx";
|
|
8
|
-
import { MsgUpdateGroupPolicyAdmin } from "../types/cosmos/group/v1/tx";
|
|
9
|
-
import { MsgUpdateGroupPolicyDecisionPolicy } from "../types/cosmos/group/v1/tx";
|
|
10
|
-
import { MsgUpdateGroupPolicyMetadata } from "../types/cosmos/group/v1/tx";
|
|
11
|
-
import { MsgSubmitProposal } from "../types/cosmos/group/v1/tx";
|
|
12
|
-
import { MsgWithdrawProposal } from "../types/cosmos/group/v1/tx";
|
|
13
|
-
import { MsgVote } from "../types/cosmos/group/v1/tx";
|
|
14
|
-
import { MsgExec } from "../types/cosmos/group/v1/tx";
|
|
15
|
-
import { MsgLeaveGroup } from "../types/cosmos/group/v1/tx";
|
|
16
|
-
|
|
17
|
-
const msgTypes: Array<[string, GeneratedType]> = [
|
|
18
|
-
["/cosmos.group.v1.MsgCreateGroup", MsgCreateGroup],
|
|
19
|
-
["/cosmos.group.v1.MsgUpdateGroupMembers", MsgUpdateGroupMembers],
|
|
20
|
-
["/cosmos.group.v1.MsgUpdateGroupAdmin", MsgUpdateGroupAdmin],
|
|
21
|
-
["/cosmos.group.v1.MsgUpdateGroupMetadata", MsgUpdateGroupMetadata],
|
|
22
|
-
["/cosmos.group.v1.MsgCreateGroupPolicy", MsgCreateGroupPolicy],
|
|
23
|
-
["/cosmos.group.v1.MsgCreateGroupWithPolicy", MsgCreateGroupWithPolicy],
|
|
24
|
-
["/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", MsgUpdateGroupPolicyAdmin],
|
|
25
|
-
["/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", MsgUpdateGroupPolicyDecisionPolicy],
|
|
26
|
-
["/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", MsgUpdateGroupPolicyMetadata],
|
|
27
|
-
["/cosmos.group.v1.MsgSubmitProposal", MsgSubmitProposal],
|
|
28
|
-
["/cosmos.group.v1.MsgWithdrawProposal", MsgWithdrawProposal],
|
|
29
|
-
["/cosmos.group.v1.MsgVote", MsgVote],
|
|
30
|
-
["/cosmos.group.v1.MsgExec", MsgExec],
|
|
31
|
-
["/cosmos.group.v1.MsgLeaveGroup", MsgLeaveGroup],
|
|
32
|
-
|
|
33
|
-
];
|
|
34
|
-
|
|
35
|
-
export { msgTypes }
|