@sparkdreamnft/sparkdreamjs 0.0.47 → 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/query.js +125 -0
- package/esm/sparkdream/artifact/v1/query.lcd.js +7 -0
- package/esm/sparkdream/artifact/v1/query.rpc.Query.js +12 -1
- package/esm/sparkdream/artifact/v1/tx.js +13 -1
- 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/query.js +304 -1
- package/esm/sparkdream/rep/v1/query.lcd.js +19 -0
- package/esm/sparkdream/rep/v1/query.rpc.Query.js +22 -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/query.d.ts +86 -0
- package/sparkdream/artifact/v1/query.js +126 -1
- package/sparkdream/artifact/v1/query.lcd.d.ts +2 -1
- package/sparkdream/artifact/v1/query.lcd.js +7 -0
- package/sparkdream/artifact/v1/query.rpc.Query.d.ts +9 -1
- package/sparkdream/artifact/v1/query.rpc.Query.js +11 -0
- package/sparkdream/artifact/v1/tx.d.ts +14 -0
- package/sparkdream/artifact/v1/tx.js +13 -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 +17133 -16131
- 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/query.d.ts +187 -1
- package/sparkdream/rep/v1/query.js +304 -1
- package/sparkdream/rep/v1/query.lcd.d.ts +3 -1
- package/sparkdream/rep/v1/query.lcd.js +19 -0
- package/sparkdream/rep/v1/query.rpc.Query.d.ts +16 -1
- package/sparkdream/rep/v1/query.rpc.Query.js +21 -0
- 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 +8 -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,6 @@
|
|
|
1
1
|
import { TelescopeGeneratedType } from "../../../types";
|
|
2
2
|
import { Registry } from "@cosmjs/proto-signing";
|
|
3
|
-
import { MsgUpdateParams, MsgSpendFromCommons, MsgEmergencyCancelGovProposal, MsgCreatePolicyPermissions, MsgUpdatePolicyPermissions, MsgDeletePolicyPermissions, MsgRegisterGroup, MsgRenewGroup, MsgUpdateGroupMembers, MsgUpdateGroupConfig, MsgForceUpgrade, MsgDeleteGroup, MsgVetoGroupProposals, MsgSubmitProposal, MsgVoteProposal, MsgExecuteProposal, MsgSubmitAnonymousProposal, MsgAnonymousVoteProposal, MsgCreateCategory, MsgDeleteCategory, MsgScheduleRecurringSpend, MsgCancelRecurringSpend, MsgClaimRecurringSpend, MsgDeclineRecurringSpend } from "./tx";
|
|
3
|
+
import { MsgUpdateParams, MsgSpendFromCommons, MsgEmergencyCancelGovProposal, MsgCreatePolicyPermissions, MsgUpdatePolicyPermissions, MsgDeletePolicyPermissions, MsgRegisterGroup, MsgRenewGroup, MsgUpdateGroupMembers, MsgUpdateGroupConfig, MsgForceUpgrade, MsgDeleteGroup, MsgVetoGroupProposals, MsgSubmitProposal, MsgVoteProposal, MsgExecuteProposal, MsgSubmitAnonymousProposal, MsgAnonymousVoteProposal, MsgCreateCategory, MsgDeleteCategory, MsgScheduleRecurringSpend, MsgCancelRecurringSpend, MsgClaimRecurringSpend, MsgDeclineRecurringSpend, MsgOpenPoll, MsgVotePoll, MsgAnonymousVotePoll, MsgCancelPoll } from "./tx";
|
|
4
4
|
export declare const registry: ReadonlyArray<[string, TelescopeGeneratedType<any, any, any>]>;
|
|
5
5
|
export declare const load: (protoRegistry: Registry) => void;
|
|
6
6
|
export declare const MessageComposer: {
|
|
@@ -101,6 +101,22 @@ export declare const MessageComposer: {
|
|
|
101
101
|
typeUrl: string;
|
|
102
102
|
value: Uint8Array<ArrayBufferLike>;
|
|
103
103
|
};
|
|
104
|
+
openPoll(value: MsgOpenPoll): {
|
|
105
|
+
typeUrl: string;
|
|
106
|
+
value: Uint8Array<ArrayBufferLike>;
|
|
107
|
+
};
|
|
108
|
+
votePoll(value: MsgVotePoll): {
|
|
109
|
+
typeUrl: string;
|
|
110
|
+
value: Uint8Array<ArrayBufferLike>;
|
|
111
|
+
};
|
|
112
|
+
anonymousVotePoll(value: MsgAnonymousVotePoll): {
|
|
113
|
+
typeUrl: string;
|
|
114
|
+
value: Uint8Array<ArrayBufferLike>;
|
|
115
|
+
};
|
|
116
|
+
cancelPoll(value: MsgCancelPoll): {
|
|
117
|
+
typeUrl: string;
|
|
118
|
+
value: Uint8Array<ArrayBufferLike>;
|
|
119
|
+
};
|
|
104
120
|
};
|
|
105
121
|
withTypeUrl: {
|
|
106
122
|
updateParams(value: MsgUpdateParams): {
|
|
@@ -199,6 +215,22 @@ export declare const MessageComposer: {
|
|
|
199
215
|
typeUrl: string;
|
|
200
216
|
value: MsgDeclineRecurringSpend;
|
|
201
217
|
};
|
|
218
|
+
openPoll(value: MsgOpenPoll): {
|
|
219
|
+
typeUrl: string;
|
|
220
|
+
value: MsgOpenPoll;
|
|
221
|
+
};
|
|
222
|
+
votePoll(value: MsgVotePoll): {
|
|
223
|
+
typeUrl: string;
|
|
224
|
+
value: MsgVotePoll;
|
|
225
|
+
};
|
|
226
|
+
anonymousVotePoll(value: MsgAnonymousVotePoll): {
|
|
227
|
+
typeUrl: string;
|
|
228
|
+
value: MsgAnonymousVotePoll;
|
|
229
|
+
};
|
|
230
|
+
cancelPoll(value: MsgCancelPoll): {
|
|
231
|
+
typeUrl: string;
|
|
232
|
+
value: MsgCancelPoll;
|
|
233
|
+
};
|
|
202
234
|
};
|
|
203
235
|
fromPartial: {
|
|
204
236
|
updateParams(value: MsgUpdateParams): {
|
|
@@ -297,5 +329,21 @@ export declare const MessageComposer: {
|
|
|
297
329
|
typeUrl: string;
|
|
298
330
|
value: MsgDeclineRecurringSpend;
|
|
299
331
|
};
|
|
332
|
+
openPoll(value: MsgOpenPoll): {
|
|
333
|
+
typeUrl: string;
|
|
334
|
+
value: MsgOpenPoll;
|
|
335
|
+
};
|
|
336
|
+
votePoll(value: MsgVotePoll): {
|
|
337
|
+
typeUrl: string;
|
|
338
|
+
value: MsgVotePoll;
|
|
339
|
+
};
|
|
340
|
+
anonymousVotePoll(value: MsgAnonymousVotePoll): {
|
|
341
|
+
typeUrl: string;
|
|
342
|
+
value: MsgAnonymousVotePoll;
|
|
343
|
+
};
|
|
344
|
+
cancelPoll(value: MsgCancelPoll): {
|
|
345
|
+
typeUrl: string;
|
|
346
|
+
value: MsgCancelPoll;
|
|
347
|
+
};
|
|
300
348
|
};
|
|
301
349
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MessageComposer = exports.load = exports.registry = void 0;
|
|
4
4
|
const tx_1 = require("./tx");
|
|
5
|
-
exports.registry = [["/sparkdream.commons.v1.MsgUpdateParams", tx_1.MsgUpdateParams], ["/sparkdream.commons.v1.MsgSpendFromCommons", tx_1.MsgSpendFromCommons], ["/sparkdream.commons.v1.MsgEmergencyCancelGovProposal", tx_1.MsgEmergencyCancelGovProposal], ["/sparkdream.commons.v1.MsgCreatePolicyPermissions", tx_1.MsgCreatePolicyPermissions], ["/sparkdream.commons.v1.MsgUpdatePolicyPermissions", tx_1.MsgUpdatePolicyPermissions], ["/sparkdream.commons.v1.MsgDeletePolicyPermissions", tx_1.MsgDeletePolicyPermissions], ["/sparkdream.commons.v1.MsgRegisterGroup", tx_1.MsgRegisterGroup], ["/sparkdream.commons.v1.MsgRenewGroup", tx_1.MsgRenewGroup], ["/sparkdream.commons.v1.MsgUpdateGroupMembers", tx_1.MsgUpdateGroupMembers], ["/sparkdream.commons.v1.MsgUpdateGroupConfig", tx_1.MsgUpdateGroupConfig], ["/sparkdream.commons.v1.MsgForceUpgrade", tx_1.MsgForceUpgrade], ["/sparkdream.commons.v1.MsgDeleteGroup", tx_1.MsgDeleteGroup], ["/sparkdream.commons.v1.MsgVetoGroupProposals", tx_1.MsgVetoGroupProposals], ["/sparkdream.commons.v1.MsgSubmitProposal", tx_1.MsgSubmitProposal], ["/sparkdream.commons.v1.MsgVoteProposal", tx_1.MsgVoteProposal], ["/sparkdream.commons.v1.MsgExecuteProposal", tx_1.MsgExecuteProposal], ["/sparkdream.commons.v1.MsgSubmitAnonymousProposal", tx_1.MsgSubmitAnonymousProposal], ["/sparkdream.commons.v1.MsgAnonymousVoteProposal", tx_1.MsgAnonymousVoteProposal], ["/sparkdream.commons.v1.MsgCreateCategory", tx_1.MsgCreateCategory], ["/sparkdream.commons.v1.MsgDeleteCategory", tx_1.MsgDeleteCategory], ["/sparkdream.commons.v1.MsgScheduleRecurringSpend", tx_1.MsgScheduleRecurringSpend], ["/sparkdream.commons.v1.MsgCancelRecurringSpend", tx_1.MsgCancelRecurringSpend], ["/sparkdream.commons.v1.MsgClaimRecurringSpend", tx_1.MsgClaimRecurringSpend], ["/sparkdream.commons.v1.MsgDeclineRecurringSpend", tx_1.MsgDeclineRecurringSpend]];
|
|
5
|
+
exports.registry = [["/sparkdream.commons.v1.MsgUpdateParams", tx_1.MsgUpdateParams], ["/sparkdream.commons.v1.MsgSpendFromCommons", tx_1.MsgSpendFromCommons], ["/sparkdream.commons.v1.MsgEmergencyCancelGovProposal", tx_1.MsgEmergencyCancelGovProposal], ["/sparkdream.commons.v1.MsgCreatePolicyPermissions", tx_1.MsgCreatePolicyPermissions], ["/sparkdream.commons.v1.MsgUpdatePolicyPermissions", tx_1.MsgUpdatePolicyPermissions], ["/sparkdream.commons.v1.MsgDeletePolicyPermissions", tx_1.MsgDeletePolicyPermissions], ["/sparkdream.commons.v1.MsgRegisterGroup", tx_1.MsgRegisterGroup], ["/sparkdream.commons.v1.MsgRenewGroup", tx_1.MsgRenewGroup], ["/sparkdream.commons.v1.MsgUpdateGroupMembers", tx_1.MsgUpdateGroupMembers], ["/sparkdream.commons.v1.MsgUpdateGroupConfig", tx_1.MsgUpdateGroupConfig], ["/sparkdream.commons.v1.MsgForceUpgrade", tx_1.MsgForceUpgrade], ["/sparkdream.commons.v1.MsgDeleteGroup", tx_1.MsgDeleteGroup], ["/sparkdream.commons.v1.MsgVetoGroupProposals", tx_1.MsgVetoGroupProposals], ["/sparkdream.commons.v1.MsgSubmitProposal", tx_1.MsgSubmitProposal], ["/sparkdream.commons.v1.MsgVoteProposal", tx_1.MsgVoteProposal], ["/sparkdream.commons.v1.MsgExecuteProposal", tx_1.MsgExecuteProposal], ["/sparkdream.commons.v1.MsgSubmitAnonymousProposal", tx_1.MsgSubmitAnonymousProposal], ["/sparkdream.commons.v1.MsgAnonymousVoteProposal", tx_1.MsgAnonymousVoteProposal], ["/sparkdream.commons.v1.MsgCreateCategory", tx_1.MsgCreateCategory], ["/sparkdream.commons.v1.MsgDeleteCategory", tx_1.MsgDeleteCategory], ["/sparkdream.commons.v1.MsgScheduleRecurringSpend", tx_1.MsgScheduleRecurringSpend], ["/sparkdream.commons.v1.MsgCancelRecurringSpend", tx_1.MsgCancelRecurringSpend], ["/sparkdream.commons.v1.MsgClaimRecurringSpend", tx_1.MsgClaimRecurringSpend], ["/sparkdream.commons.v1.MsgDeclineRecurringSpend", tx_1.MsgDeclineRecurringSpend], ["/sparkdream.commons.v1.MsgOpenPoll", tx_1.MsgOpenPoll], ["/sparkdream.commons.v1.MsgVotePoll", tx_1.MsgVotePoll], ["/sparkdream.commons.v1.MsgAnonymousVotePoll", tx_1.MsgAnonymousVotePoll], ["/sparkdream.commons.v1.MsgCancelPoll", tx_1.MsgCancelPoll]];
|
|
6
6
|
const load = (protoRegistry) => {
|
|
7
7
|
exports.registry.forEach(([typeUrl, mod]) => {
|
|
8
8
|
protoRegistry.register(typeUrl, mod);
|
|
@@ -154,6 +154,30 @@ exports.MessageComposer = {
|
|
|
154
154
|
typeUrl: "/sparkdream.commons.v1.MsgDeclineRecurringSpend",
|
|
155
155
|
value: tx_1.MsgDeclineRecurringSpend.encode(value).finish()
|
|
156
156
|
};
|
|
157
|
+
},
|
|
158
|
+
openPoll(value) {
|
|
159
|
+
return {
|
|
160
|
+
typeUrl: "/sparkdream.commons.v1.MsgOpenPoll",
|
|
161
|
+
value: tx_1.MsgOpenPoll.encode(value).finish()
|
|
162
|
+
};
|
|
163
|
+
},
|
|
164
|
+
votePoll(value) {
|
|
165
|
+
return {
|
|
166
|
+
typeUrl: "/sparkdream.commons.v1.MsgVotePoll",
|
|
167
|
+
value: tx_1.MsgVotePoll.encode(value).finish()
|
|
168
|
+
};
|
|
169
|
+
},
|
|
170
|
+
anonymousVotePoll(value) {
|
|
171
|
+
return {
|
|
172
|
+
typeUrl: "/sparkdream.commons.v1.MsgAnonymousVotePoll",
|
|
173
|
+
value: tx_1.MsgAnonymousVotePoll.encode(value).finish()
|
|
174
|
+
};
|
|
175
|
+
},
|
|
176
|
+
cancelPoll(value) {
|
|
177
|
+
return {
|
|
178
|
+
typeUrl: "/sparkdream.commons.v1.MsgCancelPoll",
|
|
179
|
+
value: tx_1.MsgCancelPoll.encode(value).finish()
|
|
180
|
+
};
|
|
157
181
|
}
|
|
158
182
|
},
|
|
159
183
|
withTypeUrl: {
|
|
@@ -300,6 +324,30 @@ exports.MessageComposer = {
|
|
|
300
324
|
typeUrl: "/sparkdream.commons.v1.MsgDeclineRecurringSpend",
|
|
301
325
|
value
|
|
302
326
|
};
|
|
327
|
+
},
|
|
328
|
+
openPoll(value) {
|
|
329
|
+
return {
|
|
330
|
+
typeUrl: "/sparkdream.commons.v1.MsgOpenPoll",
|
|
331
|
+
value
|
|
332
|
+
};
|
|
333
|
+
},
|
|
334
|
+
votePoll(value) {
|
|
335
|
+
return {
|
|
336
|
+
typeUrl: "/sparkdream.commons.v1.MsgVotePoll",
|
|
337
|
+
value
|
|
338
|
+
};
|
|
339
|
+
},
|
|
340
|
+
anonymousVotePoll(value) {
|
|
341
|
+
return {
|
|
342
|
+
typeUrl: "/sparkdream.commons.v1.MsgAnonymousVotePoll",
|
|
343
|
+
value
|
|
344
|
+
};
|
|
345
|
+
},
|
|
346
|
+
cancelPoll(value) {
|
|
347
|
+
return {
|
|
348
|
+
typeUrl: "/sparkdream.commons.v1.MsgCancelPoll",
|
|
349
|
+
value
|
|
350
|
+
};
|
|
303
351
|
}
|
|
304
352
|
},
|
|
305
353
|
fromPartial: {
|
|
@@ -446,6 +494,30 @@ exports.MessageComposer = {
|
|
|
446
494
|
typeUrl: "/sparkdream.commons.v1.MsgDeclineRecurringSpend",
|
|
447
495
|
value: tx_1.MsgDeclineRecurringSpend.fromPartial(value)
|
|
448
496
|
};
|
|
497
|
+
},
|
|
498
|
+
openPoll(value) {
|
|
499
|
+
return {
|
|
500
|
+
typeUrl: "/sparkdream.commons.v1.MsgOpenPoll",
|
|
501
|
+
value: tx_1.MsgOpenPoll.fromPartial(value)
|
|
502
|
+
};
|
|
503
|
+
},
|
|
504
|
+
votePoll(value) {
|
|
505
|
+
return {
|
|
506
|
+
typeUrl: "/sparkdream.commons.v1.MsgVotePoll",
|
|
507
|
+
value: tx_1.MsgVotePoll.fromPartial(value)
|
|
508
|
+
};
|
|
509
|
+
},
|
|
510
|
+
anonymousVotePoll(value) {
|
|
511
|
+
return {
|
|
512
|
+
typeUrl: "/sparkdream.commons.v1.MsgAnonymousVotePoll",
|
|
513
|
+
value: tx_1.MsgAnonymousVotePoll.fromPartial(value)
|
|
514
|
+
};
|
|
515
|
+
},
|
|
516
|
+
cancelPoll(value) {
|
|
517
|
+
return {
|
|
518
|
+
typeUrl: "/sparkdream.commons.v1.MsgCancelPoll",
|
|
519
|
+
value: tx_1.MsgCancelPoll.fromPartial(value)
|
|
520
|
+
};
|
|
449
521
|
}
|
|
450
522
|
}
|
|
451
523
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TxRpc } from "../../../types";
|
|
2
|
-
import { MsgUpdateParams, MsgUpdateParamsResponse, MsgSpendFromCommons, MsgSpendFromCommonsResponse, MsgEmergencyCancelGovProposal, MsgEmergencyCancelGovProposalResponse, MsgCreatePolicyPermissions, MsgCreatePolicyPermissionsResponse, MsgUpdatePolicyPermissions, MsgUpdatePolicyPermissionsResponse, MsgDeletePolicyPermissions, MsgDeletePolicyPermissionsResponse, MsgRegisterGroup, MsgRegisterGroupResponse, MsgRenewGroup, MsgRenewGroupResponse, MsgUpdateGroupMembers, MsgUpdateGroupMembersResponse, MsgUpdateGroupConfig, MsgUpdateGroupConfigResponse, MsgForceUpgrade, MsgForceUpgradeResponse, MsgDeleteGroup, MsgDeleteGroupResponse, MsgVetoGroupProposals, MsgVetoGroupProposalsResponse, MsgSubmitProposal, MsgSubmitProposalResponse, MsgVoteProposal, MsgVoteProposalResponse, MsgExecuteProposal, MsgExecuteProposalResponse, MsgSubmitAnonymousProposal, MsgSubmitAnonymousProposalResponse, MsgAnonymousVoteProposal, MsgAnonymousVoteProposalResponse, MsgCreateCategory, MsgCreateCategoryResponse, MsgDeleteCategory, MsgDeleteCategoryResponse, MsgScheduleRecurringSpend, MsgScheduleRecurringSpendResponse, MsgCancelRecurringSpend, MsgCancelRecurringSpendResponse, MsgClaimRecurringSpend, MsgClaimRecurringSpendResponse, MsgDeclineRecurringSpend, MsgDeclineRecurringSpendResponse } from "./tx";
|
|
2
|
+
import { MsgUpdateParams, MsgUpdateParamsResponse, MsgSpendFromCommons, MsgSpendFromCommonsResponse, MsgEmergencyCancelGovProposal, MsgEmergencyCancelGovProposalResponse, MsgCreatePolicyPermissions, MsgCreatePolicyPermissionsResponse, MsgUpdatePolicyPermissions, MsgUpdatePolicyPermissionsResponse, MsgDeletePolicyPermissions, MsgDeletePolicyPermissionsResponse, MsgRegisterGroup, MsgRegisterGroupResponse, MsgRenewGroup, MsgRenewGroupResponse, MsgUpdateGroupMembers, MsgUpdateGroupMembersResponse, MsgUpdateGroupConfig, MsgUpdateGroupConfigResponse, MsgForceUpgrade, MsgForceUpgradeResponse, MsgDeleteGroup, MsgDeleteGroupResponse, MsgVetoGroupProposals, MsgVetoGroupProposalsResponse, MsgSubmitProposal, MsgSubmitProposalResponse, MsgVoteProposal, MsgVoteProposalResponse, MsgExecuteProposal, MsgExecuteProposalResponse, MsgSubmitAnonymousProposal, MsgSubmitAnonymousProposalResponse, MsgAnonymousVoteProposal, MsgAnonymousVoteProposalResponse, MsgCreateCategory, MsgCreateCategoryResponse, MsgDeleteCategory, MsgDeleteCategoryResponse, MsgScheduleRecurringSpend, MsgScheduleRecurringSpendResponse, MsgCancelRecurringSpend, MsgCancelRecurringSpendResponse, MsgClaimRecurringSpend, MsgClaimRecurringSpendResponse, MsgDeclineRecurringSpend, MsgDeclineRecurringSpendResponse, MsgOpenPoll, MsgOpenPollResponse, MsgVotePoll, MsgVotePollResponse, MsgAnonymousVotePoll, MsgAnonymousVotePollResponse, MsgCancelPoll, MsgCancelPollResponse } from "./tx";
|
|
3
3
|
/** Msg defines the Msg service. */
|
|
4
4
|
export interface Msg {
|
|
5
5
|
/**
|
|
@@ -77,6 +77,14 @@ export interface Msg {
|
|
|
77
77
|
* signer must be the recipient.
|
|
78
78
|
*/
|
|
79
79
|
declineRecurringSpend(request: MsgDeclineRecurringSpend): Promise<MsgDeclineRecurringSpendResponse>;
|
|
80
|
+
/** OpenPoll opens a non-binding poll for a group's members. */
|
|
81
|
+
openPoll(request: MsgOpenPoll): Promise<MsgOpenPollResponse>;
|
|
82
|
+
/** VotePoll casts a member's open vote on a poll. */
|
|
83
|
+
votePoll(request: MsgVotePoll): Promise<MsgVotePollResponse>;
|
|
84
|
+
/** AnonymousVotePoll casts a secret-ballot poll vote via x/shield. */
|
|
85
|
+
anonymousVotePoll(request: MsgAnonymousVotePoll): Promise<MsgAnonymousVotePollResponse>;
|
|
86
|
+
/** CancelPoll withdraws a poll before anyone has voted on it. */
|
|
87
|
+
cancelPoll(request: MsgCancelPoll): Promise<MsgCancelPollResponse>;
|
|
80
88
|
}
|
|
81
89
|
export declare class MsgClientImpl implements Msg {
|
|
82
90
|
private readonly rpc;
|
|
@@ -105,5 +113,9 @@ export declare class MsgClientImpl implements Msg {
|
|
|
105
113
|
cancelRecurringSpend: (request: MsgCancelRecurringSpend) => Promise<MsgCancelRecurringSpendResponse>;
|
|
106
114
|
claimRecurringSpend: (request: MsgClaimRecurringSpend) => Promise<MsgClaimRecurringSpendResponse>;
|
|
107
115
|
declineRecurringSpend: (request: MsgDeclineRecurringSpend) => Promise<MsgDeclineRecurringSpendResponse>;
|
|
116
|
+
openPoll: (request: MsgOpenPoll) => Promise<MsgOpenPollResponse>;
|
|
117
|
+
votePoll: (request: MsgVotePoll) => Promise<MsgVotePollResponse>;
|
|
118
|
+
anonymousVotePoll: (request: MsgAnonymousVotePoll) => Promise<MsgAnonymousVotePollResponse>;
|
|
119
|
+
cancelPoll: (request: MsgCancelPoll) => Promise<MsgCancelPollResponse>;
|
|
108
120
|
}
|
|
109
121
|
export declare const createClientImpl: (rpc: TxRpc) => MsgClientImpl;
|
|
@@ -164,6 +164,30 @@ class MsgClientImpl {
|
|
|
164
164
|
const promise = this.rpc.request("sparkdream.commons.v1.Msg", "DeclineRecurringSpend", data);
|
|
165
165
|
return promise.then(data => tx_1.MsgDeclineRecurringSpendResponse.decode(new binary_1.BinaryReader(data)));
|
|
166
166
|
};
|
|
167
|
+
/* OpenPoll opens a non-binding poll for a group's members. */
|
|
168
|
+
openPoll = async (request) => {
|
|
169
|
+
const data = tx_1.MsgOpenPoll.encode(request).finish();
|
|
170
|
+
const promise = this.rpc.request("sparkdream.commons.v1.Msg", "OpenPoll", data);
|
|
171
|
+
return promise.then(data => tx_1.MsgOpenPollResponse.decode(new binary_1.BinaryReader(data)));
|
|
172
|
+
};
|
|
173
|
+
/* VotePoll casts a member's open vote on a poll. */
|
|
174
|
+
votePoll = async (request) => {
|
|
175
|
+
const data = tx_1.MsgVotePoll.encode(request).finish();
|
|
176
|
+
const promise = this.rpc.request("sparkdream.commons.v1.Msg", "VotePoll", data);
|
|
177
|
+
return promise.then(data => tx_1.MsgVotePollResponse.decode(new binary_1.BinaryReader(data)));
|
|
178
|
+
};
|
|
179
|
+
/* AnonymousVotePoll casts a secret-ballot poll vote via x/shield. */
|
|
180
|
+
anonymousVotePoll = async (request) => {
|
|
181
|
+
const data = tx_1.MsgAnonymousVotePoll.encode(request).finish();
|
|
182
|
+
const promise = this.rpc.request("sparkdream.commons.v1.Msg", "AnonymousVotePoll", data);
|
|
183
|
+
return promise.then(data => tx_1.MsgAnonymousVotePollResponse.decode(new binary_1.BinaryReader(data)));
|
|
184
|
+
};
|
|
185
|
+
/* CancelPoll withdraws a poll before anyone has voted on it. */
|
|
186
|
+
cancelPoll = async (request) => {
|
|
187
|
+
const data = tx_1.MsgCancelPoll.encode(request).finish();
|
|
188
|
+
const promise = this.rpc.request("sparkdream.commons.v1.Msg", "CancelPoll", data);
|
|
189
|
+
return promise.then(data => tx_1.MsgCancelPollResponse.decode(new binary_1.BinaryReader(data)));
|
|
190
|
+
};
|
|
167
191
|
}
|
|
168
192
|
exports.MsgClientImpl = MsgClientImpl;
|
|
169
193
|
const createClientImpl = (rpc) => {
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
2
|
+
import { DeepPartial } from "../../../helpers";
|
|
3
|
+
/**
|
|
4
|
+
* VoterTree is the voter snapshot of a secret ballot: a Merkle tree (the
|
|
5
|
+
* x/shield circuit's depth and hash) whose leaves are MiMC(zk_public_key, 0)
|
|
6
|
+
* for each group member with a registered ZK key, in member-address order.
|
|
7
|
+
* Its shape matches x/rep's trust_tree query, so a client proves against it
|
|
8
|
+
* the same way (leaf metadata 0, min_trust_level 0).
|
|
9
|
+
* @name VoterTree
|
|
10
|
+
* @package sparkdream.commons.v1
|
|
11
|
+
* @see proto type: sparkdream.commons.v1.VoterTree
|
|
12
|
+
*/
|
|
13
|
+
export interface VoterTree {
|
|
14
|
+
root: Uint8Array;
|
|
15
|
+
/**
|
|
16
|
+
* depth is the tree depth (number of levels above the leaves).
|
|
17
|
+
*/
|
|
18
|
+
depth: number;
|
|
19
|
+
leaves: VoterTreeLeaf[];
|
|
20
|
+
/**
|
|
21
|
+
* member_count is the group's member count at the snapshot, members
|
|
22
|
+
* without a ZK key included.
|
|
23
|
+
*/
|
|
24
|
+
memberCount: bigint;
|
|
25
|
+
/**
|
|
26
|
+
* member_weight is the (equal) member weight at the snapshot.
|
|
27
|
+
*/
|
|
28
|
+
memberWeight: string;
|
|
29
|
+
}
|
|
30
|
+
export interface VoterTreeProtoMsg {
|
|
31
|
+
typeUrl: "/sparkdream.commons.v1.VoterTree";
|
|
32
|
+
value: Uint8Array;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* VoterTree is the voter snapshot of a secret ballot: a Merkle tree (the
|
|
36
|
+
* x/shield circuit's depth and hash) whose leaves are MiMC(zk_public_key, 0)
|
|
37
|
+
* for each group member with a registered ZK key, in member-address order.
|
|
38
|
+
* Its shape matches x/rep's trust_tree query, so a client proves against it
|
|
39
|
+
* the same way (leaf metadata 0, min_trust_level 0).
|
|
40
|
+
* @name VoterTreeAmino
|
|
41
|
+
* @package sparkdream.commons.v1
|
|
42
|
+
* @see proto type: sparkdream.commons.v1.VoterTree
|
|
43
|
+
*/
|
|
44
|
+
export interface VoterTreeAmino {
|
|
45
|
+
root?: string;
|
|
46
|
+
/**
|
|
47
|
+
* depth is the tree depth (number of levels above the leaves).
|
|
48
|
+
*/
|
|
49
|
+
depth?: number;
|
|
50
|
+
leaves?: VoterTreeLeafAmino[];
|
|
51
|
+
/**
|
|
52
|
+
* member_count is the group's member count at the snapshot, members
|
|
53
|
+
* without a ZK key included.
|
|
54
|
+
*/
|
|
55
|
+
member_count?: string;
|
|
56
|
+
/**
|
|
57
|
+
* member_weight is the (equal) member weight at the snapshot.
|
|
58
|
+
*/
|
|
59
|
+
member_weight?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface VoterTreeAminoMsg {
|
|
62
|
+
type: "/sparkdream.commons.v1.VoterTree";
|
|
63
|
+
value: VoterTreeAmino;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* VoterTreeLeaf is one occupied leaf slot.
|
|
67
|
+
* @name VoterTreeLeaf
|
|
68
|
+
* @package sparkdream.commons.v1
|
|
69
|
+
* @see proto type: sparkdream.commons.v1.VoterTreeLeaf
|
|
70
|
+
*/
|
|
71
|
+
export interface VoterTreeLeaf {
|
|
72
|
+
index: bigint;
|
|
73
|
+
hash: Uint8Array;
|
|
74
|
+
}
|
|
75
|
+
export interface VoterTreeLeafProtoMsg {
|
|
76
|
+
typeUrl: "/sparkdream.commons.v1.VoterTreeLeaf";
|
|
77
|
+
value: Uint8Array;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* VoterTreeLeaf is one occupied leaf slot.
|
|
81
|
+
* @name VoterTreeLeafAmino
|
|
82
|
+
* @package sparkdream.commons.v1
|
|
83
|
+
* @see proto type: sparkdream.commons.v1.VoterTreeLeaf
|
|
84
|
+
*/
|
|
85
|
+
export interface VoterTreeLeafAmino {
|
|
86
|
+
index?: string;
|
|
87
|
+
hash?: string;
|
|
88
|
+
}
|
|
89
|
+
export interface VoterTreeLeafAminoMsg {
|
|
90
|
+
type: "/sparkdream.commons.v1.VoterTreeLeaf";
|
|
91
|
+
value: VoterTreeLeafAmino;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* VoterTree is the voter snapshot of a secret ballot: a Merkle tree (the
|
|
95
|
+
* x/shield circuit's depth and hash) whose leaves are MiMC(zk_public_key, 0)
|
|
96
|
+
* for each group member with a registered ZK key, in member-address order.
|
|
97
|
+
* Its shape matches x/rep's trust_tree query, so a client proves against it
|
|
98
|
+
* the same way (leaf metadata 0, min_trust_level 0).
|
|
99
|
+
* @name VoterTree
|
|
100
|
+
* @package sparkdream.commons.v1
|
|
101
|
+
* @see proto type: sparkdream.commons.v1.VoterTree
|
|
102
|
+
*/
|
|
103
|
+
export declare const VoterTree: {
|
|
104
|
+
typeUrl: string;
|
|
105
|
+
encode(message: VoterTree, writer?: BinaryWriter): BinaryWriter;
|
|
106
|
+
decode(input: BinaryReader | Uint8Array, length?: number): VoterTree;
|
|
107
|
+
fromPartial(object: DeepPartial<VoterTree>): VoterTree;
|
|
108
|
+
fromAmino(object: VoterTreeAmino): VoterTree;
|
|
109
|
+
toAmino(message: VoterTree): VoterTreeAmino;
|
|
110
|
+
fromAminoMsg(object: VoterTreeAminoMsg): VoterTree;
|
|
111
|
+
fromProtoMsg(message: VoterTreeProtoMsg): VoterTree;
|
|
112
|
+
toProto(message: VoterTree): Uint8Array;
|
|
113
|
+
toProtoMsg(message: VoterTree): VoterTreeProtoMsg;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* VoterTreeLeaf is one occupied leaf slot.
|
|
117
|
+
* @name VoterTreeLeaf
|
|
118
|
+
* @package sparkdream.commons.v1
|
|
119
|
+
* @see proto type: sparkdream.commons.v1.VoterTreeLeaf
|
|
120
|
+
*/
|
|
121
|
+
export declare const VoterTreeLeaf: {
|
|
122
|
+
typeUrl: string;
|
|
123
|
+
encode(message: VoterTreeLeaf, writer?: BinaryWriter): BinaryWriter;
|
|
124
|
+
decode(input: BinaryReader | Uint8Array, length?: number): VoterTreeLeaf;
|
|
125
|
+
fromPartial(object: DeepPartial<VoterTreeLeaf>): VoterTreeLeaf;
|
|
126
|
+
fromAmino(object: VoterTreeLeafAmino): VoterTreeLeaf;
|
|
127
|
+
toAmino(message: VoterTreeLeaf): VoterTreeLeafAmino;
|
|
128
|
+
fromAminoMsg(object: VoterTreeLeafAminoMsg): VoterTreeLeaf;
|
|
129
|
+
fromProtoMsg(message: VoterTreeLeafProtoMsg): VoterTreeLeaf;
|
|
130
|
+
toProto(message: VoterTreeLeaf): Uint8Array;
|
|
131
|
+
toProtoMsg(message: VoterTreeLeaf): VoterTreeLeafProtoMsg;
|
|
132
|
+
};
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VoterTreeLeaf = exports.VoterTree = void 0;
|
|
4
|
+
//@ts-nocheck
|
|
5
|
+
const binary_1 = require("../../../binary");
|
|
6
|
+
const helpers_1 = require("../../../helpers");
|
|
7
|
+
function createBaseVoterTree() {
|
|
8
|
+
return {
|
|
9
|
+
root: new Uint8Array(),
|
|
10
|
+
depth: 0,
|
|
11
|
+
leaves: [],
|
|
12
|
+
memberCount: BigInt(0),
|
|
13
|
+
memberWeight: ""
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* VoterTree is the voter snapshot of a secret ballot: a Merkle tree (the
|
|
18
|
+
* x/shield circuit's depth and hash) whose leaves are MiMC(zk_public_key, 0)
|
|
19
|
+
* for each group member with a registered ZK key, in member-address order.
|
|
20
|
+
* Its shape matches x/rep's trust_tree query, so a client proves against it
|
|
21
|
+
* the same way (leaf metadata 0, min_trust_level 0).
|
|
22
|
+
* @name VoterTree
|
|
23
|
+
* @package sparkdream.commons.v1
|
|
24
|
+
* @see proto type: sparkdream.commons.v1.VoterTree
|
|
25
|
+
*/
|
|
26
|
+
exports.VoterTree = {
|
|
27
|
+
typeUrl: "/sparkdream.commons.v1.VoterTree",
|
|
28
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
29
|
+
if (message.root.length !== 0) {
|
|
30
|
+
writer.uint32(10).bytes(message.root);
|
|
31
|
+
}
|
|
32
|
+
if (message.depth !== 0) {
|
|
33
|
+
writer.uint32(16).uint32(message.depth);
|
|
34
|
+
}
|
|
35
|
+
for (const v of message.leaves) {
|
|
36
|
+
exports.VoterTreeLeaf.encode(v, writer.uint32(26).fork()).ldelim();
|
|
37
|
+
}
|
|
38
|
+
if (message.memberCount !== BigInt(0)) {
|
|
39
|
+
writer.uint32(32).uint64(message.memberCount);
|
|
40
|
+
}
|
|
41
|
+
if (message.memberWeight !== "") {
|
|
42
|
+
writer.uint32(42).string(message.memberWeight);
|
|
43
|
+
}
|
|
44
|
+
return writer;
|
|
45
|
+
},
|
|
46
|
+
decode(input, length) {
|
|
47
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
48
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
49
|
+
const message = createBaseVoterTree();
|
|
50
|
+
while (reader.pos < end) {
|
|
51
|
+
const tag = reader.uint32();
|
|
52
|
+
switch (tag >>> 3) {
|
|
53
|
+
case 1:
|
|
54
|
+
message.root = reader.bytes();
|
|
55
|
+
break;
|
|
56
|
+
case 2:
|
|
57
|
+
message.depth = reader.uint32();
|
|
58
|
+
break;
|
|
59
|
+
case 3:
|
|
60
|
+
message.leaves.push(exports.VoterTreeLeaf.decode(reader, reader.uint32()));
|
|
61
|
+
break;
|
|
62
|
+
case 4:
|
|
63
|
+
message.memberCount = reader.uint64();
|
|
64
|
+
break;
|
|
65
|
+
case 5:
|
|
66
|
+
message.memberWeight = reader.string();
|
|
67
|
+
break;
|
|
68
|
+
default:
|
|
69
|
+
reader.skipType(tag & 7);
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return message;
|
|
74
|
+
},
|
|
75
|
+
fromPartial(object) {
|
|
76
|
+
const message = createBaseVoterTree();
|
|
77
|
+
message.root = object.root ?? new Uint8Array();
|
|
78
|
+
message.depth = object.depth ?? 0;
|
|
79
|
+
message.leaves = object.leaves?.map(e => exports.VoterTreeLeaf.fromPartial(e)) || [];
|
|
80
|
+
message.memberCount = object.memberCount !== undefined && object.memberCount !== null ? BigInt(object.memberCount.toString()) : BigInt(0);
|
|
81
|
+
message.memberWeight = object.memberWeight ?? "";
|
|
82
|
+
return message;
|
|
83
|
+
},
|
|
84
|
+
fromAmino(object) {
|
|
85
|
+
const message = createBaseVoterTree();
|
|
86
|
+
if (object.root !== undefined && object.root !== null) {
|
|
87
|
+
message.root = (0, helpers_1.bytesFromBase64)(object.root);
|
|
88
|
+
}
|
|
89
|
+
if (object.depth !== undefined && object.depth !== null) {
|
|
90
|
+
message.depth = object.depth;
|
|
91
|
+
}
|
|
92
|
+
message.leaves = object.leaves?.map(e => exports.VoterTreeLeaf.fromAmino(e)) || [];
|
|
93
|
+
if (object.member_count !== undefined && object.member_count !== null) {
|
|
94
|
+
message.memberCount = BigInt(object.member_count);
|
|
95
|
+
}
|
|
96
|
+
if (object.member_weight !== undefined && object.member_weight !== null) {
|
|
97
|
+
message.memberWeight = object.member_weight;
|
|
98
|
+
}
|
|
99
|
+
return message;
|
|
100
|
+
},
|
|
101
|
+
toAmino(message) {
|
|
102
|
+
const obj = {};
|
|
103
|
+
obj.root = message.root ? (0, helpers_1.base64FromBytes)(message.root) : undefined;
|
|
104
|
+
obj.depth = message.depth === 0 ? undefined : message.depth;
|
|
105
|
+
if (message.leaves) {
|
|
106
|
+
obj.leaves = message.leaves.map(e => e ? exports.VoterTreeLeaf.toAmino(e) : undefined);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
obj.leaves = message.leaves;
|
|
110
|
+
}
|
|
111
|
+
obj.member_count = message.memberCount !== BigInt(0) ? message.memberCount?.toString() : undefined;
|
|
112
|
+
obj.member_weight = message.memberWeight === "" ? undefined : message.memberWeight;
|
|
113
|
+
return obj;
|
|
114
|
+
},
|
|
115
|
+
fromAminoMsg(object) {
|
|
116
|
+
return exports.VoterTree.fromAmino(object.value);
|
|
117
|
+
},
|
|
118
|
+
fromProtoMsg(message) {
|
|
119
|
+
return exports.VoterTree.decode(message.value);
|
|
120
|
+
},
|
|
121
|
+
toProto(message) {
|
|
122
|
+
return exports.VoterTree.encode(message).finish();
|
|
123
|
+
},
|
|
124
|
+
toProtoMsg(message) {
|
|
125
|
+
return {
|
|
126
|
+
typeUrl: "/sparkdream.commons.v1.VoterTree",
|
|
127
|
+
value: exports.VoterTree.encode(message).finish()
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
function createBaseVoterTreeLeaf() {
|
|
132
|
+
return {
|
|
133
|
+
index: BigInt(0),
|
|
134
|
+
hash: new Uint8Array()
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* VoterTreeLeaf is one occupied leaf slot.
|
|
139
|
+
* @name VoterTreeLeaf
|
|
140
|
+
* @package sparkdream.commons.v1
|
|
141
|
+
* @see proto type: sparkdream.commons.v1.VoterTreeLeaf
|
|
142
|
+
*/
|
|
143
|
+
exports.VoterTreeLeaf = {
|
|
144
|
+
typeUrl: "/sparkdream.commons.v1.VoterTreeLeaf",
|
|
145
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
146
|
+
if (message.index !== BigInt(0)) {
|
|
147
|
+
writer.uint32(8).uint64(message.index);
|
|
148
|
+
}
|
|
149
|
+
if (message.hash.length !== 0) {
|
|
150
|
+
writer.uint32(18).bytes(message.hash);
|
|
151
|
+
}
|
|
152
|
+
return writer;
|
|
153
|
+
},
|
|
154
|
+
decode(input, length) {
|
|
155
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
156
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
157
|
+
const message = createBaseVoterTreeLeaf();
|
|
158
|
+
while (reader.pos < end) {
|
|
159
|
+
const tag = reader.uint32();
|
|
160
|
+
switch (tag >>> 3) {
|
|
161
|
+
case 1:
|
|
162
|
+
message.index = reader.uint64();
|
|
163
|
+
break;
|
|
164
|
+
case 2:
|
|
165
|
+
message.hash = reader.bytes();
|
|
166
|
+
break;
|
|
167
|
+
default:
|
|
168
|
+
reader.skipType(tag & 7);
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return message;
|
|
173
|
+
},
|
|
174
|
+
fromPartial(object) {
|
|
175
|
+
const message = createBaseVoterTreeLeaf();
|
|
176
|
+
message.index = object.index !== undefined && object.index !== null ? BigInt(object.index.toString()) : BigInt(0);
|
|
177
|
+
message.hash = object.hash ?? new Uint8Array();
|
|
178
|
+
return message;
|
|
179
|
+
},
|
|
180
|
+
fromAmino(object) {
|
|
181
|
+
const message = createBaseVoterTreeLeaf();
|
|
182
|
+
if (object.index !== undefined && object.index !== null) {
|
|
183
|
+
message.index = BigInt(object.index);
|
|
184
|
+
}
|
|
185
|
+
if (object.hash !== undefined && object.hash !== null) {
|
|
186
|
+
message.hash = (0, helpers_1.bytesFromBase64)(object.hash);
|
|
187
|
+
}
|
|
188
|
+
return message;
|
|
189
|
+
},
|
|
190
|
+
toAmino(message) {
|
|
191
|
+
const obj = {};
|
|
192
|
+
obj.index = message.index !== BigInt(0) ? message.index?.toString() : undefined;
|
|
193
|
+
obj.hash = message.hash ? (0, helpers_1.base64FromBytes)(message.hash) : undefined;
|
|
194
|
+
return obj;
|
|
195
|
+
},
|
|
196
|
+
fromAminoMsg(object) {
|
|
197
|
+
return exports.VoterTreeLeaf.fromAmino(object.value);
|
|
198
|
+
},
|
|
199
|
+
fromProtoMsg(message) {
|
|
200
|
+
return exports.VoterTreeLeaf.decode(message.value);
|
|
201
|
+
},
|
|
202
|
+
toProto(message) {
|
|
203
|
+
return exports.VoterTreeLeaf.encode(message).finish();
|
|
204
|
+
},
|
|
205
|
+
toProtoMsg(message) {
|
|
206
|
+
return {
|
|
207
|
+
typeUrl: "/sparkdream.commons.v1.VoterTreeLeaf",
|
|
208
|
+
value: exports.VoterTreeLeaf.encode(message).finish()
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
};
|