decentralcardgame-cardchain-client-ts 0.0.31 → 0.0.32
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 +23 -23
- package/package.json +5 -2
- 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,1273 +0,0 @@
|
|
|
1
|
-
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
-
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.6.1
|
|
4
|
-
// protoc unknown
|
|
5
|
-
// source: cosmos/gov/v1beta1/gov.proto
|
|
6
|
-
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
-
import { Any } from "../../../google/protobuf/any";
|
|
10
|
-
import { Duration } from "../../../google/protobuf/duration";
|
|
11
|
-
import { Timestamp } from "../../../google/protobuf/timestamp";
|
|
12
|
-
import { Coin } from "../../base/v1beta1/coin";
|
|
13
|
-
|
|
14
|
-
export const protobufPackage = "cosmos.gov.v1beta1";
|
|
15
|
-
|
|
16
|
-
/** VoteOption enumerates the valid vote options for a given governance proposal. */
|
|
17
|
-
export enum VoteOption {
|
|
18
|
-
/** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */
|
|
19
|
-
VOTE_OPTION_UNSPECIFIED = 0,
|
|
20
|
-
/** VOTE_OPTION_YES - VOTE_OPTION_YES defines a yes vote option. */
|
|
21
|
-
VOTE_OPTION_YES = 1,
|
|
22
|
-
/** VOTE_OPTION_ABSTAIN - VOTE_OPTION_ABSTAIN defines an abstain vote option. */
|
|
23
|
-
VOTE_OPTION_ABSTAIN = 2,
|
|
24
|
-
/** VOTE_OPTION_NO - VOTE_OPTION_NO defines a no vote option. */
|
|
25
|
-
VOTE_OPTION_NO = 3,
|
|
26
|
-
/** VOTE_OPTION_NO_WITH_VETO - VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */
|
|
27
|
-
VOTE_OPTION_NO_WITH_VETO = 4,
|
|
28
|
-
UNRECOGNIZED = -1,
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function voteOptionFromJSON(object: any): VoteOption {
|
|
32
|
-
switch (object) {
|
|
33
|
-
case 0:
|
|
34
|
-
case "VOTE_OPTION_UNSPECIFIED":
|
|
35
|
-
return VoteOption.VOTE_OPTION_UNSPECIFIED;
|
|
36
|
-
case 1:
|
|
37
|
-
case "VOTE_OPTION_YES":
|
|
38
|
-
return VoteOption.VOTE_OPTION_YES;
|
|
39
|
-
case 2:
|
|
40
|
-
case "VOTE_OPTION_ABSTAIN":
|
|
41
|
-
return VoteOption.VOTE_OPTION_ABSTAIN;
|
|
42
|
-
case 3:
|
|
43
|
-
case "VOTE_OPTION_NO":
|
|
44
|
-
return VoteOption.VOTE_OPTION_NO;
|
|
45
|
-
case 4:
|
|
46
|
-
case "VOTE_OPTION_NO_WITH_VETO":
|
|
47
|
-
return VoteOption.VOTE_OPTION_NO_WITH_VETO;
|
|
48
|
-
case -1:
|
|
49
|
-
case "UNRECOGNIZED":
|
|
50
|
-
default:
|
|
51
|
-
return VoteOption.UNRECOGNIZED;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export function voteOptionToJSON(object: VoteOption): string {
|
|
56
|
-
switch (object) {
|
|
57
|
-
case VoteOption.VOTE_OPTION_UNSPECIFIED:
|
|
58
|
-
return "VOTE_OPTION_UNSPECIFIED";
|
|
59
|
-
case VoteOption.VOTE_OPTION_YES:
|
|
60
|
-
return "VOTE_OPTION_YES";
|
|
61
|
-
case VoteOption.VOTE_OPTION_ABSTAIN:
|
|
62
|
-
return "VOTE_OPTION_ABSTAIN";
|
|
63
|
-
case VoteOption.VOTE_OPTION_NO:
|
|
64
|
-
return "VOTE_OPTION_NO";
|
|
65
|
-
case VoteOption.VOTE_OPTION_NO_WITH_VETO:
|
|
66
|
-
return "VOTE_OPTION_NO_WITH_VETO";
|
|
67
|
-
case VoteOption.UNRECOGNIZED:
|
|
68
|
-
default:
|
|
69
|
-
return "UNRECOGNIZED";
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/** ProposalStatus enumerates the valid statuses of a proposal. */
|
|
74
|
-
export enum ProposalStatus {
|
|
75
|
-
/** PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. */
|
|
76
|
-
PROPOSAL_STATUS_UNSPECIFIED = 0,
|
|
77
|
-
/**
|
|
78
|
-
* PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit
|
|
79
|
-
* period.
|
|
80
|
-
*/
|
|
81
|
-
PROPOSAL_STATUS_DEPOSIT_PERIOD = 1,
|
|
82
|
-
/**
|
|
83
|
-
* PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting
|
|
84
|
-
* period.
|
|
85
|
-
*/
|
|
86
|
-
PROPOSAL_STATUS_VOTING_PERIOD = 2,
|
|
87
|
-
/**
|
|
88
|
-
* PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has
|
|
89
|
-
* passed.
|
|
90
|
-
*/
|
|
91
|
-
PROPOSAL_STATUS_PASSED = 3,
|
|
92
|
-
/**
|
|
93
|
-
* PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has
|
|
94
|
-
* been rejected.
|
|
95
|
-
*/
|
|
96
|
-
PROPOSAL_STATUS_REJECTED = 4,
|
|
97
|
-
/**
|
|
98
|
-
* PROPOSAL_STATUS_FAILED - PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has
|
|
99
|
-
* failed.
|
|
100
|
-
*/
|
|
101
|
-
PROPOSAL_STATUS_FAILED = 5,
|
|
102
|
-
UNRECOGNIZED = -1,
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export function proposalStatusFromJSON(object: any): ProposalStatus {
|
|
106
|
-
switch (object) {
|
|
107
|
-
case 0:
|
|
108
|
-
case "PROPOSAL_STATUS_UNSPECIFIED":
|
|
109
|
-
return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED;
|
|
110
|
-
case 1:
|
|
111
|
-
case "PROPOSAL_STATUS_DEPOSIT_PERIOD":
|
|
112
|
-
return ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD;
|
|
113
|
-
case 2:
|
|
114
|
-
case "PROPOSAL_STATUS_VOTING_PERIOD":
|
|
115
|
-
return ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD;
|
|
116
|
-
case 3:
|
|
117
|
-
case "PROPOSAL_STATUS_PASSED":
|
|
118
|
-
return ProposalStatus.PROPOSAL_STATUS_PASSED;
|
|
119
|
-
case 4:
|
|
120
|
-
case "PROPOSAL_STATUS_REJECTED":
|
|
121
|
-
return ProposalStatus.PROPOSAL_STATUS_REJECTED;
|
|
122
|
-
case 5:
|
|
123
|
-
case "PROPOSAL_STATUS_FAILED":
|
|
124
|
-
return ProposalStatus.PROPOSAL_STATUS_FAILED;
|
|
125
|
-
case -1:
|
|
126
|
-
case "UNRECOGNIZED":
|
|
127
|
-
default:
|
|
128
|
-
return ProposalStatus.UNRECOGNIZED;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export function proposalStatusToJSON(object: ProposalStatus): string {
|
|
133
|
-
switch (object) {
|
|
134
|
-
case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED:
|
|
135
|
-
return "PROPOSAL_STATUS_UNSPECIFIED";
|
|
136
|
-
case ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD:
|
|
137
|
-
return "PROPOSAL_STATUS_DEPOSIT_PERIOD";
|
|
138
|
-
case ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD:
|
|
139
|
-
return "PROPOSAL_STATUS_VOTING_PERIOD";
|
|
140
|
-
case ProposalStatus.PROPOSAL_STATUS_PASSED:
|
|
141
|
-
return "PROPOSAL_STATUS_PASSED";
|
|
142
|
-
case ProposalStatus.PROPOSAL_STATUS_REJECTED:
|
|
143
|
-
return "PROPOSAL_STATUS_REJECTED";
|
|
144
|
-
case ProposalStatus.PROPOSAL_STATUS_FAILED:
|
|
145
|
-
return "PROPOSAL_STATUS_FAILED";
|
|
146
|
-
case ProposalStatus.UNRECOGNIZED:
|
|
147
|
-
default:
|
|
148
|
-
return "UNRECOGNIZED";
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* WeightedVoteOption defines a unit of vote for vote split.
|
|
154
|
-
*
|
|
155
|
-
* Since: cosmos-sdk 0.43
|
|
156
|
-
*/
|
|
157
|
-
export interface WeightedVoteOption {
|
|
158
|
-
/** option defines the valid vote options, it must not contain duplicate vote options. */
|
|
159
|
-
option: VoteOption;
|
|
160
|
-
/** weight is the vote weight associated with the vote option. */
|
|
161
|
-
weight: string;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* TextProposal defines a standard text proposal whose changes need to be
|
|
166
|
-
* manually updated in case of approval.
|
|
167
|
-
*/
|
|
168
|
-
export interface TextProposal {
|
|
169
|
-
/** title of the proposal. */
|
|
170
|
-
title: string;
|
|
171
|
-
/** description associated with the proposal. */
|
|
172
|
-
description: string;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Deposit defines an amount deposited by an account address to an active
|
|
177
|
-
* proposal.
|
|
178
|
-
*/
|
|
179
|
-
export interface Deposit {
|
|
180
|
-
/** proposal_id defines the unique id of the proposal. */
|
|
181
|
-
proposalId: number;
|
|
182
|
-
/** depositor defines the deposit addresses from the proposals. */
|
|
183
|
-
depositor: string;
|
|
184
|
-
/** amount to be deposited by depositor. */
|
|
185
|
-
amount: Coin[];
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/** Proposal defines the core field members of a governance proposal. */
|
|
189
|
-
export interface Proposal {
|
|
190
|
-
/** proposal_id defines the unique id of the proposal. */
|
|
191
|
-
proposalId: number;
|
|
192
|
-
/** content is the proposal's content. */
|
|
193
|
-
content:
|
|
194
|
-
| Any
|
|
195
|
-
| undefined;
|
|
196
|
-
/** status defines the proposal status. */
|
|
197
|
-
status: ProposalStatus;
|
|
198
|
-
/**
|
|
199
|
-
* final_tally_result is the final tally result of the proposal. When
|
|
200
|
-
* querying a proposal via gRPC, this field is not populated until the
|
|
201
|
-
* proposal's voting period has ended.
|
|
202
|
-
*/
|
|
203
|
-
finalTallyResult:
|
|
204
|
-
| TallyResult
|
|
205
|
-
| undefined;
|
|
206
|
-
/** submit_time is the time of proposal submission. */
|
|
207
|
-
submitTime:
|
|
208
|
-
| Date
|
|
209
|
-
| undefined;
|
|
210
|
-
/** deposit_end_time is the end time for deposition. */
|
|
211
|
-
depositEndTime:
|
|
212
|
-
| Date
|
|
213
|
-
| undefined;
|
|
214
|
-
/** total_deposit is the total deposit on the proposal. */
|
|
215
|
-
totalDeposit: Coin[];
|
|
216
|
-
/** voting_start_time is the starting time to vote on a proposal. */
|
|
217
|
-
votingStartTime:
|
|
218
|
-
| Date
|
|
219
|
-
| undefined;
|
|
220
|
-
/** voting_end_time is the end time of voting on a proposal. */
|
|
221
|
-
votingEndTime: Date | undefined;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/** TallyResult defines a standard tally for a governance proposal. */
|
|
225
|
-
export interface TallyResult {
|
|
226
|
-
/** yes is the number of yes votes on a proposal. */
|
|
227
|
-
yes: string;
|
|
228
|
-
/** abstain is the number of abstain votes on a proposal. */
|
|
229
|
-
abstain: string;
|
|
230
|
-
/** no is the number of no votes on a proposal. */
|
|
231
|
-
no: string;
|
|
232
|
-
/** no_with_veto is the number of no with veto votes on a proposal. */
|
|
233
|
-
noWithVeto: string;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* Vote defines a vote on a governance proposal.
|
|
238
|
-
* A Vote consists of a proposal ID, the voter, and the vote option.
|
|
239
|
-
*/
|
|
240
|
-
export interface Vote {
|
|
241
|
-
/** proposal_id defines the unique id of the proposal. */
|
|
242
|
-
proposalId: number;
|
|
243
|
-
/** voter is the voter address of the proposal. */
|
|
244
|
-
voter: string;
|
|
245
|
-
/**
|
|
246
|
-
* Deprecated: Prefer to use `options` instead. This field is set in queries
|
|
247
|
-
* if and only if `len(options) == 1` and that option has weight 1. In all
|
|
248
|
-
* other cases, this field will default to VOTE_OPTION_UNSPECIFIED.
|
|
249
|
-
*
|
|
250
|
-
* @deprecated
|
|
251
|
-
*/
|
|
252
|
-
option: VoteOption;
|
|
253
|
-
/**
|
|
254
|
-
* options is the weighted vote options.
|
|
255
|
-
*
|
|
256
|
-
* Since: cosmos-sdk 0.43
|
|
257
|
-
*/
|
|
258
|
-
options: WeightedVoteOption[];
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
/** DepositParams defines the params for deposits on governance proposals. */
|
|
262
|
-
export interface DepositParams {
|
|
263
|
-
/** Minimum deposit for a proposal to enter voting period. */
|
|
264
|
-
minDeposit: Coin[];
|
|
265
|
-
/**
|
|
266
|
-
* Maximum period for Atom holders to deposit on a proposal. Initial value: 2
|
|
267
|
-
* months.
|
|
268
|
-
*/
|
|
269
|
-
maxDepositPeriod: Duration | undefined;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
/** VotingParams defines the params for voting on governance proposals. */
|
|
273
|
-
export interface VotingParams {
|
|
274
|
-
/** Duration of the voting period. */
|
|
275
|
-
votingPeriod: Duration | undefined;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
/** TallyParams defines the params for tallying votes on governance proposals. */
|
|
279
|
-
export interface TallyParams {
|
|
280
|
-
/**
|
|
281
|
-
* Minimum percentage of total stake needed to vote for a result to be
|
|
282
|
-
* considered valid.
|
|
283
|
-
*/
|
|
284
|
-
quorum: Uint8Array;
|
|
285
|
-
/** Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. */
|
|
286
|
-
threshold: Uint8Array;
|
|
287
|
-
/**
|
|
288
|
-
* Minimum value of Veto votes to Total votes ratio for proposal to be
|
|
289
|
-
* vetoed. Default value: 1/3.
|
|
290
|
-
*/
|
|
291
|
-
vetoThreshold: Uint8Array;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
function createBaseWeightedVoteOption(): WeightedVoteOption {
|
|
295
|
-
return { option: 0, weight: "" };
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
export const WeightedVoteOption: MessageFns<WeightedVoteOption> = {
|
|
299
|
-
encode(message: WeightedVoteOption, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
300
|
-
if (message.option !== 0) {
|
|
301
|
-
writer.uint32(8).int32(message.option);
|
|
302
|
-
}
|
|
303
|
-
if (message.weight !== "") {
|
|
304
|
-
writer.uint32(18).string(message.weight);
|
|
305
|
-
}
|
|
306
|
-
return writer;
|
|
307
|
-
},
|
|
308
|
-
|
|
309
|
-
decode(input: BinaryReader | Uint8Array, length?: number): WeightedVoteOption {
|
|
310
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
311
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
312
|
-
const message = createBaseWeightedVoteOption();
|
|
313
|
-
while (reader.pos < end) {
|
|
314
|
-
const tag = reader.uint32();
|
|
315
|
-
switch (tag >>> 3) {
|
|
316
|
-
case 1: {
|
|
317
|
-
if (tag !== 8) {
|
|
318
|
-
break;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
message.option = reader.int32() as any;
|
|
322
|
-
continue;
|
|
323
|
-
}
|
|
324
|
-
case 2: {
|
|
325
|
-
if (tag !== 18) {
|
|
326
|
-
break;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
message.weight = reader.string();
|
|
330
|
-
continue;
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
334
|
-
break;
|
|
335
|
-
}
|
|
336
|
-
reader.skip(tag & 7);
|
|
337
|
-
}
|
|
338
|
-
return message;
|
|
339
|
-
},
|
|
340
|
-
|
|
341
|
-
fromJSON(object: any): WeightedVoteOption {
|
|
342
|
-
return {
|
|
343
|
-
option: isSet(object.option) ? voteOptionFromJSON(object.option) : 0,
|
|
344
|
-
weight: isSet(object.weight) ? globalThis.String(object.weight) : "",
|
|
345
|
-
};
|
|
346
|
-
},
|
|
347
|
-
|
|
348
|
-
toJSON(message: WeightedVoteOption): unknown {
|
|
349
|
-
const obj: any = {};
|
|
350
|
-
if (message.option !== 0) {
|
|
351
|
-
obj.option = voteOptionToJSON(message.option);
|
|
352
|
-
}
|
|
353
|
-
if (message.weight !== "") {
|
|
354
|
-
obj.weight = message.weight;
|
|
355
|
-
}
|
|
356
|
-
return obj;
|
|
357
|
-
},
|
|
358
|
-
|
|
359
|
-
create<I extends Exact<DeepPartial<WeightedVoteOption>, I>>(base?: I): WeightedVoteOption {
|
|
360
|
-
return WeightedVoteOption.fromPartial(base ?? ({} as any));
|
|
361
|
-
},
|
|
362
|
-
fromPartial<I extends Exact<DeepPartial<WeightedVoteOption>, I>>(object: I): WeightedVoteOption {
|
|
363
|
-
const message = createBaseWeightedVoteOption();
|
|
364
|
-
message.option = object.option ?? 0;
|
|
365
|
-
message.weight = object.weight ?? "";
|
|
366
|
-
return message;
|
|
367
|
-
},
|
|
368
|
-
};
|
|
369
|
-
|
|
370
|
-
function createBaseTextProposal(): TextProposal {
|
|
371
|
-
return { title: "", description: "" };
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
export const TextProposal: MessageFns<TextProposal> = {
|
|
375
|
-
encode(message: TextProposal, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
376
|
-
if (message.title !== "") {
|
|
377
|
-
writer.uint32(10).string(message.title);
|
|
378
|
-
}
|
|
379
|
-
if (message.description !== "") {
|
|
380
|
-
writer.uint32(18).string(message.description);
|
|
381
|
-
}
|
|
382
|
-
return writer;
|
|
383
|
-
},
|
|
384
|
-
|
|
385
|
-
decode(input: BinaryReader | Uint8Array, length?: number): TextProposal {
|
|
386
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
387
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
388
|
-
const message = createBaseTextProposal();
|
|
389
|
-
while (reader.pos < end) {
|
|
390
|
-
const tag = reader.uint32();
|
|
391
|
-
switch (tag >>> 3) {
|
|
392
|
-
case 1: {
|
|
393
|
-
if (tag !== 10) {
|
|
394
|
-
break;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
message.title = reader.string();
|
|
398
|
-
continue;
|
|
399
|
-
}
|
|
400
|
-
case 2: {
|
|
401
|
-
if (tag !== 18) {
|
|
402
|
-
break;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
message.description = reader.string();
|
|
406
|
-
continue;
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
410
|
-
break;
|
|
411
|
-
}
|
|
412
|
-
reader.skip(tag & 7);
|
|
413
|
-
}
|
|
414
|
-
return message;
|
|
415
|
-
},
|
|
416
|
-
|
|
417
|
-
fromJSON(object: any): TextProposal {
|
|
418
|
-
return {
|
|
419
|
-
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
420
|
-
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
421
|
-
};
|
|
422
|
-
},
|
|
423
|
-
|
|
424
|
-
toJSON(message: TextProposal): unknown {
|
|
425
|
-
const obj: any = {};
|
|
426
|
-
if (message.title !== "") {
|
|
427
|
-
obj.title = message.title;
|
|
428
|
-
}
|
|
429
|
-
if (message.description !== "") {
|
|
430
|
-
obj.description = message.description;
|
|
431
|
-
}
|
|
432
|
-
return obj;
|
|
433
|
-
},
|
|
434
|
-
|
|
435
|
-
create<I extends Exact<DeepPartial<TextProposal>, I>>(base?: I): TextProposal {
|
|
436
|
-
return TextProposal.fromPartial(base ?? ({} as any));
|
|
437
|
-
},
|
|
438
|
-
fromPartial<I extends Exact<DeepPartial<TextProposal>, I>>(object: I): TextProposal {
|
|
439
|
-
const message = createBaseTextProposal();
|
|
440
|
-
message.title = object.title ?? "";
|
|
441
|
-
message.description = object.description ?? "";
|
|
442
|
-
return message;
|
|
443
|
-
},
|
|
444
|
-
};
|
|
445
|
-
|
|
446
|
-
function createBaseDeposit(): Deposit {
|
|
447
|
-
return { proposalId: 0, depositor: "", amount: [] };
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
export const Deposit: MessageFns<Deposit> = {
|
|
451
|
-
encode(message: Deposit, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
452
|
-
if (message.proposalId !== 0) {
|
|
453
|
-
writer.uint32(8).uint64(message.proposalId);
|
|
454
|
-
}
|
|
455
|
-
if (message.depositor !== "") {
|
|
456
|
-
writer.uint32(18).string(message.depositor);
|
|
457
|
-
}
|
|
458
|
-
for (const v of message.amount) {
|
|
459
|
-
Coin.encode(v!, writer.uint32(26).fork()).join();
|
|
460
|
-
}
|
|
461
|
-
return writer;
|
|
462
|
-
},
|
|
463
|
-
|
|
464
|
-
decode(input: BinaryReader | Uint8Array, length?: number): Deposit {
|
|
465
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
466
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
467
|
-
const message = createBaseDeposit();
|
|
468
|
-
while (reader.pos < end) {
|
|
469
|
-
const tag = reader.uint32();
|
|
470
|
-
switch (tag >>> 3) {
|
|
471
|
-
case 1: {
|
|
472
|
-
if (tag !== 8) {
|
|
473
|
-
break;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
message.proposalId = longToNumber(reader.uint64());
|
|
477
|
-
continue;
|
|
478
|
-
}
|
|
479
|
-
case 2: {
|
|
480
|
-
if (tag !== 18) {
|
|
481
|
-
break;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
message.depositor = reader.string();
|
|
485
|
-
continue;
|
|
486
|
-
}
|
|
487
|
-
case 3: {
|
|
488
|
-
if (tag !== 26) {
|
|
489
|
-
break;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
message.amount.push(Coin.decode(reader, reader.uint32()));
|
|
493
|
-
continue;
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
497
|
-
break;
|
|
498
|
-
}
|
|
499
|
-
reader.skip(tag & 7);
|
|
500
|
-
}
|
|
501
|
-
return message;
|
|
502
|
-
},
|
|
503
|
-
|
|
504
|
-
fromJSON(object: any): Deposit {
|
|
505
|
-
return {
|
|
506
|
-
proposalId: isSet(object.proposalId) ? globalThis.Number(object.proposalId) : 0,
|
|
507
|
-
depositor: isSet(object.depositor) ? globalThis.String(object.depositor) : "",
|
|
508
|
-
amount: globalThis.Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [],
|
|
509
|
-
};
|
|
510
|
-
},
|
|
511
|
-
|
|
512
|
-
toJSON(message: Deposit): unknown {
|
|
513
|
-
const obj: any = {};
|
|
514
|
-
if (message.proposalId !== 0) {
|
|
515
|
-
obj.proposalId = Math.round(message.proposalId);
|
|
516
|
-
}
|
|
517
|
-
if (message.depositor !== "") {
|
|
518
|
-
obj.depositor = message.depositor;
|
|
519
|
-
}
|
|
520
|
-
if (message.amount?.length) {
|
|
521
|
-
obj.amount = message.amount.map((e) => Coin.toJSON(e));
|
|
522
|
-
}
|
|
523
|
-
return obj;
|
|
524
|
-
},
|
|
525
|
-
|
|
526
|
-
create<I extends Exact<DeepPartial<Deposit>, I>>(base?: I): Deposit {
|
|
527
|
-
return Deposit.fromPartial(base ?? ({} as any));
|
|
528
|
-
},
|
|
529
|
-
fromPartial<I extends Exact<DeepPartial<Deposit>, I>>(object: I): Deposit {
|
|
530
|
-
const message = createBaseDeposit();
|
|
531
|
-
message.proposalId = object.proposalId ?? 0;
|
|
532
|
-
message.depositor = object.depositor ?? "";
|
|
533
|
-
message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || [];
|
|
534
|
-
return message;
|
|
535
|
-
},
|
|
536
|
-
};
|
|
537
|
-
|
|
538
|
-
function createBaseProposal(): Proposal {
|
|
539
|
-
return {
|
|
540
|
-
proposalId: 0,
|
|
541
|
-
content: undefined,
|
|
542
|
-
status: 0,
|
|
543
|
-
finalTallyResult: undefined,
|
|
544
|
-
submitTime: undefined,
|
|
545
|
-
depositEndTime: undefined,
|
|
546
|
-
totalDeposit: [],
|
|
547
|
-
votingStartTime: undefined,
|
|
548
|
-
votingEndTime: undefined,
|
|
549
|
-
};
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
export const Proposal: MessageFns<Proposal> = {
|
|
553
|
-
encode(message: Proposal, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
554
|
-
if (message.proposalId !== 0) {
|
|
555
|
-
writer.uint32(8).uint64(message.proposalId);
|
|
556
|
-
}
|
|
557
|
-
if (message.content !== undefined) {
|
|
558
|
-
Any.encode(message.content, writer.uint32(18).fork()).join();
|
|
559
|
-
}
|
|
560
|
-
if (message.status !== 0) {
|
|
561
|
-
writer.uint32(24).int32(message.status);
|
|
562
|
-
}
|
|
563
|
-
if (message.finalTallyResult !== undefined) {
|
|
564
|
-
TallyResult.encode(message.finalTallyResult, writer.uint32(34).fork()).join();
|
|
565
|
-
}
|
|
566
|
-
if (message.submitTime !== undefined) {
|
|
567
|
-
Timestamp.encode(toTimestamp(message.submitTime), writer.uint32(42).fork()).join();
|
|
568
|
-
}
|
|
569
|
-
if (message.depositEndTime !== undefined) {
|
|
570
|
-
Timestamp.encode(toTimestamp(message.depositEndTime), writer.uint32(50).fork()).join();
|
|
571
|
-
}
|
|
572
|
-
for (const v of message.totalDeposit) {
|
|
573
|
-
Coin.encode(v!, writer.uint32(58).fork()).join();
|
|
574
|
-
}
|
|
575
|
-
if (message.votingStartTime !== undefined) {
|
|
576
|
-
Timestamp.encode(toTimestamp(message.votingStartTime), writer.uint32(66).fork()).join();
|
|
577
|
-
}
|
|
578
|
-
if (message.votingEndTime !== undefined) {
|
|
579
|
-
Timestamp.encode(toTimestamp(message.votingEndTime), writer.uint32(74).fork()).join();
|
|
580
|
-
}
|
|
581
|
-
return writer;
|
|
582
|
-
},
|
|
583
|
-
|
|
584
|
-
decode(input: BinaryReader | Uint8Array, length?: number): Proposal {
|
|
585
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
586
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
587
|
-
const message = createBaseProposal();
|
|
588
|
-
while (reader.pos < end) {
|
|
589
|
-
const tag = reader.uint32();
|
|
590
|
-
switch (tag >>> 3) {
|
|
591
|
-
case 1: {
|
|
592
|
-
if (tag !== 8) {
|
|
593
|
-
break;
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
message.proposalId = longToNumber(reader.uint64());
|
|
597
|
-
continue;
|
|
598
|
-
}
|
|
599
|
-
case 2: {
|
|
600
|
-
if (tag !== 18) {
|
|
601
|
-
break;
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
message.content = Any.decode(reader, reader.uint32());
|
|
605
|
-
continue;
|
|
606
|
-
}
|
|
607
|
-
case 3: {
|
|
608
|
-
if (tag !== 24) {
|
|
609
|
-
break;
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
message.status = reader.int32() as any;
|
|
613
|
-
continue;
|
|
614
|
-
}
|
|
615
|
-
case 4: {
|
|
616
|
-
if (tag !== 34) {
|
|
617
|
-
break;
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
message.finalTallyResult = TallyResult.decode(reader, reader.uint32());
|
|
621
|
-
continue;
|
|
622
|
-
}
|
|
623
|
-
case 5: {
|
|
624
|
-
if (tag !== 42) {
|
|
625
|
-
break;
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
629
|
-
continue;
|
|
630
|
-
}
|
|
631
|
-
case 6: {
|
|
632
|
-
if (tag !== 50) {
|
|
633
|
-
break;
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
message.depositEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
637
|
-
continue;
|
|
638
|
-
}
|
|
639
|
-
case 7: {
|
|
640
|
-
if (tag !== 58) {
|
|
641
|
-
break;
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
message.totalDeposit.push(Coin.decode(reader, reader.uint32()));
|
|
645
|
-
continue;
|
|
646
|
-
}
|
|
647
|
-
case 8: {
|
|
648
|
-
if (tag !== 66) {
|
|
649
|
-
break;
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
message.votingStartTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
653
|
-
continue;
|
|
654
|
-
}
|
|
655
|
-
case 9: {
|
|
656
|
-
if (tag !== 74) {
|
|
657
|
-
break;
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
message.votingEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
661
|
-
continue;
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
665
|
-
break;
|
|
666
|
-
}
|
|
667
|
-
reader.skip(tag & 7);
|
|
668
|
-
}
|
|
669
|
-
return message;
|
|
670
|
-
},
|
|
671
|
-
|
|
672
|
-
fromJSON(object: any): Proposal {
|
|
673
|
-
return {
|
|
674
|
-
proposalId: isSet(object.proposalId) ? globalThis.Number(object.proposalId) : 0,
|
|
675
|
-
content: isSet(object.content) ? Any.fromJSON(object.content) : undefined,
|
|
676
|
-
status: isSet(object.status) ? proposalStatusFromJSON(object.status) : 0,
|
|
677
|
-
finalTallyResult: isSet(object.finalTallyResult) ? TallyResult.fromJSON(object.finalTallyResult) : undefined,
|
|
678
|
-
submitTime: isSet(object.submitTime) ? fromJsonTimestamp(object.submitTime) : undefined,
|
|
679
|
-
depositEndTime: isSet(object.depositEndTime) ? fromJsonTimestamp(object.depositEndTime) : undefined,
|
|
680
|
-
totalDeposit: globalThis.Array.isArray(object?.totalDeposit)
|
|
681
|
-
? object.totalDeposit.map((e: any) => Coin.fromJSON(e))
|
|
682
|
-
: [],
|
|
683
|
-
votingStartTime: isSet(object.votingStartTime) ? fromJsonTimestamp(object.votingStartTime) : undefined,
|
|
684
|
-
votingEndTime: isSet(object.votingEndTime) ? fromJsonTimestamp(object.votingEndTime) : undefined,
|
|
685
|
-
};
|
|
686
|
-
},
|
|
687
|
-
|
|
688
|
-
toJSON(message: Proposal): unknown {
|
|
689
|
-
const obj: any = {};
|
|
690
|
-
if (message.proposalId !== 0) {
|
|
691
|
-
obj.proposalId = Math.round(message.proposalId);
|
|
692
|
-
}
|
|
693
|
-
if (message.content !== undefined) {
|
|
694
|
-
obj.content = Any.toJSON(message.content);
|
|
695
|
-
}
|
|
696
|
-
if (message.status !== 0) {
|
|
697
|
-
obj.status = proposalStatusToJSON(message.status);
|
|
698
|
-
}
|
|
699
|
-
if (message.finalTallyResult !== undefined) {
|
|
700
|
-
obj.finalTallyResult = TallyResult.toJSON(message.finalTallyResult);
|
|
701
|
-
}
|
|
702
|
-
if (message.submitTime !== undefined) {
|
|
703
|
-
obj.submitTime = message.submitTime.toISOString();
|
|
704
|
-
}
|
|
705
|
-
if (message.depositEndTime !== undefined) {
|
|
706
|
-
obj.depositEndTime = message.depositEndTime.toISOString();
|
|
707
|
-
}
|
|
708
|
-
if (message.totalDeposit?.length) {
|
|
709
|
-
obj.totalDeposit = message.totalDeposit.map((e) => Coin.toJSON(e));
|
|
710
|
-
}
|
|
711
|
-
if (message.votingStartTime !== undefined) {
|
|
712
|
-
obj.votingStartTime = message.votingStartTime.toISOString();
|
|
713
|
-
}
|
|
714
|
-
if (message.votingEndTime !== undefined) {
|
|
715
|
-
obj.votingEndTime = message.votingEndTime.toISOString();
|
|
716
|
-
}
|
|
717
|
-
return obj;
|
|
718
|
-
},
|
|
719
|
-
|
|
720
|
-
create<I extends Exact<DeepPartial<Proposal>, I>>(base?: I): Proposal {
|
|
721
|
-
return Proposal.fromPartial(base ?? ({} as any));
|
|
722
|
-
},
|
|
723
|
-
fromPartial<I extends Exact<DeepPartial<Proposal>, I>>(object: I): Proposal {
|
|
724
|
-
const message = createBaseProposal();
|
|
725
|
-
message.proposalId = object.proposalId ?? 0;
|
|
726
|
-
message.content = (object.content !== undefined && object.content !== null)
|
|
727
|
-
? Any.fromPartial(object.content)
|
|
728
|
-
: undefined;
|
|
729
|
-
message.status = object.status ?? 0;
|
|
730
|
-
message.finalTallyResult = (object.finalTallyResult !== undefined && object.finalTallyResult !== null)
|
|
731
|
-
? TallyResult.fromPartial(object.finalTallyResult)
|
|
732
|
-
: undefined;
|
|
733
|
-
message.submitTime = object.submitTime ?? undefined;
|
|
734
|
-
message.depositEndTime = object.depositEndTime ?? undefined;
|
|
735
|
-
message.totalDeposit = object.totalDeposit?.map((e) => Coin.fromPartial(e)) || [];
|
|
736
|
-
message.votingStartTime = object.votingStartTime ?? undefined;
|
|
737
|
-
message.votingEndTime = object.votingEndTime ?? undefined;
|
|
738
|
-
return message;
|
|
739
|
-
},
|
|
740
|
-
};
|
|
741
|
-
|
|
742
|
-
function createBaseTallyResult(): TallyResult {
|
|
743
|
-
return { yes: "", abstain: "", no: "", noWithVeto: "" };
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
export const TallyResult: MessageFns<TallyResult> = {
|
|
747
|
-
encode(message: TallyResult, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
748
|
-
if (message.yes !== "") {
|
|
749
|
-
writer.uint32(10).string(message.yes);
|
|
750
|
-
}
|
|
751
|
-
if (message.abstain !== "") {
|
|
752
|
-
writer.uint32(18).string(message.abstain);
|
|
753
|
-
}
|
|
754
|
-
if (message.no !== "") {
|
|
755
|
-
writer.uint32(26).string(message.no);
|
|
756
|
-
}
|
|
757
|
-
if (message.noWithVeto !== "") {
|
|
758
|
-
writer.uint32(34).string(message.noWithVeto);
|
|
759
|
-
}
|
|
760
|
-
return writer;
|
|
761
|
-
},
|
|
762
|
-
|
|
763
|
-
decode(input: BinaryReader | Uint8Array, length?: number): TallyResult {
|
|
764
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
765
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
766
|
-
const message = createBaseTallyResult();
|
|
767
|
-
while (reader.pos < end) {
|
|
768
|
-
const tag = reader.uint32();
|
|
769
|
-
switch (tag >>> 3) {
|
|
770
|
-
case 1: {
|
|
771
|
-
if (tag !== 10) {
|
|
772
|
-
break;
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
message.yes = reader.string();
|
|
776
|
-
continue;
|
|
777
|
-
}
|
|
778
|
-
case 2: {
|
|
779
|
-
if (tag !== 18) {
|
|
780
|
-
break;
|
|
781
|
-
}
|
|
782
|
-
|
|
783
|
-
message.abstain = reader.string();
|
|
784
|
-
continue;
|
|
785
|
-
}
|
|
786
|
-
case 3: {
|
|
787
|
-
if (tag !== 26) {
|
|
788
|
-
break;
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
message.no = reader.string();
|
|
792
|
-
continue;
|
|
793
|
-
}
|
|
794
|
-
case 4: {
|
|
795
|
-
if (tag !== 34) {
|
|
796
|
-
break;
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
message.noWithVeto = reader.string();
|
|
800
|
-
continue;
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
804
|
-
break;
|
|
805
|
-
}
|
|
806
|
-
reader.skip(tag & 7);
|
|
807
|
-
}
|
|
808
|
-
return message;
|
|
809
|
-
},
|
|
810
|
-
|
|
811
|
-
fromJSON(object: any): TallyResult {
|
|
812
|
-
return {
|
|
813
|
-
yes: isSet(object.yes) ? globalThis.String(object.yes) : "",
|
|
814
|
-
abstain: isSet(object.abstain) ? globalThis.String(object.abstain) : "",
|
|
815
|
-
no: isSet(object.no) ? globalThis.String(object.no) : "",
|
|
816
|
-
noWithVeto: isSet(object.noWithVeto) ? globalThis.String(object.noWithVeto) : "",
|
|
817
|
-
};
|
|
818
|
-
},
|
|
819
|
-
|
|
820
|
-
toJSON(message: TallyResult): unknown {
|
|
821
|
-
const obj: any = {};
|
|
822
|
-
if (message.yes !== "") {
|
|
823
|
-
obj.yes = message.yes;
|
|
824
|
-
}
|
|
825
|
-
if (message.abstain !== "") {
|
|
826
|
-
obj.abstain = message.abstain;
|
|
827
|
-
}
|
|
828
|
-
if (message.no !== "") {
|
|
829
|
-
obj.no = message.no;
|
|
830
|
-
}
|
|
831
|
-
if (message.noWithVeto !== "") {
|
|
832
|
-
obj.noWithVeto = message.noWithVeto;
|
|
833
|
-
}
|
|
834
|
-
return obj;
|
|
835
|
-
},
|
|
836
|
-
|
|
837
|
-
create<I extends Exact<DeepPartial<TallyResult>, I>>(base?: I): TallyResult {
|
|
838
|
-
return TallyResult.fromPartial(base ?? ({} as any));
|
|
839
|
-
},
|
|
840
|
-
fromPartial<I extends Exact<DeepPartial<TallyResult>, I>>(object: I): TallyResult {
|
|
841
|
-
const message = createBaseTallyResult();
|
|
842
|
-
message.yes = object.yes ?? "";
|
|
843
|
-
message.abstain = object.abstain ?? "";
|
|
844
|
-
message.no = object.no ?? "";
|
|
845
|
-
message.noWithVeto = object.noWithVeto ?? "";
|
|
846
|
-
return message;
|
|
847
|
-
},
|
|
848
|
-
};
|
|
849
|
-
|
|
850
|
-
function createBaseVote(): Vote {
|
|
851
|
-
return { proposalId: 0, voter: "", option: 0, options: [] };
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
export const Vote: MessageFns<Vote> = {
|
|
855
|
-
encode(message: Vote, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
856
|
-
if (message.proposalId !== 0) {
|
|
857
|
-
writer.uint32(8).uint64(message.proposalId);
|
|
858
|
-
}
|
|
859
|
-
if (message.voter !== "") {
|
|
860
|
-
writer.uint32(18).string(message.voter);
|
|
861
|
-
}
|
|
862
|
-
if (message.option !== 0) {
|
|
863
|
-
writer.uint32(24).int32(message.option);
|
|
864
|
-
}
|
|
865
|
-
for (const v of message.options) {
|
|
866
|
-
WeightedVoteOption.encode(v!, writer.uint32(34).fork()).join();
|
|
867
|
-
}
|
|
868
|
-
return writer;
|
|
869
|
-
},
|
|
870
|
-
|
|
871
|
-
decode(input: BinaryReader | Uint8Array, length?: number): Vote {
|
|
872
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
873
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
874
|
-
const message = createBaseVote();
|
|
875
|
-
while (reader.pos < end) {
|
|
876
|
-
const tag = reader.uint32();
|
|
877
|
-
switch (tag >>> 3) {
|
|
878
|
-
case 1: {
|
|
879
|
-
if (tag !== 8) {
|
|
880
|
-
break;
|
|
881
|
-
}
|
|
882
|
-
|
|
883
|
-
message.proposalId = longToNumber(reader.uint64());
|
|
884
|
-
continue;
|
|
885
|
-
}
|
|
886
|
-
case 2: {
|
|
887
|
-
if (tag !== 18) {
|
|
888
|
-
break;
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
message.voter = reader.string();
|
|
892
|
-
continue;
|
|
893
|
-
}
|
|
894
|
-
case 3: {
|
|
895
|
-
if (tag !== 24) {
|
|
896
|
-
break;
|
|
897
|
-
}
|
|
898
|
-
|
|
899
|
-
message.option = reader.int32() as any;
|
|
900
|
-
continue;
|
|
901
|
-
}
|
|
902
|
-
case 4: {
|
|
903
|
-
if (tag !== 34) {
|
|
904
|
-
break;
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
message.options.push(WeightedVoteOption.decode(reader, reader.uint32()));
|
|
908
|
-
continue;
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
912
|
-
break;
|
|
913
|
-
}
|
|
914
|
-
reader.skip(tag & 7);
|
|
915
|
-
}
|
|
916
|
-
return message;
|
|
917
|
-
},
|
|
918
|
-
|
|
919
|
-
fromJSON(object: any): Vote {
|
|
920
|
-
return {
|
|
921
|
-
proposalId: isSet(object.proposalId) ? globalThis.Number(object.proposalId) : 0,
|
|
922
|
-
voter: isSet(object.voter) ? globalThis.String(object.voter) : "",
|
|
923
|
-
option: isSet(object.option) ? voteOptionFromJSON(object.option) : 0,
|
|
924
|
-
options: globalThis.Array.isArray(object?.options)
|
|
925
|
-
? object.options.map((e: any) => WeightedVoteOption.fromJSON(e))
|
|
926
|
-
: [],
|
|
927
|
-
};
|
|
928
|
-
},
|
|
929
|
-
|
|
930
|
-
toJSON(message: Vote): unknown {
|
|
931
|
-
const obj: any = {};
|
|
932
|
-
if (message.proposalId !== 0) {
|
|
933
|
-
obj.proposalId = Math.round(message.proposalId);
|
|
934
|
-
}
|
|
935
|
-
if (message.voter !== "") {
|
|
936
|
-
obj.voter = message.voter;
|
|
937
|
-
}
|
|
938
|
-
if (message.option !== 0) {
|
|
939
|
-
obj.option = voteOptionToJSON(message.option);
|
|
940
|
-
}
|
|
941
|
-
if (message.options?.length) {
|
|
942
|
-
obj.options = message.options.map((e) => WeightedVoteOption.toJSON(e));
|
|
943
|
-
}
|
|
944
|
-
return obj;
|
|
945
|
-
},
|
|
946
|
-
|
|
947
|
-
create<I extends Exact<DeepPartial<Vote>, I>>(base?: I): Vote {
|
|
948
|
-
return Vote.fromPartial(base ?? ({} as any));
|
|
949
|
-
},
|
|
950
|
-
fromPartial<I extends Exact<DeepPartial<Vote>, I>>(object: I): Vote {
|
|
951
|
-
const message = createBaseVote();
|
|
952
|
-
message.proposalId = object.proposalId ?? 0;
|
|
953
|
-
message.voter = object.voter ?? "";
|
|
954
|
-
message.option = object.option ?? 0;
|
|
955
|
-
message.options = object.options?.map((e) => WeightedVoteOption.fromPartial(e)) || [];
|
|
956
|
-
return message;
|
|
957
|
-
},
|
|
958
|
-
};
|
|
959
|
-
|
|
960
|
-
function createBaseDepositParams(): DepositParams {
|
|
961
|
-
return { minDeposit: [], maxDepositPeriod: undefined };
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
export const DepositParams: MessageFns<DepositParams> = {
|
|
965
|
-
encode(message: DepositParams, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
966
|
-
for (const v of message.minDeposit) {
|
|
967
|
-
Coin.encode(v!, writer.uint32(10).fork()).join();
|
|
968
|
-
}
|
|
969
|
-
if (message.maxDepositPeriod !== undefined) {
|
|
970
|
-
Duration.encode(message.maxDepositPeriod, writer.uint32(18).fork()).join();
|
|
971
|
-
}
|
|
972
|
-
return writer;
|
|
973
|
-
},
|
|
974
|
-
|
|
975
|
-
decode(input: BinaryReader | Uint8Array, length?: number): DepositParams {
|
|
976
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
977
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
978
|
-
const message = createBaseDepositParams();
|
|
979
|
-
while (reader.pos < end) {
|
|
980
|
-
const tag = reader.uint32();
|
|
981
|
-
switch (tag >>> 3) {
|
|
982
|
-
case 1: {
|
|
983
|
-
if (tag !== 10) {
|
|
984
|
-
break;
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
message.minDeposit.push(Coin.decode(reader, reader.uint32()));
|
|
988
|
-
continue;
|
|
989
|
-
}
|
|
990
|
-
case 2: {
|
|
991
|
-
if (tag !== 18) {
|
|
992
|
-
break;
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
message.maxDepositPeriod = Duration.decode(reader, reader.uint32());
|
|
996
|
-
continue;
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1000
|
-
break;
|
|
1001
|
-
}
|
|
1002
|
-
reader.skip(tag & 7);
|
|
1003
|
-
}
|
|
1004
|
-
return message;
|
|
1005
|
-
},
|
|
1006
|
-
|
|
1007
|
-
fromJSON(object: any): DepositParams {
|
|
1008
|
-
return {
|
|
1009
|
-
minDeposit: globalThis.Array.isArray(object?.minDeposit)
|
|
1010
|
-
? object.minDeposit.map((e: any) => Coin.fromJSON(e))
|
|
1011
|
-
: [],
|
|
1012
|
-
maxDepositPeriod: isSet(object.maxDepositPeriod) ? Duration.fromJSON(object.maxDepositPeriod) : undefined,
|
|
1013
|
-
};
|
|
1014
|
-
},
|
|
1015
|
-
|
|
1016
|
-
toJSON(message: DepositParams): unknown {
|
|
1017
|
-
const obj: any = {};
|
|
1018
|
-
if (message.minDeposit?.length) {
|
|
1019
|
-
obj.minDeposit = message.minDeposit.map((e) => Coin.toJSON(e));
|
|
1020
|
-
}
|
|
1021
|
-
if (message.maxDepositPeriod !== undefined) {
|
|
1022
|
-
obj.maxDepositPeriod = Duration.toJSON(message.maxDepositPeriod);
|
|
1023
|
-
}
|
|
1024
|
-
return obj;
|
|
1025
|
-
},
|
|
1026
|
-
|
|
1027
|
-
create<I extends Exact<DeepPartial<DepositParams>, I>>(base?: I): DepositParams {
|
|
1028
|
-
return DepositParams.fromPartial(base ?? ({} as any));
|
|
1029
|
-
},
|
|
1030
|
-
fromPartial<I extends Exact<DeepPartial<DepositParams>, I>>(object: I): DepositParams {
|
|
1031
|
-
const message = createBaseDepositParams();
|
|
1032
|
-
message.minDeposit = object.minDeposit?.map((e) => Coin.fromPartial(e)) || [];
|
|
1033
|
-
message.maxDepositPeriod = (object.maxDepositPeriod !== undefined && object.maxDepositPeriod !== null)
|
|
1034
|
-
? Duration.fromPartial(object.maxDepositPeriod)
|
|
1035
|
-
: undefined;
|
|
1036
|
-
return message;
|
|
1037
|
-
},
|
|
1038
|
-
};
|
|
1039
|
-
|
|
1040
|
-
function createBaseVotingParams(): VotingParams {
|
|
1041
|
-
return { votingPeriod: undefined };
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
export const VotingParams: MessageFns<VotingParams> = {
|
|
1045
|
-
encode(message: VotingParams, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1046
|
-
if (message.votingPeriod !== undefined) {
|
|
1047
|
-
Duration.encode(message.votingPeriod, writer.uint32(10).fork()).join();
|
|
1048
|
-
}
|
|
1049
|
-
return writer;
|
|
1050
|
-
},
|
|
1051
|
-
|
|
1052
|
-
decode(input: BinaryReader | Uint8Array, length?: number): VotingParams {
|
|
1053
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1054
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1055
|
-
const message = createBaseVotingParams();
|
|
1056
|
-
while (reader.pos < end) {
|
|
1057
|
-
const tag = reader.uint32();
|
|
1058
|
-
switch (tag >>> 3) {
|
|
1059
|
-
case 1: {
|
|
1060
|
-
if (tag !== 10) {
|
|
1061
|
-
break;
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
message.votingPeriod = Duration.decode(reader, reader.uint32());
|
|
1065
|
-
continue;
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1069
|
-
break;
|
|
1070
|
-
}
|
|
1071
|
-
reader.skip(tag & 7);
|
|
1072
|
-
}
|
|
1073
|
-
return message;
|
|
1074
|
-
},
|
|
1075
|
-
|
|
1076
|
-
fromJSON(object: any): VotingParams {
|
|
1077
|
-
return { votingPeriod: isSet(object.votingPeriod) ? Duration.fromJSON(object.votingPeriod) : undefined };
|
|
1078
|
-
},
|
|
1079
|
-
|
|
1080
|
-
toJSON(message: VotingParams): unknown {
|
|
1081
|
-
const obj: any = {};
|
|
1082
|
-
if (message.votingPeriod !== undefined) {
|
|
1083
|
-
obj.votingPeriod = Duration.toJSON(message.votingPeriod);
|
|
1084
|
-
}
|
|
1085
|
-
return obj;
|
|
1086
|
-
},
|
|
1087
|
-
|
|
1088
|
-
create<I extends Exact<DeepPartial<VotingParams>, I>>(base?: I): VotingParams {
|
|
1089
|
-
return VotingParams.fromPartial(base ?? ({} as any));
|
|
1090
|
-
},
|
|
1091
|
-
fromPartial<I extends Exact<DeepPartial<VotingParams>, I>>(object: I): VotingParams {
|
|
1092
|
-
const message = createBaseVotingParams();
|
|
1093
|
-
message.votingPeriod = (object.votingPeriod !== undefined && object.votingPeriod !== null)
|
|
1094
|
-
? Duration.fromPartial(object.votingPeriod)
|
|
1095
|
-
: undefined;
|
|
1096
|
-
return message;
|
|
1097
|
-
},
|
|
1098
|
-
};
|
|
1099
|
-
|
|
1100
|
-
function createBaseTallyParams(): TallyParams {
|
|
1101
|
-
return { quorum: new Uint8Array(0), threshold: new Uint8Array(0), vetoThreshold: new Uint8Array(0) };
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
export const TallyParams: MessageFns<TallyParams> = {
|
|
1105
|
-
encode(message: TallyParams, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1106
|
-
if (message.quorum.length !== 0) {
|
|
1107
|
-
writer.uint32(10).bytes(message.quorum);
|
|
1108
|
-
}
|
|
1109
|
-
if (message.threshold.length !== 0) {
|
|
1110
|
-
writer.uint32(18).bytes(message.threshold);
|
|
1111
|
-
}
|
|
1112
|
-
if (message.vetoThreshold.length !== 0) {
|
|
1113
|
-
writer.uint32(26).bytes(message.vetoThreshold);
|
|
1114
|
-
}
|
|
1115
|
-
return writer;
|
|
1116
|
-
},
|
|
1117
|
-
|
|
1118
|
-
decode(input: BinaryReader | Uint8Array, length?: number): TallyParams {
|
|
1119
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1120
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1121
|
-
const message = createBaseTallyParams();
|
|
1122
|
-
while (reader.pos < end) {
|
|
1123
|
-
const tag = reader.uint32();
|
|
1124
|
-
switch (tag >>> 3) {
|
|
1125
|
-
case 1: {
|
|
1126
|
-
if (tag !== 10) {
|
|
1127
|
-
break;
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
message.quorum = reader.bytes();
|
|
1131
|
-
continue;
|
|
1132
|
-
}
|
|
1133
|
-
case 2: {
|
|
1134
|
-
if (tag !== 18) {
|
|
1135
|
-
break;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
message.threshold = reader.bytes();
|
|
1139
|
-
continue;
|
|
1140
|
-
}
|
|
1141
|
-
case 3: {
|
|
1142
|
-
if (tag !== 26) {
|
|
1143
|
-
break;
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
message.vetoThreshold = reader.bytes();
|
|
1147
|
-
continue;
|
|
1148
|
-
}
|
|
1149
|
-
}
|
|
1150
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1151
|
-
break;
|
|
1152
|
-
}
|
|
1153
|
-
reader.skip(tag & 7);
|
|
1154
|
-
}
|
|
1155
|
-
return message;
|
|
1156
|
-
},
|
|
1157
|
-
|
|
1158
|
-
fromJSON(object: any): TallyParams {
|
|
1159
|
-
return {
|
|
1160
|
-
quorum: isSet(object.quorum) ? bytesFromBase64(object.quorum) : new Uint8Array(0),
|
|
1161
|
-
threshold: isSet(object.threshold) ? bytesFromBase64(object.threshold) : new Uint8Array(0),
|
|
1162
|
-
vetoThreshold: isSet(object.vetoThreshold) ? bytesFromBase64(object.vetoThreshold) : new Uint8Array(0),
|
|
1163
|
-
};
|
|
1164
|
-
},
|
|
1165
|
-
|
|
1166
|
-
toJSON(message: TallyParams): unknown {
|
|
1167
|
-
const obj: any = {};
|
|
1168
|
-
if (message.quorum.length !== 0) {
|
|
1169
|
-
obj.quorum = base64FromBytes(message.quorum);
|
|
1170
|
-
}
|
|
1171
|
-
if (message.threshold.length !== 0) {
|
|
1172
|
-
obj.threshold = base64FromBytes(message.threshold);
|
|
1173
|
-
}
|
|
1174
|
-
if (message.vetoThreshold.length !== 0) {
|
|
1175
|
-
obj.vetoThreshold = base64FromBytes(message.vetoThreshold);
|
|
1176
|
-
}
|
|
1177
|
-
return obj;
|
|
1178
|
-
},
|
|
1179
|
-
|
|
1180
|
-
create<I extends Exact<DeepPartial<TallyParams>, I>>(base?: I): TallyParams {
|
|
1181
|
-
return TallyParams.fromPartial(base ?? ({} as any));
|
|
1182
|
-
},
|
|
1183
|
-
fromPartial<I extends Exact<DeepPartial<TallyParams>, I>>(object: I): TallyParams {
|
|
1184
|
-
const message = createBaseTallyParams();
|
|
1185
|
-
message.quorum = object.quorum ?? new Uint8Array(0);
|
|
1186
|
-
message.threshold = object.threshold ?? new Uint8Array(0);
|
|
1187
|
-
message.vetoThreshold = object.vetoThreshold ?? new Uint8Array(0);
|
|
1188
|
-
return message;
|
|
1189
|
-
},
|
|
1190
|
-
};
|
|
1191
|
-
|
|
1192
|
-
function bytesFromBase64(b64: string): Uint8Array {
|
|
1193
|
-
if ((globalThis as any).Buffer) {
|
|
1194
|
-
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
1195
|
-
} else {
|
|
1196
|
-
const bin = globalThis.atob(b64);
|
|
1197
|
-
const arr = new Uint8Array(bin.length);
|
|
1198
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
1199
|
-
arr[i] = bin.charCodeAt(i);
|
|
1200
|
-
}
|
|
1201
|
-
return arr;
|
|
1202
|
-
}
|
|
1203
|
-
}
|
|
1204
|
-
|
|
1205
|
-
function base64FromBytes(arr: Uint8Array): string {
|
|
1206
|
-
if ((globalThis as any).Buffer) {
|
|
1207
|
-
return globalThis.Buffer.from(arr).toString("base64");
|
|
1208
|
-
} else {
|
|
1209
|
-
const bin: string[] = [];
|
|
1210
|
-
arr.forEach((byte) => {
|
|
1211
|
-
bin.push(globalThis.String.fromCharCode(byte));
|
|
1212
|
-
});
|
|
1213
|
-
return globalThis.btoa(bin.join(""));
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1216
|
-
|
|
1217
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
1218
|
-
|
|
1219
|
-
export type DeepPartial<T> = T extends Builtin ? T
|
|
1220
|
-
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
1221
|
-
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
1222
|
-
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
1223
|
-
: Partial<T>;
|
|
1224
|
-
|
|
1225
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
1226
|
-
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
1227
|
-
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
1228
|
-
|
|
1229
|
-
function toTimestamp(date: Date): Timestamp {
|
|
1230
|
-
const seconds = Math.trunc(date.getTime() / 1_000);
|
|
1231
|
-
const nanos = (date.getTime() % 1_000) * 1_000_000;
|
|
1232
|
-
return { seconds, nanos };
|
|
1233
|
-
}
|
|
1234
|
-
|
|
1235
|
-
function fromTimestamp(t: Timestamp): Date {
|
|
1236
|
-
let millis = (t.seconds || 0) * 1_000;
|
|
1237
|
-
millis += (t.nanos || 0) / 1_000_000;
|
|
1238
|
-
return new globalThis.Date(millis);
|
|
1239
|
-
}
|
|
1240
|
-
|
|
1241
|
-
function fromJsonTimestamp(o: any): Date {
|
|
1242
|
-
if (o instanceof globalThis.Date) {
|
|
1243
|
-
return o;
|
|
1244
|
-
} else if (typeof o === "string") {
|
|
1245
|
-
return new globalThis.Date(o);
|
|
1246
|
-
} else {
|
|
1247
|
-
return fromTimestamp(Timestamp.fromJSON(o));
|
|
1248
|
-
}
|
|
1249
|
-
}
|
|
1250
|
-
|
|
1251
|
-
function longToNumber(int64: { toString(): string }): number {
|
|
1252
|
-
const num = globalThis.Number(int64.toString());
|
|
1253
|
-
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
1254
|
-
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
1255
|
-
}
|
|
1256
|
-
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
1257
|
-
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
1258
|
-
}
|
|
1259
|
-
return num;
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
function isSet(value: any): boolean {
|
|
1263
|
-
return value !== null && value !== undefined;
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
export interface MessageFns<T> {
|
|
1267
|
-
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
1268
|
-
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
1269
|
-
fromJSON(object: any): T;
|
|
1270
|
-
toJSON(message: T): unknown;
|
|
1271
|
-
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
1272
|
-
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
1273
|
-
}
|