@junobuild/functions 0.4.1 → 0.5.1-next-2025-11-29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/canisters/_canister.d.ts +17 -0
  2. package/canisters/_constants.d.ts +3 -0
  3. package/canisters/ckbtc/index.d.ts +1 -0
  4. package/canisters/ckbtc/index.js +2 -0
  5. package/canisters/cketh/index.d.ts +1 -0
  6. package/canisters/cketh/index.js +2 -0
  7. package/canisters/cketh/index.js.map +7 -0
  8. package/canisters/cmc/cmc.canister.d.ts +28 -0
  9. package/canisters/cmc/index.d.ts +2 -0
  10. package/canisters/cmc/index.js +2 -0
  11. package/canisters/cmc/index.js.map +7 -0
  12. package/canisters/declarations/_idl.d.ts +16 -0
  13. package/canisters/declarations/_types.d.ts +16 -0
  14. package/canisters/declarations/ckbtc/bitcoin.did.d.ts +134 -0
  15. package/canisters/declarations/ckbtc/bitcoin.did.idl.d.ts +40 -0
  16. package/canisters/declarations/ckbtc/minter.did.d.ts +831 -0
  17. package/canisters/declarations/ckbtc/minter.did.idl.d.ts +61 -0
  18. package/canisters/declarations/cketh/minter.did.d.ts +893 -0
  19. package/canisters/declarations/cketh/minter.did.idl.d.ts +58 -0
  20. package/canisters/declarations/cketh/orchestrator.did.d.ts +302 -0
  21. package/canisters/declarations/cketh/orchestrator.did.idl.d.ts +34 -0
  22. package/canisters/declarations/cmc/cmc.did.d.ts +344 -0
  23. package/canisters/declarations/cmc/cmc.did.idl.d.ts +53 -0
  24. package/canisters/declarations/ic-management/ic-management.did.d.ts +583 -0
  25. package/canisters/declarations/ic-management/ic-management.did.idl.d.ts +147 -0
  26. package/canisters/declarations/index.d.ts +2 -0
  27. package/canisters/declarations/ledger-icp/index.did.d.ts +119 -0
  28. package/canisters/declarations/ledger-icp/index.did.idl.d.ts +35 -0
  29. package/canisters/declarations/ledger-icp/ledger.did.d.ts +606 -0
  30. package/canisters/declarations/ledger-icp/ledger.did.idl.d.ts +106 -0
  31. package/canisters/declarations/ledger-icrc/icrc_index-ng.did.d.ts +148 -0
  32. package/canisters/declarations/ledger-icrc/icrc_index-ng.did.idl.d.ts +44 -0
  33. package/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +102 -0
  34. package/canisters/declarations/ledger-icrc/icrc_index.did.idl.d.ts +28 -0
  35. package/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +579 -0
  36. package/canisters/declarations/ledger-icrc/icrc_ledger.did.idl.d.ts +100 -0
  37. package/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.d.ts +81 -0
  38. package/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.idl.d.ts +39 -0
  39. package/canisters/declarations/nns/genesis_token.did.d.ts +49 -0
  40. package/canisters/declarations/nns/genesis_token.did.idl.d.ts +24 -0
  41. package/canisters/declarations/nns/governance.did.d.ts +1254 -0
  42. package/canisters/declarations/nns/governance.did.idl.d.ts +217 -0
  43. package/canisters/declarations/nns/governance_test.did.d.ts +1258 -0
  44. package/canisters/declarations/nns/governance_test.did.idl.d.ts +218 -0
  45. package/canisters/declarations/nns/sns_wasm.did.d.ts +286 -0
  46. package/canisters/declarations/nns/sns_wasm.did.idl.d.ts +80 -0
  47. package/canisters/declarations/sns/sns_governance.did.d.ts +834 -0
  48. package/canisters/declarations/sns/sns_governance.did.idl.d.ts +189 -0
  49. package/canisters/declarations/sns/sns_governance_test.did.d.ts +861 -0
  50. package/canisters/declarations/sns/sns_governance_test.did.idl.d.ts +199 -0
  51. package/canisters/declarations/sns/sns_root.did.d.ts +204 -0
  52. package/canisters/declarations/sns/sns_root.did.idl.d.ts +53 -0
  53. package/canisters/declarations/sns/sns_swap.did.d.ts +411 -0
  54. package/canisters/declarations/sns/sns_swap.did.idl.d.ts +108 -0
  55. package/canisters/ic-management/index.d.ts +1 -0
  56. package/canisters/ic-management/index.js +2 -0
  57. package/canisters/ic-management/index.js.map +7 -0
  58. package/canisters/index.d.ts +1 -0
  59. package/canisters/index.js +2 -0
  60. package/canisters/index.js.map +7 -0
  61. package/canisters/ledger/icp/index.d.ts +2 -0
  62. package/canisters/ledger/icp/index.js +2 -0
  63. package/canisters/ledger/icp/index.js.map +7 -0
  64. package/canisters/ledger/icp/ledger.canister.d.ts +24 -0
  65. package/canisters/ledger/icrc/index.d.ts +3 -0
  66. package/canisters/ledger/icrc/index.js +2 -0
  67. package/canisters/ledger/icrc/index.js.map +7 -0
  68. package/canisters/ledger/icrc/ledger.canister.d.ts +45 -0
  69. package/canisters/ledger/icrc/schemas.d.ts +11 -0
  70. package/canisters/nns/index.d.ts +1 -0
  71. package/canisters/nns/index.js +2 -0
  72. package/canisters/nns/index.js.map +7 -0
  73. package/canisters/schemas.d.ts +11 -0
  74. package/canisters/sns/index.d.ts +1 -0
  75. package/canisters/sns/index.js +2 -0
  76. package/canisters/sns/index.js.map +7 -0
  77. package/chunk-4C666HHU.js +2 -0
  78. package/chunk-4C666HHU.js.map +7 -0
  79. package/chunk-5NZMOUKF.js +2 -0
  80. package/chunk-5NZMOUKF.js.map +7 -0
  81. package/chunk-BXZ5PSUW.js +2 -0
  82. package/chunk-BXZ5PSUW.js.map +7 -0
  83. package/chunk-EMQQE34V.js +2 -0
  84. package/chunk-EMQQE34V.js.map +7 -0
  85. package/chunk-HANEPD6T.js +2 -0
  86. package/chunk-HANEPD6T.js.map +7 -0
  87. package/chunk-TZVF5LQY.js +2 -0
  88. package/chunk-TZVF5LQY.js.map +7 -0
  89. package/ic-cdk.js +1 -1
  90. package/ic-cdk.js.map +4 -4
  91. package/index.js +1 -1
  92. package/index.js.map +1 -1
  93. package/package.json +43 -6
  94. package/sdk.js +1 -1
  95. package/sdk.js.map +1 -1
  96. package/src/canisters/declarations/ckbtc/bitcoin.did.d.ts +134 -0
  97. package/src/canisters/declarations/ckbtc/bitcoin.did.idl.js +302 -0
  98. package/src/canisters/declarations/ckbtc/minter.did.d.ts +831 -0
  99. package/src/canisters/declarations/ckbtc/minter.did.idl.js +893 -0
  100. package/src/canisters/declarations/cketh/minter.did.d.ts +893 -0
  101. package/src/canisters/declarations/cketh/minter.did.idl.js +878 -0
  102. package/src/canisters/declarations/cketh/orchestrator.did.d.ts +302 -0
  103. package/src/canisters/declarations/cketh/orchestrator.did.idl.js +343 -0
  104. package/src/canisters/declarations/cmc/cmc.did.d.ts +344 -0
  105. package/src/canisters/declarations/cmc/cmc.did.idl.js +338 -0
  106. package/src/canisters/declarations/ic-management/ic-management.did.d.ts +583 -0
  107. package/src/canisters/declarations/ic-management/ic-management.did.idl.js +1150 -0
  108. package/src/canisters/declarations/ledger-icp/index.did.d.ts +119 -0
  109. package/src/canisters/declarations/ledger-icp/index.did.idl.js +225 -0
  110. package/src/canisters/declarations/ledger-icp/ledger.did.d.ts +606 -0
  111. package/src/canisters/declarations/ledger-icp/ledger.did.idl.js +813 -0
  112. package/src/canisters/declarations/ledger-icrc/icrc_index-ng.did.d.ts +148 -0
  113. package/src/canisters/declarations/ledger-icrc/icrc_index-ng.did.idl.js +274 -0
  114. package/src/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +102 -0
  115. package/src/canisters/declarations/ledger-icrc/icrc_index.did.idl.js +171 -0
  116. package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +579 -0
  117. package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.idl.js +923 -0
  118. package/src/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.d.ts +81 -0
  119. package/src/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.idl.js +163 -0
  120. package/src/canisters/declarations/nns/genesis_token.did.d.ts +49 -0
  121. package/src/canisters/declarations/nns/genesis_token.did.idl.js +84 -0
  122. package/src/canisters/declarations/nns/governance.did.d.ts +1254 -0
  123. package/src/canisters/declarations/nns/governance.did.idl.js +2756 -0
  124. package/src/canisters/declarations/nns/governance_test.did.d.ts +1258 -0
  125. package/src/canisters/declarations/nns/governance_test.did.idl.js +2758 -0
  126. package/src/canisters/declarations/nns/sns_wasm.did.d.ts +286 -0
  127. package/src/canisters/declarations/nns/sns_wasm.did.idl.js +589 -0
  128. package/src/canisters/declarations/sns/sns_governance.did.d.ts +834 -0
  129. package/src/canisters/declarations/sns/sns_governance.did.idl.js +2235 -0
  130. package/src/canisters/declarations/sns/sns_governance_test.did.d.ts +861 -0
  131. package/src/canisters/declarations/sns/sns_governance_test.did.idl.js +2283 -0
  132. package/src/canisters/declarations/sns/sns_root.did.d.ts +204 -0
  133. package/src/canisters/declarations/sns/sns_root.did.idl.js +433 -0
  134. package/src/canisters/declarations/sns/sns_swap.did.d.ts +411 -0
  135. package/src/canisters/declarations/sns/sns_swap.did.idl.js +858 -0
  136. package/global.d.js +0 -1
  137. /package/{global.d.js.map → canisters/ckbtc/index.js.map} +0 -0
@@ -0,0 +1,2235 @@
1
+ /* eslint-disable */
2
+
3
+ // @ts-nocheck
4
+
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
6
+ // You should NOT make any changes in this file as it will be overwritten.
7
+ // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
+
9
+ import {IDL} from '@icp-sdk/core/candid';
10
+
11
+ export const PreciseValue = IDL.Rec();
12
+ export const Timers = IDL.Record({
13
+ last_spawned_timestamp_seconds: IDL.Opt(IDL.Nat64),
14
+ last_reset_timestamp_seconds: IDL.Opt(IDL.Nat64),
15
+ requires_periodic_tasks: IDL.Opt(IDL.Bool)
16
+ });
17
+ export const Version = IDL.Record({
18
+ archive_wasm_hash: IDL.Vec(IDL.Nat8),
19
+ root_wasm_hash: IDL.Vec(IDL.Nat8),
20
+ swap_wasm_hash: IDL.Vec(IDL.Nat8),
21
+ ledger_wasm_hash: IDL.Vec(IDL.Nat8),
22
+ governance_wasm_hash: IDL.Vec(IDL.Nat8),
23
+ index_wasm_hash: IDL.Vec(IDL.Nat8)
24
+ });
25
+ export const Versions = IDL.Record({versions: IDL.Vec(Version)});
26
+ export const CachedUpgradeSteps = IDL.Record({
27
+ upgrade_steps: IDL.Opt(Versions),
28
+ response_timestamp_seconds: IDL.Opt(IDL.Nat64),
29
+ requested_timestamp_seconds: IDL.Opt(IDL.Nat64)
30
+ });
31
+ export const Topic = IDL.Variant({
32
+ DappCanisterManagement: IDL.Null,
33
+ DaoCommunitySettings: IDL.Null,
34
+ ApplicationBusinessLogic: IDL.Null,
35
+ CriticalDappOperations: IDL.Null,
36
+ TreasuryAssetManagement: IDL.Null,
37
+ Governance: IDL.Null,
38
+ SnsFrameworkManagement: IDL.Null
39
+ });
40
+ export const GenericNervousSystemFunction = IDL.Record({
41
+ topic: IDL.Opt(Topic),
42
+ validator_canister_id: IDL.Opt(IDL.Principal),
43
+ target_canister_id: IDL.Opt(IDL.Principal),
44
+ validator_method_name: IDL.Opt(IDL.Text),
45
+ target_method_name: IDL.Opt(IDL.Text)
46
+ });
47
+ export const FunctionType = IDL.Variant({
48
+ NativeNervousSystemFunction: IDL.Record({}),
49
+ GenericNervousSystemFunction: GenericNervousSystemFunction
50
+ });
51
+ export const NervousSystemFunction = IDL.Record({
52
+ id: IDL.Nat64,
53
+ name: IDL.Text,
54
+ description: IDL.Opt(IDL.Text),
55
+ function_type: IDL.Opt(FunctionType)
56
+ });
57
+ export const Subaccount = IDL.Record({subaccount: IDL.Vec(IDL.Nat8)});
58
+ export const Account = IDL.Record({
59
+ owner: IDL.Opt(IDL.Principal),
60
+ subaccount: IDL.Opt(Subaccount)
61
+ });
62
+ export const TreasuryMetrics = IDL.Record({
63
+ name: IDL.Opt(IDL.Text),
64
+ original_amount_e8s: IDL.Opt(IDL.Nat64),
65
+ amount_e8s: IDL.Opt(IDL.Nat64),
66
+ account: IDL.Opt(Account),
67
+ ledger_canister_id: IDL.Opt(IDL.Principal),
68
+ treasury: IDL.Int32,
69
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
70
+ });
71
+ export const VotingPowerMetrics = IDL.Record({
72
+ governance_total_potential_voting_power: IDL.Opt(IDL.Nat64),
73
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
74
+ });
75
+ export const GovernanceCachedMetrics = IDL.Record({
76
+ treasury_metrics: IDL.Vec(TreasuryMetrics),
77
+ not_dissolving_neurons_e8s_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Float64)),
78
+ garbage_collectable_neurons_count: IDL.Nat64,
79
+ neurons_with_invalid_stake_count: IDL.Nat64,
80
+ not_dissolving_neurons_count_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
81
+ neurons_with_less_than_6_months_dissolve_delay_count: IDL.Nat64,
82
+ dissolved_neurons_count: IDL.Nat64,
83
+ total_staked_e8s: IDL.Nat64,
84
+ total_supply_governance_tokens: IDL.Nat64,
85
+ voting_power_metrics: IDL.Opt(VotingPowerMetrics),
86
+ not_dissolving_neurons_count: IDL.Nat64,
87
+ dissolved_neurons_e8s: IDL.Nat64,
88
+ neurons_with_less_than_6_months_dissolve_delay_e8s: IDL.Nat64,
89
+ dissolving_neurons_count_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
90
+ dissolving_neurons_count: IDL.Nat64,
91
+ dissolving_neurons_e8s_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Float64)),
92
+ timestamp_seconds: IDL.Nat64
93
+ });
94
+ export const MaturityModulation = IDL.Record({
95
+ current_basis_points: IDL.Opt(IDL.Int32),
96
+ updated_at_timestamp_seconds: IDL.Opt(IDL.Nat64)
97
+ });
98
+ export const TargetVersionSet = IDL.Record({
99
+ old_target_version: IDL.Opt(Version),
100
+ new_target_version: IDL.Opt(Version),
101
+ is_advanced_automatically: IDL.Opt(IDL.Bool)
102
+ });
103
+ export const UpgradeStepsReset = IDL.Record({
104
+ human_readable: IDL.Opt(IDL.Text),
105
+ upgrade_steps: IDL.Opt(Versions)
106
+ });
107
+ export const UpgradeOutcome = IDL.Record({
108
+ status: IDL.Opt(
109
+ IDL.Variant({
110
+ Success: IDL.Record({}),
111
+ Timeout: IDL.Record({}),
112
+ ExternalFailure: IDL.Record({}),
113
+ InvalidState: IDL.Record({version: IDL.Opt(Version)})
114
+ })
115
+ ),
116
+ human_readable: IDL.Opt(IDL.Text)
117
+ });
118
+ export const ProposalId = IDL.Record({id: IDL.Nat64});
119
+ export const UpgradeStarted = IDL.Record({
120
+ current_version: IDL.Opt(Version),
121
+ expected_version: IDL.Opt(Version),
122
+ reason: IDL.Opt(
123
+ IDL.Variant({
124
+ UpgradeSnsToNextVersionProposal: ProposalId,
125
+ BehindTargetVersion: IDL.Record({})
126
+ })
127
+ )
128
+ });
129
+ export const UpgradeStepsRefreshed = IDL.Record({
130
+ upgrade_steps: IDL.Opt(Versions)
131
+ });
132
+ export const TargetVersionReset = IDL.Record({
133
+ human_readable: IDL.Opt(IDL.Text),
134
+ old_target_version: IDL.Opt(Version),
135
+ new_target_version: IDL.Opt(Version)
136
+ });
137
+ export const UpgradeJournalEntry = IDL.Record({
138
+ event: IDL.Opt(
139
+ IDL.Variant({
140
+ TargetVersionSet: TargetVersionSet,
141
+ UpgradeStepsReset: UpgradeStepsReset,
142
+ UpgradeOutcome: UpgradeOutcome,
143
+ UpgradeStarted: UpgradeStarted,
144
+ UpgradeStepsRefreshed: UpgradeStepsRefreshed,
145
+ TargetVersionReset: TargetVersionReset
146
+ })
147
+ ),
148
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
149
+ });
150
+ export const UpgradeJournal = IDL.Record({
151
+ entries: IDL.Vec(UpgradeJournalEntry)
152
+ });
153
+ export const NeuronId = IDL.Record({id: IDL.Vec(IDL.Nat8)});
154
+ export const Followees = IDL.Record({followees: IDL.Vec(NeuronId)});
155
+ export const DefaultFollowees = IDL.Record({
156
+ followees: IDL.Vec(IDL.Tuple(IDL.Nat64, Followees))
157
+ });
158
+ export const NeuronPermissionList = IDL.Record({
159
+ permissions: IDL.Vec(IDL.Int32)
160
+ });
161
+ export const VotingRewardsParameters = IDL.Record({
162
+ final_reward_rate_basis_points: IDL.Opt(IDL.Nat64),
163
+ initial_reward_rate_basis_points: IDL.Opt(IDL.Nat64),
164
+ reward_rate_transition_duration_seconds: IDL.Opt(IDL.Nat64),
165
+ round_duration_seconds: IDL.Opt(IDL.Nat64)
166
+ });
167
+ export const NervousSystemParameters = IDL.Record({
168
+ default_followees: IDL.Opt(DefaultFollowees),
169
+ max_dissolve_delay_seconds: IDL.Opt(IDL.Nat64),
170
+ max_dissolve_delay_bonus_percentage: IDL.Opt(IDL.Nat64),
171
+ max_followees_per_function: IDL.Opt(IDL.Nat64),
172
+ automatically_advance_target_version: IDL.Opt(IDL.Bool),
173
+ neuron_claimer_permissions: IDL.Opt(NeuronPermissionList),
174
+ neuron_minimum_stake_e8s: IDL.Opt(IDL.Nat64),
175
+ max_neuron_age_for_age_bonus: IDL.Opt(IDL.Nat64),
176
+ initial_voting_period_seconds: IDL.Opt(IDL.Nat64),
177
+ neuron_minimum_dissolve_delay_to_vote_seconds: IDL.Opt(IDL.Nat64),
178
+ reject_cost_e8s: IDL.Opt(IDL.Nat64),
179
+ max_proposals_to_keep_per_action: IDL.Opt(IDL.Nat32),
180
+ wait_for_quiet_deadline_increase_seconds: IDL.Opt(IDL.Nat64),
181
+ max_number_of_neurons: IDL.Opt(IDL.Nat64),
182
+ transaction_fee_e8s: IDL.Opt(IDL.Nat64),
183
+ max_number_of_proposals_with_ballots: IDL.Opt(IDL.Nat64),
184
+ max_age_bonus_percentage: IDL.Opt(IDL.Nat64),
185
+ neuron_grantable_permissions: IDL.Opt(NeuronPermissionList),
186
+ voting_rewards_parameters: IDL.Opt(VotingRewardsParameters),
187
+ maturity_modulation_disabled: IDL.Opt(IDL.Bool),
188
+ max_number_of_principals_per_neuron: IDL.Opt(IDL.Nat64)
189
+ });
190
+ export const RewardEvent = IDL.Record({
191
+ rounds_since_last_distribution: IDL.Opt(IDL.Nat64),
192
+ actual_timestamp_seconds: IDL.Nat64,
193
+ end_timestamp_seconds: IDL.Opt(IDL.Nat64),
194
+ total_available_e8s_equivalent: IDL.Opt(IDL.Nat64),
195
+ distributed_e8s_equivalent: IDL.Nat64,
196
+ round: IDL.Nat64,
197
+ settled_proposals: IDL.Vec(ProposalId)
198
+ });
199
+ export const PendingVersion = IDL.Record({
200
+ mark_failed_at_seconds: IDL.Nat64,
201
+ checking_upgrade_lock: IDL.Nat64,
202
+ proposal_id: IDL.Opt(IDL.Nat64),
203
+ target_version: IDL.Opt(Version)
204
+ });
205
+ export const GovernanceError = IDL.Record({
206
+ error_message: IDL.Text,
207
+ error_type: IDL.Int32
208
+ });
209
+ export const Decimal = IDL.Record({human_readable: IDL.Opt(IDL.Text)});
210
+ export const Tokens = IDL.Record({e8s: IDL.Opt(IDL.Nat64)});
211
+ export const ValuationFactors = IDL.Record({
212
+ xdrs_per_icp: IDL.Opt(Decimal),
213
+ icps_per_token: IDL.Opt(Decimal),
214
+ tokens: IDL.Opt(Tokens)
215
+ });
216
+ export const Valuation = IDL.Record({
217
+ token: IDL.Opt(IDL.Int32),
218
+ account: IDL.Opt(Account),
219
+ valuation_factors: IDL.Opt(ValuationFactors),
220
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
221
+ });
222
+ export const MintSnsTokensActionAuxiliary = IDL.Record({
223
+ valuation: IDL.Opt(Valuation)
224
+ });
225
+ export const SnsVersion = IDL.Record({
226
+ archive_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
227
+ root_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
228
+ swap_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
229
+ ledger_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
230
+ governance_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
231
+ index_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
232
+ });
233
+ export const AdvanceSnsTargetVersionActionAuxiliary = IDL.Record({
234
+ target_version: IDL.Opt(SnsVersion)
235
+ });
236
+ export const ActionAuxiliary = IDL.Variant({
237
+ TransferSnsTreasuryFunds: MintSnsTokensActionAuxiliary,
238
+ MintSnsTokens: MintSnsTokensActionAuxiliary,
239
+ AdvanceSnsTargetVersion: AdvanceSnsTargetVersionActionAuxiliary
240
+ });
241
+ export const Ballot = IDL.Record({
242
+ vote: IDL.Int32,
243
+ cast_timestamp_seconds: IDL.Nat64,
244
+ voting_power: IDL.Nat64
245
+ });
246
+ export const Percentage = IDL.Record({basis_points: IDL.Opt(IDL.Nat64)});
247
+ export const Tally = IDL.Record({
248
+ no: IDL.Nat64,
249
+ yes: IDL.Nat64,
250
+ total: IDL.Nat64,
251
+ timestamp_seconds: IDL.Nat64
252
+ });
253
+ export const ManageDappCanisterSettings = IDL.Record({
254
+ freezing_threshold: IDL.Opt(IDL.Nat64),
255
+ wasm_memory_threshold: IDL.Opt(IDL.Nat64),
256
+ canister_ids: IDL.Vec(IDL.Principal),
257
+ reserved_cycles_limit: IDL.Opt(IDL.Nat64),
258
+ log_visibility: IDL.Opt(IDL.Int32),
259
+ wasm_memory_limit: IDL.Opt(IDL.Nat64),
260
+ memory_allocation: IDL.Opt(IDL.Nat64),
261
+ compute_allocation: IDL.Opt(IDL.Nat64)
262
+ });
263
+ PreciseValue.fill(
264
+ IDL.Variant({
265
+ Int: IDL.Int64,
266
+ Map: IDL.Vec(IDL.Tuple(IDL.Text, PreciseValue)),
267
+ Nat: IDL.Nat64,
268
+ Blob: IDL.Vec(IDL.Nat8),
269
+ Bool: IDL.Bool,
270
+ Text: IDL.Text,
271
+ Array: IDL.Vec(PreciseValue)
272
+ })
273
+ );
274
+ export const ExtensionOperationArg = IDL.Record({
275
+ value: IDL.Opt(PreciseValue)
276
+ });
277
+ export const ExecuteExtensionOperation = IDL.Record({
278
+ extension_canister_id: IDL.Opt(IDL.Principal),
279
+ operation_name: IDL.Opt(IDL.Text),
280
+ operation_arg: IDL.Opt(ExtensionOperationArg)
281
+ });
282
+ export const ChunkedCanisterWasm = IDL.Record({
283
+ wasm_module_hash: IDL.Vec(IDL.Nat8),
284
+ chunk_hashes_list: IDL.Vec(IDL.Vec(IDL.Nat8)),
285
+ store_canister_id: IDL.Opt(IDL.Principal)
286
+ });
287
+ export const Wasm = IDL.Variant({
288
+ Chunked: ChunkedCanisterWasm,
289
+ Bytes: IDL.Vec(IDL.Nat8)
290
+ });
291
+ export const ExtensionUpgradeArg = IDL.Record({
292
+ value: IDL.Opt(PreciseValue)
293
+ });
294
+ export const UpgradeExtension = IDL.Record({
295
+ extension_canister_id: IDL.Opt(IDL.Principal),
296
+ wasm: IDL.Opt(Wasm),
297
+ canister_upgrade_arg: IDL.Opt(ExtensionUpgradeArg)
298
+ });
299
+ export const SetTopicsForCustomProposals = IDL.Record({
300
+ custom_function_id_to_topic: IDL.Vec(IDL.Tuple(IDL.Nat64, Topic))
301
+ });
302
+ export const ExtensionInit = IDL.Record({value: IDL.Opt(PreciseValue)});
303
+ export const RegisterExtension = IDL.Record({
304
+ chunked_canister_wasm: IDL.Opt(ChunkedCanisterWasm),
305
+ extension_init: IDL.Opt(ExtensionInit)
306
+ });
307
+ export const RegisterDappCanisters = IDL.Record({
308
+ canister_ids: IDL.Vec(IDL.Principal)
309
+ });
310
+ export const TransferSnsTreasuryFunds = IDL.Record({
311
+ from_treasury: IDL.Int32,
312
+ to_principal: IDL.Opt(IDL.Principal),
313
+ to_subaccount: IDL.Opt(Subaccount),
314
+ memo: IDL.Opt(IDL.Nat64),
315
+ amount_e8s: IDL.Nat64
316
+ });
317
+ export const UpgradeSnsControlledCanister = IDL.Record({
318
+ new_canister_wasm: IDL.Vec(IDL.Nat8),
319
+ mode: IDL.Opt(IDL.Int32),
320
+ canister_id: IDL.Opt(IDL.Principal),
321
+ chunked_canister_wasm: IDL.Opt(ChunkedCanisterWasm),
322
+ canister_upgrade_arg: IDL.Opt(IDL.Vec(IDL.Nat8))
323
+ });
324
+ export const DeregisterDappCanisters = IDL.Record({
325
+ canister_ids: IDL.Vec(IDL.Principal),
326
+ new_controllers: IDL.Vec(IDL.Principal)
327
+ });
328
+ export const MintSnsTokens = IDL.Record({
329
+ to_principal: IDL.Opt(IDL.Principal),
330
+ to_subaccount: IDL.Opt(Subaccount),
331
+ memo: IDL.Opt(IDL.Nat64),
332
+ amount_e8s: IDL.Opt(IDL.Nat64)
333
+ });
334
+ export const AdvanceSnsTargetVersion = IDL.Record({
335
+ new_target: IDL.Opt(SnsVersion)
336
+ });
337
+ export const ManageSnsMetadata = IDL.Record({
338
+ url: IDL.Opt(IDL.Text),
339
+ logo: IDL.Opt(IDL.Text),
340
+ name: IDL.Opt(IDL.Text),
341
+ description: IDL.Opt(IDL.Text)
342
+ });
343
+ export const ExecuteGenericNervousSystemFunction = IDL.Record({
344
+ function_id: IDL.Nat64,
345
+ payload: IDL.Vec(IDL.Nat8)
346
+ });
347
+ export const ManageLedgerParameters = IDL.Record({
348
+ token_symbol: IDL.Opt(IDL.Text),
349
+ transfer_fee: IDL.Opt(IDL.Nat64),
350
+ token_logo: IDL.Opt(IDL.Text),
351
+ token_name: IDL.Opt(IDL.Text)
352
+ });
353
+ export const Motion = IDL.Record({motion_text: IDL.Text});
354
+ export const Action = IDL.Variant({
355
+ ManageNervousSystemParameters: NervousSystemParameters,
356
+ AddGenericNervousSystemFunction: NervousSystemFunction,
357
+ ManageDappCanisterSettings: ManageDappCanisterSettings,
358
+ ExecuteExtensionOperation: ExecuteExtensionOperation,
359
+ UpgradeExtension: UpgradeExtension,
360
+ RemoveGenericNervousSystemFunction: IDL.Nat64,
361
+ SetTopicsForCustomProposals: SetTopicsForCustomProposals,
362
+ RegisterExtension: RegisterExtension,
363
+ UpgradeSnsToNextVersion: IDL.Record({}),
364
+ RegisterDappCanisters: RegisterDappCanisters,
365
+ TransferSnsTreasuryFunds: TransferSnsTreasuryFunds,
366
+ UpgradeSnsControlledCanister: UpgradeSnsControlledCanister,
367
+ DeregisterDappCanisters: DeregisterDappCanisters,
368
+ MintSnsTokens: MintSnsTokens,
369
+ AdvanceSnsTargetVersion: AdvanceSnsTargetVersion,
370
+ Unspecified: IDL.Record({}),
371
+ ManageSnsMetadata: ManageSnsMetadata,
372
+ ExecuteGenericNervousSystemFunction: ExecuteGenericNervousSystemFunction,
373
+ ManageLedgerParameters: ManageLedgerParameters,
374
+ Motion: Motion
375
+ });
376
+ export const Proposal = IDL.Record({
377
+ url: IDL.Text,
378
+ title: IDL.Text,
379
+ action: IDL.Opt(Action),
380
+ summary: IDL.Text
381
+ });
382
+ export const WaitForQuietState = IDL.Record({
383
+ current_deadline_timestamp_seconds: IDL.Nat64
384
+ });
385
+ export const ProposalData = IDL.Record({
386
+ id: IDL.Opt(ProposalId),
387
+ payload_text_rendering: IDL.Opt(IDL.Text),
388
+ topic: IDL.Opt(Topic),
389
+ action: IDL.Nat64,
390
+ failure_reason: IDL.Opt(GovernanceError),
391
+ action_auxiliary: IDL.Opt(ActionAuxiliary),
392
+ ballots: IDL.Vec(IDL.Tuple(IDL.Text, Ballot)),
393
+ minimum_yes_proportion_of_total: IDL.Opt(Percentage),
394
+ reward_event_round: IDL.Nat64,
395
+ failed_timestamp_seconds: IDL.Nat64,
396
+ reward_event_end_timestamp_seconds: IDL.Opt(IDL.Nat64),
397
+ proposal_creation_timestamp_seconds: IDL.Nat64,
398
+ initial_voting_period_seconds: IDL.Nat64,
399
+ reject_cost_e8s: IDL.Nat64,
400
+ latest_tally: IDL.Opt(Tally),
401
+ wait_for_quiet_deadline_increase_seconds: IDL.Nat64,
402
+ decided_timestamp_seconds: IDL.Nat64,
403
+ proposal: IDL.Opt(Proposal),
404
+ proposer: IDL.Opt(NeuronId),
405
+ wait_for_quiet_state: IDL.Opt(WaitForQuietState),
406
+ minimum_yes_proportion_of_exercised: IDL.Opt(Percentage),
407
+ is_eligible_for_rewards: IDL.Bool,
408
+ executed_timestamp_seconds: IDL.Nat64
409
+ });
410
+ export const Split = IDL.Record({
411
+ memo: IDL.Nat64,
412
+ amount_e8s: IDL.Nat64
413
+ });
414
+ export const Follow = IDL.Record({
415
+ function_id: IDL.Nat64,
416
+ followees: IDL.Vec(NeuronId)
417
+ });
418
+ export const DisburseMaturity = IDL.Record({
419
+ to_account: IDL.Opt(Account),
420
+ percentage_to_disburse: IDL.Nat32
421
+ });
422
+ export const ChangeAutoStakeMaturity = IDL.Record({
423
+ requested_setting_for_auto_stake_maturity: IDL.Bool
424
+ });
425
+ export const IncreaseDissolveDelay = IDL.Record({
426
+ additional_dissolve_delay_seconds: IDL.Nat32
427
+ });
428
+ export const SetDissolveTimestamp = IDL.Record({
429
+ dissolve_timestamp_seconds: IDL.Nat64
430
+ });
431
+ export const Operation = IDL.Variant({
432
+ ChangeAutoStakeMaturity: ChangeAutoStakeMaturity,
433
+ StopDissolving: IDL.Record({}),
434
+ StartDissolving: IDL.Record({}),
435
+ IncreaseDissolveDelay: IncreaseDissolveDelay,
436
+ SetDissolveTimestamp: SetDissolveTimestamp
437
+ });
438
+ export const Configure = IDL.Record({operation: IDL.Opt(Operation)});
439
+ export const RegisterVote = IDL.Record({
440
+ vote: IDL.Int32,
441
+ proposal: IDL.Opt(ProposalId)
442
+ });
443
+ export const Followee = IDL.Record({
444
+ alias: IDL.Opt(IDL.Text),
445
+ neuron_id: IDL.Opt(NeuronId)
446
+ });
447
+ export const FolloweesForTopic = IDL.Record({
448
+ topic: IDL.Opt(Topic),
449
+ followees: IDL.Vec(Followee)
450
+ });
451
+ export const SetFollowing = IDL.Record({
452
+ topic_following: IDL.Vec(FolloweesForTopic)
453
+ });
454
+ export const FinalizeDisburseMaturity = IDL.Record({
455
+ amount_to_be_disbursed_e8s: IDL.Nat64,
456
+ to_account: IDL.Opt(Account)
457
+ });
458
+ export const MemoAndController = IDL.Record({
459
+ controller: IDL.Opt(IDL.Principal),
460
+ memo: IDL.Nat64
461
+ });
462
+ export const By = IDL.Variant({
463
+ MemoAndController: MemoAndController,
464
+ NeuronId: IDL.Record({})
465
+ });
466
+ export const ClaimOrRefresh = IDL.Record({by: IDL.Opt(By)});
467
+ export const RemoveNeuronPermissions = IDL.Record({
468
+ permissions_to_remove: IDL.Opt(NeuronPermissionList),
469
+ principal_id: IDL.Opt(IDL.Principal)
470
+ });
471
+ export const AddNeuronPermissions = IDL.Record({
472
+ permissions_to_add: IDL.Opt(NeuronPermissionList),
473
+ principal_id: IDL.Opt(IDL.Principal)
474
+ });
475
+ export const MergeMaturity = IDL.Record({percentage_to_merge: IDL.Nat32});
476
+ export const Amount = IDL.Record({e8s: IDL.Nat64});
477
+ export const Disburse = IDL.Record({
478
+ to_account: IDL.Opt(Account),
479
+ amount: IDL.Opt(Amount)
480
+ });
481
+ export const Command_2 = IDL.Variant({
482
+ Split: Split,
483
+ Follow: Follow,
484
+ DisburseMaturity: DisburseMaturity,
485
+ Configure: Configure,
486
+ RegisterVote: RegisterVote,
487
+ SetFollowing: SetFollowing,
488
+ SyncCommand: IDL.Record({}),
489
+ MakeProposal: Proposal,
490
+ FinalizeDisburseMaturity: FinalizeDisburseMaturity,
491
+ ClaimOrRefreshNeuron: ClaimOrRefresh,
492
+ RemoveNeuronPermissions: RemoveNeuronPermissions,
493
+ AddNeuronPermissions: AddNeuronPermissions,
494
+ MergeMaturity: MergeMaturity,
495
+ Disburse: Disburse
496
+ });
497
+ export const NeuronInFlightCommand = IDL.Record({
498
+ command: IDL.Opt(Command_2),
499
+ timestamp: IDL.Nat64
500
+ });
501
+ export const NeuronPermission = IDL.Record({
502
+ principal: IDL.Opt(IDL.Principal),
503
+ permission_type: IDL.Vec(IDL.Int32)
504
+ });
505
+ export const DissolveState = IDL.Variant({
506
+ DissolveDelaySeconds: IDL.Nat64,
507
+ WhenDissolvedTimestampSeconds: IDL.Nat64
508
+ });
509
+ export const DisburseMaturityInProgress = IDL.Record({
510
+ timestamp_of_disbursement_seconds: IDL.Nat64,
511
+ amount_e8s: IDL.Nat64,
512
+ account_to_disburse_to: IDL.Opt(Account),
513
+ finalize_disbursement_timestamp_seconds: IDL.Opt(IDL.Nat64)
514
+ });
515
+ export const Neuron = IDL.Record({
516
+ id: IDL.Opt(NeuronId),
517
+ staked_maturity_e8s_equivalent: IDL.Opt(IDL.Nat64),
518
+ permissions: IDL.Vec(NeuronPermission),
519
+ maturity_e8s_equivalent: IDL.Nat64,
520
+ cached_neuron_stake_e8s: IDL.Nat64,
521
+ created_timestamp_seconds: IDL.Nat64,
522
+ topic_followees: IDL.Opt(
523
+ IDL.Record({
524
+ topic_id_to_followees: IDL.Vec(IDL.Tuple(IDL.Int32, FolloweesForTopic))
525
+ })
526
+ ),
527
+ source_nns_neuron_id: IDL.Opt(IDL.Nat64),
528
+ auto_stake_maturity: IDL.Opt(IDL.Bool),
529
+ aging_since_timestamp_seconds: IDL.Nat64,
530
+ dissolve_state: IDL.Opt(DissolveState),
531
+ voting_power_percentage_multiplier: IDL.Nat64,
532
+ vesting_period_seconds: IDL.Opt(IDL.Nat64),
533
+ disburse_maturity_in_progress: IDL.Vec(DisburseMaturityInProgress),
534
+ followees: IDL.Vec(IDL.Tuple(IDL.Nat64, Followees)),
535
+ neuron_fees_e8s: IDL.Nat64
536
+ });
537
+ export const Governance = IDL.Record({
538
+ root_canister_id: IDL.Opt(IDL.Principal),
539
+ timers: IDL.Opt(Timers),
540
+ cached_upgrade_steps: IDL.Opt(CachedUpgradeSteps),
541
+ id_to_nervous_system_functions: IDL.Vec(IDL.Tuple(IDL.Nat64, NervousSystemFunction)),
542
+ metrics: IDL.Opt(GovernanceCachedMetrics),
543
+ maturity_modulation: IDL.Opt(MaturityModulation),
544
+ upgrade_journal: IDL.Opt(UpgradeJournal),
545
+ mode: IDL.Int32,
546
+ parameters: IDL.Opt(NervousSystemParameters),
547
+ is_finalizing_disburse_maturity: IDL.Opt(IDL.Bool),
548
+ deployed_version: IDL.Opt(Version),
549
+ sns_initialization_parameters: IDL.Text,
550
+ latest_reward_event: IDL.Opt(RewardEvent),
551
+ pending_version: IDL.Opt(PendingVersion),
552
+ swap_canister_id: IDL.Opt(IDL.Principal),
553
+ ledger_canister_id: IDL.Opt(IDL.Principal),
554
+ proposals: IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
555
+ in_flight_commands: IDL.Vec(IDL.Tuple(IDL.Text, NeuronInFlightCommand)),
556
+ sns_metadata: IDL.Opt(ManageSnsMetadata),
557
+ neurons: IDL.Vec(IDL.Tuple(IDL.Text, Neuron)),
558
+ target_version: IDL.Opt(Version),
559
+ genesis_timestamp_seconds: IDL.Nat64
560
+ });
561
+ export const Principals = IDL.Record({principals: IDL.Vec(IDL.Principal)});
562
+ export const NeuronsFund = IDL.Record({
563
+ nns_neuron_hotkeys: IDL.Opt(Principals),
564
+ nns_neuron_controller: IDL.Opt(IDL.Principal),
565
+ nns_neuron_id: IDL.Opt(IDL.Nat64)
566
+ });
567
+ export const Participant = IDL.Variant({
568
+ NeuronsFund: NeuronsFund,
569
+ Direct: IDL.Record({})
570
+ });
571
+ export const NeuronIds = IDL.Record({neuron_ids: IDL.Vec(NeuronId)});
572
+ export const NeuronRecipe = IDL.Record({
573
+ controller: IDL.Opt(IDL.Principal),
574
+ dissolve_delay_seconds: IDL.Opt(IDL.Nat64),
575
+ participant: IDL.Opt(Participant),
576
+ stake_e8s: IDL.Opt(IDL.Nat64),
577
+ followees: IDL.Opt(NeuronIds),
578
+ neuron_id: IDL.Opt(NeuronId)
579
+ });
580
+ export const NeuronRecipes = IDL.Record({
581
+ neuron_recipes: IDL.Vec(NeuronRecipe)
582
+ });
583
+ export const ClaimSwapNeuronsRequest = IDL.Record({
584
+ neuron_recipes: IDL.Opt(NeuronRecipes)
585
+ });
586
+ export const SwapNeuron = IDL.Record({
587
+ id: IDL.Opt(NeuronId),
588
+ status: IDL.Int32
589
+ });
590
+ export const ClaimedSwapNeurons = IDL.Record({
591
+ swap_neurons: IDL.Vec(SwapNeuron)
592
+ });
593
+ export const ClaimSwapNeuronsResult = IDL.Variant({
594
+ Ok: ClaimedSwapNeurons,
595
+ Err: IDL.Int32
596
+ });
597
+ export const ClaimSwapNeuronsResponse = IDL.Record({
598
+ claim_swap_neurons_result: IDL.Opt(ClaimSwapNeuronsResult)
599
+ });
600
+ export const GetMaturityModulationResponse = IDL.Record({
601
+ maturity_modulation: IDL.Opt(MaturityModulation)
602
+ });
603
+ export const GetMetadataResponse = IDL.Record({
604
+ url: IDL.Opt(IDL.Text),
605
+ logo: IDL.Opt(IDL.Text),
606
+ name: IDL.Opt(IDL.Text),
607
+ description: IDL.Opt(IDL.Text)
608
+ });
609
+ export const GetMetricsRequest = IDL.Record({
610
+ time_window_seconds: IDL.Opt(IDL.Nat64)
611
+ });
612
+ export const Metrics = IDL.Record({
613
+ treasury_metrics: IDL.Opt(IDL.Vec(TreasuryMetrics)),
614
+ voting_power_metrics: IDL.Opt(VotingPowerMetrics),
615
+ last_ledger_block_timestamp: IDL.Opt(IDL.Nat64),
616
+ num_recently_executed_proposals: IDL.Opt(IDL.Nat64),
617
+ num_recently_submitted_proposals: IDL.Opt(IDL.Nat64),
618
+ genesis_timestamp_seconds: IDL.Opt(IDL.Nat64)
619
+ });
620
+ export const GetMetricsResult = IDL.Variant({
621
+ Ok: Metrics,
622
+ Err: GovernanceError
623
+ });
624
+ export const GetMetricsResponse = IDL.Record({
625
+ get_metrics_result: IDL.Opt(GetMetricsResult)
626
+ });
627
+ export const GetModeResponse = IDL.Record({mode: IDL.Opt(IDL.Int32)});
628
+ export const GetNeuron = IDL.Record({neuron_id: IDL.Opt(NeuronId)});
629
+ export const Result = IDL.Variant({
630
+ Error: GovernanceError,
631
+ Neuron: Neuron
632
+ });
633
+ export const GetNeuronResponse = IDL.Record({result: IDL.Opt(Result)});
634
+ export const GetProposal = IDL.Record({proposal_id: IDL.Opt(ProposalId)});
635
+ export const Result_1 = IDL.Variant({
636
+ Error: GovernanceError,
637
+ Proposal: ProposalData
638
+ });
639
+ export const GetProposalResponse = IDL.Record({result: IDL.Opt(Result_1)});
640
+ export const MemoryMetrics = IDL.Record({
641
+ wasm_binary_size: IDL.Opt(IDL.Nat),
642
+ wasm_chunk_store_size: IDL.Opt(IDL.Nat),
643
+ canister_history_size: IDL.Opt(IDL.Nat),
644
+ stable_memory_size: IDL.Opt(IDL.Nat),
645
+ snapshots_size: IDL.Opt(IDL.Nat),
646
+ wasm_memory_size: IDL.Opt(IDL.Nat),
647
+ global_memory_size: IDL.Opt(IDL.Nat),
648
+ custom_sections_size: IDL.Opt(IDL.Nat)
649
+ });
650
+ export const CanisterStatusType = IDL.Variant({
651
+ stopped: IDL.Null,
652
+ stopping: IDL.Null,
653
+ running: IDL.Null
654
+ });
655
+ export const DefiniteCanisterSettingsArgs = IDL.Record({
656
+ freezing_threshold: IDL.Nat,
657
+ wasm_memory_threshold: IDL.Opt(IDL.Nat),
658
+ controllers: IDL.Vec(IDL.Principal),
659
+ wasm_memory_limit: IDL.Opt(IDL.Nat),
660
+ memory_allocation: IDL.Nat,
661
+ compute_allocation: IDL.Nat
662
+ });
663
+ export const QueryStats = IDL.Record({
664
+ response_payload_bytes_total: IDL.Opt(IDL.Nat),
665
+ num_instructions_total: IDL.Opt(IDL.Nat),
666
+ num_calls_total: IDL.Opt(IDL.Nat),
667
+ request_payload_bytes_total: IDL.Opt(IDL.Nat)
668
+ });
669
+ export const CanisterStatusResultV2 = IDL.Record({
670
+ memory_metrics: IDL.Opt(MemoryMetrics),
671
+ status: CanisterStatusType,
672
+ memory_size: IDL.Nat,
673
+ cycles: IDL.Nat,
674
+ settings: DefiniteCanisterSettingsArgs,
675
+ query_stats: IDL.Opt(QueryStats),
676
+ idle_cycles_burned_per_day: IDL.Nat,
677
+ module_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
678
+ });
679
+ export const GetRunningSnsVersionResponse = IDL.Record({
680
+ deployed_version: IDL.Opt(Version),
681
+ pending_version: IDL.Opt(
682
+ IDL.Record({
683
+ mark_failed_at_seconds: IDL.Nat64,
684
+ checking_upgrade_lock: IDL.Nat64,
685
+ proposal_id: IDL.Nat64,
686
+ target_version: IDL.Opt(Version)
687
+ })
688
+ )
689
+ });
690
+ export const GetSnsInitializationParametersResponse = IDL.Record({
691
+ sns_initialization_parameters: IDL.Text
692
+ });
693
+ export const GetTimersResponse = IDL.Record({timers: IDL.Opt(Timers)});
694
+ export const GetUpgradeJournalRequest = IDL.Record({
695
+ offset: IDL.Opt(IDL.Nat64),
696
+ limit: IDL.Opt(IDL.Nat64)
697
+ });
698
+ export const GetUpgradeJournalResponse = IDL.Record({
699
+ upgrade_journal: IDL.Opt(UpgradeJournal),
700
+ upgrade_steps: IDL.Opt(Versions),
701
+ response_timestamp_seconds: IDL.Opt(IDL.Nat64),
702
+ deployed_version: IDL.Opt(Version),
703
+ target_version: IDL.Opt(Version),
704
+ upgrade_journal_entry_count: IDL.Opt(IDL.Nat64)
705
+ });
706
+ export const ListNervousSystemFunctionsResponse = IDL.Record({
707
+ reserved_ids: IDL.Vec(IDL.Nat64),
708
+ functions: IDL.Vec(NervousSystemFunction)
709
+ });
710
+ export const ListNeurons = IDL.Record({
711
+ of_principal: IDL.Opt(IDL.Principal),
712
+ limit: IDL.Nat32,
713
+ start_page_at: IDL.Opt(NeuronId)
714
+ });
715
+ export const ListNeuronsResponse = IDL.Record({neurons: IDL.Vec(Neuron)});
716
+ export const TopicSelector = IDL.Record({topic: IDL.Opt(Topic)});
717
+ export const ListProposals = IDL.Record({
718
+ include_reward_status: IDL.Vec(IDL.Int32),
719
+ before_proposal: IDL.Opt(ProposalId),
720
+ limit: IDL.Nat32,
721
+ exclude_type: IDL.Vec(IDL.Nat64),
722
+ include_topics: IDL.Opt(IDL.Vec(TopicSelector)),
723
+ include_status: IDL.Vec(IDL.Int32)
724
+ });
725
+ export const ListProposalsResponse = IDL.Record({
726
+ include_ballots_by_caller: IDL.Opt(IDL.Bool),
727
+ proposals: IDL.Vec(ProposalData),
728
+ include_topic_filtering: IDL.Opt(IDL.Bool)
729
+ });
730
+ export const ListTopicsRequest = IDL.Record({});
731
+ export const ExtensionOperationType = IDL.Variant({
732
+ TreasuryManagerWithdraw: IDL.Null,
733
+ TreasuryManagerDeposit: IDL.Null
734
+ });
735
+ export const ExtensionType = IDL.Variant({TreasuryManager: IDL.Null});
736
+ export const ExtensionOperationSpec = IDL.Record({
737
+ topic: IDL.Opt(Topic),
738
+ operation_type: IDL.Opt(ExtensionOperationType),
739
+ description: IDL.Opt(IDL.Text),
740
+ extension_type: IDL.Opt(ExtensionType)
741
+ });
742
+ export const RegisteredExtensionOperationSpec = IDL.Record({
743
+ spec: IDL.Opt(ExtensionOperationSpec),
744
+ canister_id: IDL.Opt(IDL.Principal)
745
+ });
746
+ export const TopicInfo = IDL.Record({
747
+ extension_operations: IDL.Opt(IDL.Vec(RegisteredExtensionOperationSpec)),
748
+ native_functions: IDL.Opt(IDL.Vec(NervousSystemFunction)),
749
+ topic: IDL.Opt(Topic),
750
+ is_critical: IDL.Opt(IDL.Bool),
751
+ name: IDL.Opt(IDL.Text),
752
+ description: IDL.Opt(IDL.Text),
753
+ custom_functions: IDL.Opt(IDL.Vec(NervousSystemFunction))
754
+ });
755
+ export const ListTopicsResponse = IDL.Record({
756
+ uncategorized_functions: IDL.Opt(IDL.Vec(NervousSystemFunction)),
757
+ topics: IDL.Opt(IDL.Vec(TopicInfo))
758
+ });
759
+ export const StakeMaturity = IDL.Record({
760
+ percentage_to_stake: IDL.Opt(IDL.Nat32)
761
+ });
762
+ export const Command = IDL.Variant({
763
+ Split: Split,
764
+ Follow: Follow,
765
+ DisburseMaturity: DisburseMaturity,
766
+ ClaimOrRefresh: ClaimOrRefresh,
767
+ Configure: Configure,
768
+ RegisterVote: RegisterVote,
769
+ SetFollowing: SetFollowing,
770
+ MakeProposal: Proposal,
771
+ StakeMaturity: StakeMaturity,
772
+ RemoveNeuronPermissions: RemoveNeuronPermissions,
773
+ AddNeuronPermissions: AddNeuronPermissions,
774
+ MergeMaturity: MergeMaturity,
775
+ Disburse: Disburse
776
+ });
777
+ export const ManageNeuron = IDL.Record({
778
+ subaccount: IDL.Vec(IDL.Nat8),
779
+ command: IDL.Opt(Command)
780
+ });
781
+ export const SplitResponse = IDL.Record({
782
+ created_neuron_id: IDL.Opt(NeuronId)
783
+ });
784
+ export const DisburseMaturityResponse = IDL.Record({
785
+ amount_disbursed_e8s: IDL.Nat64,
786
+ amount_deducted_e8s: IDL.Opt(IDL.Nat64)
787
+ });
788
+ export const ClaimOrRefreshResponse = IDL.Record({
789
+ refreshed_neuron_id: IDL.Opt(NeuronId)
790
+ });
791
+ export const StakeMaturityResponse = IDL.Record({
792
+ maturity_e8s: IDL.Nat64,
793
+ staked_maturity_e8s: IDL.Nat64
794
+ });
795
+ export const MergeMaturityResponse = IDL.Record({
796
+ merged_maturity_e8s: IDL.Nat64,
797
+ new_stake_e8s: IDL.Nat64
798
+ });
799
+ export const DisburseResponse = IDL.Record({
800
+ transfer_block_height: IDL.Nat64
801
+ });
802
+ export const Command_1 = IDL.Variant({
803
+ Error: GovernanceError,
804
+ Split: SplitResponse,
805
+ Follow: IDL.Record({}),
806
+ DisburseMaturity: DisburseMaturityResponse,
807
+ ClaimOrRefresh: ClaimOrRefreshResponse,
808
+ Configure: IDL.Record({}),
809
+ RegisterVote: IDL.Record({}),
810
+ SetFollowing: IDL.Record({}),
811
+ MakeProposal: GetProposal,
812
+ RemoveNeuronPermission: IDL.Record({}),
813
+ StakeMaturity: StakeMaturityResponse,
814
+ MergeMaturity: MergeMaturityResponse,
815
+ Disburse: DisburseResponse,
816
+ AddNeuronPermission: IDL.Record({})
817
+ });
818
+ export const ManageNeuronResponse = IDL.Record({
819
+ command: IDL.Opt(Command_1)
820
+ });
821
+ export const SetMode = IDL.Record({mode: IDL.Int32});
822
+
823
+ export const idlService = IDL.Service({
824
+ claim_swap_neurons: IDL.Func([ClaimSwapNeuronsRequest], [ClaimSwapNeuronsResponse], []),
825
+ fail_stuck_upgrade_in_progress: IDL.Func([IDL.Record({})], [IDL.Record({})], []),
826
+ get_build_metadata: IDL.Func([], [IDL.Text], ['query']),
827
+ get_latest_reward_event: IDL.Func([], [RewardEvent], ['query']),
828
+ get_maturity_modulation: IDL.Func([IDL.Record({})], [GetMaturityModulationResponse], []),
829
+ get_metadata: IDL.Func([IDL.Record({})], [GetMetadataResponse], ['query']),
830
+ get_metrics: IDL.Func([GetMetricsRequest], [GetMetricsResponse], ['composite_query']),
831
+ get_metrics_replicated: IDL.Func([GetMetricsRequest], [GetMetricsResponse], []),
832
+ get_mode: IDL.Func([IDL.Record({})], [GetModeResponse], ['query']),
833
+ get_nervous_system_parameters: IDL.Func([IDL.Null], [NervousSystemParameters], ['query']),
834
+ get_neuron: IDL.Func([GetNeuron], [GetNeuronResponse], ['query']),
835
+ get_proposal: IDL.Func([GetProposal], [GetProposalResponse], ['query']),
836
+ get_root_canister_status: IDL.Func([IDL.Null], [CanisterStatusResultV2], []),
837
+ get_running_sns_version: IDL.Func([IDL.Record({})], [GetRunningSnsVersionResponse], ['query']),
838
+ get_sns_initialization_parameters: IDL.Func(
839
+ [IDL.Record({})],
840
+ [GetSnsInitializationParametersResponse],
841
+ ['query']
842
+ ),
843
+ get_timers: IDL.Func([IDL.Record({})], [GetTimersResponse], ['query']),
844
+ get_upgrade_journal: IDL.Func([GetUpgradeJournalRequest], [GetUpgradeJournalResponse], ['query']),
845
+ list_nervous_system_functions: IDL.Func([], [ListNervousSystemFunctionsResponse], ['query']),
846
+ list_neurons: IDL.Func([ListNeurons], [ListNeuronsResponse], ['query']),
847
+ list_proposals: IDL.Func([ListProposals], [ListProposalsResponse], ['query']),
848
+ list_topics: IDL.Func([ListTopicsRequest], [ListTopicsResponse], ['query']),
849
+ manage_neuron: IDL.Func([ManageNeuron], [ManageNeuronResponse], []),
850
+ reset_timers: IDL.Func([IDL.Record({})], [IDL.Record({})], []),
851
+ set_mode: IDL.Func([SetMode], [IDL.Record({})], [])
852
+ });
853
+
854
+ export const idlInitArgs = [Governance];
855
+
856
+ export const idlFactory = ({IDL}) => {
857
+ const PreciseValue = IDL.Rec();
858
+ const Timers = IDL.Record({
859
+ last_spawned_timestamp_seconds: IDL.Opt(IDL.Nat64),
860
+ last_reset_timestamp_seconds: IDL.Opt(IDL.Nat64),
861
+ requires_periodic_tasks: IDL.Opt(IDL.Bool)
862
+ });
863
+ const Version = IDL.Record({
864
+ archive_wasm_hash: IDL.Vec(IDL.Nat8),
865
+ root_wasm_hash: IDL.Vec(IDL.Nat8),
866
+ swap_wasm_hash: IDL.Vec(IDL.Nat8),
867
+ ledger_wasm_hash: IDL.Vec(IDL.Nat8),
868
+ governance_wasm_hash: IDL.Vec(IDL.Nat8),
869
+ index_wasm_hash: IDL.Vec(IDL.Nat8)
870
+ });
871
+ const Versions = IDL.Record({versions: IDL.Vec(Version)});
872
+ const CachedUpgradeSteps = IDL.Record({
873
+ upgrade_steps: IDL.Opt(Versions),
874
+ response_timestamp_seconds: IDL.Opt(IDL.Nat64),
875
+ requested_timestamp_seconds: IDL.Opt(IDL.Nat64)
876
+ });
877
+ const Topic = IDL.Variant({
878
+ DappCanisterManagement: IDL.Null,
879
+ DaoCommunitySettings: IDL.Null,
880
+ ApplicationBusinessLogic: IDL.Null,
881
+ CriticalDappOperations: IDL.Null,
882
+ TreasuryAssetManagement: IDL.Null,
883
+ Governance: IDL.Null,
884
+ SnsFrameworkManagement: IDL.Null
885
+ });
886
+ const GenericNervousSystemFunction = IDL.Record({
887
+ topic: IDL.Opt(Topic),
888
+ validator_canister_id: IDL.Opt(IDL.Principal),
889
+ target_canister_id: IDL.Opt(IDL.Principal),
890
+ validator_method_name: IDL.Opt(IDL.Text),
891
+ target_method_name: IDL.Opt(IDL.Text)
892
+ });
893
+ const FunctionType = IDL.Variant({
894
+ NativeNervousSystemFunction: IDL.Record({}),
895
+ GenericNervousSystemFunction: GenericNervousSystemFunction
896
+ });
897
+ const NervousSystemFunction = IDL.Record({
898
+ id: IDL.Nat64,
899
+ name: IDL.Text,
900
+ description: IDL.Opt(IDL.Text),
901
+ function_type: IDL.Opt(FunctionType)
902
+ });
903
+ const Subaccount = IDL.Record({subaccount: IDL.Vec(IDL.Nat8)});
904
+ const Account = IDL.Record({
905
+ owner: IDL.Opt(IDL.Principal),
906
+ subaccount: IDL.Opt(Subaccount)
907
+ });
908
+ const TreasuryMetrics = IDL.Record({
909
+ name: IDL.Opt(IDL.Text),
910
+ original_amount_e8s: IDL.Opt(IDL.Nat64),
911
+ amount_e8s: IDL.Opt(IDL.Nat64),
912
+ account: IDL.Opt(Account),
913
+ ledger_canister_id: IDL.Opt(IDL.Principal),
914
+ treasury: IDL.Int32,
915
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
916
+ });
917
+ const VotingPowerMetrics = IDL.Record({
918
+ governance_total_potential_voting_power: IDL.Opt(IDL.Nat64),
919
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
920
+ });
921
+ const GovernanceCachedMetrics = IDL.Record({
922
+ treasury_metrics: IDL.Vec(TreasuryMetrics),
923
+ not_dissolving_neurons_e8s_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Float64)),
924
+ garbage_collectable_neurons_count: IDL.Nat64,
925
+ neurons_with_invalid_stake_count: IDL.Nat64,
926
+ not_dissolving_neurons_count_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
927
+ neurons_with_less_than_6_months_dissolve_delay_count: IDL.Nat64,
928
+ dissolved_neurons_count: IDL.Nat64,
929
+ total_staked_e8s: IDL.Nat64,
930
+ total_supply_governance_tokens: IDL.Nat64,
931
+ voting_power_metrics: IDL.Opt(VotingPowerMetrics),
932
+ not_dissolving_neurons_count: IDL.Nat64,
933
+ dissolved_neurons_e8s: IDL.Nat64,
934
+ neurons_with_less_than_6_months_dissolve_delay_e8s: IDL.Nat64,
935
+ dissolving_neurons_count_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
936
+ dissolving_neurons_count: IDL.Nat64,
937
+ dissolving_neurons_e8s_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Float64)),
938
+ timestamp_seconds: IDL.Nat64
939
+ });
940
+ const MaturityModulation = IDL.Record({
941
+ current_basis_points: IDL.Opt(IDL.Int32),
942
+ updated_at_timestamp_seconds: IDL.Opt(IDL.Nat64)
943
+ });
944
+ const TargetVersionSet = IDL.Record({
945
+ old_target_version: IDL.Opt(Version),
946
+ new_target_version: IDL.Opt(Version),
947
+ is_advanced_automatically: IDL.Opt(IDL.Bool)
948
+ });
949
+ const UpgradeStepsReset = IDL.Record({
950
+ human_readable: IDL.Opt(IDL.Text),
951
+ upgrade_steps: IDL.Opt(Versions)
952
+ });
953
+ const UpgradeOutcome = IDL.Record({
954
+ status: IDL.Opt(
955
+ IDL.Variant({
956
+ Success: IDL.Record({}),
957
+ Timeout: IDL.Record({}),
958
+ ExternalFailure: IDL.Record({}),
959
+ InvalidState: IDL.Record({version: IDL.Opt(Version)})
960
+ })
961
+ ),
962
+ human_readable: IDL.Opt(IDL.Text)
963
+ });
964
+ const ProposalId = IDL.Record({id: IDL.Nat64});
965
+ const UpgradeStarted = IDL.Record({
966
+ current_version: IDL.Opt(Version),
967
+ expected_version: IDL.Opt(Version),
968
+ reason: IDL.Opt(
969
+ IDL.Variant({
970
+ UpgradeSnsToNextVersionProposal: ProposalId,
971
+ BehindTargetVersion: IDL.Record({})
972
+ })
973
+ )
974
+ });
975
+ const UpgradeStepsRefreshed = IDL.Record({
976
+ upgrade_steps: IDL.Opt(Versions)
977
+ });
978
+ const TargetVersionReset = IDL.Record({
979
+ human_readable: IDL.Opt(IDL.Text),
980
+ old_target_version: IDL.Opt(Version),
981
+ new_target_version: IDL.Opt(Version)
982
+ });
983
+ const UpgradeJournalEntry = IDL.Record({
984
+ event: IDL.Opt(
985
+ IDL.Variant({
986
+ TargetVersionSet: TargetVersionSet,
987
+ UpgradeStepsReset: UpgradeStepsReset,
988
+ UpgradeOutcome: UpgradeOutcome,
989
+ UpgradeStarted: UpgradeStarted,
990
+ UpgradeStepsRefreshed: UpgradeStepsRefreshed,
991
+ TargetVersionReset: TargetVersionReset
992
+ })
993
+ ),
994
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
995
+ });
996
+ const UpgradeJournal = IDL.Record({
997
+ entries: IDL.Vec(UpgradeJournalEntry)
998
+ });
999
+ const NeuronId = IDL.Record({id: IDL.Vec(IDL.Nat8)});
1000
+ const Followees = IDL.Record({followees: IDL.Vec(NeuronId)});
1001
+ const DefaultFollowees = IDL.Record({
1002
+ followees: IDL.Vec(IDL.Tuple(IDL.Nat64, Followees))
1003
+ });
1004
+ const NeuronPermissionList = IDL.Record({
1005
+ permissions: IDL.Vec(IDL.Int32)
1006
+ });
1007
+ const VotingRewardsParameters = IDL.Record({
1008
+ final_reward_rate_basis_points: IDL.Opt(IDL.Nat64),
1009
+ initial_reward_rate_basis_points: IDL.Opt(IDL.Nat64),
1010
+ reward_rate_transition_duration_seconds: IDL.Opt(IDL.Nat64),
1011
+ round_duration_seconds: IDL.Opt(IDL.Nat64)
1012
+ });
1013
+ const NervousSystemParameters = IDL.Record({
1014
+ default_followees: IDL.Opt(DefaultFollowees),
1015
+ max_dissolve_delay_seconds: IDL.Opt(IDL.Nat64),
1016
+ max_dissolve_delay_bonus_percentage: IDL.Opt(IDL.Nat64),
1017
+ max_followees_per_function: IDL.Opt(IDL.Nat64),
1018
+ automatically_advance_target_version: IDL.Opt(IDL.Bool),
1019
+ neuron_claimer_permissions: IDL.Opt(NeuronPermissionList),
1020
+ neuron_minimum_stake_e8s: IDL.Opt(IDL.Nat64),
1021
+ max_neuron_age_for_age_bonus: IDL.Opt(IDL.Nat64),
1022
+ initial_voting_period_seconds: IDL.Opt(IDL.Nat64),
1023
+ neuron_minimum_dissolve_delay_to_vote_seconds: IDL.Opt(IDL.Nat64),
1024
+ reject_cost_e8s: IDL.Opt(IDL.Nat64),
1025
+ max_proposals_to_keep_per_action: IDL.Opt(IDL.Nat32),
1026
+ wait_for_quiet_deadline_increase_seconds: IDL.Opt(IDL.Nat64),
1027
+ max_number_of_neurons: IDL.Opt(IDL.Nat64),
1028
+ transaction_fee_e8s: IDL.Opt(IDL.Nat64),
1029
+ max_number_of_proposals_with_ballots: IDL.Opt(IDL.Nat64),
1030
+ max_age_bonus_percentage: IDL.Opt(IDL.Nat64),
1031
+ neuron_grantable_permissions: IDL.Opt(NeuronPermissionList),
1032
+ voting_rewards_parameters: IDL.Opt(VotingRewardsParameters),
1033
+ maturity_modulation_disabled: IDL.Opt(IDL.Bool),
1034
+ max_number_of_principals_per_neuron: IDL.Opt(IDL.Nat64)
1035
+ });
1036
+ const RewardEvent = IDL.Record({
1037
+ rounds_since_last_distribution: IDL.Opt(IDL.Nat64),
1038
+ actual_timestamp_seconds: IDL.Nat64,
1039
+ end_timestamp_seconds: IDL.Opt(IDL.Nat64),
1040
+ total_available_e8s_equivalent: IDL.Opt(IDL.Nat64),
1041
+ distributed_e8s_equivalent: IDL.Nat64,
1042
+ round: IDL.Nat64,
1043
+ settled_proposals: IDL.Vec(ProposalId)
1044
+ });
1045
+ const PendingVersion = IDL.Record({
1046
+ mark_failed_at_seconds: IDL.Nat64,
1047
+ checking_upgrade_lock: IDL.Nat64,
1048
+ proposal_id: IDL.Opt(IDL.Nat64),
1049
+ target_version: IDL.Opt(Version)
1050
+ });
1051
+ const GovernanceError = IDL.Record({
1052
+ error_message: IDL.Text,
1053
+ error_type: IDL.Int32
1054
+ });
1055
+ const Decimal = IDL.Record({human_readable: IDL.Opt(IDL.Text)});
1056
+ const Tokens = IDL.Record({e8s: IDL.Opt(IDL.Nat64)});
1057
+ const ValuationFactors = IDL.Record({
1058
+ xdrs_per_icp: IDL.Opt(Decimal),
1059
+ icps_per_token: IDL.Opt(Decimal),
1060
+ tokens: IDL.Opt(Tokens)
1061
+ });
1062
+ const Valuation = IDL.Record({
1063
+ token: IDL.Opt(IDL.Int32),
1064
+ account: IDL.Opt(Account),
1065
+ valuation_factors: IDL.Opt(ValuationFactors),
1066
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
1067
+ });
1068
+ const MintSnsTokensActionAuxiliary = IDL.Record({
1069
+ valuation: IDL.Opt(Valuation)
1070
+ });
1071
+ const SnsVersion = IDL.Record({
1072
+ archive_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1073
+ root_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1074
+ swap_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1075
+ ledger_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1076
+ governance_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1077
+ index_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
1078
+ });
1079
+ const AdvanceSnsTargetVersionActionAuxiliary = IDL.Record({
1080
+ target_version: IDL.Opt(SnsVersion)
1081
+ });
1082
+ const ActionAuxiliary = IDL.Variant({
1083
+ TransferSnsTreasuryFunds: MintSnsTokensActionAuxiliary,
1084
+ MintSnsTokens: MintSnsTokensActionAuxiliary,
1085
+ AdvanceSnsTargetVersion: AdvanceSnsTargetVersionActionAuxiliary
1086
+ });
1087
+ const Ballot = IDL.Record({
1088
+ vote: IDL.Int32,
1089
+ cast_timestamp_seconds: IDL.Nat64,
1090
+ voting_power: IDL.Nat64
1091
+ });
1092
+ const Percentage = IDL.Record({basis_points: IDL.Opt(IDL.Nat64)});
1093
+ const Tally = IDL.Record({
1094
+ no: IDL.Nat64,
1095
+ yes: IDL.Nat64,
1096
+ total: IDL.Nat64,
1097
+ timestamp_seconds: IDL.Nat64
1098
+ });
1099
+ const ManageDappCanisterSettings = IDL.Record({
1100
+ freezing_threshold: IDL.Opt(IDL.Nat64),
1101
+ wasm_memory_threshold: IDL.Opt(IDL.Nat64),
1102
+ canister_ids: IDL.Vec(IDL.Principal),
1103
+ reserved_cycles_limit: IDL.Opt(IDL.Nat64),
1104
+ log_visibility: IDL.Opt(IDL.Int32),
1105
+ wasm_memory_limit: IDL.Opt(IDL.Nat64),
1106
+ memory_allocation: IDL.Opt(IDL.Nat64),
1107
+ compute_allocation: IDL.Opt(IDL.Nat64)
1108
+ });
1109
+ PreciseValue.fill(
1110
+ IDL.Variant({
1111
+ Int: IDL.Int64,
1112
+ Map: IDL.Vec(IDL.Tuple(IDL.Text, PreciseValue)),
1113
+ Nat: IDL.Nat64,
1114
+ Blob: IDL.Vec(IDL.Nat8),
1115
+ Bool: IDL.Bool,
1116
+ Text: IDL.Text,
1117
+ Array: IDL.Vec(PreciseValue)
1118
+ })
1119
+ );
1120
+ const ExtensionOperationArg = IDL.Record({value: IDL.Opt(PreciseValue)});
1121
+ const ExecuteExtensionOperation = IDL.Record({
1122
+ extension_canister_id: IDL.Opt(IDL.Principal),
1123
+ operation_name: IDL.Opt(IDL.Text),
1124
+ operation_arg: IDL.Opt(ExtensionOperationArg)
1125
+ });
1126
+ const ChunkedCanisterWasm = IDL.Record({
1127
+ wasm_module_hash: IDL.Vec(IDL.Nat8),
1128
+ chunk_hashes_list: IDL.Vec(IDL.Vec(IDL.Nat8)),
1129
+ store_canister_id: IDL.Opt(IDL.Principal)
1130
+ });
1131
+ const Wasm = IDL.Variant({
1132
+ Chunked: ChunkedCanisterWasm,
1133
+ Bytes: IDL.Vec(IDL.Nat8)
1134
+ });
1135
+ const ExtensionUpgradeArg = IDL.Record({value: IDL.Opt(PreciseValue)});
1136
+ const UpgradeExtension = IDL.Record({
1137
+ extension_canister_id: IDL.Opt(IDL.Principal),
1138
+ wasm: IDL.Opt(Wasm),
1139
+ canister_upgrade_arg: IDL.Opt(ExtensionUpgradeArg)
1140
+ });
1141
+ const SetTopicsForCustomProposals = IDL.Record({
1142
+ custom_function_id_to_topic: IDL.Vec(IDL.Tuple(IDL.Nat64, Topic))
1143
+ });
1144
+ const ExtensionInit = IDL.Record({value: IDL.Opt(PreciseValue)});
1145
+ const RegisterExtension = IDL.Record({
1146
+ chunked_canister_wasm: IDL.Opt(ChunkedCanisterWasm),
1147
+ extension_init: IDL.Opt(ExtensionInit)
1148
+ });
1149
+ const RegisterDappCanisters = IDL.Record({
1150
+ canister_ids: IDL.Vec(IDL.Principal)
1151
+ });
1152
+ const TransferSnsTreasuryFunds = IDL.Record({
1153
+ from_treasury: IDL.Int32,
1154
+ to_principal: IDL.Opt(IDL.Principal),
1155
+ to_subaccount: IDL.Opt(Subaccount),
1156
+ memo: IDL.Opt(IDL.Nat64),
1157
+ amount_e8s: IDL.Nat64
1158
+ });
1159
+ const UpgradeSnsControlledCanister = IDL.Record({
1160
+ new_canister_wasm: IDL.Vec(IDL.Nat8),
1161
+ mode: IDL.Opt(IDL.Int32),
1162
+ canister_id: IDL.Opt(IDL.Principal),
1163
+ chunked_canister_wasm: IDL.Opt(ChunkedCanisterWasm),
1164
+ canister_upgrade_arg: IDL.Opt(IDL.Vec(IDL.Nat8))
1165
+ });
1166
+ const DeregisterDappCanisters = IDL.Record({
1167
+ canister_ids: IDL.Vec(IDL.Principal),
1168
+ new_controllers: IDL.Vec(IDL.Principal)
1169
+ });
1170
+ const MintSnsTokens = IDL.Record({
1171
+ to_principal: IDL.Opt(IDL.Principal),
1172
+ to_subaccount: IDL.Opt(Subaccount),
1173
+ memo: IDL.Opt(IDL.Nat64),
1174
+ amount_e8s: IDL.Opt(IDL.Nat64)
1175
+ });
1176
+ const AdvanceSnsTargetVersion = IDL.Record({
1177
+ new_target: IDL.Opt(SnsVersion)
1178
+ });
1179
+ const ManageSnsMetadata = IDL.Record({
1180
+ url: IDL.Opt(IDL.Text),
1181
+ logo: IDL.Opt(IDL.Text),
1182
+ name: IDL.Opt(IDL.Text),
1183
+ description: IDL.Opt(IDL.Text)
1184
+ });
1185
+ const ExecuteGenericNervousSystemFunction = IDL.Record({
1186
+ function_id: IDL.Nat64,
1187
+ payload: IDL.Vec(IDL.Nat8)
1188
+ });
1189
+ const ManageLedgerParameters = IDL.Record({
1190
+ token_symbol: IDL.Opt(IDL.Text),
1191
+ transfer_fee: IDL.Opt(IDL.Nat64),
1192
+ token_logo: IDL.Opt(IDL.Text),
1193
+ token_name: IDL.Opt(IDL.Text)
1194
+ });
1195
+ const Motion = IDL.Record({motion_text: IDL.Text});
1196
+ const Action = IDL.Variant({
1197
+ ManageNervousSystemParameters: NervousSystemParameters,
1198
+ AddGenericNervousSystemFunction: NervousSystemFunction,
1199
+ ManageDappCanisterSettings: ManageDappCanisterSettings,
1200
+ ExecuteExtensionOperation: ExecuteExtensionOperation,
1201
+ UpgradeExtension: UpgradeExtension,
1202
+ RemoveGenericNervousSystemFunction: IDL.Nat64,
1203
+ SetTopicsForCustomProposals: SetTopicsForCustomProposals,
1204
+ RegisterExtension: RegisterExtension,
1205
+ UpgradeSnsToNextVersion: IDL.Record({}),
1206
+ RegisterDappCanisters: RegisterDappCanisters,
1207
+ TransferSnsTreasuryFunds: TransferSnsTreasuryFunds,
1208
+ UpgradeSnsControlledCanister: UpgradeSnsControlledCanister,
1209
+ DeregisterDappCanisters: DeregisterDappCanisters,
1210
+ MintSnsTokens: MintSnsTokens,
1211
+ AdvanceSnsTargetVersion: AdvanceSnsTargetVersion,
1212
+ Unspecified: IDL.Record({}),
1213
+ ManageSnsMetadata: ManageSnsMetadata,
1214
+ ExecuteGenericNervousSystemFunction: ExecuteGenericNervousSystemFunction,
1215
+ ManageLedgerParameters: ManageLedgerParameters,
1216
+ Motion: Motion
1217
+ });
1218
+ const Proposal = IDL.Record({
1219
+ url: IDL.Text,
1220
+ title: IDL.Text,
1221
+ action: IDL.Opt(Action),
1222
+ summary: IDL.Text
1223
+ });
1224
+ const WaitForQuietState = IDL.Record({
1225
+ current_deadline_timestamp_seconds: IDL.Nat64
1226
+ });
1227
+ const ProposalData = IDL.Record({
1228
+ id: IDL.Opt(ProposalId),
1229
+ payload_text_rendering: IDL.Opt(IDL.Text),
1230
+ topic: IDL.Opt(Topic),
1231
+ action: IDL.Nat64,
1232
+ failure_reason: IDL.Opt(GovernanceError),
1233
+ action_auxiliary: IDL.Opt(ActionAuxiliary),
1234
+ ballots: IDL.Vec(IDL.Tuple(IDL.Text, Ballot)),
1235
+ minimum_yes_proportion_of_total: IDL.Opt(Percentage),
1236
+ reward_event_round: IDL.Nat64,
1237
+ failed_timestamp_seconds: IDL.Nat64,
1238
+ reward_event_end_timestamp_seconds: IDL.Opt(IDL.Nat64),
1239
+ proposal_creation_timestamp_seconds: IDL.Nat64,
1240
+ initial_voting_period_seconds: IDL.Nat64,
1241
+ reject_cost_e8s: IDL.Nat64,
1242
+ latest_tally: IDL.Opt(Tally),
1243
+ wait_for_quiet_deadline_increase_seconds: IDL.Nat64,
1244
+ decided_timestamp_seconds: IDL.Nat64,
1245
+ proposal: IDL.Opt(Proposal),
1246
+ proposer: IDL.Opt(NeuronId),
1247
+ wait_for_quiet_state: IDL.Opt(WaitForQuietState),
1248
+ minimum_yes_proportion_of_exercised: IDL.Opt(Percentage),
1249
+ is_eligible_for_rewards: IDL.Bool,
1250
+ executed_timestamp_seconds: IDL.Nat64
1251
+ });
1252
+ const Split = IDL.Record({memo: IDL.Nat64, amount_e8s: IDL.Nat64});
1253
+ const Follow = IDL.Record({
1254
+ function_id: IDL.Nat64,
1255
+ followees: IDL.Vec(NeuronId)
1256
+ });
1257
+ const DisburseMaturity = IDL.Record({
1258
+ to_account: IDL.Opt(Account),
1259
+ percentage_to_disburse: IDL.Nat32
1260
+ });
1261
+ const ChangeAutoStakeMaturity = IDL.Record({
1262
+ requested_setting_for_auto_stake_maturity: IDL.Bool
1263
+ });
1264
+ const IncreaseDissolveDelay = IDL.Record({
1265
+ additional_dissolve_delay_seconds: IDL.Nat32
1266
+ });
1267
+ const SetDissolveTimestamp = IDL.Record({
1268
+ dissolve_timestamp_seconds: IDL.Nat64
1269
+ });
1270
+ const Operation = IDL.Variant({
1271
+ ChangeAutoStakeMaturity: ChangeAutoStakeMaturity,
1272
+ StopDissolving: IDL.Record({}),
1273
+ StartDissolving: IDL.Record({}),
1274
+ IncreaseDissolveDelay: IncreaseDissolveDelay,
1275
+ SetDissolveTimestamp: SetDissolveTimestamp
1276
+ });
1277
+ const Configure = IDL.Record({operation: IDL.Opt(Operation)});
1278
+ const RegisterVote = IDL.Record({
1279
+ vote: IDL.Int32,
1280
+ proposal: IDL.Opt(ProposalId)
1281
+ });
1282
+ const Followee = IDL.Record({
1283
+ alias: IDL.Opt(IDL.Text),
1284
+ neuron_id: IDL.Opt(NeuronId)
1285
+ });
1286
+ const FolloweesForTopic = IDL.Record({
1287
+ topic: IDL.Opt(Topic),
1288
+ followees: IDL.Vec(Followee)
1289
+ });
1290
+ const SetFollowing = IDL.Record({
1291
+ topic_following: IDL.Vec(FolloweesForTopic)
1292
+ });
1293
+ const FinalizeDisburseMaturity = IDL.Record({
1294
+ amount_to_be_disbursed_e8s: IDL.Nat64,
1295
+ to_account: IDL.Opt(Account)
1296
+ });
1297
+ const MemoAndController = IDL.Record({
1298
+ controller: IDL.Opt(IDL.Principal),
1299
+ memo: IDL.Nat64
1300
+ });
1301
+ const By = IDL.Variant({
1302
+ MemoAndController: MemoAndController,
1303
+ NeuronId: IDL.Record({})
1304
+ });
1305
+ const ClaimOrRefresh = IDL.Record({by: IDL.Opt(By)});
1306
+ const RemoveNeuronPermissions = IDL.Record({
1307
+ permissions_to_remove: IDL.Opt(NeuronPermissionList),
1308
+ principal_id: IDL.Opt(IDL.Principal)
1309
+ });
1310
+ const AddNeuronPermissions = IDL.Record({
1311
+ permissions_to_add: IDL.Opt(NeuronPermissionList),
1312
+ principal_id: IDL.Opt(IDL.Principal)
1313
+ });
1314
+ const MergeMaturity = IDL.Record({percentage_to_merge: IDL.Nat32});
1315
+ const Amount = IDL.Record({e8s: IDL.Nat64});
1316
+ const Disburse = IDL.Record({
1317
+ to_account: IDL.Opt(Account),
1318
+ amount: IDL.Opt(Amount)
1319
+ });
1320
+ const Command_2 = IDL.Variant({
1321
+ Split: Split,
1322
+ Follow: Follow,
1323
+ DisburseMaturity: DisburseMaturity,
1324
+ Configure: Configure,
1325
+ RegisterVote: RegisterVote,
1326
+ SetFollowing: SetFollowing,
1327
+ SyncCommand: IDL.Record({}),
1328
+ MakeProposal: Proposal,
1329
+ FinalizeDisburseMaturity: FinalizeDisburseMaturity,
1330
+ ClaimOrRefreshNeuron: ClaimOrRefresh,
1331
+ RemoveNeuronPermissions: RemoveNeuronPermissions,
1332
+ AddNeuronPermissions: AddNeuronPermissions,
1333
+ MergeMaturity: MergeMaturity,
1334
+ Disburse: Disburse
1335
+ });
1336
+ const NeuronInFlightCommand = IDL.Record({
1337
+ command: IDL.Opt(Command_2),
1338
+ timestamp: IDL.Nat64
1339
+ });
1340
+ const NeuronPermission = IDL.Record({
1341
+ principal: IDL.Opt(IDL.Principal),
1342
+ permission_type: IDL.Vec(IDL.Int32)
1343
+ });
1344
+ const DissolveState = IDL.Variant({
1345
+ DissolveDelaySeconds: IDL.Nat64,
1346
+ WhenDissolvedTimestampSeconds: IDL.Nat64
1347
+ });
1348
+ const DisburseMaturityInProgress = IDL.Record({
1349
+ timestamp_of_disbursement_seconds: IDL.Nat64,
1350
+ amount_e8s: IDL.Nat64,
1351
+ account_to_disburse_to: IDL.Opt(Account),
1352
+ finalize_disbursement_timestamp_seconds: IDL.Opt(IDL.Nat64)
1353
+ });
1354
+ const Neuron = IDL.Record({
1355
+ id: IDL.Opt(NeuronId),
1356
+ staked_maturity_e8s_equivalent: IDL.Opt(IDL.Nat64),
1357
+ permissions: IDL.Vec(NeuronPermission),
1358
+ maturity_e8s_equivalent: IDL.Nat64,
1359
+ cached_neuron_stake_e8s: IDL.Nat64,
1360
+ created_timestamp_seconds: IDL.Nat64,
1361
+ topic_followees: IDL.Opt(
1362
+ IDL.Record({
1363
+ topic_id_to_followees: IDL.Vec(IDL.Tuple(IDL.Int32, FolloweesForTopic))
1364
+ })
1365
+ ),
1366
+ source_nns_neuron_id: IDL.Opt(IDL.Nat64),
1367
+ auto_stake_maturity: IDL.Opt(IDL.Bool),
1368
+ aging_since_timestamp_seconds: IDL.Nat64,
1369
+ dissolve_state: IDL.Opt(DissolveState),
1370
+ voting_power_percentage_multiplier: IDL.Nat64,
1371
+ vesting_period_seconds: IDL.Opt(IDL.Nat64),
1372
+ disburse_maturity_in_progress: IDL.Vec(DisburseMaturityInProgress),
1373
+ followees: IDL.Vec(IDL.Tuple(IDL.Nat64, Followees)),
1374
+ neuron_fees_e8s: IDL.Nat64
1375
+ });
1376
+ const Governance = IDL.Record({
1377
+ root_canister_id: IDL.Opt(IDL.Principal),
1378
+ timers: IDL.Opt(Timers),
1379
+ cached_upgrade_steps: IDL.Opt(CachedUpgradeSteps),
1380
+ id_to_nervous_system_functions: IDL.Vec(IDL.Tuple(IDL.Nat64, NervousSystemFunction)),
1381
+ metrics: IDL.Opt(GovernanceCachedMetrics),
1382
+ maturity_modulation: IDL.Opt(MaturityModulation),
1383
+ upgrade_journal: IDL.Opt(UpgradeJournal),
1384
+ mode: IDL.Int32,
1385
+ parameters: IDL.Opt(NervousSystemParameters),
1386
+ is_finalizing_disburse_maturity: IDL.Opt(IDL.Bool),
1387
+ deployed_version: IDL.Opt(Version),
1388
+ sns_initialization_parameters: IDL.Text,
1389
+ latest_reward_event: IDL.Opt(RewardEvent),
1390
+ pending_version: IDL.Opt(PendingVersion),
1391
+ swap_canister_id: IDL.Opt(IDL.Principal),
1392
+ ledger_canister_id: IDL.Opt(IDL.Principal),
1393
+ proposals: IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
1394
+ in_flight_commands: IDL.Vec(IDL.Tuple(IDL.Text, NeuronInFlightCommand)),
1395
+ sns_metadata: IDL.Opt(ManageSnsMetadata),
1396
+ neurons: IDL.Vec(IDL.Tuple(IDL.Text, Neuron)),
1397
+ target_version: IDL.Opt(Version),
1398
+ genesis_timestamp_seconds: IDL.Nat64
1399
+ });
1400
+ const Principals = IDL.Record({principals: IDL.Vec(IDL.Principal)});
1401
+ const NeuronsFund = IDL.Record({
1402
+ nns_neuron_hotkeys: IDL.Opt(Principals),
1403
+ nns_neuron_controller: IDL.Opt(IDL.Principal),
1404
+ nns_neuron_id: IDL.Opt(IDL.Nat64)
1405
+ });
1406
+ const Participant = IDL.Variant({
1407
+ NeuronsFund: NeuronsFund,
1408
+ Direct: IDL.Record({})
1409
+ });
1410
+ const NeuronIds = IDL.Record({neuron_ids: IDL.Vec(NeuronId)});
1411
+ const NeuronRecipe = IDL.Record({
1412
+ controller: IDL.Opt(IDL.Principal),
1413
+ dissolve_delay_seconds: IDL.Opt(IDL.Nat64),
1414
+ participant: IDL.Opt(Participant),
1415
+ stake_e8s: IDL.Opt(IDL.Nat64),
1416
+ followees: IDL.Opt(NeuronIds),
1417
+ neuron_id: IDL.Opt(NeuronId)
1418
+ });
1419
+ const NeuronRecipes = IDL.Record({
1420
+ neuron_recipes: IDL.Vec(NeuronRecipe)
1421
+ });
1422
+ const ClaimSwapNeuronsRequest = IDL.Record({
1423
+ neuron_recipes: IDL.Opt(NeuronRecipes)
1424
+ });
1425
+ const SwapNeuron = IDL.Record({
1426
+ id: IDL.Opt(NeuronId),
1427
+ status: IDL.Int32
1428
+ });
1429
+ const ClaimedSwapNeurons = IDL.Record({
1430
+ swap_neurons: IDL.Vec(SwapNeuron)
1431
+ });
1432
+ const ClaimSwapNeuronsResult = IDL.Variant({
1433
+ Ok: ClaimedSwapNeurons,
1434
+ Err: IDL.Int32
1435
+ });
1436
+ const ClaimSwapNeuronsResponse = IDL.Record({
1437
+ claim_swap_neurons_result: IDL.Opt(ClaimSwapNeuronsResult)
1438
+ });
1439
+ const GetMaturityModulationResponse = IDL.Record({
1440
+ maturity_modulation: IDL.Opt(MaturityModulation)
1441
+ });
1442
+ const GetMetadataResponse = IDL.Record({
1443
+ url: IDL.Opt(IDL.Text),
1444
+ logo: IDL.Opt(IDL.Text),
1445
+ name: IDL.Opt(IDL.Text),
1446
+ description: IDL.Opt(IDL.Text)
1447
+ });
1448
+ const GetMetricsRequest = IDL.Record({
1449
+ time_window_seconds: IDL.Opt(IDL.Nat64)
1450
+ });
1451
+ const Metrics = IDL.Record({
1452
+ treasury_metrics: IDL.Opt(IDL.Vec(TreasuryMetrics)),
1453
+ voting_power_metrics: IDL.Opt(VotingPowerMetrics),
1454
+ last_ledger_block_timestamp: IDL.Opt(IDL.Nat64),
1455
+ num_recently_executed_proposals: IDL.Opt(IDL.Nat64),
1456
+ num_recently_submitted_proposals: IDL.Opt(IDL.Nat64),
1457
+ genesis_timestamp_seconds: IDL.Opt(IDL.Nat64)
1458
+ });
1459
+ const GetMetricsResult = IDL.Variant({
1460
+ Ok: Metrics,
1461
+ Err: GovernanceError
1462
+ });
1463
+ const GetMetricsResponse = IDL.Record({
1464
+ get_metrics_result: IDL.Opt(GetMetricsResult)
1465
+ });
1466
+ const GetModeResponse = IDL.Record({mode: IDL.Opt(IDL.Int32)});
1467
+ const GetNeuron = IDL.Record({neuron_id: IDL.Opt(NeuronId)});
1468
+ const Result = IDL.Variant({Error: GovernanceError, Neuron: Neuron});
1469
+ const GetNeuronResponse = IDL.Record({result: IDL.Opt(Result)});
1470
+ const GetProposal = IDL.Record({proposal_id: IDL.Opt(ProposalId)});
1471
+ const Result_1 = IDL.Variant({
1472
+ Error: GovernanceError,
1473
+ Proposal: ProposalData
1474
+ });
1475
+ const GetProposalResponse = IDL.Record({result: IDL.Opt(Result_1)});
1476
+ const MemoryMetrics = IDL.Record({
1477
+ wasm_binary_size: IDL.Opt(IDL.Nat),
1478
+ wasm_chunk_store_size: IDL.Opt(IDL.Nat),
1479
+ canister_history_size: IDL.Opt(IDL.Nat),
1480
+ stable_memory_size: IDL.Opt(IDL.Nat),
1481
+ snapshots_size: IDL.Opt(IDL.Nat),
1482
+ wasm_memory_size: IDL.Opt(IDL.Nat),
1483
+ global_memory_size: IDL.Opt(IDL.Nat),
1484
+ custom_sections_size: IDL.Opt(IDL.Nat)
1485
+ });
1486
+ const CanisterStatusType = IDL.Variant({
1487
+ stopped: IDL.Null,
1488
+ stopping: IDL.Null,
1489
+ running: IDL.Null
1490
+ });
1491
+ const DefiniteCanisterSettingsArgs = IDL.Record({
1492
+ freezing_threshold: IDL.Nat,
1493
+ wasm_memory_threshold: IDL.Opt(IDL.Nat),
1494
+ controllers: IDL.Vec(IDL.Principal),
1495
+ wasm_memory_limit: IDL.Opt(IDL.Nat),
1496
+ memory_allocation: IDL.Nat,
1497
+ compute_allocation: IDL.Nat
1498
+ });
1499
+ const QueryStats = IDL.Record({
1500
+ response_payload_bytes_total: IDL.Opt(IDL.Nat),
1501
+ num_instructions_total: IDL.Opt(IDL.Nat),
1502
+ num_calls_total: IDL.Opt(IDL.Nat),
1503
+ request_payload_bytes_total: IDL.Opt(IDL.Nat)
1504
+ });
1505
+ const CanisterStatusResultV2 = IDL.Record({
1506
+ memory_metrics: IDL.Opt(MemoryMetrics),
1507
+ status: CanisterStatusType,
1508
+ memory_size: IDL.Nat,
1509
+ cycles: IDL.Nat,
1510
+ settings: DefiniteCanisterSettingsArgs,
1511
+ query_stats: IDL.Opt(QueryStats),
1512
+ idle_cycles_burned_per_day: IDL.Nat,
1513
+ module_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
1514
+ });
1515
+ const GetRunningSnsVersionResponse = IDL.Record({
1516
+ deployed_version: IDL.Opt(Version),
1517
+ pending_version: IDL.Opt(
1518
+ IDL.Record({
1519
+ mark_failed_at_seconds: IDL.Nat64,
1520
+ checking_upgrade_lock: IDL.Nat64,
1521
+ proposal_id: IDL.Nat64,
1522
+ target_version: IDL.Opt(Version)
1523
+ })
1524
+ )
1525
+ });
1526
+ const GetSnsInitializationParametersResponse = IDL.Record({
1527
+ sns_initialization_parameters: IDL.Text
1528
+ });
1529
+ const GetTimersResponse = IDL.Record({timers: IDL.Opt(Timers)});
1530
+ const GetUpgradeJournalRequest = IDL.Record({
1531
+ offset: IDL.Opt(IDL.Nat64),
1532
+ limit: IDL.Opt(IDL.Nat64)
1533
+ });
1534
+ const GetUpgradeJournalResponse = IDL.Record({
1535
+ upgrade_journal: IDL.Opt(UpgradeJournal),
1536
+ upgrade_steps: IDL.Opt(Versions),
1537
+ response_timestamp_seconds: IDL.Opt(IDL.Nat64),
1538
+ deployed_version: IDL.Opt(Version),
1539
+ target_version: IDL.Opt(Version),
1540
+ upgrade_journal_entry_count: IDL.Opt(IDL.Nat64)
1541
+ });
1542
+ const ListNervousSystemFunctionsResponse = IDL.Record({
1543
+ reserved_ids: IDL.Vec(IDL.Nat64),
1544
+ functions: IDL.Vec(NervousSystemFunction)
1545
+ });
1546
+ const ListNeurons = IDL.Record({
1547
+ of_principal: IDL.Opt(IDL.Principal),
1548
+ limit: IDL.Nat32,
1549
+ start_page_at: IDL.Opt(NeuronId)
1550
+ });
1551
+ const ListNeuronsResponse = IDL.Record({neurons: IDL.Vec(Neuron)});
1552
+ const TopicSelector = IDL.Record({topic: IDL.Opt(Topic)});
1553
+ const ListProposals = IDL.Record({
1554
+ include_reward_status: IDL.Vec(IDL.Int32),
1555
+ before_proposal: IDL.Opt(ProposalId),
1556
+ limit: IDL.Nat32,
1557
+ exclude_type: IDL.Vec(IDL.Nat64),
1558
+ include_topics: IDL.Opt(IDL.Vec(TopicSelector)),
1559
+ include_status: IDL.Vec(IDL.Int32)
1560
+ });
1561
+ const ListProposalsResponse = IDL.Record({
1562
+ include_ballots_by_caller: IDL.Opt(IDL.Bool),
1563
+ proposals: IDL.Vec(ProposalData),
1564
+ include_topic_filtering: IDL.Opt(IDL.Bool)
1565
+ });
1566
+ const ListTopicsRequest = IDL.Record({});
1567
+ const ExtensionOperationType = IDL.Variant({
1568
+ TreasuryManagerWithdraw: IDL.Null,
1569
+ TreasuryManagerDeposit: IDL.Null
1570
+ });
1571
+ const ExtensionType = IDL.Variant({TreasuryManager: IDL.Null});
1572
+ const ExtensionOperationSpec = IDL.Record({
1573
+ topic: IDL.Opt(Topic),
1574
+ operation_type: IDL.Opt(ExtensionOperationType),
1575
+ description: IDL.Opt(IDL.Text),
1576
+ extension_type: IDL.Opt(ExtensionType)
1577
+ });
1578
+ const RegisteredExtensionOperationSpec = IDL.Record({
1579
+ spec: IDL.Opt(ExtensionOperationSpec),
1580
+ canister_id: IDL.Opt(IDL.Principal)
1581
+ });
1582
+ const TopicInfo = IDL.Record({
1583
+ extension_operations: IDL.Opt(IDL.Vec(RegisteredExtensionOperationSpec)),
1584
+ native_functions: IDL.Opt(IDL.Vec(NervousSystemFunction)),
1585
+ topic: IDL.Opt(Topic),
1586
+ is_critical: IDL.Opt(IDL.Bool),
1587
+ name: IDL.Opt(IDL.Text),
1588
+ description: IDL.Opt(IDL.Text),
1589
+ custom_functions: IDL.Opt(IDL.Vec(NervousSystemFunction))
1590
+ });
1591
+ const ListTopicsResponse = IDL.Record({
1592
+ uncategorized_functions: IDL.Opt(IDL.Vec(NervousSystemFunction)),
1593
+ topics: IDL.Opt(IDL.Vec(TopicInfo))
1594
+ });
1595
+ const StakeMaturity = IDL.Record({
1596
+ percentage_to_stake: IDL.Opt(IDL.Nat32)
1597
+ });
1598
+ const Command = IDL.Variant({
1599
+ Split: Split,
1600
+ Follow: Follow,
1601
+ DisburseMaturity: DisburseMaturity,
1602
+ ClaimOrRefresh: ClaimOrRefresh,
1603
+ Configure: Configure,
1604
+ RegisterVote: RegisterVote,
1605
+ SetFollowing: SetFollowing,
1606
+ MakeProposal: Proposal,
1607
+ StakeMaturity: StakeMaturity,
1608
+ RemoveNeuronPermissions: RemoveNeuronPermissions,
1609
+ AddNeuronPermissions: AddNeuronPermissions,
1610
+ MergeMaturity: MergeMaturity,
1611
+ Disburse: Disburse
1612
+ });
1613
+ const ManageNeuron = IDL.Record({
1614
+ subaccount: IDL.Vec(IDL.Nat8),
1615
+ command: IDL.Opt(Command)
1616
+ });
1617
+ const SplitResponse = IDL.Record({created_neuron_id: IDL.Opt(NeuronId)});
1618
+ const DisburseMaturityResponse = IDL.Record({
1619
+ amount_disbursed_e8s: IDL.Nat64,
1620
+ amount_deducted_e8s: IDL.Opt(IDL.Nat64)
1621
+ });
1622
+ const ClaimOrRefreshResponse = IDL.Record({
1623
+ refreshed_neuron_id: IDL.Opt(NeuronId)
1624
+ });
1625
+ const StakeMaturityResponse = IDL.Record({
1626
+ maturity_e8s: IDL.Nat64,
1627
+ staked_maturity_e8s: IDL.Nat64
1628
+ });
1629
+ const MergeMaturityResponse = IDL.Record({
1630
+ merged_maturity_e8s: IDL.Nat64,
1631
+ new_stake_e8s: IDL.Nat64
1632
+ });
1633
+ const DisburseResponse = IDL.Record({transfer_block_height: IDL.Nat64});
1634
+ const Command_1 = IDL.Variant({
1635
+ Error: GovernanceError,
1636
+ Split: SplitResponse,
1637
+ Follow: IDL.Record({}),
1638
+ DisburseMaturity: DisburseMaturityResponse,
1639
+ ClaimOrRefresh: ClaimOrRefreshResponse,
1640
+ Configure: IDL.Record({}),
1641
+ RegisterVote: IDL.Record({}),
1642
+ SetFollowing: IDL.Record({}),
1643
+ MakeProposal: GetProposal,
1644
+ RemoveNeuronPermission: IDL.Record({}),
1645
+ StakeMaturity: StakeMaturityResponse,
1646
+ MergeMaturity: MergeMaturityResponse,
1647
+ Disburse: DisburseResponse,
1648
+ AddNeuronPermission: IDL.Record({})
1649
+ });
1650
+ const ManageNeuronResponse = IDL.Record({command: IDL.Opt(Command_1)});
1651
+ const SetMode = IDL.Record({mode: IDL.Int32});
1652
+
1653
+ return IDL.Service({
1654
+ claim_swap_neurons: IDL.Func([ClaimSwapNeuronsRequest], [ClaimSwapNeuronsResponse], []),
1655
+ fail_stuck_upgrade_in_progress: IDL.Func([IDL.Record({})], [IDL.Record({})], []),
1656
+ get_build_metadata: IDL.Func([], [IDL.Text], ['query']),
1657
+ get_latest_reward_event: IDL.Func([], [RewardEvent], ['query']),
1658
+ get_maturity_modulation: IDL.Func([IDL.Record({})], [GetMaturityModulationResponse], []),
1659
+ get_metadata: IDL.Func([IDL.Record({})], [GetMetadataResponse], ['query']),
1660
+ get_metrics: IDL.Func([GetMetricsRequest], [GetMetricsResponse], ['composite_query']),
1661
+ get_metrics_replicated: IDL.Func([GetMetricsRequest], [GetMetricsResponse], []),
1662
+ get_mode: IDL.Func([IDL.Record({})], [GetModeResponse], ['query']),
1663
+ get_nervous_system_parameters: IDL.Func([IDL.Null], [NervousSystemParameters], ['query']),
1664
+ get_neuron: IDL.Func([GetNeuron], [GetNeuronResponse], ['query']),
1665
+ get_proposal: IDL.Func([GetProposal], [GetProposalResponse], ['query']),
1666
+ get_root_canister_status: IDL.Func([IDL.Null], [CanisterStatusResultV2], []),
1667
+ get_running_sns_version: IDL.Func([IDL.Record({})], [GetRunningSnsVersionResponse], ['query']),
1668
+ get_sns_initialization_parameters: IDL.Func(
1669
+ [IDL.Record({})],
1670
+ [GetSnsInitializationParametersResponse],
1671
+ ['query']
1672
+ ),
1673
+ get_timers: IDL.Func([IDL.Record({})], [GetTimersResponse], ['query']),
1674
+ get_upgrade_journal: IDL.Func(
1675
+ [GetUpgradeJournalRequest],
1676
+ [GetUpgradeJournalResponse],
1677
+ ['query']
1678
+ ),
1679
+ list_nervous_system_functions: IDL.Func([], [ListNervousSystemFunctionsResponse], ['query']),
1680
+ list_neurons: IDL.Func([ListNeurons], [ListNeuronsResponse], ['query']),
1681
+ list_proposals: IDL.Func([ListProposals], [ListProposalsResponse], ['query']),
1682
+ list_topics: IDL.Func([ListTopicsRequest], [ListTopicsResponse], ['query']),
1683
+ manage_neuron: IDL.Func([ManageNeuron], [ManageNeuronResponse], []),
1684
+ reset_timers: IDL.Func([IDL.Record({})], [IDL.Record({})], []),
1685
+ set_mode: IDL.Func([SetMode], [IDL.Record({})], [])
1686
+ });
1687
+ };
1688
+
1689
+ export const init = ({IDL}) => {
1690
+ const PreciseValue = IDL.Rec();
1691
+ const Timers = IDL.Record({
1692
+ last_spawned_timestamp_seconds: IDL.Opt(IDL.Nat64),
1693
+ last_reset_timestamp_seconds: IDL.Opt(IDL.Nat64),
1694
+ requires_periodic_tasks: IDL.Opt(IDL.Bool)
1695
+ });
1696
+ const Version = IDL.Record({
1697
+ archive_wasm_hash: IDL.Vec(IDL.Nat8),
1698
+ root_wasm_hash: IDL.Vec(IDL.Nat8),
1699
+ swap_wasm_hash: IDL.Vec(IDL.Nat8),
1700
+ ledger_wasm_hash: IDL.Vec(IDL.Nat8),
1701
+ governance_wasm_hash: IDL.Vec(IDL.Nat8),
1702
+ index_wasm_hash: IDL.Vec(IDL.Nat8)
1703
+ });
1704
+ const Versions = IDL.Record({versions: IDL.Vec(Version)});
1705
+ const CachedUpgradeSteps = IDL.Record({
1706
+ upgrade_steps: IDL.Opt(Versions),
1707
+ response_timestamp_seconds: IDL.Opt(IDL.Nat64),
1708
+ requested_timestamp_seconds: IDL.Opt(IDL.Nat64)
1709
+ });
1710
+ const Topic = IDL.Variant({
1711
+ DappCanisterManagement: IDL.Null,
1712
+ DaoCommunitySettings: IDL.Null,
1713
+ ApplicationBusinessLogic: IDL.Null,
1714
+ CriticalDappOperations: IDL.Null,
1715
+ TreasuryAssetManagement: IDL.Null,
1716
+ Governance: IDL.Null,
1717
+ SnsFrameworkManagement: IDL.Null
1718
+ });
1719
+ const GenericNervousSystemFunction = IDL.Record({
1720
+ topic: IDL.Opt(Topic),
1721
+ validator_canister_id: IDL.Opt(IDL.Principal),
1722
+ target_canister_id: IDL.Opt(IDL.Principal),
1723
+ validator_method_name: IDL.Opt(IDL.Text),
1724
+ target_method_name: IDL.Opt(IDL.Text)
1725
+ });
1726
+ const FunctionType = IDL.Variant({
1727
+ NativeNervousSystemFunction: IDL.Record({}),
1728
+ GenericNervousSystemFunction: GenericNervousSystemFunction
1729
+ });
1730
+ const NervousSystemFunction = IDL.Record({
1731
+ id: IDL.Nat64,
1732
+ name: IDL.Text,
1733
+ description: IDL.Opt(IDL.Text),
1734
+ function_type: IDL.Opt(FunctionType)
1735
+ });
1736
+ const Subaccount = IDL.Record({subaccount: IDL.Vec(IDL.Nat8)});
1737
+ const Account = IDL.Record({
1738
+ owner: IDL.Opt(IDL.Principal),
1739
+ subaccount: IDL.Opt(Subaccount)
1740
+ });
1741
+ const TreasuryMetrics = IDL.Record({
1742
+ name: IDL.Opt(IDL.Text),
1743
+ original_amount_e8s: IDL.Opt(IDL.Nat64),
1744
+ amount_e8s: IDL.Opt(IDL.Nat64),
1745
+ account: IDL.Opt(Account),
1746
+ ledger_canister_id: IDL.Opt(IDL.Principal),
1747
+ treasury: IDL.Int32,
1748
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
1749
+ });
1750
+ const VotingPowerMetrics = IDL.Record({
1751
+ governance_total_potential_voting_power: IDL.Opt(IDL.Nat64),
1752
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
1753
+ });
1754
+ const GovernanceCachedMetrics = IDL.Record({
1755
+ treasury_metrics: IDL.Vec(TreasuryMetrics),
1756
+ not_dissolving_neurons_e8s_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Float64)),
1757
+ garbage_collectable_neurons_count: IDL.Nat64,
1758
+ neurons_with_invalid_stake_count: IDL.Nat64,
1759
+ not_dissolving_neurons_count_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
1760
+ neurons_with_less_than_6_months_dissolve_delay_count: IDL.Nat64,
1761
+ dissolved_neurons_count: IDL.Nat64,
1762
+ total_staked_e8s: IDL.Nat64,
1763
+ total_supply_governance_tokens: IDL.Nat64,
1764
+ voting_power_metrics: IDL.Opt(VotingPowerMetrics),
1765
+ not_dissolving_neurons_count: IDL.Nat64,
1766
+ dissolved_neurons_e8s: IDL.Nat64,
1767
+ neurons_with_less_than_6_months_dissolve_delay_e8s: IDL.Nat64,
1768
+ dissolving_neurons_count_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
1769
+ dissolving_neurons_count: IDL.Nat64,
1770
+ dissolving_neurons_e8s_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Float64)),
1771
+ timestamp_seconds: IDL.Nat64
1772
+ });
1773
+ const MaturityModulation = IDL.Record({
1774
+ current_basis_points: IDL.Opt(IDL.Int32),
1775
+ updated_at_timestamp_seconds: IDL.Opt(IDL.Nat64)
1776
+ });
1777
+ const TargetVersionSet = IDL.Record({
1778
+ old_target_version: IDL.Opt(Version),
1779
+ new_target_version: IDL.Opt(Version),
1780
+ is_advanced_automatically: IDL.Opt(IDL.Bool)
1781
+ });
1782
+ const UpgradeStepsReset = IDL.Record({
1783
+ human_readable: IDL.Opt(IDL.Text),
1784
+ upgrade_steps: IDL.Opt(Versions)
1785
+ });
1786
+ const UpgradeOutcome = IDL.Record({
1787
+ status: IDL.Opt(
1788
+ IDL.Variant({
1789
+ Success: IDL.Record({}),
1790
+ Timeout: IDL.Record({}),
1791
+ ExternalFailure: IDL.Record({}),
1792
+ InvalidState: IDL.Record({version: IDL.Opt(Version)})
1793
+ })
1794
+ ),
1795
+ human_readable: IDL.Opt(IDL.Text)
1796
+ });
1797
+ const ProposalId = IDL.Record({id: IDL.Nat64});
1798
+ const UpgradeStarted = IDL.Record({
1799
+ current_version: IDL.Opt(Version),
1800
+ expected_version: IDL.Opt(Version),
1801
+ reason: IDL.Opt(
1802
+ IDL.Variant({
1803
+ UpgradeSnsToNextVersionProposal: ProposalId,
1804
+ BehindTargetVersion: IDL.Record({})
1805
+ })
1806
+ )
1807
+ });
1808
+ const UpgradeStepsRefreshed = IDL.Record({
1809
+ upgrade_steps: IDL.Opt(Versions)
1810
+ });
1811
+ const TargetVersionReset = IDL.Record({
1812
+ human_readable: IDL.Opt(IDL.Text),
1813
+ old_target_version: IDL.Opt(Version),
1814
+ new_target_version: IDL.Opt(Version)
1815
+ });
1816
+ const UpgradeJournalEntry = IDL.Record({
1817
+ event: IDL.Opt(
1818
+ IDL.Variant({
1819
+ TargetVersionSet: TargetVersionSet,
1820
+ UpgradeStepsReset: UpgradeStepsReset,
1821
+ UpgradeOutcome: UpgradeOutcome,
1822
+ UpgradeStarted: UpgradeStarted,
1823
+ UpgradeStepsRefreshed: UpgradeStepsRefreshed,
1824
+ TargetVersionReset: TargetVersionReset
1825
+ })
1826
+ ),
1827
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
1828
+ });
1829
+ const UpgradeJournal = IDL.Record({
1830
+ entries: IDL.Vec(UpgradeJournalEntry)
1831
+ });
1832
+ const NeuronId = IDL.Record({id: IDL.Vec(IDL.Nat8)});
1833
+ const Followees = IDL.Record({followees: IDL.Vec(NeuronId)});
1834
+ const DefaultFollowees = IDL.Record({
1835
+ followees: IDL.Vec(IDL.Tuple(IDL.Nat64, Followees))
1836
+ });
1837
+ const NeuronPermissionList = IDL.Record({
1838
+ permissions: IDL.Vec(IDL.Int32)
1839
+ });
1840
+ const VotingRewardsParameters = IDL.Record({
1841
+ final_reward_rate_basis_points: IDL.Opt(IDL.Nat64),
1842
+ initial_reward_rate_basis_points: IDL.Opt(IDL.Nat64),
1843
+ reward_rate_transition_duration_seconds: IDL.Opt(IDL.Nat64),
1844
+ round_duration_seconds: IDL.Opt(IDL.Nat64)
1845
+ });
1846
+ const NervousSystemParameters = IDL.Record({
1847
+ default_followees: IDL.Opt(DefaultFollowees),
1848
+ max_dissolve_delay_seconds: IDL.Opt(IDL.Nat64),
1849
+ max_dissolve_delay_bonus_percentage: IDL.Opt(IDL.Nat64),
1850
+ max_followees_per_function: IDL.Opt(IDL.Nat64),
1851
+ automatically_advance_target_version: IDL.Opt(IDL.Bool),
1852
+ neuron_claimer_permissions: IDL.Opt(NeuronPermissionList),
1853
+ neuron_minimum_stake_e8s: IDL.Opt(IDL.Nat64),
1854
+ max_neuron_age_for_age_bonus: IDL.Opt(IDL.Nat64),
1855
+ initial_voting_period_seconds: IDL.Opt(IDL.Nat64),
1856
+ neuron_minimum_dissolve_delay_to_vote_seconds: IDL.Opt(IDL.Nat64),
1857
+ reject_cost_e8s: IDL.Opt(IDL.Nat64),
1858
+ max_proposals_to_keep_per_action: IDL.Opt(IDL.Nat32),
1859
+ wait_for_quiet_deadline_increase_seconds: IDL.Opt(IDL.Nat64),
1860
+ max_number_of_neurons: IDL.Opt(IDL.Nat64),
1861
+ transaction_fee_e8s: IDL.Opt(IDL.Nat64),
1862
+ max_number_of_proposals_with_ballots: IDL.Opt(IDL.Nat64),
1863
+ max_age_bonus_percentage: IDL.Opt(IDL.Nat64),
1864
+ neuron_grantable_permissions: IDL.Opt(NeuronPermissionList),
1865
+ voting_rewards_parameters: IDL.Opt(VotingRewardsParameters),
1866
+ maturity_modulation_disabled: IDL.Opt(IDL.Bool),
1867
+ max_number_of_principals_per_neuron: IDL.Opt(IDL.Nat64)
1868
+ });
1869
+ const RewardEvent = IDL.Record({
1870
+ rounds_since_last_distribution: IDL.Opt(IDL.Nat64),
1871
+ actual_timestamp_seconds: IDL.Nat64,
1872
+ end_timestamp_seconds: IDL.Opt(IDL.Nat64),
1873
+ total_available_e8s_equivalent: IDL.Opt(IDL.Nat64),
1874
+ distributed_e8s_equivalent: IDL.Nat64,
1875
+ round: IDL.Nat64,
1876
+ settled_proposals: IDL.Vec(ProposalId)
1877
+ });
1878
+ const PendingVersion = IDL.Record({
1879
+ mark_failed_at_seconds: IDL.Nat64,
1880
+ checking_upgrade_lock: IDL.Nat64,
1881
+ proposal_id: IDL.Opt(IDL.Nat64),
1882
+ target_version: IDL.Opt(Version)
1883
+ });
1884
+ const GovernanceError = IDL.Record({
1885
+ error_message: IDL.Text,
1886
+ error_type: IDL.Int32
1887
+ });
1888
+ const Decimal = IDL.Record({human_readable: IDL.Opt(IDL.Text)});
1889
+ const Tokens = IDL.Record({e8s: IDL.Opt(IDL.Nat64)});
1890
+ const ValuationFactors = IDL.Record({
1891
+ xdrs_per_icp: IDL.Opt(Decimal),
1892
+ icps_per_token: IDL.Opt(Decimal),
1893
+ tokens: IDL.Opt(Tokens)
1894
+ });
1895
+ const Valuation = IDL.Record({
1896
+ token: IDL.Opt(IDL.Int32),
1897
+ account: IDL.Opt(Account),
1898
+ valuation_factors: IDL.Opt(ValuationFactors),
1899
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
1900
+ });
1901
+ const MintSnsTokensActionAuxiliary = IDL.Record({
1902
+ valuation: IDL.Opt(Valuation)
1903
+ });
1904
+ const SnsVersion = IDL.Record({
1905
+ archive_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1906
+ root_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1907
+ swap_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1908
+ ledger_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1909
+ governance_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1910
+ index_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
1911
+ });
1912
+ const AdvanceSnsTargetVersionActionAuxiliary = IDL.Record({
1913
+ target_version: IDL.Opt(SnsVersion)
1914
+ });
1915
+ const ActionAuxiliary = IDL.Variant({
1916
+ TransferSnsTreasuryFunds: MintSnsTokensActionAuxiliary,
1917
+ MintSnsTokens: MintSnsTokensActionAuxiliary,
1918
+ AdvanceSnsTargetVersion: AdvanceSnsTargetVersionActionAuxiliary
1919
+ });
1920
+ const Ballot = IDL.Record({
1921
+ vote: IDL.Int32,
1922
+ cast_timestamp_seconds: IDL.Nat64,
1923
+ voting_power: IDL.Nat64
1924
+ });
1925
+ const Percentage = IDL.Record({basis_points: IDL.Opt(IDL.Nat64)});
1926
+ const Tally = IDL.Record({
1927
+ no: IDL.Nat64,
1928
+ yes: IDL.Nat64,
1929
+ total: IDL.Nat64,
1930
+ timestamp_seconds: IDL.Nat64
1931
+ });
1932
+ const ManageDappCanisterSettings = IDL.Record({
1933
+ freezing_threshold: IDL.Opt(IDL.Nat64),
1934
+ wasm_memory_threshold: IDL.Opt(IDL.Nat64),
1935
+ canister_ids: IDL.Vec(IDL.Principal),
1936
+ reserved_cycles_limit: IDL.Opt(IDL.Nat64),
1937
+ log_visibility: IDL.Opt(IDL.Int32),
1938
+ wasm_memory_limit: IDL.Opt(IDL.Nat64),
1939
+ memory_allocation: IDL.Opt(IDL.Nat64),
1940
+ compute_allocation: IDL.Opt(IDL.Nat64)
1941
+ });
1942
+ PreciseValue.fill(
1943
+ IDL.Variant({
1944
+ Int: IDL.Int64,
1945
+ Map: IDL.Vec(IDL.Tuple(IDL.Text, PreciseValue)),
1946
+ Nat: IDL.Nat64,
1947
+ Blob: IDL.Vec(IDL.Nat8),
1948
+ Bool: IDL.Bool,
1949
+ Text: IDL.Text,
1950
+ Array: IDL.Vec(PreciseValue)
1951
+ })
1952
+ );
1953
+ const ExtensionOperationArg = IDL.Record({value: IDL.Opt(PreciseValue)});
1954
+ const ExecuteExtensionOperation = IDL.Record({
1955
+ extension_canister_id: IDL.Opt(IDL.Principal),
1956
+ operation_name: IDL.Opt(IDL.Text),
1957
+ operation_arg: IDL.Opt(ExtensionOperationArg)
1958
+ });
1959
+ const ChunkedCanisterWasm = IDL.Record({
1960
+ wasm_module_hash: IDL.Vec(IDL.Nat8),
1961
+ chunk_hashes_list: IDL.Vec(IDL.Vec(IDL.Nat8)),
1962
+ store_canister_id: IDL.Opt(IDL.Principal)
1963
+ });
1964
+ const Wasm = IDL.Variant({
1965
+ Chunked: ChunkedCanisterWasm,
1966
+ Bytes: IDL.Vec(IDL.Nat8)
1967
+ });
1968
+ const ExtensionUpgradeArg = IDL.Record({value: IDL.Opt(PreciseValue)});
1969
+ const UpgradeExtension = IDL.Record({
1970
+ extension_canister_id: IDL.Opt(IDL.Principal),
1971
+ wasm: IDL.Opt(Wasm),
1972
+ canister_upgrade_arg: IDL.Opt(ExtensionUpgradeArg)
1973
+ });
1974
+ const SetTopicsForCustomProposals = IDL.Record({
1975
+ custom_function_id_to_topic: IDL.Vec(IDL.Tuple(IDL.Nat64, Topic))
1976
+ });
1977
+ const ExtensionInit = IDL.Record({value: IDL.Opt(PreciseValue)});
1978
+ const RegisterExtension = IDL.Record({
1979
+ chunked_canister_wasm: IDL.Opt(ChunkedCanisterWasm),
1980
+ extension_init: IDL.Opt(ExtensionInit)
1981
+ });
1982
+ const RegisterDappCanisters = IDL.Record({
1983
+ canister_ids: IDL.Vec(IDL.Principal)
1984
+ });
1985
+ const TransferSnsTreasuryFunds = IDL.Record({
1986
+ from_treasury: IDL.Int32,
1987
+ to_principal: IDL.Opt(IDL.Principal),
1988
+ to_subaccount: IDL.Opt(Subaccount),
1989
+ memo: IDL.Opt(IDL.Nat64),
1990
+ amount_e8s: IDL.Nat64
1991
+ });
1992
+ const UpgradeSnsControlledCanister = IDL.Record({
1993
+ new_canister_wasm: IDL.Vec(IDL.Nat8),
1994
+ mode: IDL.Opt(IDL.Int32),
1995
+ canister_id: IDL.Opt(IDL.Principal),
1996
+ chunked_canister_wasm: IDL.Opt(ChunkedCanisterWasm),
1997
+ canister_upgrade_arg: IDL.Opt(IDL.Vec(IDL.Nat8))
1998
+ });
1999
+ const DeregisterDappCanisters = IDL.Record({
2000
+ canister_ids: IDL.Vec(IDL.Principal),
2001
+ new_controllers: IDL.Vec(IDL.Principal)
2002
+ });
2003
+ const MintSnsTokens = IDL.Record({
2004
+ to_principal: IDL.Opt(IDL.Principal),
2005
+ to_subaccount: IDL.Opt(Subaccount),
2006
+ memo: IDL.Opt(IDL.Nat64),
2007
+ amount_e8s: IDL.Opt(IDL.Nat64)
2008
+ });
2009
+ const AdvanceSnsTargetVersion = IDL.Record({
2010
+ new_target: IDL.Opt(SnsVersion)
2011
+ });
2012
+ const ManageSnsMetadata = IDL.Record({
2013
+ url: IDL.Opt(IDL.Text),
2014
+ logo: IDL.Opt(IDL.Text),
2015
+ name: IDL.Opt(IDL.Text),
2016
+ description: IDL.Opt(IDL.Text)
2017
+ });
2018
+ const ExecuteGenericNervousSystemFunction = IDL.Record({
2019
+ function_id: IDL.Nat64,
2020
+ payload: IDL.Vec(IDL.Nat8)
2021
+ });
2022
+ const ManageLedgerParameters = IDL.Record({
2023
+ token_symbol: IDL.Opt(IDL.Text),
2024
+ transfer_fee: IDL.Opt(IDL.Nat64),
2025
+ token_logo: IDL.Opt(IDL.Text),
2026
+ token_name: IDL.Opt(IDL.Text)
2027
+ });
2028
+ const Motion = IDL.Record({motion_text: IDL.Text});
2029
+ const Action = IDL.Variant({
2030
+ ManageNervousSystemParameters: NervousSystemParameters,
2031
+ AddGenericNervousSystemFunction: NervousSystemFunction,
2032
+ ManageDappCanisterSettings: ManageDappCanisterSettings,
2033
+ ExecuteExtensionOperation: ExecuteExtensionOperation,
2034
+ UpgradeExtension: UpgradeExtension,
2035
+ RemoveGenericNervousSystemFunction: IDL.Nat64,
2036
+ SetTopicsForCustomProposals: SetTopicsForCustomProposals,
2037
+ RegisterExtension: RegisterExtension,
2038
+ UpgradeSnsToNextVersion: IDL.Record({}),
2039
+ RegisterDappCanisters: RegisterDappCanisters,
2040
+ TransferSnsTreasuryFunds: TransferSnsTreasuryFunds,
2041
+ UpgradeSnsControlledCanister: UpgradeSnsControlledCanister,
2042
+ DeregisterDappCanisters: DeregisterDappCanisters,
2043
+ MintSnsTokens: MintSnsTokens,
2044
+ AdvanceSnsTargetVersion: AdvanceSnsTargetVersion,
2045
+ Unspecified: IDL.Record({}),
2046
+ ManageSnsMetadata: ManageSnsMetadata,
2047
+ ExecuteGenericNervousSystemFunction: ExecuteGenericNervousSystemFunction,
2048
+ ManageLedgerParameters: ManageLedgerParameters,
2049
+ Motion: Motion
2050
+ });
2051
+ const Proposal = IDL.Record({
2052
+ url: IDL.Text,
2053
+ title: IDL.Text,
2054
+ action: IDL.Opt(Action),
2055
+ summary: IDL.Text
2056
+ });
2057
+ const WaitForQuietState = IDL.Record({
2058
+ current_deadline_timestamp_seconds: IDL.Nat64
2059
+ });
2060
+ const ProposalData = IDL.Record({
2061
+ id: IDL.Opt(ProposalId),
2062
+ payload_text_rendering: IDL.Opt(IDL.Text),
2063
+ topic: IDL.Opt(Topic),
2064
+ action: IDL.Nat64,
2065
+ failure_reason: IDL.Opt(GovernanceError),
2066
+ action_auxiliary: IDL.Opt(ActionAuxiliary),
2067
+ ballots: IDL.Vec(IDL.Tuple(IDL.Text, Ballot)),
2068
+ minimum_yes_proportion_of_total: IDL.Opt(Percentage),
2069
+ reward_event_round: IDL.Nat64,
2070
+ failed_timestamp_seconds: IDL.Nat64,
2071
+ reward_event_end_timestamp_seconds: IDL.Opt(IDL.Nat64),
2072
+ proposal_creation_timestamp_seconds: IDL.Nat64,
2073
+ initial_voting_period_seconds: IDL.Nat64,
2074
+ reject_cost_e8s: IDL.Nat64,
2075
+ latest_tally: IDL.Opt(Tally),
2076
+ wait_for_quiet_deadline_increase_seconds: IDL.Nat64,
2077
+ decided_timestamp_seconds: IDL.Nat64,
2078
+ proposal: IDL.Opt(Proposal),
2079
+ proposer: IDL.Opt(NeuronId),
2080
+ wait_for_quiet_state: IDL.Opt(WaitForQuietState),
2081
+ minimum_yes_proportion_of_exercised: IDL.Opt(Percentage),
2082
+ is_eligible_for_rewards: IDL.Bool,
2083
+ executed_timestamp_seconds: IDL.Nat64
2084
+ });
2085
+ const Split = IDL.Record({memo: IDL.Nat64, amount_e8s: IDL.Nat64});
2086
+ const Follow = IDL.Record({
2087
+ function_id: IDL.Nat64,
2088
+ followees: IDL.Vec(NeuronId)
2089
+ });
2090
+ const DisburseMaturity = IDL.Record({
2091
+ to_account: IDL.Opt(Account),
2092
+ percentage_to_disburse: IDL.Nat32
2093
+ });
2094
+ const ChangeAutoStakeMaturity = IDL.Record({
2095
+ requested_setting_for_auto_stake_maturity: IDL.Bool
2096
+ });
2097
+ const IncreaseDissolveDelay = IDL.Record({
2098
+ additional_dissolve_delay_seconds: IDL.Nat32
2099
+ });
2100
+ const SetDissolveTimestamp = IDL.Record({
2101
+ dissolve_timestamp_seconds: IDL.Nat64
2102
+ });
2103
+ const Operation = IDL.Variant({
2104
+ ChangeAutoStakeMaturity: ChangeAutoStakeMaturity,
2105
+ StopDissolving: IDL.Record({}),
2106
+ StartDissolving: IDL.Record({}),
2107
+ IncreaseDissolveDelay: IncreaseDissolveDelay,
2108
+ SetDissolveTimestamp: SetDissolveTimestamp
2109
+ });
2110
+ const Configure = IDL.Record({operation: IDL.Opt(Operation)});
2111
+ const RegisterVote = IDL.Record({
2112
+ vote: IDL.Int32,
2113
+ proposal: IDL.Opt(ProposalId)
2114
+ });
2115
+ const Followee = IDL.Record({
2116
+ alias: IDL.Opt(IDL.Text),
2117
+ neuron_id: IDL.Opt(NeuronId)
2118
+ });
2119
+ const FolloweesForTopic = IDL.Record({
2120
+ topic: IDL.Opt(Topic),
2121
+ followees: IDL.Vec(Followee)
2122
+ });
2123
+ const SetFollowing = IDL.Record({
2124
+ topic_following: IDL.Vec(FolloweesForTopic)
2125
+ });
2126
+ const FinalizeDisburseMaturity = IDL.Record({
2127
+ amount_to_be_disbursed_e8s: IDL.Nat64,
2128
+ to_account: IDL.Opt(Account)
2129
+ });
2130
+ const MemoAndController = IDL.Record({
2131
+ controller: IDL.Opt(IDL.Principal),
2132
+ memo: IDL.Nat64
2133
+ });
2134
+ const By = IDL.Variant({
2135
+ MemoAndController: MemoAndController,
2136
+ NeuronId: IDL.Record({})
2137
+ });
2138
+ const ClaimOrRefresh = IDL.Record({by: IDL.Opt(By)});
2139
+ const RemoveNeuronPermissions = IDL.Record({
2140
+ permissions_to_remove: IDL.Opt(NeuronPermissionList),
2141
+ principal_id: IDL.Opt(IDL.Principal)
2142
+ });
2143
+ const AddNeuronPermissions = IDL.Record({
2144
+ permissions_to_add: IDL.Opt(NeuronPermissionList),
2145
+ principal_id: IDL.Opt(IDL.Principal)
2146
+ });
2147
+ const MergeMaturity = IDL.Record({percentage_to_merge: IDL.Nat32});
2148
+ const Amount = IDL.Record({e8s: IDL.Nat64});
2149
+ const Disburse = IDL.Record({
2150
+ to_account: IDL.Opt(Account),
2151
+ amount: IDL.Opt(Amount)
2152
+ });
2153
+ const Command_2 = IDL.Variant({
2154
+ Split: Split,
2155
+ Follow: Follow,
2156
+ DisburseMaturity: DisburseMaturity,
2157
+ Configure: Configure,
2158
+ RegisterVote: RegisterVote,
2159
+ SetFollowing: SetFollowing,
2160
+ SyncCommand: IDL.Record({}),
2161
+ MakeProposal: Proposal,
2162
+ FinalizeDisburseMaturity: FinalizeDisburseMaturity,
2163
+ ClaimOrRefreshNeuron: ClaimOrRefresh,
2164
+ RemoveNeuronPermissions: RemoveNeuronPermissions,
2165
+ AddNeuronPermissions: AddNeuronPermissions,
2166
+ MergeMaturity: MergeMaturity,
2167
+ Disburse: Disburse
2168
+ });
2169
+ const NeuronInFlightCommand = IDL.Record({
2170
+ command: IDL.Opt(Command_2),
2171
+ timestamp: IDL.Nat64
2172
+ });
2173
+ const NeuronPermission = IDL.Record({
2174
+ principal: IDL.Opt(IDL.Principal),
2175
+ permission_type: IDL.Vec(IDL.Int32)
2176
+ });
2177
+ const DissolveState = IDL.Variant({
2178
+ DissolveDelaySeconds: IDL.Nat64,
2179
+ WhenDissolvedTimestampSeconds: IDL.Nat64
2180
+ });
2181
+ const DisburseMaturityInProgress = IDL.Record({
2182
+ timestamp_of_disbursement_seconds: IDL.Nat64,
2183
+ amount_e8s: IDL.Nat64,
2184
+ account_to_disburse_to: IDL.Opt(Account),
2185
+ finalize_disbursement_timestamp_seconds: IDL.Opt(IDL.Nat64)
2186
+ });
2187
+ const Neuron = IDL.Record({
2188
+ id: IDL.Opt(NeuronId),
2189
+ staked_maturity_e8s_equivalent: IDL.Opt(IDL.Nat64),
2190
+ permissions: IDL.Vec(NeuronPermission),
2191
+ maturity_e8s_equivalent: IDL.Nat64,
2192
+ cached_neuron_stake_e8s: IDL.Nat64,
2193
+ created_timestamp_seconds: IDL.Nat64,
2194
+ topic_followees: IDL.Opt(
2195
+ IDL.Record({
2196
+ topic_id_to_followees: IDL.Vec(IDL.Tuple(IDL.Int32, FolloweesForTopic))
2197
+ })
2198
+ ),
2199
+ source_nns_neuron_id: IDL.Opt(IDL.Nat64),
2200
+ auto_stake_maturity: IDL.Opt(IDL.Bool),
2201
+ aging_since_timestamp_seconds: IDL.Nat64,
2202
+ dissolve_state: IDL.Opt(DissolveState),
2203
+ voting_power_percentage_multiplier: IDL.Nat64,
2204
+ vesting_period_seconds: IDL.Opt(IDL.Nat64),
2205
+ disburse_maturity_in_progress: IDL.Vec(DisburseMaturityInProgress),
2206
+ followees: IDL.Vec(IDL.Tuple(IDL.Nat64, Followees)),
2207
+ neuron_fees_e8s: IDL.Nat64
2208
+ });
2209
+ const Governance = IDL.Record({
2210
+ root_canister_id: IDL.Opt(IDL.Principal),
2211
+ timers: IDL.Opt(Timers),
2212
+ cached_upgrade_steps: IDL.Opt(CachedUpgradeSteps),
2213
+ id_to_nervous_system_functions: IDL.Vec(IDL.Tuple(IDL.Nat64, NervousSystemFunction)),
2214
+ metrics: IDL.Opt(GovernanceCachedMetrics),
2215
+ maturity_modulation: IDL.Opt(MaturityModulation),
2216
+ upgrade_journal: IDL.Opt(UpgradeJournal),
2217
+ mode: IDL.Int32,
2218
+ parameters: IDL.Opt(NervousSystemParameters),
2219
+ is_finalizing_disburse_maturity: IDL.Opt(IDL.Bool),
2220
+ deployed_version: IDL.Opt(Version),
2221
+ sns_initialization_parameters: IDL.Text,
2222
+ latest_reward_event: IDL.Opt(RewardEvent),
2223
+ pending_version: IDL.Opt(PendingVersion),
2224
+ swap_canister_id: IDL.Opt(IDL.Principal),
2225
+ ledger_canister_id: IDL.Opt(IDL.Principal),
2226
+ proposals: IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
2227
+ in_flight_commands: IDL.Vec(IDL.Tuple(IDL.Text, NeuronInFlightCommand)),
2228
+ sns_metadata: IDL.Opt(ManageSnsMetadata),
2229
+ neurons: IDL.Vec(IDL.Tuple(IDL.Text, Neuron)),
2230
+ target_version: IDL.Opt(Version),
2231
+ genesis_timestamp_seconds: IDL.Nat64
2232
+ });
2233
+
2234
+ return [Governance];
2235
+ };