@agoric/cosmic-proto 0.5.0-u19.2 → 0.5.0-u20.0
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/dist/address-hooks.d.ts +4 -3
- package/dist/address-hooks.js +1 -217
- package/dist/address-hooks.js.map +1 -1
- package/dist/codegen/agoric/bundle.js +1 -51
- package/dist/codegen/agoric/lien/genesis.js +1 -143
- package/dist/codegen/agoric/lien/lien.js +1 -87
- package/dist/codegen/agoric/swingset/genesis.js +1 -181
- package/dist/codegen/agoric/swingset/msgs.js +1 -700
- package/dist/codegen/agoric/swingset/query.js +1 -356
- package/dist/codegen/agoric/swingset/swingset.js +1 -816
- package/dist/codegen/agoric/vbank/genesis.js +1 -82
- package/dist/codegen/agoric/vbank/msgs.js +1 -2
- package/dist/codegen/agoric/vbank/query.js +1 -222
- package/dist/codegen/agoric/vbank/vbank.js +1 -237
- package/dist/codegen/agoric/vibc/msgs.js +1 -127
- package/dist/codegen/agoric/vlocalchain/vlocalchain.js +1 -307
- package/dist/codegen/agoric/vstorage/genesis.js +1 -138
- package/dist/codegen/agoric/vstorage/query.js +1 -441
- package/dist/codegen/agoric/vstorage/vstorage.js +1 -128
- package/dist/codegen/agoric/vtransfer/genesis.js +1 -70
- package/dist/codegen/amino/amino.js +1 -2
- package/dist/codegen/amino/bundle.js +1 -6
- package/dist/codegen/binary.js +1 -367
- package/dist/codegen/circle/bundle.d.ts +0 -506
- package/dist/codegen/circle/bundle.js +1 -40
- package/dist/codegen/circle/cctp/v1/attester.js +1 -63
- package/dist/codegen/circle/cctp/v1/burn_message.js +1 -117
- package/dist/codegen/circle/cctp/v1/burning_and_minting_paused.js +1 -63
- package/dist/codegen/circle/cctp/v1/events.js +1 -1612
- package/dist/codegen/circle/cctp/v1/genesis.js +1 -295
- package/dist/codegen/circle/cctp/v1/max_message_body_size.js +1 -69
- package/dist/codegen/circle/cctp/v1/message.js +1 -160
- package/dist/codegen/circle/cctp/v1/nonce.js +1 -80
- package/dist/codegen/circle/cctp/v1/per_message_burn_limit.js +1 -73
- package/dist/codegen/circle/cctp/v1/query.js +1 -2421
- package/dist/codegen/circle/cctp/v1/remote_token_messenger.js +1 -77
- package/dist/codegen/circle/cctp/v1/sending_and_receiving_messages_paused.js +1 -63
- package/dist/codegen/circle/cctp/v1/signature_threshold.js +1 -63
- package/dist/codegen/circle/cctp/v1/token_pair.js +1 -91
- package/dist/codegen/circle/cctp/v1/tx.d.ts +0 -998
- package/dist/codegen/circle/cctp/v1/tx.js +1 -3264
- package/dist/codegen/circle/cctp/v1/tx.js.map +1 -1
- package/dist/codegen/cosmos/auth/v1beta1/auth.js +1 -337
- package/dist/codegen/cosmos/auth/v1beta1/genesis.js +1 -86
- package/dist/codegen/cosmos/auth/v1beta1/query.js +1 -1113
- package/dist/codegen/cosmos/authz/v1beta1/authz.js +1 -334
- package/dist/codegen/cosmos/authz/v1beta1/event.js +1 -161
- package/dist/codegen/cosmos/authz/v1beta1/genesis.js +1 -71
- package/dist/codegen/cosmos/authz/v1beta1/query.js +1 -506
- package/dist/codegen/cosmos/authz/v1beta1/tx.js +1 -415
- package/dist/codegen/cosmos/bank/v1beta1/authz.js +1 -71
- package/dist/codegen/cosmos/bank/v1beta1/bank.js +1 -592
- package/dist/codegen/cosmos/bank/v1beta1/genesis.js +1 -196
- package/dist/codegen/cosmos/bank/v1beta1/query.js +1 -1347
- package/dist/codegen/cosmos/bank/v1beta1/tx.js +1 -267
- package/dist/codegen/cosmos/base/abci/v1beta1/abci.js +1 -1012
- package/dist/codegen/cosmos/base/node/v1beta1/query.js +1 -112
- package/dist/codegen/cosmos/base/query/v1beta1/pagination.js +1 -189
- package/dist/codegen/cosmos/base/reflection/v2alpha1/reflection.js +1 -1755
- package/dist/codegen/cosmos/base/v1beta1/coin.js +1 -257
- package/dist/codegen/cosmos/bundle.js +1 -249
- package/dist/codegen/cosmos/crypto/ed25519/keys.js +1 -123
- package/dist/codegen/cosmos/crypto/hd/v1/hd.js +1 -109
- package/dist/codegen/cosmos/crypto/keyring/v1/record.js +1 -367
- package/dist/codegen/cosmos/crypto/multisig/keys.js +1 -82
- package/dist/codegen/cosmos/crypto/multisig/v1beta1/multisig.js +1 -144
- package/dist/codegen/cosmos/crypto/secp256k1/keys.js +1 -123
- package/dist/codegen/cosmos/crypto/secp256r1/keys.js +1 -125
- package/dist/codegen/cosmos/distribution/v1beta1/distribution.js +1 -978
- package/dist/codegen/cosmos/distribution/v1beta1/genesis.js +1 -837
- package/dist/codegen/cosmos/distribution/v1beta1/query.js +1 -1207
- package/dist/codegen/cosmos/distribution/v1beta1/tx.js +1 -512
- package/dist/codegen/cosmos/feegrant/v1beta1/feegrant.js +1 -412
- package/dist/codegen/cosmos/feegrant/v1beta1/genesis.js +1 -71
- package/dist/codegen/cosmos/feegrant/v1beta1/query.js +1 -461
- package/dist/codegen/cosmos/feegrant/v1beta1/tx.js +1 -267
- package/dist/codegen/cosmos/gov/v1/genesis.js +1 -177
- package/dist/codegen/cosmos/gov/v1/gov.js +1 -928
- package/dist/codegen/cosmos/gov/v1/query.js +1 -1216
- package/dist/codegen/cosmos/gov/v1/tx.js +1 -730
- package/dist/codegen/cosmos/gov/v1beta1/genesis.js +1 -177
- package/dist/codegen/cosmos/gov/v1beta1/gov.js +1 -1003
- package/dist/codegen/cosmos/gov/v1beta1/query.js +1 -1216
- package/dist/codegen/cosmos/gov/v1beta1/tx.js +1 -578
- package/dist/codegen/cosmos/group/v1/events.js +1 -696
- package/dist/codegen/cosmos/group/v1/genesis.js +1 -190
- package/dist/codegen/cosmos/group/v1/query.js +1 -2096
- package/dist/codegen/cosmos/group/v1/tx.js +1 -2073
- package/dist/codegen/cosmos/group/v1/types.js +1 -1387
- package/dist/codegen/cosmos/mint/v1beta1/genesis.js +1 -82
- package/dist/codegen/cosmos/mint/v1beta1/mint.js +1 -211
- package/dist/codegen/cosmos/mint/v1beta1/query.js +1 -330
- package/dist/codegen/cosmos/msg/v1/msg.js +1 -2
- package/dist/codegen/cosmos/params/v1beta1/params.js +1 -171
- package/dist/codegen/cosmos/params/v1beta1/query.js +1 -327
- package/dist/codegen/cosmos/staking/v1beta1/authz.js +1 -240
- package/dist/codegen/cosmos/staking/v1beta1/genesis.js +1 -256
- package/dist/codegen/cosmos/staking/v1beta1/query.js +1 -2069
- package/dist/codegen/cosmos/staking/v1beta1/staking.js +1 -1915
- package/dist/codegen/cosmos/staking/v1beta1/tx.js +1 -968
- package/dist/codegen/cosmos/tx/signing/v1beta1/signing.js +1 -516
- package/dist/codegen/cosmos/tx/v1beta1/service.js +1 -975
- package/dist/codegen/cosmos/tx/v1beta1/tx.js +1 -1256
- package/dist/codegen/cosmos/upgrade/v1beta1/query.js +1 -592
- package/dist/codegen/cosmos/upgrade/v1beta1/tx.js +1 -228
- package/dist/codegen/cosmos/upgrade/v1beta1/upgrade.js +1 -352
- package/dist/codegen/cosmos/vesting/v1beta1/tx.js +1 -865
- package/dist/codegen/cosmos/vesting/v1beta1/vesting.js +1 -674
- package/dist/codegen/cosmos_proto/bundle.js +1 -6
- package/dist/codegen/cosmos_proto/cosmos.js +1 -208
- package/dist/codegen/gogoproto/bundle.js +1 -6
- package/dist/codegen/gogoproto/gogo.js +1 -2
- package/dist/codegen/google/api/annotations.js +1 -2
- package/dist/codegen/google/api/http.js +1 -319
- package/dist/codegen/google/bundle.js +1 -17
- package/dist/codegen/google/protobuf/any.js +1 -77
- package/dist/codegen/google/protobuf/descriptor.js +1 -3421
- package/dist/codegen/google/protobuf/duration.js +1 -79
- package/dist/codegen/google/protobuf/empty.js +1 -50
- package/dist/codegen/google/protobuf/timestamp.js +1 -79
- package/dist/codegen/helpers.js +1 -196
- package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/controller.js +1 -66
- package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/query.js +1 -243
- package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/tx.js +1 -314
- package/dist/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis.js +1 -503
- package/dist/codegen/ibc/applications/interchain_accounts/host/v1/host.js +1 -83
- package/dist/codegen/ibc/applications/interchain_accounts/host/v1/query.js +1 -114
- package/dist/codegen/ibc/applications/interchain_accounts/v1/account.js +1 -86
- package/dist/codegen/ibc/applications/interchain_accounts/v1/metadata.js +1 -119
- package/dist/codegen/ibc/applications/interchain_accounts/v1/packet.js +1 -190
- package/dist/codegen/ibc/applications/transfer/v1/authz.js +1 -178
- package/dist/codegen/ibc/applications/transfer/v1/genesis.js +1 -96
- package/dist/codegen/ibc/applications/transfer/v1/query.js +1 -634
- package/dist/codegen/ibc/applications/transfer/v1/transfer.js +1 -147
- package/dist/codegen/ibc/applications/transfer/v1/tx.js +1 -220
- package/dist/codegen/ibc/applications/transfer/v2/packet.js +1 -103
- package/dist/codegen/ibc/bundle.js +1 -142
- package/dist/codegen/ibc/core/channel/v1/channel.js +1 -845
- package/dist/codegen/ibc/core/channel/v1/genesis.js +1 -281
- package/dist/codegen/ibc/core/channel/v1/query.js +1 -2344
- package/dist/codegen/ibc/core/channel/v1/tx.js +1 -1745
- package/dist/codegen/ibc/core/client/v1/client.js +1 -583
- package/dist/codegen/ibc/core/client/v1/genesis.js +1 -301
- package/dist/codegen/ibc/core/client/v1/query.js +1 -1283
- package/dist/codegen/ibc/core/client/v1/tx.js +1 -587
- package/dist/codegen/ibc/core/commitment/v1/commitment.js +1 -259
- package/dist/codegen/ibc/core/connection/v1/connection.js +1 -678
- package/dist/codegen/ibc/core/connection/v1/genesis.js +1 -122
- package/dist/codegen/ibc/core/connection/v1/query.js +1 -952
- package/dist/codegen/ibc/core/connection/v1/tx.js +1 -843
- package/dist/codegen/ibc/lightclients/localhost/v1/localhost.js +1 -78
- package/dist/codegen/ibc/lightclients/solomachine/v1/solomachine.js +1 -1520
- package/dist/codegen/ibc/lightclients/solomachine/v2/solomachine.js +1 -1514
- package/dist/codegen/ibc/lightclients/tendermint/v1/tendermint.js +1 -628
- package/dist/codegen/icq/bundle.js +1 -17
- package/dist/codegen/icq/v1/genesis.js +1 -78
- package/dist/codegen/icq/v1/icq.js +1 -83
- package/dist/codegen/icq/v1/packet.js +1 -270
- package/dist/codegen/icq/v1/query.js +1 -114
- package/dist/codegen/icq/v1/tx.js +1 -124
- package/dist/codegen/ics23/bundle.js +1 -6
- package/dist/codegen/index.js +1 -23
- package/dist/codegen/json-safe.js +1 -8
- package/dist/codegen/proofs.js +1 -1436
- package/dist/codegen/stride/bundle.js +1 -71
- package/dist/codegen/stride/epochs/genesis.js +1 -227
- package/dist/codegen/stride/epochs/query.js +1 -398
- package/dist/codegen/stride/records/callbacks.js +1 -136
- package/dist/codegen/stride/records/genesis.js +1 -186
- package/dist/codegen/stride/records/params.js +1 -50
- package/dist/codegen/stride/records/query.js +1 -1552
- package/dist/codegen/stride/records/records.js +1 -939
- package/dist/codegen/stride/stakedym/genesis.js +1 -312
- package/dist/codegen/stride/stakedym/query.js +1 -887
- package/dist/codegen/stride/stakedym/stakedym.js +1 -909
- package/dist/codegen/stride/stakedym/tx.js +1 -1661
- package/dist/codegen/stride/stakeibc/address_unbonding.js +1 -135
- package/dist/codegen/stride/stakeibc/callbacks.js +1 -1191
- package/dist/codegen/stride/stakeibc/epoch_tracker.js +1 -115
- package/dist/codegen/stride/stakeibc/genesis.js +1 -135
- package/dist/codegen/stride/stakeibc/gov.js +1 -212
- package/dist/codegen/stride/stakeibc/host_zone.js +1 -544
- package/dist/codegen/stride/stakeibc/ica_account.js +1 -165
- package/dist/codegen/stride/stakeibc/packet.js +1 -113
- package/dist/codegen/stride/stakeibc/params.js +1 -317
- package/dist/codegen/stride/stakeibc/query.js +1 -1372
- package/dist/codegen/stride/stakeibc/trade_route.js +1 -377
- package/dist/codegen/stride/stakeibc/tx.js +1 -3392
- package/dist/codegen/stride/stakeibc/validator.js +1 -170
- package/dist/codegen/stride/staketia/genesis.js +1 -312
- package/dist/codegen/stride/staketia/query.js +1 -887
- package/dist/codegen/stride/staketia/staketia.js +1 -819
- package/dist/codegen/stride/staketia/tx.js +1 -1671
- package/dist/codegen/tendermint/abci/types.d.ts +264 -692
- package/dist/codegen/tendermint/abci/types.js +1 -4434
- package/dist/codegen/tendermint/abci/types.js.map +1 -1
- package/dist/codegen/tendermint/bundle.d.ts +0 -272
- package/dist/codegen/tendermint/bundle.js +1 -42
- package/dist/codegen/tendermint/crypto/keys.js +1 -85
- package/dist/codegen/tendermint/crypto/proof.js +1 -409
- package/dist/codegen/tendermint/libs/bits/types.js +1 -94
- package/dist/codegen/tendermint/p2p/types.js +1 -506
- package/dist/codegen/tendermint/types/block.js +1 -119
- package/dist/codegen/tendermint/types/evidence.js +1 -415
- package/dist/codegen/tendermint/types/params.js +1 -529
- package/dist/codegen/tendermint/types/types.js +1 -1534
- package/dist/codegen/tendermint/types/validator.js +1 -299
- package/dist/codegen/tendermint/version/types.js +1 -155
- package/dist/codegen/utf8.js +1 -138
- package/dist/codegen/varint.js +1 -409
- package/dist/helpers.js +1 -22
- package/dist/index.js +1 -6
- package/package.json +12 -10
|
@@ -1,1003 +1 @@
|
|
|
1
|
-
//@ts-nocheck
|
|
2
|
-
import { Coin } from '../../base/v1beta1/coin.js';
|
|
3
|
-
import { Any } from '../../../google/protobuf/any.js';
|
|
4
|
-
import { Timestamp, } from '../../../google/protobuf/timestamp.js';
|
|
5
|
-
import { Duration, } from '../../../google/protobuf/duration.js';
|
|
6
|
-
import { BinaryReader, BinaryWriter } from '../../../binary.js';
|
|
7
|
-
import { Decimal, isSet, fromJsonTimestamp, fromTimestamp, bytesFromBase64, base64FromBytes, } from '../../../helpers.js';
|
|
8
|
-
import {} from '../../../json-safe.js';
|
|
9
|
-
/** VoteOption enumerates the valid vote options for a given governance proposal. */
|
|
10
|
-
export var VoteOption;
|
|
11
|
-
(function (VoteOption) {
|
|
12
|
-
/** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */
|
|
13
|
-
VoteOption[VoteOption["VOTE_OPTION_UNSPECIFIED"] = 0] = "VOTE_OPTION_UNSPECIFIED";
|
|
14
|
-
/** VOTE_OPTION_YES - VOTE_OPTION_YES defines a yes vote option. */
|
|
15
|
-
VoteOption[VoteOption["VOTE_OPTION_YES"] = 1] = "VOTE_OPTION_YES";
|
|
16
|
-
/** VOTE_OPTION_ABSTAIN - VOTE_OPTION_ABSTAIN defines an abstain vote option. */
|
|
17
|
-
VoteOption[VoteOption["VOTE_OPTION_ABSTAIN"] = 2] = "VOTE_OPTION_ABSTAIN";
|
|
18
|
-
/** VOTE_OPTION_NO - VOTE_OPTION_NO defines a no vote option. */
|
|
19
|
-
VoteOption[VoteOption["VOTE_OPTION_NO"] = 3] = "VOTE_OPTION_NO";
|
|
20
|
-
/** VOTE_OPTION_NO_WITH_VETO - VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */
|
|
21
|
-
VoteOption[VoteOption["VOTE_OPTION_NO_WITH_VETO"] = 4] = "VOTE_OPTION_NO_WITH_VETO";
|
|
22
|
-
VoteOption[VoteOption["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
23
|
-
})(VoteOption || (VoteOption = {}));
|
|
24
|
-
export const VoteOptionSDKType = VoteOption;
|
|
25
|
-
export function voteOptionFromJSON(object) {
|
|
26
|
-
switch (object) {
|
|
27
|
-
case 0:
|
|
28
|
-
case 'VOTE_OPTION_UNSPECIFIED':
|
|
29
|
-
return VoteOption.VOTE_OPTION_UNSPECIFIED;
|
|
30
|
-
case 1:
|
|
31
|
-
case 'VOTE_OPTION_YES':
|
|
32
|
-
return VoteOption.VOTE_OPTION_YES;
|
|
33
|
-
case 2:
|
|
34
|
-
case 'VOTE_OPTION_ABSTAIN':
|
|
35
|
-
return VoteOption.VOTE_OPTION_ABSTAIN;
|
|
36
|
-
case 3:
|
|
37
|
-
case 'VOTE_OPTION_NO':
|
|
38
|
-
return VoteOption.VOTE_OPTION_NO;
|
|
39
|
-
case 4:
|
|
40
|
-
case 'VOTE_OPTION_NO_WITH_VETO':
|
|
41
|
-
return VoteOption.VOTE_OPTION_NO_WITH_VETO;
|
|
42
|
-
case -1:
|
|
43
|
-
case 'UNRECOGNIZED':
|
|
44
|
-
default:
|
|
45
|
-
return VoteOption.UNRECOGNIZED;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
export function voteOptionToJSON(object) {
|
|
49
|
-
switch (object) {
|
|
50
|
-
case VoteOption.VOTE_OPTION_UNSPECIFIED:
|
|
51
|
-
return 'VOTE_OPTION_UNSPECIFIED';
|
|
52
|
-
case VoteOption.VOTE_OPTION_YES:
|
|
53
|
-
return 'VOTE_OPTION_YES';
|
|
54
|
-
case VoteOption.VOTE_OPTION_ABSTAIN:
|
|
55
|
-
return 'VOTE_OPTION_ABSTAIN';
|
|
56
|
-
case VoteOption.VOTE_OPTION_NO:
|
|
57
|
-
return 'VOTE_OPTION_NO';
|
|
58
|
-
case VoteOption.VOTE_OPTION_NO_WITH_VETO:
|
|
59
|
-
return 'VOTE_OPTION_NO_WITH_VETO';
|
|
60
|
-
case VoteOption.UNRECOGNIZED:
|
|
61
|
-
default:
|
|
62
|
-
return 'UNRECOGNIZED';
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
/** ProposalStatus enumerates the valid statuses of a proposal. */
|
|
66
|
-
export var ProposalStatus;
|
|
67
|
-
(function (ProposalStatus) {
|
|
68
|
-
/** PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. */
|
|
69
|
-
ProposalStatus[ProposalStatus["PROPOSAL_STATUS_UNSPECIFIED"] = 0] = "PROPOSAL_STATUS_UNSPECIFIED";
|
|
70
|
-
/**
|
|
71
|
-
* PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit
|
|
72
|
-
* period.
|
|
73
|
-
*/
|
|
74
|
-
ProposalStatus[ProposalStatus["PROPOSAL_STATUS_DEPOSIT_PERIOD"] = 1] = "PROPOSAL_STATUS_DEPOSIT_PERIOD";
|
|
75
|
-
/**
|
|
76
|
-
* PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting
|
|
77
|
-
* period.
|
|
78
|
-
*/
|
|
79
|
-
ProposalStatus[ProposalStatus["PROPOSAL_STATUS_VOTING_PERIOD"] = 2] = "PROPOSAL_STATUS_VOTING_PERIOD";
|
|
80
|
-
/**
|
|
81
|
-
* PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has
|
|
82
|
-
* passed.
|
|
83
|
-
*/
|
|
84
|
-
ProposalStatus[ProposalStatus["PROPOSAL_STATUS_PASSED"] = 3] = "PROPOSAL_STATUS_PASSED";
|
|
85
|
-
/**
|
|
86
|
-
* PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has
|
|
87
|
-
* been rejected.
|
|
88
|
-
*/
|
|
89
|
-
ProposalStatus[ProposalStatus["PROPOSAL_STATUS_REJECTED"] = 4] = "PROPOSAL_STATUS_REJECTED";
|
|
90
|
-
/**
|
|
91
|
-
* PROPOSAL_STATUS_FAILED - PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has
|
|
92
|
-
* failed.
|
|
93
|
-
*/
|
|
94
|
-
ProposalStatus[ProposalStatus["PROPOSAL_STATUS_FAILED"] = 5] = "PROPOSAL_STATUS_FAILED";
|
|
95
|
-
ProposalStatus[ProposalStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
96
|
-
})(ProposalStatus || (ProposalStatus = {}));
|
|
97
|
-
export const ProposalStatusSDKType = ProposalStatus;
|
|
98
|
-
export function proposalStatusFromJSON(object) {
|
|
99
|
-
switch (object) {
|
|
100
|
-
case 0:
|
|
101
|
-
case 'PROPOSAL_STATUS_UNSPECIFIED':
|
|
102
|
-
return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED;
|
|
103
|
-
case 1:
|
|
104
|
-
case 'PROPOSAL_STATUS_DEPOSIT_PERIOD':
|
|
105
|
-
return ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD;
|
|
106
|
-
case 2:
|
|
107
|
-
case 'PROPOSAL_STATUS_VOTING_PERIOD':
|
|
108
|
-
return ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD;
|
|
109
|
-
case 3:
|
|
110
|
-
case 'PROPOSAL_STATUS_PASSED':
|
|
111
|
-
return ProposalStatus.PROPOSAL_STATUS_PASSED;
|
|
112
|
-
case 4:
|
|
113
|
-
case 'PROPOSAL_STATUS_REJECTED':
|
|
114
|
-
return ProposalStatus.PROPOSAL_STATUS_REJECTED;
|
|
115
|
-
case 5:
|
|
116
|
-
case 'PROPOSAL_STATUS_FAILED':
|
|
117
|
-
return ProposalStatus.PROPOSAL_STATUS_FAILED;
|
|
118
|
-
case -1:
|
|
119
|
-
case 'UNRECOGNIZED':
|
|
120
|
-
default:
|
|
121
|
-
return ProposalStatus.UNRECOGNIZED;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
export function proposalStatusToJSON(object) {
|
|
125
|
-
switch (object) {
|
|
126
|
-
case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED:
|
|
127
|
-
return 'PROPOSAL_STATUS_UNSPECIFIED';
|
|
128
|
-
case ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD:
|
|
129
|
-
return 'PROPOSAL_STATUS_DEPOSIT_PERIOD';
|
|
130
|
-
case ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD:
|
|
131
|
-
return 'PROPOSAL_STATUS_VOTING_PERIOD';
|
|
132
|
-
case ProposalStatus.PROPOSAL_STATUS_PASSED:
|
|
133
|
-
return 'PROPOSAL_STATUS_PASSED';
|
|
134
|
-
case ProposalStatus.PROPOSAL_STATUS_REJECTED:
|
|
135
|
-
return 'PROPOSAL_STATUS_REJECTED';
|
|
136
|
-
case ProposalStatus.PROPOSAL_STATUS_FAILED:
|
|
137
|
-
return 'PROPOSAL_STATUS_FAILED';
|
|
138
|
-
case ProposalStatus.UNRECOGNIZED:
|
|
139
|
-
default:
|
|
140
|
-
return 'UNRECOGNIZED';
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
function createBaseWeightedVoteOption() {
|
|
144
|
-
return {
|
|
145
|
-
option: 0,
|
|
146
|
-
weight: '',
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
export const WeightedVoteOption = {
|
|
150
|
-
typeUrl: '/cosmos.gov.v1beta1.WeightedVoteOption',
|
|
151
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
152
|
-
if (message.option !== 0) {
|
|
153
|
-
writer.uint32(8).int32(message.option);
|
|
154
|
-
}
|
|
155
|
-
if (message.weight !== '') {
|
|
156
|
-
writer
|
|
157
|
-
.uint32(18)
|
|
158
|
-
.string(Decimal.fromUserInput(message.weight, 18).atomics);
|
|
159
|
-
}
|
|
160
|
-
return writer;
|
|
161
|
-
},
|
|
162
|
-
decode(input, length) {
|
|
163
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
164
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
165
|
-
const message = createBaseWeightedVoteOption();
|
|
166
|
-
while (reader.pos < end) {
|
|
167
|
-
const tag = reader.uint32();
|
|
168
|
-
switch (tag >>> 3) {
|
|
169
|
-
case 1:
|
|
170
|
-
message.option = reader.int32();
|
|
171
|
-
break;
|
|
172
|
-
case 2:
|
|
173
|
-
message.weight = Decimal.fromAtomics(reader.string(), 18).toString();
|
|
174
|
-
break;
|
|
175
|
-
default:
|
|
176
|
-
reader.skipType(tag & 7);
|
|
177
|
-
break;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
return message;
|
|
181
|
-
},
|
|
182
|
-
fromJSON(object) {
|
|
183
|
-
return {
|
|
184
|
-
option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1,
|
|
185
|
-
weight: isSet(object.weight) ? String(object.weight) : '',
|
|
186
|
-
};
|
|
187
|
-
},
|
|
188
|
-
toJSON(message) {
|
|
189
|
-
const obj = {};
|
|
190
|
-
message.option !== undefined &&
|
|
191
|
-
(obj.option = voteOptionToJSON(message.option));
|
|
192
|
-
message.weight !== undefined && (obj.weight = message.weight);
|
|
193
|
-
return obj;
|
|
194
|
-
},
|
|
195
|
-
fromPartial(object) {
|
|
196
|
-
const message = createBaseWeightedVoteOption();
|
|
197
|
-
message.option = object.option ?? 0;
|
|
198
|
-
message.weight = object.weight ?? '';
|
|
199
|
-
return message;
|
|
200
|
-
},
|
|
201
|
-
fromProtoMsg(message) {
|
|
202
|
-
return WeightedVoteOption.decode(message.value);
|
|
203
|
-
},
|
|
204
|
-
toProto(message) {
|
|
205
|
-
return WeightedVoteOption.encode(message).finish();
|
|
206
|
-
},
|
|
207
|
-
toProtoMsg(message) {
|
|
208
|
-
return {
|
|
209
|
-
typeUrl: '/cosmos.gov.v1beta1.WeightedVoteOption',
|
|
210
|
-
value: WeightedVoteOption.encode(message).finish(),
|
|
211
|
-
};
|
|
212
|
-
},
|
|
213
|
-
};
|
|
214
|
-
function createBaseTextProposal() {
|
|
215
|
-
return {
|
|
216
|
-
$typeUrl: '/cosmos.gov.v1beta1.TextProposal',
|
|
217
|
-
title: '',
|
|
218
|
-
description: '',
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
export const TextProposal = {
|
|
222
|
-
typeUrl: '/cosmos.gov.v1beta1.TextProposal',
|
|
223
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
224
|
-
if (message.title !== '') {
|
|
225
|
-
writer.uint32(10).string(message.title);
|
|
226
|
-
}
|
|
227
|
-
if (message.description !== '') {
|
|
228
|
-
writer.uint32(18).string(message.description);
|
|
229
|
-
}
|
|
230
|
-
return writer;
|
|
231
|
-
},
|
|
232
|
-
decode(input, length) {
|
|
233
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
234
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
235
|
-
const message = createBaseTextProposal();
|
|
236
|
-
while (reader.pos < end) {
|
|
237
|
-
const tag = reader.uint32();
|
|
238
|
-
switch (tag >>> 3) {
|
|
239
|
-
case 1:
|
|
240
|
-
message.title = reader.string();
|
|
241
|
-
break;
|
|
242
|
-
case 2:
|
|
243
|
-
message.description = reader.string();
|
|
244
|
-
break;
|
|
245
|
-
default:
|
|
246
|
-
reader.skipType(tag & 7);
|
|
247
|
-
break;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
return message;
|
|
251
|
-
},
|
|
252
|
-
fromJSON(object) {
|
|
253
|
-
return {
|
|
254
|
-
title: isSet(object.title) ? String(object.title) : '',
|
|
255
|
-
description: isSet(object.description) ? String(object.description) : '',
|
|
256
|
-
};
|
|
257
|
-
},
|
|
258
|
-
toJSON(message) {
|
|
259
|
-
const obj = {};
|
|
260
|
-
message.title !== undefined && (obj.title = message.title);
|
|
261
|
-
message.description !== undefined &&
|
|
262
|
-
(obj.description = message.description);
|
|
263
|
-
return obj;
|
|
264
|
-
},
|
|
265
|
-
fromPartial(object) {
|
|
266
|
-
const message = createBaseTextProposal();
|
|
267
|
-
message.title = object.title ?? '';
|
|
268
|
-
message.description = object.description ?? '';
|
|
269
|
-
return message;
|
|
270
|
-
},
|
|
271
|
-
fromProtoMsg(message) {
|
|
272
|
-
return TextProposal.decode(message.value);
|
|
273
|
-
},
|
|
274
|
-
toProto(message) {
|
|
275
|
-
return TextProposal.encode(message).finish();
|
|
276
|
-
},
|
|
277
|
-
toProtoMsg(message) {
|
|
278
|
-
return {
|
|
279
|
-
typeUrl: '/cosmos.gov.v1beta1.TextProposal',
|
|
280
|
-
value: TextProposal.encode(message).finish(),
|
|
281
|
-
};
|
|
282
|
-
},
|
|
283
|
-
};
|
|
284
|
-
function createBaseDeposit() {
|
|
285
|
-
return {
|
|
286
|
-
proposalId: BigInt(0),
|
|
287
|
-
depositor: '',
|
|
288
|
-
amount: [],
|
|
289
|
-
};
|
|
290
|
-
}
|
|
291
|
-
export const Deposit = {
|
|
292
|
-
typeUrl: '/cosmos.gov.v1beta1.Deposit',
|
|
293
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
294
|
-
if (message.proposalId !== BigInt(0)) {
|
|
295
|
-
writer.uint32(8).uint64(message.proposalId);
|
|
296
|
-
}
|
|
297
|
-
if (message.depositor !== '') {
|
|
298
|
-
writer.uint32(18).string(message.depositor);
|
|
299
|
-
}
|
|
300
|
-
for (const v of message.amount) {
|
|
301
|
-
Coin.encode(v, writer.uint32(26).fork()).ldelim();
|
|
302
|
-
}
|
|
303
|
-
return writer;
|
|
304
|
-
},
|
|
305
|
-
decode(input, length) {
|
|
306
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
307
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
308
|
-
const message = createBaseDeposit();
|
|
309
|
-
while (reader.pos < end) {
|
|
310
|
-
const tag = reader.uint32();
|
|
311
|
-
switch (tag >>> 3) {
|
|
312
|
-
case 1:
|
|
313
|
-
message.proposalId = reader.uint64();
|
|
314
|
-
break;
|
|
315
|
-
case 2:
|
|
316
|
-
message.depositor = reader.string();
|
|
317
|
-
break;
|
|
318
|
-
case 3:
|
|
319
|
-
message.amount.push(Coin.decode(reader, reader.uint32()));
|
|
320
|
-
break;
|
|
321
|
-
default:
|
|
322
|
-
reader.skipType(tag & 7);
|
|
323
|
-
break;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
return message;
|
|
327
|
-
},
|
|
328
|
-
fromJSON(object) {
|
|
329
|
-
return {
|
|
330
|
-
proposalId: isSet(object.proposalId)
|
|
331
|
-
? BigInt(object.proposalId.toString())
|
|
332
|
-
: BigInt(0),
|
|
333
|
-
depositor: isSet(object.depositor) ? String(object.depositor) : '',
|
|
334
|
-
amount: Array.isArray(object?.amount)
|
|
335
|
-
? object.amount.map((e) => Coin.fromJSON(e))
|
|
336
|
-
: [],
|
|
337
|
-
};
|
|
338
|
-
},
|
|
339
|
-
toJSON(message) {
|
|
340
|
-
const obj = {};
|
|
341
|
-
message.proposalId !== undefined &&
|
|
342
|
-
(obj.proposalId = (message.proposalId || BigInt(0)).toString());
|
|
343
|
-
message.depositor !== undefined && (obj.depositor = message.depositor);
|
|
344
|
-
if (message.amount) {
|
|
345
|
-
obj.amount = message.amount.map(e => (e ? Coin.toJSON(e) : undefined));
|
|
346
|
-
}
|
|
347
|
-
else {
|
|
348
|
-
obj.amount = [];
|
|
349
|
-
}
|
|
350
|
-
return obj;
|
|
351
|
-
},
|
|
352
|
-
fromPartial(object) {
|
|
353
|
-
const message = createBaseDeposit();
|
|
354
|
-
message.proposalId =
|
|
355
|
-
object.proposalId !== undefined && object.proposalId !== null
|
|
356
|
-
? BigInt(object.proposalId.toString())
|
|
357
|
-
: BigInt(0);
|
|
358
|
-
message.depositor = object.depositor ?? '';
|
|
359
|
-
message.amount = object.amount?.map(e => Coin.fromPartial(e)) || [];
|
|
360
|
-
return message;
|
|
361
|
-
},
|
|
362
|
-
fromProtoMsg(message) {
|
|
363
|
-
return Deposit.decode(message.value);
|
|
364
|
-
},
|
|
365
|
-
toProto(message) {
|
|
366
|
-
return Deposit.encode(message).finish();
|
|
367
|
-
},
|
|
368
|
-
toProtoMsg(message) {
|
|
369
|
-
return {
|
|
370
|
-
typeUrl: '/cosmos.gov.v1beta1.Deposit',
|
|
371
|
-
value: Deposit.encode(message).finish(),
|
|
372
|
-
};
|
|
373
|
-
},
|
|
374
|
-
};
|
|
375
|
-
function createBaseProposal() {
|
|
376
|
-
return {
|
|
377
|
-
proposalId: BigInt(0),
|
|
378
|
-
content: undefined,
|
|
379
|
-
status: 0,
|
|
380
|
-
finalTallyResult: TallyResult.fromPartial({}),
|
|
381
|
-
submitTime: Timestamp.fromPartial({}),
|
|
382
|
-
depositEndTime: Timestamp.fromPartial({}),
|
|
383
|
-
totalDeposit: [],
|
|
384
|
-
votingStartTime: Timestamp.fromPartial({}),
|
|
385
|
-
votingEndTime: Timestamp.fromPartial({}),
|
|
386
|
-
};
|
|
387
|
-
}
|
|
388
|
-
export const Proposal = {
|
|
389
|
-
typeUrl: '/cosmos.gov.v1beta1.Proposal',
|
|
390
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
391
|
-
if (message.proposalId !== BigInt(0)) {
|
|
392
|
-
writer.uint32(8).uint64(message.proposalId);
|
|
393
|
-
}
|
|
394
|
-
if (message.content !== undefined) {
|
|
395
|
-
Any.encode(message.content, writer.uint32(18).fork()).ldelim();
|
|
396
|
-
}
|
|
397
|
-
if (message.status !== 0) {
|
|
398
|
-
writer.uint32(24).int32(message.status);
|
|
399
|
-
}
|
|
400
|
-
if (message.finalTallyResult !== undefined) {
|
|
401
|
-
TallyResult.encode(message.finalTallyResult, writer.uint32(34).fork()).ldelim();
|
|
402
|
-
}
|
|
403
|
-
if (message.submitTime !== undefined) {
|
|
404
|
-
Timestamp.encode(message.submitTime, writer.uint32(42).fork()).ldelim();
|
|
405
|
-
}
|
|
406
|
-
if (message.depositEndTime !== undefined) {
|
|
407
|
-
Timestamp.encode(message.depositEndTime, writer.uint32(50).fork()).ldelim();
|
|
408
|
-
}
|
|
409
|
-
for (const v of message.totalDeposit) {
|
|
410
|
-
Coin.encode(v, writer.uint32(58).fork()).ldelim();
|
|
411
|
-
}
|
|
412
|
-
if (message.votingStartTime !== undefined) {
|
|
413
|
-
Timestamp.encode(message.votingStartTime, writer.uint32(66).fork()).ldelim();
|
|
414
|
-
}
|
|
415
|
-
if (message.votingEndTime !== undefined) {
|
|
416
|
-
Timestamp.encode(message.votingEndTime, writer.uint32(74).fork()).ldelim();
|
|
417
|
-
}
|
|
418
|
-
return writer;
|
|
419
|
-
},
|
|
420
|
-
decode(input, length) {
|
|
421
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
422
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
423
|
-
const message = createBaseProposal();
|
|
424
|
-
while (reader.pos < end) {
|
|
425
|
-
const tag = reader.uint32();
|
|
426
|
-
switch (tag >>> 3) {
|
|
427
|
-
case 1:
|
|
428
|
-
message.proposalId = reader.uint64();
|
|
429
|
-
break;
|
|
430
|
-
case 2:
|
|
431
|
-
message.content = Content_InterfaceDecoder(reader);
|
|
432
|
-
break;
|
|
433
|
-
case 3:
|
|
434
|
-
message.status = reader.int32();
|
|
435
|
-
break;
|
|
436
|
-
case 4:
|
|
437
|
-
message.finalTallyResult = TallyResult.decode(reader, reader.uint32());
|
|
438
|
-
break;
|
|
439
|
-
case 5:
|
|
440
|
-
message.submitTime = Timestamp.decode(reader, reader.uint32());
|
|
441
|
-
break;
|
|
442
|
-
case 6:
|
|
443
|
-
message.depositEndTime = Timestamp.decode(reader, reader.uint32());
|
|
444
|
-
break;
|
|
445
|
-
case 7:
|
|
446
|
-
message.totalDeposit.push(Coin.decode(reader, reader.uint32()));
|
|
447
|
-
break;
|
|
448
|
-
case 8:
|
|
449
|
-
message.votingStartTime = Timestamp.decode(reader, reader.uint32());
|
|
450
|
-
break;
|
|
451
|
-
case 9:
|
|
452
|
-
message.votingEndTime = Timestamp.decode(reader, reader.uint32());
|
|
453
|
-
break;
|
|
454
|
-
default:
|
|
455
|
-
reader.skipType(tag & 7);
|
|
456
|
-
break;
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
return message;
|
|
460
|
-
},
|
|
461
|
-
fromJSON(object) {
|
|
462
|
-
return {
|
|
463
|
-
proposalId: isSet(object.proposalId)
|
|
464
|
-
? BigInt(object.proposalId.toString())
|
|
465
|
-
: BigInt(0),
|
|
466
|
-
content: isSet(object.content) ? Any.fromJSON(object.content) : undefined,
|
|
467
|
-
status: isSet(object.status) ? proposalStatusFromJSON(object.status) : -1,
|
|
468
|
-
finalTallyResult: isSet(object.finalTallyResult)
|
|
469
|
-
? TallyResult.fromJSON(object.finalTallyResult)
|
|
470
|
-
: undefined,
|
|
471
|
-
submitTime: isSet(object.submitTime)
|
|
472
|
-
? fromJsonTimestamp(object.submitTime)
|
|
473
|
-
: undefined,
|
|
474
|
-
depositEndTime: isSet(object.depositEndTime)
|
|
475
|
-
? fromJsonTimestamp(object.depositEndTime)
|
|
476
|
-
: undefined,
|
|
477
|
-
totalDeposit: Array.isArray(object?.totalDeposit)
|
|
478
|
-
? object.totalDeposit.map((e) => Coin.fromJSON(e))
|
|
479
|
-
: [],
|
|
480
|
-
votingStartTime: isSet(object.votingStartTime)
|
|
481
|
-
? fromJsonTimestamp(object.votingStartTime)
|
|
482
|
-
: undefined,
|
|
483
|
-
votingEndTime: isSet(object.votingEndTime)
|
|
484
|
-
? fromJsonTimestamp(object.votingEndTime)
|
|
485
|
-
: undefined,
|
|
486
|
-
};
|
|
487
|
-
},
|
|
488
|
-
toJSON(message) {
|
|
489
|
-
const obj = {};
|
|
490
|
-
message.proposalId !== undefined &&
|
|
491
|
-
(obj.proposalId = (message.proposalId || BigInt(0)).toString());
|
|
492
|
-
message.content !== undefined &&
|
|
493
|
-
(obj.content = message.content ? Any.toJSON(message.content) : undefined);
|
|
494
|
-
message.status !== undefined &&
|
|
495
|
-
(obj.status = proposalStatusToJSON(message.status));
|
|
496
|
-
message.finalTallyResult !== undefined &&
|
|
497
|
-
(obj.finalTallyResult = message.finalTallyResult
|
|
498
|
-
? TallyResult.toJSON(message.finalTallyResult)
|
|
499
|
-
: undefined);
|
|
500
|
-
message.submitTime !== undefined &&
|
|
501
|
-
(obj.submitTime = fromTimestamp(message.submitTime).toISOString());
|
|
502
|
-
message.depositEndTime !== undefined &&
|
|
503
|
-
(obj.depositEndTime = fromTimestamp(message.depositEndTime).toISOString());
|
|
504
|
-
if (message.totalDeposit) {
|
|
505
|
-
obj.totalDeposit = message.totalDeposit.map(e => e ? Coin.toJSON(e) : undefined);
|
|
506
|
-
}
|
|
507
|
-
else {
|
|
508
|
-
obj.totalDeposit = [];
|
|
509
|
-
}
|
|
510
|
-
message.votingStartTime !== undefined &&
|
|
511
|
-
(obj.votingStartTime = fromTimestamp(message.votingStartTime).toISOString());
|
|
512
|
-
message.votingEndTime !== undefined &&
|
|
513
|
-
(obj.votingEndTime = fromTimestamp(message.votingEndTime).toISOString());
|
|
514
|
-
return obj;
|
|
515
|
-
},
|
|
516
|
-
fromPartial(object) {
|
|
517
|
-
const message = createBaseProposal();
|
|
518
|
-
message.proposalId =
|
|
519
|
-
object.proposalId !== undefined && object.proposalId !== null
|
|
520
|
-
? BigInt(object.proposalId.toString())
|
|
521
|
-
: BigInt(0);
|
|
522
|
-
message.content =
|
|
523
|
-
object.content !== undefined && object.content !== null
|
|
524
|
-
? Any.fromPartial(object.content)
|
|
525
|
-
: undefined;
|
|
526
|
-
message.status = object.status ?? 0;
|
|
527
|
-
message.finalTallyResult =
|
|
528
|
-
object.finalTallyResult !== undefined && object.finalTallyResult !== null
|
|
529
|
-
? TallyResult.fromPartial(object.finalTallyResult)
|
|
530
|
-
: undefined;
|
|
531
|
-
message.submitTime =
|
|
532
|
-
object.submitTime !== undefined && object.submitTime !== null
|
|
533
|
-
? Timestamp.fromPartial(object.submitTime)
|
|
534
|
-
: undefined;
|
|
535
|
-
message.depositEndTime =
|
|
536
|
-
object.depositEndTime !== undefined && object.depositEndTime !== null
|
|
537
|
-
? Timestamp.fromPartial(object.depositEndTime)
|
|
538
|
-
: undefined;
|
|
539
|
-
message.totalDeposit =
|
|
540
|
-
object.totalDeposit?.map(e => Coin.fromPartial(e)) || [];
|
|
541
|
-
message.votingStartTime =
|
|
542
|
-
object.votingStartTime !== undefined && object.votingStartTime !== null
|
|
543
|
-
? Timestamp.fromPartial(object.votingStartTime)
|
|
544
|
-
: undefined;
|
|
545
|
-
message.votingEndTime =
|
|
546
|
-
object.votingEndTime !== undefined && object.votingEndTime !== null
|
|
547
|
-
? Timestamp.fromPartial(object.votingEndTime)
|
|
548
|
-
: undefined;
|
|
549
|
-
return message;
|
|
550
|
-
},
|
|
551
|
-
fromProtoMsg(message) {
|
|
552
|
-
return Proposal.decode(message.value);
|
|
553
|
-
},
|
|
554
|
-
toProto(message) {
|
|
555
|
-
return Proposal.encode(message).finish();
|
|
556
|
-
},
|
|
557
|
-
toProtoMsg(message) {
|
|
558
|
-
return {
|
|
559
|
-
typeUrl: '/cosmos.gov.v1beta1.Proposal',
|
|
560
|
-
value: Proposal.encode(message).finish(),
|
|
561
|
-
};
|
|
562
|
-
},
|
|
563
|
-
};
|
|
564
|
-
function createBaseTallyResult() {
|
|
565
|
-
return {
|
|
566
|
-
yes: '',
|
|
567
|
-
abstain: '',
|
|
568
|
-
no: '',
|
|
569
|
-
noWithVeto: '',
|
|
570
|
-
};
|
|
571
|
-
}
|
|
572
|
-
export const TallyResult = {
|
|
573
|
-
typeUrl: '/cosmos.gov.v1beta1.TallyResult',
|
|
574
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
575
|
-
if (message.yes !== '') {
|
|
576
|
-
writer.uint32(10).string(message.yes);
|
|
577
|
-
}
|
|
578
|
-
if (message.abstain !== '') {
|
|
579
|
-
writer.uint32(18).string(message.abstain);
|
|
580
|
-
}
|
|
581
|
-
if (message.no !== '') {
|
|
582
|
-
writer.uint32(26).string(message.no);
|
|
583
|
-
}
|
|
584
|
-
if (message.noWithVeto !== '') {
|
|
585
|
-
writer.uint32(34).string(message.noWithVeto);
|
|
586
|
-
}
|
|
587
|
-
return writer;
|
|
588
|
-
},
|
|
589
|
-
decode(input, length) {
|
|
590
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
591
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
592
|
-
const message = createBaseTallyResult();
|
|
593
|
-
while (reader.pos < end) {
|
|
594
|
-
const tag = reader.uint32();
|
|
595
|
-
switch (tag >>> 3) {
|
|
596
|
-
case 1:
|
|
597
|
-
message.yes = reader.string();
|
|
598
|
-
break;
|
|
599
|
-
case 2:
|
|
600
|
-
message.abstain = reader.string();
|
|
601
|
-
break;
|
|
602
|
-
case 3:
|
|
603
|
-
message.no = reader.string();
|
|
604
|
-
break;
|
|
605
|
-
case 4:
|
|
606
|
-
message.noWithVeto = reader.string();
|
|
607
|
-
break;
|
|
608
|
-
default:
|
|
609
|
-
reader.skipType(tag & 7);
|
|
610
|
-
break;
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
return message;
|
|
614
|
-
},
|
|
615
|
-
fromJSON(object) {
|
|
616
|
-
return {
|
|
617
|
-
yes: isSet(object.yes) ? String(object.yes) : '',
|
|
618
|
-
abstain: isSet(object.abstain) ? String(object.abstain) : '',
|
|
619
|
-
no: isSet(object.no) ? String(object.no) : '',
|
|
620
|
-
noWithVeto: isSet(object.noWithVeto) ? String(object.noWithVeto) : '',
|
|
621
|
-
};
|
|
622
|
-
},
|
|
623
|
-
toJSON(message) {
|
|
624
|
-
const obj = {};
|
|
625
|
-
message.yes !== undefined && (obj.yes = message.yes);
|
|
626
|
-
message.abstain !== undefined && (obj.abstain = message.abstain);
|
|
627
|
-
message.no !== undefined && (obj.no = message.no);
|
|
628
|
-
message.noWithVeto !== undefined && (obj.noWithVeto = message.noWithVeto);
|
|
629
|
-
return obj;
|
|
630
|
-
},
|
|
631
|
-
fromPartial(object) {
|
|
632
|
-
const message = createBaseTallyResult();
|
|
633
|
-
message.yes = object.yes ?? '';
|
|
634
|
-
message.abstain = object.abstain ?? '';
|
|
635
|
-
message.no = object.no ?? '';
|
|
636
|
-
message.noWithVeto = object.noWithVeto ?? '';
|
|
637
|
-
return message;
|
|
638
|
-
},
|
|
639
|
-
fromProtoMsg(message) {
|
|
640
|
-
return TallyResult.decode(message.value);
|
|
641
|
-
},
|
|
642
|
-
toProto(message) {
|
|
643
|
-
return TallyResult.encode(message).finish();
|
|
644
|
-
},
|
|
645
|
-
toProtoMsg(message) {
|
|
646
|
-
return {
|
|
647
|
-
typeUrl: '/cosmos.gov.v1beta1.TallyResult',
|
|
648
|
-
value: TallyResult.encode(message).finish(),
|
|
649
|
-
};
|
|
650
|
-
},
|
|
651
|
-
};
|
|
652
|
-
function createBaseVote() {
|
|
653
|
-
return {
|
|
654
|
-
proposalId: BigInt(0),
|
|
655
|
-
voter: '',
|
|
656
|
-
option: 0,
|
|
657
|
-
options: [],
|
|
658
|
-
};
|
|
659
|
-
}
|
|
660
|
-
export const Vote = {
|
|
661
|
-
typeUrl: '/cosmos.gov.v1beta1.Vote',
|
|
662
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
663
|
-
if (message.proposalId !== BigInt(0)) {
|
|
664
|
-
writer.uint32(8).uint64(message.proposalId);
|
|
665
|
-
}
|
|
666
|
-
if (message.voter !== '') {
|
|
667
|
-
writer.uint32(18).string(message.voter);
|
|
668
|
-
}
|
|
669
|
-
if (message.option !== 0) {
|
|
670
|
-
writer.uint32(24).int32(message.option);
|
|
671
|
-
}
|
|
672
|
-
for (const v of message.options) {
|
|
673
|
-
WeightedVoteOption.encode(v, writer.uint32(34).fork()).ldelim();
|
|
674
|
-
}
|
|
675
|
-
return writer;
|
|
676
|
-
},
|
|
677
|
-
decode(input, length) {
|
|
678
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
679
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
680
|
-
const message = createBaseVote();
|
|
681
|
-
while (reader.pos < end) {
|
|
682
|
-
const tag = reader.uint32();
|
|
683
|
-
switch (tag >>> 3) {
|
|
684
|
-
case 1:
|
|
685
|
-
message.proposalId = reader.uint64();
|
|
686
|
-
break;
|
|
687
|
-
case 2:
|
|
688
|
-
message.voter = reader.string();
|
|
689
|
-
break;
|
|
690
|
-
case 3:
|
|
691
|
-
message.option = reader.int32();
|
|
692
|
-
break;
|
|
693
|
-
case 4:
|
|
694
|
-
message.options.push(WeightedVoteOption.decode(reader, reader.uint32()));
|
|
695
|
-
break;
|
|
696
|
-
default:
|
|
697
|
-
reader.skipType(tag & 7);
|
|
698
|
-
break;
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
return message;
|
|
702
|
-
},
|
|
703
|
-
fromJSON(object) {
|
|
704
|
-
return {
|
|
705
|
-
proposalId: isSet(object.proposalId)
|
|
706
|
-
? BigInt(object.proposalId.toString())
|
|
707
|
-
: BigInt(0),
|
|
708
|
-
voter: isSet(object.voter) ? String(object.voter) : '',
|
|
709
|
-
option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1,
|
|
710
|
-
options: Array.isArray(object?.options)
|
|
711
|
-
? object.options.map((e) => WeightedVoteOption.fromJSON(e))
|
|
712
|
-
: [],
|
|
713
|
-
};
|
|
714
|
-
},
|
|
715
|
-
toJSON(message) {
|
|
716
|
-
const obj = {};
|
|
717
|
-
message.proposalId !== undefined &&
|
|
718
|
-
(obj.proposalId = (message.proposalId || BigInt(0)).toString());
|
|
719
|
-
message.voter !== undefined && (obj.voter = message.voter);
|
|
720
|
-
message.option !== undefined &&
|
|
721
|
-
(obj.option = voteOptionToJSON(message.option));
|
|
722
|
-
if (message.options) {
|
|
723
|
-
obj.options = message.options.map(e => e ? WeightedVoteOption.toJSON(e) : undefined);
|
|
724
|
-
}
|
|
725
|
-
else {
|
|
726
|
-
obj.options = [];
|
|
727
|
-
}
|
|
728
|
-
return obj;
|
|
729
|
-
},
|
|
730
|
-
fromPartial(object) {
|
|
731
|
-
const message = createBaseVote();
|
|
732
|
-
message.proposalId =
|
|
733
|
-
object.proposalId !== undefined && object.proposalId !== null
|
|
734
|
-
? BigInt(object.proposalId.toString())
|
|
735
|
-
: BigInt(0);
|
|
736
|
-
message.voter = object.voter ?? '';
|
|
737
|
-
message.option = object.option ?? 0;
|
|
738
|
-
message.options =
|
|
739
|
-
object.options?.map(e => WeightedVoteOption.fromPartial(e)) || [];
|
|
740
|
-
return message;
|
|
741
|
-
},
|
|
742
|
-
fromProtoMsg(message) {
|
|
743
|
-
return Vote.decode(message.value);
|
|
744
|
-
},
|
|
745
|
-
toProto(message) {
|
|
746
|
-
return Vote.encode(message).finish();
|
|
747
|
-
},
|
|
748
|
-
toProtoMsg(message) {
|
|
749
|
-
return {
|
|
750
|
-
typeUrl: '/cosmos.gov.v1beta1.Vote',
|
|
751
|
-
value: Vote.encode(message).finish(),
|
|
752
|
-
};
|
|
753
|
-
},
|
|
754
|
-
};
|
|
755
|
-
function createBaseDepositParams() {
|
|
756
|
-
return {
|
|
757
|
-
minDeposit: [],
|
|
758
|
-
maxDepositPeriod: Duration.fromPartial({}),
|
|
759
|
-
};
|
|
760
|
-
}
|
|
761
|
-
export const DepositParams = {
|
|
762
|
-
typeUrl: '/cosmos.gov.v1beta1.DepositParams',
|
|
763
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
764
|
-
for (const v of message.minDeposit) {
|
|
765
|
-
Coin.encode(v, writer.uint32(10).fork()).ldelim();
|
|
766
|
-
}
|
|
767
|
-
if (message.maxDepositPeriod !== undefined) {
|
|
768
|
-
Duration.encode(message.maxDepositPeriod, writer.uint32(18).fork()).ldelim();
|
|
769
|
-
}
|
|
770
|
-
return writer;
|
|
771
|
-
},
|
|
772
|
-
decode(input, length) {
|
|
773
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
774
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
775
|
-
const message = createBaseDepositParams();
|
|
776
|
-
while (reader.pos < end) {
|
|
777
|
-
const tag = reader.uint32();
|
|
778
|
-
switch (tag >>> 3) {
|
|
779
|
-
case 1:
|
|
780
|
-
message.minDeposit.push(Coin.decode(reader, reader.uint32()));
|
|
781
|
-
break;
|
|
782
|
-
case 2:
|
|
783
|
-
message.maxDepositPeriod = Duration.decode(reader, reader.uint32());
|
|
784
|
-
break;
|
|
785
|
-
default:
|
|
786
|
-
reader.skipType(tag & 7);
|
|
787
|
-
break;
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
return message;
|
|
791
|
-
},
|
|
792
|
-
fromJSON(object) {
|
|
793
|
-
return {
|
|
794
|
-
minDeposit: Array.isArray(object?.minDeposit)
|
|
795
|
-
? object.minDeposit.map((e) => Coin.fromJSON(e))
|
|
796
|
-
: [],
|
|
797
|
-
maxDepositPeriod: isSet(object.maxDepositPeriod)
|
|
798
|
-
? Duration.fromJSON(object.maxDepositPeriod)
|
|
799
|
-
: undefined,
|
|
800
|
-
};
|
|
801
|
-
},
|
|
802
|
-
toJSON(message) {
|
|
803
|
-
const obj = {};
|
|
804
|
-
if (message.minDeposit) {
|
|
805
|
-
obj.minDeposit = message.minDeposit.map(e => e ? Coin.toJSON(e) : undefined);
|
|
806
|
-
}
|
|
807
|
-
else {
|
|
808
|
-
obj.minDeposit = [];
|
|
809
|
-
}
|
|
810
|
-
message.maxDepositPeriod !== undefined &&
|
|
811
|
-
(obj.maxDepositPeriod = message.maxDepositPeriod
|
|
812
|
-
? Duration.toJSON(message.maxDepositPeriod)
|
|
813
|
-
: undefined);
|
|
814
|
-
return obj;
|
|
815
|
-
},
|
|
816
|
-
fromPartial(object) {
|
|
817
|
-
const message = createBaseDepositParams();
|
|
818
|
-
message.minDeposit = object.minDeposit?.map(e => Coin.fromPartial(e)) || [];
|
|
819
|
-
message.maxDepositPeriod =
|
|
820
|
-
object.maxDepositPeriod !== undefined && object.maxDepositPeriod !== null
|
|
821
|
-
? Duration.fromPartial(object.maxDepositPeriod)
|
|
822
|
-
: undefined;
|
|
823
|
-
return message;
|
|
824
|
-
},
|
|
825
|
-
fromProtoMsg(message) {
|
|
826
|
-
return DepositParams.decode(message.value);
|
|
827
|
-
},
|
|
828
|
-
toProto(message) {
|
|
829
|
-
return DepositParams.encode(message).finish();
|
|
830
|
-
},
|
|
831
|
-
toProtoMsg(message) {
|
|
832
|
-
return {
|
|
833
|
-
typeUrl: '/cosmos.gov.v1beta1.DepositParams',
|
|
834
|
-
value: DepositParams.encode(message).finish(),
|
|
835
|
-
};
|
|
836
|
-
},
|
|
837
|
-
};
|
|
838
|
-
function createBaseVotingParams() {
|
|
839
|
-
return {
|
|
840
|
-
votingPeriod: Duration.fromPartial({}),
|
|
841
|
-
};
|
|
842
|
-
}
|
|
843
|
-
export const VotingParams = {
|
|
844
|
-
typeUrl: '/cosmos.gov.v1beta1.VotingParams',
|
|
845
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
846
|
-
if (message.votingPeriod !== undefined) {
|
|
847
|
-
Duration.encode(message.votingPeriod, writer.uint32(10).fork()).ldelim();
|
|
848
|
-
}
|
|
849
|
-
return writer;
|
|
850
|
-
},
|
|
851
|
-
decode(input, length) {
|
|
852
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
853
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
854
|
-
const message = createBaseVotingParams();
|
|
855
|
-
while (reader.pos < end) {
|
|
856
|
-
const tag = reader.uint32();
|
|
857
|
-
switch (tag >>> 3) {
|
|
858
|
-
case 1:
|
|
859
|
-
message.votingPeriod = Duration.decode(reader, reader.uint32());
|
|
860
|
-
break;
|
|
861
|
-
default:
|
|
862
|
-
reader.skipType(tag & 7);
|
|
863
|
-
break;
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
return message;
|
|
867
|
-
},
|
|
868
|
-
fromJSON(object) {
|
|
869
|
-
return {
|
|
870
|
-
votingPeriod: isSet(object.votingPeriod)
|
|
871
|
-
? Duration.fromJSON(object.votingPeriod)
|
|
872
|
-
: undefined,
|
|
873
|
-
};
|
|
874
|
-
},
|
|
875
|
-
toJSON(message) {
|
|
876
|
-
const obj = {};
|
|
877
|
-
message.votingPeriod !== undefined &&
|
|
878
|
-
(obj.votingPeriod = message.votingPeriod
|
|
879
|
-
? Duration.toJSON(message.votingPeriod)
|
|
880
|
-
: undefined);
|
|
881
|
-
return obj;
|
|
882
|
-
},
|
|
883
|
-
fromPartial(object) {
|
|
884
|
-
const message = createBaseVotingParams();
|
|
885
|
-
message.votingPeriod =
|
|
886
|
-
object.votingPeriod !== undefined && object.votingPeriod !== null
|
|
887
|
-
? Duration.fromPartial(object.votingPeriod)
|
|
888
|
-
: undefined;
|
|
889
|
-
return message;
|
|
890
|
-
},
|
|
891
|
-
fromProtoMsg(message) {
|
|
892
|
-
return VotingParams.decode(message.value);
|
|
893
|
-
},
|
|
894
|
-
toProto(message) {
|
|
895
|
-
return VotingParams.encode(message).finish();
|
|
896
|
-
},
|
|
897
|
-
toProtoMsg(message) {
|
|
898
|
-
return {
|
|
899
|
-
typeUrl: '/cosmos.gov.v1beta1.VotingParams',
|
|
900
|
-
value: VotingParams.encode(message).finish(),
|
|
901
|
-
};
|
|
902
|
-
},
|
|
903
|
-
};
|
|
904
|
-
function createBaseTallyParams() {
|
|
905
|
-
return {
|
|
906
|
-
quorum: new Uint8Array(),
|
|
907
|
-
threshold: new Uint8Array(),
|
|
908
|
-
vetoThreshold: new Uint8Array(),
|
|
909
|
-
};
|
|
910
|
-
}
|
|
911
|
-
export const TallyParams = {
|
|
912
|
-
typeUrl: '/cosmos.gov.v1beta1.TallyParams',
|
|
913
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
914
|
-
if (message.quorum.length !== 0) {
|
|
915
|
-
writer.uint32(10).bytes(message.quorum);
|
|
916
|
-
}
|
|
917
|
-
if (message.threshold.length !== 0) {
|
|
918
|
-
writer.uint32(18).bytes(message.threshold);
|
|
919
|
-
}
|
|
920
|
-
if (message.vetoThreshold.length !== 0) {
|
|
921
|
-
writer.uint32(26).bytes(message.vetoThreshold);
|
|
922
|
-
}
|
|
923
|
-
return writer;
|
|
924
|
-
},
|
|
925
|
-
decode(input, length) {
|
|
926
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
927
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
928
|
-
const message = createBaseTallyParams();
|
|
929
|
-
while (reader.pos < end) {
|
|
930
|
-
const tag = reader.uint32();
|
|
931
|
-
switch (tag >>> 3) {
|
|
932
|
-
case 1:
|
|
933
|
-
message.quorum = reader.bytes();
|
|
934
|
-
break;
|
|
935
|
-
case 2:
|
|
936
|
-
message.threshold = reader.bytes();
|
|
937
|
-
break;
|
|
938
|
-
case 3:
|
|
939
|
-
message.vetoThreshold = reader.bytes();
|
|
940
|
-
break;
|
|
941
|
-
default:
|
|
942
|
-
reader.skipType(tag & 7);
|
|
943
|
-
break;
|
|
944
|
-
}
|
|
945
|
-
}
|
|
946
|
-
return message;
|
|
947
|
-
},
|
|
948
|
-
fromJSON(object) {
|
|
949
|
-
return {
|
|
950
|
-
quorum: isSet(object.quorum)
|
|
951
|
-
? bytesFromBase64(object.quorum)
|
|
952
|
-
: new Uint8Array(),
|
|
953
|
-
threshold: isSet(object.threshold)
|
|
954
|
-
? bytesFromBase64(object.threshold)
|
|
955
|
-
: new Uint8Array(),
|
|
956
|
-
vetoThreshold: isSet(object.vetoThreshold)
|
|
957
|
-
? bytesFromBase64(object.vetoThreshold)
|
|
958
|
-
: new Uint8Array(),
|
|
959
|
-
};
|
|
960
|
-
},
|
|
961
|
-
toJSON(message) {
|
|
962
|
-
const obj = {};
|
|
963
|
-
message.quorum !== undefined &&
|
|
964
|
-
(obj.quorum = base64FromBytes(message.quorum !== undefined ? message.quorum : new Uint8Array()));
|
|
965
|
-
message.threshold !== undefined &&
|
|
966
|
-
(obj.threshold = base64FromBytes(message.threshold !== undefined ? message.threshold : new Uint8Array()));
|
|
967
|
-
message.vetoThreshold !== undefined &&
|
|
968
|
-
(obj.vetoThreshold = base64FromBytes(message.vetoThreshold !== undefined
|
|
969
|
-
? message.vetoThreshold
|
|
970
|
-
: new Uint8Array()));
|
|
971
|
-
return obj;
|
|
972
|
-
},
|
|
973
|
-
fromPartial(object) {
|
|
974
|
-
const message = createBaseTallyParams();
|
|
975
|
-
message.quorum = object.quorum ?? new Uint8Array();
|
|
976
|
-
message.threshold = object.threshold ?? new Uint8Array();
|
|
977
|
-
message.vetoThreshold = object.vetoThreshold ?? new Uint8Array();
|
|
978
|
-
return message;
|
|
979
|
-
},
|
|
980
|
-
fromProtoMsg(message) {
|
|
981
|
-
return TallyParams.decode(message.value);
|
|
982
|
-
},
|
|
983
|
-
toProto(message) {
|
|
984
|
-
return TallyParams.encode(message).finish();
|
|
985
|
-
},
|
|
986
|
-
toProtoMsg(message) {
|
|
987
|
-
return {
|
|
988
|
-
typeUrl: '/cosmos.gov.v1beta1.TallyParams',
|
|
989
|
-
value: TallyParams.encode(message).finish(),
|
|
990
|
-
};
|
|
991
|
-
},
|
|
992
|
-
};
|
|
993
|
-
export const Content_InterfaceDecoder = (input) => {
|
|
994
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
995
|
-
const data = Any.decode(reader, reader.uint32());
|
|
996
|
-
switch (data.typeUrl) {
|
|
997
|
-
case '/cosmos.gov.v1beta1.TextProposal':
|
|
998
|
-
return TextProposal.decode(data.value);
|
|
999
|
-
default:
|
|
1000
|
-
return data;
|
|
1001
|
-
}
|
|
1002
|
-
};
|
|
1003
|
-
//# sourceMappingURL=gov.js.map
|
|
1
|
+
import{Coin as o}from"../../base/v1beta1/coin.js";import{Any as t}from"../../../google/protobuf/any.js";import{Timestamp as e}from"../../../google/protobuf/timestamp.js";import{Duration as i}from"../../../google/protobuf/duration.js";import{BinaryReader as n,BinaryWriter as r}from"../../../binary.js";import{Decimal as s,isSet as a,fromJsonTimestamp as p,fromTimestamp as l,bytesFromBase64 as d,base64FromBytes as u}from"../../../helpers.js";import{}from"../../../json-safe.js";export var VoteOption;!function(o){o[o.VOTE_OPTION_UNSPECIFIED=0]="VOTE_OPTION_UNSPECIFIED",o[o.VOTE_OPTION_YES=1]="VOTE_OPTION_YES",o[o.VOTE_OPTION_ABSTAIN=2]="VOTE_OPTION_ABSTAIN",o[o.VOTE_OPTION_NO=3]="VOTE_OPTION_NO",o[o.VOTE_OPTION_NO_WITH_VETO=4]="VOTE_OPTION_NO_WITH_VETO",o[o.UNRECOGNIZED=-1]="UNRECOGNIZED"}(VoteOption||(VoteOption={}));export const VoteOptionSDKType=VoteOption;export function voteOptionFromJSON(o){switch(o){case 0:case"VOTE_OPTION_UNSPECIFIED":return VoteOption.VOTE_OPTION_UNSPECIFIED;case 1:case"VOTE_OPTION_YES":return VoteOption.VOTE_OPTION_YES;case 2:case"VOTE_OPTION_ABSTAIN":return VoteOption.VOTE_OPTION_ABSTAIN;case 3:case"VOTE_OPTION_NO":return VoteOption.VOTE_OPTION_NO;case 4:case"VOTE_OPTION_NO_WITH_VETO":return VoteOption.VOTE_OPTION_NO_WITH_VETO;default:return VoteOption.UNRECOGNIZED}}export function voteOptionToJSON(o){switch(o){case VoteOption.VOTE_OPTION_UNSPECIFIED:return"VOTE_OPTION_UNSPECIFIED";case VoteOption.VOTE_OPTION_YES:return"VOTE_OPTION_YES";case VoteOption.VOTE_OPTION_ABSTAIN:return"VOTE_OPTION_ABSTAIN";case VoteOption.VOTE_OPTION_NO:return"VOTE_OPTION_NO";case VoteOption.VOTE_OPTION_NO_WITH_VETO:return"VOTE_OPTION_NO_WITH_VETO";case VoteOption.UNRECOGNIZED:default:return"UNRECOGNIZED"}}export var ProposalStatus;!function(o){o[o.PROPOSAL_STATUS_UNSPECIFIED=0]="PROPOSAL_STATUS_UNSPECIFIED",o[o.PROPOSAL_STATUS_DEPOSIT_PERIOD=1]="PROPOSAL_STATUS_DEPOSIT_PERIOD",o[o.PROPOSAL_STATUS_VOTING_PERIOD=2]="PROPOSAL_STATUS_VOTING_PERIOD",o[o.PROPOSAL_STATUS_PASSED=3]="PROPOSAL_STATUS_PASSED",o[o.PROPOSAL_STATUS_REJECTED=4]="PROPOSAL_STATUS_REJECTED",o[o.PROPOSAL_STATUS_FAILED=5]="PROPOSAL_STATUS_FAILED",o[o.UNRECOGNIZED=-1]="UNRECOGNIZED"}(ProposalStatus||(ProposalStatus={}));export const ProposalStatusSDKType=ProposalStatus;export function proposalStatusFromJSON(o){switch(o){case 0:case"PROPOSAL_STATUS_UNSPECIFIED":return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED;case 1:case"PROPOSAL_STATUS_DEPOSIT_PERIOD":return ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD;case 2:case"PROPOSAL_STATUS_VOTING_PERIOD":return ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD;case 3:case"PROPOSAL_STATUS_PASSED":return ProposalStatus.PROPOSAL_STATUS_PASSED;case 4:case"PROPOSAL_STATUS_REJECTED":return ProposalStatus.PROPOSAL_STATUS_REJECTED;case 5:case"PROPOSAL_STATUS_FAILED":return ProposalStatus.PROPOSAL_STATUS_FAILED;default:return ProposalStatus.UNRECOGNIZED}}export function proposalStatusToJSON(o){switch(o){case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED:return"PROPOSAL_STATUS_UNSPECIFIED";case ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD:return"PROPOSAL_STATUS_DEPOSIT_PERIOD";case ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD:return"PROPOSAL_STATUS_VOTING_PERIOD";case ProposalStatus.PROPOSAL_STATUS_PASSED:return"PROPOSAL_STATUS_PASSED";case ProposalStatus.PROPOSAL_STATUS_REJECTED:return"PROPOSAL_STATUS_REJECTED";case ProposalStatus.PROPOSAL_STATUS_FAILED:return"PROPOSAL_STATUS_FAILED";case ProposalStatus.UNRECOGNIZED:default:return"UNRECOGNIZED"}}export const WeightedVoteOption={typeUrl:"/cosmos.gov.v1beta1.WeightedVoteOption",encode:(o,t=r.create())=>(0!==o.option&&t.uint32(8).int32(o.option),""!==o.weight&&t.uint32(18).string(s.fromUserInput(o.weight,18).atomics),t),decode(o,t){const e=o instanceof n?o:new n(o);let i=void 0===t?e.len:e.pos+t;const r={option:0,weight:""};for(;e.pos<i;){const o=e.uint32();switch(o>>>3){case 1:r.option=e.int32();break;case 2:r.weight=s.fromAtomics(e.string(),18).toString();break;default:e.skipType(7&o)}}return r},fromJSON:o=>({option:a(o.option)?voteOptionFromJSON(o.option):-1,weight:a(o.weight)?String(o.weight):""}),toJSON(o){const t={};return void 0!==o.option&&(t.option=voteOptionToJSON(o.option)),void 0!==o.weight&&(t.weight=o.weight),t},fromPartial(o){const t={option:0,weight:""};return t.option=o.option??0,t.weight=o.weight??"",t},fromProtoMsg:o=>WeightedVoteOption.decode(o.value),toProto:o=>WeightedVoteOption.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.gov.v1beta1.WeightedVoteOption",value:WeightedVoteOption.encode(o).finish()})};export const TextProposal={typeUrl:"/cosmos.gov.v1beta1.TextProposal",encode:(o,t=r.create())=>(""!==o.title&&t.uint32(10).string(o.title),""!==o.description&&t.uint32(18).string(o.description),t),decode(o,t){const e=o instanceof n?o:new n(o);let i=void 0===t?e.len:e.pos+t;const r={$typeUrl:"/cosmos.gov.v1beta1.TextProposal",title:"",description:""};for(;e.pos<i;){const o=e.uint32();switch(o>>>3){case 1:r.title=e.string();break;case 2:r.description=e.string();break;default:e.skipType(7&o)}}return r},fromJSON:o=>({title:a(o.title)?String(o.title):"",description:a(o.description)?String(o.description):""}),toJSON(o){const t={};return void 0!==o.title&&(t.title=o.title),void 0!==o.description&&(t.description=o.description),t},fromPartial(o){const t={$typeUrl:"/cosmos.gov.v1beta1.TextProposal",title:"",description:""};return t.title=o.title??"",t.description=o.description??"",t},fromProtoMsg:o=>TextProposal.decode(o.value),toProto:o=>TextProposal.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.gov.v1beta1.TextProposal",value:TextProposal.encode(o).finish()})};function O(){return{proposalId:BigInt(0),depositor:"",amount:[]}}export const Deposit={typeUrl:"/cosmos.gov.v1beta1.Deposit",encode(t,e=r.create()){t.proposalId!==BigInt(0)&&e.uint32(8).uint64(t.proposalId),""!==t.depositor&&e.uint32(18).string(t.depositor);for(const i of t.amount)o.encode(i,e.uint32(26).fork()).ldelim();return e},decode(t,e){const i=t instanceof n?t:new n(t);let r=void 0===e?i.len:i.pos+e;const s=O();for(;i.pos<r;){const t=i.uint32();switch(t>>>3){case 1:s.proposalId=i.uint64();break;case 2:s.depositor=i.string();break;case 3:s.amount.push(o.decode(i,i.uint32()));break;default:i.skipType(7&t)}}return s},fromJSON:t=>({proposalId:a(t.proposalId)?BigInt(t.proposalId.toString()):BigInt(0),depositor:a(t.depositor)?String(t.depositor):"",amount:Array.isArray(t?.amount)?t.amount.map((t=>o.fromJSON(t))):[]}),toJSON(t){const e={};return void 0!==t.proposalId&&(e.proposalId=(t.proposalId||BigInt(0)).toString()),void 0!==t.depositor&&(e.depositor=t.depositor),t.amount?e.amount=t.amount.map((t=>t?o.toJSON(t):void 0)):e.amount=[],e},fromPartial(t){const e=O();return e.proposalId=void 0!==t.proposalId&&null!==t.proposalId?BigInt(t.proposalId.toString()):BigInt(0),e.depositor=t.depositor??"",e.amount=t.amount?.map((t=>o.fromPartial(t)))||[],e},fromProtoMsg:o=>Deposit.decode(o.value),toProto:o=>Deposit.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.gov.v1beta1.Deposit",value:Deposit.encode(o).finish()})};function T(){return{proposalId:BigInt(0),content:void 0,status:0,finalTallyResult:TallyResult.fromPartial({}),submitTime:e.fromPartial({}),depositEndTime:e.fromPartial({}),totalDeposit:[],votingStartTime:e.fromPartial({}),votingEndTime:e.fromPartial({})}}export const Proposal={typeUrl:"/cosmos.gov.v1beta1.Proposal",encode(i,n=r.create()){i.proposalId!==BigInt(0)&&n.uint32(8).uint64(i.proposalId),void 0!==i.content&&t.encode(i.content,n.uint32(18).fork()).ldelim(),0!==i.status&&n.uint32(24).int32(i.status),void 0!==i.finalTallyResult&&TallyResult.encode(i.finalTallyResult,n.uint32(34).fork()).ldelim(),void 0!==i.submitTime&&e.encode(i.submitTime,n.uint32(42).fork()).ldelim(),void 0!==i.depositEndTime&&e.encode(i.depositEndTime,n.uint32(50).fork()).ldelim();for(const t of i.totalDeposit)o.encode(t,n.uint32(58).fork()).ldelim();return void 0!==i.votingStartTime&&e.encode(i.votingStartTime,n.uint32(66).fork()).ldelim(),void 0!==i.votingEndTime&&e.encode(i.votingEndTime,n.uint32(74).fork()).ldelim(),n},decode(t,i){const r=t instanceof n?t:new n(t);let s=void 0===i?r.len:r.pos+i;const a=T();for(;r.pos<s;){const t=r.uint32();switch(t>>>3){case 1:a.proposalId=r.uint64();break;case 2:a.content=Content_InterfaceDecoder(r);break;case 3:a.status=r.int32();break;case 4:a.finalTallyResult=TallyResult.decode(r,r.uint32());break;case 5:a.submitTime=e.decode(r,r.uint32());break;case 6:a.depositEndTime=e.decode(r,r.uint32());break;case 7:a.totalDeposit.push(o.decode(r,r.uint32()));break;case 8:a.votingStartTime=e.decode(r,r.uint32());break;case 9:a.votingEndTime=e.decode(r,r.uint32());break;default:r.skipType(7&t)}}return a},fromJSON:e=>({proposalId:a(e.proposalId)?BigInt(e.proposalId.toString()):BigInt(0),content:a(e.content)?t.fromJSON(e.content):void 0,status:a(e.status)?proposalStatusFromJSON(e.status):-1,finalTallyResult:a(e.finalTallyResult)?TallyResult.fromJSON(e.finalTallyResult):void 0,submitTime:a(e.submitTime)?p(e.submitTime):void 0,depositEndTime:a(e.depositEndTime)?p(e.depositEndTime):void 0,totalDeposit:Array.isArray(e?.totalDeposit)?e.totalDeposit.map((t=>o.fromJSON(t))):[],votingStartTime:a(e.votingStartTime)?p(e.votingStartTime):void 0,votingEndTime:a(e.votingEndTime)?p(e.votingEndTime):void 0}),toJSON(e){const i={};return void 0!==e.proposalId&&(i.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.content&&(i.content=e.content?t.toJSON(e.content):void 0),void 0!==e.status&&(i.status=proposalStatusToJSON(e.status)),void 0!==e.finalTallyResult&&(i.finalTallyResult=e.finalTallyResult?TallyResult.toJSON(e.finalTallyResult):void 0),void 0!==e.submitTime&&(i.submitTime=l(e.submitTime).toISOString()),void 0!==e.depositEndTime&&(i.depositEndTime=l(e.depositEndTime).toISOString()),e.totalDeposit?i.totalDeposit=e.totalDeposit.map((t=>t?o.toJSON(t):void 0)):i.totalDeposit=[],void 0!==e.votingStartTime&&(i.votingStartTime=l(e.votingStartTime).toISOString()),void 0!==e.votingEndTime&&(i.votingEndTime=l(e.votingEndTime).toISOString()),i},fromPartial(i){const n=T();return n.proposalId=void 0!==i.proposalId&&null!==i.proposalId?BigInt(i.proposalId.toString()):BigInt(0),n.content=void 0!==i.content&&null!==i.content?t.fromPartial(i.content):void 0,n.status=i.status??0,n.finalTallyResult=void 0!==i.finalTallyResult&&null!==i.finalTallyResult?TallyResult.fromPartial(i.finalTallyResult):void 0,n.submitTime=void 0!==i.submitTime&&null!==i.submitTime?e.fromPartial(i.submitTime):void 0,n.depositEndTime=void 0!==i.depositEndTime&&null!==i.depositEndTime?e.fromPartial(i.depositEndTime):void 0,n.totalDeposit=i.totalDeposit?.map((t=>o.fromPartial(t)))||[],n.votingStartTime=void 0!==i.votingStartTime&&null!==i.votingStartTime?e.fromPartial(i.votingStartTime):void 0,n.votingEndTime=void 0!==i.votingEndTime&&null!==i.votingEndTime?e.fromPartial(i.votingEndTime):void 0,n},fromProtoMsg:o=>Proposal.decode(o.value),toProto:o=>Proposal.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.gov.v1beta1.Proposal",value:Proposal.encode(o).finish()})};export const TallyResult={typeUrl:"/cosmos.gov.v1beta1.TallyResult",encode:(o,t=r.create())=>(""!==o.yes&&t.uint32(10).string(o.yes),""!==o.abstain&&t.uint32(18).string(o.abstain),""!==o.no&&t.uint32(26).string(o.no),""!==o.noWithVeto&&t.uint32(34).string(o.noWithVeto),t),decode(o,t){const e=o instanceof n?o:new n(o);let i=void 0===t?e.len:e.pos+t;const r={yes:"",abstain:"",no:"",noWithVeto:""};for(;e.pos<i;){const o=e.uint32();switch(o>>>3){case 1:r.yes=e.string();break;case 2:r.abstain=e.string();break;case 3:r.no=e.string();break;case 4:r.noWithVeto=e.string();break;default:e.skipType(7&o)}}return r},fromJSON:o=>({yes:a(o.yes)?String(o.yes):"",abstain:a(o.abstain)?String(o.abstain):"",no:a(o.no)?String(o.no):"",noWithVeto:a(o.noWithVeto)?String(o.noWithVeto):""}),toJSON(o){const t={};return void 0!==o.yes&&(t.yes=o.yes),void 0!==o.abstain&&(t.abstain=o.abstain),void 0!==o.no&&(t.no=o.no),void 0!==o.noWithVeto&&(t.noWithVeto=o.noWithVeto),t},fromPartial(o){const t={yes:"",abstain:"",no:"",noWithVeto:""};return t.yes=o.yes??"",t.abstain=o.abstain??"",t.no=o.no??"",t.noWithVeto=o.noWithVeto??"",t},fromProtoMsg:o=>TallyResult.decode(o.value),toProto:o=>TallyResult.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.gov.v1beta1.TallyResult",value:TallyResult.encode(o).finish()})};function c(){return{proposalId:BigInt(0),voter:"",option:0,options:[]}}export const Vote={typeUrl:"/cosmos.gov.v1beta1.Vote",encode(o,t=r.create()){o.proposalId!==BigInt(0)&&t.uint32(8).uint64(o.proposalId),""!==o.voter&&t.uint32(18).string(o.voter),0!==o.option&&t.uint32(24).int32(o.option);for(const e of o.options)WeightedVoteOption.encode(e,t.uint32(34).fork()).ldelim();return t},decode(o,t){const e=o instanceof n?o:new n(o);let i=void 0===t?e.len:e.pos+t;const r=c();for(;e.pos<i;){const o=e.uint32();switch(o>>>3){case 1:r.proposalId=e.uint64();break;case 2:r.voter=e.string();break;case 3:r.option=e.int32();break;case 4:r.options.push(WeightedVoteOption.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return r},fromJSON:o=>({proposalId:a(o.proposalId)?BigInt(o.proposalId.toString()):BigInt(0),voter:a(o.voter)?String(o.voter):"",option:a(o.option)?voteOptionFromJSON(o.option):-1,options:Array.isArray(o?.options)?o.options.map((o=>WeightedVoteOption.fromJSON(o))):[]}),toJSON(o){const t={};return void 0!==o.proposalId&&(t.proposalId=(o.proposalId||BigInt(0)).toString()),void 0!==o.voter&&(t.voter=o.voter),void 0!==o.option&&(t.option=voteOptionToJSON(o.option)),o.options?t.options=o.options.map((o=>o?WeightedVoteOption.toJSON(o):void 0)):t.options=[],t},fromPartial(o){const t=c();return t.proposalId=void 0!==o.proposalId&&null!==o.proposalId?BigInt(o.proposalId.toString()):BigInt(0),t.voter=o.voter??"",t.option=o.option??0,t.options=o.options?.map((o=>WeightedVoteOption.fromPartial(o)))||[],t},fromProtoMsg:o=>Vote.decode(o.value),toProto:o=>Vote.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.gov.v1beta1.Vote",value:Vote.encode(o).finish()})};function P(){return{minDeposit:[],maxDepositPeriod:i.fromPartial({})}}export const DepositParams={typeUrl:"/cosmos.gov.v1beta1.DepositParams",encode(t,e=r.create()){for(const i of t.minDeposit)o.encode(i,e.uint32(10).fork()).ldelim();return void 0!==t.maxDepositPeriod&&i.encode(t.maxDepositPeriod,e.uint32(18).fork()).ldelim(),e},decode(t,e){const r=t instanceof n?t:new n(t);let s=void 0===e?r.len:r.pos+e;const a=P();for(;r.pos<s;){const t=r.uint32();switch(t>>>3){case 1:a.minDeposit.push(o.decode(r,r.uint32()));break;case 2:a.maxDepositPeriod=i.decode(r,r.uint32());break;default:r.skipType(7&t)}}return a},fromJSON:t=>({minDeposit:Array.isArray(t?.minDeposit)?t.minDeposit.map((t=>o.fromJSON(t))):[],maxDepositPeriod:a(t.maxDepositPeriod)?i.fromJSON(t.maxDepositPeriod):void 0}),toJSON(t){const e={};return t.minDeposit?e.minDeposit=t.minDeposit.map((t=>t?o.toJSON(t):void 0)):e.minDeposit=[],void 0!==t.maxDepositPeriod&&(e.maxDepositPeriod=t.maxDepositPeriod?i.toJSON(t.maxDepositPeriod):void 0),e},fromPartial(t){const e=P();return e.minDeposit=t.minDeposit?.map((t=>o.fromPartial(t)))||[],e.maxDepositPeriod=void 0!==t.maxDepositPeriod&&null!==t.maxDepositPeriod?i.fromPartial(t.maxDepositPeriod):void 0,e},fromProtoMsg:o=>DepositParams.decode(o.value),toProto:o=>DepositParams.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.gov.v1beta1.DepositParams",value:DepositParams.encode(o).finish()})};function m(){return{votingPeriod:i.fromPartial({})}}export const VotingParams={typeUrl:"/cosmos.gov.v1beta1.VotingParams",encode:(o,t=r.create())=>(void 0!==o.votingPeriod&&i.encode(o.votingPeriod,t.uint32(10).fork()).ldelim(),t),decode(o,t){const e=o instanceof n?o:new n(o);let r=void 0===t?e.len:e.pos+t;const s=m();for(;e.pos<r;){const o=e.uint32();if(o>>>3==1)s.votingPeriod=i.decode(e,e.uint32());else e.skipType(7&o)}return s},fromJSON:o=>({votingPeriod:a(o.votingPeriod)?i.fromJSON(o.votingPeriod):void 0}),toJSON(o){const t={};return void 0!==o.votingPeriod&&(t.votingPeriod=o.votingPeriod?i.toJSON(o.votingPeriod):void 0),t},fromPartial(o){const t=m();return t.votingPeriod=void 0!==o.votingPeriod&&null!==o.votingPeriod?i.fromPartial(o.votingPeriod):void 0,t},fromProtoMsg:o=>VotingParams.decode(o.value),toProto:o=>VotingParams.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.gov.v1beta1.VotingParams",value:VotingParams.encode(o).finish()})};function S(){return{quorum:new Uint8Array,threshold:new Uint8Array,vetoThreshold:new Uint8Array}}export const TallyParams={typeUrl:"/cosmos.gov.v1beta1.TallyParams",encode:(o,t=r.create())=>(0!==o.quorum.length&&t.uint32(10).bytes(o.quorum),0!==o.threshold.length&&t.uint32(18).bytes(o.threshold),0!==o.vetoThreshold.length&&t.uint32(26).bytes(o.vetoThreshold),t),decode(o,t){const e=o instanceof n?o:new n(o);let i=void 0===t?e.len:e.pos+t;const r=S();for(;e.pos<i;){const o=e.uint32();switch(o>>>3){case 1:r.quorum=e.bytes();break;case 2:r.threshold=e.bytes();break;case 3:r.vetoThreshold=e.bytes();break;default:e.skipType(7&o)}}return r},fromJSON:o=>({quorum:a(o.quorum)?d(o.quorum):new Uint8Array,threshold:a(o.threshold)?d(o.threshold):new Uint8Array,vetoThreshold:a(o.vetoThreshold)?d(o.vetoThreshold):new Uint8Array}),toJSON(o){const t={};return void 0!==o.quorum&&(t.quorum=u(void 0!==o.quorum?o.quorum:new Uint8Array)),void 0!==o.threshold&&(t.threshold=u(void 0!==o.threshold?o.threshold:new Uint8Array)),void 0!==o.vetoThreshold&&(t.vetoThreshold=u(void 0!==o.vetoThreshold?o.vetoThreshold:new Uint8Array)),t},fromPartial(o){const t=S();return t.quorum=o.quorum??new Uint8Array,t.threshold=o.threshold??new Uint8Array,t.vetoThreshold=o.vetoThreshold??new Uint8Array,t},fromProtoMsg:o=>TallyParams.decode(o.value),toProto:o=>TallyParams.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.gov.v1beta1.TallyParams",value:TallyParams.encode(o).finish()})};export const Content_InterfaceDecoder=o=>{const e=o instanceof n?o:new n(o),i=t.decode(e,e.uint32());return"/cosmos.gov.v1beta1.TextProposal"===i.typeUrl?TextProposal.decode(i.value):i};
|