@gitopia/gitopiajs 0.0.3 → 0.0.4
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/package.json +3 -3
- package/dist/LICENSE +0 -21
- package/dist/amino/amino.d.ts +0 -1
- package/dist/amino/amino.js +0 -2
- package/dist/amino/bundle.d.ts +0 -1
- package/dist/amino/bundle.js +0 -41
- package/dist/binary.d.ts +0 -130
- package/dist/binary.js +0 -371
- package/dist/cosmos/bank/v1beta1/bank.d.ts +0 -407
- package/dist/cosmos/bank/v1beta1/bank.js +0 -664
- package/dist/cosmos/bank/v1beta1/query.d.ts +0 -1062
- package/dist/cosmos/bank/v1beta1/query.js +0 -1759
- package/dist/cosmos/bank/v1beta1/query.lcd.d.ts +0 -19
- package/dist/cosmos/bank/v1beta1/query.lcd.js +0 -173
- package/dist/cosmos/bank/v1beta1/query.rpc.Query.d.ts +0 -106
- package/dist/cosmos/bank/v1beta1/query.rpc.Query.js +0 -123
- package/dist/cosmos/base/query/v1beta1/pagination.d.ts +0 -190
- package/dist/cosmos/base/query/v1beta1/pagination.js +0 -204
- package/dist/cosmos/base/v1beta1/coin.d.ts +0 -193
- package/dist/cosmos/base/v1beta1/coin.js +0 -306
- package/dist/cosmos/bundle.d.ts +0 -2311
- package/dist/cosmos/bundle.js +0 -134
- package/dist/cosmos/client.d.ts +0 -84
- package/dist/cosmos/client.js +0 -65
- package/dist/cosmos/feegrant/v1beta1/feegrant.d.ts +0 -245
- package/dist/cosmos/feegrant/v1beta1/feegrant.js +0 -456
- package/dist/cosmos/feegrant/v1beta1/query.d.ts +0 -258
- package/dist/cosmos/feegrant/v1beta1/query.js +0 -487
- package/dist/cosmos/feegrant/v1beta1/query.lcd.d.ts +0 -11
- package/dist/cosmos/feegrant/v1beta1/query.lcd.js +0 -44
- package/dist/cosmos/feegrant/v1beta1/query.rpc.Query.d.ts +0 -28
- package/dist/cosmos/feegrant/v1beta1/query.rpc.Query.js +0 -47
- package/dist/cosmos/gov/v1beta1/gov.d.ts +0 -571
- package/dist/cosmos/gov/v1beta1/gov.js +0 -1122
- package/dist/cosmos/gov/v1beta1/query.d.ts +0 -636
- package/dist/cosmos/gov/v1beta1/query.js +0 -1264
- package/dist/cosmos/gov/v1beta1/query.lcd.d.ts +0 -16
- package/dist/cosmos/gov/v1beta1/query.lcd.js +0 -87
- package/dist/cosmos/gov/v1beta1/query.rpc.Query.d.ts +0 -44
- package/dist/cosmos/gov/v1beta1/query.rpc.Query.js +0 -92
- package/dist/cosmos/group/v1/query.d.ts +0 -1097
- package/dist/cosmos/group/v1/query.js +0 -2182
- package/dist/cosmos/group/v1/query.lcd.d.ts +0 -22
- package/dist/cosmos/group/v1/query.lcd.js +0 -158
- package/dist/cosmos/group/v1/query.rpc.Query.d.ts +0 -78
- package/dist/cosmos/group/v1/query.rpc.Query.js +0 -148
- package/dist/cosmos/group/v1/tx.amino.d.ts +0 -73
- package/dist/cosmos/group/v1/tx.amino.js +0 -77
- package/dist/cosmos/group/v1/tx.d.ts +0 -1198
- package/dist/cosmos/group/v1/tx.js +0 -2362
- package/dist/cosmos/group/v1/tx.registry.d.ts +0 -180
- package/dist/cosmos/group/v1/tx.registry.js +0 -271
- package/dist/cosmos/group/v1/tx.rpc.msg.d.ts +0 -51
- package/dist/cosmos/group/v1/tx.rpc.msg.js +0 -96
- package/dist/cosmos/group/v1/types.d.ts +0 -873
- package/dist/cosmos/group/v1/types.js +0 -1495
- package/dist/cosmos/msg/v1/msg.d.ts +0 -1
- package/dist/cosmos/msg/v1/msg.js +0 -2
- package/dist/cosmos/query/v1/query.d.ts +0 -1
- package/dist/cosmos/query/v1/query.js +0 -2
- package/dist/cosmos/rpc.query.d.ts +0 -59
- package/dist/cosmos/rpc.query.js +0 -60
- package/dist/cosmos/rpc.tx.d.ts +0 -10
- package/dist/cosmos/rpc.tx.js +0 -44
- package/dist/cosmos/upgrade/v1beta1/upgrade.d.ts +0 -278
- package/dist/cosmos/upgrade/v1beta1/upgrade.js +0 -382
- package/dist/cosmos_proto/bundle.d.ts +0 -32
- package/dist/cosmos_proto/bundle.js +0 -41
- package/dist/cosmos_proto/cosmos.d.ts +0 -171
- package/dist/cosmos_proto/cosmos.js +0 -221
- package/dist/esm/amino/amino.js +0 -1
- package/dist/esm/amino/bundle.js +0 -5
- package/dist/esm/binary.js +0 -366
- package/dist/esm/cosmos/bank/v1beta1/bank.js +0 -661
- package/dist/esm/cosmos/bank/v1beta1/query.js +0 -1756
- package/dist/esm/cosmos/bank/v1beta1/query.lcd.js +0 -169
- package/dist/esm/cosmos/bank/v1beta1/query.rpc.Query.js +0 -118
- package/dist/esm/cosmos/base/query/v1beta1/pagination.js +0 -201
- package/dist/esm/cosmos/base/v1beta1/coin.js +0 -303
- package/dist/esm/cosmos/bundle.js +0 -98
- package/dist/esm/cosmos/client.js +0 -27
- package/dist/esm/cosmos/feegrant/v1beta1/feegrant.js +0 -450
- package/dist/esm/cosmos/feegrant/v1beta1/query.js +0 -484
- package/dist/esm/cosmos/feegrant/v1beta1/query.lcd.js +0 -40
- package/dist/esm/cosmos/feegrant/v1beta1/query.rpc.Query.js +0 -42
- package/dist/esm/cosmos/gov/v1beta1/gov.js +0 -1112
- package/dist/esm/cosmos/gov/v1beta1/query.js +0 -1261
- package/dist/esm/cosmos/gov/v1beta1/query.lcd.js +0 -83
- package/dist/esm/cosmos/gov/v1beta1/query.rpc.Query.js +0 -87
- package/dist/esm/cosmos/group/v1/query.js +0 -2179
- package/dist/esm/cosmos/group/v1/query.lcd.js +0 -154
- package/dist/esm/cosmos/group/v1/query.rpc.Query.js +0 -143
- package/dist/esm/cosmos/group/v1/tx.amino.js +0 -74
- package/dist/esm/cosmos/group/v1/tx.js +0 -2354
- package/dist/esm/cosmos/group/v1/tx.registry.js +0 -267
- package/dist/esm/cosmos/group/v1/tx.rpc.msg.js +0 -92
- package/dist/esm/cosmos/group/v1/types.js +0 -1483
- package/dist/esm/cosmos/msg/v1/msg.js +0 -1
- package/dist/esm/cosmos/query/v1/query.js +0 -1
- package/dist/esm/cosmos/rpc.query.js +0 -23
- package/dist/esm/cosmos/rpc.tx.js +0 -7
- package/dist/esm/cosmos/upgrade/v1beta1/upgrade.js +0 -379
- package/dist/esm/cosmos_proto/bundle.js +0 -5
- package/dist/esm/cosmos_proto/cosmos.js +0 -216
- package/dist/esm/gitopia/bundle.js +0 -95
- package/dist/esm/gitopia/client.js +0 -32
- package/dist/esm/gitopia/custom-lcd-client.js +0 -50
- package/dist/esm/gitopia/gitopia/gitopia/attachment.js +0 -101
- package/dist/esm/gitopia/gitopia/gitopia/bounty.js +0 -255
- package/dist/esm/gitopia/gitopia/gitopia/branch.js +0 -137
- package/dist/esm/gitopia/gitopia/gitopia/comment.js +0 -488
- package/dist/esm/gitopia/gitopia/gitopia/dao.js +0 -451
- package/dist/esm/gitopia/gitopia/gitopia/exercised_amount.js +0 -78
- package/dist/esm/gitopia/gitopia/gitopia/genesis.js +0 -460
- package/dist/esm/gitopia/gitopia/gitopia/issue.js +0 -323
- package/dist/esm/gitopia/gitopia/gitopia/params.js +0 -293
- package/dist/esm/gitopia/gitopia/gitopia/pullRequest.js +0 -565
- package/dist/esm/gitopia/gitopia/gitopia/query.js +0 -7351
- package/dist/esm/gitopia/gitopia/gitopia/query.lcd.js +0 -452
- package/dist/esm/gitopia/gitopia/gitopia/query.rpc.Query.js +0 -453
- package/dist/esm/gitopia/gitopia/gitopia/reaction.js +0 -123
- package/dist/esm/gitopia/gitopia/gitopia/release.js +0 -225
- package/dist/esm/gitopia/gitopia/gitopia/repository.js +0 -1200
- package/dist/esm/gitopia/gitopia/gitopia/tag.js +0 -125
- package/dist/esm/gitopia/gitopia/gitopia/task.js +0 -197
- package/dist/esm/gitopia/gitopia/gitopia/tx.amino.js +0 -464
- package/dist/esm/gitopia/gitopia/gitopia/tx.js +0 -14679
- package/dist/esm/gitopia/gitopia/gitopia/tx.registry.js +0 -1671
- package/dist/esm/gitopia/gitopia/gitopia/tx.rpc.msg.js +0 -560
- package/dist/esm/gitopia/gitopia/gitopia/user.js +0 -340
- package/dist/esm/gitopia/gitopia/gitopia/whois.js +0 -146
- package/dist/esm/gitopia/gitopia/offchain/offchain.js +0 -144
- package/dist/esm/gitopia/gitopia/rewards/genesis.js +0 -82
- package/dist/esm/gitopia/gitopia/rewards/params.js +0 -81
- package/dist/esm/gitopia/gitopia/rewards/pool.js +0 -191
- package/dist/esm/gitopia/gitopia/rewards/query.js +0 -654
- package/dist/esm/gitopia/gitopia/rewards/query.lcd.js +0 -40
- package/dist/esm/gitopia/gitopia/rewards/query.rpc.Query.js +0 -53
- package/dist/esm/gitopia/gitopia/rewards/rewards.js +0 -191
- package/dist/esm/gitopia/gitopia/rewards/task.js +0 -176
- package/dist/esm/gitopia/gitopia/rewards/tx.amino.js +0 -19
- package/dist/esm/gitopia/gitopia/rewards/tx.js +0 -525
- package/dist/esm/gitopia/gitopia/rewards/tx.registry.js +0 -69
- package/dist/esm/gitopia/gitopia/rewards/tx.rpc.msg.js +0 -26
- package/dist/esm/gitopia/rpc.query.js +0 -29
- package/dist/esm/gitopia/rpc.tx.js +0 -13
- package/dist/esm/gogoproto/bundle.js +0 -5
- package/dist/esm/gogoproto/gogo.js +0 -1
- package/dist/esm/google/api/annotations.js +0 -1
- package/dist/esm/google/api/http.js +0 -329
- package/dist/esm/google/bundle.js +0 -14
- package/dist/esm/google/protobuf/any.js +0 -74
- package/dist/esm/google/protobuf/descriptor.js +0 -4848
- package/dist/esm/google/protobuf/duration.js +0 -71
- package/dist/esm/google/protobuf/timestamp.js +0 -68
- package/dist/esm/helpers.js +0 -129
- package/dist/esm/ibc/applications/transfer/v1/query.js +0 -847
- package/dist/esm/ibc/applications/transfer/v1/query.lcd.js +0 -70
- package/dist/esm/ibc/applications/transfer/v1/query.rpc.Query.js +0 -71
- package/dist/esm/ibc/applications/transfer/v1/transfer.js +0 -164
- package/dist/esm/ibc/applications/transfer/v1/tx.amino.js +0 -9
- package/dist/esm/ibc/applications/transfer/v1/tx.js +0 -226
- package/dist/esm/ibc/applications/transfer/v1/tx.registry.js +0 -33
- package/dist/esm/ibc/applications/transfer/v1/tx.rpc.msg.js +0 -14
- package/dist/esm/ibc/bundle.js +0 -44
- package/dist/esm/ibc/client.js +0 -29
- package/dist/esm/ibc/core/client/v1/client.js +0 -611
- package/dist/esm/ibc/rpc.query.js +0 -30
- package/dist/esm/ibc/rpc.tx.js +0 -14
- package/dist/esm/index.js +0 -19
- package/dist/esm/utf8.js +0 -137
- package/dist/esm/varint.js +0 -408
- package/dist/gitopia/bundle.d.ts +0 -6123
- package/dist/gitopia/bundle.js +0 -131
- package/dist/gitopia/client.d.ts +0 -492
- package/dist/gitopia/client.js +0 -70
- package/dist/gitopia/custom-lcd-client.d.ts +0 -31
- package/dist/gitopia/custom-lcd-client.js +0 -87
- package/dist/gitopia/gitopia/gitopia/attachment.d.ts +0 -39
- package/dist/gitopia/gitopia/gitopia/attachment.js +0 -104
- package/dist/gitopia/gitopia/gitopia/bounty.d.ts +0 -79
- package/dist/gitopia/gitopia/gitopia/bounty.js +0 -262
- package/dist/gitopia/gitopia/gitopia/branch.d.ts +0 -48
- package/dist/gitopia/gitopia/gitopia/branch.js +0 -140
- package/dist/gitopia/gitopia/gitopia/comment.d.ts +0 -125
- package/dist/gitopia/gitopia/gitopia/comment.js +0 -495
- package/dist/gitopia/gitopia/gitopia/dao.d.ts +0 -160
- package/dist/gitopia/gitopia/gitopia/dao.js +0 -454
- package/dist/gitopia/gitopia/gitopia/exercised_amount.d.ts +0 -34
- package/dist/gitopia/gitopia/gitopia/exercised_amount.js +0 -81
- package/dist/gitopia/gitopia/gitopia/genesis.d.ts +0 -143
- package/dist/gitopia/gitopia/gitopia/genesis.js +0 -463
- package/dist/gitopia/gitopia/gitopia/issue.d.ts +0 -88
- package/dist/gitopia/gitopia/gitopia/issue.js +0 -328
- package/dist/gitopia/gitopia/gitopia/params.d.ts +0 -115
- package/dist/gitopia/gitopia/gitopia/params.js +0 -296
- package/dist/gitopia/gitopia/gitopia/pullRequest.d.ts +0 -177
- package/dist/gitopia/gitopia/gitopia/pullRequest.js +0 -570
- package/dist/gitopia/gitopia/gitopia/query.d.ts +0 -3130
- package/dist/gitopia/gitopia/gitopia/query.js +0 -7355
- package/dist/gitopia/gitopia/gitopia/query.lcd.d.ts +0 -54
- package/dist/gitopia/gitopia/gitopia/query.lcd.js +0 -456
- package/dist/gitopia/gitopia/gitopia/query.rpc.Query.d.ts +0 -188
- package/dist/gitopia/gitopia/gitopia/query.rpc.Query.js +0 -458
- package/dist/gitopia/gitopia/gitopia/reaction.d.ts +0 -42
- package/dist/gitopia/gitopia/gitopia/reaction.js +0 -128
- package/dist/gitopia/gitopia/gitopia/release.d.ts +0 -70
- package/dist/gitopia/gitopia/gitopia/release.js +0 -228
- package/dist/gitopia/gitopia/gitopia/repository.d.ts +0 -424
- package/dist/gitopia/gitopia/gitopia/repository.js +0 -1207
- package/dist/gitopia/gitopia/gitopia/tag.d.ts +0 -45
- package/dist/gitopia/gitopia/gitopia/tag.js +0 -128
- package/dist/gitopia/gitopia/gitopia/task.d.ts +0 -64
- package/dist/gitopia/gitopia/gitopia/task.js +0 -204
- package/dist/gitopia/gitopia/gitopia/tx.amino.d.ts +0 -463
- package/dist/gitopia/gitopia/gitopia/tx.amino.js +0 -467
- package/dist/gitopia/gitopia/gitopia/tx.d.ts +0 -6246
- package/dist/gitopia/gitopia/gitopia/tx.js +0 -14687
- package/dist/gitopia/gitopia/gitopia/tx.registry.d.ts +0 -1116
- package/dist/gitopia/gitopia/gitopia/tx.registry.js +0 -1675
- package/dist/gitopia/gitopia/gitopia/tx.rpc.msg.d.ts +0 -200
- package/dist/gitopia/gitopia/gitopia/tx.rpc.msg.js +0 -564
- package/dist/gitopia/gitopia/gitopia/user.d.ts +0 -104
- package/dist/gitopia/gitopia/gitopia/user.js +0 -343
- package/dist/gitopia/gitopia/gitopia/whois.d.ts +0 -51
- package/dist/gitopia/gitopia/gitopia/whois.js +0 -151
- package/dist/gitopia/gitopia/offchain/offchain.d.ts +0 -74
- package/dist/gitopia/gitopia/offchain/offchain.js +0 -147
- package/dist/gitopia/gitopia/rewards/genesis.d.ts +0 -40
- package/dist/gitopia/gitopia/rewards/genesis.js +0 -85
- package/dist/gitopia/gitopia/rewards/params.d.ts +0 -37
- package/dist/gitopia/gitopia/rewards/params.js +0 -84
- package/dist/gitopia/gitopia/rewards/pool.d.ts +0 -59
- package/dist/gitopia/gitopia/rewards/pool.js +0 -196
- package/dist/gitopia/gitopia/rewards/query.d.ts +0 -294
- package/dist/gitopia/gitopia/rewards/query.js +0 -657
- package/dist/gitopia/gitopia/rewards/query.lcd.d.ts +0 -12
- package/dist/gitopia/gitopia/rewards/query.lcd.js +0 -44
- package/dist/gitopia/gitopia/rewards/query.rpc.Query.d.ts +0 -28
- package/dist/gitopia/gitopia/rewards/query.rpc.Query.js +0 -58
- package/dist/gitopia/gitopia/rewards/rewards.d.ts +0 -79
- package/dist/gitopia/gitopia/rewards/rewards.js +0 -194
- package/dist/gitopia/gitopia/rewards/task.d.ts +0 -54
- package/dist/gitopia/gitopia/rewards/task.js +0 -181
- package/dist/gitopia/gitopia/rewards/tx.amino.d.ts +0 -18
- package/dist/gitopia/gitopia/rewards/tx.amino.js +0 -22
- package/dist/gitopia/gitopia/rewards/tx.d.ts +0 -242
- package/dist/gitopia/gitopia/rewards/tx.js +0 -528
- package/dist/gitopia/gitopia/rewards/tx.registry.d.ts +0 -48
- package/dist/gitopia/gitopia/rewards/tx.registry.js +0 -73
- package/dist/gitopia/gitopia/rewards/tx.rpc.msg.d.ts +0 -19
- package/dist/gitopia/gitopia/rewards/tx.rpc.msg.js +0 -30
- package/dist/gitopia/rpc.query.d.ts +0 -117
- package/dist/gitopia/rpc.query.js +0 -66
- package/dist/gitopia/rpc.tx.d.ts +0 -16
- package/dist/gitopia/rpc.tx.js +0 -50
- package/dist/gogoproto/bundle.d.ts +0 -1
- package/dist/gogoproto/bundle.js +0 -41
- package/dist/gogoproto/gogo.d.ts +0 -1
- package/dist/gogoproto/gogo.js +0 -2
- package/dist/google/api/annotations.d.ts +0 -1
- package/dist/google/api/annotations.js +0 -2
- package/dist/google/api/http.d.ts +0 -1049
- package/dist/google/api/http.js +0 -332
- package/dist/google/bundle.d.ts +0 -525
- package/dist/google/bundle.js +0 -50
- package/dist/google/protobuf/any.d.ts +0 -358
- package/dist/google/protobuf/any.js +0 -77
- package/dist/google/protobuf/descriptor.d.ts +0 -3178
- package/dist/google/protobuf/descriptor.js +0 -4886
- package/dist/google/protobuf/duration.d.ts +0 -223
- package/dist/google/protobuf/duration.js +0 -74
- package/dist/google/protobuf/timestamp.d.ts +0 -314
- package/dist/google/protobuf/timestamp.js +0 -71
- package/dist/helpers.d.ts +0 -82
- package/dist/helpers.js +0 -144
- package/dist/ibc/applications/transfer/v1/query.d.ts +0 -479
- package/dist/ibc/applications/transfer/v1/query.js +0 -850
- package/dist/ibc/applications/transfer/v1/query.lcd.d.ts +0 -14
- package/dist/ibc/applications/transfer/v1/query.lcd.js +0 -74
- package/dist/ibc/applications/transfer/v1/query.rpc.Query.d.ts +0 -36
- package/dist/ibc/applications/transfer/v1/query.rpc.Query.js +0 -76
- package/dist/ibc/applications/transfer/v1/transfer.d.ts +0 -123
- package/dist/ibc/applications/transfer/v1/transfer.js +0 -167
- package/dist/ibc/applications/transfer/v1/tx.amino.d.ts +0 -8
- package/dist/ibc/applications/transfer/v1/tx.amino.js +0 -12
- package/dist/ibc/applications/transfer/v1/tx.d.ts +0 -132
- package/dist/ibc/applications/transfer/v1/tx.js +0 -229
- package/dist/ibc/applications/transfer/v1/tx.registry.d.ts +0 -24
- package/dist/ibc/applications/transfer/v1/tx.registry.js +0 -37
- package/dist/ibc/applications/transfer/v1/tx.rpc.msg.d.ts +0 -12
- package/dist/ibc/applications/transfer/v1/tx.rpc.msg.js +0 -18
- package/dist/ibc/bundle.d.ts +0 -450
- package/dist/ibc/bundle.js +0 -80
- package/dist/ibc/client.d.ts +0 -22
- package/dist/ibc/client.js +0 -67
- package/dist/ibc/core/client/v1/client.d.ts +0 -408
- package/dist/ibc/core/client/v1/client.js +0 -614
- package/dist/ibc/rpc.query.d.ts +0 -73
- package/dist/ibc/rpc.query.js +0 -67
- package/dist/ibc/rpc.tx.d.ts +0 -17
- package/dist/ibc/rpc.tx.js +0 -51
- package/dist/index.d.ts +0 -18
- package/dist/index.js +0 -35
- package/dist/package.json +0 -46
- package/dist/utf8.d.ts +0 -27
- package/dist/utf8.js +0 -141
- package/dist/varint.d.ts +0 -105
- package/dist/varint.js +0 -426
|
@@ -1,1122 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Cosmos_govv1beta1Content_ToAmino = exports.Cosmos_govv1beta1Content_FromAmino = exports.Cosmos_govv1beta1Content_InterfaceDecoder = exports.TallyParams = exports.VotingParams = exports.DepositParams = exports.Vote = exports.TallyResult = exports.Proposal = exports.Deposit = exports.TextProposal = exports.WeightedVoteOption = exports.ProposalStatusAmino = exports.ProposalStatusSDKType = exports.ProposalStatus = exports.VoteOptionAmino = exports.VoteOptionSDKType = exports.VoteOption = void 0;
|
|
4
|
-
exports.voteOptionFromJSON = voteOptionFromJSON;
|
|
5
|
-
exports.voteOptionToJSON = voteOptionToJSON;
|
|
6
|
-
exports.proposalStatusFromJSON = proposalStatusFromJSON;
|
|
7
|
-
exports.proposalStatusToJSON = proposalStatusToJSON;
|
|
8
|
-
//@ts-nocheck
|
|
9
|
-
const coin_1 = require("../../base/v1beta1/coin");
|
|
10
|
-
const any_1 = require("../../../google/protobuf/any");
|
|
11
|
-
const timestamp_1 = require("../../../google/protobuf/timestamp");
|
|
12
|
-
const duration_1 = require("../../../google/protobuf/duration");
|
|
13
|
-
const upgrade_1 = require("../../upgrade/v1beta1/upgrade");
|
|
14
|
-
const client_1 = require("../../../ibc/core/client/v1/client");
|
|
15
|
-
const binary_1 = require("../../../binary");
|
|
16
|
-
const math_1 = require("@cosmjs/math");
|
|
17
|
-
const helpers_1 = require("../../../helpers");
|
|
18
|
-
/** VoteOption enumerates the valid vote options for a given governance proposal. */
|
|
19
|
-
var VoteOption;
|
|
20
|
-
(function (VoteOption) {
|
|
21
|
-
/** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */
|
|
22
|
-
VoteOption[VoteOption["VOTE_OPTION_UNSPECIFIED"] = 0] = "VOTE_OPTION_UNSPECIFIED";
|
|
23
|
-
/** VOTE_OPTION_YES - VOTE_OPTION_YES defines a yes vote option. */
|
|
24
|
-
VoteOption[VoteOption["VOTE_OPTION_YES"] = 1] = "VOTE_OPTION_YES";
|
|
25
|
-
/** VOTE_OPTION_ABSTAIN - VOTE_OPTION_ABSTAIN defines an abstain vote option. */
|
|
26
|
-
VoteOption[VoteOption["VOTE_OPTION_ABSTAIN"] = 2] = "VOTE_OPTION_ABSTAIN";
|
|
27
|
-
/** VOTE_OPTION_NO - VOTE_OPTION_NO defines a no vote option. */
|
|
28
|
-
VoteOption[VoteOption["VOTE_OPTION_NO"] = 3] = "VOTE_OPTION_NO";
|
|
29
|
-
/** VOTE_OPTION_NO_WITH_VETO - VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */
|
|
30
|
-
VoteOption[VoteOption["VOTE_OPTION_NO_WITH_VETO"] = 4] = "VOTE_OPTION_NO_WITH_VETO";
|
|
31
|
-
VoteOption[VoteOption["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
32
|
-
})(VoteOption || (exports.VoteOption = VoteOption = {}));
|
|
33
|
-
exports.VoteOptionSDKType = VoteOption;
|
|
34
|
-
exports.VoteOptionAmino = VoteOption;
|
|
35
|
-
function voteOptionFromJSON(object) {
|
|
36
|
-
switch (object) {
|
|
37
|
-
case 0:
|
|
38
|
-
case "VOTE_OPTION_UNSPECIFIED":
|
|
39
|
-
return VoteOption.VOTE_OPTION_UNSPECIFIED;
|
|
40
|
-
case 1:
|
|
41
|
-
case "VOTE_OPTION_YES":
|
|
42
|
-
return VoteOption.VOTE_OPTION_YES;
|
|
43
|
-
case 2:
|
|
44
|
-
case "VOTE_OPTION_ABSTAIN":
|
|
45
|
-
return VoteOption.VOTE_OPTION_ABSTAIN;
|
|
46
|
-
case 3:
|
|
47
|
-
case "VOTE_OPTION_NO":
|
|
48
|
-
return VoteOption.VOTE_OPTION_NO;
|
|
49
|
-
case 4:
|
|
50
|
-
case "VOTE_OPTION_NO_WITH_VETO":
|
|
51
|
-
return VoteOption.VOTE_OPTION_NO_WITH_VETO;
|
|
52
|
-
case -1:
|
|
53
|
-
case "UNRECOGNIZED":
|
|
54
|
-
default:
|
|
55
|
-
return VoteOption.UNRECOGNIZED;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
function voteOptionToJSON(object) {
|
|
59
|
-
switch (object) {
|
|
60
|
-
case VoteOption.VOTE_OPTION_UNSPECIFIED:
|
|
61
|
-
return "VOTE_OPTION_UNSPECIFIED";
|
|
62
|
-
case VoteOption.VOTE_OPTION_YES:
|
|
63
|
-
return "VOTE_OPTION_YES";
|
|
64
|
-
case VoteOption.VOTE_OPTION_ABSTAIN:
|
|
65
|
-
return "VOTE_OPTION_ABSTAIN";
|
|
66
|
-
case VoteOption.VOTE_OPTION_NO:
|
|
67
|
-
return "VOTE_OPTION_NO";
|
|
68
|
-
case VoteOption.VOTE_OPTION_NO_WITH_VETO:
|
|
69
|
-
return "VOTE_OPTION_NO_WITH_VETO";
|
|
70
|
-
case VoteOption.UNRECOGNIZED:
|
|
71
|
-
default:
|
|
72
|
-
return "UNRECOGNIZED";
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
/** ProposalStatus enumerates the valid statuses of a proposal. */
|
|
76
|
-
var ProposalStatus;
|
|
77
|
-
(function (ProposalStatus) {
|
|
78
|
-
/** PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. */
|
|
79
|
-
ProposalStatus[ProposalStatus["PROPOSAL_STATUS_UNSPECIFIED"] = 0] = "PROPOSAL_STATUS_UNSPECIFIED";
|
|
80
|
-
/**
|
|
81
|
-
* PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit
|
|
82
|
-
* period.
|
|
83
|
-
*/
|
|
84
|
-
ProposalStatus[ProposalStatus["PROPOSAL_STATUS_DEPOSIT_PERIOD"] = 1] = "PROPOSAL_STATUS_DEPOSIT_PERIOD";
|
|
85
|
-
/**
|
|
86
|
-
* PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting
|
|
87
|
-
* period.
|
|
88
|
-
*/
|
|
89
|
-
ProposalStatus[ProposalStatus["PROPOSAL_STATUS_VOTING_PERIOD"] = 2] = "PROPOSAL_STATUS_VOTING_PERIOD";
|
|
90
|
-
/**
|
|
91
|
-
* PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has
|
|
92
|
-
* passed.
|
|
93
|
-
*/
|
|
94
|
-
ProposalStatus[ProposalStatus["PROPOSAL_STATUS_PASSED"] = 3] = "PROPOSAL_STATUS_PASSED";
|
|
95
|
-
/**
|
|
96
|
-
* PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has
|
|
97
|
-
* been rejected.
|
|
98
|
-
*/
|
|
99
|
-
ProposalStatus[ProposalStatus["PROPOSAL_STATUS_REJECTED"] = 4] = "PROPOSAL_STATUS_REJECTED";
|
|
100
|
-
/**
|
|
101
|
-
* PROPOSAL_STATUS_FAILED - PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has
|
|
102
|
-
* failed.
|
|
103
|
-
*/
|
|
104
|
-
ProposalStatus[ProposalStatus["PROPOSAL_STATUS_FAILED"] = 5] = "PROPOSAL_STATUS_FAILED";
|
|
105
|
-
ProposalStatus[ProposalStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
106
|
-
})(ProposalStatus || (exports.ProposalStatus = ProposalStatus = {}));
|
|
107
|
-
exports.ProposalStatusSDKType = ProposalStatus;
|
|
108
|
-
exports.ProposalStatusAmino = ProposalStatus;
|
|
109
|
-
function proposalStatusFromJSON(object) {
|
|
110
|
-
switch (object) {
|
|
111
|
-
case 0:
|
|
112
|
-
case "PROPOSAL_STATUS_UNSPECIFIED":
|
|
113
|
-
return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED;
|
|
114
|
-
case 1:
|
|
115
|
-
case "PROPOSAL_STATUS_DEPOSIT_PERIOD":
|
|
116
|
-
return ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD;
|
|
117
|
-
case 2:
|
|
118
|
-
case "PROPOSAL_STATUS_VOTING_PERIOD":
|
|
119
|
-
return ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD;
|
|
120
|
-
case 3:
|
|
121
|
-
case "PROPOSAL_STATUS_PASSED":
|
|
122
|
-
return ProposalStatus.PROPOSAL_STATUS_PASSED;
|
|
123
|
-
case 4:
|
|
124
|
-
case "PROPOSAL_STATUS_REJECTED":
|
|
125
|
-
return ProposalStatus.PROPOSAL_STATUS_REJECTED;
|
|
126
|
-
case 5:
|
|
127
|
-
case "PROPOSAL_STATUS_FAILED":
|
|
128
|
-
return ProposalStatus.PROPOSAL_STATUS_FAILED;
|
|
129
|
-
case -1:
|
|
130
|
-
case "UNRECOGNIZED":
|
|
131
|
-
default:
|
|
132
|
-
return ProposalStatus.UNRECOGNIZED;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
function proposalStatusToJSON(object) {
|
|
136
|
-
switch (object) {
|
|
137
|
-
case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED:
|
|
138
|
-
return "PROPOSAL_STATUS_UNSPECIFIED";
|
|
139
|
-
case ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD:
|
|
140
|
-
return "PROPOSAL_STATUS_DEPOSIT_PERIOD";
|
|
141
|
-
case ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD:
|
|
142
|
-
return "PROPOSAL_STATUS_VOTING_PERIOD";
|
|
143
|
-
case ProposalStatus.PROPOSAL_STATUS_PASSED:
|
|
144
|
-
return "PROPOSAL_STATUS_PASSED";
|
|
145
|
-
case ProposalStatus.PROPOSAL_STATUS_REJECTED:
|
|
146
|
-
return "PROPOSAL_STATUS_REJECTED";
|
|
147
|
-
case ProposalStatus.PROPOSAL_STATUS_FAILED:
|
|
148
|
-
return "PROPOSAL_STATUS_FAILED";
|
|
149
|
-
case ProposalStatus.UNRECOGNIZED:
|
|
150
|
-
default:
|
|
151
|
-
return "UNRECOGNIZED";
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
function createBaseWeightedVoteOption() {
|
|
155
|
-
return {
|
|
156
|
-
option: 0,
|
|
157
|
-
weight: ""
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
exports.WeightedVoteOption = {
|
|
161
|
-
typeUrl: "/cosmos.gov.v1beta1.WeightedVoteOption",
|
|
162
|
-
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
163
|
-
if (message.option !== 0) {
|
|
164
|
-
writer.uint32(8).int32(message.option);
|
|
165
|
-
}
|
|
166
|
-
if (message.weight !== "") {
|
|
167
|
-
writer.uint32(18).string(math_1.Decimal.fromUserInput(message.weight, 18).atomics);
|
|
168
|
-
}
|
|
169
|
-
return writer;
|
|
170
|
-
},
|
|
171
|
-
decode(input, length) {
|
|
172
|
-
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
173
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
174
|
-
const message = createBaseWeightedVoteOption();
|
|
175
|
-
while (reader.pos < end) {
|
|
176
|
-
const tag = reader.uint32();
|
|
177
|
-
switch (tag >>> 3) {
|
|
178
|
-
case 1:
|
|
179
|
-
message.option = reader.int32();
|
|
180
|
-
break;
|
|
181
|
-
case 2:
|
|
182
|
-
message.weight = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
183
|
-
break;
|
|
184
|
-
default:
|
|
185
|
-
reader.skipType(tag & 7);
|
|
186
|
-
break;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
return message;
|
|
190
|
-
},
|
|
191
|
-
fromPartial(object) {
|
|
192
|
-
const message = createBaseWeightedVoteOption();
|
|
193
|
-
message.option = object.option ?? 0;
|
|
194
|
-
message.weight = object.weight ?? "";
|
|
195
|
-
return message;
|
|
196
|
-
},
|
|
197
|
-
fromAmino(object) {
|
|
198
|
-
const message = createBaseWeightedVoteOption();
|
|
199
|
-
if (object.option !== undefined && object.option !== null) {
|
|
200
|
-
message.option = object.option;
|
|
201
|
-
}
|
|
202
|
-
if (object.weight !== undefined && object.weight !== null) {
|
|
203
|
-
message.weight = object.weight;
|
|
204
|
-
}
|
|
205
|
-
return message;
|
|
206
|
-
},
|
|
207
|
-
toAmino(message) {
|
|
208
|
-
const obj = {};
|
|
209
|
-
obj.option = message.option === 0 ? undefined : message.option;
|
|
210
|
-
obj.weight = message.weight === "" ? undefined : message.weight;
|
|
211
|
-
return obj;
|
|
212
|
-
},
|
|
213
|
-
fromAminoMsg(object) {
|
|
214
|
-
return exports.WeightedVoteOption.fromAmino(object.value);
|
|
215
|
-
},
|
|
216
|
-
toAminoMsg(message) {
|
|
217
|
-
return {
|
|
218
|
-
type: "cosmos-sdk/WeightedVoteOption",
|
|
219
|
-
value: exports.WeightedVoteOption.toAmino(message)
|
|
220
|
-
};
|
|
221
|
-
},
|
|
222
|
-
fromProtoMsg(message) {
|
|
223
|
-
return exports.WeightedVoteOption.decode(message.value);
|
|
224
|
-
},
|
|
225
|
-
toProto(message) {
|
|
226
|
-
return exports.WeightedVoteOption.encode(message).finish();
|
|
227
|
-
},
|
|
228
|
-
toProtoMsg(message) {
|
|
229
|
-
return {
|
|
230
|
-
typeUrl: "/cosmos.gov.v1beta1.WeightedVoteOption",
|
|
231
|
-
value: exports.WeightedVoteOption.encode(message).finish()
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
function createBaseTextProposal() {
|
|
236
|
-
return {
|
|
237
|
-
$typeUrl: "/cosmos.gov.v1beta1.TextProposal",
|
|
238
|
-
title: "",
|
|
239
|
-
description: ""
|
|
240
|
-
};
|
|
241
|
-
}
|
|
242
|
-
exports.TextProposal = {
|
|
243
|
-
typeUrl: "/cosmos.gov.v1beta1.TextProposal",
|
|
244
|
-
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
245
|
-
if (message.title !== "") {
|
|
246
|
-
writer.uint32(10).string(message.title);
|
|
247
|
-
}
|
|
248
|
-
if (message.description !== "") {
|
|
249
|
-
writer.uint32(18).string(message.description);
|
|
250
|
-
}
|
|
251
|
-
return writer;
|
|
252
|
-
},
|
|
253
|
-
decode(input, length) {
|
|
254
|
-
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
255
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
256
|
-
const message = createBaseTextProposal();
|
|
257
|
-
while (reader.pos < end) {
|
|
258
|
-
const tag = reader.uint32();
|
|
259
|
-
switch (tag >>> 3) {
|
|
260
|
-
case 1:
|
|
261
|
-
message.title = reader.string();
|
|
262
|
-
break;
|
|
263
|
-
case 2:
|
|
264
|
-
message.description = reader.string();
|
|
265
|
-
break;
|
|
266
|
-
default:
|
|
267
|
-
reader.skipType(tag & 7);
|
|
268
|
-
break;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
return message;
|
|
272
|
-
},
|
|
273
|
-
fromPartial(object) {
|
|
274
|
-
const message = createBaseTextProposal();
|
|
275
|
-
message.title = object.title ?? "";
|
|
276
|
-
message.description = object.description ?? "";
|
|
277
|
-
return message;
|
|
278
|
-
},
|
|
279
|
-
fromAmino(object) {
|
|
280
|
-
const message = createBaseTextProposal();
|
|
281
|
-
if (object.title !== undefined && object.title !== null) {
|
|
282
|
-
message.title = object.title;
|
|
283
|
-
}
|
|
284
|
-
if (object.description !== undefined && object.description !== null) {
|
|
285
|
-
message.description = object.description;
|
|
286
|
-
}
|
|
287
|
-
return message;
|
|
288
|
-
},
|
|
289
|
-
toAmino(message) {
|
|
290
|
-
const obj = {};
|
|
291
|
-
obj.title = message.title === "" ? undefined : message.title;
|
|
292
|
-
obj.description = message.description === "" ? undefined : message.description;
|
|
293
|
-
return obj;
|
|
294
|
-
},
|
|
295
|
-
fromAminoMsg(object) {
|
|
296
|
-
return exports.TextProposal.fromAmino(object.value);
|
|
297
|
-
},
|
|
298
|
-
toAminoMsg(message) {
|
|
299
|
-
return {
|
|
300
|
-
type: "cosmos-sdk/TextProposal",
|
|
301
|
-
value: exports.TextProposal.toAmino(message)
|
|
302
|
-
};
|
|
303
|
-
},
|
|
304
|
-
fromProtoMsg(message) {
|
|
305
|
-
return exports.TextProposal.decode(message.value);
|
|
306
|
-
},
|
|
307
|
-
toProto(message) {
|
|
308
|
-
return exports.TextProposal.encode(message).finish();
|
|
309
|
-
},
|
|
310
|
-
toProtoMsg(message) {
|
|
311
|
-
return {
|
|
312
|
-
typeUrl: "/cosmos.gov.v1beta1.TextProposal",
|
|
313
|
-
value: exports.TextProposal.encode(message).finish()
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
};
|
|
317
|
-
function createBaseDeposit() {
|
|
318
|
-
return {
|
|
319
|
-
proposalId: BigInt(0),
|
|
320
|
-
depositor: "",
|
|
321
|
-
amount: []
|
|
322
|
-
};
|
|
323
|
-
}
|
|
324
|
-
exports.Deposit = {
|
|
325
|
-
typeUrl: "/cosmos.gov.v1beta1.Deposit",
|
|
326
|
-
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
327
|
-
if (message.proposalId !== BigInt(0)) {
|
|
328
|
-
writer.uint32(8).uint64(message.proposalId);
|
|
329
|
-
}
|
|
330
|
-
if (message.depositor !== "") {
|
|
331
|
-
writer.uint32(18).string(message.depositor);
|
|
332
|
-
}
|
|
333
|
-
for (const v of message.amount) {
|
|
334
|
-
coin_1.Coin.encode(v, writer.uint32(26).fork()).ldelim();
|
|
335
|
-
}
|
|
336
|
-
return writer;
|
|
337
|
-
},
|
|
338
|
-
decode(input, length) {
|
|
339
|
-
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
340
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
341
|
-
const message = createBaseDeposit();
|
|
342
|
-
while (reader.pos < end) {
|
|
343
|
-
const tag = reader.uint32();
|
|
344
|
-
switch (tag >>> 3) {
|
|
345
|
-
case 1:
|
|
346
|
-
message.proposalId = reader.uint64();
|
|
347
|
-
break;
|
|
348
|
-
case 2:
|
|
349
|
-
message.depositor = reader.string();
|
|
350
|
-
break;
|
|
351
|
-
case 3:
|
|
352
|
-
message.amount.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
353
|
-
break;
|
|
354
|
-
default:
|
|
355
|
-
reader.skipType(tag & 7);
|
|
356
|
-
break;
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
return message;
|
|
360
|
-
},
|
|
361
|
-
fromPartial(object) {
|
|
362
|
-
const message = createBaseDeposit();
|
|
363
|
-
message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0);
|
|
364
|
-
message.depositor = object.depositor ?? "";
|
|
365
|
-
message.amount = object.amount?.map(e => coin_1.Coin.fromPartial(e)) || [];
|
|
366
|
-
return message;
|
|
367
|
-
},
|
|
368
|
-
fromAmino(object) {
|
|
369
|
-
const message = createBaseDeposit();
|
|
370
|
-
if (object.proposal_id !== undefined && object.proposal_id !== null) {
|
|
371
|
-
message.proposalId = BigInt(object.proposal_id);
|
|
372
|
-
}
|
|
373
|
-
if (object.depositor !== undefined && object.depositor !== null) {
|
|
374
|
-
message.depositor = object.depositor;
|
|
375
|
-
}
|
|
376
|
-
message.amount = object.amount?.map(e => coin_1.Coin.fromAmino(e)) || [];
|
|
377
|
-
return message;
|
|
378
|
-
},
|
|
379
|
-
toAmino(message) {
|
|
380
|
-
const obj = {};
|
|
381
|
-
obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId?.toString() : undefined;
|
|
382
|
-
obj.depositor = message.depositor === "" ? undefined : message.depositor;
|
|
383
|
-
if (message.amount) {
|
|
384
|
-
obj.amount = message.amount.map(e => e ? coin_1.Coin.toAmino(e) : undefined);
|
|
385
|
-
}
|
|
386
|
-
else {
|
|
387
|
-
obj.amount = message.amount;
|
|
388
|
-
}
|
|
389
|
-
return obj;
|
|
390
|
-
},
|
|
391
|
-
fromAminoMsg(object) {
|
|
392
|
-
return exports.Deposit.fromAmino(object.value);
|
|
393
|
-
},
|
|
394
|
-
toAminoMsg(message) {
|
|
395
|
-
return {
|
|
396
|
-
type: "cosmos-sdk/Deposit",
|
|
397
|
-
value: exports.Deposit.toAmino(message)
|
|
398
|
-
};
|
|
399
|
-
},
|
|
400
|
-
fromProtoMsg(message) {
|
|
401
|
-
return exports.Deposit.decode(message.value);
|
|
402
|
-
},
|
|
403
|
-
toProto(message) {
|
|
404
|
-
return exports.Deposit.encode(message).finish();
|
|
405
|
-
},
|
|
406
|
-
toProtoMsg(message) {
|
|
407
|
-
return {
|
|
408
|
-
typeUrl: "/cosmos.gov.v1beta1.Deposit",
|
|
409
|
-
value: exports.Deposit.encode(message).finish()
|
|
410
|
-
};
|
|
411
|
-
}
|
|
412
|
-
};
|
|
413
|
-
function createBaseProposal() {
|
|
414
|
-
return {
|
|
415
|
-
proposalId: BigInt(0),
|
|
416
|
-
content: undefined,
|
|
417
|
-
status: 0,
|
|
418
|
-
finalTallyResult: exports.TallyResult.fromPartial({}),
|
|
419
|
-
submitTime: new Date(),
|
|
420
|
-
depositEndTime: new Date(),
|
|
421
|
-
totalDeposit: [],
|
|
422
|
-
votingStartTime: new Date(),
|
|
423
|
-
votingEndTime: new Date()
|
|
424
|
-
};
|
|
425
|
-
}
|
|
426
|
-
exports.Proposal = {
|
|
427
|
-
typeUrl: "/cosmos.gov.v1beta1.Proposal",
|
|
428
|
-
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
429
|
-
if (message.proposalId !== BigInt(0)) {
|
|
430
|
-
writer.uint32(8).uint64(message.proposalId);
|
|
431
|
-
}
|
|
432
|
-
if (message.content !== undefined) {
|
|
433
|
-
any_1.Any.encode(message.content, writer.uint32(18).fork()).ldelim();
|
|
434
|
-
}
|
|
435
|
-
if (message.status !== 0) {
|
|
436
|
-
writer.uint32(24).int32(message.status);
|
|
437
|
-
}
|
|
438
|
-
if (message.finalTallyResult !== undefined) {
|
|
439
|
-
exports.TallyResult.encode(message.finalTallyResult, writer.uint32(34).fork()).ldelim();
|
|
440
|
-
}
|
|
441
|
-
if (message.submitTime !== undefined) {
|
|
442
|
-
timestamp_1.Timestamp.encode((0, helpers_1.toTimestamp)(message.submitTime), writer.uint32(42).fork()).ldelim();
|
|
443
|
-
}
|
|
444
|
-
if (message.depositEndTime !== undefined) {
|
|
445
|
-
timestamp_1.Timestamp.encode((0, helpers_1.toTimestamp)(message.depositEndTime), writer.uint32(50).fork()).ldelim();
|
|
446
|
-
}
|
|
447
|
-
for (const v of message.totalDeposit) {
|
|
448
|
-
coin_1.Coin.encode(v, writer.uint32(58).fork()).ldelim();
|
|
449
|
-
}
|
|
450
|
-
if (message.votingStartTime !== undefined) {
|
|
451
|
-
timestamp_1.Timestamp.encode((0, helpers_1.toTimestamp)(message.votingStartTime), writer.uint32(66).fork()).ldelim();
|
|
452
|
-
}
|
|
453
|
-
if (message.votingEndTime !== undefined) {
|
|
454
|
-
timestamp_1.Timestamp.encode((0, helpers_1.toTimestamp)(message.votingEndTime), writer.uint32(74).fork()).ldelim();
|
|
455
|
-
}
|
|
456
|
-
return writer;
|
|
457
|
-
},
|
|
458
|
-
decode(input, length) {
|
|
459
|
-
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
460
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
461
|
-
const message = createBaseProposal();
|
|
462
|
-
while (reader.pos < end) {
|
|
463
|
-
const tag = reader.uint32();
|
|
464
|
-
switch (tag >>> 3) {
|
|
465
|
-
case 1:
|
|
466
|
-
message.proposalId = reader.uint64();
|
|
467
|
-
break;
|
|
468
|
-
case 2:
|
|
469
|
-
message.content = (0, exports.Cosmos_govv1beta1Content_InterfaceDecoder)(reader);
|
|
470
|
-
break;
|
|
471
|
-
case 3:
|
|
472
|
-
message.status = reader.int32();
|
|
473
|
-
break;
|
|
474
|
-
case 4:
|
|
475
|
-
message.finalTallyResult = exports.TallyResult.decode(reader, reader.uint32());
|
|
476
|
-
break;
|
|
477
|
-
case 5:
|
|
478
|
-
message.submitTime = (0, helpers_1.fromTimestamp)(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
479
|
-
break;
|
|
480
|
-
case 6:
|
|
481
|
-
message.depositEndTime = (0, helpers_1.fromTimestamp)(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
482
|
-
break;
|
|
483
|
-
case 7:
|
|
484
|
-
message.totalDeposit.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
485
|
-
break;
|
|
486
|
-
case 8:
|
|
487
|
-
message.votingStartTime = (0, helpers_1.fromTimestamp)(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
488
|
-
break;
|
|
489
|
-
case 9:
|
|
490
|
-
message.votingEndTime = (0, helpers_1.fromTimestamp)(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
491
|
-
break;
|
|
492
|
-
default:
|
|
493
|
-
reader.skipType(tag & 7);
|
|
494
|
-
break;
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
return message;
|
|
498
|
-
},
|
|
499
|
-
fromPartial(object) {
|
|
500
|
-
const message = createBaseProposal();
|
|
501
|
-
message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0);
|
|
502
|
-
message.content = object.content !== undefined && object.content !== null ? any_1.Any.fromPartial(object.content) : undefined;
|
|
503
|
-
message.status = object.status ?? 0;
|
|
504
|
-
message.finalTallyResult = object.finalTallyResult !== undefined && object.finalTallyResult !== null ? exports.TallyResult.fromPartial(object.finalTallyResult) : undefined;
|
|
505
|
-
message.submitTime = object.submitTime ?? undefined;
|
|
506
|
-
message.depositEndTime = object.depositEndTime ?? undefined;
|
|
507
|
-
message.totalDeposit = object.totalDeposit?.map(e => coin_1.Coin.fromPartial(e)) || [];
|
|
508
|
-
message.votingStartTime = object.votingStartTime ?? undefined;
|
|
509
|
-
message.votingEndTime = object.votingEndTime ?? undefined;
|
|
510
|
-
return message;
|
|
511
|
-
},
|
|
512
|
-
fromAmino(object) {
|
|
513
|
-
const message = createBaseProposal();
|
|
514
|
-
if (object.proposal_id !== undefined && object.proposal_id !== null) {
|
|
515
|
-
message.proposalId = BigInt(object.proposal_id);
|
|
516
|
-
}
|
|
517
|
-
if (object.content !== undefined && object.content !== null) {
|
|
518
|
-
message.content = (0, exports.Cosmos_govv1beta1Content_FromAmino)(object.content);
|
|
519
|
-
}
|
|
520
|
-
if (object.status !== undefined && object.status !== null) {
|
|
521
|
-
message.status = object.status;
|
|
522
|
-
}
|
|
523
|
-
if (object.final_tally_result !== undefined && object.final_tally_result !== null) {
|
|
524
|
-
message.finalTallyResult = exports.TallyResult.fromAmino(object.final_tally_result);
|
|
525
|
-
}
|
|
526
|
-
if (object.submit_time !== undefined && object.submit_time !== null) {
|
|
527
|
-
message.submitTime = (0, helpers_1.fromTimestamp)(timestamp_1.Timestamp.fromAmino(object.submit_time));
|
|
528
|
-
}
|
|
529
|
-
if (object.deposit_end_time !== undefined && object.deposit_end_time !== null) {
|
|
530
|
-
message.depositEndTime = (0, helpers_1.fromTimestamp)(timestamp_1.Timestamp.fromAmino(object.deposit_end_time));
|
|
531
|
-
}
|
|
532
|
-
message.totalDeposit = object.total_deposit?.map(e => coin_1.Coin.fromAmino(e)) || [];
|
|
533
|
-
if (object.voting_start_time !== undefined && object.voting_start_time !== null) {
|
|
534
|
-
message.votingStartTime = (0, helpers_1.fromTimestamp)(timestamp_1.Timestamp.fromAmino(object.voting_start_time));
|
|
535
|
-
}
|
|
536
|
-
if (object.voting_end_time !== undefined && object.voting_end_time !== null) {
|
|
537
|
-
message.votingEndTime = (0, helpers_1.fromTimestamp)(timestamp_1.Timestamp.fromAmino(object.voting_end_time));
|
|
538
|
-
}
|
|
539
|
-
return message;
|
|
540
|
-
},
|
|
541
|
-
toAmino(message) {
|
|
542
|
-
const obj = {};
|
|
543
|
-
obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId?.toString() : undefined;
|
|
544
|
-
obj.content = message.content ? (0, exports.Cosmos_govv1beta1Content_ToAmino)(message.content) : undefined;
|
|
545
|
-
obj.status = message.status === 0 ? undefined : message.status;
|
|
546
|
-
obj.final_tally_result = message.finalTallyResult ? exports.TallyResult.toAmino(message.finalTallyResult) : exports.TallyResult.toAmino(exports.TallyResult.fromPartial({}));
|
|
547
|
-
obj.submit_time = message.submitTime ? timestamp_1.Timestamp.toAmino((0, helpers_1.toTimestamp)(message.submitTime)) : new Date();
|
|
548
|
-
obj.deposit_end_time = message.depositEndTime ? timestamp_1.Timestamp.toAmino((0, helpers_1.toTimestamp)(message.depositEndTime)) : new Date();
|
|
549
|
-
if (message.totalDeposit) {
|
|
550
|
-
obj.total_deposit = message.totalDeposit.map(e => e ? coin_1.Coin.toAmino(e) : undefined);
|
|
551
|
-
}
|
|
552
|
-
else {
|
|
553
|
-
obj.total_deposit = message.totalDeposit;
|
|
554
|
-
}
|
|
555
|
-
obj.voting_start_time = message.votingStartTime ? timestamp_1.Timestamp.toAmino((0, helpers_1.toTimestamp)(message.votingStartTime)) : new Date();
|
|
556
|
-
obj.voting_end_time = message.votingEndTime ? timestamp_1.Timestamp.toAmino((0, helpers_1.toTimestamp)(message.votingEndTime)) : new Date();
|
|
557
|
-
return obj;
|
|
558
|
-
},
|
|
559
|
-
fromAminoMsg(object) {
|
|
560
|
-
return exports.Proposal.fromAmino(object.value);
|
|
561
|
-
},
|
|
562
|
-
toAminoMsg(message) {
|
|
563
|
-
return {
|
|
564
|
-
type: "cosmos-sdk/Proposal",
|
|
565
|
-
value: exports.Proposal.toAmino(message)
|
|
566
|
-
};
|
|
567
|
-
},
|
|
568
|
-
fromProtoMsg(message) {
|
|
569
|
-
return exports.Proposal.decode(message.value);
|
|
570
|
-
},
|
|
571
|
-
toProto(message) {
|
|
572
|
-
return exports.Proposal.encode(message).finish();
|
|
573
|
-
},
|
|
574
|
-
toProtoMsg(message) {
|
|
575
|
-
return {
|
|
576
|
-
typeUrl: "/cosmos.gov.v1beta1.Proposal",
|
|
577
|
-
value: exports.Proposal.encode(message).finish()
|
|
578
|
-
};
|
|
579
|
-
}
|
|
580
|
-
};
|
|
581
|
-
function createBaseTallyResult() {
|
|
582
|
-
return {
|
|
583
|
-
yes: "",
|
|
584
|
-
abstain: "",
|
|
585
|
-
no: "",
|
|
586
|
-
noWithVeto: ""
|
|
587
|
-
};
|
|
588
|
-
}
|
|
589
|
-
exports.TallyResult = {
|
|
590
|
-
typeUrl: "/cosmos.gov.v1beta1.TallyResult",
|
|
591
|
-
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
592
|
-
if (message.yes !== "") {
|
|
593
|
-
writer.uint32(10).string(message.yes);
|
|
594
|
-
}
|
|
595
|
-
if (message.abstain !== "") {
|
|
596
|
-
writer.uint32(18).string(message.abstain);
|
|
597
|
-
}
|
|
598
|
-
if (message.no !== "") {
|
|
599
|
-
writer.uint32(26).string(message.no);
|
|
600
|
-
}
|
|
601
|
-
if (message.noWithVeto !== "") {
|
|
602
|
-
writer.uint32(34).string(message.noWithVeto);
|
|
603
|
-
}
|
|
604
|
-
return writer;
|
|
605
|
-
},
|
|
606
|
-
decode(input, length) {
|
|
607
|
-
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
608
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
609
|
-
const message = createBaseTallyResult();
|
|
610
|
-
while (reader.pos < end) {
|
|
611
|
-
const tag = reader.uint32();
|
|
612
|
-
switch (tag >>> 3) {
|
|
613
|
-
case 1:
|
|
614
|
-
message.yes = reader.string();
|
|
615
|
-
break;
|
|
616
|
-
case 2:
|
|
617
|
-
message.abstain = reader.string();
|
|
618
|
-
break;
|
|
619
|
-
case 3:
|
|
620
|
-
message.no = reader.string();
|
|
621
|
-
break;
|
|
622
|
-
case 4:
|
|
623
|
-
message.noWithVeto = reader.string();
|
|
624
|
-
break;
|
|
625
|
-
default:
|
|
626
|
-
reader.skipType(tag & 7);
|
|
627
|
-
break;
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
return message;
|
|
631
|
-
},
|
|
632
|
-
fromPartial(object) {
|
|
633
|
-
const message = createBaseTallyResult();
|
|
634
|
-
message.yes = object.yes ?? "";
|
|
635
|
-
message.abstain = object.abstain ?? "";
|
|
636
|
-
message.no = object.no ?? "";
|
|
637
|
-
message.noWithVeto = object.noWithVeto ?? "";
|
|
638
|
-
return message;
|
|
639
|
-
},
|
|
640
|
-
fromAmino(object) {
|
|
641
|
-
const message = createBaseTallyResult();
|
|
642
|
-
if (object.yes !== undefined && object.yes !== null) {
|
|
643
|
-
message.yes = object.yes;
|
|
644
|
-
}
|
|
645
|
-
if (object.abstain !== undefined && object.abstain !== null) {
|
|
646
|
-
message.abstain = object.abstain;
|
|
647
|
-
}
|
|
648
|
-
if (object.no !== undefined && object.no !== null) {
|
|
649
|
-
message.no = object.no;
|
|
650
|
-
}
|
|
651
|
-
if (object.no_with_veto !== undefined && object.no_with_veto !== null) {
|
|
652
|
-
message.noWithVeto = object.no_with_veto;
|
|
653
|
-
}
|
|
654
|
-
return message;
|
|
655
|
-
},
|
|
656
|
-
toAmino(message) {
|
|
657
|
-
const obj = {};
|
|
658
|
-
obj.yes = message.yes === "" ? undefined : message.yes;
|
|
659
|
-
obj.abstain = message.abstain === "" ? undefined : message.abstain;
|
|
660
|
-
obj.no = message.no === "" ? undefined : message.no;
|
|
661
|
-
obj.no_with_veto = message.noWithVeto === "" ? undefined : message.noWithVeto;
|
|
662
|
-
return obj;
|
|
663
|
-
},
|
|
664
|
-
fromAminoMsg(object) {
|
|
665
|
-
return exports.TallyResult.fromAmino(object.value);
|
|
666
|
-
},
|
|
667
|
-
toAminoMsg(message) {
|
|
668
|
-
return {
|
|
669
|
-
type: "cosmos-sdk/TallyResult",
|
|
670
|
-
value: exports.TallyResult.toAmino(message)
|
|
671
|
-
};
|
|
672
|
-
},
|
|
673
|
-
fromProtoMsg(message) {
|
|
674
|
-
return exports.TallyResult.decode(message.value);
|
|
675
|
-
},
|
|
676
|
-
toProto(message) {
|
|
677
|
-
return exports.TallyResult.encode(message).finish();
|
|
678
|
-
},
|
|
679
|
-
toProtoMsg(message) {
|
|
680
|
-
return {
|
|
681
|
-
typeUrl: "/cosmos.gov.v1beta1.TallyResult",
|
|
682
|
-
value: exports.TallyResult.encode(message).finish()
|
|
683
|
-
};
|
|
684
|
-
}
|
|
685
|
-
};
|
|
686
|
-
function createBaseVote() {
|
|
687
|
-
return {
|
|
688
|
-
proposalId: BigInt(0),
|
|
689
|
-
voter: "",
|
|
690
|
-
option: 0,
|
|
691
|
-
options: []
|
|
692
|
-
};
|
|
693
|
-
}
|
|
694
|
-
exports.Vote = {
|
|
695
|
-
typeUrl: "/cosmos.gov.v1beta1.Vote",
|
|
696
|
-
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
697
|
-
if (message.proposalId !== BigInt(0)) {
|
|
698
|
-
writer.uint32(8).uint64(message.proposalId);
|
|
699
|
-
}
|
|
700
|
-
if (message.voter !== "") {
|
|
701
|
-
writer.uint32(18).string(message.voter);
|
|
702
|
-
}
|
|
703
|
-
if (message.option !== 0) {
|
|
704
|
-
writer.uint32(24).int32(message.option);
|
|
705
|
-
}
|
|
706
|
-
for (const v of message.options) {
|
|
707
|
-
exports.WeightedVoteOption.encode(v, writer.uint32(34).fork()).ldelim();
|
|
708
|
-
}
|
|
709
|
-
return writer;
|
|
710
|
-
},
|
|
711
|
-
decode(input, length) {
|
|
712
|
-
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
713
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
714
|
-
const message = createBaseVote();
|
|
715
|
-
while (reader.pos < end) {
|
|
716
|
-
const tag = reader.uint32();
|
|
717
|
-
switch (tag >>> 3) {
|
|
718
|
-
case 1:
|
|
719
|
-
message.proposalId = reader.uint64();
|
|
720
|
-
break;
|
|
721
|
-
case 2:
|
|
722
|
-
message.voter = reader.string();
|
|
723
|
-
break;
|
|
724
|
-
case 3:
|
|
725
|
-
message.option = reader.int32();
|
|
726
|
-
break;
|
|
727
|
-
case 4:
|
|
728
|
-
message.options.push(exports.WeightedVoteOption.decode(reader, reader.uint32()));
|
|
729
|
-
break;
|
|
730
|
-
default:
|
|
731
|
-
reader.skipType(tag & 7);
|
|
732
|
-
break;
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
return message;
|
|
736
|
-
},
|
|
737
|
-
fromPartial(object) {
|
|
738
|
-
const message = createBaseVote();
|
|
739
|
-
message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0);
|
|
740
|
-
message.voter = object.voter ?? "";
|
|
741
|
-
message.option = object.option ?? 0;
|
|
742
|
-
message.options = object.options?.map(e => exports.WeightedVoteOption.fromPartial(e)) || [];
|
|
743
|
-
return message;
|
|
744
|
-
},
|
|
745
|
-
fromAmino(object) {
|
|
746
|
-
const message = createBaseVote();
|
|
747
|
-
if (object.proposal_id !== undefined && object.proposal_id !== null) {
|
|
748
|
-
message.proposalId = BigInt(object.proposal_id);
|
|
749
|
-
}
|
|
750
|
-
if (object.voter !== undefined && object.voter !== null) {
|
|
751
|
-
message.voter = object.voter;
|
|
752
|
-
}
|
|
753
|
-
if (object.option !== undefined && object.option !== null) {
|
|
754
|
-
message.option = object.option;
|
|
755
|
-
}
|
|
756
|
-
message.options = object.options?.map(e => exports.WeightedVoteOption.fromAmino(e)) || [];
|
|
757
|
-
return message;
|
|
758
|
-
},
|
|
759
|
-
toAmino(message) {
|
|
760
|
-
const obj = {};
|
|
761
|
-
obj.proposal_id = message.proposalId ? message.proposalId?.toString() : "0";
|
|
762
|
-
obj.voter = message.voter === "" ? undefined : message.voter;
|
|
763
|
-
obj.option = message.option === 0 ? undefined : message.option;
|
|
764
|
-
if (message.options) {
|
|
765
|
-
obj.options = message.options.map(e => e ? exports.WeightedVoteOption.toAmino(e) : undefined);
|
|
766
|
-
}
|
|
767
|
-
else {
|
|
768
|
-
obj.options = message.options;
|
|
769
|
-
}
|
|
770
|
-
return obj;
|
|
771
|
-
},
|
|
772
|
-
fromAminoMsg(object) {
|
|
773
|
-
return exports.Vote.fromAmino(object.value);
|
|
774
|
-
},
|
|
775
|
-
toAminoMsg(message) {
|
|
776
|
-
return {
|
|
777
|
-
type: "cosmos-sdk/Vote",
|
|
778
|
-
value: exports.Vote.toAmino(message)
|
|
779
|
-
};
|
|
780
|
-
},
|
|
781
|
-
fromProtoMsg(message) {
|
|
782
|
-
return exports.Vote.decode(message.value);
|
|
783
|
-
},
|
|
784
|
-
toProto(message) {
|
|
785
|
-
return exports.Vote.encode(message).finish();
|
|
786
|
-
},
|
|
787
|
-
toProtoMsg(message) {
|
|
788
|
-
return {
|
|
789
|
-
typeUrl: "/cosmos.gov.v1beta1.Vote",
|
|
790
|
-
value: exports.Vote.encode(message).finish()
|
|
791
|
-
};
|
|
792
|
-
}
|
|
793
|
-
};
|
|
794
|
-
function createBaseDepositParams() {
|
|
795
|
-
return {
|
|
796
|
-
minDeposit: [],
|
|
797
|
-
maxDepositPeriod: duration_1.Duration.fromPartial({})
|
|
798
|
-
};
|
|
799
|
-
}
|
|
800
|
-
exports.DepositParams = {
|
|
801
|
-
typeUrl: "/cosmos.gov.v1beta1.DepositParams",
|
|
802
|
-
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
803
|
-
for (const v of message.minDeposit) {
|
|
804
|
-
coin_1.Coin.encode(v, writer.uint32(10).fork()).ldelim();
|
|
805
|
-
}
|
|
806
|
-
if (message.maxDepositPeriod !== undefined) {
|
|
807
|
-
duration_1.Duration.encode(message.maxDepositPeriod, writer.uint32(18).fork()).ldelim();
|
|
808
|
-
}
|
|
809
|
-
return writer;
|
|
810
|
-
},
|
|
811
|
-
decode(input, length) {
|
|
812
|
-
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
813
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
814
|
-
const message = createBaseDepositParams();
|
|
815
|
-
while (reader.pos < end) {
|
|
816
|
-
const tag = reader.uint32();
|
|
817
|
-
switch (tag >>> 3) {
|
|
818
|
-
case 1:
|
|
819
|
-
message.minDeposit.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
820
|
-
break;
|
|
821
|
-
case 2:
|
|
822
|
-
message.maxDepositPeriod = duration_1.Duration.decode(reader, reader.uint32());
|
|
823
|
-
break;
|
|
824
|
-
default:
|
|
825
|
-
reader.skipType(tag & 7);
|
|
826
|
-
break;
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
return message;
|
|
830
|
-
},
|
|
831
|
-
fromPartial(object) {
|
|
832
|
-
const message = createBaseDepositParams();
|
|
833
|
-
message.minDeposit = object.minDeposit?.map(e => coin_1.Coin.fromPartial(e)) || [];
|
|
834
|
-
message.maxDepositPeriod = object.maxDepositPeriod !== undefined && object.maxDepositPeriod !== null ? duration_1.Duration.fromPartial(object.maxDepositPeriod) : undefined;
|
|
835
|
-
return message;
|
|
836
|
-
},
|
|
837
|
-
fromAmino(object) {
|
|
838
|
-
const message = createBaseDepositParams();
|
|
839
|
-
message.minDeposit = object.min_deposit?.map(e => coin_1.Coin.fromAmino(e)) || [];
|
|
840
|
-
if (object.max_deposit_period !== undefined && object.max_deposit_period !== null) {
|
|
841
|
-
message.maxDepositPeriod = duration_1.Duration.fromAmino(object.max_deposit_period);
|
|
842
|
-
}
|
|
843
|
-
return message;
|
|
844
|
-
},
|
|
845
|
-
toAmino(message) {
|
|
846
|
-
const obj = {};
|
|
847
|
-
if (message.minDeposit) {
|
|
848
|
-
obj.min_deposit = message.minDeposit.map(e => e ? coin_1.Coin.toAmino(e) : undefined);
|
|
849
|
-
}
|
|
850
|
-
else {
|
|
851
|
-
obj.min_deposit = message.minDeposit;
|
|
852
|
-
}
|
|
853
|
-
obj.max_deposit_period = message.maxDepositPeriod ? duration_1.Duration.toAmino(message.maxDepositPeriod) : undefined;
|
|
854
|
-
return obj;
|
|
855
|
-
},
|
|
856
|
-
fromAminoMsg(object) {
|
|
857
|
-
return exports.DepositParams.fromAmino(object.value);
|
|
858
|
-
},
|
|
859
|
-
toAminoMsg(message) {
|
|
860
|
-
return {
|
|
861
|
-
type: "cosmos-sdk/DepositParams",
|
|
862
|
-
value: exports.DepositParams.toAmino(message)
|
|
863
|
-
};
|
|
864
|
-
},
|
|
865
|
-
fromProtoMsg(message) {
|
|
866
|
-
return exports.DepositParams.decode(message.value);
|
|
867
|
-
},
|
|
868
|
-
toProto(message) {
|
|
869
|
-
return exports.DepositParams.encode(message).finish();
|
|
870
|
-
},
|
|
871
|
-
toProtoMsg(message) {
|
|
872
|
-
return {
|
|
873
|
-
typeUrl: "/cosmos.gov.v1beta1.DepositParams",
|
|
874
|
-
value: exports.DepositParams.encode(message).finish()
|
|
875
|
-
};
|
|
876
|
-
}
|
|
877
|
-
};
|
|
878
|
-
function createBaseVotingParams() {
|
|
879
|
-
return {
|
|
880
|
-
votingPeriod: duration_1.Duration.fromPartial({})
|
|
881
|
-
};
|
|
882
|
-
}
|
|
883
|
-
exports.VotingParams = {
|
|
884
|
-
typeUrl: "/cosmos.gov.v1beta1.VotingParams",
|
|
885
|
-
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
886
|
-
if (message.votingPeriod !== undefined) {
|
|
887
|
-
duration_1.Duration.encode(message.votingPeriod, writer.uint32(10).fork()).ldelim();
|
|
888
|
-
}
|
|
889
|
-
return writer;
|
|
890
|
-
},
|
|
891
|
-
decode(input, length) {
|
|
892
|
-
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
893
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
894
|
-
const message = createBaseVotingParams();
|
|
895
|
-
while (reader.pos < end) {
|
|
896
|
-
const tag = reader.uint32();
|
|
897
|
-
switch (tag >>> 3) {
|
|
898
|
-
case 1:
|
|
899
|
-
message.votingPeriod = duration_1.Duration.decode(reader, reader.uint32());
|
|
900
|
-
break;
|
|
901
|
-
default:
|
|
902
|
-
reader.skipType(tag & 7);
|
|
903
|
-
break;
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
return message;
|
|
907
|
-
},
|
|
908
|
-
fromPartial(object) {
|
|
909
|
-
const message = createBaseVotingParams();
|
|
910
|
-
message.votingPeriod = object.votingPeriod !== undefined && object.votingPeriod !== null ? duration_1.Duration.fromPartial(object.votingPeriod) : undefined;
|
|
911
|
-
return message;
|
|
912
|
-
},
|
|
913
|
-
fromAmino(object) {
|
|
914
|
-
const message = createBaseVotingParams();
|
|
915
|
-
if (object.voting_period !== undefined && object.voting_period !== null) {
|
|
916
|
-
message.votingPeriod = duration_1.Duration.fromAmino(object.voting_period);
|
|
917
|
-
}
|
|
918
|
-
return message;
|
|
919
|
-
},
|
|
920
|
-
toAmino(message) {
|
|
921
|
-
const obj = {};
|
|
922
|
-
obj.voting_period = message.votingPeriod ? duration_1.Duration.toAmino(message.votingPeriod) : undefined;
|
|
923
|
-
return obj;
|
|
924
|
-
},
|
|
925
|
-
fromAminoMsg(object) {
|
|
926
|
-
return exports.VotingParams.fromAmino(object.value);
|
|
927
|
-
},
|
|
928
|
-
toAminoMsg(message) {
|
|
929
|
-
return {
|
|
930
|
-
type: "cosmos-sdk/VotingParams",
|
|
931
|
-
value: exports.VotingParams.toAmino(message)
|
|
932
|
-
};
|
|
933
|
-
},
|
|
934
|
-
fromProtoMsg(message) {
|
|
935
|
-
return exports.VotingParams.decode(message.value);
|
|
936
|
-
},
|
|
937
|
-
toProto(message) {
|
|
938
|
-
return exports.VotingParams.encode(message).finish();
|
|
939
|
-
},
|
|
940
|
-
toProtoMsg(message) {
|
|
941
|
-
return {
|
|
942
|
-
typeUrl: "/cosmos.gov.v1beta1.VotingParams",
|
|
943
|
-
value: exports.VotingParams.encode(message).finish()
|
|
944
|
-
};
|
|
945
|
-
}
|
|
946
|
-
};
|
|
947
|
-
function createBaseTallyParams() {
|
|
948
|
-
return {
|
|
949
|
-
quorum: new Uint8Array(),
|
|
950
|
-
threshold: new Uint8Array(),
|
|
951
|
-
vetoThreshold: new Uint8Array()
|
|
952
|
-
};
|
|
953
|
-
}
|
|
954
|
-
exports.TallyParams = {
|
|
955
|
-
typeUrl: "/cosmos.gov.v1beta1.TallyParams",
|
|
956
|
-
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
957
|
-
if (message.quorum.length !== 0) {
|
|
958
|
-
writer.uint32(10).bytes(message.quorum);
|
|
959
|
-
}
|
|
960
|
-
if (message.threshold.length !== 0) {
|
|
961
|
-
writer.uint32(18).bytes(message.threshold);
|
|
962
|
-
}
|
|
963
|
-
if (message.vetoThreshold.length !== 0) {
|
|
964
|
-
writer.uint32(26).bytes(message.vetoThreshold);
|
|
965
|
-
}
|
|
966
|
-
return writer;
|
|
967
|
-
},
|
|
968
|
-
decode(input, length) {
|
|
969
|
-
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
970
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
971
|
-
const message = createBaseTallyParams();
|
|
972
|
-
while (reader.pos < end) {
|
|
973
|
-
const tag = reader.uint32();
|
|
974
|
-
switch (tag >>> 3) {
|
|
975
|
-
case 1:
|
|
976
|
-
message.quorum = reader.bytes();
|
|
977
|
-
break;
|
|
978
|
-
case 2:
|
|
979
|
-
message.threshold = reader.bytes();
|
|
980
|
-
break;
|
|
981
|
-
case 3:
|
|
982
|
-
message.vetoThreshold = reader.bytes();
|
|
983
|
-
break;
|
|
984
|
-
default:
|
|
985
|
-
reader.skipType(tag & 7);
|
|
986
|
-
break;
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
|
-
return message;
|
|
990
|
-
},
|
|
991
|
-
fromPartial(object) {
|
|
992
|
-
const message = createBaseTallyParams();
|
|
993
|
-
message.quorum = object.quorum ?? new Uint8Array();
|
|
994
|
-
message.threshold = object.threshold ?? new Uint8Array();
|
|
995
|
-
message.vetoThreshold = object.vetoThreshold ?? new Uint8Array();
|
|
996
|
-
return message;
|
|
997
|
-
},
|
|
998
|
-
fromAmino(object) {
|
|
999
|
-
const message = createBaseTallyParams();
|
|
1000
|
-
if (object.quorum !== undefined && object.quorum !== null) {
|
|
1001
|
-
message.quorum = (0, helpers_1.bytesFromBase64)(object.quorum);
|
|
1002
|
-
}
|
|
1003
|
-
if (object.threshold !== undefined && object.threshold !== null) {
|
|
1004
|
-
message.threshold = (0, helpers_1.bytesFromBase64)(object.threshold);
|
|
1005
|
-
}
|
|
1006
|
-
if (object.veto_threshold !== undefined && object.veto_threshold !== null) {
|
|
1007
|
-
message.vetoThreshold = (0, helpers_1.bytesFromBase64)(object.veto_threshold);
|
|
1008
|
-
}
|
|
1009
|
-
return message;
|
|
1010
|
-
},
|
|
1011
|
-
toAmino(message) {
|
|
1012
|
-
const obj = {};
|
|
1013
|
-
obj.quorum = message.quorum ? (0, helpers_1.base64FromBytes)(message.quorum) : undefined;
|
|
1014
|
-
obj.threshold = message.threshold ? (0, helpers_1.base64FromBytes)(message.threshold) : undefined;
|
|
1015
|
-
obj.veto_threshold = message.vetoThreshold ? (0, helpers_1.base64FromBytes)(message.vetoThreshold) : undefined;
|
|
1016
|
-
return obj;
|
|
1017
|
-
},
|
|
1018
|
-
fromAminoMsg(object) {
|
|
1019
|
-
return exports.TallyParams.fromAmino(object.value);
|
|
1020
|
-
},
|
|
1021
|
-
toAminoMsg(message) {
|
|
1022
|
-
return {
|
|
1023
|
-
type: "cosmos-sdk/TallyParams",
|
|
1024
|
-
value: exports.TallyParams.toAmino(message)
|
|
1025
|
-
};
|
|
1026
|
-
},
|
|
1027
|
-
fromProtoMsg(message) {
|
|
1028
|
-
return exports.TallyParams.decode(message.value);
|
|
1029
|
-
},
|
|
1030
|
-
toProto(message) {
|
|
1031
|
-
return exports.TallyParams.encode(message).finish();
|
|
1032
|
-
},
|
|
1033
|
-
toProtoMsg(message) {
|
|
1034
|
-
return {
|
|
1035
|
-
typeUrl: "/cosmos.gov.v1beta1.TallyParams",
|
|
1036
|
-
value: exports.TallyParams.encode(message).finish()
|
|
1037
|
-
};
|
|
1038
|
-
}
|
|
1039
|
-
};
|
|
1040
|
-
const Cosmos_govv1beta1Content_InterfaceDecoder = (input) => {
|
|
1041
|
-
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1042
|
-
const data = any_1.Any.decode(reader, reader.uint32());
|
|
1043
|
-
switch (data.typeUrl) {
|
|
1044
|
-
case "/cosmos.gov.v1beta1.TextProposal":
|
|
1045
|
-
return exports.TextProposal.decode(data.value);
|
|
1046
|
-
case "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal":
|
|
1047
|
-
return upgrade_1.SoftwareUpgradeProposal.decode(data.value);
|
|
1048
|
-
case "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal":
|
|
1049
|
-
return upgrade_1.CancelSoftwareUpgradeProposal.decode(data.value);
|
|
1050
|
-
case "/ibc.core.client.v1.ClientUpdateProposal":
|
|
1051
|
-
return client_1.ClientUpdateProposal.decode(data.value);
|
|
1052
|
-
case "/ibc.core.client.v1.UpgradeProposal":
|
|
1053
|
-
return client_1.UpgradeProposal.decode(data.value);
|
|
1054
|
-
default:
|
|
1055
|
-
return data;
|
|
1056
|
-
}
|
|
1057
|
-
};
|
|
1058
|
-
exports.Cosmos_govv1beta1Content_InterfaceDecoder = Cosmos_govv1beta1Content_InterfaceDecoder;
|
|
1059
|
-
const Cosmos_govv1beta1Content_FromAmino = (content) => {
|
|
1060
|
-
switch (content.type) {
|
|
1061
|
-
case "cosmos-sdk/TextProposal":
|
|
1062
|
-
return any_1.Any.fromPartial({
|
|
1063
|
-
typeUrl: "/cosmos.gov.v1beta1.TextProposal",
|
|
1064
|
-
value: exports.TextProposal.encode(exports.TextProposal.fromPartial(exports.TextProposal.fromAmino(content.value))).finish()
|
|
1065
|
-
});
|
|
1066
|
-
case "cosmos-sdk/SoftwareUpgradeProposal":
|
|
1067
|
-
return any_1.Any.fromPartial({
|
|
1068
|
-
typeUrl: "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal",
|
|
1069
|
-
value: upgrade_1.SoftwareUpgradeProposal.encode(upgrade_1.SoftwareUpgradeProposal.fromPartial(upgrade_1.SoftwareUpgradeProposal.fromAmino(content.value))).finish()
|
|
1070
|
-
});
|
|
1071
|
-
case "cosmos-sdk/CancelSoftwareUpgradeProposal":
|
|
1072
|
-
return any_1.Any.fromPartial({
|
|
1073
|
-
typeUrl: "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal",
|
|
1074
|
-
value: upgrade_1.CancelSoftwareUpgradeProposal.encode(upgrade_1.CancelSoftwareUpgradeProposal.fromPartial(upgrade_1.CancelSoftwareUpgradeProposal.fromAmino(content.value))).finish()
|
|
1075
|
-
});
|
|
1076
|
-
case "cosmos-sdk/ClientUpdateProposal":
|
|
1077
|
-
return any_1.Any.fromPartial({
|
|
1078
|
-
typeUrl: "/ibc.core.client.v1.ClientUpdateProposal",
|
|
1079
|
-
value: client_1.ClientUpdateProposal.encode(client_1.ClientUpdateProposal.fromPartial(client_1.ClientUpdateProposal.fromAmino(content.value))).finish()
|
|
1080
|
-
});
|
|
1081
|
-
case "cosmos-sdk/UpgradeProposal":
|
|
1082
|
-
return any_1.Any.fromPartial({
|
|
1083
|
-
typeUrl: "/ibc.core.client.v1.UpgradeProposal",
|
|
1084
|
-
value: client_1.UpgradeProposal.encode(client_1.UpgradeProposal.fromPartial(client_1.UpgradeProposal.fromAmino(content.value))).finish()
|
|
1085
|
-
});
|
|
1086
|
-
default:
|
|
1087
|
-
return any_1.Any.fromAmino(content);
|
|
1088
|
-
}
|
|
1089
|
-
};
|
|
1090
|
-
exports.Cosmos_govv1beta1Content_FromAmino = Cosmos_govv1beta1Content_FromAmino;
|
|
1091
|
-
const Cosmos_govv1beta1Content_ToAmino = (content) => {
|
|
1092
|
-
switch (content.typeUrl) {
|
|
1093
|
-
case "/cosmos.gov.v1beta1.TextProposal":
|
|
1094
|
-
return {
|
|
1095
|
-
type: "cosmos-sdk/TextProposal",
|
|
1096
|
-
value: exports.TextProposal.toAmino(exports.TextProposal.decode(content.value, undefined))
|
|
1097
|
-
};
|
|
1098
|
-
case "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal":
|
|
1099
|
-
return {
|
|
1100
|
-
type: "cosmos-sdk/SoftwareUpgradeProposal",
|
|
1101
|
-
value: upgrade_1.SoftwareUpgradeProposal.toAmino(upgrade_1.SoftwareUpgradeProposal.decode(content.value, undefined))
|
|
1102
|
-
};
|
|
1103
|
-
case "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal":
|
|
1104
|
-
return {
|
|
1105
|
-
type: "cosmos-sdk/CancelSoftwareUpgradeProposal",
|
|
1106
|
-
value: upgrade_1.CancelSoftwareUpgradeProposal.toAmino(upgrade_1.CancelSoftwareUpgradeProposal.decode(content.value, undefined))
|
|
1107
|
-
};
|
|
1108
|
-
case "/ibc.core.client.v1.ClientUpdateProposal":
|
|
1109
|
-
return {
|
|
1110
|
-
type: "cosmos-sdk/ClientUpdateProposal",
|
|
1111
|
-
value: client_1.ClientUpdateProposal.toAmino(client_1.ClientUpdateProposal.decode(content.value, undefined))
|
|
1112
|
-
};
|
|
1113
|
-
case "/ibc.core.client.v1.UpgradeProposal":
|
|
1114
|
-
return {
|
|
1115
|
-
type: "cosmos-sdk/UpgradeProposal",
|
|
1116
|
-
value: client_1.UpgradeProposal.toAmino(client_1.UpgradeProposal.decode(content.value, undefined))
|
|
1117
|
-
};
|
|
1118
|
-
default:
|
|
1119
|
-
return any_1.Any.toAmino(content);
|
|
1120
|
-
}
|
|
1121
|
-
};
|
|
1122
|
-
exports.Cosmos_govv1beta1Content_ToAmino = Cosmos_govv1beta1Content_ToAmino;
|