@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,2283 @@
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 AddMaturityRequest = IDL.Record({
562
+ id: IDL.Opt(NeuronId),
563
+ amount_e8s: IDL.Opt(IDL.Nat64)
564
+ });
565
+ export const AddMaturityResponse = IDL.Record({
566
+ new_maturity_e8s: IDL.Opt(IDL.Nat64)
567
+ });
568
+ export const AdvanceTargetVersionRequest = IDL.Record({
569
+ target_version: IDL.Opt(Version)
570
+ });
571
+ export const AdvanceTargetVersionResponse = IDL.Record({});
572
+ export const Principals = IDL.Record({principals: IDL.Vec(IDL.Principal)});
573
+ export const NeuronsFund = IDL.Record({
574
+ nns_neuron_hotkeys: IDL.Opt(Principals),
575
+ nns_neuron_controller: IDL.Opt(IDL.Principal),
576
+ nns_neuron_id: IDL.Opt(IDL.Nat64)
577
+ });
578
+ export const Participant = IDL.Variant({
579
+ NeuronsFund: NeuronsFund,
580
+ Direct: IDL.Record({})
581
+ });
582
+ export const NeuronIds = IDL.Record({neuron_ids: IDL.Vec(NeuronId)});
583
+ export const NeuronRecipe = IDL.Record({
584
+ controller: IDL.Opt(IDL.Principal),
585
+ dissolve_delay_seconds: IDL.Opt(IDL.Nat64),
586
+ participant: IDL.Opt(Participant),
587
+ stake_e8s: IDL.Opt(IDL.Nat64),
588
+ followees: IDL.Opt(NeuronIds),
589
+ neuron_id: IDL.Opt(NeuronId)
590
+ });
591
+ export const NeuronRecipes = IDL.Record({
592
+ neuron_recipes: IDL.Vec(NeuronRecipe)
593
+ });
594
+ export const ClaimSwapNeuronsRequest = IDL.Record({
595
+ neuron_recipes: IDL.Opt(NeuronRecipes)
596
+ });
597
+ export const SwapNeuron = IDL.Record({
598
+ id: IDL.Opt(NeuronId),
599
+ status: IDL.Int32
600
+ });
601
+ export const ClaimedSwapNeurons = IDL.Record({
602
+ swap_neurons: IDL.Vec(SwapNeuron)
603
+ });
604
+ export const ClaimSwapNeuronsResult = IDL.Variant({
605
+ Ok: ClaimedSwapNeurons,
606
+ Err: IDL.Int32
607
+ });
608
+ export const ClaimSwapNeuronsResponse = IDL.Record({
609
+ claim_swap_neurons_result: IDL.Opt(ClaimSwapNeuronsResult)
610
+ });
611
+ export const GetMaturityModulationResponse = IDL.Record({
612
+ maturity_modulation: IDL.Opt(MaturityModulation)
613
+ });
614
+ export const GetMetadataResponse = IDL.Record({
615
+ url: IDL.Opt(IDL.Text),
616
+ logo: IDL.Opt(IDL.Text),
617
+ name: IDL.Opt(IDL.Text),
618
+ description: IDL.Opt(IDL.Text)
619
+ });
620
+ export const GetMetricsRequest = IDL.Record({
621
+ time_window_seconds: IDL.Opt(IDL.Nat64)
622
+ });
623
+ export const Metrics = IDL.Record({
624
+ treasury_metrics: IDL.Opt(IDL.Vec(TreasuryMetrics)),
625
+ voting_power_metrics: IDL.Opt(VotingPowerMetrics),
626
+ last_ledger_block_timestamp: IDL.Opt(IDL.Nat64),
627
+ num_recently_executed_proposals: IDL.Opt(IDL.Nat64),
628
+ num_recently_submitted_proposals: IDL.Opt(IDL.Nat64),
629
+ genesis_timestamp_seconds: IDL.Opt(IDL.Nat64)
630
+ });
631
+ export const GetMetricsResult = IDL.Variant({
632
+ Ok: Metrics,
633
+ Err: GovernanceError
634
+ });
635
+ export const GetMetricsResponse = IDL.Record({
636
+ get_metrics_result: IDL.Opt(GetMetricsResult)
637
+ });
638
+ export const GetModeResponse = IDL.Record({mode: IDL.Opt(IDL.Int32)});
639
+ export const GetNeuron = IDL.Record({neuron_id: IDL.Opt(NeuronId)});
640
+ export const Result = IDL.Variant({
641
+ Error: GovernanceError,
642
+ Neuron: Neuron
643
+ });
644
+ export const GetNeuronResponse = IDL.Record({result: IDL.Opt(Result)});
645
+ export const GetProposal = IDL.Record({proposal_id: IDL.Opt(ProposalId)});
646
+ export const Result_1 = IDL.Variant({
647
+ Error: GovernanceError,
648
+ Proposal: ProposalData
649
+ });
650
+ export const GetProposalResponse = IDL.Record({result: IDL.Opt(Result_1)});
651
+ export const MemoryMetrics = IDL.Record({
652
+ wasm_binary_size: IDL.Opt(IDL.Nat),
653
+ wasm_chunk_store_size: IDL.Opt(IDL.Nat),
654
+ canister_history_size: IDL.Opt(IDL.Nat),
655
+ stable_memory_size: IDL.Opt(IDL.Nat),
656
+ snapshots_size: IDL.Opt(IDL.Nat),
657
+ wasm_memory_size: IDL.Opt(IDL.Nat),
658
+ global_memory_size: IDL.Opt(IDL.Nat),
659
+ custom_sections_size: IDL.Opt(IDL.Nat)
660
+ });
661
+ export const CanisterStatusType = IDL.Variant({
662
+ stopped: IDL.Null,
663
+ stopping: IDL.Null,
664
+ running: IDL.Null
665
+ });
666
+ export const DefiniteCanisterSettingsArgs = IDL.Record({
667
+ freezing_threshold: IDL.Nat,
668
+ wasm_memory_threshold: IDL.Opt(IDL.Nat),
669
+ controllers: IDL.Vec(IDL.Principal),
670
+ wasm_memory_limit: IDL.Opt(IDL.Nat),
671
+ memory_allocation: IDL.Nat,
672
+ compute_allocation: IDL.Nat
673
+ });
674
+ export const QueryStats = IDL.Record({
675
+ response_payload_bytes_total: IDL.Opt(IDL.Nat),
676
+ num_instructions_total: IDL.Opt(IDL.Nat),
677
+ num_calls_total: IDL.Opt(IDL.Nat),
678
+ request_payload_bytes_total: IDL.Opt(IDL.Nat)
679
+ });
680
+ export const CanisterStatusResultV2 = IDL.Record({
681
+ memory_metrics: IDL.Opt(MemoryMetrics),
682
+ status: CanisterStatusType,
683
+ memory_size: IDL.Nat,
684
+ cycles: IDL.Nat,
685
+ settings: DefiniteCanisterSettingsArgs,
686
+ query_stats: IDL.Opt(QueryStats),
687
+ idle_cycles_burned_per_day: IDL.Nat,
688
+ module_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
689
+ });
690
+ export const GetRunningSnsVersionResponse = IDL.Record({
691
+ deployed_version: IDL.Opt(Version),
692
+ pending_version: IDL.Opt(
693
+ IDL.Record({
694
+ mark_failed_at_seconds: IDL.Nat64,
695
+ checking_upgrade_lock: IDL.Nat64,
696
+ proposal_id: IDL.Nat64,
697
+ target_version: IDL.Opt(Version)
698
+ })
699
+ )
700
+ });
701
+ export const GetSnsInitializationParametersResponse = IDL.Record({
702
+ sns_initialization_parameters: IDL.Text
703
+ });
704
+ export const GetTimersResponse = IDL.Record({timers: IDL.Opt(Timers)});
705
+ export const GetUpgradeJournalRequest = IDL.Record({
706
+ offset: IDL.Opt(IDL.Nat64),
707
+ limit: IDL.Opt(IDL.Nat64)
708
+ });
709
+ export const GetUpgradeJournalResponse = IDL.Record({
710
+ upgrade_journal: IDL.Opt(UpgradeJournal),
711
+ upgrade_steps: IDL.Opt(Versions),
712
+ response_timestamp_seconds: IDL.Opt(IDL.Nat64),
713
+ deployed_version: IDL.Opt(Version),
714
+ target_version: IDL.Opt(Version),
715
+ upgrade_journal_entry_count: IDL.Opt(IDL.Nat64)
716
+ });
717
+ export const ListNervousSystemFunctionsResponse = IDL.Record({
718
+ reserved_ids: IDL.Vec(IDL.Nat64),
719
+ functions: IDL.Vec(NervousSystemFunction)
720
+ });
721
+ export const ListNeurons = IDL.Record({
722
+ of_principal: IDL.Opt(IDL.Principal),
723
+ limit: IDL.Nat32,
724
+ start_page_at: IDL.Opt(NeuronId)
725
+ });
726
+ export const ListNeuronsResponse = IDL.Record({neurons: IDL.Vec(Neuron)});
727
+ export const TopicSelector = IDL.Record({topic: IDL.Opt(Topic)});
728
+ export const ListProposals = IDL.Record({
729
+ include_reward_status: IDL.Vec(IDL.Int32),
730
+ before_proposal: IDL.Opt(ProposalId),
731
+ limit: IDL.Nat32,
732
+ exclude_type: IDL.Vec(IDL.Nat64),
733
+ include_topics: IDL.Opt(IDL.Vec(TopicSelector)),
734
+ include_status: IDL.Vec(IDL.Int32)
735
+ });
736
+ export const ListProposalsResponse = IDL.Record({
737
+ include_ballots_by_caller: IDL.Opt(IDL.Bool),
738
+ proposals: IDL.Vec(ProposalData),
739
+ include_topic_filtering: IDL.Opt(IDL.Bool)
740
+ });
741
+ export const ListTopicsRequest = IDL.Record({});
742
+ export const ExtensionOperationType = IDL.Variant({
743
+ TreasuryManagerWithdraw: IDL.Null,
744
+ TreasuryManagerDeposit: IDL.Null
745
+ });
746
+ export const ExtensionType = IDL.Variant({TreasuryManager: IDL.Null});
747
+ export const ExtensionOperationSpec = IDL.Record({
748
+ topic: IDL.Opt(Topic),
749
+ operation_type: IDL.Opt(ExtensionOperationType),
750
+ description: IDL.Opt(IDL.Text),
751
+ extension_type: IDL.Opt(ExtensionType)
752
+ });
753
+ export const RegisteredExtensionOperationSpec = IDL.Record({
754
+ spec: IDL.Opt(ExtensionOperationSpec),
755
+ canister_id: IDL.Opt(IDL.Principal)
756
+ });
757
+ export const TopicInfo = IDL.Record({
758
+ extension_operations: IDL.Opt(IDL.Vec(RegisteredExtensionOperationSpec)),
759
+ native_functions: IDL.Opt(IDL.Vec(NervousSystemFunction)),
760
+ topic: IDL.Opt(Topic),
761
+ is_critical: IDL.Opt(IDL.Bool),
762
+ name: IDL.Opt(IDL.Text),
763
+ description: IDL.Opt(IDL.Text),
764
+ custom_functions: IDL.Opt(IDL.Vec(NervousSystemFunction))
765
+ });
766
+ export const ListTopicsResponse = IDL.Record({
767
+ uncategorized_functions: IDL.Opt(IDL.Vec(NervousSystemFunction)),
768
+ topics: IDL.Opt(IDL.Vec(TopicInfo))
769
+ });
770
+ export const StakeMaturity = IDL.Record({
771
+ percentage_to_stake: IDL.Opt(IDL.Nat32)
772
+ });
773
+ export const Command = IDL.Variant({
774
+ Split: Split,
775
+ Follow: Follow,
776
+ DisburseMaturity: DisburseMaturity,
777
+ ClaimOrRefresh: ClaimOrRefresh,
778
+ Configure: Configure,
779
+ RegisterVote: RegisterVote,
780
+ SetFollowing: SetFollowing,
781
+ MakeProposal: Proposal,
782
+ StakeMaturity: StakeMaturity,
783
+ RemoveNeuronPermissions: RemoveNeuronPermissions,
784
+ AddNeuronPermissions: AddNeuronPermissions,
785
+ MergeMaturity: MergeMaturity,
786
+ Disburse: Disburse
787
+ });
788
+ export const ManageNeuron = IDL.Record({
789
+ subaccount: IDL.Vec(IDL.Nat8),
790
+ command: IDL.Opt(Command)
791
+ });
792
+ export const SplitResponse = IDL.Record({
793
+ created_neuron_id: IDL.Opt(NeuronId)
794
+ });
795
+ export const DisburseMaturityResponse = IDL.Record({
796
+ amount_disbursed_e8s: IDL.Nat64,
797
+ amount_deducted_e8s: IDL.Opt(IDL.Nat64)
798
+ });
799
+ export const ClaimOrRefreshResponse = IDL.Record({
800
+ refreshed_neuron_id: IDL.Opt(NeuronId)
801
+ });
802
+ export const StakeMaturityResponse = IDL.Record({
803
+ maturity_e8s: IDL.Nat64,
804
+ staked_maturity_e8s: IDL.Nat64
805
+ });
806
+ export const MergeMaturityResponse = IDL.Record({
807
+ merged_maturity_e8s: IDL.Nat64,
808
+ new_stake_e8s: IDL.Nat64
809
+ });
810
+ export const DisburseResponse = IDL.Record({
811
+ transfer_block_height: IDL.Nat64
812
+ });
813
+ export const Command_1 = IDL.Variant({
814
+ Error: GovernanceError,
815
+ Split: SplitResponse,
816
+ Follow: IDL.Record({}),
817
+ DisburseMaturity: DisburseMaturityResponse,
818
+ ClaimOrRefresh: ClaimOrRefreshResponse,
819
+ Configure: IDL.Record({}),
820
+ RegisterVote: IDL.Record({}),
821
+ SetFollowing: IDL.Record({}),
822
+ MakeProposal: GetProposal,
823
+ RemoveNeuronPermission: IDL.Record({}),
824
+ StakeMaturity: StakeMaturityResponse,
825
+ MergeMaturity: MergeMaturityResponse,
826
+ Disburse: DisburseResponse,
827
+ AddNeuronPermission: IDL.Record({})
828
+ });
829
+ export const ManageNeuronResponse = IDL.Record({
830
+ command: IDL.Opt(Command_1)
831
+ });
832
+ export const MintTokensRequest = IDL.Record({
833
+ recipient: IDL.Opt(Account),
834
+ amount_e8s: IDL.Opt(IDL.Nat64)
835
+ });
836
+ export const SetMode = IDL.Record({mode: IDL.Int32});
837
+
838
+ export const idlService = IDL.Service({
839
+ add_maturity: IDL.Func([AddMaturityRequest], [AddMaturityResponse], []),
840
+ advance_target_version: IDL.Func(
841
+ [AdvanceTargetVersionRequest],
842
+ [AdvanceTargetVersionResponse],
843
+ []
844
+ ),
845
+ claim_swap_neurons: IDL.Func([ClaimSwapNeuronsRequest], [ClaimSwapNeuronsResponse], []),
846
+ fail_stuck_upgrade_in_progress: IDL.Func([IDL.Record({})], [IDL.Record({})], []),
847
+ get_build_metadata: IDL.Func([], [IDL.Text], ['query']),
848
+ get_latest_reward_event: IDL.Func([], [RewardEvent], ['query']),
849
+ get_maturity_modulation: IDL.Func([IDL.Record({})], [GetMaturityModulationResponse], []),
850
+ get_metadata: IDL.Func([IDL.Record({})], [GetMetadataResponse], ['query']),
851
+ get_metrics: IDL.Func([GetMetricsRequest], [GetMetricsResponse], ['composite_query']),
852
+ get_metrics_replicated: IDL.Func([GetMetricsRequest], [GetMetricsResponse], []),
853
+ get_mode: IDL.Func([IDL.Record({})], [GetModeResponse], ['query']),
854
+ get_nervous_system_parameters: IDL.Func([IDL.Null], [NervousSystemParameters], ['query']),
855
+ get_neuron: IDL.Func([GetNeuron], [GetNeuronResponse], ['query']),
856
+ get_proposal: IDL.Func([GetProposal], [GetProposalResponse], ['query']),
857
+ get_root_canister_status: IDL.Func([IDL.Null], [CanisterStatusResultV2], []),
858
+ get_running_sns_version: IDL.Func([IDL.Record({})], [GetRunningSnsVersionResponse], ['query']),
859
+ get_sns_initialization_parameters: IDL.Func(
860
+ [IDL.Record({})],
861
+ [GetSnsInitializationParametersResponse],
862
+ ['query']
863
+ ),
864
+ get_timers: IDL.Func([IDL.Record({})], [GetTimersResponse], ['query']),
865
+ get_upgrade_journal: IDL.Func([GetUpgradeJournalRequest], [GetUpgradeJournalResponse], ['query']),
866
+ list_nervous_system_functions: IDL.Func([], [ListNervousSystemFunctionsResponse], ['query']),
867
+ list_neurons: IDL.Func([ListNeurons], [ListNeuronsResponse], ['query']),
868
+ list_proposals: IDL.Func([ListProposals], [ListProposalsResponse], ['query']),
869
+ list_topics: IDL.Func([ListTopicsRequest], [ListTopicsResponse], ['query']),
870
+ manage_neuron: IDL.Func([ManageNeuron], [ManageNeuronResponse], []),
871
+ mint_tokens: IDL.Func([MintTokensRequest], [IDL.Record({})], []),
872
+ refresh_cached_upgrade_steps: IDL.Func([IDL.Record({})], [IDL.Record({})], []),
873
+ reset_timers: IDL.Func([IDL.Record({})], [IDL.Record({})], []),
874
+ set_mode: IDL.Func([SetMode], [IDL.Record({})], []),
875
+ update_neuron: IDL.Func([Neuron], [IDL.Opt(GovernanceError)], [])
876
+ });
877
+
878
+ export const idlInitArgs = [Governance];
879
+
880
+ export const idlFactory = ({IDL}) => {
881
+ const PreciseValue = IDL.Rec();
882
+ const Timers = IDL.Record({
883
+ last_spawned_timestamp_seconds: IDL.Opt(IDL.Nat64),
884
+ last_reset_timestamp_seconds: IDL.Opt(IDL.Nat64),
885
+ requires_periodic_tasks: IDL.Opt(IDL.Bool)
886
+ });
887
+ const Version = IDL.Record({
888
+ archive_wasm_hash: IDL.Vec(IDL.Nat8),
889
+ root_wasm_hash: IDL.Vec(IDL.Nat8),
890
+ swap_wasm_hash: IDL.Vec(IDL.Nat8),
891
+ ledger_wasm_hash: IDL.Vec(IDL.Nat8),
892
+ governance_wasm_hash: IDL.Vec(IDL.Nat8),
893
+ index_wasm_hash: IDL.Vec(IDL.Nat8)
894
+ });
895
+ const Versions = IDL.Record({versions: IDL.Vec(Version)});
896
+ const CachedUpgradeSteps = IDL.Record({
897
+ upgrade_steps: IDL.Opt(Versions),
898
+ response_timestamp_seconds: IDL.Opt(IDL.Nat64),
899
+ requested_timestamp_seconds: IDL.Opt(IDL.Nat64)
900
+ });
901
+ const Topic = IDL.Variant({
902
+ DappCanisterManagement: IDL.Null,
903
+ DaoCommunitySettings: IDL.Null,
904
+ ApplicationBusinessLogic: IDL.Null,
905
+ CriticalDappOperations: IDL.Null,
906
+ TreasuryAssetManagement: IDL.Null,
907
+ Governance: IDL.Null,
908
+ SnsFrameworkManagement: IDL.Null
909
+ });
910
+ const GenericNervousSystemFunction = IDL.Record({
911
+ topic: IDL.Opt(Topic),
912
+ validator_canister_id: IDL.Opt(IDL.Principal),
913
+ target_canister_id: IDL.Opt(IDL.Principal),
914
+ validator_method_name: IDL.Opt(IDL.Text),
915
+ target_method_name: IDL.Opt(IDL.Text)
916
+ });
917
+ const FunctionType = IDL.Variant({
918
+ NativeNervousSystemFunction: IDL.Record({}),
919
+ GenericNervousSystemFunction: GenericNervousSystemFunction
920
+ });
921
+ const NervousSystemFunction = IDL.Record({
922
+ id: IDL.Nat64,
923
+ name: IDL.Text,
924
+ description: IDL.Opt(IDL.Text),
925
+ function_type: IDL.Opt(FunctionType)
926
+ });
927
+ const Subaccount = IDL.Record({subaccount: IDL.Vec(IDL.Nat8)});
928
+ const Account = IDL.Record({
929
+ owner: IDL.Opt(IDL.Principal),
930
+ subaccount: IDL.Opt(Subaccount)
931
+ });
932
+ const TreasuryMetrics = IDL.Record({
933
+ name: IDL.Opt(IDL.Text),
934
+ original_amount_e8s: IDL.Opt(IDL.Nat64),
935
+ amount_e8s: IDL.Opt(IDL.Nat64),
936
+ account: IDL.Opt(Account),
937
+ ledger_canister_id: IDL.Opt(IDL.Principal),
938
+ treasury: IDL.Int32,
939
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
940
+ });
941
+ const VotingPowerMetrics = IDL.Record({
942
+ governance_total_potential_voting_power: IDL.Opt(IDL.Nat64),
943
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
944
+ });
945
+ const GovernanceCachedMetrics = IDL.Record({
946
+ treasury_metrics: IDL.Vec(TreasuryMetrics),
947
+ not_dissolving_neurons_e8s_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Float64)),
948
+ garbage_collectable_neurons_count: IDL.Nat64,
949
+ neurons_with_invalid_stake_count: IDL.Nat64,
950
+ not_dissolving_neurons_count_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
951
+ neurons_with_less_than_6_months_dissolve_delay_count: IDL.Nat64,
952
+ dissolved_neurons_count: IDL.Nat64,
953
+ total_staked_e8s: IDL.Nat64,
954
+ total_supply_governance_tokens: IDL.Nat64,
955
+ voting_power_metrics: IDL.Opt(VotingPowerMetrics),
956
+ not_dissolving_neurons_count: IDL.Nat64,
957
+ dissolved_neurons_e8s: IDL.Nat64,
958
+ neurons_with_less_than_6_months_dissolve_delay_e8s: IDL.Nat64,
959
+ dissolving_neurons_count_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
960
+ dissolving_neurons_count: IDL.Nat64,
961
+ dissolving_neurons_e8s_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Float64)),
962
+ timestamp_seconds: IDL.Nat64
963
+ });
964
+ const MaturityModulation = IDL.Record({
965
+ current_basis_points: IDL.Opt(IDL.Int32),
966
+ updated_at_timestamp_seconds: IDL.Opt(IDL.Nat64)
967
+ });
968
+ const TargetVersionSet = IDL.Record({
969
+ old_target_version: IDL.Opt(Version),
970
+ new_target_version: IDL.Opt(Version),
971
+ is_advanced_automatically: IDL.Opt(IDL.Bool)
972
+ });
973
+ const UpgradeStepsReset = IDL.Record({
974
+ human_readable: IDL.Opt(IDL.Text),
975
+ upgrade_steps: IDL.Opt(Versions)
976
+ });
977
+ const UpgradeOutcome = IDL.Record({
978
+ status: IDL.Opt(
979
+ IDL.Variant({
980
+ Success: IDL.Record({}),
981
+ Timeout: IDL.Record({}),
982
+ ExternalFailure: IDL.Record({}),
983
+ InvalidState: IDL.Record({version: IDL.Opt(Version)})
984
+ })
985
+ ),
986
+ human_readable: IDL.Opt(IDL.Text)
987
+ });
988
+ const ProposalId = IDL.Record({id: IDL.Nat64});
989
+ const UpgradeStarted = IDL.Record({
990
+ current_version: IDL.Opt(Version),
991
+ expected_version: IDL.Opt(Version),
992
+ reason: IDL.Opt(
993
+ IDL.Variant({
994
+ UpgradeSnsToNextVersionProposal: ProposalId,
995
+ BehindTargetVersion: IDL.Record({})
996
+ })
997
+ )
998
+ });
999
+ const UpgradeStepsRefreshed = IDL.Record({
1000
+ upgrade_steps: IDL.Opt(Versions)
1001
+ });
1002
+ const TargetVersionReset = IDL.Record({
1003
+ human_readable: IDL.Opt(IDL.Text),
1004
+ old_target_version: IDL.Opt(Version),
1005
+ new_target_version: IDL.Opt(Version)
1006
+ });
1007
+ const UpgradeJournalEntry = IDL.Record({
1008
+ event: IDL.Opt(
1009
+ IDL.Variant({
1010
+ TargetVersionSet: TargetVersionSet,
1011
+ UpgradeStepsReset: UpgradeStepsReset,
1012
+ UpgradeOutcome: UpgradeOutcome,
1013
+ UpgradeStarted: UpgradeStarted,
1014
+ UpgradeStepsRefreshed: UpgradeStepsRefreshed,
1015
+ TargetVersionReset: TargetVersionReset
1016
+ })
1017
+ ),
1018
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
1019
+ });
1020
+ const UpgradeJournal = IDL.Record({
1021
+ entries: IDL.Vec(UpgradeJournalEntry)
1022
+ });
1023
+ const NeuronId = IDL.Record({id: IDL.Vec(IDL.Nat8)});
1024
+ const Followees = IDL.Record({followees: IDL.Vec(NeuronId)});
1025
+ const DefaultFollowees = IDL.Record({
1026
+ followees: IDL.Vec(IDL.Tuple(IDL.Nat64, Followees))
1027
+ });
1028
+ const NeuronPermissionList = IDL.Record({
1029
+ permissions: IDL.Vec(IDL.Int32)
1030
+ });
1031
+ const VotingRewardsParameters = IDL.Record({
1032
+ final_reward_rate_basis_points: IDL.Opt(IDL.Nat64),
1033
+ initial_reward_rate_basis_points: IDL.Opt(IDL.Nat64),
1034
+ reward_rate_transition_duration_seconds: IDL.Opt(IDL.Nat64),
1035
+ round_duration_seconds: IDL.Opt(IDL.Nat64)
1036
+ });
1037
+ const NervousSystemParameters = IDL.Record({
1038
+ default_followees: IDL.Opt(DefaultFollowees),
1039
+ max_dissolve_delay_seconds: IDL.Opt(IDL.Nat64),
1040
+ max_dissolve_delay_bonus_percentage: IDL.Opt(IDL.Nat64),
1041
+ max_followees_per_function: IDL.Opt(IDL.Nat64),
1042
+ automatically_advance_target_version: IDL.Opt(IDL.Bool),
1043
+ neuron_claimer_permissions: IDL.Opt(NeuronPermissionList),
1044
+ neuron_minimum_stake_e8s: IDL.Opt(IDL.Nat64),
1045
+ max_neuron_age_for_age_bonus: IDL.Opt(IDL.Nat64),
1046
+ initial_voting_period_seconds: IDL.Opt(IDL.Nat64),
1047
+ neuron_minimum_dissolve_delay_to_vote_seconds: IDL.Opt(IDL.Nat64),
1048
+ reject_cost_e8s: IDL.Opt(IDL.Nat64),
1049
+ max_proposals_to_keep_per_action: IDL.Opt(IDL.Nat32),
1050
+ wait_for_quiet_deadline_increase_seconds: IDL.Opt(IDL.Nat64),
1051
+ max_number_of_neurons: IDL.Opt(IDL.Nat64),
1052
+ transaction_fee_e8s: IDL.Opt(IDL.Nat64),
1053
+ max_number_of_proposals_with_ballots: IDL.Opt(IDL.Nat64),
1054
+ max_age_bonus_percentage: IDL.Opt(IDL.Nat64),
1055
+ neuron_grantable_permissions: IDL.Opt(NeuronPermissionList),
1056
+ voting_rewards_parameters: IDL.Opt(VotingRewardsParameters),
1057
+ maturity_modulation_disabled: IDL.Opt(IDL.Bool),
1058
+ max_number_of_principals_per_neuron: IDL.Opt(IDL.Nat64)
1059
+ });
1060
+ const RewardEvent = IDL.Record({
1061
+ rounds_since_last_distribution: IDL.Opt(IDL.Nat64),
1062
+ actual_timestamp_seconds: IDL.Nat64,
1063
+ end_timestamp_seconds: IDL.Opt(IDL.Nat64),
1064
+ total_available_e8s_equivalent: IDL.Opt(IDL.Nat64),
1065
+ distributed_e8s_equivalent: IDL.Nat64,
1066
+ round: IDL.Nat64,
1067
+ settled_proposals: IDL.Vec(ProposalId)
1068
+ });
1069
+ const PendingVersion = IDL.Record({
1070
+ mark_failed_at_seconds: IDL.Nat64,
1071
+ checking_upgrade_lock: IDL.Nat64,
1072
+ proposal_id: IDL.Opt(IDL.Nat64),
1073
+ target_version: IDL.Opt(Version)
1074
+ });
1075
+ const GovernanceError = IDL.Record({
1076
+ error_message: IDL.Text,
1077
+ error_type: IDL.Int32
1078
+ });
1079
+ const Decimal = IDL.Record({human_readable: IDL.Opt(IDL.Text)});
1080
+ const Tokens = IDL.Record({e8s: IDL.Opt(IDL.Nat64)});
1081
+ const ValuationFactors = IDL.Record({
1082
+ xdrs_per_icp: IDL.Opt(Decimal),
1083
+ icps_per_token: IDL.Opt(Decimal),
1084
+ tokens: IDL.Opt(Tokens)
1085
+ });
1086
+ const Valuation = IDL.Record({
1087
+ token: IDL.Opt(IDL.Int32),
1088
+ account: IDL.Opt(Account),
1089
+ valuation_factors: IDL.Opt(ValuationFactors),
1090
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
1091
+ });
1092
+ const MintSnsTokensActionAuxiliary = IDL.Record({
1093
+ valuation: IDL.Opt(Valuation)
1094
+ });
1095
+ const SnsVersion = IDL.Record({
1096
+ archive_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1097
+ root_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1098
+ swap_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1099
+ ledger_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1100
+ governance_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1101
+ index_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
1102
+ });
1103
+ const AdvanceSnsTargetVersionActionAuxiliary = IDL.Record({
1104
+ target_version: IDL.Opt(SnsVersion)
1105
+ });
1106
+ const ActionAuxiliary = IDL.Variant({
1107
+ TransferSnsTreasuryFunds: MintSnsTokensActionAuxiliary,
1108
+ MintSnsTokens: MintSnsTokensActionAuxiliary,
1109
+ AdvanceSnsTargetVersion: AdvanceSnsTargetVersionActionAuxiliary
1110
+ });
1111
+ const Ballot = IDL.Record({
1112
+ vote: IDL.Int32,
1113
+ cast_timestamp_seconds: IDL.Nat64,
1114
+ voting_power: IDL.Nat64
1115
+ });
1116
+ const Percentage = IDL.Record({basis_points: IDL.Opt(IDL.Nat64)});
1117
+ const Tally = IDL.Record({
1118
+ no: IDL.Nat64,
1119
+ yes: IDL.Nat64,
1120
+ total: IDL.Nat64,
1121
+ timestamp_seconds: IDL.Nat64
1122
+ });
1123
+ const ManageDappCanisterSettings = IDL.Record({
1124
+ freezing_threshold: IDL.Opt(IDL.Nat64),
1125
+ wasm_memory_threshold: IDL.Opt(IDL.Nat64),
1126
+ canister_ids: IDL.Vec(IDL.Principal),
1127
+ reserved_cycles_limit: IDL.Opt(IDL.Nat64),
1128
+ log_visibility: IDL.Opt(IDL.Int32),
1129
+ wasm_memory_limit: IDL.Opt(IDL.Nat64),
1130
+ memory_allocation: IDL.Opt(IDL.Nat64),
1131
+ compute_allocation: IDL.Opt(IDL.Nat64)
1132
+ });
1133
+ PreciseValue.fill(
1134
+ IDL.Variant({
1135
+ Int: IDL.Int64,
1136
+ Map: IDL.Vec(IDL.Tuple(IDL.Text, PreciseValue)),
1137
+ Nat: IDL.Nat64,
1138
+ Blob: IDL.Vec(IDL.Nat8),
1139
+ Bool: IDL.Bool,
1140
+ Text: IDL.Text,
1141
+ Array: IDL.Vec(PreciseValue)
1142
+ })
1143
+ );
1144
+ const ExtensionOperationArg = IDL.Record({value: IDL.Opt(PreciseValue)});
1145
+ const ExecuteExtensionOperation = IDL.Record({
1146
+ extension_canister_id: IDL.Opt(IDL.Principal),
1147
+ operation_name: IDL.Opt(IDL.Text),
1148
+ operation_arg: IDL.Opt(ExtensionOperationArg)
1149
+ });
1150
+ const ChunkedCanisterWasm = IDL.Record({
1151
+ wasm_module_hash: IDL.Vec(IDL.Nat8),
1152
+ chunk_hashes_list: IDL.Vec(IDL.Vec(IDL.Nat8)),
1153
+ store_canister_id: IDL.Opt(IDL.Principal)
1154
+ });
1155
+ const Wasm = IDL.Variant({
1156
+ Chunked: ChunkedCanisterWasm,
1157
+ Bytes: IDL.Vec(IDL.Nat8)
1158
+ });
1159
+ const ExtensionUpgradeArg = IDL.Record({value: IDL.Opt(PreciseValue)});
1160
+ const UpgradeExtension = IDL.Record({
1161
+ extension_canister_id: IDL.Opt(IDL.Principal),
1162
+ wasm: IDL.Opt(Wasm),
1163
+ canister_upgrade_arg: IDL.Opt(ExtensionUpgradeArg)
1164
+ });
1165
+ const SetTopicsForCustomProposals = IDL.Record({
1166
+ custom_function_id_to_topic: IDL.Vec(IDL.Tuple(IDL.Nat64, Topic))
1167
+ });
1168
+ const ExtensionInit = IDL.Record({value: IDL.Opt(PreciseValue)});
1169
+ const RegisterExtension = IDL.Record({
1170
+ chunked_canister_wasm: IDL.Opt(ChunkedCanisterWasm),
1171
+ extension_init: IDL.Opt(ExtensionInit)
1172
+ });
1173
+ const RegisterDappCanisters = IDL.Record({
1174
+ canister_ids: IDL.Vec(IDL.Principal)
1175
+ });
1176
+ const TransferSnsTreasuryFunds = IDL.Record({
1177
+ from_treasury: IDL.Int32,
1178
+ to_principal: IDL.Opt(IDL.Principal),
1179
+ to_subaccount: IDL.Opt(Subaccount),
1180
+ memo: IDL.Opt(IDL.Nat64),
1181
+ amount_e8s: IDL.Nat64
1182
+ });
1183
+ const UpgradeSnsControlledCanister = IDL.Record({
1184
+ new_canister_wasm: IDL.Vec(IDL.Nat8),
1185
+ mode: IDL.Opt(IDL.Int32),
1186
+ canister_id: IDL.Opt(IDL.Principal),
1187
+ chunked_canister_wasm: IDL.Opt(ChunkedCanisterWasm),
1188
+ canister_upgrade_arg: IDL.Opt(IDL.Vec(IDL.Nat8))
1189
+ });
1190
+ const DeregisterDappCanisters = IDL.Record({
1191
+ canister_ids: IDL.Vec(IDL.Principal),
1192
+ new_controllers: IDL.Vec(IDL.Principal)
1193
+ });
1194
+ const MintSnsTokens = IDL.Record({
1195
+ to_principal: IDL.Opt(IDL.Principal),
1196
+ to_subaccount: IDL.Opt(Subaccount),
1197
+ memo: IDL.Opt(IDL.Nat64),
1198
+ amount_e8s: IDL.Opt(IDL.Nat64)
1199
+ });
1200
+ const AdvanceSnsTargetVersion = IDL.Record({
1201
+ new_target: IDL.Opt(SnsVersion)
1202
+ });
1203
+ const ManageSnsMetadata = IDL.Record({
1204
+ url: IDL.Opt(IDL.Text),
1205
+ logo: IDL.Opt(IDL.Text),
1206
+ name: IDL.Opt(IDL.Text),
1207
+ description: IDL.Opt(IDL.Text)
1208
+ });
1209
+ const ExecuteGenericNervousSystemFunction = IDL.Record({
1210
+ function_id: IDL.Nat64,
1211
+ payload: IDL.Vec(IDL.Nat8)
1212
+ });
1213
+ const ManageLedgerParameters = IDL.Record({
1214
+ token_symbol: IDL.Opt(IDL.Text),
1215
+ transfer_fee: IDL.Opt(IDL.Nat64),
1216
+ token_logo: IDL.Opt(IDL.Text),
1217
+ token_name: IDL.Opt(IDL.Text)
1218
+ });
1219
+ const Motion = IDL.Record({motion_text: IDL.Text});
1220
+ const Action = IDL.Variant({
1221
+ ManageNervousSystemParameters: NervousSystemParameters,
1222
+ AddGenericNervousSystemFunction: NervousSystemFunction,
1223
+ ManageDappCanisterSettings: ManageDappCanisterSettings,
1224
+ ExecuteExtensionOperation: ExecuteExtensionOperation,
1225
+ UpgradeExtension: UpgradeExtension,
1226
+ RemoveGenericNervousSystemFunction: IDL.Nat64,
1227
+ SetTopicsForCustomProposals: SetTopicsForCustomProposals,
1228
+ RegisterExtension: RegisterExtension,
1229
+ UpgradeSnsToNextVersion: IDL.Record({}),
1230
+ RegisterDappCanisters: RegisterDappCanisters,
1231
+ TransferSnsTreasuryFunds: TransferSnsTreasuryFunds,
1232
+ UpgradeSnsControlledCanister: UpgradeSnsControlledCanister,
1233
+ DeregisterDappCanisters: DeregisterDappCanisters,
1234
+ MintSnsTokens: MintSnsTokens,
1235
+ AdvanceSnsTargetVersion: AdvanceSnsTargetVersion,
1236
+ Unspecified: IDL.Record({}),
1237
+ ManageSnsMetadata: ManageSnsMetadata,
1238
+ ExecuteGenericNervousSystemFunction: ExecuteGenericNervousSystemFunction,
1239
+ ManageLedgerParameters: ManageLedgerParameters,
1240
+ Motion: Motion
1241
+ });
1242
+ const Proposal = IDL.Record({
1243
+ url: IDL.Text,
1244
+ title: IDL.Text,
1245
+ action: IDL.Opt(Action),
1246
+ summary: IDL.Text
1247
+ });
1248
+ const WaitForQuietState = IDL.Record({
1249
+ current_deadline_timestamp_seconds: IDL.Nat64
1250
+ });
1251
+ const ProposalData = IDL.Record({
1252
+ id: IDL.Opt(ProposalId),
1253
+ payload_text_rendering: IDL.Opt(IDL.Text),
1254
+ topic: IDL.Opt(Topic),
1255
+ action: IDL.Nat64,
1256
+ failure_reason: IDL.Opt(GovernanceError),
1257
+ action_auxiliary: IDL.Opt(ActionAuxiliary),
1258
+ ballots: IDL.Vec(IDL.Tuple(IDL.Text, Ballot)),
1259
+ minimum_yes_proportion_of_total: IDL.Opt(Percentage),
1260
+ reward_event_round: IDL.Nat64,
1261
+ failed_timestamp_seconds: IDL.Nat64,
1262
+ reward_event_end_timestamp_seconds: IDL.Opt(IDL.Nat64),
1263
+ proposal_creation_timestamp_seconds: IDL.Nat64,
1264
+ initial_voting_period_seconds: IDL.Nat64,
1265
+ reject_cost_e8s: IDL.Nat64,
1266
+ latest_tally: IDL.Opt(Tally),
1267
+ wait_for_quiet_deadline_increase_seconds: IDL.Nat64,
1268
+ decided_timestamp_seconds: IDL.Nat64,
1269
+ proposal: IDL.Opt(Proposal),
1270
+ proposer: IDL.Opt(NeuronId),
1271
+ wait_for_quiet_state: IDL.Opt(WaitForQuietState),
1272
+ minimum_yes_proportion_of_exercised: IDL.Opt(Percentage),
1273
+ is_eligible_for_rewards: IDL.Bool,
1274
+ executed_timestamp_seconds: IDL.Nat64
1275
+ });
1276
+ const Split = IDL.Record({memo: IDL.Nat64, amount_e8s: IDL.Nat64});
1277
+ const Follow = IDL.Record({
1278
+ function_id: IDL.Nat64,
1279
+ followees: IDL.Vec(NeuronId)
1280
+ });
1281
+ const DisburseMaturity = IDL.Record({
1282
+ to_account: IDL.Opt(Account),
1283
+ percentage_to_disburse: IDL.Nat32
1284
+ });
1285
+ const ChangeAutoStakeMaturity = IDL.Record({
1286
+ requested_setting_for_auto_stake_maturity: IDL.Bool
1287
+ });
1288
+ const IncreaseDissolveDelay = IDL.Record({
1289
+ additional_dissolve_delay_seconds: IDL.Nat32
1290
+ });
1291
+ const SetDissolveTimestamp = IDL.Record({
1292
+ dissolve_timestamp_seconds: IDL.Nat64
1293
+ });
1294
+ const Operation = IDL.Variant({
1295
+ ChangeAutoStakeMaturity: ChangeAutoStakeMaturity,
1296
+ StopDissolving: IDL.Record({}),
1297
+ StartDissolving: IDL.Record({}),
1298
+ IncreaseDissolveDelay: IncreaseDissolveDelay,
1299
+ SetDissolveTimestamp: SetDissolveTimestamp
1300
+ });
1301
+ const Configure = IDL.Record({operation: IDL.Opt(Operation)});
1302
+ const RegisterVote = IDL.Record({
1303
+ vote: IDL.Int32,
1304
+ proposal: IDL.Opt(ProposalId)
1305
+ });
1306
+ const Followee = IDL.Record({
1307
+ alias: IDL.Opt(IDL.Text),
1308
+ neuron_id: IDL.Opt(NeuronId)
1309
+ });
1310
+ const FolloweesForTopic = IDL.Record({
1311
+ topic: IDL.Opt(Topic),
1312
+ followees: IDL.Vec(Followee)
1313
+ });
1314
+ const SetFollowing = IDL.Record({
1315
+ topic_following: IDL.Vec(FolloweesForTopic)
1316
+ });
1317
+ const FinalizeDisburseMaturity = IDL.Record({
1318
+ amount_to_be_disbursed_e8s: IDL.Nat64,
1319
+ to_account: IDL.Opt(Account)
1320
+ });
1321
+ const MemoAndController = IDL.Record({
1322
+ controller: IDL.Opt(IDL.Principal),
1323
+ memo: IDL.Nat64
1324
+ });
1325
+ const By = IDL.Variant({
1326
+ MemoAndController: MemoAndController,
1327
+ NeuronId: IDL.Record({})
1328
+ });
1329
+ const ClaimOrRefresh = IDL.Record({by: IDL.Opt(By)});
1330
+ const RemoveNeuronPermissions = IDL.Record({
1331
+ permissions_to_remove: IDL.Opt(NeuronPermissionList),
1332
+ principal_id: IDL.Opt(IDL.Principal)
1333
+ });
1334
+ const AddNeuronPermissions = IDL.Record({
1335
+ permissions_to_add: IDL.Opt(NeuronPermissionList),
1336
+ principal_id: IDL.Opt(IDL.Principal)
1337
+ });
1338
+ const MergeMaturity = IDL.Record({percentage_to_merge: IDL.Nat32});
1339
+ const Amount = IDL.Record({e8s: IDL.Nat64});
1340
+ const Disburse = IDL.Record({
1341
+ to_account: IDL.Opt(Account),
1342
+ amount: IDL.Opt(Amount)
1343
+ });
1344
+ const Command_2 = IDL.Variant({
1345
+ Split: Split,
1346
+ Follow: Follow,
1347
+ DisburseMaturity: DisburseMaturity,
1348
+ Configure: Configure,
1349
+ RegisterVote: RegisterVote,
1350
+ SetFollowing: SetFollowing,
1351
+ SyncCommand: IDL.Record({}),
1352
+ MakeProposal: Proposal,
1353
+ FinalizeDisburseMaturity: FinalizeDisburseMaturity,
1354
+ ClaimOrRefreshNeuron: ClaimOrRefresh,
1355
+ RemoveNeuronPermissions: RemoveNeuronPermissions,
1356
+ AddNeuronPermissions: AddNeuronPermissions,
1357
+ MergeMaturity: MergeMaturity,
1358
+ Disburse: Disburse
1359
+ });
1360
+ const NeuronInFlightCommand = IDL.Record({
1361
+ command: IDL.Opt(Command_2),
1362
+ timestamp: IDL.Nat64
1363
+ });
1364
+ const NeuronPermission = IDL.Record({
1365
+ principal: IDL.Opt(IDL.Principal),
1366
+ permission_type: IDL.Vec(IDL.Int32)
1367
+ });
1368
+ const DissolveState = IDL.Variant({
1369
+ DissolveDelaySeconds: IDL.Nat64,
1370
+ WhenDissolvedTimestampSeconds: IDL.Nat64
1371
+ });
1372
+ const DisburseMaturityInProgress = IDL.Record({
1373
+ timestamp_of_disbursement_seconds: IDL.Nat64,
1374
+ amount_e8s: IDL.Nat64,
1375
+ account_to_disburse_to: IDL.Opt(Account),
1376
+ finalize_disbursement_timestamp_seconds: IDL.Opt(IDL.Nat64)
1377
+ });
1378
+ const Neuron = IDL.Record({
1379
+ id: IDL.Opt(NeuronId),
1380
+ staked_maturity_e8s_equivalent: IDL.Opt(IDL.Nat64),
1381
+ permissions: IDL.Vec(NeuronPermission),
1382
+ maturity_e8s_equivalent: IDL.Nat64,
1383
+ cached_neuron_stake_e8s: IDL.Nat64,
1384
+ created_timestamp_seconds: IDL.Nat64,
1385
+ topic_followees: IDL.Opt(
1386
+ IDL.Record({
1387
+ topic_id_to_followees: IDL.Vec(IDL.Tuple(IDL.Int32, FolloweesForTopic))
1388
+ })
1389
+ ),
1390
+ source_nns_neuron_id: IDL.Opt(IDL.Nat64),
1391
+ auto_stake_maturity: IDL.Opt(IDL.Bool),
1392
+ aging_since_timestamp_seconds: IDL.Nat64,
1393
+ dissolve_state: IDL.Opt(DissolveState),
1394
+ voting_power_percentage_multiplier: IDL.Nat64,
1395
+ vesting_period_seconds: IDL.Opt(IDL.Nat64),
1396
+ disburse_maturity_in_progress: IDL.Vec(DisburseMaturityInProgress),
1397
+ followees: IDL.Vec(IDL.Tuple(IDL.Nat64, Followees)),
1398
+ neuron_fees_e8s: IDL.Nat64
1399
+ });
1400
+ const Governance = IDL.Record({
1401
+ root_canister_id: IDL.Opt(IDL.Principal),
1402
+ timers: IDL.Opt(Timers),
1403
+ cached_upgrade_steps: IDL.Opt(CachedUpgradeSteps),
1404
+ id_to_nervous_system_functions: IDL.Vec(IDL.Tuple(IDL.Nat64, NervousSystemFunction)),
1405
+ metrics: IDL.Opt(GovernanceCachedMetrics),
1406
+ maturity_modulation: IDL.Opt(MaturityModulation),
1407
+ upgrade_journal: IDL.Opt(UpgradeJournal),
1408
+ mode: IDL.Int32,
1409
+ parameters: IDL.Opt(NervousSystemParameters),
1410
+ is_finalizing_disburse_maturity: IDL.Opt(IDL.Bool),
1411
+ deployed_version: IDL.Opt(Version),
1412
+ sns_initialization_parameters: IDL.Text,
1413
+ latest_reward_event: IDL.Opt(RewardEvent),
1414
+ pending_version: IDL.Opt(PendingVersion),
1415
+ swap_canister_id: IDL.Opt(IDL.Principal),
1416
+ ledger_canister_id: IDL.Opt(IDL.Principal),
1417
+ proposals: IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
1418
+ in_flight_commands: IDL.Vec(IDL.Tuple(IDL.Text, NeuronInFlightCommand)),
1419
+ sns_metadata: IDL.Opt(ManageSnsMetadata),
1420
+ neurons: IDL.Vec(IDL.Tuple(IDL.Text, Neuron)),
1421
+ target_version: IDL.Opt(Version),
1422
+ genesis_timestamp_seconds: IDL.Nat64
1423
+ });
1424
+ const AddMaturityRequest = IDL.Record({
1425
+ id: IDL.Opt(NeuronId),
1426
+ amount_e8s: IDL.Opt(IDL.Nat64)
1427
+ });
1428
+ const AddMaturityResponse = IDL.Record({
1429
+ new_maturity_e8s: IDL.Opt(IDL.Nat64)
1430
+ });
1431
+ const AdvanceTargetVersionRequest = IDL.Record({
1432
+ target_version: IDL.Opt(Version)
1433
+ });
1434
+ const AdvanceTargetVersionResponse = IDL.Record({});
1435
+ const Principals = IDL.Record({principals: IDL.Vec(IDL.Principal)});
1436
+ const NeuronsFund = IDL.Record({
1437
+ nns_neuron_hotkeys: IDL.Opt(Principals),
1438
+ nns_neuron_controller: IDL.Opt(IDL.Principal),
1439
+ nns_neuron_id: IDL.Opt(IDL.Nat64)
1440
+ });
1441
+ const Participant = IDL.Variant({
1442
+ NeuronsFund: NeuronsFund,
1443
+ Direct: IDL.Record({})
1444
+ });
1445
+ const NeuronIds = IDL.Record({neuron_ids: IDL.Vec(NeuronId)});
1446
+ const NeuronRecipe = IDL.Record({
1447
+ controller: IDL.Opt(IDL.Principal),
1448
+ dissolve_delay_seconds: IDL.Opt(IDL.Nat64),
1449
+ participant: IDL.Opt(Participant),
1450
+ stake_e8s: IDL.Opt(IDL.Nat64),
1451
+ followees: IDL.Opt(NeuronIds),
1452
+ neuron_id: IDL.Opt(NeuronId)
1453
+ });
1454
+ const NeuronRecipes = IDL.Record({
1455
+ neuron_recipes: IDL.Vec(NeuronRecipe)
1456
+ });
1457
+ const ClaimSwapNeuronsRequest = IDL.Record({
1458
+ neuron_recipes: IDL.Opt(NeuronRecipes)
1459
+ });
1460
+ const SwapNeuron = IDL.Record({
1461
+ id: IDL.Opt(NeuronId),
1462
+ status: IDL.Int32
1463
+ });
1464
+ const ClaimedSwapNeurons = IDL.Record({
1465
+ swap_neurons: IDL.Vec(SwapNeuron)
1466
+ });
1467
+ const ClaimSwapNeuronsResult = IDL.Variant({
1468
+ Ok: ClaimedSwapNeurons,
1469
+ Err: IDL.Int32
1470
+ });
1471
+ const ClaimSwapNeuronsResponse = IDL.Record({
1472
+ claim_swap_neurons_result: IDL.Opt(ClaimSwapNeuronsResult)
1473
+ });
1474
+ const GetMaturityModulationResponse = IDL.Record({
1475
+ maturity_modulation: IDL.Opt(MaturityModulation)
1476
+ });
1477
+ const GetMetadataResponse = IDL.Record({
1478
+ url: IDL.Opt(IDL.Text),
1479
+ logo: IDL.Opt(IDL.Text),
1480
+ name: IDL.Opt(IDL.Text),
1481
+ description: IDL.Opt(IDL.Text)
1482
+ });
1483
+ const GetMetricsRequest = IDL.Record({
1484
+ time_window_seconds: IDL.Opt(IDL.Nat64)
1485
+ });
1486
+ const Metrics = IDL.Record({
1487
+ treasury_metrics: IDL.Opt(IDL.Vec(TreasuryMetrics)),
1488
+ voting_power_metrics: IDL.Opt(VotingPowerMetrics),
1489
+ last_ledger_block_timestamp: IDL.Opt(IDL.Nat64),
1490
+ num_recently_executed_proposals: IDL.Opt(IDL.Nat64),
1491
+ num_recently_submitted_proposals: IDL.Opt(IDL.Nat64),
1492
+ genesis_timestamp_seconds: IDL.Opt(IDL.Nat64)
1493
+ });
1494
+ const GetMetricsResult = IDL.Variant({
1495
+ Ok: Metrics,
1496
+ Err: GovernanceError
1497
+ });
1498
+ const GetMetricsResponse = IDL.Record({
1499
+ get_metrics_result: IDL.Opt(GetMetricsResult)
1500
+ });
1501
+ const GetModeResponse = IDL.Record({mode: IDL.Opt(IDL.Int32)});
1502
+ const GetNeuron = IDL.Record({neuron_id: IDL.Opt(NeuronId)});
1503
+ const Result = IDL.Variant({Error: GovernanceError, Neuron: Neuron});
1504
+ const GetNeuronResponse = IDL.Record({result: IDL.Opt(Result)});
1505
+ const GetProposal = IDL.Record({proposal_id: IDL.Opt(ProposalId)});
1506
+ const Result_1 = IDL.Variant({
1507
+ Error: GovernanceError,
1508
+ Proposal: ProposalData
1509
+ });
1510
+ const GetProposalResponse = IDL.Record({result: IDL.Opt(Result_1)});
1511
+ const MemoryMetrics = IDL.Record({
1512
+ wasm_binary_size: IDL.Opt(IDL.Nat),
1513
+ wasm_chunk_store_size: IDL.Opt(IDL.Nat),
1514
+ canister_history_size: IDL.Opt(IDL.Nat),
1515
+ stable_memory_size: IDL.Opt(IDL.Nat),
1516
+ snapshots_size: IDL.Opt(IDL.Nat),
1517
+ wasm_memory_size: IDL.Opt(IDL.Nat),
1518
+ global_memory_size: IDL.Opt(IDL.Nat),
1519
+ custom_sections_size: IDL.Opt(IDL.Nat)
1520
+ });
1521
+ const CanisterStatusType = IDL.Variant({
1522
+ stopped: IDL.Null,
1523
+ stopping: IDL.Null,
1524
+ running: IDL.Null
1525
+ });
1526
+ const DefiniteCanisterSettingsArgs = IDL.Record({
1527
+ freezing_threshold: IDL.Nat,
1528
+ wasm_memory_threshold: IDL.Opt(IDL.Nat),
1529
+ controllers: IDL.Vec(IDL.Principal),
1530
+ wasm_memory_limit: IDL.Opt(IDL.Nat),
1531
+ memory_allocation: IDL.Nat,
1532
+ compute_allocation: IDL.Nat
1533
+ });
1534
+ const QueryStats = IDL.Record({
1535
+ response_payload_bytes_total: IDL.Opt(IDL.Nat),
1536
+ num_instructions_total: IDL.Opt(IDL.Nat),
1537
+ num_calls_total: IDL.Opt(IDL.Nat),
1538
+ request_payload_bytes_total: IDL.Opt(IDL.Nat)
1539
+ });
1540
+ const CanisterStatusResultV2 = IDL.Record({
1541
+ memory_metrics: IDL.Opt(MemoryMetrics),
1542
+ status: CanisterStatusType,
1543
+ memory_size: IDL.Nat,
1544
+ cycles: IDL.Nat,
1545
+ settings: DefiniteCanisterSettingsArgs,
1546
+ query_stats: IDL.Opt(QueryStats),
1547
+ idle_cycles_burned_per_day: IDL.Nat,
1548
+ module_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
1549
+ });
1550
+ const GetRunningSnsVersionResponse = IDL.Record({
1551
+ deployed_version: IDL.Opt(Version),
1552
+ pending_version: IDL.Opt(
1553
+ IDL.Record({
1554
+ mark_failed_at_seconds: IDL.Nat64,
1555
+ checking_upgrade_lock: IDL.Nat64,
1556
+ proposal_id: IDL.Nat64,
1557
+ target_version: IDL.Opt(Version)
1558
+ })
1559
+ )
1560
+ });
1561
+ const GetSnsInitializationParametersResponse = IDL.Record({
1562
+ sns_initialization_parameters: IDL.Text
1563
+ });
1564
+ const GetTimersResponse = IDL.Record({timers: IDL.Opt(Timers)});
1565
+ const GetUpgradeJournalRequest = IDL.Record({
1566
+ offset: IDL.Opt(IDL.Nat64),
1567
+ limit: IDL.Opt(IDL.Nat64)
1568
+ });
1569
+ const GetUpgradeJournalResponse = IDL.Record({
1570
+ upgrade_journal: IDL.Opt(UpgradeJournal),
1571
+ upgrade_steps: IDL.Opt(Versions),
1572
+ response_timestamp_seconds: IDL.Opt(IDL.Nat64),
1573
+ deployed_version: IDL.Opt(Version),
1574
+ target_version: IDL.Opt(Version),
1575
+ upgrade_journal_entry_count: IDL.Opt(IDL.Nat64)
1576
+ });
1577
+ const ListNervousSystemFunctionsResponse = IDL.Record({
1578
+ reserved_ids: IDL.Vec(IDL.Nat64),
1579
+ functions: IDL.Vec(NervousSystemFunction)
1580
+ });
1581
+ const ListNeurons = IDL.Record({
1582
+ of_principal: IDL.Opt(IDL.Principal),
1583
+ limit: IDL.Nat32,
1584
+ start_page_at: IDL.Opt(NeuronId)
1585
+ });
1586
+ const ListNeuronsResponse = IDL.Record({neurons: IDL.Vec(Neuron)});
1587
+ const TopicSelector = IDL.Record({topic: IDL.Opt(Topic)});
1588
+ const ListProposals = IDL.Record({
1589
+ include_reward_status: IDL.Vec(IDL.Int32),
1590
+ before_proposal: IDL.Opt(ProposalId),
1591
+ limit: IDL.Nat32,
1592
+ exclude_type: IDL.Vec(IDL.Nat64),
1593
+ include_topics: IDL.Opt(IDL.Vec(TopicSelector)),
1594
+ include_status: IDL.Vec(IDL.Int32)
1595
+ });
1596
+ const ListProposalsResponse = IDL.Record({
1597
+ include_ballots_by_caller: IDL.Opt(IDL.Bool),
1598
+ proposals: IDL.Vec(ProposalData),
1599
+ include_topic_filtering: IDL.Opt(IDL.Bool)
1600
+ });
1601
+ const ListTopicsRequest = IDL.Record({});
1602
+ const ExtensionOperationType = IDL.Variant({
1603
+ TreasuryManagerWithdraw: IDL.Null,
1604
+ TreasuryManagerDeposit: IDL.Null
1605
+ });
1606
+ const ExtensionType = IDL.Variant({TreasuryManager: IDL.Null});
1607
+ const ExtensionOperationSpec = IDL.Record({
1608
+ topic: IDL.Opt(Topic),
1609
+ operation_type: IDL.Opt(ExtensionOperationType),
1610
+ description: IDL.Opt(IDL.Text),
1611
+ extension_type: IDL.Opt(ExtensionType)
1612
+ });
1613
+ const RegisteredExtensionOperationSpec = IDL.Record({
1614
+ spec: IDL.Opt(ExtensionOperationSpec),
1615
+ canister_id: IDL.Opt(IDL.Principal)
1616
+ });
1617
+ const TopicInfo = IDL.Record({
1618
+ extension_operations: IDL.Opt(IDL.Vec(RegisteredExtensionOperationSpec)),
1619
+ native_functions: IDL.Opt(IDL.Vec(NervousSystemFunction)),
1620
+ topic: IDL.Opt(Topic),
1621
+ is_critical: IDL.Opt(IDL.Bool),
1622
+ name: IDL.Opt(IDL.Text),
1623
+ description: IDL.Opt(IDL.Text),
1624
+ custom_functions: IDL.Opt(IDL.Vec(NervousSystemFunction))
1625
+ });
1626
+ const ListTopicsResponse = IDL.Record({
1627
+ uncategorized_functions: IDL.Opt(IDL.Vec(NervousSystemFunction)),
1628
+ topics: IDL.Opt(IDL.Vec(TopicInfo))
1629
+ });
1630
+ const StakeMaturity = IDL.Record({
1631
+ percentage_to_stake: IDL.Opt(IDL.Nat32)
1632
+ });
1633
+ const Command = IDL.Variant({
1634
+ Split: Split,
1635
+ Follow: Follow,
1636
+ DisburseMaturity: DisburseMaturity,
1637
+ ClaimOrRefresh: ClaimOrRefresh,
1638
+ Configure: Configure,
1639
+ RegisterVote: RegisterVote,
1640
+ SetFollowing: SetFollowing,
1641
+ MakeProposal: Proposal,
1642
+ StakeMaturity: StakeMaturity,
1643
+ RemoveNeuronPermissions: RemoveNeuronPermissions,
1644
+ AddNeuronPermissions: AddNeuronPermissions,
1645
+ MergeMaturity: MergeMaturity,
1646
+ Disburse: Disburse
1647
+ });
1648
+ const ManageNeuron = IDL.Record({
1649
+ subaccount: IDL.Vec(IDL.Nat8),
1650
+ command: IDL.Opt(Command)
1651
+ });
1652
+ const SplitResponse = IDL.Record({created_neuron_id: IDL.Opt(NeuronId)});
1653
+ const DisburseMaturityResponse = IDL.Record({
1654
+ amount_disbursed_e8s: IDL.Nat64,
1655
+ amount_deducted_e8s: IDL.Opt(IDL.Nat64)
1656
+ });
1657
+ const ClaimOrRefreshResponse = IDL.Record({
1658
+ refreshed_neuron_id: IDL.Opt(NeuronId)
1659
+ });
1660
+ const StakeMaturityResponse = IDL.Record({
1661
+ maturity_e8s: IDL.Nat64,
1662
+ staked_maturity_e8s: IDL.Nat64
1663
+ });
1664
+ const MergeMaturityResponse = IDL.Record({
1665
+ merged_maturity_e8s: IDL.Nat64,
1666
+ new_stake_e8s: IDL.Nat64
1667
+ });
1668
+ const DisburseResponse = IDL.Record({transfer_block_height: IDL.Nat64});
1669
+ const Command_1 = IDL.Variant({
1670
+ Error: GovernanceError,
1671
+ Split: SplitResponse,
1672
+ Follow: IDL.Record({}),
1673
+ DisburseMaturity: DisburseMaturityResponse,
1674
+ ClaimOrRefresh: ClaimOrRefreshResponse,
1675
+ Configure: IDL.Record({}),
1676
+ RegisterVote: IDL.Record({}),
1677
+ SetFollowing: IDL.Record({}),
1678
+ MakeProposal: GetProposal,
1679
+ RemoveNeuronPermission: IDL.Record({}),
1680
+ StakeMaturity: StakeMaturityResponse,
1681
+ MergeMaturity: MergeMaturityResponse,
1682
+ Disburse: DisburseResponse,
1683
+ AddNeuronPermission: IDL.Record({})
1684
+ });
1685
+ const ManageNeuronResponse = IDL.Record({command: IDL.Opt(Command_1)});
1686
+ const MintTokensRequest = IDL.Record({
1687
+ recipient: IDL.Opt(Account),
1688
+ amount_e8s: IDL.Opt(IDL.Nat64)
1689
+ });
1690
+ const SetMode = IDL.Record({mode: IDL.Int32});
1691
+
1692
+ return IDL.Service({
1693
+ add_maturity: IDL.Func([AddMaturityRequest], [AddMaturityResponse], []),
1694
+ advance_target_version: IDL.Func(
1695
+ [AdvanceTargetVersionRequest],
1696
+ [AdvanceTargetVersionResponse],
1697
+ []
1698
+ ),
1699
+ claim_swap_neurons: IDL.Func([ClaimSwapNeuronsRequest], [ClaimSwapNeuronsResponse], []),
1700
+ fail_stuck_upgrade_in_progress: IDL.Func([IDL.Record({})], [IDL.Record({})], []),
1701
+ get_build_metadata: IDL.Func([], [IDL.Text], ['query']),
1702
+ get_latest_reward_event: IDL.Func([], [RewardEvent], ['query']),
1703
+ get_maturity_modulation: IDL.Func([IDL.Record({})], [GetMaturityModulationResponse], []),
1704
+ get_metadata: IDL.Func([IDL.Record({})], [GetMetadataResponse], ['query']),
1705
+ get_metrics: IDL.Func([GetMetricsRequest], [GetMetricsResponse], ['composite_query']),
1706
+ get_metrics_replicated: IDL.Func([GetMetricsRequest], [GetMetricsResponse], []),
1707
+ get_mode: IDL.Func([IDL.Record({})], [GetModeResponse], ['query']),
1708
+ get_nervous_system_parameters: IDL.Func([IDL.Null], [NervousSystemParameters], ['query']),
1709
+ get_neuron: IDL.Func([GetNeuron], [GetNeuronResponse], ['query']),
1710
+ get_proposal: IDL.Func([GetProposal], [GetProposalResponse], ['query']),
1711
+ get_root_canister_status: IDL.Func([IDL.Null], [CanisterStatusResultV2], []),
1712
+ get_running_sns_version: IDL.Func([IDL.Record({})], [GetRunningSnsVersionResponse], ['query']),
1713
+ get_sns_initialization_parameters: IDL.Func(
1714
+ [IDL.Record({})],
1715
+ [GetSnsInitializationParametersResponse],
1716
+ ['query']
1717
+ ),
1718
+ get_timers: IDL.Func([IDL.Record({})], [GetTimersResponse], ['query']),
1719
+ get_upgrade_journal: IDL.Func(
1720
+ [GetUpgradeJournalRequest],
1721
+ [GetUpgradeJournalResponse],
1722
+ ['query']
1723
+ ),
1724
+ list_nervous_system_functions: IDL.Func([], [ListNervousSystemFunctionsResponse], ['query']),
1725
+ list_neurons: IDL.Func([ListNeurons], [ListNeuronsResponse], ['query']),
1726
+ list_proposals: IDL.Func([ListProposals], [ListProposalsResponse], ['query']),
1727
+ list_topics: IDL.Func([ListTopicsRequest], [ListTopicsResponse], ['query']),
1728
+ manage_neuron: IDL.Func([ManageNeuron], [ManageNeuronResponse], []),
1729
+ mint_tokens: IDL.Func([MintTokensRequest], [IDL.Record({})], []),
1730
+ refresh_cached_upgrade_steps: IDL.Func([IDL.Record({})], [IDL.Record({})], []),
1731
+ reset_timers: IDL.Func([IDL.Record({})], [IDL.Record({})], []),
1732
+ set_mode: IDL.Func([SetMode], [IDL.Record({})], []),
1733
+ update_neuron: IDL.Func([Neuron], [IDL.Opt(GovernanceError)], [])
1734
+ });
1735
+ };
1736
+
1737
+ export const init = ({IDL}) => {
1738
+ const PreciseValue = IDL.Rec();
1739
+ const Timers = IDL.Record({
1740
+ last_spawned_timestamp_seconds: IDL.Opt(IDL.Nat64),
1741
+ last_reset_timestamp_seconds: IDL.Opt(IDL.Nat64),
1742
+ requires_periodic_tasks: IDL.Opt(IDL.Bool)
1743
+ });
1744
+ const Version = IDL.Record({
1745
+ archive_wasm_hash: IDL.Vec(IDL.Nat8),
1746
+ root_wasm_hash: IDL.Vec(IDL.Nat8),
1747
+ swap_wasm_hash: IDL.Vec(IDL.Nat8),
1748
+ ledger_wasm_hash: IDL.Vec(IDL.Nat8),
1749
+ governance_wasm_hash: IDL.Vec(IDL.Nat8),
1750
+ index_wasm_hash: IDL.Vec(IDL.Nat8)
1751
+ });
1752
+ const Versions = IDL.Record({versions: IDL.Vec(Version)});
1753
+ const CachedUpgradeSteps = IDL.Record({
1754
+ upgrade_steps: IDL.Opt(Versions),
1755
+ response_timestamp_seconds: IDL.Opt(IDL.Nat64),
1756
+ requested_timestamp_seconds: IDL.Opt(IDL.Nat64)
1757
+ });
1758
+ const Topic = IDL.Variant({
1759
+ DappCanisterManagement: IDL.Null,
1760
+ DaoCommunitySettings: IDL.Null,
1761
+ ApplicationBusinessLogic: IDL.Null,
1762
+ CriticalDappOperations: IDL.Null,
1763
+ TreasuryAssetManagement: IDL.Null,
1764
+ Governance: IDL.Null,
1765
+ SnsFrameworkManagement: IDL.Null
1766
+ });
1767
+ const GenericNervousSystemFunction = IDL.Record({
1768
+ topic: IDL.Opt(Topic),
1769
+ validator_canister_id: IDL.Opt(IDL.Principal),
1770
+ target_canister_id: IDL.Opt(IDL.Principal),
1771
+ validator_method_name: IDL.Opt(IDL.Text),
1772
+ target_method_name: IDL.Opt(IDL.Text)
1773
+ });
1774
+ const FunctionType = IDL.Variant({
1775
+ NativeNervousSystemFunction: IDL.Record({}),
1776
+ GenericNervousSystemFunction: GenericNervousSystemFunction
1777
+ });
1778
+ const NervousSystemFunction = IDL.Record({
1779
+ id: IDL.Nat64,
1780
+ name: IDL.Text,
1781
+ description: IDL.Opt(IDL.Text),
1782
+ function_type: IDL.Opt(FunctionType)
1783
+ });
1784
+ const Subaccount = IDL.Record({subaccount: IDL.Vec(IDL.Nat8)});
1785
+ const Account = IDL.Record({
1786
+ owner: IDL.Opt(IDL.Principal),
1787
+ subaccount: IDL.Opt(Subaccount)
1788
+ });
1789
+ const TreasuryMetrics = IDL.Record({
1790
+ name: IDL.Opt(IDL.Text),
1791
+ original_amount_e8s: IDL.Opt(IDL.Nat64),
1792
+ amount_e8s: IDL.Opt(IDL.Nat64),
1793
+ account: IDL.Opt(Account),
1794
+ ledger_canister_id: IDL.Opt(IDL.Principal),
1795
+ treasury: IDL.Int32,
1796
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
1797
+ });
1798
+ const VotingPowerMetrics = IDL.Record({
1799
+ governance_total_potential_voting_power: IDL.Opt(IDL.Nat64),
1800
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
1801
+ });
1802
+ const GovernanceCachedMetrics = IDL.Record({
1803
+ treasury_metrics: IDL.Vec(TreasuryMetrics),
1804
+ not_dissolving_neurons_e8s_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Float64)),
1805
+ garbage_collectable_neurons_count: IDL.Nat64,
1806
+ neurons_with_invalid_stake_count: IDL.Nat64,
1807
+ not_dissolving_neurons_count_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
1808
+ neurons_with_less_than_6_months_dissolve_delay_count: IDL.Nat64,
1809
+ dissolved_neurons_count: IDL.Nat64,
1810
+ total_staked_e8s: IDL.Nat64,
1811
+ total_supply_governance_tokens: IDL.Nat64,
1812
+ voting_power_metrics: IDL.Opt(VotingPowerMetrics),
1813
+ not_dissolving_neurons_count: IDL.Nat64,
1814
+ dissolved_neurons_e8s: IDL.Nat64,
1815
+ neurons_with_less_than_6_months_dissolve_delay_e8s: IDL.Nat64,
1816
+ dissolving_neurons_count_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
1817
+ dissolving_neurons_count: IDL.Nat64,
1818
+ dissolving_neurons_e8s_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Float64)),
1819
+ timestamp_seconds: IDL.Nat64
1820
+ });
1821
+ const MaturityModulation = IDL.Record({
1822
+ current_basis_points: IDL.Opt(IDL.Int32),
1823
+ updated_at_timestamp_seconds: IDL.Opt(IDL.Nat64)
1824
+ });
1825
+ const TargetVersionSet = IDL.Record({
1826
+ old_target_version: IDL.Opt(Version),
1827
+ new_target_version: IDL.Opt(Version),
1828
+ is_advanced_automatically: IDL.Opt(IDL.Bool)
1829
+ });
1830
+ const UpgradeStepsReset = IDL.Record({
1831
+ human_readable: IDL.Opt(IDL.Text),
1832
+ upgrade_steps: IDL.Opt(Versions)
1833
+ });
1834
+ const UpgradeOutcome = IDL.Record({
1835
+ status: IDL.Opt(
1836
+ IDL.Variant({
1837
+ Success: IDL.Record({}),
1838
+ Timeout: IDL.Record({}),
1839
+ ExternalFailure: IDL.Record({}),
1840
+ InvalidState: IDL.Record({version: IDL.Opt(Version)})
1841
+ })
1842
+ ),
1843
+ human_readable: IDL.Opt(IDL.Text)
1844
+ });
1845
+ const ProposalId = IDL.Record({id: IDL.Nat64});
1846
+ const UpgradeStarted = IDL.Record({
1847
+ current_version: IDL.Opt(Version),
1848
+ expected_version: IDL.Opt(Version),
1849
+ reason: IDL.Opt(
1850
+ IDL.Variant({
1851
+ UpgradeSnsToNextVersionProposal: ProposalId,
1852
+ BehindTargetVersion: IDL.Record({})
1853
+ })
1854
+ )
1855
+ });
1856
+ const UpgradeStepsRefreshed = IDL.Record({
1857
+ upgrade_steps: IDL.Opt(Versions)
1858
+ });
1859
+ const TargetVersionReset = IDL.Record({
1860
+ human_readable: IDL.Opt(IDL.Text),
1861
+ old_target_version: IDL.Opt(Version),
1862
+ new_target_version: IDL.Opt(Version)
1863
+ });
1864
+ const UpgradeJournalEntry = IDL.Record({
1865
+ event: IDL.Opt(
1866
+ IDL.Variant({
1867
+ TargetVersionSet: TargetVersionSet,
1868
+ UpgradeStepsReset: UpgradeStepsReset,
1869
+ UpgradeOutcome: UpgradeOutcome,
1870
+ UpgradeStarted: UpgradeStarted,
1871
+ UpgradeStepsRefreshed: UpgradeStepsRefreshed,
1872
+ TargetVersionReset: TargetVersionReset
1873
+ })
1874
+ ),
1875
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
1876
+ });
1877
+ const UpgradeJournal = IDL.Record({
1878
+ entries: IDL.Vec(UpgradeJournalEntry)
1879
+ });
1880
+ const NeuronId = IDL.Record({id: IDL.Vec(IDL.Nat8)});
1881
+ const Followees = IDL.Record({followees: IDL.Vec(NeuronId)});
1882
+ const DefaultFollowees = IDL.Record({
1883
+ followees: IDL.Vec(IDL.Tuple(IDL.Nat64, Followees))
1884
+ });
1885
+ const NeuronPermissionList = IDL.Record({
1886
+ permissions: IDL.Vec(IDL.Int32)
1887
+ });
1888
+ const VotingRewardsParameters = IDL.Record({
1889
+ final_reward_rate_basis_points: IDL.Opt(IDL.Nat64),
1890
+ initial_reward_rate_basis_points: IDL.Opt(IDL.Nat64),
1891
+ reward_rate_transition_duration_seconds: IDL.Opt(IDL.Nat64),
1892
+ round_duration_seconds: IDL.Opt(IDL.Nat64)
1893
+ });
1894
+ const NervousSystemParameters = IDL.Record({
1895
+ default_followees: IDL.Opt(DefaultFollowees),
1896
+ max_dissolve_delay_seconds: IDL.Opt(IDL.Nat64),
1897
+ max_dissolve_delay_bonus_percentage: IDL.Opt(IDL.Nat64),
1898
+ max_followees_per_function: IDL.Opt(IDL.Nat64),
1899
+ automatically_advance_target_version: IDL.Opt(IDL.Bool),
1900
+ neuron_claimer_permissions: IDL.Opt(NeuronPermissionList),
1901
+ neuron_minimum_stake_e8s: IDL.Opt(IDL.Nat64),
1902
+ max_neuron_age_for_age_bonus: IDL.Opt(IDL.Nat64),
1903
+ initial_voting_period_seconds: IDL.Opt(IDL.Nat64),
1904
+ neuron_minimum_dissolve_delay_to_vote_seconds: IDL.Opt(IDL.Nat64),
1905
+ reject_cost_e8s: IDL.Opt(IDL.Nat64),
1906
+ max_proposals_to_keep_per_action: IDL.Opt(IDL.Nat32),
1907
+ wait_for_quiet_deadline_increase_seconds: IDL.Opt(IDL.Nat64),
1908
+ max_number_of_neurons: IDL.Opt(IDL.Nat64),
1909
+ transaction_fee_e8s: IDL.Opt(IDL.Nat64),
1910
+ max_number_of_proposals_with_ballots: IDL.Opt(IDL.Nat64),
1911
+ max_age_bonus_percentage: IDL.Opt(IDL.Nat64),
1912
+ neuron_grantable_permissions: IDL.Opt(NeuronPermissionList),
1913
+ voting_rewards_parameters: IDL.Opt(VotingRewardsParameters),
1914
+ maturity_modulation_disabled: IDL.Opt(IDL.Bool),
1915
+ max_number_of_principals_per_neuron: IDL.Opt(IDL.Nat64)
1916
+ });
1917
+ const RewardEvent = IDL.Record({
1918
+ rounds_since_last_distribution: IDL.Opt(IDL.Nat64),
1919
+ actual_timestamp_seconds: IDL.Nat64,
1920
+ end_timestamp_seconds: IDL.Opt(IDL.Nat64),
1921
+ total_available_e8s_equivalent: IDL.Opt(IDL.Nat64),
1922
+ distributed_e8s_equivalent: IDL.Nat64,
1923
+ round: IDL.Nat64,
1924
+ settled_proposals: IDL.Vec(ProposalId)
1925
+ });
1926
+ const PendingVersion = IDL.Record({
1927
+ mark_failed_at_seconds: IDL.Nat64,
1928
+ checking_upgrade_lock: IDL.Nat64,
1929
+ proposal_id: IDL.Opt(IDL.Nat64),
1930
+ target_version: IDL.Opt(Version)
1931
+ });
1932
+ const GovernanceError = IDL.Record({
1933
+ error_message: IDL.Text,
1934
+ error_type: IDL.Int32
1935
+ });
1936
+ const Decimal = IDL.Record({human_readable: IDL.Opt(IDL.Text)});
1937
+ const Tokens = IDL.Record({e8s: IDL.Opt(IDL.Nat64)});
1938
+ const ValuationFactors = IDL.Record({
1939
+ xdrs_per_icp: IDL.Opt(Decimal),
1940
+ icps_per_token: IDL.Opt(Decimal),
1941
+ tokens: IDL.Opt(Tokens)
1942
+ });
1943
+ const Valuation = IDL.Record({
1944
+ token: IDL.Opt(IDL.Int32),
1945
+ account: IDL.Opt(Account),
1946
+ valuation_factors: IDL.Opt(ValuationFactors),
1947
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
1948
+ });
1949
+ const MintSnsTokensActionAuxiliary = IDL.Record({
1950
+ valuation: IDL.Opt(Valuation)
1951
+ });
1952
+ const SnsVersion = IDL.Record({
1953
+ archive_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1954
+ root_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1955
+ swap_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1956
+ ledger_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1957
+ governance_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1958
+ index_wasm_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
1959
+ });
1960
+ const AdvanceSnsTargetVersionActionAuxiliary = IDL.Record({
1961
+ target_version: IDL.Opt(SnsVersion)
1962
+ });
1963
+ const ActionAuxiliary = IDL.Variant({
1964
+ TransferSnsTreasuryFunds: MintSnsTokensActionAuxiliary,
1965
+ MintSnsTokens: MintSnsTokensActionAuxiliary,
1966
+ AdvanceSnsTargetVersion: AdvanceSnsTargetVersionActionAuxiliary
1967
+ });
1968
+ const Ballot = IDL.Record({
1969
+ vote: IDL.Int32,
1970
+ cast_timestamp_seconds: IDL.Nat64,
1971
+ voting_power: IDL.Nat64
1972
+ });
1973
+ const Percentage = IDL.Record({basis_points: IDL.Opt(IDL.Nat64)});
1974
+ const Tally = IDL.Record({
1975
+ no: IDL.Nat64,
1976
+ yes: IDL.Nat64,
1977
+ total: IDL.Nat64,
1978
+ timestamp_seconds: IDL.Nat64
1979
+ });
1980
+ const ManageDappCanisterSettings = IDL.Record({
1981
+ freezing_threshold: IDL.Opt(IDL.Nat64),
1982
+ wasm_memory_threshold: IDL.Opt(IDL.Nat64),
1983
+ canister_ids: IDL.Vec(IDL.Principal),
1984
+ reserved_cycles_limit: IDL.Opt(IDL.Nat64),
1985
+ log_visibility: IDL.Opt(IDL.Int32),
1986
+ wasm_memory_limit: IDL.Opt(IDL.Nat64),
1987
+ memory_allocation: IDL.Opt(IDL.Nat64),
1988
+ compute_allocation: IDL.Opt(IDL.Nat64)
1989
+ });
1990
+ PreciseValue.fill(
1991
+ IDL.Variant({
1992
+ Int: IDL.Int64,
1993
+ Map: IDL.Vec(IDL.Tuple(IDL.Text, PreciseValue)),
1994
+ Nat: IDL.Nat64,
1995
+ Blob: IDL.Vec(IDL.Nat8),
1996
+ Bool: IDL.Bool,
1997
+ Text: IDL.Text,
1998
+ Array: IDL.Vec(PreciseValue)
1999
+ })
2000
+ );
2001
+ const ExtensionOperationArg = IDL.Record({value: IDL.Opt(PreciseValue)});
2002
+ const ExecuteExtensionOperation = IDL.Record({
2003
+ extension_canister_id: IDL.Opt(IDL.Principal),
2004
+ operation_name: IDL.Opt(IDL.Text),
2005
+ operation_arg: IDL.Opt(ExtensionOperationArg)
2006
+ });
2007
+ const ChunkedCanisterWasm = IDL.Record({
2008
+ wasm_module_hash: IDL.Vec(IDL.Nat8),
2009
+ chunk_hashes_list: IDL.Vec(IDL.Vec(IDL.Nat8)),
2010
+ store_canister_id: IDL.Opt(IDL.Principal)
2011
+ });
2012
+ const Wasm = IDL.Variant({
2013
+ Chunked: ChunkedCanisterWasm,
2014
+ Bytes: IDL.Vec(IDL.Nat8)
2015
+ });
2016
+ const ExtensionUpgradeArg = IDL.Record({value: IDL.Opt(PreciseValue)});
2017
+ const UpgradeExtension = IDL.Record({
2018
+ extension_canister_id: IDL.Opt(IDL.Principal),
2019
+ wasm: IDL.Opt(Wasm),
2020
+ canister_upgrade_arg: IDL.Opt(ExtensionUpgradeArg)
2021
+ });
2022
+ const SetTopicsForCustomProposals = IDL.Record({
2023
+ custom_function_id_to_topic: IDL.Vec(IDL.Tuple(IDL.Nat64, Topic))
2024
+ });
2025
+ const ExtensionInit = IDL.Record({value: IDL.Opt(PreciseValue)});
2026
+ const RegisterExtension = IDL.Record({
2027
+ chunked_canister_wasm: IDL.Opt(ChunkedCanisterWasm),
2028
+ extension_init: IDL.Opt(ExtensionInit)
2029
+ });
2030
+ const RegisterDappCanisters = IDL.Record({
2031
+ canister_ids: IDL.Vec(IDL.Principal)
2032
+ });
2033
+ const TransferSnsTreasuryFunds = IDL.Record({
2034
+ from_treasury: IDL.Int32,
2035
+ to_principal: IDL.Opt(IDL.Principal),
2036
+ to_subaccount: IDL.Opt(Subaccount),
2037
+ memo: IDL.Opt(IDL.Nat64),
2038
+ amount_e8s: IDL.Nat64
2039
+ });
2040
+ const UpgradeSnsControlledCanister = IDL.Record({
2041
+ new_canister_wasm: IDL.Vec(IDL.Nat8),
2042
+ mode: IDL.Opt(IDL.Int32),
2043
+ canister_id: IDL.Opt(IDL.Principal),
2044
+ chunked_canister_wasm: IDL.Opt(ChunkedCanisterWasm),
2045
+ canister_upgrade_arg: IDL.Opt(IDL.Vec(IDL.Nat8))
2046
+ });
2047
+ const DeregisterDappCanisters = IDL.Record({
2048
+ canister_ids: IDL.Vec(IDL.Principal),
2049
+ new_controllers: IDL.Vec(IDL.Principal)
2050
+ });
2051
+ const MintSnsTokens = IDL.Record({
2052
+ to_principal: IDL.Opt(IDL.Principal),
2053
+ to_subaccount: IDL.Opt(Subaccount),
2054
+ memo: IDL.Opt(IDL.Nat64),
2055
+ amount_e8s: IDL.Opt(IDL.Nat64)
2056
+ });
2057
+ const AdvanceSnsTargetVersion = IDL.Record({
2058
+ new_target: IDL.Opt(SnsVersion)
2059
+ });
2060
+ const ManageSnsMetadata = IDL.Record({
2061
+ url: IDL.Opt(IDL.Text),
2062
+ logo: IDL.Opt(IDL.Text),
2063
+ name: IDL.Opt(IDL.Text),
2064
+ description: IDL.Opt(IDL.Text)
2065
+ });
2066
+ const ExecuteGenericNervousSystemFunction = IDL.Record({
2067
+ function_id: IDL.Nat64,
2068
+ payload: IDL.Vec(IDL.Nat8)
2069
+ });
2070
+ const ManageLedgerParameters = IDL.Record({
2071
+ token_symbol: IDL.Opt(IDL.Text),
2072
+ transfer_fee: IDL.Opt(IDL.Nat64),
2073
+ token_logo: IDL.Opt(IDL.Text),
2074
+ token_name: IDL.Opt(IDL.Text)
2075
+ });
2076
+ const Motion = IDL.Record({motion_text: IDL.Text});
2077
+ const Action = IDL.Variant({
2078
+ ManageNervousSystemParameters: NervousSystemParameters,
2079
+ AddGenericNervousSystemFunction: NervousSystemFunction,
2080
+ ManageDappCanisterSettings: ManageDappCanisterSettings,
2081
+ ExecuteExtensionOperation: ExecuteExtensionOperation,
2082
+ UpgradeExtension: UpgradeExtension,
2083
+ RemoveGenericNervousSystemFunction: IDL.Nat64,
2084
+ SetTopicsForCustomProposals: SetTopicsForCustomProposals,
2085
+ RegisterExtension: RegisterExtension,
2086
+ UpgradeSnsToNextVersion: IDL.Record({}),
2087
+ RegisterDappCanisters: RegisterDappCanisters,
2088
+ TransferSnsTreasuryFunds: TransferSnsTreasuryFunds,
2089
+ UpgradeSnsControlledCanister: UpgradeSnsControlledCanister,
2090
+ DeregisterDappCanisters: DeregisterDappCanisters,
2091
+ MintSnsTokens: MintSnsTokens,
2092
+ AdvanceSnsTargetVersion: AdvanceSnsTargetVersion,
2093
+ Unspecified: IDL.Record({}),
2094
+ ManageSnsMetadata: ManageSnsMetadata,
2095
+ ExecuteGenericNervousSystemFunction: ExecuteGenericNervousSystemFunction,
2096
+ ManageLedgerParameters: ManageLedgerParameters,
2097
+ Motion: Motion
2098
+ });
2099
+ const Proposal = IDL.Record({
2100
+ url: IDL.Text,
2101
+ title: IDL.Text,
2102
+ action: IDL.Opt(Action),
2103
+ summary: IDL.Text
2104
+ });
2105
+ const WaitForQuietState = IDL.Record({
2106
+ current_deadline_timestamp_seconds: IDL.Nat64
2107
+ });
2108
+ const ProposalData = IDL.Record({
2109
+ id: IDL.Opt(ProposalId),
2110
+ payload_text_rendering: IDL.Opt(IDL.Text),
2111
+ topic: IDL.Opt(Topic),
2112
+ action: IDL.Nat64,
2113
+ failure_reason: IDL.Opt(GovernanceError),
2114
+ action_auxiliary: IDL.Opt(ActionAuxiliary),
2115
+ ballots: IDL.Vec(IDL.Tuple(IDL.Text, Ballot)),
2116
+ minimum_yes_proportion_of_total: IDL.Opt(Percentage),
2117
+ reward_event_round: IDL.Nat64,
2118
+ failed_timestamp_seconds: IDL.Nat64,
2119
+ reward_event_end_timestamp_seconds: IDL.Opt(IDL.Nat64),
2120
+ proposal_creation_timestamp_seconds: IDL.Nat64,
2121
+ initial_voting_period_seconds: IDL.Nat64,
2122
+ reject_cost_e8s: IDL.Nat64,
2123
+ latest_tally: IDL.Opt(Tally),
2124
+ wait_for_quiet_deadline_increase_seconds: IDL.Nat64,
2125
+ decided_timestamp_seconds: IDL.Nat64,
2126
+ proposal: IDL.Opt(Proposal),
2127
+ proposer: IDL.Opt(NeuronId),
2128
+ wait_for_quiet_state: IDL.Opt(WaitForQuietState),
2129
+ minimum_yes_proportion_of_exercised: IDL.Opt(Percentage),
2130
+ is_eligible_for_rewards: IDL.Bool,
2131
+ executed_timestamp_seconds: IDL.Nat64
2132
+ });
2133
+ const Split = IDL.Record({memo: IDL.Nat64, amount_e8s: IDL.Nat64});
2134
+ const Follow = IDL.Record({
2135
+ function_id: IDL.Nat64,
2136
+ followees: IDL.Vec(NeuronId)
2137
+ });
2138
+ const DisburseMaturity = IDL.Record({
2139
+ to_account: IDL.Opt(Account),
2140
+ percentage_to_disburse: IDL.Nat32
2141
+ });
2142
+ const ChangeAutoStakeMaturity = IDL.Record({
2143
+ requested_setting_for_auto_stake_maturity: IDL.Bool
2144
+ });
2145
+ const IncreaseDissolveDelay = IDL.Record({
2146
+ additional_dissolve_delay_seconds: IDL.Nat32
2147
+ });
2148
+ const SetDissolveTimestamp = IDL.Record({
2149
+ dissolve_timestamp_seconds: IDL.Nat64
2150
+ });
2151
+ const Operation = IDL.Variant({
2152
+ ChangeAutoStakeMaturity: ChangeAutoStakeMaturity,
2153
+ StopDissolving: IDL.Record({}),
2154
+ StartDissolving: IDL.Record({}),
2155
+ IncreaseDissolveDelay: IncreaseDissolveDelay,
2156
+ SetDissolveTimestamp: SetDissolveTimestamp
2157
+ });
2158
+ const Configure = IDL.Record({operation: IDL.Opt(Operation)});
2159
+ const RegisterVote = IDL.Record({
2160
+ vote: IDL.Int32,
2161
+ proposal: IDL.Opt(ProposalId)
2162
+ });
2163
+ const Followee = IDL.Record({
2164
+ alias: IDL.Opt(IDL.Text),
2165
+ neuron_id: IDL.Opt(NeuronId)
2166
+ });
2167
+ const FolloweesForTopic = IDL.Record({
2168
+ topic: IDL.Opt(Topic),
2169
+ followees: IDL.Vec(Followee)
2170
+ });
2171
+ const SetFollowing = IDL.Record({
2172
+ topic_following: IDL.Vec(FolloweesForTopic)
2173
+ });
2174
+ const FinalizeDisburseMaturity = IDL.Record({
2175
+ amount_to_be_disbursed_e8s: IDL.Nat64,
2176
+ to_account: IDL.Opt(Account)
2177
+ });
2178
+ const MemoAndController = IDL.Record({
2179
+ controller: IDL.Opt(IDL.Principal),
2180
+ memo: IDL.Nat64
2181
+ });
2182
+ const By = IDL.Variant({
2183
+ MemoAndController: MemoAndController,
2184
+ NeuronId: IDL.Record({})
2185
+ });
2186
+ const ClaimOrRefresh = IDL.Record({by: IDL.Opt(By)});
2187
+ const RemoveNeuronPermissions = IDL.Record({
2188
+ permissions_to_remove: IDL.Opt(NeuronPermissionList),
2189
+ principal_id: IDL.Opt(IDL.Principal)
2190
+ });
2191
+ const AddNeuronPermissions = IDL.Record({
2192
+ permissions_to_add: IDL.Opt(NeuronPermissionList),
2193
+ principal_id: IDL.Opt(IDL.Principal)
2194
+ });
2195
+ const MergeMaturity = IDL.Record({percentage_to_merge: IDL.Nat32});
2196
+ const Amount = IDL.Record({e8s: IDL.Nat64});
2197
+ const Disburse = IDL.Record({
2198
+ to_account: IDL.Opt(Account),
2199
+ amount: IDL.Opt(Amount)
2200
+ });
2201
+ const Command_2 = IDL.Variant({
2202
+ Split: Split,
2203
+ Follow: Follow,
2204
+ DisburseMaturity: DisburseMaturity,
2205
+ Configure: Configure,
2206
+ RegisterVote: RegisterVote,
2207
+ SetFollowing: SetFollowing,
2208
+ SyncCommand: IDL.Record({}),
2209
+ MakeProposal: Proposal,
2210
+ FinalizeDisburseMaturity: FinalizeDisburseMaturity,
2211
+ ClaimOrRefreshNeuron: ClaimOrRefresh,
2212
+ RemoveNeuronPermissions: RemoveNeuronPermissions,
2213
+ AddNeuronPermissions: AddNeuronPermissions,
2214
+ MergeMaturity: MergeMaturity,
2215
+ Disburse: Disburse
2216
+ });
2217
+ const NeuronInFlightCommand = IDL.Record({
2218
+ command: IDL.Opt(Command_2),
2219
+ timestamp: IDL.Nat64
2220
+ });
2221
+ const NeuronPermission = IDL.Record({
2222
+ principal: IDL.Opt(IDL.Principal),
2223
+ permission_type: IDL.Vec(IDL.Int32)
2224
+ });
2225
+ const DissolveState = IDL.Variant({
2226
+ DissolveDelaySeconds: IDL.Nat64,
2227
+ WhenDissolvedTimestampSeconds: IDL.Nat64
2228
+ });
2229
+ const DisburseMaturityInProgress = IDL.Record({
2230
+ timestamp_of_disbursement_seconds: IDL.Nat64,
2231
+ amount_e8s: IDL.Nat64,
2232
+ account_to_disburse_to: IDL.Opt(Account),
2233
+ finalize_disbursement_timestamp_seconds: IDL.Opt(IDL.Nat64)
2234
+ });
2235
+ const Neuron = IDL.Record({
2236
+ id: IDL.Opt(NeuronId),
2237
+ staked_maturity_e8s_equivalent: IDL.Opt(IDL.Nat64),
2238
+ permissions: IDL.Vec(NeuronPermission),
2239
+ maturity_e8s_equivalent: IDL.Nat64,
2240
+ cached_neuron_stake_e8s: IDL.Nat64,
2241
+ created_timestamp_seconds: IDL.Nat64,
2242
+ topic_followees: IDL.Opt(
2243
+ IDL.Record({
2244
+ topic_id_to_followees: IDL.Vec(IDL.Tuple(IDL.Int32, FolloweesForTopic))
2245
+ })
2246
+ ),
2247
+ source_nns_neuron_id: IDL.Opt(IDL.Nat64),
2248
+ auto_stake_maturity: IDL.Opt(IDL.Bool),
2249
+ aging_since_timestamp_seconds: IDL.Nat64,
2250
+ dissolve_state: IDL.Opt(DissolveState),
2251
+ voting_power_percentage_multiplier: IDL.Nat64,
2252
+ vesting_period_seconds: IDL.Opt(IDL.Nat64),
2253
+ disburse_maturity_in_progress: IDL.Vec(DisburseMaturityInProgress),
2254
+ followees: IDL.Vec(IDL.Tuple(IDL.Nat64, Followees)),
2255
+ neuron_fees_e8s: IDL.Nat64
2256
+ });
2257
+ const Governance = IDL.Record({
2258
+ root_canister_id: IDL.Opt(IDL.Principal),
2259
+ timers: IDL.Opt(Timers),
2260
+ cached_upgrade_steps: IDL.Opt(CachedUpgradeSteps),
2261
+ id_to_nervous_system_functions: IDL.Vec(IDL.Tuple(IDL.Nat64, NervousSystemFunction)),
2262
+ metrics: IDL.Opt(GovernanceCachedMetrics),
2263
+ maturity_modulation: IDL.Opt(MaturityModulation),
2264
+ upgrade_journal: IDL.Opt(UpgradeJournal),
2265
+ mode: IDL.Int32,
2266
+ parameters: IDL.Opt(NervousSystemParameters),
2267
+ is_finalizing_disburse_maturity: IDL.Opt(IDL.Bool),
2268
+ deployed_version: IDL.Opt(Version),
2269
+ sns_initialization_parameters: IDL.Text,
2270
+ latest_reward_event: IDL.Opt(RewardEvent),
2271
+ pending_version: IDL.Opt(PendingVersion),
2272
+ swap_canister_id: IDL.Opt(IDL.Principal),
2273
+ ledger_canister_id: IDL.Opt(IDL.Principal),
2274
+ proposals: IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
2275
+ in_flight_commands: IDL.Vec(IDL.Tuple(IDL.Text, NeuronInFlightCommand)),
2276
+ sns_metadata: IDL.Opt(ManageSnsMetadata),
2277
+ neurons: IDL.Vec(IDL.Tuple(IDL.Text, Neuron)),
2278
+ target_version: IDL.Opt(Version),
2279
+ genesis_timestamp_seconds: IDL.Nat64
2280
+ });
2281
+
2282
+ return [Governance];
2283
+ };