@sparkdreamnft/sparkdreamjs 0.0.7 → 0.0.9
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/cosmos/bundle.d.ts +160 -160
- package/cosmos/bundle.js +182 -182
- package/esm/cosmos/bundle.js +182 -182
- package/esm/ibc/bundle.js +106 -106
- package/esm/sparkdream/blog/v1/genesis.js +87 -1
- package/esm/sparkdream/blog/v1/params.js +433 -5
- package/esm/sparkdream/blog/v1/post.js +205 -2
- package/esm/sparkdream/blog/v1/query.js +1363 -0
- package/esm/sparkdream/blog/v1/query.lcd.js +105 -2
- package/esm/sparkdream/blog/v1/query.rpc.Query.js +75 -3
- package/esm/sparkdream/blog/v1/tx.amino.js +61 -1
- package/esm/sparkdream/blog/v1/tx.js +1861 -3
- package/esm/sparkdream/blog/v1/tx.registry.js +218 -2
- package/esm/sparkdream/blog/v1/tx.rpc.msg.js +77 -4
- package/esm/sparkdream/blog/v1/types.js +809 -0
- package/esm/sparkdream/bundle.js +585 -36
- package/esm/sparkdream/client.js +41 -2
- package/esm/sparkdream/collect/module/v1/module.js +71 -0
- package/esm/sparkdream/collect/v1/genesis.js +271 -0
- package/esm/sparkdream/collect/v1/params.js +763 -0
- package/esm/sparkdream/collect/v1/query.js +3790 -0
- package/esm/sparkdream/collect/v1/query.lcd.js +223 -0
- package/esm/sparkdream/collect/v1/query.rpc.Query.js +252 -0
- package/esm/sparkdream/collect/v1/tx.amino.js +149 -0
- package/esm/sparkdream/collect/v1/tx.js +4767 -0
- package/esm/sparkdream/collect/v1/tx.registry.js +537 -0
- package/esm/sparkdream/collect/v1/tx.rpc.msg.js +185 -0
- package/esm/sparkdream/collect/v1/types.js +3434 -0
- package/esm/sparkdream/common/v1/content_type.js +96 -0
- package/esm/sparkdream/common/v1/flag_record.js +119 -0
- package/esm/sparkdream/common/v1/moderation_reason.js +115 -0
- package/esm/sparkdream/commons/module/v1/module.js +71 -0
- package/esm/sparkdream/commons/v1/category.js +121 -0
- package/esm/sparkdream/commons/v1/genesis.js +561 -0
- package/esm/sparkdream/commons/v1/group.js +1116 -0
- package/esm/sparkdream/commons/v1/params.js +78 -0
- package/esm/sparkdream/commons/v1/policy_permissions.js +86 -0
- package/esm/sparkdream/commons/v1/query.js +1629 -0
- package/esm/sparkdream/commons/v1/query.lcd.js +96 -0
- package/esm/sparkdream/commons/v1/query.rpc.Query.js +120 -0
- package/esm/sparkdream/commons/v1/tx.amino.js +99 -0
- package/esm/sparkdream/commons/v1/tx.js +3475 -0
- package/esm/sparkdream/commons/v1/tx.registry.js +357 -0
- package/esm/sparkdream/commons/v1/tx.rpc.msg.js +129 -0
- package/esm/sparkdream/ecosystem/module/v1/module.js +71 -0
- package/esm/sparkdream/ecosystem/v1/genesis.js +72 -0
- package/esm/sparkdream/ecosystem/v1/params.js +65 -0
- package/esm/sparkdream/ecosystem/v1/query.js +128 -0
- package/esm/sparkdream/ecosystem/v1/query.lcd.js +11 -0
- package/esm/sparkdream/ecosystem/v1/query.rpc.Query.js +24 -0
- package/esm/sparkdream/ecosystem/v1/tx.amino.js +14 -0
- package/esm/sparkdream/ecosystem/v1/tx.js +308 -0
- package/esm/sparkdream/ecosystem/v1/tx.registry.js +51 -0
- package/esm/sparkdream/ecosystem/v1/tx.rpc.msg.js +24 -0
- package/esm/sparkdream/federation/module/v1/module.js +71 -0
- package/esm/sparkdream/federation/v1/genesis.js +244 -0
- package/esm/sparkdream/federation/v1/packet.js +810 -0
- package/esm/sparkdream/federation/v1/params.js +789 -0
- package/esm/sparkdream/federation/v1/query.js +2629 -0
- package/esm/sparkdream/federation/v1/query.lcd.js +152 -0
- package/esm/sparkdream/federation/v1/query.rpc.Query.js +189 -0
- package/esm/sparkdream/federation/v1/tx.amino.js +139 -0
- package/esm/sparkdream/federation/v1/tx.js +4199 -0
- package/esm/sparkdream/federation/v1/tx.registry.js +501 -0
- package/esm/sparkdream/federation/v1/tx.rpc.msg.js +173 -0
- package/esm/sparkdream/federation/v1/types.js +2571 -0
- package/esm/sparkdream/forum/module/v1/module.js +71 -0
- package/esm/sparkdream/forum/v1/archive_metadata.js +119 -0
- package/esm/sparkdream/forum/v1/bounty.js +183 -0
- package/esm/sparkdream/forum/v1/genesis.js +292 -0
- package/esm/sparkdream/forum/v1/hide_record.js +154 -0
- package/esm/sparkdream/forum/v1/params.js +867 -0
- package/esm/sparkdream/forum/v1/post.js +397 -0
- package/esm/sparkdream/forum/v1/post_flag.js +254 -0
- package/esm/sparkdream/forum/v1/query.js +7167 -0
- package/esm/sparkdream/forum/v1/query.lcd.js +420 -0
- package/esm/sparkdream/forum/v1/query.rpc.Query.js +461 -0
- package/esm/sparkdream/forum/v1/sentinel_activity.js +397 -0
- package/esm/sparkdream/forum/v1/thread_follow.js +95 -0
- package/esm/sparkdream/forum/v1/thread_follow_count.js +83 -0
- package/esm/sparkdream/forum/v1/thread_lock_record.js +155 -0
- package/esm/sparkdream/forum/v1/thread_metadata.js +184 -0
- package/esm/sparkdream/forum/v1/thread_move_record.js +179 -0
- package/esm/sparkdream/forum/v1/tx.amino.js +179 -0
- package/esm/sparkdream/forum/v1/tx.js +5169 -0
- package/esm/sparkdream/forum/v1/tx.registry.js +645 -0
- package/esm/sparkdream/forum/v1/tx.rpc.msg.js +223 -0
- package/esm/sparkdream/forum/v1/types.js +542 -0
- package/esm/sparkdream/forum/v1/user_rate_limit.js +119 -0
- package/esm/sparkdream/forum/v1/user_reaction_limit.js +107 -0
- package/esm/sparkdream/futarchy/module/v1/module.js +71 -0
- package/esm/sparkdream/futarchy/v1/genesis.js +88 -0
- package/esm/sparkdream/futarchy/v1/market.js +240 -0
- package/esm/sparkdream/futarchy/v1/params.js +241 -0
- package/esm/sparkdream/futarchy/v1/query.js +596 -0
- package/esm/sparkdream/futarchy/v1/query.lcd.js +45 -0
- package/esm/sparkdream/futarchy/v1/query.rpc.Query.js +53 -0
- package/esm/sparkdream/futarchy/v1/tx.amino.js +39 -0
- package/esm/sparkdream/futarchy/v1/tx.js +1097 -0
- package/esm/sparkdream/futarchy/v1/tx.registry.js +141 -0
- package/esm/sparkdream/futarchy/v1/tx.rpc.msg.js +55 -0
- package/esm/sparkdream/lcd.js +65 -0
- package/esm/sparkdream/name/module/v1/module.js +71 -0
- package/esm/sparkdream/name/v1/dispute.js +341 -0
- package/esm/sparkdream/name/v1/genesis.js +120 -0
- package/esm/sparkdream/name/v1/name_record.js +95 -0
- package/esm/sparkdream/name/v1/owner_info.js +95 -0
- package/esm/sparkdream/name/v1/params.js +306 -0
- package/esm/sparkdream/name/v1/query.js +863 -0
- package/esm/sparkdream/name/v1/query.lcd.js +52 -0
- package/esm/sparkdream/name/v1/query.rpc.Query.js +71 -0
- package/esm/sparkdream/name/v1/tx.amino.js +44 -0
- package/esm/sparkdream/name/v1/tx.js +1222 -0
- package/esm/sparkdream/name/v1/tx.registry.js +159 -0
- package/esm/sparkdream/name/v1/tx.rpc.msg.js +62 -0
- package/esm/sparkdream/rep/module/v1/module.js +71 -0
- package/esm/sparkdream/rep/v1/accountability.js +172 -0
- package/esm/sparkdream/rep/v1/challenge.js +226 -0
- package/esm/sparkdream/rep/v1/content_challenge.js +303 -0
- package/esm/sparkdream/rep/v1/genesis.js +689 -0
- package/esm/sparkdream/rep/v1/gov_action_appeal.js +202 -0
- package/esm/sparkdream/rep/v1/initiative.js +558 -0
- package/esm/sparkdream/rep/v1/interim.js +426 -0
- package/esm/sparkdream/rep/v1/interim_template.js +291 -0
- package/esm/sparkdream/rep/v1/invitation.js +251 -0
- package/esm/sparkdream/rep/v1/jury_participation.js +131 -0
- package/esm/sparkdream/rep/v1/jury_review.js +635 -0
- package/esm/sparkdream/rep/v1/member.js +881 -0
- package/esm/sparkdream/rep/v1/member_report.js +219 -0
- package/esm/sparkdream/rep/v1/member_warning.js +156 -0
- package/esm/sparkdream/rep/v1/params.js +2347 -0
- package/esm/sparkdream/rep/v1/project.js +557 -0
- package/esm/sparkdream/rep/v1/query.js +12156 -0
- package/esm/sparkdream/rep/v1/query.lcd.js +663 -0
- package/esm/sparkdream/rep/v1/query.rpc.Query.js +756 -0
- package/esm/sparkdream/rep/v1/reserved_tag.js +96 -0
- package/esm/sparkdream/rep/v1/sentinel_activity.js +214 -0
- package/esm/sparkdream/rep/v1/stake.js +575 -0
- package/esm/sparkdream/rep/v1/tag.js +120 -0
- package/esm/sparkdream/rep/v1/tag_budget.js +143 -0
- package/esm/sparkdream/rep/v1/tag_budget_award.js +155 -0
- package/esm/sparkdream/rep/v1/tag_report.js +122 -0
- package/esm/sparkdream/rep/v1/tx.amino.js +239 -0
- package/esm/sparkdream/rep/v1/tx.js +7637 -0
- package/esm/sparkdream/rep/v1/tx.registry.js +861 -0
- package/esm/sparkdream/rep/v1/tx.rpc.msg.js +300 -0
- package/esm/sparkdream/reveal/module/v1/module.js +71 -0
- package/esm/sparkdream/reveal/v1/genesis.js +142 -0
- package/esm/sparkdream/reveal/v1/params.js +235 -0
- package/esm/sparkdream/reveal/v1/query.js +1700 -0
- package/esm/sparkdream/reveal/v1/query.lcd.js +101 -0
- package/esm/sparkdream/reveal/v1/query.rpc.Query.js +116 -0
- package/esm/sparkdream/reveal/v1/tx.amino.js +54 -0
- package/esm/sparkdream/reveal/v1/tx.js +1699 -0
- package/esm/sparkdream/reveal/v1/tx.registry.js +195 -0
- package/esm/sparkdream/reveal/v1/tx.rpc.msg.js +72 -0
- package/esm/sparkdream/reveal/v1/types.js +1141 -0
- package/esm/sparkdream/rpc.query.js +39 -0
- package/esm/sparkdream/rpc.tx.js +39 -0
- package/esm/sparkdream/season/module/v1/module.js +71 -0
- package/esm/sparkdream/season/v1/achievement.js +142 -0
- package/esm/sparkdream/season/v1/display_name_appeal_stake.js +95 -0
- package/esm/sparkdream/season/v1/display_name_moderation.js +155 -0
- package/esm/sparkdream/season/v1/display_name_report_stake.js +95 -0
- package/esm/sparkdream/season/v1/enums.js +391 -0
- package/esm/sparkdream/season/v1/epoch_xp_tracker.js +119 -0
- package/esm/sparkdream/season/v1/forum_xp_cooldown.js +83 -0
- package/esm/sparkdream/season/v1/genesis.js +482 -0
- package/esm/sparkdream/season/v1/guild.js +172 -0
- package/esm/sparkdream/season/v1/guild_invite.js +107 -0
- package/esm/sparkdream/season/v1/guild_membership.js +119 -0
- package/esm/sparkdream/season/v1/member_profile.js +296 -0
- package/esm/sparkdream/season/v1/member_quest_progress.js +132 -0
- package/esm/sparkdream/season/v1/member_registration.js +83 -0
- package/esm/sparkdream/season/v1/member_season_snapshot.js +238 -0
- package/esm/sparkdream/season/v1/next_season_info.js +83 -0
- package/esm/sparkdream/season/v1/nomination.js +428 -0
- package/esm/sparkdream/season/v1/params.js +1645 -0
- package/esm/sparkdream/season/v1/query.js +10569 -0
- package/esm/sparkdream/season/v1/query.lcd.js +598 -0
- package/esm/sparkdream/season/v1/query.rpc.Query.js +673 -0
- package/esm/sparkdream/season/v1/quest.js +334 -0
- package/esm/sparkdream/season/v1/season.js +166 -0
- package/esm/sparkdream/season/v1/season_snapshot.js +83 -0
- package/esm/sparkdream/season/v1/season_title_eligibility.js +194 -0
- package/esm/sparkdream/season/v1/season_transition_state.js +130 -0
- package/esm/sparkdream/season/v1/title.js +154 -0
- package/esm/sparkdream/season/v1/transition_recovery_state.js +118 -0
- package/esm/sparkdream/season/v1/tx.amino.js +219 -0
- package/esm/sparkdream/season/v1/tx.js +6823 -0
- package/esm/sparkdream/season/v1/tx.registry.js +789 -0
- package/esm/sparkdream/season/v1/tx.rpc.msg.js +272 -0
- package/esm/sparkdream/season/v1/vote_xp_record.js +83 -0
- package/esm/sparkdream/session/module/v1/module.js +71 -0
- package/esm/sparkdream/session/v1/genesis.js +88 -0
- package/esm/sparkdream/session/v1/params.js +275 -0
- package/esm/sparkdream/session/v1/query.js +743 -0
- package/esm/sparkdream/session/v1/query.lcd.js +45 -0
- package/esm/sparkdream/session/v1/query.rpc.Query.js +60 -0
- package/esm/sparkdream/session/v1/session.js +185 -0
- package/esm/sparkdream/session/v1/tx.amino.js +29 -0
- package/esm/sparkdream/session/v1/tx.js +768 -0
- package/esm/sparkdream/session/v1/tx.registry.js +105 -0
- package/esm/sparkdream/session/v1/tx.rpc.msg.js +43 -0
- package/esm/sparkdream/shield/module/v1/module.js +71 -0
- package/esm/sparkdream/shield/v1/genesis.js +301 -0
- package/esm/sparkdream/shield/v1/params.js +282 -0
- package/esm/sparkdream/shield/v1/query.js +2323 -0
- package/esm/sparkdream/shield/v1/query.lcd.js +110 -0
- package/esm/sparkdream/shield/v1/query.rpc.Query.js +170 -0
- package/esm/sparkdream/shield/v1/tx.amino.js +29 -0
- package/esm/sparkdream/shield/v1/tx.js +838 -0
- package/esm/sparkdream/shield/v1/tx.registry.js +105 -0
- package/esm/sparkdream/shield/v1/tx.rpc.msg.js +43 -0
- package/esm/sparkdream/shield/v1/types.js +2427 -0
- package/esm/sparkdream/split/module/v1/module.js +71 -0
- package/esm/sparkdream/split/v1/genesis.js +88 -0
- package/esm/sparkdream/split/v1/params.js +65 -0
- package/esm/sparkdream/split/v1/query.js +421 -0
- package/esm/sparkdream/split/v1/query.lcd.js +31 -0
- package/esm/sparkdream/split/v1/query.rpc.Query.js +44 -0
- package/esm/sparkdream/split/v1/share.js +83 -0
- package/esm/sparkdream/split/v1/tx.amino.js +9 -0
- package/esm/sparkdream/split/v1/tx.js +148 -0
- package/esm/sparkdream/split/v1/tx.registry.js +33 -0
- package/esm/sparkdream/split/v1/tx.rpc.msg.js +18 -0
- package/esm/tendermint/bundle.js +20 -20
- package/ibc/bundle.d.ts +90 -90
- package/ibc/bundle.js +106 -106
- package/package.json +1 -1
- package/sparkdream/blog/v1/genesis.d.ts +50 -0
- package/sparkdream/blog/v1/genesis.js +87 -1
- package/sparkdream/blog/v1/params.d.ts +292 -4
- package/sparkdream/blog/v1/params.js +434 -6
- package/sparkdream/blog/v1/post.d.ts +162 -0
- package/sparkdream/blog/v1/post.js +205 -2
- package/sparkdream/blog/v1/query.d.ts +751 -0
- package/sparkdream/blog/v1/query.js +1364 -1
- package/sparkdream/blog/v1/query.lcd.d.ts +9 -1
- package/sparkdream/blog/v1/query.lcd.js +105 -2
- package/sparkdream/blog/v1/query.rpc.Query.d.ts +35 -3
- package/sparkdream/blog/v1/query.rpc.Query.js +74 -2
- package/sparkdream/blog/v1/tx.amino.d.ts +61 -1
- package/sparkdream/blog/v1/tx.amino.js +60 -0
- package/sparkdream/blog/v1/tx.d.ts +1155 -1
- package/sparkdream/blog/v1/tx.js +1861 -3
- package/sparkdream/blog/v1/tx.registry.d.ts +145 -1
- package/sparkdream/blog/v1/tx.registry.js +217 -1
- package/sparkdream/blog/v1/tx.rpc.msg.d.ts +43 -4
- package/sparkdream/blog/v1/tx.rpc.msg.js +76 -3
- package/sparkdream/blog/v1/types.d.ts +463 -0
- package/sparkdream/blog/v1/types.js +818 -0
- package/sparkdream/bundle.d.ts +21937 -226
- package/sparkdream/bundle.js +585 -36
- package/sparkdream/client.d.ts +1250 -0
- package/sparkdream/client.js +41 -2
- package/sparkdream/collect/module/v1/module.d.ts +54 -0
- package/sparkdream/collect/module/v1/module.js +74 -0
- package/sparkdream/collect/v1/genesis.d.ts +82 -0
- package/sparkdream/collect/v1/genesis.js +274 -0
- package/sparkdream/collect/v1/params.d.ts +240 -0
- package/sparkdream/collect/v1/params.js +766 -0
- package/sparkdream/collect/v1/query.d.ts +2157 -0
- package/sparkdream/collect/v1/query.js +3793 -0
- package/sparkdream/collect/v1/query.lcd.d.ts +33 -0
- package/sparkdream/collect/v1/query.lcd.js +227 -0
- package/sparkdream/collect/v1/query.rpc.Query.d.ts +101 -0
- package/sparkdream/collect/v1/query.rpc.Query.js +257 -0
- package/sparkdream/collect/v1/tx.amino.d.ts +148 -0
- package/sparkdream/collect/v1/tx.amino.js +152 -0
- package/sparkdream/collect/v1/tx.d.ts +2581 -0
- package/sparkdream/collect/v1/tx.js +4771 -0
- package/sparkdream/collect/v1/tx.registry.d.ts +361 -0
- package/sparkdream/collect/v1/tx.registry.js +541 -0
- package/sparkdream/collect/v1/tx.rpc.msg.d.ts +76 -0
- package/sparkdream/collect/v1/tx.rpc.msg.js +190 -0
- package/sparkdream/collect/v1/types.d.ts +1205 -0
- package/sparkdream/collect/v1/types.js +3453 -0
- package/sparkdream/common/v1/content_type.d.ts +31 -0
- package/sparkdream/common/v1/content_type.js +101 -0
- package/sparkdream/common/v1/flag_record.d.ts +58 -0
- package/sparkdream/common/v1/flag_record.js +122 -0
- package/sparkdream/common/v1/moderation_reason.d.ts +35 -0
- package/sparkdream/common/v1/moderation_reason.js +120 -0
- package/sparkdream/commons/module/v1/module.d.ts +54 -0
- package/sparkdream/commons/module/v1/module.js +74 -0
- package/sparkdream/commons/v1/category.d.ts +60 -0
- package/sparkdream/commons/v1/category.js +124 -0
- package/sparkdream/commons/v1/genesis.d.ts +316 -0
- package/sparkdream/commons/v1/genesis.js +564 -0
- package/sparkdream/commons/v1/group.d.ts +529 -0
- package/sparkdream/commons/v1/group.js +1123 -0
- package/sparkdream/commons/v1/params.d.ts +48 -0
- package/sparkdream/commons/v1/params.js +81 -0
- package/sparkdream/commons/v1/policy_permissions.d.ts +48 -0
- package/sparkdream/commons/v1/policy_permissions.js +89 -0
- package/sparkdream/commons/v1/query.d.ts +1001 -0
- package/sparkdream/commons/v1/query.js +1632 -0
- package/sparkdream/commons/v1/query.lcd.d.ts +19 -0
- package/sparkdream/commons/v1/query.lcd.js +100 -0
- package/sparkdream/commons/v1/query.rpc.Query.d.ts +56 -0
- package/sparkdream/commons/v1/query.rpc.Query.js +125 -0
- package/sparkdream/commons/v1/tx.amino.d.ts +98 -0
- package/sparkdream/commons/v1/tx.amino.js +102 -0
- package/sparkdream/commons/v1/tx.d.ts +2028 -0
- package/sparkdream/commons/v1/tx.js +3478 -0
- package/sparkdream/commons/v1/tx.registry.d.ts +241 -0
- package/sparkdream/commons/v1/tx.registry.js +361 -0
- package/sparkdream/commons/v1/tx.rpc.msg.d.ts +79 -0
- package/sparkdream/commons/v1/tx.rpc.msg.js +134 -0
- package/sparkdream/ecosystem/module/v1/module.d.ts +54 -0
- package/sparkdream/ecosystem/module/v1/module.js +74 -0
- package/sparkdream/ecosystem/v1/genesis.d.ts +53 -0
- package/sparkdream/ecosystem/v1/genesis.js +75 -0
- package/sparkdream/ecosystem/v1/params.d.ts +46 -0
- package/sparkdream/ecosystem/v1/params.js +68 -0
- package/sparkdream/ecosystem/v1/query.d.ts +95 -0
- package/sparkdream/ecosystem/v1/query.js +131 -0
- package/sparkdream/ecosystem/v1/query.lcd.d.ts +9 -0
- package/sparkdream/ecosystem/v1/query.lcd.js +15 -0
- package/sparkdream/ecosystem/v1/query.rpc.Query.d.ts +16 -0
- package/sparkdream/ecosystem/v1/query.rpc.Query.js +29 -0
- package/sparkdream/ecosystem/v1/tx.amino.d.ts +13 -0
- package/sparkdream/ecosystem/v1/tx.amino.js +17 -0
- package/sparkdream/ecosystem/v1/tx.d.ts +201 -0
- package/sparkdream/ecosystem/v1/tx.js +311 -0
- package/sparkdream/ecosystem/v1/tx.registry.d.ts +37 -0
- package/sparkdream/ecosystem/v1/tx.registry.js +55 -0
- package/sparkdream/ecosystem/v1/tx.rpc.msg.d.ts +19 -0
- package/sparkdream/ecosystem/v1/tx.rpc.msg.js +29 -0
- package/sparkdream/federation/module/v1/module.d.ts +54 -0
- package/sparkdream/federation/module/v1/module.js +74 -0
- package/sparkdream/federation/v1/genesis.d.ts +78 -0
- package/sparkdream/federation/v1/genesis.js +247 -0
- package/sparkdream/federation/v1/packet.d.ts +397 -0
- package/sparkdream/federation/v1/packet.js +813 -0
- package/sparkdream/federation/v1/params.d.ts +272 -0
- package/sparkdream/federation/v1/params.js +792 -0
- package/sparkdream/federation/v1/query.d.ts +1541 -0
- package/sparkdream/federation/v1/query.js +2632 -0
- package/sparkdream/federation/v1/query.lcd.d.ts +26 -0
- package/sparkdream/federation/v1/query.lcd.js +156 -0
- package/sparkdream/federation/v1/query.rpc.Query.d.ts +66 -0
- package/sparkdream/federation/v1/query.rpc.Query.js +194 -0
- package/sparkdream/federation/v1/tx.amino.d.ts +138 -0
- package/sparkdream/federation/v1/tx.amino.js +142 -0
- package/sparkdream/federation/v1/tx.d.ts +2311 -0
- package/sparkdream/federation/v1/tx.js +4203 -0
- package/sparkdream/federation/v1/tx.registry.d.ts +337 -0
- package/sparkdream/federation/v1/tx.registry.js +505 -0
- package/sparkdream/federation/v1/tx.rpc.msg.d.ts +64 -0
- package/sparkdream/federation/v1/tx.rpc.msg.js +178 -0
- package/sparkdream/federation/v1/types.d.ts +906 -0
- package/sparkdream/federation/v1/types.js +2588 -0
- package/sparkdream/forum/module/v1/module.d.ts +54 -0
- package/sparkdream/forum/module/v1/module.js +74 -0
- package/sparkdream/forum/v1/archive_metadata.d.ts +54 -0
- package/sparkdream/forum/v1/archive_metadata.js +122 -0
- package/sparkdream/forum/v1/bounty.d.ts +65 -0
- package/sparkdream/forum/v1/bounty.js +186 -0
- package/sparkdream/forum/v1/genesis.d.ts +94 -0
- package/sparkdream/forum/v1/genesis.js +295 -0
- package/sparkdream/forum/v1/hide_record.d.ts +61 -0
- package/sparkdream/forum/v1/hide_record.js +157 -0
- package/sparkdream/forum/v1/params.d.ts +450 -0
- package/sparkdream/forum/v1/params.js +870 -0
- package/sparkdream/forum/v1/post.d.ts +102 -0
- package/sparkdream/forum/v1/post.js +400 -0
- package/sparkdream/forum/v1/post_flag.d.ts +106 -0
- package/sparkdream/forum/v1/post_flag.js +257 -0
- package/sparkdream/forum/v1/query.d.ts +4197 -0
- package/sparkdream/forum/v1/query.js +7171 -0
- package/sparkdream/forum/v1/query.lcd.d.ts +54 -0
- package/sparkdream/forum/v1/query.lcd.js +424 -0
- package/sparkdream/forum/v1/query.rpc.Query.d.ts +196 -0
- package/sparkdream/forum/v1/query.rpc.Query.js +466 -0
- package/sparkdream/forum/v1/sentinel_activity.d.ts +106 -0
- package/sparkdream/forum/v1/sentinel_activity.js +400 -0
- package/sparkdream/forum/v1/thread_follow.d.ts +50 -0
- package/sparkdream/forum/v1/thread_follow.js +98 -0
- package/sparkdream/forum/v1/thread_follow_count.d.ts +48 -0
- package/sparkdream/forum/v1/thread_follow_count.js +86 -0
- package/sparkdream/forum/v1/thread_lock_record.d.ts +60 -0
- package/sparkdream/forum/v1/thread_lock_record.js +158 -0
- package/sparkdream/forum/v1/thread_metadata.d.ts +63 -0
- package/sparkdream/forum/v1/thread_metadata.js +187 -0
- package/sparkdream/forum/v1/thread_move_record.d.ts +64 -0
- package/sparkdream/forum/v1/thread_move_record.js +182 -0
- package/sparkdream/forum/v1/tx.amino.d.ts +178 -0
- package/sparkdream/forum/v1/tx.amino.js +182 -0
- package/sparkdream/forum/v1/tx.d.ts +3191 -0
- package/sparkdream/forum/v1/tx.js +5173 -0
- package/sparkdream/forum/v1/tx.registry.d.ts +433 -0
- package/sparkdream/forum/v1/tx.registry.js +649 -0
- package/sparkdream/forum/v1/tx.rpc.msg.d.ts +121 -0
- package/sparkdream/forum/v1/tx.rpc.msg.js +228 -0
- package/sparkdream/forum/v1/types.d.ts +171 -0
- package/sparkdream/forum/v1/types.js +553 -0
- package/sparkdream/forum/v1/user_rate_limit.d.ts +54 -0
- package/sparkdream/forum/v1/user_rate_limit.js +122 -0
- package/sparkdream/forum/v1/user_reaction_limit.d.ts +52 -0
- package/sparkdream/forum/v1/user_reaction_limit.js +110 -0
- package/sparkdream/futarchy/module/v1/module.d.ts +54 -0
- package/sparkdream/futarchy/module/v1/module.js +74 -0
- package/sparkdream/futarchy/v1/genesis.d.ts +56 -0
- package/sparkdream/futarchy/v1/genesis.js +91 -0
- package/sparkdream/futarchy/v1/market.d.ts +104 -0
- package/sparkdream/futarchy/v1/market.js +243 -0
- package/sparkdream/futarchy/v1/params.d.ts +171 -0
- package/sparkdream/futarchy/v1/params.js +244 -0
- package/sparkdream/futarchy/v1/query.d.ts +381 -0
- package/sparkdream/futarchy/v1/query.js +599 -0
- package/sparkdream/futarchy/v1/query.lcd.d.ts +12 -0
- package/sparkdream/futarchy/v1/query.lcd.js +49 -0
- package/sparkdream/futarchy/v1/query.rpc.Query.d.ts +28 -0
- package/sparkdream/futarchy/v1/query.rpc.Query.js +58 -0
- package/sparkdream/futarchy/v1/tx.amino.d.ts +38 -0
- package/sparkdream/futarchy/v1/tx.amino.js +42 -0
- package/sparkdream/futarchy/v1/tx.d.ts +688 -0
- package/sparkdream/futarchy/v1/tx.js +1100 -0
- package/sparkdream/futarchy/v1/tx.registry.d.ts +97 -0
- package/sparkdream/futarchy/v1/tx.registry.js +145 -0
- package/sparkdream/futarchy/v1/tx.rpc.msg.d.ts +37 -0
- package/sparkdream/futarchy/v1/tx.rpc.msg.js +60 -0
- package/sparkdream/lcd.d.ts +39 -0
- package/sparkdream/lcd.js +65 -0
- package/sparkdream/name/module/v1/module.d.ts +54 -0
- package/sparkdream/name/module/v1/module.js +74 -0
- package/sparkdream/name/v1/dispute.d.ts +216 -0
- package/sparkdream/name/v1/dispute.js +344 -0
- package/sparkdream/name/v1/genesis.d.ts +62 -0
- package/sparkdream/name/v1/genesis.js +123 -0
- package/sparkdream/name/v1/name_record.d.ts +50 -0
- package/sparkdream/name/v1/name_record.js +98 -0
- package/sparkdream/name/v1/owner_info.d.ts +50 -0
- package/sparkdream/name/v1/owner_info.js +98 -0
- package/sparkdream/name/v1/params.d.ts +165 -0
- package/sparkdream/name/v1/params.js +309 -0
- package/sparkdream/name/v1/query.d.ts +544 -0
- package/sparkdream/name/v1/query.js +866 -0
- package/sparkdream/name/v1/query.lcd.d.ts +14 -0
- package/sparkdream/name/v1/query.lcd.js +56 -0
- package/sparkdream/name/v1/query.rpc.Query.d.ts +36 -0
- package/sparkdream/name/v1/query.rpc.Query.js +76 -0
- package/sparkdream/name/v1/tx.amino.d.ts +43 -0
- package/sparkdream/name/v1/tx.amino.js +47 -0
- package/sparkdream/name/v1/tx.d.ts +804 -0
- package/sparkdream/name/v1/tx.js +1225 -0
- package/sparkdream/name/v1/tx.registry.d.ts +109 -0
- package/sparkdream/name/v1/tx.registry.js +163 -0
- package/sparkdream/name/v1/tx.rpc.msg.d.ts +43 -0
- package/sparkdream/name/v1/tx.rpc.msg.js +67 -0
- package/sparkdream/rep/module/v1/module.d.ts +54 -0
- package/sparkdream/rep/module/v1/module.js +74 -0
- package/sparkdream/rep/v1/accountability.d.ts +39 -0
- package/sparkdream/rep/v1/accountability.js +181 -0
- package/sparkdream/rep/v1/challenge.d.ts +74 -0
- package/sparkdream/rep/v1/challenge.js +231 -0
- package/sparkdream/rep/v1/content_challenge.d.ts +154 -0
- package/sparkdream/rep/v1/content_challenge.js +308 -0
- package/sparkdream/rep/v1/genesis.d.ts +253 -0
- package/sparkdream/rep/v1/genesis.js +692 -0
- package/sparkdream/rep/v1/gov_action_appeal.d.ts +69 -0
- package/sparkdream/rep/v1/gov_action_appeal.js +205 -0
- package/sparkdream/rep/v1/initiative.d.ts +140 -0
- package/sparkdream/rep/v1/initiative.js +567 -0
- package/sparkdream/rep/v1/interim.d.ts +163 -0
- package/sparkdream/rep/v1/interim.js +435 -0
- package/sparkdream/rep/v1/interim_template.d.ts +114 -0
- package/sparkdream/rep/v1/interim_template.js +296 -0
- package/sparkdream/rep/v1/invitation.d.ts +78 -0
- package/sparkdream/rep/v1/invitation.js +256 -0
- package/sparkdream/rep/v1/jury_participation.d.ts +56 -0
- package/sparkdream/rep/v1/jury_participation.js +134 -0
- package/sparkdream/rep/v1/jury_review.d.ts +235 -0
- package/sparkdream/rep/v1/jury_review.js +640 -0
- package/sparkdream/rep/v1/member.d.ts +424 -0
- package/sparkdream/rep/v1/member.js +888 -0
- package/sparkdream/rep/v1/member_report.d.ts +67 -0
- package/sparkdream/rep/v1/member_report.js +222 -0
- package/sparkdream/rep/v1/member_warning.d.ts +58 -0
- package/sparkdream/rep/v1/member_warning.js +159 -0
- package/sparkdream/rep/v1/params.d.ts +1074 -0
- package/sparkdream/rep/v1/params.js +2350 -0
- package/sparkdream/rep/v1/project.d.ts +172 -0
- package/sparkdream/rep/v1/project.js +566 -0
- package/sparkdream/rep/v1/query.d.ts +7098 -0
- package/sparkdream/rep/v1/query.js +12162 -0
- package/sparkdream/rep/v1/query.lcd.d.ts +85 -0
- package/sparkdream/rep/v1/query.lcd.js +667 -0
- package/sparkdream/rep/v1/query.rpc.Query.d.ts +320 -0
- package/sparkdream/rep/v1/query.rpc.Query.js +761 -0
- package/sparkdream/rep/v1/reserved_tag.d.ts +53 -0
- package/sparkdream/rep/v1/reserved_tag.js +99 -0
- package/sparkdream/rep/v1/sentinel_activity.d.ts +79 -0
- package/sparkdream/rep/v1/sentinel_activity.js +219 -0
- package/sparkdream/rep/v1/stake.d.ts +266 -0
- package/sparkdream/rep/v1/stake.js +580 -0
- package/sparkdream/rep/v1/tag.d.ts +57 -0
- package/sparkdream/rep/v1/tag.js +123 -0
- package/sparkdream/rep/v1/tag_budget.d.ts +58 -0
- package/sparkdream/rep/v1/tag_budget.js +146 -0
- package/sparkdream/rep/v1/tag_budget_award.d.ts +60 -0
- package/sparkdream/rep/v1/tag_budget_award.js +158 -0
- package/sparkdream/rep/v1/tag_report.d.ts +54 -0
- package/sparkdream/rep/v1/tag_report.js +125 -0
- package/sparkdream/rep/v1/tx.amino.d.ts +238 -0
- package/sparkdream/rep/v1/tx.amino.js +242 -0
- package/sparkdream/rep/v1/tx.d.ts +4407 -0
- package/sparkdream/rep/v1/tx.js +7643 -0
- package/sparkdream/rep/v1/tx.registry.d.ts +577 -0
- package/sparkdream/rep/v1/tx.registry.js +865 -0
- package/sparkdream/rep/v1/tx.rpc.msg.d.ts +170 -0
- package/sparkdream/rep/v1/tx.rpc.msg.js +305 -0
- package/sparkdream/reveal/module/v1/module.d.ts +54 -0
- package/sparkdream/reveal/module/v1/module.js +74 -0
- package/sparkdream/reveal/v1/genesis.d.ts +64 -0
- package/sparkdream/reveal/v1/genesis.js +145 -0
- package/sparkdream/reveal/v1/params.d.ts +140 -0
- package/sparkdream/reveal/v1/params.js +238 -0
- package/sparkdream/reveal/v1/query.d.ts +949 -0
- package/sparkdream/reveal/v1/query.js +1703 -0
- package/sparkdream/reveal/v1/query.lcd.d.ts +19 -0
- package/sparkdream/reveal/v1/query.lcd.js +105 -0
- package/sparkdream/reveal/v1/query.rpc.Query.d.ts +56 -0
- package/sparkdream/reveal/v1/query.rpc.Query.js +121 -0
- package/sparkdream/reveal/v1/tx.amino.d.ts +53 -0
- package/sparkdream/reveal/v1/tx.amino.js +57 -0
- package/sparkdream/reveal/v1/tx.d.ts +1043 -0
- package/sparkdream/reveal/v1/tx.js +1702 -0
- package/sparkdream/reveal/v1/tx.registry.d.ts +133 -0
- package/sparkdream/reveal/v1/tx.registry.js +199 -0
- package/sparkdream/reveal/v1/tx.rpc.msg.d.ts +43 -0
- package/sparkdream/reveal/v1/tx.rpc.msg.js +77 -0
- package/sparkdream/reveal/v1/types.d.ts +455 -0
- package/sparkdream/reveal/v1/types.js +1150 -0
- package/sparkdream/rpc.query.d.ts +352 -0
- package/sparkdream/rpc.query.js +39 -0
- package/sparkdream/rpc.tx.d.ts +39 -0
- package/sparkdream/rpc.tx.js +39 -0
- package/sparkdream/season/module/v1/module.d.ts +54 -0
- package/sparkdream/season/module/v1/module.js +74 -0
- package/sparkdream/season/v1/achievement.d.ts +101 -0
- package/sparkdream/season/v1/achievement.js +145 -0
- package/sparkdream/season/v1/display_name_appeal_stake.d.ts +68 -0
- package/sparkdream/season/v1/display_name_appeal_stake.js +98 -0
- package/sparkdream/season/v1/display_name_moderation.d.ts +60 -0
- package/sparkdream/season/v1/display_name_moderation.js +158 -0
- package/sparkdream/season/v1/display_name_report_stake.d.ts +68 -0
- package/sparkdream/season/v1/display_name_report_stake.js +98 -0
- package/sparkdream/season/v1/enums.d.ts +86 -0
- package/sparkdream/season/v1/enums.js +406 -0
- package/sparkdream/season/v1/epoch_xp_tracker.d.ts +54 -0
- package/sparkdream/season/v1/epoch_xp_tracker.js +122 -0
- package/sparkdream/season/v1/forum_xp_cooldown.d.ts +48 -0
- package/sparkdream/season/v1/forum_xp_cooldown.js +86 -0
- package/sparkdream/season/v1/genesis.d.ts +136 -0
- package/sparkdream/season/v1/genesis.js +485 -0
- package/sparkdream/season/v1/guild.d.ts +117 -0
- package/sparkdream/season/v1/guild.js +175 -0
- package/sparkdream/season/v1/guild_invite.d.ts +52 -0
- package/sparkdream/season/v1/guild_invite.js +110 -0
- package/sparkdream/season/v1/guild_membership.d.ts +54 -0
- package/sparkdream/season/v1/guild_membership.js +122 -0
- package/sparkdream/season/v1/member_profile.d.ts +196 -0
- package/sparkdream/season/v1/member_profile.js +299 -0
- package/sparkdream/season/v1/member_quest_progress.d.ts +84 -0
- package/sparkdream/season/v1/member_quest_progress.js +135 -0
- package/sparkdream/season/v1/member_registration.d.ts +48 -0
- package/sparkdream/season/v1/member_registration.js +86 -0
- package/sparkdream/season/v1/member_season_snapshot.d.ts +145 -0
- package/sparkdream/season/v1/member_season_snapshot.js +241 -0
- package/sparkdream/season/v1/next_season_info.d.ts +48 -0
- package/sparkdream/season/v1/next_season_info.js +86 -0
- package/sparkdream/season/v1/nomination.d.ts +194 -0
- package/sparkdream/season/v1/nomination.js +431 -0
- package/sparkdream/season/v1/params.d.ts +643 -0
- package/sparkdream/season/v1/params.js +1648 -0
- package/sparkdream/season/v1/query.d.ts +6199 -0
- package/sparkdream/season/v1/query.js +10574 -0
- package/sparkdream/season/v1/query.lcd.d.ts +76 -0
- package/sparkdream/season/v1/query.lcd.js +602 -0
- package/sparkdream/season/v1/query.rpc.Query.d.ts +284 -0
- package/sparkdream/season/v1/query.rpc.Query.js +678 -0
- package/sparkdream/season/v1/quest.d.ts +231 -0
- package/sparkdream/season/v1/quest.js +337 -0
- package/sparkdream/season/v1/season.d.ts +117 -0
- package/sparkdream/season/v1/season.js +169 -0
- package/sparkdream/season/v1/season_snapshot.d.ts +48 -0
- package/sparkdream/season/v1/season_snapshot.js +86 -0
- package/sparkdream/season/v1/season_title_eligibility.d.ts +134 -0
- package/sparkdream/season/v1/season_title_eligibility.js +197 -0
- package/sparkdream/season/v1/season_transition_state.d.ts +93 -0
- package/sparkdream/season/v1/season_transition_state.js +133 -0
- package/sparkdream/season/v1/title.d.ts +109 -0
- package/sparkdream/season/v1/title.js +157 -0
- package/sparkdream/season/v1/transition_recovery_state.d.ts +85 -0
- package/sparkdream/season/v1/transition_recovery_state.js +121 -0
- package/sparkdream/season/v1/tx.amino.d.ts +218 -0
- package/sparkdream/season/v1/tx.amino.js +222 -0
- package/sparkdream/season/v1/tx.d.ts +4133 -0
- package/sparkdream/season/v1/tx.js +6827 -0
- package/sparkdream/season/v1/tx.registry.d.ts +529 -0
- package/sparkdream/season/v1/tx.registry.js +793 -0
- package/sparkdream/season/v1/tx.rpc.msg.d.ts +144 -0
- package/sparkdream/season/v1/tx.rpc.msg.js +277 -0
- package/sparkdream/season/v1/vote_xp_record.d.ts +48 -0
- package/sparkdream/season/v1/vote_xp_record.js +86 -0
- package/sparkdream/session/module/v1/module.d.ts +54 -0
- package/sparkdream/session/module/v1/module.js +74 -0
- package/sparkdream/session/v1/genesis.d.ts +62 -0
- package/sparkdream/session/v1/genesis.js +91 -0
- package/sparkdream/session/v1/params.d.ts +168 -0
- package/sparkdream/session/v1/params.js +278 -0
- package/sparkdream/session/v1/query.d.ts +423 -0
- package/sparkdream/session/v1/query.js +746 -0
- package/sparkdream/session/v1/query.lcd.d.ts +13 -0
- package/sparkdream/session/v1/query.lcd.js +49 -0
- package/sparkdream/session/v1/query.rpc.Query.d.ts +32 -0
- package/sparkdream/session/v1/query.rpc.Query.js +65 -0
- package/sparkdream/session/v1/session.d.ts +125 -0
- package/sparkdream/session/v1/session.js +188 -0
- package/sparkdream/session/v1/tx.amino.d.ts +28 -0
- package/sparkdream/session/v1/tx.amino.js +32 -0
- package/sparkdream/session/v1/tx.d.ts +481 -0
- package/sparkdream/session/v1/tx.js +771 -0
- package/sparkdream/session/v1/tx.registry.d.ts +73 -0
- package/sparkdream/session/v1/tx.registry.js +109 -0
- package/sparkdream/session/v1/tx.rpc.msg.d.ts +31 -0
- package/sparkdream/session/v1/tx.rpc.msg.js +48 -0
- package/sparkdream/shield/module/v1/module.d.ts +54 -0
- package/sparkdream/shield/module/v1/module.js +74 -0
- package/sparkdream/shield/v1/genesis.d.ts +182 -0
- package/sparkdream/shield/v1/genesis.js +304 -0
- package/sparkdream/shield/v1/params.d.ts +192 -0
- package/sparkdream/shield/v1/params.js +285 -0
- package/sparkdream/shield/v1/query.d.ts +1406 -0
- package/sparkdream/shield/v1/query.js +2326 -0
- package/sparkdream/shield/v1/query.lcd.d.ts +25 -0
- package/sparkdream/shield/v1/query.lcd.js +114 -0
- package/sparkdream/shield/v1/query.rpc.Query.d.ts +80 -0
- package/sparkdream/shield/v1/query.rpc.Query.js +175 -0
- package/sparkdream/shield/v1/tx.amino.d.ts +28 -0
- package/sparkdream/shield/v1/tx.amino.js +32 -0
- package/sparkdream/shield/v1/tx.d.ts +542 -0
- package/sparkdream/shield/v1/tx.js +841 -0
- package/sparkdream/shield/v1/tx.registry.d.ts +73 -0
- package/sparkdream/shield/v1/tx.registry.js +109 -0
- package/sparkdream/shield/v1/tx.rpc.msg.d.ts +29 -0
- package/sparkdream/shield/v1/tx.rpc.msg.js +48 -0
- package/sparkdream/shield/v1/types.d.ts +1440 -0
- package/sparkdream/shield/v1/types.js +2440 -0
- package/sparkdream/split/module/v1/module.d.ts +54 -0
- package/sparkdream/split/module/v1/module.js +74 -0
- package/sparkdream/split/v1/genesis.d.ts +56 -0
- package/sparkdream/split/v1/genesis.js +91 -0
- package/sparkdream/split/v1/params.d.ts +46 -0
- package/sparkdream/split/v1/params.js +68 -0
- package/sparkdream/split/v1/query.d.ts +275 -0
- package/sparkdream/split/v1/query.js +424 -0
- package/sparkdream/split/v1/query.lcd.d.ts +11 -0
- package/sparkdream/split/v1/query.lcd.js +35 -0
- package/sparkdream/split/v1/query.rpc.Query.d.ts +24 -0
- package/sparkdream/split/v1/query.rpc.Query.js +49 -0
- package/sparkdream/split/v1/share.d.ts +48 -0
- package/sparkdream/split/v1/share.js +86 -0
- package/sparkdream/split/v1/tx.amino.d.ts +8 -0
- package/sparkdream/split/v1/tx.amino.js +12 -0
- package/sparkdream/split/v1/tx.d.ts +108 -0
- package/sparkdream/split/v1/tx.js +151 -0
- package/sparkdream/split/v1/tx.registry.d.ts +25 -0
- package/sparkdream/split/v1/tx.registry.js +37 -0
- package/sparkdream/split/v1/tx.rpc.msg.d.ts +16 -0
- package/sparkdream/split/v1/tx.rpc.msg.js +23 -0
- package/tendermint/bundle.d.ts +844 -844
- package/tendermint/bundle.js +20 -20
|
@@ -0,0 +1,2427 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
3
|
+
import { bytesFromBase64, base64FromBytes } from "../../../helpers";
|
|
4
|
+
/**
|
|
5
|
+
* ProofDomain identifies which Merkle tree the ZK proof targets.
|
|
6
|
+
* All anonymous operations use the trust tree (leaves = MiMC(zk_pub_key, trust_level)).
|
|
7
|
+
* The unified ShieldCircuit hides the exact trust level — only proves >= minimum.
|
|
8
|
+
*/
|
|
9
|
+
export var ProofDomain;
|
|
10
|
+
(function (ProofDomain) {
|
|
11
|
+
ProofDomain[ProofDomain["PROOF_DOMAIN_UNSPECIFIED"] = 0] = "PROOF_DOMAIN_UNSPECIFIED";
|
|
12
|
+
ProofDomain[ProofDomain["PROOF_DOMAIN_TRUST_TREE"] = 1] = "PROOF_DOMAIN_TRUST_TREE";
|
|
13
|
+
ProofDomain[ProofDomain["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
14
|
+
})(ProofDomain || (ProofDomain = {}));
|
|
15
|
+
export const ProofDomainAmino = ProofDomain;
|
|
16
|
+
export function proofDomainFromJSON(object) {
|
|
17
|
+
switch (object) {
|
|
18
|
+
case 0:
|
|
19
|
+
case "PROOF_DOMAIN_UNSPECIFIED":
|
|
20
|
+
return ProofDomain.PROOF_DOMAIN_UNSPECIFIED;
|
|
21
|
+
case 1:
|
|
22
|
+
case "PROOF_DOMAIN_TRUST_TREE":
|
|
23
|
+
return ProofDomain.PROOF_DOMAIN_TRUST_TREE;
|
|
24
|
+
case -1:
|
|
25
|
+
case "UNRECOGNIZED":
|
|
26
|
+
default:
|
|
27
|
+
return ProofDomain.UNRECOGNIZED;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export function proofDomainToJSON(object) {
|
|
31
|
+
switch (object) {
|
|
32
|
+
case ProofDomain.PROOF_DOMAIN_UNSPECIFIED:
|
|
33
|
+
return "PROOF_DOMAIN_UNSPECIFIED";
|
|
34
|
+
case ProofDomain.PROOF_DOMAIN_TRUST_TREE:
|
|
35
|
+
return "PROOF_DOMAIN_TRUST_TREE";
|
|
36
|
+
case ProofDomain.UNRECOGNIZED:
|
|
37
|
+
default:
|
|
38
|
+
return "UNRECOGNIZED";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/** NullifierScopeType determines nullifier uniqueness granularity. */
|
|
42
|
+
export var NullifierScopeType;
|
|
43
|
+
(function (NullifierScopeType) {
|
|
44
|
+
/** NULLIFIER_SCOPE_EPOCH - Scope = current epoch (one op per epoch) */
|
|
45
|
+
NullifierScopeType[NullifierScopeType["NULLIFIER_SCOPE_EPOCH"] = 0] = "NULLIFIER_SCOPE_EPOCH";
|
|
46
|
+
/** NULLIFIER_SCOPE_MESSAGE_FIELD - Scope = extracted from inner message (e.g. post_id for replies) */
|
|
47
|
+
NullifierScopeType[NullifierScopeType["NULLIFIER_SCOPE_MESSAGE_FIELD"] = 1] = "NULLIFIER_SCOPE_MESSAGE_FIELD";
|
|
48
|
+
/** NULLIFIER_SCOPE_GLOBAL - No scoping (nullifier is globally unique) */
|
|
49
|
+
NullifierScopeType[NullifierScopeType["NULLIFIER_SCOPE_GLOBAL"] = 2] = "NULLIFIER_SCOPE_GLOBAL";
|
|
50
|
+
NullifierScopeType[NullifierScopeType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
51
|
+
})(NullifierScopeType || (NullifierScopeType = {}));
|
|
52
|
+
export const NullifierScopeTypeAmino = NullifierScopeType;
|
|
53
|
+
export function nullifierScopeTypeFromJSON(object) {
|
|
54
|
+
switch (object) {
|
|
55
|
+
case 0:
|
|
56
|
+
case "NULLIFIER_SCOPE_EPOCH":
|
|
57
|
+
return NullifierScopeType.NULLIFIER_SCOPE_EPOCH;
|
|
58
|
+
case 1:
|
|
59
|
+
case "NULLIFIER_SCOPE_MESSAGE_FIELD":
|
|
60
|
+
return NullifierScopeType.NULLIFIER_SCOPE_MESSAGE_FIELD;
|
|
61
|
+
case 2:
|
|
62
|
+
case "NULLIFIER_SCOPE_GLOBAL":
|
|
63
|
+
return NullifierScopeType.NULLIFIER_SCOPE_GLOBAL;
|
|
64
|
+
case -1:
|
|
65
|
+
case "UNRECOGNIZED":
|
|
66
|
+
default:
|
|
67
|
+
return NullifierScopeType.UNRECOGNIZED;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export function nullifierScopeTypeToJSON(object) {
|
|
71
|
+
switch (object) {
|
|
72
|
+
case NullifierScopeType.NULLIFIER_SCOPE_EPOCH:
|
|
73
|
+
return "NULLIFIER_SCOPE_EPOCH";
|
|
74
|
+
case NullifierScopeType.NULLIFIER_SCOPE_MESSAGE_FIELD:
|
|
75
|
+
return "NULLIFIER_SCOPE_MESSAGE_FIELD";
|
|
76
|
+
case NullifierScopeType.NULLIFIER_SCOPE_GLOBAL:
|
|
77
|
+
return "NULLIFIER_SCOPE_GLOBAL";
|
|
78
|
+
case NullifierScopeType.UNRECOGNIZED:
|
|
79
|
+
default:
|
|
80
|
+
return "UNRECOGNIZED";
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/** ShieldBatchMode controls which execution modes an operation supports. */
|
|
84
|
+
export var ShieldBatchMode;
|
|
85
|
+
(function (ShieldBatchMode) {
|
|
86
|
+
/** SHIELD_BATCH_MODE_IMMEDIATE_ONLY - Only immediate execution allowed */
|
|
87
|
+
ShieldBatchMode[ShieldBatchMode["SHIELD_BATCH_MODE_IMMEDIATE_ONLY"] = 0] = "SHIELD_BATCH_MODE_IMMEDIATE_ONLY";
|
|
88
|
+
/** SHIELD_BATCH_MODE_ENCRYPTED_ONLY - Only encrypted batch execution allowed */
|
|
89
|
+
ShieldBatchMode[ShieldBatchMode["SHIELD_BATCH_MODE_ENCRYPTED_ONLY"] = 1] = "SHIELD_BATCH_MODE_ENCRYPTED_ONLY";
|
|
90
|
+
/** SHIELD_BATCH_MODE_EITHER - User chooses per-submission */
|
|
91
|
+
ShieldBatchMode[ShieldBatchMode["SHIELD_BATCH_MODE_EITHER"] = 2] = "SHIELD_BATCH_MODE_EITHER";
|
|
92
|
+
ShieldBatchMode[ShieldBatchMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
93
|
+
})(ShieldBatchMode || (ShieldBatchMode = {}));
|
|
94
|
+
export const ShieldBatchModeAmino = ShieldBatchMode;
|
|
95
|
+
export function shieldBatchModeFromJSON(object) {
|
|
96
|
+
switch (object) {
|
|
97
|
+
case 0:
|
|
98
|
+
case "SHIELD_BATCH_MODE_IMMEDIATE_ONLY":
|
|
99
|
+
return ShieldBatchMode.SHIELD_BATCH_MODE_IMMEDIATE_ONLY;
|
|
100
|
+
case 1:
|
|
101
|
+
case "SHIELD_BATCH_MODE_ENCRYPTED_ONLY":
|
|
102
|
+
return ShieldBatchMode.SHIELD_BATCH_MODE_ENCRYPTED_ONLY;
|
|
103
|
+
case 2:
|
|
104
|
+
case "SHIELD_BATCH_MODE_EITHER":
|
|
105
|
+
return ShieldBatchMode.SHIELD_BATCH_MODE_EITHER;
|
|
106
|
+
case -1:
|
|
107
|
+
case "UNRECOGNIZED":
|
|
108
|
+
default:
|
|
109
|
+
return ShieldBatchMode.UNRECOGNIZED;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
export function shieldBatchModeToJSON(object) {
|
|
113
|
+
switch (object) {
|
|
114
|
+
case ShieldBatchMode.SHIELD_BATCH_MODE_IMMEDIATE_ONLY:
|
|
115
|
+
return "SHIELD_BATCH_MODE_IMMEDIATE_ONLY";
|
|
116
|
+
case ShieldBatchMode.SHIELD_BATCH_MODE_ENCRYPTED_ONLY:
|
|
117
|
+
return "SHIELD_BATCH_MODE_ENCRYPTED_ONLY";
|
|
118
|
+
case ShieldBatchMode.SHIELD_BATCH_MODE_EITHER:
|
|
119
|
+
return "SHIELD_BATCH_MODE_EITHER";
|
|
120
|
+
case ShieldBatchMode.UNRECOGNIZED:
|
|
121
|
+
default:
|
|
122
|
+
return "UNRECOGNIZED";
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/** ShieldExecMode selects the execution mode for a shielded operation. */
|
|
126
|
+
export var ShieldExecMode;
|
|
127
|
+
(function (ShieldExecMode) {
|
|
128
|
+
ShieldExecMode[ShieldExecMode["SHIELD_EXEC_IMMEDIATE"] = 0] = "SHIELD_EXEC_IMMEDIATE";
|
|
129
|
+
ShieldExecMode[ShieldExecMode["SHIELD_EXEC_ENCRYPTED_BATCH"] = 1] = "SHIELD_EXEC_ENCRYPTED_BATCH";
|
|
130
|
+
ShieldExecMode[ShieldExecMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
131
|
+
})(ShieldExecMode || (ShieldExecMode = {}));
|
|
132
|
+
export const ShieldExecModeAmino = ShieldExecMode;
|
|
133
|
+
export function shieldExecModeFromJSON(object) {
|
|
134
|
+
switch (object) {
|
|
135
|
+
case 0:
|
|
136
|
+
case "SHIELD_EXEC_IMMEDIATE":
|
|
137
|
+
return ShieldExecMode.SHIELD_EXEC_IMMEDIATE;
|
|
138
|
+
case 1:
|
|
139
|
+
case "SHIELD_EXEC_ENCRYPTED_BATCH":
|
|
140
|
+
return ShieldExecMode.SHIELD_EXEC_ENCRYPTED_BATCH;
|
|
141
|
+
case -1:
|
|
142
|
+
case "UNRECOGNIZED":
|
|
143
|
+
default:
|
|
144
|
+
return ShieldExecMode.UNRECOGNIZED;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
export function shieldExecModeToJSON(object) {
|
|
148
|
+
switch (object) {
|
|
149
|
+
case ShieldExecMode.SHIELD_EXEC_IMMEDIATE:
|
|
150
|
+
return "SHIELD_EXEC_IMMEDIATE";
|
|
151
|
+
case ShieldExecMode.SHIELD_EXEC_ENCRYPTED_BATCH:
|
|
152
|
+
return "SHIELD_EXEC_ENCRYPTED_BATCH";
|
|
153
|
+
case ShieldExecMode.UNRECOGNIZED:
|
|
154
|
+
default:
|
|
155
|
+
return "UNRECOGNIZED";
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/** DKGPhase tracks the current phase of the distributed key generation ceremony. */
|
|
159
|
+
export var DKGPhase;
|
|
160
|
+
(function (DKGPhase) {
|
|
161
|
+
/** DKG_PHASE_INACTIVE - No DKG running (not enough validators, or TLE not needed yet) */
|
|
162
|
+
DKGPhase[DKGPhase["DKG_PHASE_INACTIVE"] = 0] = "DKG_PHASE_INACTIVE";
|
|
163
|
+
/** DKG_PHASE_REGISTERING - Accepting BN256 G1 encryption key registrations from validators */
|
|
164
|
+
DKGPhase[DKGPhase["DKG_PHASE_REGISTERING"] = 1] = "DKG_PHASE_REGISTERING";
|
|
165
|
+
/** DKG_PHASE_CONTRIBUTING - Key registration closed; accepting Feldman DKG contributions */
|
|
166
|
+
DKGPhase[DKGPhase["DKG_PHASE_CONTRIBUTING"] = 2] = "DKG_PHASE_CONTRIBUTING";
|
|
167
|
+
/** DKG_PHASE_ACTIVE - DKG complete, master key available, encrypted batch enabled */
|
|
168
|
+
DKGPhase[DKGPhase["DKG_PHASE_ACTIVE"] = 3] = "DKG_PHASE_ACTIVE";
|
|
169
|
+
DKGPhase[DKGPhase["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
170
|
+
})(DKGPhase || (DKGPhase = {}));
|
|
171
|
+
export const DKGPhaseAmino = DKGPhase;
|
|
172
|
+
export function dKGPhaseFromJSON(object) {
|
|
173
|
+
switch (object) {
|
|
174
|
+
case 0:
|
|
175
|
+
case "DKG_PHASE_INACTIVE":
|
|
176
|
+
return DKGPhase.DKG_PHASE_INACTIVE;
|
|
177
|
+
case 1:
|
|
178
|
+
case "DKG_PHASE_REGISTERING":
|
|
179
|
+
return DKGPhase.DKG_PHASE_REGISTERING;
|
|
180
|
+
case 2:
|
|
181
|
+
case "DKG_PHASE_CONTRIBUTING":
|
|
182
|
+
return DKGPhase.DKG_PHASE_CONTRIBUTING;
|
|
183
|
+
case 3:
|
|
184
|
+
case "DKG_PHASE_ACTIVE":
|
|
185
|
+
return DKGPhase.DKG_PHASE_ACTIVE;
|
|
186
|
+
case -1:
|
|
187
|
+
case "UNRECOGNIZED":
|
|
188
|
+
default:
|
|
189
|
+
return DKGPhase.UNRECOGNIZED;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
export function dKGPhaseToJSON(object) {
|
|
193
|
+
switch (object) {
|
|
194
|
+
case DKGPhase.DKG_PHASE_INACTIVE:
|
|
195
|
+
return "DKG_PHASE_INACTIVE";
|
|
196
|
+
case DKGPhase.DKG_PHASE_REGISTERING:
|
|
197
|
+
return "DKG_PHASE_REGISTERING";
|
|
198
|
+
case DKGPhase.DKG_PHASE_CONTRIBUTING:
|
|
199
|
+
return "DKG_PHASE_CONTRIBUTING";
|
|
200
|
+
case DKGPhase.DKG_PHASE_ACTIVE:
|
|
201
|
+
return "DKG_PHASE_ACTIVE";
|
|
202
|
+
case DKGPhase.UNRECOGNIZED:
|
|
203
|
+
default:
|
|
204
|
+
return "UNRECOGNIZED";
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
function createBaseShieldedOpRegistration() {
|
|
208
|
+
return {
|
|
209
|
+
messageTypeUrl: "",
|
|
210
|
+
proofDomain: 0,
|
|
211
|
+
minTrustLevel: 0,
|
|
212
|
+
nullifierDomain: 0,
|
|
213
|
+
nullifierScopeType: 0,
|
|
214
|
+
active: false,
|
|
215
|
+
batchMode: 0,
|
|
216
|
+
scopeFieldPath: ""
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* ShieldedOpRegistration defines a registered shielded operation.
|
|
221
|
+
* @name ShieldedOpRegistration
|
|
222
|
+
* @package sparkdream.shield.v1
|
|
223
|
+
* @see proto type: sparkdream.shield.v1.ShieldedOpRegistration
|
|
224
|
+
*/
|
|
225
|
+
export const ShieldedOpRegistration = {
|
|
226
|
+
typeUrl: "/sparkdream.shield.v1.ShieldedOpRegistration",
|
|
227
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
228
|
+
if (message.messageTypeUrl !== "") {
|
|
229
|
+
writer.uint32(10).string(message.messageTypeUrl);
|
|
230
|
+
}
|
|
231
|
+
if (message.proofDomain !== 0) {
|
|
232
|
+
writer.uint32(16).int32(message.proofDomain);
|
|
233
|
+
}
|
|
234
|
+
if (message.minTrustLevel !== 0) {
|
|
235
|
+
writer.uint32(24).uint32(message.minTrustLevel);
|
|
236
|
+
}
|
|
237
|
+
if (message.nullifierDomain !== 0) {
|
|
238
|
+
writer.uint32(32).uint32(message.nullifierDomain);
|
|
239
|
+
}
|
|
240
|
+
if (message.nullifierScopeType !== 0) {
|
|
241
|
+
writer.uint32(40).int32(message.nullifierScopeType);
|
|
242
|
+
}
|
|
243
|
+
if (message.active === true) {
|
|
244
|
+
writer.uint32(48).bool(message.active);
|
|
245
|
+
}
|
|
246
|
+
if (message.batchMode !== 0) {
|
|
247
|
+
writer.uint32(56).int32(message.batchMode);
|
|
248
|
+
}
|
|
249
|
+
if (message.scopeFieldPath !== "") {
|
|
250
|
+
writer.uint32(66).string(message.scopeFieldPath);
|
|
251
|
+
}
|
|
252
|
+
return writer;
|
|
253
|
+
},
|
|
254
|
+
decode(input, length) {
|
|
255
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
256
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
257
|
+
const message = createBaseShieldedOpRegistration();
|
|
258
|
+
while (reader.pos < end) {
|
|
259
|
+
const tag = reader.uint32();
|
|
260
|
+
switch (tag >>> 3) {
|
|
261
|
+
case 1:
|
|
262
|
+
message.messageTypeUrl = reader.string();
|
|
263
|
+
break;
|
|
264
|
+
case 2:
|
|
265
|
+
message.proofDomain = reader.int32();
|
|
266
|
+
break;
|
|
267
|
+
case 3:
|
|
268
|
+
message.minTrustLevel = reader.uint32();
|
|
269
|
+
break;
|
|
270
|
+
case 4:
|
|
271
|
+
message.nullifierDomain = reader.uint32();
|
|
272
|
+
break;
|
|
273
|
+
case 5:
|
|
274
|
+
message.nullifierScopeType = reader.int32();
|
|
275
|
+
break;
|
|
276
|
+
case 6:
|
|
277
|
+
message.active = reader.bool();
|
|
278
|
+
break;
|
|
279
|
+
case 7:
|
|
280
|
+
message.batchMode = reader.int32();
|
|
281
|
+
break;
|
|
282
|
+
case 8:
|
|
283
|
+
message.scopeFieldPath = reader.string();
|
|
284
|
+
break;
|
|
285
|
+
default:
|
|
286
|
+
reader.skipType(tag & 7);
|
|
287
|
+
break;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
return message;
|
|
291
|
+
},
|
|
292
|
+
fromPartial(object) {
|
|
293
|
+
const message = createBaseShieldedOpRegistration();
|
|
294
|
+
message.messageTypeUrl = object.messageTypeUrl ?? "";
|
|
295
|
+
message.proofDomain = object.proofDomain ?? 0;
|
|
296
|
+
message.minTrustLevel = object.minTrustLevel ?? 0;
|
|
297
|
+
message.nullifierDomain = object.nullifierDomain ?? 0;
|
|
298
|
+
message.nullifierScopeType = object.nullifierScopeType ?? 0;
|
|
299
|
+
message.active = object.active ?? false;
|
|
300
|
+
message.batchMode = object.batchMode ?? 0;
|
|
301
|
+
message.scopeFieldPath = object.scopeFieldPath ?? "";
|
|
302
|
+
return message;
|
|
303
|
+
},
|
|
304
|
+
fromAmino(object) {
|
|
305
|
+
const message = createBaseShieldedOpRegistration();
|
|
306
|
+
if (object.message_type_url !== undefined && object.message_type_url !== null) {
|
|
307
|
+
message.messageTypeUrl = object.message_type_url;
|
|
308
|
+
}
|
|
309
|
+
if (object.proof_domain !== undefined && object.proof_domain !== null) {
|
|
310
|
+
message.proofDomain = object.proof_domain;
|
|
311
|
+
}
|
|
312
|
+
if (object.min_trust_level !== undefined && object.min_trust_level !== null) {
|
|
313
|
+
message.minTrustLevel = object.min_trust_level;
|
|
314
|
+
}
|
|
315
|
+
if (object.nullifier_domain !== undefined && object.nullifier_domain !== null) {
|
|
316
|
+
message.nullifierDomain = object.nullifier_domain;
|
|
317
|
+
}
|
|
318
|
+
if (object.nullifier_scope_type !== undefined && object.nullifier_scope_type !== null) {
|
|
319
|
+
message.nullifierScopeType = object.nullifier_scope_type;
|
|
320
|
+
}
|
|
321
|
+
if (object.active !== undefined && object.active !== null) {
|
|
322
|
+
message.active = object.active;
|
|
323
|
+
}
|
|
324
|
+
if (object.batch_mode !== undefined && object.batch_mode !== null) {
|
|
325
|
+
message.batchMode = object.batch_mode;
|
|
326
|
+
}
|
|
327
|
+
if (object.scope_field_path !== undefined && object.scope_field_path !== null) {
|
|
328
|
+
message.scopeFieldPath = object.scope_field_path;
|
|
329
|
+
}
|
|
330
|
+
return message;
|
|
331
|
+
},
|
|
332
|
+
toAmino(message) {
|
|
333
|
+
const obj = {};
|
|
334
|
+
obj.message_type_url = message.messageTypeUrl === "" ? undefined : message.messageTypeUrl;
|
|
335
|
+
obj.proof_domain = message.proofDomain === 0 ? undefined : message.proofDomain;
|
|
336
|
+
obj.min_trust_level = message.minTrustLevel === 0 ? undefined : message.minTrustLevel;
|
|
337
|
+
obj.nullifier_domain = message.nullifierDomain === 0 ? undefined : message.nullifierDomain;
|
|
338
|
+
obj.nullifier_scope_type = message.nullifierScopeType === 0 ? undefined : message.nullifierScopeType;
|
|
339
|
+
obj.active = message.active === false ? undefined : message.active;
|
|
340
|
+
obj.batch_mode = message.batchMode === 0 ? undefined : message.batchMode;
|
|
341
|
+
obj.scope_field_path = message.scopeFieldPath === "" ? undefined : message.scopeFieldPath;
|
|
342
|
+
return obj;
|
|
343
|
+
},
|
|
344
|
+
fromAminoMsg(object) {
|
|
345
|
+
return ShieldedOpRegistration.fromAmino(object.value);
|
|
346
|
+
},
|
|
347
|
+
fromProtoMsg(message) {
|
|
348
|
+
return ShieldedOpRegistration.decode(message.value);
|
|
349
|
+
},
|
|
350
|
+
toProto(message) {
|
|
351
|
+
return ShieldedOpRegistration.encode(message).finish();
|
|
352
|
+
},
|
|
353
|
+
toProtoMsg(message) {
|
|
354
|
+
return {
|
|
355
|
+
typeUrl: "/sparkdream.shield.v1.ShieldedOpRegistration",
|
|
356
|
+
value: ShieldedOpRegistration.encode(message).finish()
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
function createBaseUsedNullifier() {
|
|
361
|
+
return {
|
|
362
|
+
domain: 0,
|
|
363
|
+
scope: BigInt(0),
|
|
364
|
+
nullifierHex: "",
|
|
365
|
+
usedAtHeight: BigInt(0)
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* UsedNullifier records a nullifier that has been consumed.
|
|
370
|
+
* Key: domain (uint32) + scope (uint64) + nullifier_hex (string)
|
|
371
|
+
* @name UsedNullifier
|
|
372
|
+
* @package sparkdream.shield.v1
|
|
373
|
+
* @see proto type: sparkdream.shield.v1.UsedNullifier
|
|
374
|
+
*/
|
|
375
|
+
export const UsedNullifier = {
|
|
376
|
+
typeUrl: "/sparkdream.shield.v1.UsedNullifier",
|
|
377
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
378
|
+
if (message.domain !== 0) {
|
|
379
|
+
writer.uint32(8).uint32(message.domain);
|
|
380
|
+
}
|
|
381
|
+
if (message.scope !== BigInt(0)) {
|
|
382
|
+
writer.uint32(16).uint64(message.scope);
|
|
383
|
+
}
|
|
384
|
+
if (message.nullifierHex !== "") {
|
|
385
|
+
writer.uint32(26).string(message.nullifierHex);
|
|
386
|
+
}
|
|
387
|
+
if (message.usedAtHeight !== BigInt(0)) {
|
|
388
|
+
writer.uint32(32).int64(message.usedAtHeight);
|
|
389
|
+
}
|
|
390
|
+
return writer;
|
|
391
|
+
},
|
|
392
|
+
decode(input, length) {
|
|
393
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
394
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
395
|
+
const message = createBaseUsedNullifier();
|
|
396
|
+
while (reader.pos < end) {
|
|
397
|
+
const tag = reader.uint32();
|
|
398
|
+
switch (tag >>> 3) {
|
|
399
|
+
case 1:
|
|
400
|
+
message.domain = reader.uint32();
|
|
401
|
+
break;
|
|
402
|
+
case 2:
|
|
403
|
+
message.scope = reader.uint64();
|
|
404
|
+
break;
|
|
405
|
+
case 3:
|
|
406
|
+
message.nullifierHex = reader.string();
|
|
407
|
+
break;
|
|
408
|
+
case 4:
|
|
409
|
+
message.usedAtHeight = reader.int64();
|
|
410
|
+
break;
|
|
411
|
+
default:
|
|
412
|
+
reader.skipType(tag & 7);
|
|
413
|
+
break;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
return message;
|
|
417
|
+
},
|
|
418
|
+
fromPartial(object) {
|
|
419
|
+
const message = createBaseUsedNullifier();
|
|
420
|
+
message.domain = object.domain ?? 0;
|
|
421
|
+
message.scope = object.scope !== undefined && object.scope !== null ? BigInt(object.scope.toString()) : BigInt(0);
|
|
422
|
+
message.nullifierHex = object.nullifierHex ?? "";
|
|
423
|
+
message.usedAtHeight = object.usedAtHeight !== undefined && object.usedAtHeight !== null ? BigInt(object.usedAtHeight.toString()) : BigInt(0);
|
|
424
|
+
return message;
|
|
425
|
+
},
|
|
426
|
+
fromAmino(object) {
|
|
427
|
+
const message = createBaseUsedNullifier();
|
|
428
|
+
if (object.domain !== undefined && object.domain !== null) {
|
|
429
|
+
message.domain = object.domain;
|
|
430
|
+
}
|
|
431
|
+
if (object.scope !== undefined && object.scope !== null) {
|
|
432
|
+
message.scope = BigInt(object.scope);
|
|
433
|
+
}
|
|
434
|
+
if (object.nullifier_hex !== undefined && object.nullifier_hex !== null) {
|
|
435
|
+
message.nullifierHex = object.nullifier_hex;
|
|
436
|
+
}
|
|
437
|
+
if (object.used_at_height !== undefined && object.used_at_height !== null) {
|
|
438
|
+
message.usedAtHeight = BigInt(object.used_at_height);
|
|
439
|
+
}
|
|
440
|
+
return message;
|
|
441
|
+
},
|
|
442
|
+
toAmino(message) {
|
|
443
|
+
const obj = {};
|
|
444
|
+
obj.domain = message.domain === 0 ? undefined : message.domain;
|
|
445
|
+
obj.scope = message.scope !== BigInt(0) ? message.scope?.toString() : undefined;
|
|
446
|
+
obj.nullifier_hex = message.nullifierHex === "" ? undefined : message.nullifierHex;
|
|
447
|
+
obj.used_at_height = message.usedAtHeight !== BigInt(0) ? message.usedAtHeight?.toString() : undefined;
|
|
448
|
+
return obj;
|
|
449
|
+
},
|
|
450
|
+
fromAminoMsg(object) {
|
|
451
|
+
return UsedNullifier.fromAmino(object.value);
|
|
452
|
+
},
|
|
453
|
+
fromProtoMsg(message) {
|
|
454
|
+
return UsedNullifier.decode(message.value);
|
|
455
|
+
},
|
|
456
|
+
toProto(message) {
|
|
457
|
+
return UsedNullifier.encode(message).finish();
|
|
458
|
+
},
|
|
459
|
+
toProtoMsg(message) {
|
|
460
|
+
return {
|
|
461
|
+
typeUrl: "/sparkdream.shield.v1.UsedNullifier",
|
|
462
|
+
value: UsedNullifier.encode(message).finish()
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
function createBaseDayFunding() {
|
|
467
|
+
return {
|
|
468
|
+
day: BigInt(0),
|
|
469
|
+
amountFunded: ""
|
|
470
|
+
};
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* DayFunding tracks funding per day to enforce the daily cap.
|
|
474
|
+
* Day is calculated as block_height / 14400 (at 6s/block = 1 day).
|
|
475
|
+
* @name DayFunding
|
|
476
|
+
* @package sparkdream.shield.v1
|
|
477
|
+
* @see proto type: sparkdream.shield.v1.DayFunding
|
|
478
|
+
*/
|
|
479
|
+
export const DayFunding = {
|
|
480
|
+
typeUrl: "/sparkdream.shield.v1.DayFunding",
|
|
481
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
482
|
+
if (message.day !== BigInt(0)) {
|
|
483
|
+
writer.uint32(8).uint64(message.day);
|
|
484
|
+
}
|
|
485
|
+
if (message.amountFunded !== "") {
|
|
486
|
+
writer.uint32(18).string(message.amountFunded);
|
|
487
|
+
}
|
|
488
|
+
return writer;
|
|
489
|
+
},
|
|
490
|
+
decode(input, length) {
|
|
491
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
492
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
493
|
+
const message = createBaseDayFunding();
|
|
494
|
+
while (reader.pos < end) {
|
|
495
|
+
const tag = reader.uint32();
|
|
496
|
+
switch (tag >>> 3) {
|
|
497
|
+
case 1:
|
|
498
|
+
message.day = reader.uint64();
|
|
499
|
+
break;
|
|
500
|
+
case 2:
|
|
501
|
+
message.amountFunded = reader.string();
|
|
502
|
+
break;
|
|
503
|
+
default:
|
|
504
|
+
reader.skipType(tag & 7);
|
|
505
|
+
break;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
return message;
|
|
509
|
+
},
|
|
510
|
+
fromPartial(object) {
|
|
511
|
+
const message = createBaseDayFunding();
|
|
512
|
+
message.day = object.day !== undefined && object.day !== null ? BigInt(object.day.toString()) : BigInt(0);
|
|
513
|
+
message.amountFunded = object.amountFunded ?? "";
|
|
514
|
+
return message;
|
|
515
|
+
},
|
|
516
|
+
fromAmino(object) {
|
|
517
|
+
const message = createBaseDayFunding();
|
|
518
|
+
if (object.day !== undefined && object.day !== null) {
|
|
519
|
+
message.day = BigInt(object.day);
|
|
520
|
+
}
|
|
521
|
+
if (object.amount_funded !== undefined && object.amount_funded !== null) {
|
|
522
|
+
message.amountFunded = object.amount_funded;
|
|
523
|
+
}
|
|
524
|
+
return message;
|
|
525
|
+
},
|
|
526
|
+
toAmino(message) {
|
|
527
|
+
const obj = {};
|
|
528
|
+
obj.day = message.day !== BigInt(0) ? message.day?.toString() : undefined;
|
|
529
|
+
obj.amount_funded = message.amountFunded === "" ? undefined : message.amountFunded;
|
|
530
|
+
return obj;
|
|
531
|
+
},
|
|
532
|
+
fromAminoMsg(object) {
|
|
533
|
+
return DayFunding.fromAmino(object.value);
|
|
534
|
+
},
|
|
535
|
+
fromProtoMsg(message) {
|
|
536
|
+
return DayFunding.decode(message.value);
|
|
537
|
+
},
|
|
538
|
+
toProto(message) {
|
|
539
|
+
return DayFunding.encode(message).finish();
|
|
540
|
+
},
|
|
541
|
+
toProtoMsg(message) {
|
|
542
|
+
return {
|
|
543
|
+
typeUrl: "/sparkdream.shield.v1.DayFunding",
|
|
544
|
+
value: DayFunding.encode(message).finish()
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
function createBasePendingShieldedOp() {
|
|
549
|
+
return {
|
|
550
|
+
id: BigInt(0),
|
|
551
|
+
targetEpoch: BigInt(0),
|
|
552
|
+
nullifier: new Uint8Array(),
|
|
553
|
+
merkleRoot: new Uint8Array(),
|
|
554
|
+
proofDomain: 0,
|
|
555
|
+
minTrustLevel: 0,
|
|
556
|
+
encryptedPayload: new Uint8Array(),
|
|
557
|
+
submittedAtHeight: BigInt(0),
|
|
558
|
+
submittedAtEpoch: BigInt(0)
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* PendingShieldedOp is stored in queue until the shield epoch boundary triggers batch execution.
|
|
563
|
+
* @name PendingShieldedOp
|
|
564
|
+
* @package sparkdream.shield.v1
|
|
565
|
+
* @see proto type: sparkdream.shield.v1.PendingShieldedOp
|
|
566
|
+
*/
|
|
567
|
+
export const PendingShieldedOp = {
|
|
568
|
+
typeUrl: "/sparkdream.shield.v1.PendingShieldedOp",
|
|
569
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
570
|
+
if (message.id !== BigInt(0)) {
|
|
571
|
+
writer.uint32(8).uint64(message.id);
|
|
572
|
+
}
|
|
573
|
+
if (message.targetEpoch !== BigInt(0)) {
|
|
574
|
+
writer.uint32(16).uint64(message.targetEpoch);
|
|
575
|
+
}
|
|
576
|
+
if (message.nullifier.length !== 0) {
|
|
577
|
+
writer.uint32(26).bytes(message.nullifier);
|
|
578
|
+
}
|
|
579
|
+
if (message.merkleRoot.length !== 0) {
|
|
580
|
+
writer.uint32(34).bytes(message.merkleRoot);
|
|
581
|
+
}
|
|
582
|
+
if (message.proofDomain !== 0) {
|
|
583
|
+
writer.uint32(40).int32(message.proofDomain);
|
|
584
|
+
}
|
|
585
|
+
if (message.minTrustLevel !== 0) {
|
|
586
|
+
writer.uint32(48).uint32(message.minTrustLevel);
|
|
587
|
+
}
|
|
588
|
+
if (message.encryptedPayload.length !== 0) {
|
|
589
|
+
writer.uint32(58).bytes(message.encryptedPayload);
|
|
590
|
+
}
|
|
591
|
+
if (message.submittedAtHeight !== BigInt(0)) {
|
|
592
|
+
writer.uint32(64).int64(message.submittedAtHeight);
|
|
593
|
+
}
|
|
594
|
+
if (message.submittedAtEpoch !== BigInt(0)) {
|
|
595
|
+
writer.uint32(72).uint64(message.submittedAtEpoch);
|
|
596
|
+
}
|
|
597
|
+
return writer;
|
|
598
|
+
},
|
|
599
|
+
decode(input, length) {
|
|
600
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
601
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
602
|
+
const message = createBasePendingShieldedOp();
|
|
603
|
+
while (reader.pos < end) {
|
|
604
|
+
const tag = reader.uint32();
|
|
605
|
+
switch (tag >>> 3) {
|
|
606
|
+
case 1:
|
|
607
|
+
message.id = reader.uint64();
|
|
608
|
+
break;
|
|
609
|
+
case 2:
|
|
610
|
+
message.targetEpoch = reader.uint64();
|
|
611
|
+
break;
|
|
612
|
+
case 3:
|
|
613
|
+
message.nullifier = reader.bytes();
|
|
614
|
+
break;
|
|
615
|
+
case 4:
|
|
616
|
+
message.merkleRoot = reader.bytes();
|
|
617
|
+
break;
|
|
618
|
+
case 5:
|
|
619
|
+
message.proofDomain = reader.int32();
|
|
620
|
+
break;
|
|
621
|
+
case 6:
|
|
622
|
+
message.minTrustLevel = reader.uint32();
|
|
623
|
+
break;
|
|
624
|
+
case 7:
|
|
625
|
+
message.encryptedPayload = reader.bytes();
|
|
626
|
+
break;
|
|
627
|
+
case 8:
|
|
628
|
+
message.submittedAtHeight = reader.int64();
|
|
629
|
+
break;
|
|
630
|
+
case 9:
|
|
631
|
+
message.submittedAtEpoch = reader.uint64();
|
|
632
|
+
break;
|
|
633
|
+
default:
|
|
634
|
+
reader.skipType(tag & 7);
|
|
635
|
+
break;
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
return message;
|
|
639
|
+
},
|
|
640
|
+
fromPartial(object) {
|
|
641
|
+
const message = createBasePendingShieldedOp();
|
|
642
|
+
message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0);
|
|
643
|
+
message.targetEpoch = object.targetEpoch !== undefined && object.targetEpoch !== null ? BigInt(object.targetEpoch.toString()) : BigInt(0);
|
|
644
|
+
message.nullifier = object.nullifier ?? new Uint8Array();
|
|
645
|
+
message.merkleRoot = object.merkleRoot ?? new Uint8Array();
|
|
646
|
+
message.proofDomain = object.proofDomain ?? 0;
|
|
647
|
+
message.minTrustLevel = object.minTrustLevel ?? 0;
|
|
648
|
+
message.encryptedPayload = object.encryptedPayload ?? new Uint8Array();
|
|
649
|
+
message.submittedAtHeight = object.submittedAtHeight !== undefined && object.submittedAtHeight !== null ? BigInt(object.submittedAtHeight.toString()) : BigInt(0);
|
|
650
|
+
message.submittedAtEpoch = object.submittedAtEpoch !== undefined && object.submittedAtEpoch !== null ? BigInt(object.submittedAtEpoch.toString()) : BigInt(0);
|
|
651
|
+
return message;
|
|
652
|
+
},
|
|
653
|
+
fromAmino(object) {
|
|
654
|
+
const message = createBasePendingShieldedOp();
|
|
655
|
+
if (object.id !== undefined && object.id !== null) {
|
|
656
|
+
message.id = BigInt(object.id);
|
|
657
|
+
}
|
|
658
|
+
if (object.target_epoch !== undefined && object.target_epoch !== null) {
|
|
659
|
+
message.targetEpoch = BigInt(object.target_epoch);
|
|
660
|
+
}
|
|
661
|
+
if (object.nullifier !== undefined && object.nullifier !== null) {
|
|
662
|
+
message.nullifier = bytesFromBase64(object.nullifier);
|
|
663
|
+
}
|
|
664
|
+
if (object.merkle_root !== undefined && object.merkle_root !== null) {
|
|
665
|
+
message.merkleRoot = bytesFromBase64(object.merkle_root);
|
|
666
|
+
}
|
|
667
|
+
if (object.proof_domain !== undefined && object.proof_domain !== null) {
|
|
668
|
+
message.proofDomain = object.proof_domain;
|
|
669
|
+
}
|
|
670
|
+
if (object.min_trust_level !== undefined && object.min_trust_level !== null) {
|
|
671
|
+
message.minTrustLevel = object.min_trust_level;
|
|
672
|
+
}
|
|
673
|
+
if (object.encrypted_payload !== undefined && object.encrypted_payload !== null) {
|
|
674
|
+
message.encryptedPayload = bytesFromBase64(object.encrypted_payload);
|
|
675
|
+
}
|
|
676
|
+
if (object.submitted_at_height !== undefined && object.submitted_at_height !== null) {
|
|
677
|
+
message.submittedAtHeight = BigInt(object.submitted_at_height);
|
|
678
|
+
}
|
|
679
|
+
if (object.submitted_at_epoch !== undefined && object.submitted_at_epoch !== null) {
|
|
680
|
+
message.submittedAtEpoch = BigInt(object.submitted_at_epoch);
|
|
681
|
+
}
|
|
682
|
+
return message;
|
|
683
|
+
},
|
|
684
|
+
toAmino(message) {
|
|
685
|
+
const obj = {};
|
|
686
|
+
obj.id = message.id !== BigInt(0) ? message.id?.toString() : undefined;
|
|
687
|
+
obj.target_epoch = message.targetEpoch !== BigInt(0) ? message.targetEpoch?.toString() : undefined;
|
|
688
|
+
obj.nullifier = message.nullifier ? base64FromBytes(message.nullifier) : undefined;
|
|
689
|
+
obj.merkle_root = message.merkleRoot ? base64FromBytes(message.merkleRoot) : undefined;
|
|
690
|
+
obj.proof_domain = message.proofDomain === 0 ? undefined : message.proofDomain;
|
|
691
|
+
obj.min_trust_level = message.minTrustLevel === 0 ? undefined : message.minTrustLevel;
|
|
692
|
+
obj.encrypted_payload = message.encryptedPayload ? base64FromBytes(message.encryptedPayload) : undefined;
|
|
693
|
+
obj.submitted_at_height = message.submittedAtHeight !== BigInt(0) ? message.submittedAtHeight?.toString() : undefined;
|
|
694
|
+
obj.submitted_at_epoch = message.submittedAtEpoch !== BigInt(0) ? message.submittedAtEpoch?.toString() : undefined;
|
|
695
|
+
return obj;
|
|
696
|
+
},
|
|
697
|
+
fromAminoMsg(object) {
|
|
698
|
+
return PendingShieldedOp.fromAmino(object.value);
|
|
699
|
+
},
|
|
700
|
+
fromProtoMsg(message) {
|
|
701
|
+
return PendingShieldedOp.decode(message.value);
|
|
702
|
+
},
|
|
703
|
+
toProto(message) {
|
|
704
|
+
return PendingShieldedOp.encode(message).finish();
|
|
705
|
+
},
|
|
706
|
+
toProtoMsg(message) {
|
|
707
|
+
return {
|
|
708
|
+
typeUrl: "/sparkdream.shield.v1.PendingShieldedOp",
|
|
709
|
+
value: PendingShieldedOp.encode(message).finish()
|
|
710
|
+
};
|
|
711
|
+
}
|
|
712
|
+
};
|
|
713
|
+
function createBaseShieldEpochState() {
|
|
714
|
+
return {
|
|
715
|
+
currentEpoch: BigInt(0),
|
|
716
|
+
epochStartHeight: BigInt(0),
|
|
717
|
+
decryptionKeyAvailable: false
|
|
718
|
+
};
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* ShieldEpochState tracks the current shield epoch and decryption key availability.
|
|
722
|
+
* @name ShieldEpochState
|
|
723
|
+
* @package sparkdream.shield.v1
|
|
724
|
+
* @see proto type: sparkdream.shield.v1.ShieldEpochState
|
|
725
|
+
*/
|
|
726
|
+
export const ShieldEpochState = {
|
|
727
|
+
typeUrl: "/sparkdream.shield.v1.ShieldEpochState",
|
|
728
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
729
|
+
if (message.currentEpoch !== BigInt(0)) {
|
|
730
|
+
writer.uint32(8).uint64(message.currentEpoch);
|
|
731
|
+
}
|
|
732
|
+
if (message.epochStartHeight !== BigInt(0)) {
|
|
733
|
+
writer.uint32(16).int64(message.epochStartHeight);
|
|
734
|
+
}
|
|
735
|
+
if (message.decryptionKeyAvailable === true) {
|
|
736
|
+
writer.uint32(24).bool(message.decryptionKeyAvailable);
|
|
737
|
+
}
|
|
738
|
+
return writer;
|
|
739
|
+
},
|
|
740
|
+
decode(input, length) {
|
|
741
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
742
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
743
|
+
const message = createBaseShieldEpochState();
|
|
744
|
+
while (reader.pos < end) {
|
|
745
|
+
const tag = reader.uint32();
|
|
746
|
+
switch (tag >>> 3) {
|
|
747
|
+
case 1:
|
|
748
|
+
message.currentEpoch = reader.uint64();
|
|
749
|
+
break;
|
|
750
|
+
case 2:
|
|
751
|
+
message.epochStartHeight = reader.int64();
|
|
752
|
+
break;
|
|
753
|
+
case 3:
|
|
754
|
+
message.decryptionKeyAvailable = reader.bool();
|
|
755
|
+
break;
|
|
756
|
+
default:
|
|
757
|
+
reader.skipType(tag & 7);
|
|
758
|
+
break;
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
return message;
|
|
762
|
+
},
|
|
763
|
+
fromPartial(object) {
|
|
764
|
+
const message = createBaseShieldEpochState();
|
|
765
|
+
message.currentEpoch = object.currentEpoch !== undefined && object.currentEpoch !== null ? BigInt(object.currentEpoch.toString()) : BigInt(0);
|
|
766
|
+
message.epochStartHeight = object.epochStartHeight !== undefined && object.epochStartHeight !== null ? BigInt(object.epochStartHeight.toString()) : BigInt(0);
|
|
767
|
+
message.decryptionKeyAvailable = object.decryptionKeyAvailable ?? false;
|
|
768
|
+
return message;
|
|
769
|
+
},
|
|
770
|
+
fromAmino(object) {
|
|
771
|
+
const message = createBaseShieldEpochState();
|
|
772
|
+
if (object.current_epoch !== undefined && object.current_epoch !== null) {
|
|
773
|
+
message.currentEpoch = BigInt(object.current_epoch);
|
|
774
|
+
}
|
|
775
|
+
if (object.epoch_start_height !== undefined && object.epoch_start_height !== null) {
|
|
776
|
+
message.epochStartHeight = BigInt(object.epoch_start_height);
|
|
777
|
+
}
|
|
778
|
+
if (object.decryption_key_available !== undefined && object.decryption_key_available !== null) {
|
|
779
|
+
message.decryptionKeyAvailable = object.decryption_key_available;
|
|
780
|
+
}
|
|
781
|
+
return message;
|
|
782
|
+
},
|
|
783
|
+
toAmino(message) {
|
|
784
|
+
const obj = {};
|
|
785
|
+
obj.current_epoch = message.currentEpoch !== BigInt(0) ? message.currentEpoch?.toString() : undefined;
|
|
786
|
+
obj.epoch_start_height = message.epochStartHeight !== BigInt(0) ? message.epochStartHeight?.toString() : undefined;
|
|
787
|
+
obj.decryption_key_available = message.decryptionKeyAvailable === false ? undefined : message.decryptionKeyAvailable;
|
|
788
|
+
return obj;
|
|
789
|
+
},
|
|
790
|
+
fromAminoMsg(object) {
|
|
791
|
+
return ShieldEpochState.fromAmino(object.value);
|
|
792
|
+
},
|
|
793
|
+
fromProtoMsg(message) {
|
|
794
|
+
return ShieldEpochState.decode(message.value);
|
|
795
|
+
},
|
|
796
|
+
toProto(message) {
|
|
797
|
+
return ShieldEpochState.encode(message).finish();
|
|
798
|
+
},
|
|
799
|
+
toProtoMsg(message) {
|
|
800
|
+
return {
|
|
801
|
+
typeUrl: "/sparkdream.shield.v1.ShieldEpochState",
|
|
802
|
+
value: ShieldEpochState.encode(message).finish()
|
|
803
|
+
};
|
|
804
|
+
}
|
|
805
|
+
};
|
|
806
|
+
function createBaseShieldEpochDecryptionKey() {
|
|
807
|
+
return {
|
|
808
|
+
epoch: BigInt(0),
|
|
809
|
+
decryptionKey: new Uint8Array(),
|
|
810
|
+
reconstructedAtHeight: BigInt(0)
|
|
811
|
+
};
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* ShieldEpochDecryptionKey is the reconstructed epoch decryption key.
|
|
815
|
+
* @name ShieldEpochDecryptionKey
|
|
816
|
+
* @package sparkdream.shield.v1
|
|
817
|
+
* @see proto type: sparkdream.shield.v1.ShieldEpochDecryptionKey
|
|
818
|
+
*/
|
|
819
|
+
export const ShieldEpochDecryptionKey = {
|
|
820
|
+
typeUrl: "/sparkdream.shield.v1.ShieldEpochDecryptionKey",
|
|
821
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
822
|
+
if (message.epoch !== BigInt(0)) {
|
|
823
|
+
writer.uint32(8).uint64(message.epoch);
|
|
824
|
+
}
|
|
825
|
+
if (message.decryptionKey.length !== 0) {
|
|
826
|
+
writer.uint32(18).bytes(message.decryptionKey);
|
|
827
|
+
}
|
|
828
|
+
if (message.reconstructedAtHeight !== BigInt(0)) {
|
|
829
|
+
writer.uint32(24).int64(message.reconstructedAtHeight);
|
|
830
|
+
}
|
|
831
|
+
return writer;
|
|
832
|
+
},
|
|
833
|
+
decode(input, length) {
|
|
834
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
835
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
836
|
+
const message = createBaseShieldEpochDecryptionKey();
|
|
837
|
+
while (reader.pos < end) {
|
|
838
|
+
const tag = reader.uint32();
|
|
839
|
+
switch (tag >>> 3) {
|
|
840
|
+
case 1:
|
|
841
|
+
message.epoch = reader.uint64();
|
|
842
|
+
break;
|
|
843
|
+
case 2:
|
|
844
|
+
message.decryptionKey = reader.bytes();
|
|
845
|
+
break;
|
|
846
|
+
case 3:
|
|
847
|
+
message.reconstructedAtHeight = reader.int64();
|
|
848
|
+
break;
|
|
849
|
+
default:
|
|
850
|
+
reader.skipType(tag & 7);
|
|
851
|
+
break;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
return message;
|
|
855
|
+
},
|
|
856
|
+
fromPartial(object) {
|
|
857
|
+
const message = createBaseShieldEpochDecryptionKey();
|
|
858
|
+
message.epoch = object.epoch !== undefined && object.epoch !== null ? BigInt(object.epoch.toString()) : BigInt(0);
|
|
859
|
+
message.decryptionKey = object.decryptionKey ?? new Uint8Array();
|
|
860
|
+
message.reconstructedAtHeight = object.reconstructedAtHeight !== undefined && object.reconstructedAtHeight !== null ? BigInt(object.reconstructedAtHeight.toString()) : BigInt(0);
|
|
861
|
+
return message;
|
|
862
|
+
},
|
|
863
|
+
fromAmino(object) {
|
|
864
|
+
const message = createBaseShieldEpochDecryptionKey();
|
|
865
|
+
if (object.epoch !== undefined && object.epoch !== null) {
|
|
866
|
+
message.epoch = BigInt(object.epoch);
|
|
867
|
+
}
|
|
868
|
+
if (object.decryption_key !== undefined && object.decryption_key !== null) {
|
|
869
|
+
message.decryptionKey = bytesFromBase64(object.decryption_key);
|
|
870
|
+
}
|
|
871
|
+
if (object.reconstructed_at_height !== undefined && object.reconstructed_at_height !== null) {
|
|
872
|
+
message.reconstructedAtHeight = BigInt(object.reconstructed_at_height);
|
|
873
|
+
}
|
|
874
|
+
return message;
|
|
875
|
+
},
|
|
876
|
+
toAmino(message) {
|
|
877
|
+
const obj = {};
|
|
878
|
+
obj.epoch = message.epoch !== BigInt(0) ? message.epoch?.toString() : undefined;
|
|
879
|
+
obj.decryption_key = message.decryptionKey ? base64FromBytes(message.decryptionKey) : undefined;
|
|
880
|
+
obj.reconstructed_at_height = message.reconstructedAtHeight !== BigInt(0) ? message.reconstructedAtHeight?.toString() : undefined;
|
|
881
|
+
return obj;
|
|
882
|
+
},
|
|
883
|
+
fromAminoMsg(object) {
|
|
884
|
+
return ShieldEpochDecryptionKey.fromAmino(object.value);
|
|
885
|
+
},
|
|
886
|
+
fromProtoMsg(message) {
|
|
887
|
+
return ShieldEpochDecryptionKey.decode(message.value);
|
|
888
|
+
},
|
|
889
|
+
toProto(message) {
|
|
890
|
+
return ShieldEpochDecryptionKey.encode(message).finish();
|
|
891
|
+
},
|
|
892
|
+
toProtoMsg(message) {
|
|
893
|
+
return {
|
|
894
|
+
typeUrl: "/sparkdream.shield.v1.ShieldEpochDecryptionKey",
|
|
895
|
+
value: ShieldEpochDecryptionKey.encode(message).finish()
|
|
896
|
+
};
|
|
897
|
+
}
|
|
898
|
+
};
|
|
899
|
+
function createBaseShieldDecryptionShare() {
|
|
900
|
+
return {
|
|
901
|
+
epoch: BigInt(0),
|
|
902
|
+
validator: "",
|
|
903
|
+
share: new Uint8Array()
|
|
904
|
+
};
|
|
905
|
+
}
|
|
906
|
+
/**
|
|
907
|
+
* ShieldDecryptionShare is a validator's decryption share for a shield epoch.
|
|
908
|
+
* @name ShieldDecryptionShare
|
|
909
|
+
* @package sparkdream.shield.v1
|
|
910
|
+
* @see proto type: sparkdream.shield.v1.ShieldDecryptionShare
|
|
911
|
+
*/
|
|
912
|
+
export const ShieldDecryptionShare = {
|
|
913
|
+
typeUrl: "/sparkdream.shield.v1.ShieldDecryptionShare",
|
|
914
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
915
|
+
if (message.epoch !== BigInt(0)) {
|
|
916
|
+
writer.uint32(8).uint64(message.epoch);
|
|
917
|
+
}
|
|
918
|
+
if (message.validator !== "") {
|
|
919
|
+
writer.uint32(18).string(message.validator);
|
|
920
|
+
}
|
|
921
|
+
if (message.share.length !== 0) {
|
|
922
|
+
writer.uint32(26).bytes(message.share);
|
|
923
|
+
}
|
|
924
|
+
return writer;
|
|
925
|
+
},
|
|
926
|
+
decode(input, length) {
|
|
927
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
928
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
929
|
+
const message = createBaseShieldDecryptionShare();
|
|
930
|
+
while (reader.pos < end) {
|
|
931
|
+
const tag = reader.uint32();
|
|
932
|
+
switch (tag >>> 3) {
|
|
933
|
+
case 1:
|
|
934
|
+
message.epoch = reader.uint64();
|
|
935
|
+
break;
|
|
936
|
+
case 2:
|
|
937
|
+
message.validator = reader.string();
|
|
938
|
+
break;
|
|
939
|
+
case 3:
|
|
940
|
+
message.share = reader.bytes();
|
|
941
|
+
break;
|
|
942
|
+
default:
|
|
943
|
+
reader.skipType(tag & 7);
|
|
944
|
+
break;
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
return message;
|
|
948
|
+
},
|
|
949
|
+
fromPartial(object) {
|
|
950
|
+
const message = createBaseShieldDecryptionShare();
|
|
951
|
+
message.epoch = object.epoch !== undefined && object.epoch !== null ? BigInt(object.epoch.toString()) : BigInt(0);
|
|
952
|
+
message.validator = object.validator ?? "";
|
|
953
|
+
message.share = object.share ?? new Uint8Array();
|
|
954
|
+
return message;
|
|
955
|
+
},
|
|
956
|
+
fromAmino(object) {
|
|
957
|
+
const message = createBaseShieldDecryptionShare();
|
|
958
|
+
if (object.epoch !== undefined && object.epoch !== null) {
|
|
959
|
+
message.epoch = BigInt(object.epoch);
|
|
960
|
+
}
|
|
961
|
+
if (object.validator !== undefined && object.validator !== null) {
|
|
962
|
+
message.validator = object.validator;
|
|
963
|
+
}
|
|
964
|
+
if (object.share !== undefined && object.share !== null) {
|
|
965
|
+
message.share = bytesFromBase64(object.share);
|
|
966
|
+
}
|
|
967
|
+
return message;
|
|
968
|
+
},
|
|
969
|
+
toAmino(message) {
|
|
970
|
+
const obj = {};
|
|
971
|
+
obj.epoch = message.epoch !== BigInt(0) ? message.epoch?.toString() : undefined;
|
|
972
|
+
obj.validator = message.validator === "" ? undefined : message.validator;
|
|
973
|
+
obj.share = message.share ? base64FromBytes(message.share) : undefined;
|
|
974
|
+
return obj;
|
|
975
|
+
},
|
|
976
|
+
fromAminoMsg(object) {
|
|
977
|
+
return ShieldDecryptionShare.fromAmino(object.value);
|
|
978
|
+
},
|
|
979
|
+
fromProtoMsg(message) {
|
|
980
|
+
return ShieldDecryptionShare.decode(message.value);
|
|
981
|
+
},
|
|
982
|
+
toProto(message) {
|
|
983
|
+
return ShieldDecryptionShare.encode(message).finish();
|
|
984
|
+
},
|
|
985
|
+
toProtoMsg(message) {
|
|
986
|
+
return {
|
|
987
|
+
typeUrl: "/sparkdream.shield.v1.ShieldDecryptionShare",
|
|
988
|
+
value: ShieldDecryptionShare.encode(message).finish()
|
|
989
|
+
};
|
|
990
|
+
}
|
|
991
|
+
};
|
|
992
|
+
function createBaseTLEKeySet() {
|
|
993
|
+
return {
|
|
994
|
+
masterPublicKey: new Uint8Array(),
|
|
995
|
+
thresholdNumerator: BigInt(0),
|
|
996
|
+
thresholdDenominator: BigInt(0),
|
|
997
|
+
validatorShares: [],
|
|
998
|
+
createdAtHeight: BigInt(0)
|
|
999
|
+
};
|
|
1000
|
+
}
|
|
1001
|
+
/**
|
|
1002
|
+
* TLEKeySet stores the master public key and validator shares from the DKG ceremony.
|
|
1003
|
+
* @name TLEKeySet
|
|
1004
|
+
* @package sparkdream.shield.v1
|
|
1005
|
+
* @see proto type: sparkdream.shield.v1.TLEKeySet
|
|
1006
|
+
*/
|
|
1007
|
+
export const TLEKeySet = {
|
|
1008
|
+
typeUrl: "/sparkdream.shield.v1.TLEKeySet",
|
|
1009
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
1010
|
+
if (message.masterPublicKey.length !== 0) {
|
|
1011
|
+
writer.uint32(10).bytes(message.masterPublicKey);
|
|
1012
|
+
}
|
|
1013
|
+
if (message.thresholdNumerator !== BigInt(0)) {
|
|
1014
|
+
writer.uint32(16).uint64(message.thresholdNumerator);
|
|
1015
|
+
}
|
|
1016
|
+
if (message.thresholdDenominator !== BigInt(0)) {
|
|
1017
|
+
writer.uint32(24).uint64(message.thresholdDenominator);
|
|
1018
|
+
}
|
|
1019
|
+
for (const v of message.validatorShares) {
|
|
1020
|
+
TLEValidatorPublicShare.encode(v, writer.uint32(34).fork()).ldelim();
|
|
1021
|
+
}
|
|
1022
|
+
if (message.createdAtHeight !== BigInt(0)) {
|
|
1023
|
+
writer.uint32(40).int64(message.createdAtHeight);
|
|
1024
|
+
}
|
|
1025
|
+
return writer;
|
|
1026
|
+
},
|
|
1027
|
+
decode(input, length) {
|
|
1028
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1029
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1030
|
+
const message = createBaseTLEKeySet();
|
|
1031
|
+
while (reader.pos < end) {
|
|
1032
|
+
const tag = reader.uint32();
|
|
1033
|
+
switch (tag >>> 3) {
|
|
1034
|
+
case 1:
|
|
1035
|
+
message.masterPublicKey = reader.bytes();
|
|
1036
|
+
break;
|
|
1037
|
+
case 2:
|
|
1038
|
+
message.thresholdNumerator = reader.uint64();
|
|
1039
|
+
break;
|
|
1040
|
+
case 3:
|
|
1041
|
+
message.thresholdDenominator = reader.uint64();
|
|
1042
|
+
break;
|
|
1043
|
+
case 4:
|
|
1044
|
+
message.validatorShares.push(TLEValidatorPublicShare.decode(reader, reader.uint32()));
|
|
1045
|
+
break;
|
|
1046
|
+
case 5:
|
|
1047
|
+
message.createdAtHeight = reader.int64();
|
|
1048
|
+
break;
|
|
1049
|
+
default:
|
|
1050
|
+
reader.skipType(tag & 7);
|
|
1051
|
+
break;
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
return message;
|
|
1055
|
+
},
|
|
1056
|
+
fromPartial(object) {
|
|
1057
|
+
const message = createBaseTLEKeySet();
|
|
1058
|
+
message.masterPublicKey = object.masterPublicKey ?? new Uint8Array();
|
|
1059
|
+
message.thresholdNumerator = object.thresholdNumerator !== undefined && object.thresholdNumerator !== null ? BigInt(object.thresholdNumerator.toString()) : BigInt(0);
|
|
1060
|
+
message.thresholdDenominator = object.thresholdDenominator !== undefined && object.thresholdDenominator !== null ? BigInt(object.thresholdDenominator.toString()) : BigInt(0);
|
|
1061
|
+
message.validatorShares = object.validatorShares?.map(e => TLEValidatorPublicShare.fromPartial(e)) || [];
|
|
1062
|
+
message.createdAtHeight = object.createdAtHeight !== undefined && object.createdAtHeight !== null ? BigInt(object.createdAtHeight.toString()) : BigInt(0);
|
|
1063
|
+
return message;
|
|
1064
|
+
},
|
|
1065
|
+
fromAmino(object) {
|
|
1066
|
+
const message = createBaseTLEKeySet();
|
|
1067
|
+
if (object.master_public_key !== undefined && object.master_public_key !== null) {
|
|
1068
|
+
message.masterPublicKey = bytesFromBase64(object.master_public_key);
|
|
1069
|
+
}
|
|
1070
|
+
if (object.threshold_numerator !== undefined && object.threshold_numerator !== null) {
|
|
1071
|
+
message.thresholdNumerator = BigInt(object.threshold_numerator);
|
|
1072
|
+
}
|
|
1073
|
+
if (object.threshold_denominator !== undefined && object.threshold_denominator !== null) {
|
|
1074
|
+
message.thresholdDenominator = BigInt(object.threshold_denominator);
|
|
1075
|
+
}
|
|
1076
|
+
message.validatorShares = object.validator_shares?.map(e => TLEValidatorPublicShare.fromAmino(e)) || [];
|
|
1077
|
+
if (object.created_at_height !== undefined && object.created_at_height !== null) {
|
|
1078
|
+
message.createdAtHeight = BigInt(object.created_at_height);
|
|
1079
|
+
}
|
|
1080
|
+
return message;
|
|
1081
|
+
},
|
|
1082
|
+
toAmino(message) {
|
|
1083
|
+
const obj = {};
|
|
1084
|
+
obj.master_public_key = message.masterPublicKey ? base64FromBytes(message.masterPublicKey) : undefined;
|
|
1085
|
+
obj.threshold_numerator = message.thresholdNumerator !== BigInt(0) ? message.thresholdNumerator?.toString() : undefined;
|
|
1086
|
+
obj.threshold_denominator = message.thresholdDenominator !== BigInt(0) ? message.thresholdDenominator?.toString() : undefined;
|
|
1087
|
+
if (message.validatorShares) {
|
|
1088
|
+
obj.validator_shares = message.validatorShares.map(e => e ? TLEValidatorPublicShare.toAmino(e) : undefined);
|
|
1089
|
+
}
|
|
1090
|
+
else {
|
|
1091
|
+
obj.validator_shares = message.validatorShares;
|
|
1092
|
+
}
|
|
1093
|
+
obj.created_at_height = message.createdAtHeight !== BigInt(0) ? message.createdAtHeight?.toString() : undefined;
|
|
1094
|
+
return obj;
|
|
1095
|
+
},
|
|
1096
|
+
fromAminoMsg(object) {
|
|
1097
|
+
return TLEKeySet.fromAmino(object.value);
|
|
1098
|
+
},
|
|
1099
|
+
fromProtoMsg(message) {
|
|
1100
|
+
return TLEKeySet.decode(message.value);
|
|
1101
|
+
},
|
|
1102
|
+
toProto(message) {
|
|
1103
|
+
return TLEKeySet.encode(message).finish();
|
|
1104
|
+
},
|
|
1105
|
+
toProtoMsg(message) {
|
|
1106
|
+
return {
|
|
1107
|
+
typeUrl: "/sparkdream.shield.v1.TLEKeySet",
|
|
1108
|
+
value: TLEKeySet.encode(message).finish()
|
|
1109
|
+
};
|
|
1110
|
+
}
|
|
1111
|
+
};
|
|
1112
|
+
function createBaseTLEValidatorPublicShare() {
|
|
1113
|
+
return {
|
|
1114
|
+
validatorAddress: "",
|
|
1115
|
+
publicShare: new Uint8Array(),
|
|
1116
|
+
shareIndex: 0,
|
|
1117
|
+
publicShareG2: new Uint8Array()
|
|
1118
|
+
};
|
|
1119
|
+
}
|
|
1120
|
+
/**
|
|
1121
|
+
* TLEValidatorPublicShare stores a validator's public key share from the DKG.
|
|
1122
|
+
* @name TLEValidatorPublicShare
|
|
1123
|
+
* @package sparkdream.shield.v1
|
|
1124
|
+
* @see proto type: sparkdream.shield.v1.TLEValidatorPublicShare
|
|
1125
|
+
*/
|
|
1126
|
+
export const TLEValidatorPublicShare = {
|
|
1127
|
+
typeUrl: "/sparkdream.shield.v1.TLEValidatorPublicShare",
|
|
1128
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
1129
|
+
if (message.validatorAddress !== "") {
|
|
1130
|
+
writer.uint32(10).string(message.validatorAddress);
|
|
1131
|
+
}
|
|
1132
|
+
if (message.publicShare.length !== 0) {
|
|
1133
|
+
writer.uint32(18).bytes(message.publicShare);
|
|
1134
|
+
}
|
|
1135
|
+
if (message.shareIndex !== 0) {
|
|
1136
|
+
writer.uint32(24).uint32(message.shareIndex);
|
|
1137
|
+
}
|
|
1138
|
+
if (message.publicShareG2.length !== 0) {
|
|
1139
|
+
writer.uint32(34).bytes(message.publicShareG2);
|
|
1140
|
+
}
|
|
1141
|
+
return writer;
|
|
1142
|
+
},
|
|
1143
|
+
decode(input, length) {
|
|
1144
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1145
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1146
|
+
const message = createBaseTLEValidatorPublicShare();
|
|
1147
|
+
while (reader.pos < end) {
|
|
1148
|
+
const tag = reader.uint32();
|
|
1149
|
+
switch (tag >>> 3) {
|
|
1150
|
+
case 1:
|
|
1151
|
+
message.validatorAddress = reader.string();
|
|
1152
|
+
break;
|
|
1153
|
+
case 2:
|
|
1154
|
+
message.publicShare = reader.bytes();
|
|
1155
|
+
break;
|
|
1156
|
+
case 3:
|
|
1157
|
+
message.shareIndex = reader.uint32();
|
|
1158
|
+
break;
|
|
1159
|
+
case 4:
|
|
1160
|
+
message.publicShareG2 = reader.bytes();
|
|
1161
|
+
break;
|
|
1162
|
+
default:
|
|
1163
|
+
reader.skipType(tag & 7);
|
|
1164
|
+
break;
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
return message;
|
|
1168
|
+
},
|
|
1169
|
+
fromPartial(object) {
|
|
1170
|
+
const message = createBaseTLEValidatorPublicShare();
|
|
1171
|
+
message.validatorAddress = object.validatorAddress ?? "";
|
|
1172
|
+
message.publicShare = object.publicShare ?? new Uint8Array();
|
|
1173
|
+
message.shareIndex = object.shareIndex ?? 0;
|
|
1174
|
+
message.publicShareG2 = object.publicShareG2 ?? new Uint8Array();
|
|
1175
|
+
return message;
|
|
1176
|
+
},
|
|
1177
|
+
fromAmino(object) {
|
|
1178
|
+
const message = createBaseTLEValidatorPublicShare();
|
|
1179
|
+
if (object.validator_address !== undefined && object.validator_address !== null) {
|
|
1180
|
+
message.validatorAddress = object.validator_address;
|
|
1181
|
+
}
|
|
1182
|
+
if (object.public_share !== undefined && object.public_share !== null) {
|
|
1183
|
+
message.publicShare = bytesFromBase64(object.public_share);
|
|
1184
|
+
}
|
|
1185
|
+
if (object.share_index !== undefined && object.share_index !== null) {
|
|
1186
|
+
message.shareIndex = object.share_index;
|
|
1187
|
+
}
|
|
1188
|
+
if (object.public_share_g2 !== undefined && object.public_share_g2 !== null) {
|
|
1189
|
+
message.publicShareG2 = bytesFromBase64(object.public_share_g2);
|
|
1190
|
+
}
|
|
1191
|
+
return message;
|
|
1192
|
+
},
|
|
1193
|
+
toAmino(message) {
|
|
1194
|
+
const obj = {};
|
|
1195
|
+
obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress;
|
|
1196
|
+
obj.public_share = message.publicShare ? base64FromBytes(message.publicShare) : undefined;
|
|
1197
|
+
obj.share_index = message.shareIndex === 0 ? undefined : message.shareIndex;
|
|
1198
|
+
obj.public_share_g2 = message.publicShareG2 ? base64FromBytes(message.publicShareG2) : undefined;
|
|
1199
|
+
return obj;
|
|
1200
|
+
},
|
|
1201
|
+
fromAminoMsg(object) {
|
|
1202
|
+
return TLEValidatorPublicShare.fromAmino(object.value);
|
|
1203
|
+
},
|
|
1204
|
+
fromProtoMsg(message) {
|
|
1205
|
+
return TLEValidatorPublicShare.decode(message.value);
|
|
1206
|
+
},
|
|
1207
|
+
toProto(message) {
|
|
1208
|
+
return TLEValidatorPublicShare.encode(message).finish();
|
|
1209
|
+
},
|
|
1210
|
+
toProtoMsg(message) {
|
|
1211
|
+
return {
|
|
1212
|
+
typeUrl: "/sparkdream.shield.v1.TLEValidatorPublicShare",
|
|
1213
|
+
value: TLEValidatorPublicShare.encode(message).finish()
|
|
1214
|
+
};
|
|
1215
|
+
}
|
|
1216
|
+
};
|
|
1217
|
+
function createBaseDKGState() {
|
|
1218
|
+
return {
|
|
1219
|
+
round: BigInt(0),
|
|
1220
|
+
phase: 0,
|
|
1221
|
+
openAtHeight: BigInt(0),
|
|
1222
|
+
registrationDeadline: BigInt(0),
|
|
1223
|
+
contributionDeadline: BigInt(0),
|
|
1224
|
+
thresholdNumerator: BigInt(0),
|
|
1225
|
+
thresholdDenominator: BigInt(0),
|
|
1226
|
+
expectedValidators: [],
|
|
1227
|
+
contributionsReceived: BigInt(0)
|
|
1228
|
+
};
|
|
1229
|
+
}
|
|
1230
|
+
/**
|
|
1231
|
+
* DKGState tracks the current state of the on-chain Feldman DKG ceremony.
|
|
1232
|
+
* @name DKGState
|
|
1233
|
+
* @package sparkdream.shield.v1
|
|
1234
|
+
* @see proto type: sparkdream.shield.v1.DKGState
|
|
1235
|
+
*/
|
|
1236
|
+
export const DKGState = {
|
|
1237
|
+
typeUrl: "/sparkdream.shield.v1.DKGState",
|
|
1238
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
1239
|
+
if (message.round !== BigInt(0)) {
|
|
1240
|
+
writer.uint32(8).uint64(message.round);
|
|
1241
|
+
}
|
|
1242
|
+
if (message.phase !== 0) {
|
|
1243
|
+
writer.uint32(16).int32(message.phase);
|
|
1244
|
+
}
|
|
1245
|
+
if (message.openAtHeight !== BigInt(0)) {
|
|
1246
|
+
writer.uint32(24).int64(message.openAtHeight);
|
|
1247
|
+
}
|
|
1248
|
+
if (message.registrationDeadline !== BigInt(0)) {
|
|
1249
|
+
writer.uint32(32).int64(message.registrationDeadline);
|
|
1250
|
+
}
|
|
1251
|
+
if (message.contributionDeadline !== BigInt(0)) {
|
|
1252
|
+
writer.uint32(40).int64(message.contributionDeadline);
|
|
1253
|
+
}
|
|
1254
|
+
if (message.thresholdNumerator !== BigInt(0)) {
|
|
1255
|
+
writer.uint32(48).uint64(message.thresholdNumerator);
|
|
1256
|
+
}
|
|
1257
|
+
if (message.thresholdDenominator !== BigInt(0)) {
|
|
1258
|
+
writer.uint32(56).uint64(message.thresholdDenominator);
|
|
1259
|
+
}
|
|
1260
|
+
for (const v of message.expectedValidators) {
|
|
1261
|
+
writer.uint32(66).string(v);
|
|
1262
|
+
}
|
|
1263
|
+
if (message.contributionsReceived !== BigInt(0)) {
|
|
1264
|
+
writer.uint32(72).uint64(message.contributionsReceived);
|
|
1265
|
+
}
|
|
1266
|
+
return writer;
|
|
1267
|
+
},
|
|
1268
|
+
decode(input, length) {
|
|
1269
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1270
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1271
|
+
const message = createBaseDKGState();
|
|
1272
|
+
while (reader.pos < end) {
|
|
1273
|
+
const tag = reader.uint32();
|
|
1274
|
+
switch (tag >>> 3) {
|
|
1275
|
+
case 1:
|
|
1276
|
+
message.round = reader.uint64();
|
|
1277
|
+
break;
|
|
1278
|
+
case 2:
|
|
1279
|
+
message.phase = reader.int32();
|
|
1280
|
+
break;
|
|
1281
|
+
case 3:
|
|
1282
|
+
message.openAtHeight = reader.int64();
|
|
1283
|
+
break;
|
|
1284
|
+
case 4:
|
|
1285
|
+
message.registrationDeadline = reader.int64();
|
|
1286
|
+
break;
|
|
1287
|
+
case 5:
|
|
1288
|
+
message.contributionDeadline = reader.int64();
|
|
1289
|
+
break;
|
|
1290
|
+
case 6:
|
|
1291
|
+
message.thresholdNumerator = reader.uint64();
|
|
1292
|
+
break;
|
|
1293
|
+
case 7:
|
|
1294
|
+
message.thresholdDenominator = reader.uint64();
|
|
1295
|
+
break;
|
|
1296
|
+
case 8:
|
|
1297
|
+
message.expectedValidators.push(reader.string());
|
|
1298
|
+
break;
|
|
1299
|
+
case 9:
|
|
1300
|
+
message.contributionsReceived = reader.uint64();
|
|
1301
|
+
break;
|
|
1302
|
+
default:
|
|
1303
|
+
reader.skipType(tag & 7);
|
|
1304
|
+
break;
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
return message;
|
|
1308
|
+
},
|
|
1309
|
+
fromPartial(object) {
|
|
1310
|
+
const message = createBaseDKGState();
|
|
1311
|
+
message.round = object.round !== undefined && object.round !== null ? BigInt(object.round.toString()) : BigInt(0);
|
|
1312
|
+
message.phase = object.phase ?? 0;
|
|
1313
|
+
message.openAtHeight = object.openAtHeight !== undefined && object.openAtHeight !== null ? BigInt(object.openAtHeight.toString()) : BigInt(0);
|
|
1314
|
+
message.registrationDeadline = object.registrationDeadline !== undefined && object.registrationDeadline !== null ? BigInt(object.registrationDeadline.toString()) : BigInt(0);
|
|
1315
|
+
message.contributionDeadline = object.contributionDeadline !== undefined && object.contributionDeadline !== null ? BigInt(object.contributionDeadline.toString()) : BigInt(0);
|
|
1316
|
+
message.thresholdNumerator = object.thresholdNumerator !== undefined && object.thresholdNumerator !== null ? BigInt(object.thresholdNumerator.toString()) : BigInt(0);
|
|
1317
|
+
message.thresholdDenominator = object.thresholdDenominator !== undefined && object.thresholdDenominator !== null ? BigInt(object.thresholdDenominator.toString()) : BigInt(0);
|
|
1318
|
+
message.expectedValidators = object.expectedValidators?.map(e => e) || [];
|
|
1319
|
+
message.contributionsReceived = object.contributionsReceived !== undefined && object.contributionsReceived !== null ? BigInt(object.contributionsReceived.toString()) : BigInt(0);
|
|
1320
|
+
return message;
|
|
1321
|
+
},
|
|
1322
|
+
fromAmino(object) {
|
|
1323
|
+
const message = createBaseDKGState();
|
|
1324
|
+
if (object.round !== undefined && object.round !== null) {
|
|
1325
|
+
message.round = BigInt(object.round);
|
|
1326
|
+
}
|
|
1327
|
+
if (object.phase !== undefined && object.phase !== null) {
|
|
1328
|
+
message.phase = object.phase;
|
|
1329
|
+
}
|
|
1330
|
+
if (object.open_at_height !== undefined && object.open_at_height !== null) {
|
|
1331
|
+
message.openAtHeight = BigInt(object.open_at_height);
|
|
1332
|
+
}
|
|
1333
|
+
if (object.registration_deadline !== undefined && object.registration_deadline !== null) {
|
|
1334
|
+
message.registrationDeadline = BigInt(object.registration_deadline);
|
|
1335
|
+
}
|
|
1336
|
+
if (object.contribution_deadline !== undefined && object.contribution_deadline !== null) {
|
|
1337
|
+
message.contributionDeadline = BigInt(object.contribution_deadline);
|
|
1338
|
+
}
|
|
1339
|
+
if (object.threshold_numerator !== undefined && object.threshold_numerator !== null) {
|
|
1340
|
+
message.thresholdNumerator = BigInt(object.threshold_numerator);
|
|
1341
|
+
}
|
|
1342
|
+
if (object.threshold_denominator !== undefined && object.threshold_denominator !== null) {
|
|
1343
|
+
message.thresholdDenominator = BigInt(object.threshold_denominator);
|
|
1344
|
+
}
|
|
1345
|
+
message.expectedValidators = object.expected_validators?.map(e => e) || [];
|
|
1346
|
+
if (object.contributions_received !== undefined && object.contributions_received !== null) {
|
|
1347
|
+
message.contributionsReceived = BigInt(object.contributions_received);
|
|
1348
|
+
}
|
|
1349
|
+
return message;
|
|
1350
|
+
},
|
|
1351
|
+
toAmino(message) {
|
|
1352
|
+
const obj = {};
|
|
1353
|
+
obj.round = message.round !== BigInt(0) ? message.round?.toString() : undefined;
|
|
1354
|
+
obj.phase = message.phase === 0 ? undefined : message.phase;
|
|
1355
|
+
obj.open_at_height = message.openAtHeight !== BigInt(0) ? message.openAtHeight?.toString() : undefined;
|
|
1356
|
+
obj.registration_deadline = message.registrationDeadline !== BigInt(0) ? message.registrationDeadline?.toString() : undefined;
|
|
1357
|
+
obj.contribution_deadline = message.contributionDeadline !== BigInt(0) ? message.contributionDeadline?.toString() : undefined;
|
|
1358
|
+
obj.threshold_numerator = message.thresholdNumerator !== BigInt(0) ? message.thresholdNumerator?.toString() : undefined;
|
|
1359
|
+
obj.threshold_denominator = message.thresholdDenominator !== BigInt(0) ? message.thresholdDenominator?.toString() : undefined;
|
|
1360
|
+
if (message.expectedValidators) {
|
|
1361
|
+
obj.expected_validators = message.expectedValidators.map(e => e);
|
|
1362
|
+
}
|
|
1363
|
+
else {
|
|
1364
|
+
obj.expected_validators = message.expectedValidators;
|
|
1365
|
+
}
|
|
1366
|
+
obj.contributions_received = message.contributionsReceived !== BigInt(0) ? message.contributionsReceived?.toString() : undefined;
|
|
1367
|
+
return obj;
|
|
1368
|
+
},
|
|
1369
|
+
fromAminoMsg(object) {
|
|
1370
|
+
return DKGState.fromAmino(object.value);
|
|
1371
|
+
},
|
|
1372
|
+
fromProtoMsg(message) {
|
|
1373
|
+
return DKGState.decode(message.value);
|
|
1374
|
+
},
|
|
1375
|
+
toProto(message) {
|
|
1376
|
+
return DKGState.encode(message).finish();
|
|
1377
|
+
},
|
|
1378
|
+
toProtoMsg(message) {
|
|
1379
|
+
return {
|
|
1380
|
+
typeUrl: "/sparkdream.shield.v1.DKGState",
|
|
1381
|
+
value: DKGState.encode(message).finish()
|
|
1382
|
+
};
|
|
1383
|
+
}
|
|
1384
|
+
};
|
|
1385
|
+
function createBaseDKGContribution() {
|
|
1386
|
+
return {
|
|
1387
|
+
validatorAddress: "",
|
|
1388
|
+
round: BigInt(0),
|
|
1389
|
+
feldmanCommitments: [],
|
|
1390
|
+
encryptedEvaluations: [],
|
|
1391
|
+
proofOfPossession: new Uint8Array(),
|
|
1392
|
+
feldmanCommitmentsG2: []
|
|
1393
|
+
};
|
|
1394
|
+
}
|
|
1395
|
+
/**
|
|
1396
|
+
* DKGContribution is a validator's Feldman DKG contribution.
|
|
1397
|
+
* @name DKGContribution
|
|
1398
|
+
* @package sparkdream.shield.v1
|
|
1399
|
+
* @see proto type: sparkdream.shield.v1.DKGContribution
|
|
1400
|
+
*/
|
|
1401
|
+
export const DKGContribution = {
|
|
1402
|
+
typeUrl: "/sparkdream.shield.v1.DKGContribution",
|
|
1403
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
1404
|
+
if (message.validatorAddress !== "") {
|
|
1405
|
+
writer.uint32(10).string(message.validatorAddress);
|
|
1406
|
+
}
|
|
1407
|
+
if (message.round !== BigInt(0)) {
|
|
1408
|
+
writer.uint32(16).uint64(message.round);
|
|
1409
|
+
}
|
|
1410
|
+
for (const v of message.feldmanCommitments) {
|
|
1411
|
+
writer.uint32(26).bytes(v);
|
|
1412
|
+
}
|
|
1413
|
+
for (const v of message.encryptedEvaluations) {
|
|
1414
|
+
EncryptedEvaluation.encode(v, writer.uint32(34).fork()).ldelim();
|
|
1415
|
+
}
|
|
1416
|
+
if (message.proofOfPossession.length !== 0) {
|
|
1417
|
+
writer.uint32(42).bytes(message.proofOfPossession);
|
|
1418
|
+
}
|
|
1419
|
+
for (const v of message.feldmanCommitmentsG2) {
|
|
1420
|
+
writer.uint32(50).bytes(v);
|
|
1421
|
+
}
|
|
1422
|
+
return writer;
|
|
1423
|
+
},
|
|
1424
|
+
decode(input, length) {
|
|
1425
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1426
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1427
|
+
const message = createBaseDKGContribution();
|
|
1428
|
+
while (reader.pos < end) {
|
|
1429
|
+
const tag = reader.uint32();
|
|
1430
|
+
switch (tag >>> 3) {
|
|
1431
|
+
case 1:
|
|
1432
|
+
message.validatorAddress = reader.string();
|
|
1433
|
+
break;
|
|
1434
|
+
case 2:
|
|
1435
|
+
message.round = reader.uint64();
|
|
1436
|
+
break;
|
|
1437
|
+
case 3:
|
|
1438
|
+
message.feldmanCommitments.push(reader.bytes());
|
|
1439
|
+
break;
|
|
1440
|
+
case 4:
|
|
1441
|
+
message.encryptedEvaluations.push(EncryptedEvaluation.decode(reader, reader.uint32()));
|
|
1442
|
+
break;
|
|
1443
|
+
case 5:
|
|
1444
|
+
message.proofOfPossession = reader.bytes();
|
|
1445
|
+
break;
|
|
1446
|
+
case 6:
|
|
1447
|
+
message.feldmanCommitmentsG2.push(reader.bytes());
|
|
1448
|
+
break;
|
|
1449
|
+
default:
|
|
1450
|
+
reader.skipType(tag & 7);
|
|
1451
|
+
break;
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
return message;
|
|
1455
|
+
},
|
|
1456
|
+
fromPartial(object) {
|
|
1457
|
+
const message = createBaseDKGContribution();
|
|
1458
|
+
message.validatorAddress = object.validatorAddress ?? "";
|
|
1459
|
+
message.round = object.round !== undefined && object.round !== null ? BigInt(object.round.toString()) : BigInt(0);
|
|
1460
|
+
message.feldmanCommitments = object.feldmanCommitments?.map(e => e) || [];
|
|
1461
|
+
message.encryptedEvaluations = object.encryptedEvaluations?.map(e => EncryptedEvaluation.fromPartial(e)) || [];
|
|
1462
|
+
message.proofOfPossession = object.proofOfPossession ?? new Uint8Array();
|
|
1463
|
+
message.feldmanCommitmentsG2 = object.feldmanCommitmentsG2?.map(e => e) || [];
|
|
1464
|
+
return message;
|
|
1465
|
+
},
|
|
1466
|
+
fromAmino(object) {
|
|
1467
|
+
const message = createBaseDKGContribution();
|
|
1468
|
+
if (object.validator_address !== undefined && object.validator_address !== null) {
|
|
1469
|
+
message.validatorAddress = object.validator_address;
|
|
1470
|
+
}
|
|
1471
|
+
if (object.round !== undefined && object.round !== null) {
|
|
1472
|
+
message.round = BigInt(object.round);
|
|
1473
|
+
}
|
|
1474
|
+
message.feldmanCommitments = object.feldman_commitments?.map(e => bytesFromBase64(e)) || [];
|
|
1475
|
+
message.encryptedEvaluations = object.encrypted_evaluations?.map(e => EncryptedEvaluation.fromAmino(e)) || [];
|
|
1476
|
+
if (object.proof_of_possession !== undefined && object.proof_of_possession !== null) {
|
|
1477
|
+
message.proofOfPossession = bytesFromBase64(object.proof_of_possession);
|
|
1478
|
+
}
|
|
1479
|
+
message.feldmanCommitmentsG2 = object.feldman_commitments_g2?.map(e => bytesFromBase64(e)) || [];
|
|
1480
|
+
return message;
|
|
1481
|
+
},
|
|
1482
|
+
toAmino(message) {
|
|
1483
|
+
const obj = {};
|
|
1484
|
+
obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress;
|
|
1485
|
+
obj.round = message.round !== BigInt(0) ? message.round?.toString() : undefined;
|
|
1486
|
+
if (message.feldmanCommitments) {
|
|
1487
|
+
obj.feldman_commitments = message.feldmanCommitments.map(e => base64FromBytes(e));
|
|
1488
|
+
}
|
|
1489
|
+
else {
|
|
1490
|
+
obj.feldman_commitments = message.feldmanCommitments;
|
|
1491
|
+
}
|
|
1492
|
+
if (message.encryptedEvaluations) {
|
|
1493
|
+
obj.encrypted_evaluations = message.encryptedEvaluations.map(e => e ? EncryptedEvaluation.toAmino(e) : undefined);
|
|
1494
|
+
}
|
|
1495
|
+
else {
|
|
1496
|
+
obj.encrypted_evaluations = message.encryptedEvaluations;
|
|
1497
|
+
}
|
|
1498
|
+
obj.proof_of_possession = message.proofOfPossession ? base64FromBytes(message.proofOfPossession) : undefined;
|
|
1499
|
+
if (message.feldmanCommitmentsG2) {
|
|
1500
|
+
obj.feldman_commitments_g2 = message.feldmanCommitmentsG2.map(e => base64FromBytes(e));
|
|
1501
|
+
}
|
|
1502
|
+
else {
|
|
1503
|
+
obj.feldman_commitments_g2 = message.feldmanCommitmentsG2;
|
|
1504
|
+
}
|
|
1505
|
+
return obj;
|
|
1506
|
+
},
|
|
1507
|
+
fromAminoMsg(object) {
|
|
1508
|
+
return DKGContribution.fromAmino(object.value);
|
|
1509
|
+
},
|
|
1510
|
+
fromProtoMsg(message) {
|
|
1511
|
+
return DKGContribution.decode(message.value);
|
|
1512
|
+
},
|
|
1513
|
+
toProto(message) {
|
|
1514
|
+
return DKGContribution.encode(message).finish();
|
|
1515
|
+
},
|
|
1516
|
+
toProtoMsg(message) {
|
|
1517
|
+
return {
|
|
1518
|
+
typeUrl: "/sparkdream.shield.v1.DKGContribution",
|
|
1519
|
+
value: DKGContribution.encode(message).finish()
|
|
1520
|
+
};
|
|
1521
|
+
}
|
|
1522
|
+
};
|
|
1523
|
+
function createBaseEncryptedEvaluation() {
|
|
1524
|
+
return {
|
|
1525
|
+
targetIndex: 0,
|
|
1526
|
+
ciphertext: new Uint8Array()
|
|
1527
|
+
};
|
|
1528
|
+
}
|
|
1529
|
+
/**
|
|
1530
|
+
* EncryptedEvaluation is an ECIES-encrypted polynomial evaluation for a target validator.
|
|
1531
|
+
* @name EncryptedEvaluation
|
|
1532
|
+
* @package sparkdream.shield.v1
|
|
1533
|
+
* @see proto type: sparkdream.shield.v1.EncryptedEvaluation
|
|
1534
|
+
*/
|
|
1535
|
+
export const EncryptedEvaluation = {
|
|
1536
|
+
typeUrl: "/sparkdream.shield.v1.EncryptedEvaluation",
|
|
1537
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
1538
|
+
if (message.targetIndex !== 0) {
|
|
1539
|
+
writer.uint32(8).uint32(message.targetIndex);
|
|
1540
|
+
}
|
|
1541
|
+
if (message.ciphertext.length !== 0) {
|
|
1542
|
+
writer.uint32(18).bytes(message.ciphertext);
|
|
1543
|
+
}
|
|
1544
|
+
return writer;
|
|
1545
|
+
},
|
|
1546
|
+
decode(input, length) {
|
|
1547
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1548
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1549
|
+
const message = createBaseEncryptedEvaluation();
|
|
1550
|
+
while (reader.pos < end) {
|
|
1551
|
+
const tag = reader.uint32();
|
|
1552
|
+
switch (tag >>> 3) {
|
|
1553
|
+
case 1:
|
|
1554
|
+
message.targetIndex = reader.uint32();
|
|
1555
|
+
break;
|
|
1556
|
+
case 2:
|
|
1557
|
+
message.ciphertext = reader.bytes();
|
|
1558
|
+
break;
|
|
1559
|
+
default:
|
|
1560
|
+
reader.skipType(tag & 7);
|
|
1561
|
+
break;
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
return message;
|
|
1565
|
+
},
|
|
1566
|
+
fromPartial(object) {
|
|
1567
|
+
const message = createBaseEncryptedEvaluation();
|
|
1568
|
+
message.targetIndex = object.targetIndex ?? 0;
|
|
1569
|
+
message.ciphertext = object.ciphertext ?? new Uint8Array();
|
|
1570
|
+
return message;
|
|
1571
|
+
},
|
|
1572
|
+
fromAmino(object) {
|
|
1573
|
+
const message = createBaseEncryptedEvaluation();
|
|
1574
|
+
if (object.target_index !== undefined && object.target_index !== null) {
|
|
1575
|
+
message.targetIndex = object.target_index;
|
|
1576
|
+
}
|
|
1577
|
+
if (object.ciphertext !== undefined && object.ciphertext !== null) {
|
|
1578
|
+
message.ciphertext = bytesFromBase64(object.ciphertext);
|
|
1579
|
+
}
|
|
1580
|
+
return message;
|
|
1581
|
+
},
|
|
1582
|
+
toAmino(message) {
|
|
1583
|
+
const obj = {};
|
|
1584
|
+
obj.target_index = message.targetIndex === 0 ? undefined : message.targetIndex;
|
|
1585
|
+
obj.ciphertext = message.ciphertext ? base64FromBytes(message.ciphertext) : undefined;
|
|
1586
|
+
return obj;
|
|
1587
|
+
},
|
|
1588
|
+
fromAminoMsg(object) {
|
|
1589
|
+
return EncryptedEvaluation.fromAmino(object.value);
|
|
1590
|
+
},
|
|
1591
|
+
fromProtoMsg(message) {
|
|
1592
|
+
return EncryptedEvaluation.decode(message.value);
|
|
1593
|
+
},
|
|
1594
|
+
toProto(message) {
|
|
1595
|
+
return EncryptedEvaluation.encode(message).finish();
|
|
1596
|
+
},
|
|
1597
|
+
toProtoMsg(message) {
|
|
1598
|
+
return {
|
|
1599
|
+
typeUrl: "/sparkdream.shield.v1.EncryptedEvaluation",
|
|
1600
|
+
value: EncryptedEvaluation.encode(message).finish()
|
|
1601
|
+
};
|
|
1602
|
+
}
|
|
1603
|
+
};
|
|
1604
|
+
function createBaseDKGContributionEntry() {
|
|
1605
|
+
return {
|
|
1606
|
+
validatorAddress: "",
|
|
1607
|
+
contribution: DKGContribution.fromPartial({})
|
|
1608
|
+
};
|
|
1609
|
+
}
|
|
1610
|
+
/**
|
|
1611
|
+
* DKGContributionEntry is a genesis helper for exporting DKG contributions.
|
|
1612
|
+
* @name DKGContributionEntry
|
|
1613
|
+
* @package sparkdream.shield.v1
|
|
1614
|
+
* @see proto type: sparkdream.shield.v1.DKGContributionEntry
|
|
1615
|
+
*/
|
|
1616
|
+
export const DKGContributionEntry = {
|
|
1617
|
+
typeUrl: "/sparkdream.shield.v1.DKGContributionEntry",
|
|
1618
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
1619
|
+
if (message.validatorAddress !== "") {
|
|
1620
|
+
writer.uint32(10).string(message.validatorAddress);
|
|
1621
|
+
}
|
|
1622
|
+
if (message.contribution !== undefined) {
|
|
1623
|
+
DKGContribution.encode(message.contribution, writer.uint32(18).fork()).ldelim();
|
|
1624
|
+
}
|
|
1625
|
+
return writer;
|
|
1626
|
+
},
|
|
1627
|
+
decode(input, length) {
|
|
1628
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1629
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1630
|
+
const message = createBaseDKGContributionEntry();
|
|
1631
|
+
while (reader.pos < end) {
|
|
1632
|
+
const tag = reader.uint32();
|
|
1633
|
+
switch (tag >>> 3) {
|
|
1634
|
+
case 1:
|
|
1635
|
+
message.validatorAddress = reader.string();
|
|
1636
|
+
break;
|
|
1637
|
+
case 2:
|
|
1638
|
+
message.contribution = DKGContribution.decode(reader, reader.uint32());
|
|
1639
|
+
break;
|
|
1640
|
+
default:
|
|
1641
|
+
reader.skipType(tag & 7);
|
|
1642
|
+
break;
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
return message;
|
|
1646
|
+
},
|
|
1647
|
+
fromPartial(object) {
|
|
1648
|
+
const message = createBaseDKGContributionEntry();
|
|
1649
|
+
message.validatorAddress = object.validatorAddress ?? "";
|
|
1650
|
+
message.contribution = object.contribution !== undefined && object.contribution !== null ? DKGContribution.fromPartial(object.contribution) : undefined;
|
|
1651
|
+
return message;
|
|
1652
|
+
},
|
|
1653
|
+
fromAmino(object) {
|
|
1654
|
+
const message = createBaseDKGContributionEntry();
|
|
1655
|
+
if (object.validator_address !== undefined && object.validator_address !== null) {
|
|
1656
|
+
message.validatorAddress = object.validator_address;
|
|
1657
|
+
}
|
|
1658
|
+
if (object.contribution !== undefined && object.contribution !== null) {
|
|
1659
|
+
message.contribution = DKGContribution.fromAmino(object.contribution);
|
|
1660
|
+
}
|
|
1661
|
+
return message;
|
|
1662
|
+
},
|
|
1663
|
+
toAmino(message) {
|
|
1664
|
+
const obj = {};
|
|
1665
|
+
obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress;
|
|
1666
|
+
obj.contribution = message.contribution ? DKGContribution.toAmino(message.contribution) : undefined;
|
|
1667
|
+
return obj;
|
|
1668
|
+
},
|
|
1669
|
+
fromAminoMsg(object) {
|
|
1670
|
+
return DKGContributionEntry.fromAmino(object.value);
|
|
1671
|
+
},
|
|
1672
|
+
fromProtoMsg(message) {
|
|
1673
|
+
return DKGContributionEntry.decode(message.value);
|
|
1674
|
+
},
|
|
1675
|
+
toProto(message) {
|
|
1676
|
+
return DKGContributionEntry.encode(message).finish();
|
|
1677
|
+
},
|
|
1678
|
+
toProtoMsg(message) {
|
|
1679
|
+
return {
|
|
1680
|
+
typeUrl: "/sparkdream.shield.v1.DKGContributionEntry",
|
|
1681
|
+
value: DKGContributionEntry.encode(message).finish()
|
|
1682
|
+
};
|
|
1683
|
+
}
|
|
1684
|
+
};
|
|
1685
|
+
function createBaseDKGVoteExtension() {
|
|
1686
|
+
return {
|
|
1687
|
+
round: BigInt(0),
|
|
1688
|
+
phase: 0,
|
|
1689
|
+
registrationPubKey: new Uint8Array(),
|
|
1690
|
+
registrationPop: new Uint8Array(),
|
|
1691
|
+
feldmanCommitments: [],
|
|
1692
|
+
encryptedEvaluations: [],
|
|
1693
|
+
contributionPop: new Uint8Array(),
|
|
1694
|
+
feldmanCommitmentsG2: [],
|
|
1695
|
+
decryptionEpoch: BigInt(0),
|
|
1696
|
+
decryptionShare: new Uint8Array()
|
|
1697
|
+
};
|
|
1698
|
+
}
|
|
1699
|
+
/**
|
|
1700
|
+
* DKGVoteExtension is the payload validators embed in their vote extensions
|
|
1701
|
+
* during DKG ceremonies. The type field determines which data is present.
|
|
1702
|
+
* @name DKGVoteExtension
|
|
1703
|
+
* @package sparkdream.shield.v1
|
|
1704
|
+
* @see proto type: sparkdream.shield.v1.DKGVoteExtension
|
|
1705
|
+
*/
|
|
1706
|
+
export const DKGVoteExtension = {
|
|
1707
|
+
typeUrl: "/sparkdream.shield.v1.DKGVoteExtension",
|
|
1708
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
1709
|
+
if (message.round !== BigInt(0)) {
|
|
1710
|
+
writer.uint32(8).uint64(message.round);
|
|
1711
|
+
}
|
|
1712
|
+
if (message.phase !== 0) {
|
|
1713
|
+
writer.uint32(16).int32(message.phase);
|
|
1714
|
+
}
|
|
1715
|
+
if (message.registrationPubKey.length !== 0) {
|
|
1716
|
+
writer.uint32(26).bytes(message.registrationPubKey);
|
|
1717
|
+
}
|
|
1718
|
+
if (message.registrationPop.length !== 0) {
|
|
1719
|
+
writer.uint32(34).bytes(message.registrationPop);
|
|
1720
|
+
}
|
|
1721
|
+
for (const v of message.feldmanCommitments) {
|
|
1722
|
+
writer.uint32(42).bytes(v);
|
|
1723
|
+
}
|
|
1724
|
+
for (const v of message.encryptedEvaluations) {
|
|
1725
|
+
EncryptedEvaluation.encode(v, writer.uint32(50).fork()).ldelim();
|
|
1726
|
+
}
|
|
1727
|
+
if (message.contributionPop.length !== 0) {
|
|
1728
|
+
writer.uint32(58).bytes(message.contributionPop);
|
|
1729
|
+
}
|
|
1730
|
+
for (const v of message.feldmanCommitmentsG2) {
|
|
1731
|
+
writer.uint32(66).bytes(v);
|
|
1732
|
+
}
|
|
1733
|
+
if (message.decryptionEpoch !== BigInt(0)) {
|
|
1734
|
+
writer.uint32(72).uint64(message.decryptionEpoch);
|
|
1735
|
+
}
|
|
1736
|
+
if (message.decryptionShare.length !== 0) {
|
|
1737
|
+
writer.uint32(82).bytes(message.decryptionShare);
|
|
1738
|
+
}
|
|
1739
|
+
return writer;
|
|
1740
|
+
},
|
|
1741
|
+
decode(input, length) {
|
|
1742
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1743
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1744
|
+
const message = createBaseDKGVoteExtension();
|
|
1745
|
+
while (reader.pos < end) {
|
|
1746
|
+
const tag = reader.uint32();
|
|
1747
|
+
switch (tag >>> 3) {
|
|
1748
|
+
case 1:
|
|
1749
|
+
message.round = reader.uint64();
|
|
1750
|
+
break;
|
|
1751
|
+
case 2:
|
|
1752
|
+
message.phase = reader.int32();
|
|
1753
|
+
break;
|
|
1754
|
+
case 3:
|
|
1755
|
+
message.registrationPubKey = reader.bytes();
|
|
1756
|
+
break;
|
|
1757
|
+
case 4:
|
|
1758
|
+
message.registrationPop = reader.bytes();
|
|
1759
|
+
break;
|
|
1760
|
+
case 5:
|
|
1761
|
+
message.feldmanCommitments.push(reader.bytes());
|
|
1762
|
+
break;
|
|
1763
|
+
case 6:
|
|
1764
|
+
message.encryptedEvaluations.push(EncryptedEvaluation.decode(reader, reader.uint32()));
|
|
1765
|
+
break;
|
|
1766
|
+
case 7:
|
|
1767
|
+
message.contributionPop = reader.bytes();
|
|
1768
|
+
break;
|
|
1769
|
+
case 8:
|
|
1770
|
+
message.feldmanCommitmentsG2.push(reader.bytes());
|
|
1771
|
+
break;
|
|
1772
|
+
case 9:
|
|
1773
|
+
message.decryptionEpoch = reader.uint64();
|
|
1774
|
+
break;
|
|
1775
|
+
case 10:
|
|
1776
|
+
message.decryptionShare = reader.bytes();
|
|
1777
|
+
break;
|
|
1778
|
+
default:
|
|
1779
|
+
reader.skipType(tag & 7);
|
|
1780
|
+
break;
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
return message;
|
|
1784
|
+
},
|
|
1785
|
+
fromPartial(object) {
|
|
1786
|
+
const message = createBaseDKGVoteExtension();
|
|
1787
|
+
message.round = object.round !== undefined && object.round !== null ? BigInt(object.round.toString()) : BigInt(0);
|
|
1788
|
+
message.phase = object.phase ?? 0;
|
|
1789
|
+
message.registrationPubKey = object.registrationPubKey ?? new Uint8Array();
|
|
1790
|
+
message.registrationPop = object.registrationPop ?? new Uint8Array();
|
|
1791
|
+
message.feldmanCommitments = object.feldmanCommitments?.map(e => e) || [];
|
|
1792
|
+
message.encryptedEvaluations = object.encryptedEvaluations?.map(e => EncryptedEvaluation.fromPartial(e)) || [];
|
|
1793
|
+
message.contributionPop = object.contributionPop ?? new Uint8Array();
|
|
1794
|
+
message.feldmanCommitmentsG2 = object.feldmanCommitmentsG2?.map(e => e) || [];
|
|
1795
|
+
message.decryptionEpoch = object.decryptionEpoch !== undefined && object.decryptionEpoch !== null ? BigInt(object.decryptionEpoch.toString()) : BigInt(0);
|
|
1796
|
+
message.decryptionShare = object.decryptionShare ?? new Uint8Array();
|
|
1797
|
+
return message;
|
|
1798
|
+
},
|
|
1799
|
+
fromAmino(object) {
|
|
1800
|
+
const message = createBaseDKGVoteExtension();
|
|
1801
|
+
if (object.round !== undefined && object.round !== null) {
|
|
1802
|
+
message.round = BigInt(object.round);
|
|
1803
|
+
}
|
|
1804
|
+
if (object.phase !== undefined && object.phase !== null) {
|
|
1805
|
+
message.phase = object.phase;
|
|
1806
|
+
}
|
|
1807
|
+
if (object.registration_pub_key !== undefined && object.registration_pub_key !== null) {
|
|
1808
|
+
message.registrationPubKey = bytesFromBase64(object.registration_pub_key);
|
|
1809
|
+
}
|
|
1810
|
+
if (object.registration_pop !== undefined && object.registration_pop !== null) {
|
|
1811
|
+
message.registrationPop = bytesFromBase64(object.registration_pop);
|
|
1812
|
+
}
|
|
1813
|
+
message.feldmanCommitments = object.feldman_commitments?.map(e => bytesFromBase64(e)) || [];
|
|
1814
|
+
message.encryptedEvaluations = object.encrypted_evaluations?.map(e => EncryptedEvaluation.fromAmino(e)) || [];
|
|
1815
|
+
if (object.contribution_pop !== undefined && object.contribution_pop !== null) {
|
|
1816
|
+
message.contributionPop = bytesFromBase64(object.contribution_pop);
|
|
1817
|
+
}
|
|
1818
|
+
message.feldmanCommitmentsG2 = object.feldman_commitments_g2?.map(e => bytesFromBase64(e)) || [];
|
|
1819
|
+
if (object.decryption_epoch !== undefined && object.decryption_epoch !== null) {
|
|
1820
|
+
message.decryptionEpoch = BigInt(object.decryption_epoch);
|
|
1821
|
+
}
|
|
1822
|
+
if (object.decryption_share !== undefined && object.decryption_share !== null) {
|
|
1823
|
+
message.decryptionShare = bytesFromBase64(object.decryption_share);
|
|
1824
|
+
}
|
|
1825
|
+
return message;
|
|
1826
|
+
},
|
|
1827
|
+
toAmino(message) {
|
|
1828
|
+
const obj = {};
|
|
1829
|
+
obj.round = message.round !== BigInt(0) ? message.round?.toString() : undefined;
|
|
1830
|
+
obj.phase = message.phase === 0 ? undefined : message.phase;
|
|
1831
|
+
obj.registration_pub_key = message.registrationPubKey ? base64FromBytes(message.registrationPubKey) : undefined;
|
|
1832
|
+
obj.registration_pop = message.registrationPop ? base64FromBytes(message.registrationPop) : undefined;
|
|
1833
|
+
if (message.feldmanCommitments) {
|
|
1834
|
+
obj.feldman_commitments = message.feldmanCommitments.map(e => base64FromBytes(e));
|
|
1835
|
+
}
|
|
1836
|
+
else {
|
|
1837
|
+
obj.feldman_commitments = message.feldmanCommitments;
|
|
1838
|
+
}
|
|
1839
|
+
if (message.encryptedEvaluations) {
|
|
1840
|
+
obj.encrypted_evaluations = message.encryptedEvaluations.map(e => e ? EncryptedEvaluation.toAmino(e) : undefined);
|
|
1841
|
+
}
|
|
1842
|
+
else {
|
|
1843
|
+
obj.encrypted_evaluations = message.encryptedEvaluations;
|
|
1844
|
+
}
|
|
1845
|
+
obj.contribution_pop = message.contributionPop ? base64FromBytes(message.contributionPop) : undefined;
|
|
1846
|
+
if (message.feldmanCommitmentsG2) {
|
|
1847
|
+
obj.feldman_commitments_g2 = message.feldmanCommitmentsG2.map(e => base64FromBytes(e));
|
|
1848
|
+
}
|
|
1849
|
+
else {
|
|
1850
|
+
obj.feldman_commitments_g2 = message.feldmanCommitmentsG2;
|
|
1851
|
+
}
|
|
1852
|
+
obj.decryption_epoch = message.decryptionEpoch !== BigInt(0) ? message.decryptionEpoch?.toString() : undefined;
|
|
1853
|
+
obj.decryption_share = message.decryptionShare ? base64FromBytes(message.decryptionShare) : undefined;
|
|
1854
|
+
return obj;
|
|
1855
|
+
},
|
|
1856
|
+
fromAminoMsg(object) {
|
|
1857
|
+
return DKGVoteExtension.fromAmino(object.value);
|
|
1858
|
+
},
|
|
1859
|
+
fromProtoMsg(message) {
|
|
1860
|
+
return DKGVoteExtension.decode(message.value);
|
|
1861
|
+
},
|
|
1862
|
+
toProto(message) {
|
|
1863
|
+
return DKGVoteExtension.encode(message).finish();
|
|
1864
|
+
},
|
|
1865
|
+
toProtoMsg(message) {
|
|
1866
|
+
return {
|
|
1867
|
+
typeUrl: "/sparkdream.shield.v1.DKGVoteExtension",
|
|
1868
|
+
value: DKGVoteExtension.encode(message).finish()
|
|
1869
|
+
};
|
|
1870
|
+
}
|
|
1871
|
+
};
|
|
1872
|
+
function createBaseInjectedDKGData() {
|
|
1873
|
+
return {
|
|
1874
|
+
round: BigInt(0),
|
|
1875
|
+
phase: 0,
|
|
1876
|
+
extensions: [],
|
|
1877
|
+
decryptionShares: []
|
|
1878
|
+
};
|
|
1879
|
+
}
|
|
1880
|
+
/**
|
|
1881
|
+
* InjectedDKGData is the aggregated shield data injected by the block proposer
|
|
1882
|
+
* as a pseudo-transaction at position 0 of the block.
|
|
1883
|
+
* Carries DKG ceremony data (during REGISTERING/CONTRIBUTING) and/or
|
|
1884
|
+
* epoch decryption shares (during ACTIVE phase with pending ops).
|
|
1885
|
+
* @name InjectedDKGData
|
|
1886
|
+
* @package sparkdream.shield.v1
|
|
1887
|
+
* @see proto type: sparkdream.shield.v1.InjectedDKGData
|
|
1888
|
+
*/
|
|
1889
|
+
export const InjectedDKGData = {
|
|
1890
|
+
typeUrl: "/sparkdream.shield.v1.InjectedDKGData",
|
|
1891
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
1892
|
+
if (message.round !== BigInt(0)) {
|
|
1893
|
+
writer.uint32(8).uint64(message.round);
|
|
1894
|
+
}
|
|
1895
|
+
if (message.phase !== 0) {
|
|
1896
|
+
writer.uint32(16).int32(message.phase);
|
|
1897
|
+
}
|
|
1898
|
+
for (const v of message.extensions) {
|
|
1899
|
+
ValidatorDKGExtension.encode(v, writer.uint32(26).fork()).ldelim();
|
|
1900
|
+
}
|
|
1901
|
+
for (const v of message.decryptionShares) {
|
|
1902
|
+
InjectedDecryptionShare.encode(v, writer.uint32(34).fork()).ldelim();
|
|
1903
|
+
}
|
|
1904
|
+
return writer;
|
|
1905
|
+
},
|
|
1906
|
+
decode(input, length) {
|
|
1907
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1908
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1909
|
+
const message = createBaseInjectedDKGData();
|
|
1910
|
+
while (reader.pos < end) {
|
|
1911
|
+
const tag = reader.uint32();
|
|
1912
|
+
switch (tag >>> 3) {
|
|
1913
|
+
case 1:
|
|
1914
|
+
message.round = reader.uint64();
|
|
1915
|
+
break;
|
|
1916
|
+
case 2:
|
|
1917
|
+
message.phase = reader.int32();
|
|
1918
|
+
break;
|
|
1919
|
+
case 3:
|
|
1920
|
+
message.extensions.push(ValidatorDKGExtension.decode(reader, reader.uint32()));
|
|
1921
|
+
break;
|
|
1922
|
+
case 4:
|
|
1923
|
+
message.decryptionShares.push(InjectedDecryptionShare.decode(reader, reader.uint32()));
|
|
1924
|
+
break;
|
|
1925
|
+
default:
|
|
1926
|
+
reader.skipType(tag & 7);
|
|
1927
|
+
break;
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
return message;
|
|
1931
|
+
},
|
|
1932
|
+
fromPartial(object) {
|
|
1933
|
+
const message = createBaseInjectedDKGData();
|
|
1934
|
+
message.round = object.round !== undefined && object.round !== null ? BigInt(object.round.toString()) : BigInt(0);
|
|
1935
|
+
message.phase = object.phase ?? 0;
|
|
1936
|
+
message.extensions = object.extensions?.map(e => ValidatorDKGExtension.fromPartial(e)) || [];
|
|
1937
|
+
message.decryptionShares = object.decryptionShares?.map(e => InjectedDecryptionShare.fromPartial(e)) || [];
|
|
1938
|
+
return message;
|
|
1939
|
+
},
|
|
1940
|
+
fromAmino(object) {
|
|
1941
|
+
const message = createBaseInjectedDKGData();
|
|
1942
|
+
if (object.round !== undefined && object.round !== null) {
|
|
1943
|
+
message.round = BigInt(object.round);
|
|
1944
|
+
}
|
|
1945
|
+
if (object.phase !== undefined && object.phase !== null) {
|
|
1946
|
+
message.phase = object.phase;
|
|
1947
|
+
}
|
|
1948
|
+
message.extensions = object.extensions?.map(e => ValidatorDKGExtension.fromAmino(e)) || [];
|
|
1949
|
+
message.decryptionShares = object.decryption_shares?.map(e => InjectedDecryptionShare.fromAmino(e)) || [];
|
|
1950
|
+
return message;
|
|
1951
|
+
},
|
|
1952
|
+
toAmino(message) {
|
|
1953
|
+
const obj = {};
|
|
1954
|
+
obj.round = message.round !== BigInt(0) ? message.round?.toString() : undefined;
|
|
1955
|
+
obj.phase = message.phase === 0 ? undefined : message.phase;
|
|
1956
|
+
if (message.extensions) {
|
|
1957
|
+
obj.extensions = message.extensions.map(e => e ? ValidatorDKGExtension.toAmino(e) : undefined);
|
|
1958
|
+
}
|
|
1959
|
+
else {
|
|
1960
|
+
obj.extensions = message.extensions;
|
|
1961
|
+
}
|
|
1962
|
+
if (message.decryptionShares) {
|
|
1963
|
+
obj.decryption_shares = message.decryptionShares.map(e => e ? InjectedDecryptionShare.toAmino(e) : undefined);
|
|
1964
|
+
}
|
|
1965
|
+
else {
|
|
1966
|
+
obj.decryption_shares = message.decryptionShares;
|
|
1967
|
+
}
|
|
1968
|
+
return obj;
|
|
1969
|
+
},
|
|
1970
|
+
fromAminoMsg(object) {
|
|
1971
|
+
return InjectedDKGData.fromAmino(object.value);
|
|
1972
|
+
},
|
|
1973
|
+
fromProtoMsg(message) {
|
|
1974
|
+
return InjectedDKGData.decode(message.value);
|
|
1975
|
+
},
|
|
1976
|
+
toProto(message) {
|
|
1977
|
+
return InjectedDKGData.encode(message).finish();
|
|
1978
|
+
},
|
|
1979
|
+
toProtoMsg(message) {
|
|
1980
|
+
return {
|
|
1981
|
+
typeUrl: "/sparkdream.shield.v1.InjectedDKGData",
|
|
1982
|
+
value: InjectedDKGData.encode(message).finish()
|
|
1983
|
+
};
|
|
1984
|
+
}
|
|
1985
|
+
};
|
|
1986
|
+
function createBaseInjectedDecryptionShare() {
|
|
1987
|
+
return {
|
|
1988
|
+
validatorAddress: new Uint8Array(),
|
|
1989
|
+
epoch: BigInt(0),
|
|
1990
|
+
share: new Uint8Array()
|
|
1991
|
+
};
|
|
1992
|
+
}
|
|
1993
|
+
/**
|
|
1994
|
+
* InjectedDecryptionShare pairs a validator's consensus address with their
|
|
1995
|
+
* epoch decryption share for threshold reconstruction.
|
|
1996
|
+
* @name InjectedDecryptionShare
|
|
1997
|
+
* @package sparkdream.shield.v1
|
|
1998
|
+
* @see proto type: sparkdream.shield.v1.InjectedDecryptionShare
|
|
1999
|
+
*/
|
|
2000
|
+
export const InjectedDecryptionShare = {
|
|
2001
|
+
typeUrl: "/sparkdream.shield.v1.InjectedDecryptionShare",
|
|
2002
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
2003
|
+
if (message.validatorAddress.length !== 0) {
|
|
2004
|
+
writer.uint32(10).bytes(message.validatorAddress);
|
|
2005
|
+
}
|
|
2006
|
+
if (message.epoch !== BigInt(0)) {
|
|
2007
|
+
writer.uint32(16).uint64(message.epoch);
|
|
2008
|
+
}
|
|
2009
|
+
if (message.share.length !== 0) {
|
|
2010
|
+
writer.uint32(26).bytes(message.share);
|
|
2011
|
+
}
|
|
2012
|
+
return writer;
|
|
2013
|
+
},
|
|
2014
|
+
decode(input, length) {
|
|
2015
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2016
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2017
|
+
const message = createBaseInjectedDecryptionShare();
|
|
2018
|
+
while (reader.pos < end) {
|
|
2019
|
+
const tag = reader.uint32();
|
|
2020
|
+
switch (tag >>> 3) {
|
|
2021
|
+
case 1:
|
|
2022
|
+
message.validatorAddress = reader.bytes();
|
|
2023
|
+
break;
|
|
2024
|
+
case 2:
|
|
2025
|
+
message.epoch = reader.uint64();
|
|
2026
|
+
break;
|
|
2027
|
+
case 3:
|
|
2028
|
+
message.share = reader.bytes();
|
|
2029
|
+
break;
|
|
2030
|
+
default:
|
|
2031
|
+
reader.skipType(tag & 7);
|
|
2032
|
+
break;
|
|
2033
|
+
}
|
|
2034
|
+
}
|
|
2035
|
+
return message;
|
|
2036
|
+
},
|
|
2037
|
+
fromPartial(object) {
|
|
2038
|
+
const message = createBaseInjectedDecryptionShare();
|
|
2039
|
+
message.validatorAddress = object.validatorAddress ?? new Uint8Array();
|
|
2040
|
+
message.epoch = object.epoch !== undefined && object.epoch !== null ? BigInt(object.epoch.toString()) : BigInt(0);
|
|
2041
|
+
message.share = object.share ?? new Uint8Array();
|
|
2042
|
+
return message;
|
|
2043
|
+
},
|
|
2044
|
+
fromAmino(object) {
|
|
2045
|
+
const message = createBaseInjectedDecryptionShare();
|
|
2046
|
+
if (object.validator_address !== undefined && object.validator_address !== null) {
|
|
2047
|
+
message.validatorAddress = bytesFromBase64(object.validator_address);
|
|
2048
|
+
}
|
|
2049
|
+
if (object.epoch !== undefined && object.epoch !== null) {
|
|
2050
|
+
message.epoch = BigInt(object.epoch);
|
|
2051
|
+
}
|
|
2052
|
+
if (object.share !== undefined && object.share !== null) {
|
|
2053
|
+
message.share = bytesFromBase64(object.share);
|
|
2054
|
+
}
|
|
2055
|
+
return message;
|
|
2056
|
+
},
|
|
2057
|
+
toAmino(message) {
|
|
2058
|
+
const obj = {};
|
|
2059
|
+
obj.validator_address = message.validatorAddress ? base64FromBytes(message.validatorAddress) : undefined;
|
|
2060
|
+
obj.epoch = message.epoch !== BigInt(0) ? message.epoch?.toString() : undefined;
|
|
2061
|
+
obj.share = message.share ? base64FromBytes(message.share) : undefined;
|
|
2062
|
+
return obj;
|
|
2063
|
+
},
|
|
2064
|
+
fromAminoMsg(object) {
|
|
2065
|
+
return InjectedDecryptionShare.fromAmino(object.value);
|
|
2066
|
+
},
|
|
2067
|
+
fromProtoMsg(message) {
|
|
2068
|
+
return InjectedDecryptionShare.decode(message.value);
|
|
2069
|
+
},
|
|
2070
|
+
toProto(message) {
|
|
2071
|
+
return InjectedDecryptionShare.encode(message).finish();
|
|
2072
|
+
},
|
|
2073
|
+
toProtoMsg(message) {
|
|
2074
|
+
return {
|
|
2075
|
+
typeUrl: "/sparkdream.shield.v1.InjectedDecryptionShare",
|
|
2076
|
+
value: InjectedDecryptionShare.encode(message).finish()
|
|
2077
|
+
};
|
|
2078
|
+
}
|
|
2079
|
+
};
|
|
2080
|
+
function createBaseValidatorDKGExtension() {
|
|
2081
|
+
return {
|
|
2082
|
+
validatorAddress: new Uint8Array(),
|
|
2083
|
+
extension: DKGVoteExtension.fromPartial({})
|
|
2084
|
+
};
|
|
2085
|
+
}
|
|
2086
|
+
/**
|
|
2087
|
+
* ValidatorDKGExtension pairs a validator's consensus address with their DKG vote extension.
|
|
2088
|
+
* @name ValidatorDKGExtension
|
|
2089
|
+
* @package sparkdream.shield.v1
|
|
2090
|
+
* @see proto type: sparkdream.shield.v1.ValidatorDKGExtension
|
|
2091
|
+
*/
|
|
2092
|
+
export const ValidatorDKGExtension = {
|
|
2093
|
+
typeUrl: "/sparkdream.shield.v1.ValidatorDKGExtension",
|
|
2094
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
2095
|
+
if (message.validatorAddress.length !== 0) {
|
|
2096
|
+
writer.uint32(10).bytes(message.validatorAddress);
|
|
2097
|
+
}
|
|
2098
|
+
if (message.extension !== undefined) {
|
|
2099
|
+
DKGVoteExtension.encode(message.extension, writer.uint32(18).fork()).ldelim();
|
|
2100
|
+
}
|
|
2101
|
+
return writer;
|
|
2102
|
+
},
|
|
2103
|
+
decode(input, length) {
|
|
2104
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2105
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2106
|
+
const message = createBaseValidatorDKGExtension();
|
|
2107
|
+
while (reader.pos < end) {
|
|
2108
|
+
const tag = reader.uint32();
|
|
2109
|
+
switch (tag >>> 3) {
|
|
2110
|
+
case 1:
|
|
2111
|
+
message.validatorAddress = reader.bytes();
|
|
2112
|
+
break;
|
|
2113
|
+
case 2:
|
|
2114
|
+
message.extension = DKGVoteExtension.decode(reader, reader.uint32());
|
|
2115
|
+
break;
|
|
2116
|
+
default:
|
|
2117
|
+
reader.skipType(tag & 7);
|
|
2118
|
+
break;
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
return message;
|
|
2122
|
+
},
|
|
2123
|
+
fromPartial(object) {
|
|
2124
|
+
const message = createBaseValidatorDKGExtension();
|
|
2125
|
+
message.validatorAddress = object.validatorAddress ?? new Uint8Array();
|
|
2126
|
+
message.extension = object.extension !== undefined && object.extension !== null ? DKGVoteExtension.fromPartial(object.extension) : undefined;
|
|
2127
|
+
return message;
|
|
2128
|
+
},
|
|
2129
|
+
fromAmino(object) {
|
|
2130
|
+
const message = createBaseValidatorDKGExtension();
|
|
2131
|
+
if (object.validator_address !== undefined && object.validator_address !== null) {
|
|
2132
|
+
message.validatorAddress = bytesFromBase64(object.validator_address);
|
|
2133
|
+
}
|
|
2134
|
+
if (object.extension !== undefined && object.extension !== null) {
|
|
2135
|
+
message.extension = DKGVoteExtension.fromAmino(object.extension);
|
|
2136
|
+
}
|
|
2137
|
+
return message;
|
|
2138
|
+
},
|
|
2139
|
+
toAmino(message) {
|
|
2140
|
+
const obj = {};
|
|
2141
|
+
obj.validator_address = message.validatorAddress ? base64FromBytes(message.validatorAddress) : undefined;
|
|
2142
|
+
obj.extension = message.extension ? DKGVoteExtension.toAmino(message.extension) : undefined;
|
|
2143
|
+
return obj;
|
|
2144
|
+
},
|
|
2145
|
+
fromAminoMsg(object) {
|
|
2146
|
+
return ValidatorDKGExtension.fromAmino(object.value);
|
|
2147
|
+
},
|
|
2148
|
+
fromProtoMsg(message) {
|
|
2149
|
+
return ValidatorDKGExtension.decode(message.value);
|
|
2150
|
+
},
|
|
2151
|
+
toProto(message) {
|
|
2152
|
+
return ValidatorDKGExtension.encode(message).finish();
|
|
2153
|
+
},
|
|
2154
|
+
toProtoMsg(message) {
|
|
2155
|
+
return {
|
|
2156
|
+
typeUrl: "/sparkdream.shield.v1.ValidatorDKGExtension",
|
|
2157
|
+
value: ValidatorDKGExtension.encode(message).finish()
|
|
2158
|
+
};
|
|
2159
|
+
}
|
|
2160
|
+
};
|
|
2161
|
+
function createBaseVerificationKey() {
|
|
2162
|
+
return {
|
|
2163
|
+
circuitId: "",
|
|
2164
|
+
vkBytes: new Uint8Array(),
|
|
2165
|
+
description: ""
|
|
2166
|
+
};
|
|
2167
|
+
}
|
|
2168
|
+
/**
|
|
2169
|
+
* VerificationKey stores a ZK circuit verification key.
|
|
2170
|
+
* @name VerificationKey
|
|
2171
|
+
* @package sparkdream.shield.v1
|
|
2172
|
+
* @see proto type: sparkdream.shield.v1.VerificationKey
|
|
2173
|
+
*/
|
|
2174
|
+
export const VerificationKey = {
|
|
2175
|
+
typeUrl: "/sparkdream.shield.v1.VerificationKey",
|
|
2176
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
2177
|
+
if (message.circuitId !== "") {
|
|
2178
|
+
writer.uint32(10).string(message.circuitId);
|
|
2179
|
+
}
|
|
2180
|
+
if (message.vkBytes.length !== 0) {
|
|
2181
|
+
writer.uint32(18).bytes(message.vkBytes);
|
|
2182
|
+
}
|
|
2183
|
+
if (message.description !== "") {
|
|
2184
|
+
writer.uint32(26).string(message.description);
|
|
2185
|
+
}
|
|
2186
|
+
return writer;
|
|
2187
|
+
},
|
|
2188
|
+
decode(input, length) {
|
|
2189
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2190
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2191
|
+
const message = createBaseVerificationKey();
|
|
2192
|
+
while (reader.pos < end) {
|
|
2193
|
+
const tag = reader.uint32();
|
|
2194
|
+
switch (tag >>> 3) {
|
|
2195
|
+
case 1:
|
|
2196
|
+
message.circuitId = reader.string();
|
|
2197
|
+
break;
|
|
2198
|
+
case 2:
|
|
2199
|
+
message.vkBytes = reader.bytes();
|
|
2200
|
+
break;
|
|
2201
|
+
case 3:
|
|
2202
|
+
message.description = reader.string();
|
|
2203
|
+
break;
|
|
2204
|
+
default:
|
|
2205
|
+
reader.skipType(tag & 7);
|
|
2206
|
+
break;
|
|
2207
|
+
}
|
|
2208
|
+
}
|
|
2209
|
+
return message;
|
|
2210
|
+
},
|
|
2211
|
+
fromPartial(object) {
|
|
2212
|
+
const message = createBaseVerificationKey();
|
|
2213
|
+
message.circuitId = object.circuitId ?? "";
|
|
2214
|
+
message.vkBytes = object.vkBytes ?? new Uint8Array();
|
|
2215
|
+
message.description = object.description ?? "";
|
|
2216
|
+
return message;
|
|
2217
|
+
},
|
|
2218
|
+
fromAmino(object) {
|
|
2219
|
+
const message = createBaseVerificationKey();
|
|
2220
|
+
if (object.circuit_id !== undefined && object.circuit_id !== null) {
|
|
2221
|
+
message.circuitId = object.circuit_id;
|
|
2222
|
+
}
|
|
2223
|
+
if (object.vk_bytes !== undefined && object.vk_bytes !== null) {
|
|
2224
|
+
message.vkBytes = bytesFromBase64(object.vk_bytes);
|
|
2225
|
+
}
|
|
2226
|
+
if (object.description !== undefined && object.description !== null) {
|
|
2227
|
+
message.description = object.description;
|
|
2228
|
+
}
|
|
2229
|
+
return message;
|
|
2230
|
+
},
|
|
2231
|
+
toAmino(message) {
|
|
2232
|
+
const obj = {};
|
|
2233
|
+
obj.circuit_id = message.circuitId === "" ? undefined : message.circuitId;
|
|
2234
|
+
obj.vk_bytes = message.vkBytes ? base64FromBytes(message.vkBytes) : undefined;
|
|
2235
|
+
obj.description = message.description === "" ? undefined : message.description;
|
|
2236
|
+
return obj;
|
|
2237
|
+
},
|
|
2238
|
+
fromAminoMsg(object) {
|
|
2239
|
+
return VerificationKey.fromAmino(object.value);
|
|
2240
|
+
},
|
|
2241
|
+
fromProtoMsg(message) {
|
|
2242
|
+
return VerificationKey.decode(message.value);
|
|
2243
|
+
},
|
|
2244
|
+
toProto(message) {
|
|
2245
|
+
return VerificationKey.encode(message).finish();
|
|
2246
|
+
},
|
|
2247
|
+
toProtoMsg(message) {
|
|
2248
|
+
return {
|
|
2249
|
+
typeUrl: "/sparkdream.shield.v1.VerificationKey",
|
|
2250
|
+
value: VerificationKey.encode(message).finish()
|
|
2251
|
+
};
|
|
2252
|
+
}
|
|
2253
|
+
};
|
|
2254
|
+
function createBaseIdentityRateLimitEntry() {
|
|
2255
|
+
return {
|
|
2256
|
+
epoch: BigInt(0),
|
|
2257
|
+
rateLimitNullifierHex: "",
|
|
2258
|
+
count: BigInt(0)
|
|
2259
|
+
};
|
|
2260
|
+
}
|
|
2261
|
+
/**
|
|
2262
|
+
* IdentityRateLimitEntry is a genesis helper for exporting rate limit state.
|
|
2263
|
+
* @name IdentityRateLimitEntry
|
|
2264
|
+
* @package sparkdream.shield.v1
|
|
2265
|
+
* @see proto type: sparkdream.shield.v1.IdentityRateLimitEntry
|
|
2266
|
+
*/
|
|
2267
|
+
export const IdentityRateLimitEntry = {
|
|
2268
|
+
typeUrl: "/sparkdream.shield.v1.IdentityRateLimitEntry",
|
|
2269
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
2270
|
+
if (message.epoch !== BigInt(0)) {
|
|
2271
|
+
writer.uint32(8).uint64(message.epoch);
|
|
2272
|
+
}
|
|
2273
|
+
if (message.rateLimitNullifierHex !== "") {
|
|
2274
|
+
writer.uint32(18).string(message.rateLimitNullifierHex);
|
|
2275
|
+
}
|
|
2276
|
+
if (message.count !== BigInt(0)) {
|
|
2277
|
+
writer.uint32(24).uint64(message.count);
|
|
2278
|
+
}
|
|
2279
|
+
return writer;
|
|
2280
|
+
},
|
|
2281
|
+
decode(input, length) {
|
|
2282
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2283
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2284
|
+
const message = createBaseIdentityRateLimitEntry();
|
|
2285
|
+
while (reader.pos < end) {
|
|
2286
|
+
const tag = reader.uint32();
|
|
2287
|
+
switch (tag >>> 3) {
|
|
2288
|
+
case 1:
|
|
2289
|
+
message.epoch = reader.uint64();
|
|
2290
|
+
break;
|
|
2291
|
+
case 2:
|
|
2292
|
+
message.rateLimitNullifierHex = reader.string();
|
|
2293
|
+
break;
|
|
2294
|
+
case 3:
|
|
2295
|
+
message.count = reader.uint64();
|
|
2296
|
+
break;
|
|
2297
|
+
default:
|
|
2298
|
+
reader.skipType(tag & 7);
|
|
2299
|
+
break;
|
|
2300
|
+
}
|
|
2301
|
+
}
|
|
2302
|
+
return message;
|
|
2303
|
+
},
|
|
2304
|
+
fromPartial(object) {
|
|
2305
|
+
const message = createBaseIdentityRateLimitEntry();
|
|
2306
|
+
message.epoch = object.epoch !== undefined && object.epoch !== null ? BigInt(object.epoch.toString()) : BigInt(0);
|
|
2307
|
+
message.rateLimitNullifierHex = object.rateLimitNullifierHex ?? "";
|
|
2308
|
+
message.count = object.count !== undefined && object.count !== null ? BigInt(object.count.toString()) : BigInt(0);
|
|
2309
|
+
return message;
|
|
2310
|
+
},
|
|
2311
|
+
fromAmino(object) {
|
|
2312
|
+
const message = createBaseIdentityRateLimitEntry();
|
|
2313
|
+
if (object.epoch !== undefined && object.epoch !== null) {
|
|
2314
|
+
message.epoch = BigInt(object.epoch);
|
|
2315
|
+
}
|
|
2316
|
+
if (object.rate_limit_nullifier_hex !== undefined && object.rate_limit_nullifier_hex !== null) {
|
|
2317
|
+
message.rateLimitNullifierHex = object.rate_limit_nullifier_hex;
|
|
2318
|
+
}
|
|
2319
|
+
if (object.count !== undefined && object.count !== null) {
|
|
2320
|
+
message.count = BigInt(object.count);
|
|
2321
|
+
}
|
|
2322
|
+
return message;
|
|
2323
|
+
},
|
|
2324
|
+
toAmino(message) {
|
|
2325
|
+
const obj = {};
|
|
2326
|
+
obj.epoch = message.epoch !== BigInt(0) ? message.epoch?.toString() : undefined;
|
|
2327
|
+
obj.rate_limit_nullifier_hex = message.rateLimitNullifierHex === "" ? undefined : message.rateLimitNullifierHex;
|
|
2328
|
+
obj.count = message.count !== BigInt(0) ? message.count?.toString() : undefined;
|
|
2329
|
+
return obj;
|
|
2330
|
+
},
|
|
2331
|
+
fromAminoMsg(object) {
|
|
2332
|
+
return IdentityRateLimitEntry.fromAmino(object.value);
|
|
2333
|
+
},
|
|
2334
|
+
fromProtoMsg(message) {
|
|
2335
|
+
return IdentityRateLimitEntry.decode(message.value);
|
|
2336
|
+
},
|
|
2337
|
+
toProto(message) {
|
|
2338
|
+
return IdentityRateLimitEntry.encode(message).finish();
|
|
2339
|
+
},
|
|
2340
|
+
toProtoMsg(message) {
|
|
2341
|
+
return {
|
|
2342
|
+
typeUrl: "/sparkdream.shield.v1.IdentityRateLimitEntry",
|
|
2343
|
+
value: IdentityRateLimitEntry.encode(message).finish()
|
|
2344
|
+
};
|
|
2345
|
+
}
|
|
2346
|
+
};
|
|
2347
|
+
function createBaseTLEMissCounterEntry() {
|
|
2348
|
+
return {
|
|
2349
|
+
validatorAddress: "",
|
|
2350
|
+
missCount: BigInt(0)
|
|
2351
|
+
};
|
|
2352
|
+
}
|
|
2353
|
+
/**
|
|
2354
|
+
* TLEMissCounterEntry is a genesis helper for exporting TLE miss counters.
|
|
2355
|
+
* @name TLEMissCounterEntry
|
|
2356
|
+
* @package sparkdream.shield.v1
|
|
2357
|
+
* @see proto type: sparkdream.shield.v1.TLEMissCounterEntry
|
|
2358
|
+
*/
|
|
2359
|
+
export const TLEMissCounterEntry = {
|
|
2360
|
+
typeUrl: "/sparkdream.shield.v1.TLEMissCounterEntry",
|
|
2361
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
2362
|
+
if (message.validatorAddress !== "") {
|
|
2363
|
+
writer.uint32(10).string(message.validatorAddress);
|
|
2364
|
+
}
|
|
2365
|
+
if (message.missCount !== BigInt(0)) {
|
|
2366
|
+
writer.uint32(16).uint64(message.missCount);
|
|
2367
|
+
}
|
|
2368
|
+
return writer;
|
|
2369
|
+
},
|
|
2370
|
+
decode(input, length) {
|
|
2371
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2372
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2373
|
+
const message = createBaseTLEMissCounterEntry();
|
|
2374
|
+
while (reader.pos < end) {
|
|
2375
|
+
const tag = reader.uint32();
|
|
2376
|
+
switch (tag >>> 3) {
|
|
2377
|
+
case 1:
|
|
2378
|
+
message.validatorAddress = reader.string();
|
|
2379
|
+
break;
|
|
2380
|
+
case 2:
|
|
2381
|
+
message.missCount = reader.uint64();
|
|
2382
|
+
break;
|
|
2383
|
+
default:
|
|
2384
|
+
reader.skipType(tag & 7);
|
|
2385
|
+
break;
|
|
2386
|
+
}
|
|
2387
|
+
}
|
|
2388
|
+
return message;
|
|
2389
|
+
},
|
|
2390
|
+
fromPartial(object) {
|
|
2391
|
+
const message = createBaseTLEMissCounterEntry();
|
|
2392
|
+
message.validatorAddress = object.validatorAddress ?? "";
|
|
2393
|
+
message.missCount = object.missCount !== undefined && object.missCount !== null ? BigInt(object.missCount.toString()) : BigInt(0);
|
|
2394
|
+
return message;
|
|
2395
|
+
},
|
|
2396
|
+
fromAmino(object) {
|
|
2397
|
+
const message = createBaseTLEMissCounterEntry();
|
|
2398
|
+
if (object.validator_address !== undefined && object.validator_address !== null) {
|
|
2399
|
+
message.validatorAddress = object.validator_address;
|
|
2400
|
+
}
|
|
2401
|
+
if (object.miss_count !== undefined && object.miss_count !== null) {
|
|
2402
|
+
message.missCount = BigInt(object.miss_count);
|
|
2403
|
+
}
|
|
2404
|
+
return message;
|
|
2405
|
+
},
|
|
2406
|
+
toAmino(message) {
|
|
2407
|
+
const obj = {};
|
|
2408
|
+
obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress;
|
|
2409
|
+
obj.miss_count = message.missCount !== BigInt(0) ? message.missCount?.toString() : undefined;
|
|
2410
|
+
return obj;
|
|
2411
|
+
},
|
|
2412
|
+
fromAminoMsg(object) {
|
|
2413
|
+
return TLEMissCounterEntry.fromAmino(object.value);
|
|
2414
|
+
},
|
|
2415
|
+
fromProtoMsg(message) {
|
|
2416
|
+
return TLEMissCounterEntry.decode(message.value);
|
|
2417
|
+
},
|
|
2418
|
+
toProto(message) {
|
|
2419
|
+
return TLEMissCounterEntry.encode(message).finish();
|
|
2420
|
+
},
|
|
2421
|
+
toProtoMsg(message) {
|
|
2422
|
+
return {
|
|
2423
|
+
typeUrl: "/sparkdream.shield.v1.TLEMissCounterEntry",
|
|
2424
|
+
value: TLEMissCounterEntry.encode(message).finish()
|
|
2425
|
+
};
|
|
2426
|
+
}
|
|
2427
|
+
};
|