carbon-js-sdk 0.3.51 → 0.3.53-dev.1

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.
Files changed (116) hide show
  1. package/lib/CarbonSDK.js +1 -1
  2. package/lib/clients/ETHClient.d.ts +11 -4
  3. package/lib/clients/ETHClient.js +20 -6
  4. package/lib/clients/HydrogenClient.d.ts +16 -7
  5. package/lib/clients/HydrogenClient.js +55 -9
  6. package/lib/clients/NEOClient.d.ts +1 -1
  7. package/lib/clients/NEOClient.js +9 -4
  8. package/lib/clients/TokenClient.d.ts +17 -4
  9. package/lib/clients/TokenClient.js +121 -8
  10. package/lib/clients/ZILClient.d.ts +1 -1
  11. package/lib/clients/ZILClient.js +9 -4
  12. package/lib/codec/cosmos/app/module/v1alpha1/module.d.ts +18 -0
  13. package/lib/codec/cosmos/app/module/v1alpha1/module.js +46 -0
  14. package/lib/codec/cosmos/app/v1alpha1/config.d.ts +57 -0
  15. package/lib/codec/cosmos/app/v1alpha1/config.js +125 -0
  16. package/lib/codec/cosmos/app/v1alpha1/export.d.ts +3 -0
  17. package/lib/codec/cosmos/app/v1alpha1/export.js +13 -0
  18. package/lib/codec/cosmos/app/v1alpha1/module.d.ts +109 -0
  19. package/lib/codec/cosmos/app/v1alpha1/module.js +192 -0
  20. package/lib/codec/cosmos/app/v1alpha1/query.d.ts +44 -0
  21. package/lib/codec/cosmos/app/v1alpha1/query.js +107 -0
  22. package/lib/codec/cosmos/authz/v1beta1/export.d.ts +4 -0
  23. package/lib/codec/cosmos/authz/v1beta1/export.js +25 -0
  24. package/lib/codec/cosmos/base/node/v1beta1/query.d.ts +42 -0
  25. package/lib/codec/cosmos/base/node/v1beta1/query.js +104 -0
  26. package/lib/codec/cosmos/base/tendermint/v1beta1/types.d.ts +67 -0
  27. package/lib/codec/cosmos/base/tendermint/v1beta1/types.js +423 -0
  28. package/lib/codec/cosmos/capability/v1beta1/export.d.ts +2 -0
  29. package/lib/codec/cosmos/capability/v1beta1/export.js +9 -0
  30. package/lib/codec/cosmos/crisis/v1beta1/export.d.ts +1 -0
  31. package/lib/codec/cosmos/crisis/v1beta1/export.js +6 -0
  32. package/lib/codec/cosmos/crypto/hd/v1/hd.d.ts +32 -0
  33. package/lib/codec/cosmos/crypto/hd/v1/hd.js +114 -0
  34. package/lib/codec/cosmos/crypto/keyring/v1/record.d.ts +78 -0
  35. package/lib/codec/cosmos/crypto/keyring/v1/record.js +309 -0
  36. package/lib/codec/cosmos/evidence/v1beta1/export.d.ts +3 -0
  37. package/lib/codec/cosmos/evidence/v1beta1/export.js +13 -0
  38. package/lib/codec/cosmos/feegrant/v1beta1/export.d.ts +3 -0
  39. package/lib/codec/cosmos/feegrant/v1beta1/export.js +20 -0
  40. package/lib/codec/cosmos/gov/v1/export.d.ts +3 -0
  41. package/lib/codec/cosmos/gov/v1/export.js +46 -0
  42. package/lib/codec/cosmos/gov/v1/genesis.d.ts +34 -0
  43. package/lib/codec/cosmos/gov/v1/genesis.js +166 -0
  44. package/lib/codec/cosmos/gov/v1/gov.d.ts +198 -0
  45. package/lib/codec/cosmos/gov/v1/gov.js +855 -0
  46. package/lib/codec/cosmos/gov/v1/query.d.ts +264 -0
  47. package/lib/codec/cosmos/gov/v1/query.js +1045 -0
  48. package/lib/codec/cosmos/gov/v1/tx.d.ts +167 -0
  49. package/lib/codec/cosmos/gov/v1/tx.js +639 -0
  50. package/lib/codec/cosmos/group/v1/events.d.ts +124 -0
  51. package/lib/codec/cosmos/group/v1/events.js +480 -0
  52. package/lib/codec/cosmos/group/v1/export.d.ts +4 -0
  53. package/lib/codec/cosmos/group/v1/export.js +94 -0
  54. package/lib/codec/cosmos/group/v1/genesis.d.ts +45 -0
  55. package/lib/codec/cosmos/group/v1/genesis.js +176 -0
  56. package/lib/codec/cosmos/group/v1/query.d.ts +412 -0
  57. package/lib/codec/cosmos/group/v1/query.js +1648 -0
  58. package/lib/codec/cosmos/group/v1/tx.d.ts +483 -0
  59. package/lib/codec/cosmos/group/v1/tx.js +1840 -0
  60. package/lib/codec/cosmos/group/v1/types.d.ts +356 -0
  61. package/lib/codec/cosmos/group/v1/types.js +1306 -0
  62. package/lib/codec/cosmos/msg/v1/msg.d.ts +1 -0
  63. package/lib/codec/cosmos/msg/v1/msg.js +14 -0
  64. package/lib/codec/cosmos/nft/v1beta1/event.d.ts +48 -0
  65. package/lib/codec/cosmos/nft/v1beta1/event.js +227 -0
  66. package/lib/codec/cosmos/nft/v1beta1/export.d.ts +5 -0
  67. package/lib/codec/cosmos/nft/v1beta1/export.js +30 -0
  68. package/lib/codec/cosmos/nft/v1beta1/genesis.d.ts +36 -0
  69. package/lib/codec/cosmos/nft/v1beta1/genesis.js +140 -0
  70. package/lib/codec/cosmos/nft/v1beta1/nft.d.ts +53 -0
  71. package/lib/codec/cosmos/nft/v1beta1/nft.js +233 -0
  72. package/lib/codec/cosmos/nft/v1beta1/query.d.ts +206 -0
  73. package/lib/codec/cosmos/nft/v1beta1/query.js +817 -0
  74. package/lib/codec/cosmos/nft/v1beta1/tx.d.ts +49 -0
  75. package/lib/codec/cosmos/nft/v1beta1/tx.js +137 -0
  76. package/lib/codec/cosmos/orm/module/v1alpha1/module.d.ts +22 -0
  77. package/lib/codec/cosmos/orm/module/v1alpha1/module.js +46 -0
  78. package/lib/codec/cosmos/orm/v1/export.d.ts +1 -0
  79. package/lib/codec/cosmos/orm/v1/export.js +8 -0
  80. package/lib/codec/cosmos/orm/v1/orm.d.ts +123 -0
  81. package/lib/codec/cosmos/orm/v1/orm.js +263 -0
  82. package/lib/codec/cosmos/orm/v1alpha1/export.d.ts +1 -0
  83. package/lib/codec/cosmos/orm/v1alpha1/export.js +9 -0
  84. package/lib/codec/cosmos/orm/v1alpha1/schema.d.ts +96 -0
  85. package/lib/codec/cosmos/orm/v1alpha1/schema.js +265 -0
  86. package/lib/codec/cosmos/upgrade/v1beta1/export.d.ts +3 -0
  87. package/lib/codec/cosmos/upgrade/v1beta1/export.js +24 -0
  88. package/lib/codec/cosmos/upgrade/v1beta1/tx.d.ts +97 -0
  89. package/lib/codec/cosmos/upgrade/v1beta1/tx.js +203 -0
  90. package/lib/codec/ibc/applications/fee/v1/ack.d.ts +24 -0
  91. package/lib/codec/ibc/applications/fee/v1/ack.js +125 -0
  92. package/lib/codec/ibc/applications/fee/v1/export.d.ts +6 -0
  93. package/lib/codec/ibc/applications/fee/v1/export.js +47 -0
  94. package/lib/codec/ibc/applications/fee/v1/fee.d.ts +68 -0
  95. package/lib/codec/ibc/applications/fee/v1/fee.js +289 -0
  96. package/lib/codec/ibc/applications/fee/v1/genesis.d.ts +93 -0
  97. package/lib/codec/ibc/applications/fee/v1/genesis.js +390 -0
  98. package/lib/codec/ibc/applications/fee/v1/metadata.d.ts +25 -0
  99. package/lib/codec/ibc/applications/fee/v1/metadata.js +71 -0
  100. package/lib/codec/ibc/applications/fee/v1/query.d.ts +312 -0
  101. package/lib/codec/ibc/applications/fee/v1/query.js +1187 -0
  102. package/lib/codec/ibc/applications/fee/v1/tx.d.ts +171 -0
  103. package/lib/codec/ibc/applications/fee/v1/tx.js +524 -0
  104. package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.d.ts +78 -0
  105. package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.js +296 -0
  106. package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.d.ts +80 -0
  107. package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.js +439 -0
  108. package/lib/hydrogen/transfer.d.ts +5 -5
  109. package/lib/insights/competition.d.ts +2 -0
  110. package/lib/provider/metamask/MetaMask.d.ts +5 -5
  111. package/lib/provider/metamask/MetaMask.js +35 -35
  112. package/lib/util/blockchain.d.ts +9 -0
  113. package/lib/util/blockchain.js +143 -1
  114. package/lib/util/ibc.d.ts +4 -4
  115. package/lib/util/ibc.js +17 -18
  116. package/package.json +1 -1
@@ -0,0 +1,34 @@
1
+ import Long from "long";
2
+ import _m0 from "protobufjs/minimal";
3
+ import { DepositParams, VotingParams, TallyParams, Deposit, Vote, Proposal } from "./gov";
4
+ export declare const protobufPackage = "cosmos.gov.v1";
5
+ /** Since: cosmos-sdk 0.46 */
6
+ /** GenesisState defines the gov module's genesis state. */
7
+ export interface GenesisState {
8
+ /** starting_proposal_id is the ID of the starting proposal. */
9
+ startingProposalId: Long;
10
+ /** deposits defines all the deposits present at genesis. */
11
+ deposits: Deposit[];
12
+ /** votes defines all the votes present at genesis. */
13
+ votes: Vote[];
14
+ /** proposals defines all the proposals present at genesis. */
15
+ proposals: Proposal[];
16
+ /** params defines all the paramaters of related to deposit. */
17
+ depositParams?: DepositParams;
18
+ /** params defines all the paramaters of related to voting. */
19
+ votingParams?: VotingParams;
20
+ /** params defines all the paramaters of related to tally. */
21
+ tallyParams?: TallyParams;
22
+ }
23
+ export declare const GenesisState: {
24
+ encode(message: GenesisState, writer?: _m0.Writer): _m0.Writer;
25
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): GenesisState;
26
+ fromJSON(object: any): GenesisState;
27
+ toJSON(message: GenesisState): unknown;
28
+ fromPartial(object: DeepPartial<GenesisState>): GenesisState;
29
+ };
30
+ declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
31
+ export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
32
+ [K in keyof T]?: DeepPartial<T[K]>;
33
+ } : Partial<T>;
34
+ export {};
@@ -0,0 +1,166 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.GenesisState = exports.protobufPackage = void 0;
7
+ /* eslint-disable */
8
+ const long_1 = __importDefault(require("long"));
9
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
10
+ const gov_1 = require("./gov");
11
+ exports.protobufPackage = "cosmos.gov.v1";
12
+ const baseGenesisState = { startingProposalId: long_1.default.UZERO };
13
+ exports.GenesisState = {
14
+ encode(message, writer = minimal_1.default.Writer.create()) {
15
+ if (!message.startingProposalId.isZero()) {
16
+ writer.uint32(8).uint64(message.startingProposalId);
17
+ }
18
+ for (const v of message.deposits) {
19
+ gov_1.Deposit.encode(v, writer.uint32(18).fork()).ldelim();
20
+ }
21
+ for (const v of message.votes) {
22
+ gov_1.Vote.encode(v, writer.uint32(26).fork()).ldelim();
23
+ }
24
+ for (const v of message.proposals) {
25
+ gov_1.Proposal.encode(v, writer.uint32(34).fork()).ldelim();
26
+ }
27
+ if (message.depositParams !== undefined) {
28
+ gov_1.DepositParams.encode(message.depositParams, writer.uint32(42).fork()).ldelim();
29
+ }
30
+ if (message.votingParams !== undefined) {
31
+ gov_1.VotingParams.encode(message.votingParams, writer.uint32(50).fork()).ldelim();
32
+ }
33
+ if (message.tallyParams !== undefined) {
34
+ gov_1.TallyParams.encode(message.tallyParams, writer.uint32(58).fork()).ldelim();
35
+ }
36
+ return writer;
37
+ },
38
+ decode(input, length) {
39
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
40
+ let end = length === undefined ? reader.len : reader.pos + length;
41
+ const message = Object.assign({}, baseGenesisState);
42
+ message.deposits = [];
43
+ message.votes = [];
44
+ message.proposals = [];
45
+ while (reader.pos < end) {
46
+ const tag = reader.uint32();
47
+ switch (tag >>> 3) {
48
+ case 1:
49
+ message.startingProposalId = reader.uint64();
50
+ break;
51
+ case 2:
52
+ message.deposits.push(gov_1.Deposit.decode(reader, reader.uint32()));
53
+ break;
54
+ case 3:
55
+ message.votes.push(gov_1.Vote.decode(reader, reader.uint32()));
56
+ break;
57
+ case 4:
58
+ message.proposals.push(gov_1.Proposal.decode(reader, reader.uint32()));
59
+ break;
60
+ case 5:
61
+ message.depositParams = gov_1.DepositParams.decode(reader, reader.uint32());
62
+ break;
63
+ case 6:
64
+ message.votingParams = gov_1.VotingParams.decode(reader, reader.uint32());
65
+ break;
66
+ case 7:
67
+ message.tallyParams = gov_1.TallyParams.decode(reader, reader.uint32());
68
+ break;
69
+ default:
70
+ reader.skipType(tag & 7);
71
+ break;
72
+ }
73
+ }
74
+ return message;
75
+ },
76
+ fromJSON(object) {
77
+ var _a, _b, _c;
78
+ const message = Object.assign({}, baseGenesisState);
79
+ message.startingProposalId =
80
+ object.startingProposalId !== undefined &&
81
+ object.startingProposalId !== null
82
+ ? long_1.default.fromString(object.startingProposalId)
83
+ : long_1.default.UZERO;
84
+ message.deposits = ((_a = object.deposits) !== null && _a !== void 0 ? _a : []).map((e) => gov_1.Deposit.fromJSON(e));
85
+ message.votes = ((_b = object.votes) !== null && _b !== void 0 ? _b : []).map((e) => gov_1.Vote.fromJSON(e));
86
+ message.proposals = ((_c = object.proposals) !== null && _c !== void 0 ? _c : []).map((e) => gov_1.Proposal.fromJSON(e));
87
+ message.depositParams =
88
+ object.depositParams !== undefined && object.depositParams !== null
89
+ ? gov_1.DepositParams.fromJSON(object.depositParams)
90
+ : undefined;
91
+ message.votingParams =
92
+ object.votingParams !== undefined && object.votingParams !== null
93
+ ? gov_1.VotingParams.fromJSON(object.votingParams)
94
+ : undefined;
95
+ message.tallyParams =
96
+ object.tallyParams !== undefined && object.tallyParams !== null
97
+ ? gov_1.TallyParams.fromJSON(object.tallyParams)
98
+ : undefined;
99
+ return message;
100
+ },
101
+ toJSON(message) {
102
+ const obj = {};
103
+ message.startingProposalId !== undefined &&
104
+ (obj.startingProposalId = (message.startingProposalId || long_1.default.UZERO).toString());
105
+ if (message.deposits) {
106
+ obj.deposits = message.deposits.map((e) => e ? gov_1.Deposit.toJSON(e) : undefined);
107
+ }
108
+ else {
109
+ obj.deposits = [];
110
+ }
111
+ if (message.votes) {
112
+ obj.votes = message.votes.map((e) => (e ? gov_1.Vote.toJSON(e) : undefined));
113
+ }
114
+ else {
115
+ obj.votes = [];
116
+ }
117
+ if (message.proposals) {
118
+ obj.proposals = message.proposals.map((e) => e ? gov_1.Proposal.toJSON(e) : undefined);
119
+ }
120
+ else {
121
+ obj.proposals = [];
122
+ }
123
+ message.depositParams !== undefined &&
124
+ (obj.depositParams = message.depositParams
125
+ ? gov_1.DepositParams.toJSON(message.depositParams)
126
+ : undefined);
127
+ message.votingParams !== undefined &&
128
+ (obj.votingParams = message.votingParams
129
+ ? gov_1.VotingParams.toJSON(message.votingParams)
130
+ : undefined);
131
+ message.tallyParams !== undefined &&
132
+ (obj.tallyParams = message.tallyParams
133
+ ? gov_1.TallyParams.toJSON(message.tallyParams)
134
+ : undefined);
135
+ return obj;
136
+ },
137
+ fromPartial(object) {
138
+ var _a, _b, _c;
139
+ const message = Object.assign({}, baseGenesisState);
140
+ message.startingProposalId =
141
+ object.startingProposalId !== undefined &&
142
+ object.startingProposalId !== null
143
+ ? long_1.default.fromValue(object.startingProposalId)
144
+ : long_1.default.UZERO;
145
+ message.deposits = ((_a = object.deposits) !== null && _a !== void 0 ? _a : []).map((e) => gov_1.Deposit.fromPartial(e));
146
+ message.votes = ((_b = object.votes) !== null && _b !== void 0 ? _b : []).map((e) => gov_1.Vote.fromPartial(e));
147
+ message.proposals = ((_c = object.proposals) !== null && _c !== void 0 ? _c : []).map((e) => gov_1.Proposal.fromPartial(e));
148
+ message.depositParams =
149
+ object.depositParams !== undefined && object.depositParams !== null
150
+ ? gov_1.DepositParams.fromPartial(object.depositParams)
151
+ : undefined;
152
+ message.votingParams =
153
+ object.votingParams !== undefined && object.votingParams !== null
154
+ ? gov_1.VotingParams.fromPartial(object.votingParams)
155
+ : undefined;
156
+ message.tallyParams =
157
+ object.tallyParams !== undefined && object.tallyParams !== null
158
+ ? gov_1.TallyParams.fromPartial(object.tallyParams)
159
+ : undefined;
160
+ return message;
161
+ },
162
+ };
163
+ if (minimal_1.default.util.Long !== long_1.default) {
164
+ minimal_1.default.util.Long = long_1.default;
165
+ minimal_1.default.configure();
166
+ }
@@ -0,0 +1,198 @@
1
+ import Long from "long";
2
+ import _m0 from "protobufjs/minimal";
3
+ import { Duration } from "../../../google/protobuf/duration";
4
+ import { Coin } from "../../base/v1beta1/coin";
5
+ import { Any } from "../../../google/protobuf/any";
6
+ export declare const protobufPackage = "cosmos.gov.v1";
7
+ /** Since: cosmos-sdk 0.46 */
8
+ /** VoteOption enumerates the valid vote options for a given governance proposal. */
9
+ export declare enum VoteOption {
10
+ /** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */
11
+ VOTE_OPTION_UNSPECIFIED = 0,
12
+ /** VOTE_OPTION_YES - VOTE_OPTION_YES defines a yes vote option. */
13
+ VOTE_OPTION_YES = 1,
14
+ /** VOTE_OPTION_ABSTAIN - VOTE_OPTION_ABSTAIN defines an abstain vote option. */
15
+ VOTE_OPTION_ABSTAIN = 2,
16
+ /** VOTE_OPTION_NO - VOTE_OPTION_NO defines a no vote option. */
17
+ VOTE_OPTION_NO = 3,
18
+ /** VOTE_OPTION_NO_WITH_VETO - VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */
19
+ VOTE_OPTION_NO_WITH_VETO = 4,
20
+ UNRECOGNIZED = -1
21
+ }
22
+ export declare function voteOptionFromJSON(object: any): VoteOption;
23
+ export declare function voteOptionToJSON(object: VoteOption): string;
24
+ /** ProposalStatus enumerates the valid statuses of a proposal. */
25
+ export declare enum ProposalStatus {
26
+ /** PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. */
27
+ PROPOSAL_STATUS_UNSPECIFIED = 0,
28
+ /**
29
+ * PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit
30
+ * period.
31
+ */
32
+ PROPOSAL_STATUS_DEPOSIT_PERIOD = 1,
33
+ /**
34
+ * PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting
35
+ * period.
36
+ */
37
+ PROPOSAL_STATUS_VOTING_PERIOD = 2,
38
+ /**
39
+ * PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has
40
+ * passed.
41
+ */
42
+ PROPOSAL_STATUS_PASSED = 3,
43
+ /**
44
+ * PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has
45
+ * been rejected.
46
+ */
47
+ PROPOSAL_STATUS_REJECTED = 4,
48
+ /**
49
+ * PROPOSAL_STATUS_FAILED - PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has
50
+ * failed.
51
+ */
52
+ PROPOSAL_STATUS_FAILED = 5,
53
+ UNRECOGNIZED = -1
54
+ }
55
+ export declare function proposalStatusFromJSON(object: any): ProposalStatus;
56
+ export declare function proposalStatusToJSON(object: ProposalStatus): string;
57
+ /** WeightedVoteOption defines a unit of vote for vote split. */
58
+ export interface WeightedVoteOption {
59
+ option: VoteOption;
60
+ weight: string;
61
+ }
62
+ /**
63
+ * Deposit defines an amount deposited by an account address to an active
64
+ * proposal.
65
+ */
66
+ export interface Deposit {
67
+ proposalId: Long;
68
+ depositor: string;
69
+ amount: Coin[];
70
+ }
71
+ /** Proposal defines the core field members of a governance proposal. */
72
+ export interface Proposal {
73
+ id: Long;
74
+ messages: Any[];
75
+ status: ProposalStatus;
76
+ /**
77
+ * final_tally_result is the final tally result of the proposal. When
78
+ * querying a proposal via gRPC, this field is not populated until the
79
+ * proposal's voting period has ended.
80
+ */
81
+ finalTallyResult?: TallyResult;
82
+ submitTime?: Date;
83
+ depositEndTime?: Date;
84
+ totalDeposit: Coin[];
85
+ votingStartTime?: Date;
86
+ votingEndTime?: Date;
87
+ /** metadata is any arbitrary metadata attached to the proposal. */
88
+ metadata: string;
89
+ }
90
+ /** TallyResult defines a standard tally for a governance proposal. */
91
+ export interface TallyResult {
92
+ yesCount: string;
93
+ abstainCount: string;
94
+ noCount: string;
95
+ noWithVetoCount: string;
96
+ }
97
+ /**
98
+ * Vote defines a vote on a governance proposal.
99
+ * A Vote consists of a proposal ID, the voter, and the vote option.
100
+ */
101
+ export interface Vote {
102
+ proposalId: Long;
103
+ voter: string;
104
+ options: WeightedVoteOption[];
105
+ /** metadata is any arbitrary metadata to attached to the vote. */
106
+ metadata: string;
107
+ }
108
+ /** DepositParams defines the params for deposits on governance proposals. */
109
+ export interface DepositParams {
110
+ /** Minimum deposit for a proposal to enter voting period. */
111
+ minDeposit: Coin[];
112
+ /**
113
+ * Maximum period for Atom holders to deposit on a proposal. Initial value: 2
114
+ * months.
115
+ */
116
+ maxDepositPeriod?: Duration;
117
+ }
118
+ /** VotingParams defines the params for voting on governance proposals. */
119
+ export interface VotingParams {
120
+ /** Length of the voting period. */
121
+ votingPeriod?: Duration;
122
+ }
123
+ /** TallyParams defines the params for tallying votes on governance proposals. */
124
+ export interface TallyParams {
125
+ /**
126
+ * Minimum percentage of total stake needed to vote for a result to be
127
+ * considered valid.
128
+ */
129
+ quorum: string;
130
+ /** Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. */
131
+ threshold: string;
132
+ /**
133
+ * Minimum value of Veto votes to Total votes ratio for proposal to be
134
+ * vetoed. Default value: 1/3.
135
+ */
136
+ vetoThreshold: string;
137
+ }
138
+ export declare const WeightedVoteOption: {
139
+ encode(message: WeightedVoteOption, writer?: _m0.Writer): _m0.Writer;
140
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): WeightedVoteOption;
141
+ fromJSON(object: any): WeightedVoteOption;
142
+ toJSON(message: WeightedVoteOption): unknown;
143
+ fromPartial(object: DeepPartial<WeightedVoteOption>): WeightedVoteOption;
144
+ };
145
+ export declare const Deposit: {
146
+ encode(message: Deposit, writer?: _m0.Writer): _m0.Writer;
147
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Deposit;
148
+ fromJSON(object: any): Deposit;
149
+ toJSON(message: Deposit): unknown;
150
+ fromPartial(object: DeepPartial<Deposit>): Deposit;
151
+ };
152
+ export declare const Proposal: {
153
+ encode(message: Proposal, writer?: _m0.Writer): _m0.Writer;
154
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Proposal;
155
+ fromJSON(object: any): Proposal;
156
+ toJSON(message: Proposal): unknown;
157
+ fromPartial(object: DeepPartial<Proposal>): Proposal;
158
+ };
159
+ export declare const TallyResult: {
160
+ encode(message: TallyResult, writer?: _m0.Writer): _m0.Writer;
161
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): TallyResult;
162
+ fromJSON(object: any): TallyResult;
163
+ toJSON(message: TallyResult): unknown;
164
+ fromPartial(object: DeepPartial<TallyResult>): TallyResult;
165
+ };
166
+ export declare const Vote: {
167
+ encode(message: Vote, writer?: _m0.Writer): _m0.Writer;
168
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Vote;
169
+ fromJSON(object: any): Vote;
170
+ toJSON(message: Vote): unknown;
171
+ fromPartial(object: DeepPartial<Vote>): Vote;
172
+ };
173
+ export declare const DepositParams: {
174
+ encode(message: DepositParams, writer?: _m0.Writer): _m0.Writer;
175
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): DepositParams;
176
+ fromJSON(object: any): DepositParams;
177
+ toJSON(message: DepositParams): unknown;
178
+ fromPartial(object: DeepPartial<DepositParams>): DepositParams;
179
+ };
180
+ export declare const VotingParams: {
181
+ encode(message: VotingParams, writer?: _m0.Writer): _m0.Writer;
182
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): VotingParams;
183
+ fromJSON(object: any): VotingParams;
184
+ toJSON(message: VotingParams): unknown;
185
+ fromPartial(object: DeepPartial<VotingParams>): VotingParams;
186
+ };
187
+ export declare const TallyParams: {
188
+ encode(message: TallyParams, writer?: _m0.Writer): _m0.Writer;
189
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): TallyParams;
190
+ fromJSON(object: any): TallyParams;
191
+ toJSON(message: TallyParams): unknown;
192
+ fromPartial(object: DeepPartial<TallyParams>): TallyParams;
193
+ };
194
+ declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
195
+ export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
196
+ [K in keyof T]?: DeepPartial<T[K]>;
197
+ } : Partial<T>;
198
+ export {};