@sparkdreamnft/sparkdreamjs 0.0.48 → 0.0.49
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/akash/bundle.d.ts +134 -134
- package/akash/bundle.js +150 -150
- package/amino-schema.d.ts +86 -0
- package/amino-schema.js +1 -1
- package/cosmos/bundle.d.ts +160 -160
- package/cosmos/bundle.js +182 -182
- package/esm/akash/bundle.js +150 -150
- package/esm/amino-schema.js +1 -1
- package/esm/cosmos/bundle.js +182 -182
- package/esm/ibc/bundle.js +116 -116
- package/esm/sparkdream/artifact/v1/types.js +25 -1
- package/esm/sparkdream/blog/v1/genesis.js +97 -1
- package/esm/sparkdream/bundle.js +447 -439
- package/esm/sparkdream/collect/v1/genesis.js +308 -3
- package/esm/sparkdream/collect/v1/tx.js +170 -0
- package/esm/sparkdream/collect/v1/tx.registry.js +20 -2
- package/esm/sparkdream/collect/v1/tx.rpc.msg.js +10 -1
- package/esm/sparkdream/collect/v1/types.js +51 -3
- package/esm/sparkdream/commons/v1/genesis.js +756 -27
- package/esm/sparkdream/commons/v1/group.js +130 -2
- package/esm/sparkdream/commons/v1/poll.js +281 -0
- package/esm/sparkdream/commons/v1/poll_vote.js +107 -0
- package/esm/sparkdream/commons/v1/query.js +759 -0
- package/esm/sparkdream/commons/v1/query.lcd.js +46 -0
- package/esm/sparkdream/commons/v1/query.rpc.Query.js +49 -1
- package/esm/sparkdream/commons/v1/tx.js +730 -4
- package/esm/sparkdream/commons/v1/tx.registry.js +74 -2
- package/esm/sparkdream/commons/v1/tx.rpc.msg.js +25 -1
- package/esm/sparkdream/commons/v1/voter_tree.js +208 -0
- package/esm/sparkdream/federation/v1/genesis.js +212 -2
- package/esm/sparkdream/federation/v1/tx.js +196 -0
- package/esm/sparkdream/federation/v1/tx.registry.js +20 -2
- package/esm/sparkdream/federation/v1/tx.rpc.msg.js +8 -1
- package/esm/sparkdream/federation/v1/types.js +194 -2
- package/esm/sparkdream/forum/v1/archive_metadata.js +13 -1
- package/esm/sparkdream/forum/v1/genesis.js +428 -1
- package/esm/sparkdream/forum/v1/params.js +182 -254
- package/esm/sparkdream/forum/v1/query.js +112 -7
- package/esm/sparkdream/forum/v1/user_reaction_limit.js +62 -1
- package/esm/sparkdream/futarchy/v1/market.js +37 -1
- package/esm/sparkdream/futarchy/v1/tx.js +13 -1
- package/esm/sparkdream/name/v1/dispute.js +13 -1
- package/esm/sparkdream/rep/v1/genesis.js +272 -2
- package/esm/sparkdream/rep/v1/initiative_review.js +13 -1
- package/esm/sparkdream/rep/v1/invitation.js +25 -1
- package/esm/sparkdream/rep/v1/member_report.js +335 -1
- package/esm/sparkdream/rep/v1/migration.js +27 -2
- package/esm/sparkdream/rep/v1/params.js +13 -1
- package/esm/sparkdream/rep/v1/stake.js +10 -0
- package/esm/sparkdream/rep/v1/tx.js +372 -14
- package/esm/sparkdream/rep/v1/tx.registry.js +38 -2
- package/esm/sparkdream/rep/v1/tx.rpc.msg.js +16 -2
- package/esm/sparkdream/reveal/v1/types.js +9 -21
- package/esm/sparkdream/season/v1/display_name_moderation.js +40 -1
- package/esm/sparkdream/season/v1/epoch_xp_tracker.js +13 -1
- package/esm/sparkdream/season/v1/genesis.js +125 -1
- package/esm/sparkdream/season/v1/guild_invite.js +13 -1
- package/esm/sparkdream/season/v1/guild_membership.js +13 -1
- package/esm/sparkdream/season/v1/member_profile.js +13 -1
- package/esm/sparkdream/season/v1/member_quest_progress.js +13 -1
- package/esm/sparkdream/season/v1/member_season_snapshot.js +16 -1
- package/esm/sparkdream/season/v1/nomination.js +37 -1
- package/esm/sparkdream/season/v1/query.js +26 -35
- package/esm/sparkdream/season/v1/query.lcd.js +1 -1
- package/esm/sparkdream/season/v1/quest.js +13 -1
- package/esm/sparkdream/season/v1/season.js +13 -1
- package/esm/sparkdream/season/v1/season_stats_counters.js +121 -0
- package/esm/sparkdream/season/v1/season_title_eligibility.js +4 -1
- package/esm/sparkdream/service/v1/genesis.js +126 -1
- package/esm/sparkdream/service/v1/refile_cooldown.js +20 -7
- package/esm/sparkdream/session/v1/genesis.js +303 -1
- package/esm/sparkdream/session/v1/params.js +24 -0
- package/esm/sparkdream/shield/v1/genesis.js +56 -2
- package/esm/sparkdream/shield/v1/params.js +13 -1
- package/esm/sparkdream/shield/v1/types.js +202 -1
- package/esm/sparkdream/vault/v1/genesis.js +25 -1
- package/esm/sparkdream/vault/v1/query.js +15 -2
- package/esm/sparkdream/vault/v1/query.lcd.js +3 -0
- package/esm/sparkdream/vault/v1/tx.js +301 -0
- package/esm/sparkdream/vault/v1/tx.registry.js +38 -2
- package/esm/sparkdream/vault/v1/tx.rpc.msg.js +13 -1
- package/esm/sparkdream/vault/v1/vault_signer.js +15 -2
- package/esm/tendermint/bundle.js +20 -20
- package/ibc/bundle.d.ts +99 -99
- package/ibc/bundle.js +116 -116
- package/package.json +1 -1
- package/sparkdream/artifact/v1/types.d.ts +14 -0
- package/sparkdream/artifact/v1/types.js +25 -1
- package/sparkdream/blog/v1/genesis.d.ts +60 -0
- package/sparkdream/blog/v1/genesis.js +98 -2
- package/sparkdream/bundle.d.ts +17095 -16171
- package/sparkdream/bundle.js +447 -439
- package/sparkdream/collect/v1/genesis.d.ts +186 -0
- package/sparkdream/collect/v1/genesis.js +309 -4
- package/sparkdream/collect/v1/tx.d.ts +100 -0
- package/sparkdream/collect/v1/tx.js +171 -1
- package/sparkdream/collect/v1/tx.registry.d.ts +13 -1
- package/sparkdream/collect/v1/tx.registry.js +19 -1
- package/sparkdream/collect/v1/tx.rpc.msg.d.ts +9 -1
- package/sparkdream/collect/v1/tx.rpc.msg.js +9 -0
- package/sparkdream/collect/v1/types.d.ts +52 -0
- package/sparkdream/collect/v1/types.js +51 -3
- package/sparkdream/commons/v1/genesis.d.ts +443 -22
- package/sparkdream/commons/v1/genesis.js +756 -27
- package/sparkdream/commons/v1/group.d.ts +75 -0
- package/sparkdream/commons/v1/group.js +133 -3
- package/sparkdream/commons/v1/poll.d.ts +135 -0
- package/sparkdream/commons/v1/poll.js +286 -0
- package/sparkdream/commons/v1/poll_vote.d.ts +58 -0
- package/sparkdream/commons/v1/poll_vote.js +110 -0
- package/sparkdream/commons/v1/query.d.ts +465 -0
- package/sparkdream/commons/v1/query.js +760 -1
- package/sparkdream/commons/v1/query.lcd.d.ts +6 -1
- package/sparkdream/commons/v1/query.lcd.js +46 -0
- package/sparkdream/commons/v1/query.rpc.Query.d.ts +30 -1
- package/sparkdream/commons/v1/query.rpc.Query.js +48 -0
- package/sparkdream/commons/v1/tx.d.ts +475 -1
- package/sparkdream/commons/v1/tx.js +731 -4
- package/sparkdream/commons/v1/tx.registry.d.ts +49 -1
- package/sparkdream/commons/v1/tx.registry.js +73 -1
- package/sparkdream/commons/v1/tx.rpc.msg.d.ts +13 -1
- package/sparkdream/commons/v1/tx.rpc.msg.js +24 -0
- package/sparkdream/commons/v1/voter_tree.d.ts +132 -0
- package/sparkdream/commons/v1/voter_tree.js +211 -0
- package/sparkdream/federation/v1/genesis.d.ts +136 -1
- package/sparkdream/federation/v1/genesis.js +212 -2
- package/sparkdream/federation/v1/tx.d.ts +138 -0
- package/sparkdream/federation/v1/tx.js +198 -1
- package/sparkdream/federation/v1/tx.registry.d.ts +13 -1
- package/sparkdream/federation/v1/tx.registry.js +19 -1
- package/sparkdream/federation/v1/tx.rpc.msg.d.ts +7 -1
- package/sparkdream/federation/v1/tx.rpc.msg.js +7 -0
- package/sparkdream/federation/v1/types.d.ts +166 -0
- package/sparkdream/federation/v1/types.js +197 -3
- package/sparkdream/forum/v1/archive_metadata.d.ts +12 -0
- package/sparkdream/forum/v1/archive_metadata.js +13 -1
- package/sparkdream/forum/v1/genesis.d.ts +256 -0
- package/sparkdream/forum/v1/genesis.js +429 -2
- package/sparkdream/forum/v1/params.d.ts +0 -30
- package/sparkdream/forum/v1/params.js +182 -254
- package/sparkdream/forum/v1/query.d.ts +70 -0
- package/sparkdream/forum/v1/query.js +112 -7
- package/sparkdream/forum/v1/user_reaction_limit.d.ts +25 -0
- package/sparkdream/forum/v1/user_reaction_limit.js +65 -2
- package/sparkdream/futarchy/v1/market.d.ts +32 -0
- package/sparkdream/futarchy/v1/market.js +37 -1
- package/sparkdream/futarchy/v1/tx.d.ts +10 -0
- package/sparkdream/futarchy/v1/tx.js +13 -1
- package/sparkdream/name/v1/dispute.d.ts +14 -0
- package/sparkdream/name/v1/dispute.js +13 -1
- package/sparkdream/rep/v1/genesis.d.ts +151 -1
- package/sparkdream/rep/v1/genesis.js +272 -2
- package/sparkdream/rep/v1/initiative_review.d.ts +14 -0
- package/sparkdream/rep/v1/initiative_review.js +13 -1
- package/sparkdream/rep/v1/invitation.d.ts +32 -0
- package/sparkdream/rep/v1/invitation.js +25 -1
- package/sparkdream/rep/v1/member_report.d.ts +215 -0
- package/sparkdream/rep/v1/member_report.js +336 -2
- package/sparkdream/rep/v1/migration.d.ts +34 -1
- package/sparkdream/rep/v1/migration.js +27 -2
- package/sparkdream/rep/v1/params.d.ts +18 -0
- package/sparkdream/rep/v1/params.js +13 -1
- package/sparkdream/rep/v1/stake.d.ts +5 -0
- package/sparkdream/rep/v1/stake.js +10 -0
- package/sparkdream/rep/v1/tx.d.ts +340 -39
- package/sparkdream/rep/v1/tx.js +375 -17
- package/sparkdream/rep/v1/tx.registry.d.ts +25 -1
- package/sparkdream/rep/v1/tx.registry.js +37 -1
- package/sparkdream/rep/v1/tx.rpc.msg.d.ts +12 -2
- package/sparkdream/rep/v1/tx.rpc.msg.js +15 -1
- package/sparkdream/reveal/v1/types.d.ts +0 -8
- package/sparkdream/reveal/v1/types.js +9 -21
- package/sparkdream/rpc.query.d.ts +5 -0
- package/sparkdream/season/v1/display_name_moderation.d.ts +28 -0
- package/sparkdream/season/v1/display_name_moderation.js +40 -1
- package/sparkdream/season/v1/epoch_xp_tracker.d.ts +10 -0
- package/sparkdream/season/v1/epoch_xp_tracker.js +13 -1
- package/sparkdream/season/v1/genesis.d.ts +75 -0
- package/sparkdream/season/v1/genesis.js +126 -2
- package/sparkdream/season/v1/guild_invite.d.ts +10 -0
- package/sparkdream/season/v1/guild_invite.js +13 -1
- package/sparkdream/season/v1/guild_membership.d.ts +12 -0
- package/sparkdream/season/v1/guild_membership.js +13 -1
- package/sparkdream/season/v1/member_profile.d.ts +12 -0
- package/sparkdream/season/v1/member_profile.js +13 -1
- package/sparkdream/season/v1/member_quest_progress.d.ts +8 -0
- package/sparkdream/season/v1/member_quest_progress.js +13 -1
- package/sparkdream/season/v1/member_season_snapshot.d.ts +14 -0
- package/sparkdream/season/v1/member_season_snapshot.js +16 -1
- package/sparkdream/season/v1/nomination.d.ts +32 -0
- package/sparkdream/season/v1/nomination.js +37 -1
- package/sparkdream/season/v1/query.d.ts +10 -6
- package/sparkdream/season/v1/query.js +26 -35
- package/sparkdream/season/v1/query.lcd.js +1 -1
- package/sparkdream/season/v1/quest.d.ts +12 -0
- package/sparkdream/season/v1/quest.js +13 -1
- package/sparkdream/season/v1/season.d.ts +12 -0
- package/sparkdream/season/v1/season.js +13 -1
- package/sparkdream/season/v1/season_stats_counters.d.ts +86 -0
- package/sparkdream/season/v1/season_stats_counters.js +124 -0
- package/sparkdream/season/v1/season_title_eligibility.d.ts +12 -3
- package/sparkdream/season/v1/season_title_eligibility.js +4 -1
- package/sparkdream/service/v1/genesis.d.ts +71 -0
- package/sparkdream/service/v1/genesis.js +127 -2
- package/sparkdream/service/v1/refile_cooldown.d.ts +35 -22
- package/sparkdream/service/v1/refile_cooldown.js +20 -7
- package/sparkdream/session/v1/genesis.d.ts +190 -0
- package/sparkdream/session/v1/genesis.js +304 -2
- package/sparkdream/session/v1/params.d.ts +18 -0
- package/sparkdream/session/v1/params.js +24 -0
- package/sparkdream/shield/v1/genesis.d.ts +37 -1
- package/sparkdream/shield/v1/genesis.js +55 -1
- package/sparkdream/shield/v1/params.d.ts +26 -2
- package/sparkdream/shield/v1/params.js +13 -1
- package/sparkdream/shield/v1/types.d.ts +122 -0
- package/sparkdream/shield/v1/types.js +203 -2
- package/sparkdream/vault/v1/genesis.d.ts +14 -0
- package/sparkdream/vault/v1/genesis.js +25 -1
- package/sparkdream/vault/v1/query.d.ts +16 -3
- package/sparkdream/vault/v1/query.js +15 -2
- package/sparkdream/vault/v1/query.lcd.js +3 -0
- package/sparkdream/vault/v1/tx.d.ts +219 -0
- package/sparkdream/vault/v1/tx.js +302 -1
- package/sparkdream/vault/v1/tx.registry.d.ts +25 -1
- package/sparkdream/vault/v1/tx.registry.js +37 -1
- package/sparkdream/vault/v1/tx.rpc.msg.d.ts +7 -1
- package/sparkdream/vault/v1/tx.rpc.msg.js +12 -0
- package/sparkdream/vault/v1/vault_signer.d.ts +22 -3
- package/sparkdream/vault/v1/vault_signer.js +15 -2
- package/tendermint/bundle.d.ts +844 -844
- package/tendermint/bundle.js +20 -20
|
@@ -1,6 +1,62 @@
|
|
|
1
1
|
//@ts-nocheck
|
|
2
2
|
import { Any } from "../../../google/protobuf/any";
|
|
3
3
|
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
4
|
+
import { bytesFromBase64, base64FromBytes } from "../../../helpers";
|
|
5
|
+
/** BallotMode is a group's proposal voting mode. */
|
|
6
|
+
export var BallotMode;
|
|
7
|
+
(function (BallotMode) {
|
|
8
|
+
/**
|
|
9
|
+
* BALLOT_MODE_UNSPECIFIED - UNSPECIFIED is OPEN on a group; on MsgUpdateGroupConfig it leaves the
|
|
10
|
+
* mode unchanged.
|
|
11
|
+
*/
|
|
12
|
+
BallotMode[BallotMode["BALLOT_MODE_UNSPECIFIED"] = 0] = "BALLOT_MODE_UNSPECIFIED";
|
|
13
|
+
/** BALLOT_MODE_OPEN - OPEN: members vote with MsgVoteProposal. */
|
|
14
|
+
BallotMode[BallotMode["BALLOT_MODE_OPEN"] = 1] = "BALLOT_MODE_OPEN";
|
|
15
|
+
/**
|
|
16
|
+
* BALLOT_MODE_SECRET - SECRET: every proposal is a secret ballot (MsgAnonymousVoteProposal via
|
|
17
|
+
* x/shield). Needs equal member weights and enough registered ZK keys.
|
|
18
|
+
*/
|
|
19
|
+
BallotMode[BallotMode["BALLOT_MODE_SECRET"] = 2] = "BALLOT_MODE_SECRET";
|
|
20
|
+
/** BALLOT_MODE_PROPOSER_CHOICE - PROPOSER_CHOICE: the proposer picks per proposal (secret_ballot). */
|
|
21
|
+
BallotMode[BallotMode["BALLOT_MODE_PROPOSER_CHOICE"] = 3] = "BALLOT_MODE_PROPOSER_CHOICE";
|
|
22
|
+
BallotMode[BallotMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
23
|
+
})(BallotMode || (BallotMode = {}));
|
|
24
|
+
export const BallotModeAmino = BallotMode;
|
|
25
|
+
export function ballotModeFromJSON(object) {
|
|
26
|
+
switch (object) {
|
|
27
|
+
case 0:
|
|
28
|
+
case "BALLOT_MODE_UNSPECIFIED":
|
|
29
|
+
return BallotMode.BALLOT_MODE_UNSPECIFIED;
|
|
30
|
+
case 1:
|
|
31
|
+
case "BALLOT_MODE_OPEN":
|
|
32
|
+
return BallotMode.BALLOT_MODE_OPEN;
|
|
33
|
+
case 2:
|
|
34
|
+
case "BALLOT_MODE_SECRET":
|
|
35
|
+
return BallotMode.BALLOT_MODE_SECRET;
|
|
36
|
+
case 3:
|
|
37
|
+
case "BALLOT_MODE_PROPOSER_CHOICE":
|
|
38
|
+
return BallotMode.BALLOT_MODE_PROPOSER_CHOICE;
|
|
39
|
+
case -1:
|
|
40
|
+
case "UNRECOGNIZED":
|
|
41
|
+
default:
|
|
42
|
+
return BallotMode.UNRECOGNIZED;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export function ballotModeToJSON(object) {
|
|
46
|
+
switch (object) {
|
|
47
|
+
case BallotMode.BALLOT_MODE_UNSPECIFIED:
|
|
48
|
+
return "BALLOT_MODE_UNSPECIFIED";
|
|
49
|
+
case BallotMode.BALLOT_MODE_OPEN:
|
|
50
|
+
return "BALLOT_MODE_OPEN";
|
|
51
|
+
case BallotMode.BALLOT_MODE_SECRET:
|
|
52
|
+
return "BALLOT_MODE_SECRET";
|
|
53
|
+
case BallotMode.BALLOT_MODE_PROPOSER_CHOICE:
|
|
54
|
+
return "BALLOT_MODE_PROPOSER_CHOICE";
|
|
55
|
+
case BallotMode.UNRECOGNIZED:
|
|
56
|
+
default:
|
|
57
|
+
return "UNRECOGNIZED";
|
|
58
|
+
}
|
|
59
|
+
}
|
|
4
60
|
/** ProposalStatus defines the possible states of a council proposal. */
|
|
5
61
|
export var ProposalStatus;
|
|
6
62
|
(function (ProposalStatus) {
|
|
@@ -151,7 +207,9 @@ function createBaseGroup() {
|
|
|
151
207
|
activationTime: BigInt(0),
|
|
152
208
|
lastParentUpdate: BigInt(0),
|
|
153
209
|
futarchyEnabled: false,
|
|
154
|
-
vetoPolicyAddress: ""
|
|
210
|
+
vetoPolicyAddress: "",
|
|
211
|
+
lastConfigUpdate: BigInt(0),
|
|
212
|
+
ballotMode: 0
|
|
155
213
|
};
|
|
156
214
|
}
|
|
157
215
|
/**
|
|
@@ -211,6 +269,12 @@ export const Group = {
|
|
|
211
269
|
if (message.vetoPolicyAddress !== "") {
|
|
212
270
|
writer.uint32(130).string(message.vetoPolicyAddress);
|
|
213
271
|
}
|
|
272
|
+
if (message.lastConfigUpdate !== BigInt(0)) {
|
|
273
|
+
writer.uint32(136).int64(message.lastConfigUpdate);
|
|
274
|
+
}
|
|
275
|
+
if (message.ballotMode !== 0) {
|
|
276
|
+
writer.uint32(144).int32(message.ballotMode);
|
|
277
|
+
}
|
|
214
278
|
return writer;
|
|
215
279
|
},
|
|
216
280
|
decode(input, length) {
|
|
@@ -268,6 +332,12 @@ export const Group = {
|
|
|
268
332
|
case 16:
|
|
269
333
|
message.vetoPolicyAddress = reader.string();
|
|
270
334
|
break;
|
|
335
|
+
case 17:
|
|
336
|
+
message.lastConfigUpdate = reader.int64();
|
|
337
|
+
break;
|
|
338
|
+
case 18:
|
|
339
|
+
message.ballotMode = reader.int32();
|
|
340
|
+
break;
|
|
271
341
|
default:
|
|
272
342
|
reader.skipType(tag & 7);
|
|
273
343
|
break;
|
|
@@ -293,6 +363,8 @@ export const Group = {
|
|
|
293
363
|
message.lastParentUpdate = object.lastParentUpdate !== undefined && object.lastParentUpdate !== null ? BigInt(object.lastParentUpdate.toString()) : BigInt(0);
|
|
294
364
|
message.futarchyEnabled = object.futarchyEnabled ?? false;
|
|
295
365
|
message.vetoPolicyAddress = object.vetoPolicyAddress ?? "";
|
|
366
|
+
message.lastConfigUpdate = object.lastConfigUpdate !== undefined && object.lastConfigUpdate !== null ? BigInt(object.lastConfigUpdate.toString()) : BigInt(0);
|
|
367
|
+
message.ballotMode = object.ballotMode ?? 0;
|
|
296
368
|
return message;
|
|
297
369
|
},
|
|
298
370
|
fromAmino(object) {
|
|
@@ -345,6 +417,12 @@ export const Group = {
|
|
|
345
417
|
if (object.veto_policy_address !== undefined && object.veto_policy_address !== null) {
|
|
346
418
|
message.vetoPolicyAddress = object.veto_policy_address;
|
|
347
419
|
}
|
|
420
|
+
if (object.last_config_update !== undefined && object.last_config_update !== null) {
|
|
421
|
+
message.lastConfigUpdate = BigInt(object.last_config_update);
|
|
422
|
+
}
|
|
423
|
+
if (object.ballot_mode !== undefined && object.ballot_mode !== null) {
|
|
424
|
+
message.ballotMode = object.ballot_mode;
|
|
425
|
+
}
|
|
348
426
|
return message;
|
|
349
427
|
},
|
|
350
428
|
toAmino(message) {
|
|
@@ -365,6 +443,8 @@ export const Group = {
|
|
|
365
443
|
obj.last_parent_update = message.lastParentUpdate !== BigInt(0) ? message.lastParentUpdate?.toString() : undefined;
|
|
366
444
|
obj.futarchy_enabled = message.futarchyEnabled === false ? undefined : message.futarchyEnabled;
|
|
367
445
|
obj.veto_policy_address = message.vetoPolicyAddress === "" ? undefined : message.vetoPolicyAddress;
|
|
446
|
+
obj.last_config_update = message.lastConfigUpdate !== BigInt(0) ? message.lastConfigUpdate?.toString() : undefined;
|
|
447
|
+
obj.ballot_mode = message.ballotMode === 0 ? undefined : message.ballotMode;
|
|
368
448
|
return obj;
|
|
369
449
|
},
|
|
370
450
|
fromAminoMsg(object) {
|
|
@@ -711,7 +791,11 @@ function createBaseProposal() {
|
|
|
711
791
|
policyVersion: BigInt(0),
|
|
712
792
|
metadata: "",
|
|
713
793
|
executionTime: BigInt(0),
|
|
714
|
-
failedReason: ""
|
|
794
|
+
failedReason: "",
|
|
795
|
+
secretBallot: false,
|
|
796
|
+
voterRoot: new Uint8Array(),
|
|
797
|
+
ballotMemberCount: BigInt(0),
|
|
798
|
+
ballotMemberWeight: ""
|
|
715
799
|
};
|
|
716
800
|
}
|
|
717
801
|
/**
|
|
@@ -759,6 +843,18 @@ export const Proposal = {
|
|
|
759
843
|
if (message.failedReason !== "") {
|
|
760
844
|
writer.uint32(98).string(message.failedReason);
|
|
761
845
|
}
|
|
846
|
+
if (message.secretBallot === true) {
|
|
847
|
+
writer.uint32(104).bool(message.secretBallot);
|
|
848
|
+
}
|
|
849
|
+
if (message.voterRoot.length !== 0) {
|
|
850
|
+
writer.uint32(114).bytes(message.voterRoot);
|
|
851
|
+
}
|
|
852
|
+
if (message.ballotMemberCount !== BigInt(0)) {
|
|
853
|
+
writer.uint32(120).uint64(message.ballotMemberCount);
|
|
854
|
+
}
|
|
855
|
+
if (message.ballotMemberWeight !== "") {
|
|
856
|
+
writer.uint32(130).string(message.ballotMemberWeight);
|
|
857
|
+
}
|
|
762
858
|
return writer;
|
|
763
859
|
},
|
|
764
860
|
decode(input, length) {
|
|
@@ -804,6 +900,18 @@ export const Proposal = {
|
|
|
804
900
|
case 12:
|
|
805
901
|
message.failedReason = reader.string();
|
|
806
902
|
break;
|
|
903
|
+
case 13:
|
|
904
|
+
message.secretBallot = reader.bool();
|
|
905
|
+
break;
|
|
906
|
+
case 14:
|
|
907
|
+
message.voterRoot = reader.bytes();
|
|
908
|
+
break;
|
|
909
|
+
case 15:
|
|
910
|
+
message.ballotMemberCount = reader.uint64();
|
|
911
|
+
break;
|
|
912
|
+
case 16:
|
|
913
|
+
message.ballotMemberWeight = reader.string();
|
|
914
|
+
break;
|
|
807
915
|
default:
|
|
808
916
|
reader.skipType(tag & 7);
|
|
809
917
|
break;
|
|
@@ -825,6 +933,10 @@ export const Proposal = {
|
|
|
825
933
|
message.metadata = object.metadata ?? "";
|
|
826
934
|
message.executionTime = object.executionTime !== undefined && object.executionTime !== null ? BigInt(object.executionTime.toString()) : BigInt(0);
|
|
827
935
|
message.failedReason = object.failedReason ?? "";
|
|
936
|
+
message.secretBallot = object.secretBallot ?? false;
|
|
937
|
+
message.voterRoot = object.voterRoot ?? new Uint8Array();
|
|
938
|
+
message.ballotMemberCount = object.ballotMemberCount !== undefined && object.ballotMemberCount !== null ? BigInt(object.ballotMemberCount.toString()) : BigInt(0);
|
|
939
|
+
message.ballotMemberWeight = object.ballotMemberWeight ?? "";
|
|
828
940
|
return message;
|
|
829
941
|
},
|
|
830
942
|
fromAmino(object) {
|
|
@@ -863,6 +975,18 @@ export const Proposal = {
|
|
|
863
975
|
if (object.failed_reason !== undefined && object.failed_reason !== null) {
|
|
864
976
|
message.failedReason = object.failed_reason;
|
|
865
977
|
}
|
|
978
|
+
if (object.secret_ballot !== undefined && object.secret_ballot !== null) {
|
|
979
|
+
message.secretBallot = object.secret_ballot;
|
|
980
|
+
}
|
|
981
|
+
if (object.voter_root !== undefined && object.voter_root !== null) {
|
|
982
|
+
message.voterRoot = bytesFromBase64(object.voter_root);
|
|
983
|
+
}
|
|
984
|
+
if (object.ballot_member_count !== undefined && object.ballot_member_count !== null) {
|
|
985
|
+
message.ballotMemberCount = BigInt(object.ballot_member_count);
|
|
986
|
+
}
|
|
987
|
+
if (object.ballot_member_weight !== undefined && object.ballot_member_weight !== null) {
|
|
988
|
+
message.ballotMemberWeight = object.ballot_member_weight;
|
|
989
|
+
}
|
|
866
990
|
return message;
|
|
867
991
|
},
|
|
868
992
|
toAmino(message) {
|
|
@@ -884,6 +1008,10 @@ export const Proposal = {
|
|
|
884
1008
|
obj.metadata = message.metadata === "" ? undefined : message.metadata;
|
|
885
1009
|
obj.execution_time = message.executionTime !== BigInt(0) ? message.executionTime?.toString() : undefined;
|
|
886
1010
|
obj.failed_reason = message.failedReason === "" ? undefined : message.failedReason;
|
|
1011
|
+
obj.secret_ballot = message.secretBallot === false ? undefined : message.secretBallot;
|
|
1012
|
+
obj.voter_root = message.voterRoot ? base64FromBytes(message.voterRoot) : undefined;
|
|
1013
|
+
obj.ballot_member_count = message.ballotMemberCount !== BigInt(0) ? message.ballotMemberCount?.toString() : undefined;
|
|
1014
|
+
obj.ballot_member_weight = message.ballotMemberWeight === "" ? undefined : message.ballotMemberWeight;
|
|
887
1015
|
return obj;
|
|
888
1016
|
},
|
|
889
1017
|
fromAminoMsg(object) {
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
3
|
+
import { bytesFromBase64, base64FromBytes } from "../../../helpers";
|
|
4
|
+
/** PollStatus is a poll's lifecycle state. */
|
|
5
|
+
export var PollStatus;
|
|
6
|
+
(function (PollStatus) {
|
|
7
|
+
PollStatus[PollStatus["POLL_STATUS_UNSPECIFIED"] = 0] = "POLL_STATUS_UNSPECIFIED";
|
|
8
|
+
/** POLL_STATUS_OPEN - OPEN: voting is open until the deadline. */
|
|
9
|
+
PollStatus[PollStatus["POLL_STATUS_OPEN"] = 1] = "POLL_STATUS_OPEN";
|
|
10
|
+
/** POLL_STATUS_CLOSED - CLOSED: the deadline passed; tallies are final. */
|
|
11
|
+
PollStatus[PollStatus["POLL_STATUS_CLOSED"] = 2] = "POLL_STATUS_CLOSED";
|
|
12
|
+
/** POLL_STATUS_CANCELLED - CANCELLED: the creator withdrew it before any vote. */
|
|
13
|
+
PollStatus[PollStatus["POLL_STATUS_CANCELLED"] = 3] = "POLL_STATUS_CANCELLED";
|
|
14
|
+
PollStatus[PollStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
15
|
+
})(PollStatus || (PollStatus = {}));
|
|
16
|
+
export const PollStatusAmino = PollStatus;
|
|
17
|
+
export function pollStatusFromJSON(object) {
|
|
18
|
+
switch (object) {
|
|
19
|
+
case 0:
|
|
20
|
+
case "POLL_STATUS_UNSPECIFIED":
|
|
21
|
+
return PollStatus.POLL_STATUS_UNSPECIFIED;
|
|
22
|
+
case 1:
|
|
23
|
+
case "POLL_STATUS_OPEN":
|
|
24
|
+
return PollStatus.POLL_STATUS_OPEN;
|
|
25
|
+
case 2:
|
|
26
|
+
case "POLL_STATUS_CLOSED":
|
|
27
|
+
return PollStatus.POLL_STATUS_CLOSED;
|
|
28
|
+
case 3:
|
|
29
|
+
case "POLL_STATUS_CANCELLED":
|
|
30
|
+
return PollStatus.POLL_STATUS_CANCELLED;
|
|
31
|
+
case -1:
|
|
32
|
+
case "UNRECOGNIZED":
|
|
33
|
+
default:
|
|
34
|
+
return PollStatus.UNRECOGNIZED;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export function pollStatusToJSON(object) {
|
|
38
|
+
switch (object) {
|
|
39
|
+
case PollStatus.POLL_STATUS_UNSPECIFIED:
|
|
40
|
+
return "POLL_STATUS_UNSPECIFIED";
|
|
41
|
+
case PollStatus.POLL_STATUS_OPEN:
|
|
42
|
+
return "POLL_STATUS_OPEN";
|
|
43
|
+
case PollStatus.POLL_STATUS_CLOSED:
|
|
44
|
+
return "POLL_STATUS_CLOSED";
|
|
45
|
+
case PollStatus.POLL_STATUS_CANCELLED:
|
|
46
|
+
return "POLL_STATUS_CANCELLED";
|
|
47
|
+
case PollStatus.UNRECOGNIZED:
|
|
48
|
+
default:
|
|
49
|
+
return "UNRECOGNIZED";
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function createBasePoll() {
|
|
53
|
+
return {
|
|
54
|
+
id: BigInt(0),
|
|
55
|
+
councilName: "",
|
|
56
|
+
creator: "",
|
|
57
|
+
question: "",
|
|
58
|
+
options: [],
|
|
59
|
+
secretBallot: false,
|
|
60
|
+
openedAt: BigInt(0),
|
|
61
|
+
deadline: BigInt(0),
|
|
62
|
+
status: 0,
|
|
63
|
+
tallies: [],
|
|
64
|
+
voterRoot: new Uint8Array(),
|
|
65
|
+
eligibleVoters: BigInt(0),
|
|
66
|
+
closedAt: BigInt(0)
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Poll is a non-binding, single-choice question put to a group's members.
|
|
71
|
+
* It never executes anything.
|
|
72
|
+
* @name Poll
|
|
73
|
+
* @package sparkdream.commons.v1
|
|
74
|
+
* @see proto type: sparkdream.commons.v1.Poll
|
|
75
|
+
*/
|
|
76
|
+
export const Poll = {
|
|
77
|
+
typeUrl: "/sparkdream.commons.v1.Poll",
|
|
78
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
79
|
+
if (message.id !== BigInt(0)) {
|
|
80
|
+
writer.uint32(8).uint64(message.id);
|
|
81
|
+
}
|
|
82
|
+
if (message.councilName !== "") {
|
|
83
|
+
writer.uint32(18).string(message.councilName);
|
|
84
|
+
}
|
|
85
|
+
if (message.creator !== "") {
|
|
86
|
+
writer.uint32(26).string(message.creator);
|
|
87
|
+
}
|
|
88
|
+
if (message.question !== "") {
|
|
89
|
+
writer.uint32(34).string(message.question);
|
|
90
|
+
}
|
|
91
|
+
for (const v of message.options) {
|
|
92
|
+
writer.uint32(42).string(v);
|
|
93
|
+
}
|
|
94
|
+
if (message.secretBallot === true) {
|
|
95
|
+
writer.uint32(48).bool(message.secretBallot);
|
|
96
|
+
}
|
|
97
|
+
if (message.openedAt !== BigInt(0)) {
|
|
98
|
+
writer.uint32(56).int64(message.openedAt);
|
|
99
|
+
}
|
|
100
|
+
if (message.deadline !== BigInt(0)) {
|
|
101
|
+
writer.uint32(64).int64(message.deadline);
|
|
102
|
+
}
|
|
103
|
+
if (message.status !== 0) {
|
|
104
|
+
writer.uint32(72).int32(message.status);
|
|
105
|
+
}
|
|
106
|
+
writer.uint32(82).fork();
|
|
107
|
+
for (const v of message.tallies) {
|
|
108
|
+
writer.uint64(v);
|
|
109
|
+
}
|
|
110
|
+
writer.ldelim();
|
|
111
|
+
if (message.voterRoot.length !== 0) {
|
|
112
|
+
writer.uint32(90).bytes(message.voterRoot);
|
|
113
|
+
}
|
|
114
|
+
if (message.eligibleVoters !== BigInt(0)) {
|
|
115
|
+
writer.uint32(96).uint64(message.eligibleVoters);
|
|
116
|
+
}
|
|
117
|
+
if (message.closedAt !== BigInt(0)) {
|
|
118
|
+
writer.uint32(104).int64(message.closedAt);
|
|
119
|
+
}
|
|
120
|
+
return writer;
|
|
121
|
+
},
|
|
122
|
+
decode(input, length) {
|
|
123
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
124
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
125
|
+
const message = createBasePoll();
|
|
126
|
+
while (reader.pos < end) {
|
|
127
|
+
const tag = reader.uint32();
|
|
128
|
+
switch (tag >>> 3) {
|
|
129
|
+
case 1:
|
|
130
|
+
message.id = reader.uint64();
|
|
131
|
+
break;
|
|
132
|
+
case 2:
|
|
133
|
+
message.councilName = reader.string();
|
|
134
|
+
break;
|
|
135
|
+
case 3:
|
|
136
|
+
message.creator = reader.string();
|
|
137
|
+
break;
|
|
138
|
+
case 4:
|
|
139
|
+
message.question = reader.string();
|
|
140
|
+
break;
|
|
141
|
+
case 5:
|
|
142
|
+
message.options.push(reader.string());
|
|
143
|
+
break;
|
|
144
|
+
case 6:
|
|
145
|
+
message.secretBallot = reader.bool();
|
|
146
|
+
break;
|
|
147
|
+
case 7:
|
|
148
|
+
message.openedAt = reader.int64();
|
|
149
|
+
break;
|
|
150
|
+
case 8:
|
|
151
|
+
message.deadline = reader.int64();
|
|
152
|
+
break;
|
|
153
|
+
case 9:
|
|
154
|
+
message.status = reader.int32();
|
|
155
|
+
break;
|
|
156
|
+
case 10:
|
|
157
|
+
if ((tag & 7) === 2) {
|
|
158
|
+
const end2 = reader.uint32() + reader.pos;
|
|
159
|
+
while (reader.pos < end2) {
|
|
160
|
+
message.tallies.push(reader.uint64());
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
message.tallies.push(reader.uint64());
|
|
165
|
+
}
|
|
166
|
+
break;
|
|
167
|
+
case 11:
|
|
168
|
+
message.voterRoot = reader.bytes();
|
|
169
|
+
break;
|
|
170
|
+
case 12:
|
|
171
|
+
message.eligibleVoters = reader.uint64();
|
|
172
|
+
break;
|
|
173
|
+
case 13:
|
|
174
|
+
message.closedAt = reader.int64();
|
|
175
|
+
break;
|
|
176
|
+
default:
|
|
177
|
+
reader.skipType(tag & 7);
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return message;
|
|
182
|
+
},
|
|
183
|
+
fromPartial(object) {
|
|
184
|
+
const message = createBasePoll();
|
|
185
|
+
message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0);
|
|
186
|
+
message.councilName = object.councilName ?? "";
|
|
187
|
+
message.creator = object.creator ?? "";
|
|
188
|
+
message.question = object.question ?? "";
|
|
189
|
+
message.options = object.options?.map(e => e) || [];
|
|
190
|
+
message.secretBallot = object.secretBallot ?? false;
|
|
191
|
+
message.openedAt = object.openedAt !== undefined && object.openedAt !== null ? BigInt(object.openedAt.toString()) : BigInt(0);
|
|
192
|
+
message.deadline = object.deadline !== undefined && object.deadline !== null ? BigInt(object.deadline.toString()) : BigInt(0);
|
|
193
|
+
message.status = object.status ?? 0;
|
|
194
|
+
message.tallies = object.tallies?.map(e => BigInt(e.toString())) || [];
|
|
195
|
+
message.voterRoot = object.voterRoot ?? new Uint8Array();
|
|
196
|
+
message.eligibleVoters = object.eligibleVoters !== undefined && object.eligibleVoters !== null ? BigInt(object.eligibleVoters.toString()) : BigInt(0);
|
|
197
|
+
message.closedAt = object.closedAt !== undefined && object.closedAt !== null ? BigInt(object.closedAt.toString()) : BigInt(0);
|
|
198
|
+
return message;
|
|
199
|
+
},
|
|
200
|
+
fromAmino(object) {
|
|
201
|
+
const message = createBasePoll();
|
|
202
|
+
if (object.id !== undefined && object.id !== null) {
|
|
203
|
+
message.id = BigInt(object.id);
|
|
204
|
+
}
|
|
205
|
+
if (object.council_name !== undefined && object.council_name !== null) {
|
|
206
|
+
message.councilName = object.council_name;
|
|
207
|
+
}
|
|
208
|
+
if (object.creator !== undefined && object.creator !== null) {
|
|
209
|
+
message.creator = object.creator;
|
|
210
|
+
}
|
|
211
|
+
if (object.question !== undefined && object.question !== null) {
|
|
212
|
+
message.question = object.question;
|
|
213
|
+
}
|
|
214
|
+
message.options = object.options?.map(e => e) || [];
|
|
215
|
+
if (object.secret_ballot !== undefined && object.secret_ballot !== null) {
|
|
216
|
+
message.secretBallot = object.secret_ballot;
|
|
217
|
+
}
|
|
218
|
+
if (object.opened_at !== undefined && object.opened_at !== null) {
|
|
219
|
+
message.openedAt = BigInt(object.opened_at);
|
|
220
|
+
}
|
|
221
|
+
if (object.deadline !== undefined && object.deadline !== null) {
|
|
222
|
+
message.deadline = BigInt(object.deadline);
|
|
223
|
+
}
|
|
224
|
+
if (object.status !== undefined && object.status !== null) {
|
|
225
|
+
message.status = object.status;
|
|
226
|
+
}
|
|
227
|
+
message.tallies = object.tallies?.map(e => BigInt(e)) || [];
|
|
228
|
+
if (object.voter_root !== undefined && object.voter_root !== null) {
|
|
229
|
+
message.voterRoot = bytesFromBase64(object.voter_root);
|
|
230
|
+
}
|
|
231
|
+
if (object.eligible_voters !== undefined && object.eligible_voters !== null) {
|
|
232
|
+
message.eligibleVoters = BigInt(object.eligible_voters);
|
|
233
|
+
}
|
|
234
|
+
if (object.closed_at !== undefined && object.closed_at !== null) {
|
|
235
|
+
message.closedAt = BigInt(object.closed_at);
|
|
236
|
+
}
|
|
237
|
+
return message;
|
|
238
|
+
},
|
|
239
|
+
toAmino(message) {
|
|
240
|
+
const obj = {};
|
|
241
|
+
obj.id = message.id !== BigInt(0) ? message.id?.toString() : undefined;
|
|
242
|
+
obj.council_name = message.councilName === "" ? undefined : message.councilName;
|
|
243
|
+
obj.creator = message.creator === "" ? undefined : message.creator;
|
|
244
|
+
obj.question = message.question === "" ? undefined : message.question;
|
|
245
|
+
if (message.options) {
|
|
246
|
+
obj.options = message.options.map(e => e);
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
obj.options = message.options;
|
|
250
|
+
}
|
|
251
|
+
obj.secret_ballot = message.secretBallot === false ? undefined : message.secretBallot;
|
|
252
|
+
obj.opened_at = message.openedAt !== BigInt(0) ? message.openedAt?.toString() : undefined;
|
|
253
|
+
obj.deadline = message.deadline !== BigInt(0) ? message.deadline?.toString() : undefined;
|
|
254
|
+
obj.status = message.status === 0 ? undefined : message.status;
|
|
255
|
+
if (message.tallies) {
|
|
256
|
+
obj.tallies = message.tallies.map(e => e.toString());
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
obj.tallies = message.tallies;
|
|
260
|
+
}
|
|
261
|
+
obj.voter_root = message.voterRoot ? base64FromBytes(message.voterRoot) : undefined;
|
|
262
|
+
obj.eligible_voters = message.eligibleVoters !== BigInt(0) ? message.eligibleVoters?.toString() : undefined;
|
|
263
|
+
obj.closed_at = message.closedAt !== BigInt(0) ? message.closedAt?.toString() : undefined;
|
|
264
|
+
return obj;
|
|
265
|
+
},
|
|
266
|
+
fromAminoMsg(object) {
|
|
267
|
+
return Poll.fromAmino(object.value);
|
|
268
|
+
},
|
|
269
|
+
fromProtoMsg(message) {
|
|
270
|
+
return Poll.decode(message.value);
|
|
271
|
+
},
|
|
272
|
+
toProto(message) {
|
|
273
|
+
return Poll.encode(message).finish();
|
|
274
|
+
},
|
|
275
|
+
toProtoMsg(message) {
|
|
276
|
+
return {
|
|
277
|
+
typeUrl: "/sparkdream.commons.v1.Poll",
|
|
278
|
+
value: Poll.encode(message).finish()
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
3
|
+
function createBasePollVote() {
|
|
4
|
+
return {
|
|
5
|
+
pollId: BigInt(0),
|
|
6
|
+
voter: "",
|
|
7
|
+
option: BigInt(0),
|
|
8
|
+
votedAt: BigInt(0)
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* PollVote is a member's open vote on a poll.
|
|
13
|
+
* @name PollVote
|
|
14
|
+
* @package sparkdream.commons.v1
|
|
15
|
+
* @see proto type: sparkdream.commons.v1.PollVote
|
|
16
|
+
*/
|
|
17
|
+
export const PollVote = {
|
|
18
|
+
typeUrl: "/sparkdream.commons.v1.PollVote",
|
|
19
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
20
|
+
if (message.pollId !== BigInt(0)) {
|
|
21
|
+
writer.uint32(8).uint64(message.pollId);
|
|
22
|
+
}
|
|
23
|
+
if (message.voter !== "") {
|
|
24
|
+
writer.uint32(18).string(message.voter);
|
|
25
|
+
}
|
|
26
|
+
if (message.option !== BigInt(0)) {
|
|
27
|
+
writer.uint32(24).uint64(message.option);
|
|
28
|
+
}
|
|
29
|
+
if (message.votedAt !== BigInt(0)) {
|
|
30
|
+
writer.uint32(32).int64(message.votedAt);
|
|
31
|
+
}
|
|
32
|
+
return writer;
|
|
33
|
+
},
|
|
34
|
+
decode(input, length) {
|
|
35
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
36
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
37
|
+
const message = createBasePollVote();
|
|
38
|
+
while (reader.pos < end) {
|
|
39
|
+
const tag = reader.uint32();
|
|
40
|
+
switch (tag >>> 3) {
|
|
41
|
+
case 1:
|
|
42
|
+
message.pollId = reader.uint64();
|
|
43
|
+
break;
|
|
44
|
+
case 2:
|
|
45
|
+
message.voter = reader.string();
|
|
46
|
+
break;
|
|
47
|
+
case 3:
|
|
48
|
+
message.option = reader.uint64();
|
|
49
|
+
break;
|
|
50
|
+
case 4:
|
|
51
|
+
message.votedAt = reader.int64();
|
|
52
|
+
break;
|
|
53
|
+
default:
|
|
54
|
+
reader.skipType(tag & 7);
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return message;
|
|
59
|
+
},
|
|
60
|
+
fromPartial(object) {
|
|
61
|
+
const message = createBasePollVote();
|
|
62
|
+
message.pollId = object.pollId !== undefined && object.pollId !== null ? BigInt(object.pollId.toString()) : BigInt(0);
|
|
63
|
+
message.voter = object.voter ?? "";
|
|
64
|
+
message.option = object.option !== undefined && object.option !== null ? BigInt(object.option.toString()) : BigInt(0);
|
|
65
|
+
message.votedAt = object.votedAt !== undefined && object.votedAt !== null ? BigInt(object.votedAt.toString()) : BigInt(0);
|
|
66
|
+
return message;
|
|
67
|
+
},
|
|
68
|
+
fromAmino(object) {
|
|
69
|
+
const message = createBasePollVote();
|
|
70
|
+
if (object.poll_id !== undefined && object.poll_id !== null) {
|
|
71
|
+
message.pollId = BigInt(object.poll_id);
|
|
72
|
+
}
|
|
73
|
+
if (object.voter !== undefined && object.voter !== null) {
|
|
74
|
+
message.voter = object.voter;
|
|
75
|
+
}
|
|
76
|
+
if (object.option !== undefined && object.option !== null) {
|
|
77
|
+
message.option = BigInt(object.option);
|
|
78
|
+
}
|
|
79
|
+
if (object.voted_at !== undefined && object.voted_at !== null) {
|
|
80
|
+
message.votedAt = BigInt(object.voted_at);
|
|
81
|
+
}
|
|
82
|
+
return message;
|
|
83
|
+
},
|
|
84
|
+
toAmino(message) {
|
|
85
|
+
const obj = {};
|
|
86
|
+
obj.poll_id = message.pollId !== BigInt(0) ? message.pollId?.toString() : undefined;
|
|
87
|
+
obj.voter = message.voter === "" ? undefined : message.voter;
|
|
88
|
+
obj.option = message.option !== BigInt(0) ? message.option?.toString() : undefined;
|
|
89
|
+
obj.voted_at = message.votedAt !== BigInt(0) ? message.votedAt?.toString() : undefined;
|
|
90
|
+
return obj;
|
|
91
|
+
},
|
|
92
|
+
fromAminoMsg(object) {
|
|
93
|
+
return PollVote.fromAmino(object.value);
|
|
94
|
+
},
|
|
95
|
+
fromProtoMsg(message) {
|
|
96
|
+
return PollVote.decode(message.value);
|
|
97
|
+
},
|
|
98
|
+
toProto(message) {
|
|
99
|
+
return PollVote.encode(message).finish();
|
|
100
|
+
},
|
|
101
|
+
toProtoMsg(message) {
|
|
102
|
+
return {
|
|
103
|
+
typeUrl: "/sparkdream.commons.v1.PollVote",
|
|
104
|
+
value: PollVote.encode(message).finish()
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
};
|