@dfinity/nns 11.1.4 → 12.0.0-next-2025-12-11

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 (50) hide show
  1. package/README.md +4 -4
  2. package/dist/index.d.ts +10 -15
  3. package/dist/index.js +1 -7
  4. package/dist/index.js.map +4 -4
  5. package/dist/index.mjs +1 -7
  6. package/dist/index.mjs.map +4 -4
  7. package/package.json +4 -9
  8. package/dist/candid/genesis_token.certified.idl.d.ts +0 -2
  9. package/dist/candid/genesis_token.certified.idl.js +0 -49
  10. package/dist/candid/genesis_token.d.ts +0 -46
  11. package/dist/candid/genesis_token.did +0 -49
  12. package/dist/candid/genesis_token.idl.d.ts +0 -2
  13. package/dist/candid/genesis_token.idl.js +0 -49
  14. package/dist/candid/governance.certified.idl.d.ts +0 -2
  15. package/dist/candid/governance.certified.idl.js +0 -1788
  16. package/dist/candid/governance.d.ts +0 -1339
  17. package/dist/candid/governance.did +0 -1478
  18. package/dist/candid/governance.idl.d.ts +0 -2
  19. package/dist/candid/governance.idl.js +0 -1796
  20. package/dist/candid/governance_test.certified.idl.d.ts +0 -2
  21. package/dist/candid/governance_test.certified.idl.js +0 -1789
  22. package/dist/candid/governance_test.d.ts +0 -1343
  23. package/dist/candid/governance_test.did +0 -1481
  24. package/dist/candid/governance_test.idl.d.ts +0 -2
  25. package/dist/candid/governance_test.idl.js +0 -1797
  26. package/dist/candid/old_list_neurons_service.certified.idl.d.ts +0 -2
  27. package/dist/candid/old_list_neurons_service.certified.idl.js +0 -87
  28. package/dist/candid/sns_wasm.certified.idl.d.ts +0 -2
  29. package/dist/candid/sns_wasm.certified.idl.js +0 -331
  30. package/dist/candid/sns_wasm.d.ts +0 -315
  31. package/dist/candid/sns_wasm.did +0 -350
  32. package/dist/candid/sns_wasm.idl.d.ts +0 -2
  33. package/dist/candid/sns_wasm.idl.js +0 -331
  34. package/dist/canisters/governance/request.converters.d.ts +0 -108
  35. package/dist/canisters/governance/response.converters.d.ts +0 -26
  36. package/dist/canisters/governance/services.d.ts +0 -21
  37. package/dist/constants/canister_ids.d.ts +0 -5
  38. package/dist/constants/constants.d.ts +0 -1
  39. package/dist/enums/governance.enums.d.ts +0 -138
  40. package/dist/errors/governance.errors.d.ts +0 -21
  41. package/dist/genesis_token.canister.d.ts +0 -11
  42. package/dist/governance.canister.d.ts +0 -361
  43. package/dist/governance_test.canister.d.ts +0 -15
  44. package/dist/sns_wasm.canister.d.ts +0 -11
  45. package/dist/types/common.d.ts +0 -6
  46. package/dist/types/governance.options.d.ts +0 -7
  47. package/dist/types/governance_converters.d.ts +0 -821
  48. package/dist/types/sns_wasm.options.d.ts +0 -3
  49. package/dist/utils/account_identifier.utils.d.ts +0 -5
  50. package/dist/utils/neurons.utils.d.ts +0 -50
@@ -1,1478 +0,0 @@
1
- // Generated from IC repo commit fa06b0e (2025-11-12 tags: release-2025-11-13_03-24-base) 'rs/nns/governance/canister/governance.did' by import-candid
2
-
3
- type AccountIdentifier = record {
4
- hash : blob;
5
- };
6
-
7
- type Action = variant {
8
- RegisterKnownNeuron : KnownNeuron;
9
- DeregisterKnownNeuron : DeregisterKnownNeuron;
10
- ManageNeuron : ManageNeuron;
11
- UpdateCanisterSettings : UpdateCanisterSettings;
12
- InstallCode : InstallCode;
13
- StopOrStartCanister : StopOrStartCanister;
14
- CreateServiceNervousSystem : CreateServiceNervousSystem;
15
- ExecuteNnsFunction : ExecuteNnsFunction;
16
- RewardNodeProvider : RewardNodeProvider;
17
- OpenSnsTokenSwap : OpenSnsTokenSwap;
18
- SetSnsTokenSwapOpenTimeWindow : SetSnsTokenSwapOpenTimeWindow;
19
- SetDefaultFollowees : SetDefaultFollowees;
20
- RewardNodeProviders : RewardNodeProviders;
21
- ManageNetworkEconomics : NetworkEconomics;
22
- ApproveGenesisKyc : Principals;
23
- AddOrRemoveNodeProvider : AddOrRemoveNodeProvider;
24
- Motion : Motion;
25
- FulfillSubnetRentalRequest : FulfillSubnetRentalRequest;
26
- };
27
-
28
- type AddHotKey = record {
29
- new_hot_key : opt principal;
30
- };
31
-
32
- type AddOrRemoveNodeProvider = record {
33
- change : opt Change;
34
- };
35
-
36
- type Amount = record {
37
- e8s : nat64;
38
- };
39
-
40
- type ApproveGenesisKyc = record {
41
- principals : vec principal;
42
- };
43
-
44
- type Ballot = record {
45
- vote : int32;
46
- voting_power : nat64;
47
- };
48
-
49
- type BallotInfo = record {
50
- vote : int32;
51
- proposal_id : opt ProposalId;
52
- };
53
-
54
- type By = variant {
55
- NeuronIdOrSubaccount : record {};
56
- MemoAndController : ClaimOrRefreshNeuronFromAccount;
57
- Memo : nat64;
58
- };
59
-
60
- type Canister = record {
61
- id : opt principal;
62
- };
63
-
64
- type CanisterSettings = record {
65
- freezing_threshold : opt nat64;
66
- controllers : opt Controllers;
67
- log_visibility : opt int32;
68
- wasm_memory_limit : opt nat64;
69
- memory_allocation : opt nat64;
70
- compute_allocation : opt nat64;
71
- wasm_memory_threshold : opt nat64;
72
- };
73
-
74
- type CanisterStatusResultV2 = record {
75
- status : opt int32;
76
- freezing_threshold : opt nat64;
77
- controllers : vec principal;
78
- memory_size : opt nat64;
79
- cycles : opt nat64;
80
- idle_cycles_burned_per_day : opt nat64;
81
- module_hash : blob;
82
- };
83
-
84
- type CanisterSummary = record {
85
- status : opt CanisterStatusResultV2;
86
- canister_id : opt principal;
87
- };
88
-
89
- type Change = variant {
90
- ToRemove : NodeProvider;
91
- ToAdd : NodeProvider;
92
- };
93
-
94
- type ChangeAutoStakeMaturity = record {
95
- requested_setting_for_auto_stake_maturity : bool;
96
- };
97
-
98
- type ClaimOrRefresh = record {
99
- by : opt By;
100
- };
101
-
102
- type ClaimOrRefreshNeuronFromAccount = record {
103
- controller : opt principal;
104
- memo : nat64;
105
- };
106
-
107
- type ClaimOrRefreshNeuronFromAccountResponse = record {
108
- result : opt Result_1;
109
- };
110
-
111
- type ClaimOrRefreshResponse = record {
112
- refreshed_neuron_id : opt NeuronId;
113
- };
114
-
115
- // This is one way for a neuron to make sure that its deciding_voting_power is
116
- // not less than its potential_voting_power. See the description of those fields
117
- // in Neuron.
118
- type RefreshVotingPower = record {
119
- // Intentionally left blank.
120
- };
121
-
122
- type RefreshVotingPowerResponse = record {
123
- // Intentionally left blank.
124
- //
125
- // We could add information such as the value in the neuron's
126
- // voting_power_refreshed_timestamp_second's field, but let's keep things
127
- // minimal until we discover there is a "real need". YAGNI.
128
- };
129
-
130
- type DisburseMaturity = record {
131
- percentage_to_disburse : nat32;
132
- to_account : opt Account;
133
- to_account_identifier: opt AccountIdentifier;
134
- };
135
-
136
- type Account = record {
137
- owner: opt principal;
138
- subaccount: opt blob;
139
- };
140
-
141
- type DisburseMaturityResponse = record {
142
- amount_disbursed_e8s : opt nat64;
143
- };
144
-
145
- type SetFollowing = record {
146
- topic_following : opt vec FolloweesForTopic;
147
- };
148
-
149
- type FolloweesForTopic = record {
150
- followees : opt vec NeuronId;
151
- topic : opt int32;
152
- };
153
-
154
- type SetFollowingResponse = record {
155
- };
156
-
157
- // KEEP THIS IN SYNC WITH ManageNeuronCommandRequest!
158
- type Command = variant {
159
- Spawn : Spawn;
160
- Split : Split;
161
- Follow : Follow;
162
- ClaimOrRefresh : ClaimOrRefresh;
163
- Configure : Configure;
164
- RegisterVote : RegisterVote;
165
- Merge : Merge;
166
- DisburseToNeuron : DisburseToNeuron;
167
- MakeProposal : Proposal;
168
- StakeMaturity : StakeMaturity;
169
- MergeMaturity : MergeMaturity;
170
- Disburse : Disburse;
171
- RefreshVotingPower : RefreshVotingPower;
172
- DisburseMaturity : DisburseMaturity;
173
- SetFollowing : SetFollowing;
174
-
175
- // KEEP THIS IN SYNC WITH ManageNeuronCommandRequest!
176
- };
177
-
178
- type Command_1 = variant {
179
- Error : GovernanceError;
180
- Spawn : SpawnResponse;
181
- Split : SpawnResponse;
182
- Follow : record {};
183
- ClaimOrRefresh : ClaimOrRefreshResponse;
184
- Configure : record {};
185
- RegisterVote : record {};
186
- Merge : MergeResponse;
187
- DisburseToNeuron : SpawnResponse;
188
- MakeProposal : MakeProposalResponse;
189
- StakeMaturity : StakeMaturityResponse;
190
- MergeMaturity : MergeMaturityResponse;
191
- Disburse : DisburseResponse;
192
- RefreshVotingPower : RefreshVotingPowerResponse;
193
- DisburseMaturity : DisburseMaturityResponse;
194
- SetFollowing : SetFollowingResponse;
195
- };
196
-
197
- type Command_2 = variant {
198
- Spawn : NeuronId;
199
- Split : Split;
200
- Configure : Configure;
201
- Merge : Merge;
202
- DisburseToNeuron : DisburseToNeuron;
203
- SyncCommand : record {};
204
- ClaimOrRefreshNeuron : ClaimOrRefresh;
205
- MergeMaturity : MergeMaturity;
206
- Disburse : Disburse;
207
- };
208
-
209
- type Committed = record {
210
- total_direct_contribution_icp_e8s : opt nat64;
211
- total_neurons_fund_contribution_icp_e8s : opt nat64;
212
- sns_governance_canister_id : opt principal;
213
- };
214
-
215
- type Committed_1 = record {
216
- total_direct_participation_icp_e8s : opt nat64;
217
- total_neurons_fund_participation_icp_e8s : opt nat64;
218
- sns_governance_canister_id : opt principal;
219
- };
220
-
221
- type Configure = record {
222
- operation : opt Operation;
223
- };
224
-
225
- type Controllers = record {
226
- controllers : vec principal;
227
- };
228
-
229
- type Countries = record {
230
- iso_codes : vec text;
231
- };
232
-
233
- type CreateServiceNervousSystem = record {
234
- url : opt text;
235
- governance_parameters : opt GovernanceParameters;
236
- fallback_controller_principal_ids : vec principal;
237
- logo : opt Image;
238
- name : opt text;
239
- ledger_parameters : opt LedgerParameters;
240
- description : opt text;
241
- dapp_canisters : vec Canister;
242
- swap_parameters : opt SwapParameters;
243
- initial_token_distribution : opt InitialTokenDistribution;
244
- };
245
-
246
- type DateRangeFilter = record {
247
- start_timestamp_seconds : opt nat64;
248
- end_timestamp_seconds : opt nat64;
249
- };
250
-
251
- type Decimal = record {
252
- human_readable : opt text;
253
- };
254
-
255
- type DerivedProposalInformation = record {
256
- swap_background_information : opt SwapBackgroundInformation;
257
- };
258
-
259
- type DeveloperDistribution = record {
260
- developer_neurons : vec NeuronDistribution;
261
- };
262
-
263
- type Disburse = record {
264
- to_account : opt AccountIdentifier;
265
- amount : opt Amount;
266
- };
267
-
268
- type DisburseResponse = record {
269
- transfer_block_height : nat64;
270
- };
271
-
272
- type DisburseToNeuron = record {
273
- dissolve_delay_seconds : nat64;
274
- kyc_verified : bool;
275
- amount_e8s : nat64;
276
- new_controller : opt principal;
277
- nonce : nat64;
278
- };
279
-
280
- type DissolveState = variant {
281
- DissolveDelaySeconds : nat64;
282
- WhenDissolvedTimestampSeconds : nat64;
283
- };
284
-
285
- type Duration = record {
286
- seconds : opt nat64;
287
- };
288
-
289
- type ExecuteNnsFunction = record {
290
- nns_function : int32;
291
- payload : blob;
292
- };
293
-
294
- type Follow = record {
295
- topic : int32;
296
- followees : vec NeuronId;
297
- };
298
-
299
- type Followees = record {
300
- followees : vec NeuronId;
301
- };
302
-
303
- type GetNeuronsFundAuditInfoRequest = record {
304
- nns_proposal_id : opt ProposalId;
305
- };
306
-
307
- type GetNeuronsFundAuditInfoResponse = record {
308
- result : opt Result_6;
309
- };
310
-
311
- type GlobalTimeOfDay = record {
312
- seconds_after_utc_midnight : opt nat64;
313
- };
314
-
315
- type Governance = record {
316
- default_followees : vec record { int32; Followees };
317
- most_recent_monthly_node_provider_rewards : opt MonthlyNodeProviderRewards;
318
- maturity_modulation_last_updated_at_timestamp_seconds : opt nat64;
319
- wait_for_quiet_threshold_seconds : nat64;
320
- metrics : opt GovernanceCachedMetrics;
321
- neuron_management_voting_period_seconds : opt nat64;
322
- node_providers : vec NodeProvider;
323
- cached_daily_maturity_modulation_basis_points : opt int32;
324
- economics : opt NetworkEconomics;
325
- restore_aging_summary : opt RestoreAgingSummary;
326
- spawning_neurons : opt bool;
327
- latest_reward_event : opt RewardEvent;
328
- to_claim_transfers : vec NeuronStakeTransfer;
329
- short_voting_period_seconds : nat64;
330
- proposals : vec record { nat64; ProposalData };
331
- xdr_conversion_rate : opt XdrConversionRate;
332
- in_flight_commands : vec record { nat64; NeuronInFlightCommand };
333
- neurons : vec record { nat64; Neuron };
334
- genesis_timestamp_seconds : nat64;
335
- };
336
-
337
- type GovernanceCachedMetrics = record {
338
- total_maturity_e8s_equivalent : nat64;
339
- not_dissolving_neurons_e8s_buckets : vec record { nat64; float64 };
340
- dissolving_neurons_staked_maturity_e8s_equivalent_sum : nat64;
341
- garbage_collectable_neurons_count : nat64;
342
- dissolving_neurons_staked_maturity_e8s_equivalent_buckets : vec record {
343
- nat64;
344
- float64;
345
- };
346
- neurons_with_invalid_stake_count : nat64;
347
- not_dissolving_neurons_count_buckets : vec record { nat64; nat64 };
348
- ect_neuron_count : nat64;
349
- total_supply_icp : nat64;
350
- neurons_with_less_than_6_months_dissolve_delay_count : nat64;
351
- dissolved_neurons_count : nat64;
352
- community_fund_total_maturity_e8s_equivalent : nat64;
353
- total_staked_e8s_seed : nat64;
354
- total_staked_maturity_e8s_equivalent_ect : nat64;
355
- total_staked_e8s : nat64;
356
- not_dissolving_neurons_count : nat64;
357
- total_locked_e8s : nat64;
358
- neurons_fund_total_active_neurons : nat64;
359
- total_voting_power_non_self_authenticating_controller : opt nat64;
360
- total_staked_maturity_e8s_equivalent : nat64;
361
- not_dissolving_neurons_e8s_buckets_ect : vec record { nat64; float64 };
362
- total_staked_e8s_ect : nat64;
363
- not_dissolving_neurons_staked_maturity_e8s_equivalent_sum : nat64;
364
- dissolved_neurons_e8s : nat64;
365
- total_staked_e8s_non_self_authenticating_controller : opt nat64;
366
- dissolving_neurons_e8s_buckets_seed : vec record { nat64; float64 };
367
- neurons_with_less_than_6_months_dissolve_delay_e8s : nat64;
368
- not_dissolving_neurons_staked_maturity_e8s_equivalent_buckets : vec record {
369
- nat64;
370
- float64;
371
- };
372
- dissolving_neurons_count_buckets : vec record { nat64; nat64 };
373
- dissolving_neurons_e8s_buckets_ect : vec record { nat64; float64 };
374
- dissolving_neurons_count : nat64;
375
- dissolving_neurons_e8s_buckets : vec record { nat64; float64 };
376
- total_staked_maturity_e8s_equivalent_seed : nat64;
377
- community_fund_total_staked_e8s : nat64;
378
- not_dissolving_neurons_e8s_buckets_seed : vec record { nat64; float64 };
379
- timestamp_seconds : nat64;
380
- seed_neuron_count : nat64;
381
- spawning_neurons_count : nat64;
382
-
383
- non_self_authenticating_controller_neuron_subset_metrics : opt NeuronSubsetMetrics;
384
- public_neuron_subset_metrics : opt NeuronSubsetMetrics;
385
- declining_voting_power_neuron_subset_metrics : opt NeuronSubsetMetrics;
386
- fully_lost_voting_power_neuron_subset_metrics : opt NeuronSubsetMetrics;
387
- };
388
-
389
- type GovernanceError = record {
390
- error_message : text;
391
- error_type : int32;
392
- };
393
-
394
- type GovernanceParameters = record {
395
- neuron_maximum_dissolve_delay_bonus : opt Percentage;
396
- neuron_maximum_age_for_age_bonus : opt Duration;
397
- neuron_maximum_dissolve_delay : opt Duration;
398
- neuron_minimum_dissolve_delay_to_vote : opt Duration;
399
- neuron_maximum_age_bonus : opt Percentage;
400
- neuron_minimum_stake : opt Tokens;
401
- proposal_wait_for_quiet_deadline_increase : opt Duration;
402
- proposal_initial_voting_period : opt Duration;
403
- proposal_rejection_fee : opt Tokens;
404
- voting_reward_parameters : opt VotingRewardParameters;
405
- };
406
-
407
- type IdealMatchedParticipationFunction = record {
408
- serialized_representation : opt text;
409
- };
410
-
411
- type Image = record {
412
- base64_encoding : opt text;
413
- };
414
-
415
- type IncreaseDissolveDelay = record {
416
- additional_dissolve_delay_seconds : nat32;
417
- };
418
-
419
- type InitialTokenDistribution = record {
420
- treasury_distribution : opt SwapDistribution;
421
- developer_distribution : opt DeveloperDistribution;
422
- swap_distribution : opt SwapDistribution;
423
- };
424
-
425
- type InstallCode = record {
426
- skip_stopping_before_installing : opt bool;
427
- wasm_module_hash : opt blob;
428
- canister_id : opt principal;
429
- arg_hash : opt blob;
430
- install_mode : opt int32;
431
- };
432
-
433
- type InstallCodeRequest = record {
434
- arg : opt blob;
435
- wasm_module : opt blob;
436
- skip_stopping_before_installing : opt bool;
437
- canister_id : opt principal;
438
- install_mode : opt int32;
439
- };
440
-
441
- type KnownNeuron = record {
442
- id : opt NeuronId;
443
- known_neuron_data : opt KnownNeuronData;
444
- };
445
-
446
- type DeregisterKnownNeuron = record {
447
- id : opt NeuronId;
448
- };
449
-
450
- type KnownNeuronData = record {
451
- name : text;
452
- description : opt text;
453
- links : opt vec text;
454
- // The first `opt` makes it so that the field can be renamed/deprecated in the future, and
455
- // the second `opt` makes it so that an older client not recognizing a new variant can still
456
- // get the rest of the `vec`.
457
- committed_topics : opt vec opt TopicToFollow;
458
- };
459
-
460
- type LedgerParameters = record {
461
- transaction_fee : opt Tokens;
462
- token_symbol : opt text;
463
- token_logo : opt Image;
464
- token_name : opt text;
465
- };
466
-
467
- type ListKnownNeuronsResponse = record {
468
- known_neurons : vec KnownNeuron;
469
- };
470
-
471
- // Parameters of the list_neurons method.
472
- type ListNeurons = record {
473
- // These fields select neurons to be in the result set.
474
- neuron_ids : vec nat64;
475
- include_neurons_readable_by_caller : bool;
476
-
477
- // Only has an effect when include_neurons_readable_by_caller.
478
- include_empty_neurons_readable_by_caller : opt bool;
479
-
480
- // When a public neuron is a member of the result set, include it in the
481
- // full_neurons field (of ListNeuronsResponse). This does not affect which
482
- // neurons are part of the result set.
483
- include_public_neurons_in_full_neurons : opt bool;
484
-
485
- page_number: opt nat64;
486
- page_size: opt nat64;
487
- neuron_subaccounts: opt vec NeuronSubaccount;
488
- };
489
-
490
- type NeuronSubaccount = record {
491
- subaccount : blob;
492
- };
493
-
494
- // Output of the list_neurons method.
495
- type ListNeuronsResponse = record {
496
- // Per the NeuronInfo type, this is a redacted view of the neurons in the
497
- // result set consisting of information that require no special privileges to
498
- // view.
499
- neuron_infos : vec record { nat64; NeuronInfo };
500
-
501
- // If the caller has the necessary special privileges (or the neuron is
502
- // public, and the request sets include_public_neurons_in_full_neurons to
503
- // true), then all the information about the neurons in the result set is made
504
- // available here.
505
- full_neurons : vec Neuron;
506
-
507
- total_pages_available: opt nat64;
508
- };
509
-
510
- type ListNodeProviderRewardsRequest = record {
511
- date_filter : opt DateRangeFilter;
512
- };
513
-
514
- type ListNodeProviderRewardsResponse = record {
515
- rewards : vec MonthlyNodeProviderRewards;
516
- };
517
-
518
- type ListNodeProvidersResponse = record {
519
- node_providers : vec NodeProvider;
520
- };
521
-
522
- type ListProposalInfoRequest = record {
523
- include_reward_status : vec int32;
524
- omit_large_fields : opt bool;
525
- before_proposal : opt ProposalId;
526
- limit : nat32;
527
- exclude_topic : vec int32;
528
- include_all_manage_neuron_proposals : opt bool;
529
- include_status : vec int32;
530
- };
531
-
532
- type ListProposalInfoResponse = record {
533
- proposal_info : vec ProposalInfo;
534
- };
535
-
536
- type MakeProposalRequest = record {
537
- url : text;
538
- title : opt text;
539
- action : opt ProposalActionRequest;
540
- summary : text;
541
- };
542
-
543
- type MakeProposalResponse = record {
544
- message : opt text;
545
- proposal_id : opt ProposalId;
546
- };
547
-
548
- // Not to be confused with ManageNeuronRequest. (Yes, this is very structurally
549
- // similar to that, but not actually exactly equivalent.)
550
- type ManageNeuron = record {
551
- id : opt NeuronId;
552
- command : opt Command;
553
- neuron_id_or_subaccount : opt NeuronIdOrSubaccount;
554
- };
555
-
556
- // KEEP THIS IN SYNC WITH COMMAND!
557
- type ManageNeuronCommandRequest = variant {
558
- Spawn : Spawn;
559
- Split : Split;
560
- Follow : Follow;
561
- ClaimOrRefresh : ClaimOrRefresh;
562
- Configure : Configure;
563
- RegisterVote : RegisterVote;
564
- Merge : Merge;
565
- DisburseToNeuron : DisburseToNeuron;
566
- MakeProposal : MakeProposalRequest;
567
- StakeMaturity : StakeMaturity;
568
- MergeMaturity : MergeMaturity;
569
- Disburse : Disburse;
570
- RefreshVotingPower : RefreshVotingPower;
571
- DisburseMaturity : DisburseMaturity;
572
- SetFollowing : SetFollowing;
573
-
574
- // KEEP THIS IN SYNC WITH COMMAND!
575
- };
576
-
577
- // Parameters of the manage_neuron method.
578
- type ManageNeuronRequest = record {
579
- // Which neuron to operate on.
580
- neuron_id_or_subaccount : opt NeuronIdOrSubaccount;
581
-
582
- // What operation to perform on the neuron.
583
- command : opt ManageNeuronCommandRequest;
584
-
585
- // Deprecated. Use neuron_id_or_subaccount instead.
586
- id : opt NeuronId;
587
- };
588
-
589
- // Output of the manage_neuron method.
590
- type ManageNeuronResponse = record {
591
- // Corresponds to the command field in ManageNeuronRequest, which determines
592
- // what operation was performed.
593
- command : opt Command_1;
594
- };
595
-
596
- type Merge = record {
597
- source_neuron_id : opt NeuronId;
598
- };
599
-
600
- type MergeMaturity = record {
601
- percentage_to_merge : nat32;
602
- };
603
-
604
- type MergeMaturityResponse = record {
605
- merged_maturity_e8s : nat64;
606
- new_stake_e8s : nat64;
607
- };
608
-
609
- type MergeResponse = record {
610
- target_neuron : opt Neuron;
611
- source_neuron : opt Neuron;
612
- target_neuron_info : opt NeuronInfo;
613
- source_neuron_info : opt NeuronInfo;
614
- };
615
-
616
- type DateUtc = record {
617
- year : nat32;
618
- month : nat32;
619
- day : nat32;
620
- };
621
-
622
- type MonthlyNodeProviderRewards = record {
623
- minimum_xdr_permyriad_per_icp : opt nat64;
624
- registry_version : opt nat64;
625
- node_providers : vec NodeProvider;
626
- timestamp : nat64;
627
- start_date : opt DateUtc;
628
- end_date : opt DateUtc;
629
- rewards : vec RewardNodeProvider;
630
- xdr_conversion_rate : opt XdrConversionRate;
631
- maximum_node_provider_rewards_e8s : opt nat64;
632
- };
633
-
634
- type Motion = record {
635
- motion_text : text;
636
- };
637
-
638
- type NetworkEconomics = record {
639
- neuron_minimum_stake_e8s : nat64;
640
- max_proposals_to_keep_per_topic : nat32;
641
- neuron_management_fee_per_proposal_e8s : nat64;
642
- reject_cost_e8s : nat64;
643
- transaction_fee_e8s : nat64;
644
- neuron_spawn_dissolve_delay_seconds : nat64;
645
- minimum_icp_xdr_rate : nat64;
646
- maximum_node_provider_rewards_e8s : nat64;
647
- neurons_fund_economics : opt NeuronsFundEconomics;
648
-
649
- // Parameters that affect the voting power of neurons.
650
- voting_power_economics : opt VotingPowerEconomics;
651
- };
652
-
653
- // Parameters that affect the voting power of neurons.
654
- type VotingPowerEconomics = record {
655
- // If a neuron has not "refreshed" its voting power after this amount of time,
656
- // its deciding voting power starts decreasing linearly. See also
657
- // clear_following_after_seconds.
658
- //
659
- // For explanation of what "refresh" means in this context, see
660
- // https://dashboard.internetcomputer.org/proposal/132411
661
- //
662
- // Initially, set to 0.5 years. (The nominal length of a year is 365.25 days).
663
- start_reducing_voting_power_after_seconds : opt nat64;
664
-
665
- // After a neuron has experienced voting power reduction for this amount of
666
- // time, a couple of things happen:
667
- //
668
- // 1. Deciding voting power reaches 0.
669
- //
670
- // 2. Its following on topics other than NeuronManagement are cleared.
671
- //
672
- // Initially, set to 1/12 years.
673
- clear_following_after_seconds : opt nat64;
674
-
675
- // The minimum dissolve delay a neuron must have in order to be eligible to vote.
676
- //
677
- // Neurons with a dissolve delay lower than this threshold will not have
678
- // voting power, even if they are otherwise active.
679
- //
680
- // This value is an essential part of the staking mechanism, promoting
681
- // long-term alignment with the network's governance.
682
- neuron_minimum_dissolve_delay_to_vote_seconds : opt nat64;
683
- };
684
-
685
- type Neuron = record {
686
- id : opt NeuronId;
687
- staked_maturity_e8s_equivalent : opt nat64;
688
- controller : opt principal;
689
- recent_ballots : vec BallotInfo;
690
- kyc_verified : bool;
691
- neuron_type : opt int32;
692
- not_for_profit : bool;
693
- maturity_e8s_equivalent : nat64;
694
- cached_neuron_stake_e8s : nat64;
695
- created_timestamp_seconds : nat64;
696
- auto_stake_maturity : opt bool;
697
- aging_since_timestamp_seconds : nat64;
698
- hot_keys : vec principal;
699
- account : blob;
700
- joined_community_fund_timestamp_seconds : opt nat64;
701
- dissolve_state : opt DissolveState;
702
- followees : vec record { int32; Followees };
703
- neuron_fees_e8s : nat64;
704
- visibility : opt int32;
705
- transfer : opt NeuronStakeTransfer;
706
- known_neuron_data : opt KnownNeuronData;
707
- spawn_at_timestamp_seconds : opt nat64;
708
- voting_power_refreshed_timestamp_seconds : opt nat64;
709
-
710
- // The amount of "sway" this neuron has when voting on proposals.
711
- //
712
- // When a proposal is created, each eligible neuron gets a "blank" ballot. The
713
- // amount of voting power in that ballot is set to the neuron's deciding
714
- // voting power at the time of proposal creation. There are two ways that a
715
- // proposal can become decided:
716
- //
717
- // 1. Early: Either more than half of the total voting power in the ballots
718
- // votes in favor (then the proposal is approved), or at least half of the
719
- // votal voting power in the ballots votes against (then, the proposal is
720
- // rejected).
721
- //
722
- // 2. The proposal's voting deadline is reached. At that point, if there is
723
- // more voting power in favor than against, and at least 3% of the total
724
- // voting power voted in favor, then the proposal is approved. Otherwise, it
725
- // is rejected.
726
- //
727
- // If a neuron regularly refreshes its voting power, this has the same value
728
- // as potential_voting_power. Actions that cause a refresh are as follows:
729
- //
730
- // 1. voting directly (not via following)
731
- // 2. set following
732
- // 3. refresh voting power
733
- //
734
- // (All of these actions are performed via the manage_neuron method.)
735
- //
736
- // However, if a neuron has not refreshed in a "long" time, this will be less
737
- // than potential voting power. See VotingPowerEconomics. As a further result
738
- // of less deciding voting power, not only does it have less influence on the
739
- // outcome of proposals, the neuron receives less voting rewards (when it
740
- // votes indirectly via following).
741
- //
742
- // For details, see https://dashboard.internetcomputer.org/proposal/132411.
743
- //
744
- // Per NNS policy, this is opt. Nevertheless, it will never be null.
745
- deciding_voting_power : opt nat64;
746
-
747
- // The amount of "sway" this neuron can have if it refreshes its voting power
748
- // frequently enough.
749
- //
750
- // Unlike deciding_voting_power, this does NOT take refreshing into account.
751
- // Rather, this only takes three factors into account:
752
- //
753
- // 1. (Net) staked amount - This is the "base" of a neuron's voting power.
754
- // This primarily consists of the neuron's ICP balance.
755
- //
756
- // 2. Age - Neurons with more age have more voting power (all else being
757
- // equal).
758
- //
759
- // 3. Dissolve delay - Neurons with longer dissolve delay have more voting
760
- // power (all else being equal). Neurons with a dissolve delay of less
761
- // than six months are not eligible to vote. Therefore, such neurons
762
- // are considered to have 0 voting power.
763
- //
764
- // Per NNS policy, this is opt. Nevertheless, it will never be null.
765
- potential_voting_power : opt nat64;
766
-
767
- // The maturity disbursements in progress, i.e. the disbursements that are initiated but not
768
- // finalized. The finalization happens 7 days after the disbursement is initiated.
769
- maturity_disbursements_in_progress : opt vec MaturityDisbursement;
770
- };
771
-
772
- type NeuronBasketConstructionParameters = record {
773
- dissolve_delay_interval : opt Duration;
774
- count : opt nat64;
775
- };
776
-
777
- type NeuronBasketConstructionParameters_1 = record {
778
- dissolve_delay_interval_seconds : nat64;
779
- count : nat64;
780
- };
781
-
782
- type NeuronDistribution = record {
783
- controller : opt principal;
784
- dissolve_delay : opt Duration;
785
- memo : opt nat64;
786
- vesting_period : opt Duration;
787
- stake : opt Tokens;
788
- };
789
-
790
- type NeuronId = record {
791
- id : nat64;
792
- };
793
-
794
- type ProposalId = record {
795
- id : nat64;
796
- };
797
-
798
- type NeuronIdOrSubaccount = variant {
799
- Subaccount : blob;
800
- NeuronId : NeuronId;
801
- };
802
-
803
- type NeuronInFlightCommand = record {
804
- command : opt Command_2;
805
- timestamp : nat64;
806
- };
807
-
808
- type GetNeuronIndexRequest = record {
809
- exclusive_start_neuron_id: opt NeuronId;
810
- page_size: opt nat32;
811
- };
812
-
813
- type NeuronIndexData = record {
814
- neurons: vec NeuronInfo;
815
- };
816
-
817
- type GetNeuronIndexResult = variant {
818
- Ok : NeuronIndexData;
819
- Err : GovernanceError;
820
- };
821
-
822
- // A limit view of Neuron that allows some aspects of all neurons to be read by
823
- // anyone (i.e. without having to be the neuron's controller nor one of its
824
- // hotkeys).
825
- //
826
- // As such, the meaning of each field in this type is generally the same as the
827
- // one of the same (or at least similar) name in Neuron.
828
- type NeuronInfo = record {
829
- id: opt NeuronId;
830
- dissolve_delay_seconds : nat64;
831
- recent_ballots : vec BallotInfo;
832
- neuron_type : opt int32;
833
- created_timestamp_seconds : nat64;
834
- state : int32;
835
-
836
- // The amount of ICP (and staked maturity) locked in this neuron.
837
- //
838
- // This is the foundation of the neuron's voting power.
839
- //
840
- // cached_neuron_stake_e8s - neuron_fees_e8s + staked_maturity_e8s_equivalent
841
- stake_e8s : nat64;
842
-
843
- joined_community_fund_timestamp_seconds : opt nat64;
844
- retrieved_at_timestamp_seconds : nat64;
845
- visibility : opt int32;
846
- known_neuron_data : opt KnownNeuronData;
847
- age_seconds : nat64;
848
-
849
- // Deprecated. Use either deciding_voting_power or potential_voting_power
850
- // instead. Has the same value as deciding_voting_power.
851
- //
852
- // Previously, if a neuron had < 6 months dissolve delay (making it ineligible
853
- // to vote), this would not get set to 0 (zero). That was pretty confusing.
854
- // Now that this is set to deciding_voting_power, this actually does get
855
- // zeroed out.
856
- voting_power : nat64;
857
-
858
- voting_power_refreshed_timestamp_seconds : opt nat64;
859
- deciding_voting_power : opt nat64;
860
- potential_voting_power : opt nat64;
861
- };
862
-
863
- type NeuronStakeTransfer = record {
864
- to_subaccount : blob;
865
- neuron_stake_e8s : nat64;
866
- from : opt principal;
867
- memo : nat64;
868
- from_subaccount : blob;
869
- transfer_timestamp : nat64;
870
- block_height : nat64;
871
- };
872
-
873
- type NeuronSubsetMetrics = record {
874
- count : opt nat64;
875
-
876
- total_staked_e8s : opt nat64;
877
- total_maturity_e8s_equivalent : opt nat64;
878
- total_staked_maturity_e8s_equivalent : opt nat64;
879
-
880
- total_voting_power : opt nat64;
881
- total_deciding_voting_power : opt nat64;
882
- total_potential_voting_power : opt nat64;
883
-
884
- count_buckets : vec record { nat64; nat64 };
885
-
886
- staked_e8s_buckets : vec record { nat64; nat64 };
887
- maturity_e8s_equivalent_buckets : vec record { nat64; nat64 };
888
- staked_maturity_e8s_equivalent_buckets : vec record { nat64; nat64 };
889
-
890
- voting_power_buckets : vec record { nat64; nat64 };
891
- deciding_voting_power_buckets : vec record { nat64; nat64 };
892
- potential_voting_power_buckets : vec record { nat64; nat64 };
893
- };
894
-
895
- type NeuronsFundAuditInfo = record {
896
- final_neurons_fund_participation : opt NeuronsFundParticipation;
897
- initial_neurons_fund_participation : opt NeuronsFundParticipation;
898
- neurons_fund_refunds : opt NeuronsFundSnapshot;
899
- };
900
-
901
- type NeuronsFundData = record {
902
- final_neurons_fund_participation : opt NeuronsFundParticipation;
903
- initial_neurons_fund_participation : opt NeuronsFundParticipation;
904
- neurons_fund_refunds : opt NeuronsFundSnapshot;
905
- };
906
-
907
- type NeuronsFundEconomics = record {
908
- maximum_icp_xdr_rate : opt Percentage;
909
- neurons_fund_matched_funding_curve_coefficients : opt NeuronsFundMatchedFundingCurveCoefficients;
910
- max_theoretical_neurons_fund_participation_amount_xdr : opt Decimal;
911
- minimum_icp_xdr_rate : opt Percentage;
912
- };
913
-
914
- type NeuronsFundMatchedFundingCurveCoefficients = record {
915
- contribution_threshold_xdr : opt Decimal;
916
- one_third_participation_milestone_xdr : opt Decimal;
917
- full_participation_milestone_xdr : opt Decimal;
918
- };
919
-
920
- type NeuronsFundNeuron = record {
921
- controller : opt principal;
922
- hotkeys : opt Principals;
923
- is_capped : opt bool;
924
- nns_neuron_id : opt nat64;
925
- amount_icp_e8s : opt nat64;
926
- };
927
-
928
- type NeuronsFundNeuronPortion = record {
929
- controller : opt principal;
930
- hotkeys : vec principal;
931
- is_capped : opt bool;
932
- maturity_equivalent_icp_e8s : opt nat64;
933
- nns_neuron_id : opt NeuronId;
934
- amount_icp_e8s : opt nat64;
935
- };
936
-
937
- type NeuronsFundParticipation = record {
938
- total_maturity_equivalent_icp_e8s : opt nat64;
939
- intended_neurons_fund_participation_icp_e8s : opt nat64;
940
- direct_participation_icp_e8s : opt nat64;
941
- swap_participation_limits : opt SwapParticipationLimits;
942
- max_neurons_fund_swap_participation_icp_e8s : opt nat64;
943
- neurons_fund_reserves : opt NeuronsFundSnapshot;
944
- ideal_matched_participation_function : opt IdealMatchedParticipationFunction;
945
- allocated_neurons_fund_participation_icp_e8s : opt nat64;
946
- };
947
-
948
- type NeuronsFundSnapshot = record {
949
- neurons_fund_neuron_portions : vec NeuronsFundNeuronPortion;
950
- };
951
-
952
- type NodeProvider = record {
953
- id : opt principal;
954
- reward_account : opt AccountIdentifier;
955
- };
956
-
957
- type Ok = record {
958
- neurons_fund_audit_info : opt NeuronsFundAuditInfo;
959
- };
960
-
961
- type Ok_1 = record {
962
- neurons_fund_neuron_portions : vec NeuronsFundNeuron;
963
- };
964
-
965
- type OpenSnsTokenSwap = record {
966
- community_fund_investment_e8s : opt nat64;
967
- target_swap_canister_id : opt principal;
968
- params : opt Params;
969
- };
970
-
971
- type Operation = variant {
972
- RemoveHotKey : RemoveHotKey;
973
- AddHotKey : AddHotKey;
974
- ChangeAutoStakeMaturity : ChangeAutoStakeMaturity;
975
- StopDissolving : record {};
976
- StartDissolving : record {};
977
- IncreaseDissolveDelay : IncreaseDissolveDelay;
978
- SetVisibility : SetVisibility;
979
- JoinCommunityFund : record {};
980
- LeaveCommunityFund : record {};
981
- SetDissolveTimestamp : SetDissolveTimestamp;
982
- };
983
-
984
- type Params = record {
985
- min_participant_icp_e8s : nat64;
986
- neuron_basket_construction_parameters : opt NeuronBasketConstructionParameters_1;
987
- max_icp_e8s : nat64;
988
- swap_due_timestamp_seconds : nat64;
989
- min_participants : nat32;
990
- sns_token_e8s : nat64;
991
- sale_delay_seconds : opt nat64;
992
- max_participant_icp_e8s : nat64;
993
- min_direct_participation_icp_e8s : opt nat64;
994
- min_icp_e8s : nat64;
995
- max_direct_participation_icp_e8s : opt nat64;
996
- };
997
-
998
- type Percentage = record {
999
- basis_points : opt nat64;
1000
- };
1001
-
1002
- type Principals = record {
1003
- principals : vec principal;
1004
- };
1005
-
1006
- type Proposal = record {
1007
- url : text;
1008
- title : opt text;
1009
- action : opt Action;
1010
- summary : text;
1011
- };
1012
-
1013
- type ProposalActionRequest = variant {
1014
- RegisterKnownNeuron : KnownNeuron;
1015
- DeregisterKnownNeuron : DeregisterKnownNeuron;
1016
- ManageNeuron : ManageNeuronRequest;
1017
- UpdateCanisterSettings : UpdateCanisterSettings;
1018
- InstallCode : InstallCodeRequest;
1019
- StopOrStartCanister : StopOrStartCanister;
1020
- CreateServiceNervousSystem : CreateServiceNervousSystem;
1021
- ExecuteNnsFunction : ExecuteNnsFunction;
1022
- RewardNodeProvider : RewardNodeProvider;
1023
- RewardNodeProviders : RewardNodeProviders;
1024
- ManageNetworkEconomics : NetworkEconomics;
1025
- ApproveGenesisKyc : Principals;
1026
- AddOrRemoveNodeProvider : AddOrRemoveNodeProvider;
1027
- Motion : Motion;
1028
- FulfillSubnetRentalRequest : FulfillSubnetRentalRequest;
1029
- };
1030
-
1031
- // Creates a rented subnet from a rental request (in the Subnet Rental
1032
- // canister).
1033
- type FulfillSubnetRentalRequest = record {
1034
- // Identifies which rental request to fulfill.
1035
- //
1036
- // (Identifying the rental request by user works, because a user can have at
1037
- // most one rental request in the Subnet Rental canister).
1038
- user : opt principal;
1039
-
1040
- // Which nodes will be members of the subnet.
1041
- node_ids : opt vec principal;
1042
-
1043
- // What software the nodes will run.
1044
- //
1045
- // This must be approved by a prior proposal to bless an IC OS version.
1046
- //
1047
- // This is a FULL git commit ID in the ic repo. (Therefore, it must be a 40
1048
- // character hexidecimal string, not an abbreviated git commit ID.)
1049
- //
1050
- // One way to find a suitable value is with the following command:
1051
- //
1052
- // ic-admin \
1053
- // get-subnet 0 \
1054
- // --nns-urls https://nns.ic0.app \
1055
- // | grep replica_version_id
1056
- //
1057
- // Where to obtain a recent version of ic-admin:
1058
- //
1059
- // https://github.com/dfinity/ic/releases/latest
1060
- replica_version_id : opt text;
1061
- };
1062
-
1063
- type ProposalData = record {
1064
- id : opt ProposalId;
1065
- failure_reason : opt GovernanceError;
1066
- ballots : vec record { nat64; Ballot };
1067
- proposal_timestamp_seconds : nat64;
1068
- reward_event_round : nat64;
1069
- failed_timestamp_seconds : nat64;
1070
- neurons_fund_data : opt NeuronsFundData;
1071
- reject_cost_e8s : nat64;
1072
- derived_proposal_information : opt DerivedProposalInformation;
1073
- latest_tally : opt Tally;
1074
- sns_token_swap_lifecycle : opt int32;
1075
- decided_timestamp_seconds : nat64;
1076
- proposal : opt Proposal;
1077
- proposer : opt NeuronId;
1078
- wait_for_quiet_state : opt WaitForQuietState;
1079
- executed_timestamp_seconds : nat64;
1080
- original_total_community_fund_maturity_e8s_equivalent : opt nat64;
1081
- total_potential_voting_power : opt nat64;
1082
- topic: opt int32;
1083
- };
1084
-
1085
- type ProposalInfo = record {
1086
- id : opt ProposalId;
1087
- status : int32;
1088
- topic : int32;
1089
- failure_reason : opt GovernanceError;
1090
- ballots : vec record { nat64; Ballot };
1091
- proposal_timestamp_seconds : nat64;
1092
- reward_event_round : nat64;
1093
- deadline_timestamp_seconds : opt nat64;
1094
- failed_timestamp_seconds : nat64;
1095
- reject_cost_e8s : nat64;
1096
- derived_proposal_information : opt DerivedProposalInformation;
1097
- latest_tally : opt Tally;
1098
- reward_status : int32;
1099
- decided_timestamp_seconds : nat64;
1100
- proposal : opt Proposal;
1101
- proposer : opt NeuronId;
1102
- executed_timestamp_seconds : nat64;
1103
- total_potential_voting_power : opt nat64;
1104
- };
1105
-
1106
- type RegisterVote = record {
1107
- vote : int32;
1108
- proposal : opt ProposalId;
1109
- };
1110
-
1111
- type RemoveHotKey = record {
1112
- hot_key_to_remove : opt principal;
1113
- };
1114
-
1115
- type RestoreAgingNeuronGroup = record {
1116
- count : opt nat64;
1117
- previous_total_stake_e8s : opt nat64;
1118
- current_total_stake_e8s : opt nat64;
1119
- group_type : int32;
1120
- };
1121
-
1122
- type RestoreAgingSummary = record {
1123
- groups : vec RestoreAgingNeuronGroup;
1124
- timestamp_seconds : opt nat64;
1125
- };
1126
-
1127
- type Result = variant {
1128
- Ok;
1129
- Err : GovernanceError;
1130
- };
1131
-
1132
- type Result_1 = variant {
1133
- Error : GovernanceError;
1134
- NeuronId : NeuronId;
1135
- };
1136
-
1137
- type Result_10 = variant {
1138
- Ok : Ok_1;
1139
- Err : GovernanceError;
1140
- };
1141
-
1142
- type Result_2 = variant {
1143
- Ok : Neuron;
1144
- Err : GovernanceError;
1145
- };
1146
-
1147
- type Result_3 = variant {
1148
- Ok : GovernanceCachedMetrics;
1149
- Err : GovernanceError;
1150
- };
1151
-
1152
- type Result_4 = variant {
1153
- Ok : MonthlyNodeProviderRewards;
1154
- Err : GovernanceError;
1155
- };
1156
-
1157
- type Result_5 = variant {
1158
- Ok : NeuronInfo;
1159
- Err : GovernanceError;
1160
- };
1161
-
1162
- type Result_6 = variant {
1163
- Ok : Ok;
1164
- Err : GovernanceError;
1165
- };
1166
-
1167
- type Result_7 = variant {
1168
- Ok : NodeProvider;
1169
- Err : GovernanceError;
1170
- };
1171
-
1172
- type Result_8 = variant {
1173
- Committed : Committed;
1174
- Aborted : record {} };
1175
-
1176
- type Result_9 = variant {
1177
- Committed : Committed_1;
1178
- Aborted : record {} };
1179
-
1180
- type RewardEvent = record {
1181
- rounds_since_last_distribution : opt nat64;
1182
- day_after_genesis : nat64;
1183
- actual_timestamp_seconds : nat64;
1184
- total_available_e8s_equivalent : nat64;
1185
- latest_round_available_e8s_equivalent : opt nat64;
1186
- distributed_e8s_equivalent : nat64;
1187
- settled_proposals : vec ProposalId;
1188
- };
1189
-
1190
- type RewardMode = variant {
1191
- RewardToNeuron : RewardToNeuron;
1192
- RewardToAccount : RewardToAccount;
1193
- };
1194
-
1195
- type RewardNodeProvider = record {
1196
- node_provider : opt NodeProvider;
1197
- reward_mode : opt RewardMode;
1198
- amount_e8s : nat64;
1199
- };
1200
-
1201
- type RewardNodeProviders = record {
1202
- use_registry_derived_rewards : opt bool;
1203
- rewards : vec RewardNodeProvider;
1204
- };
1205
-
1206
- type RewardToAccount = record {
1207
- to_account : opt AccountIdentifier;
1208
- };
1209
-
1210
- type RewardToNeuron = record {
1211
- dissolve_delay_seconds : nat64;
1212
- };
1213
-
1214
- type SetDefaultFollowees = record {
1215
- default_followees : vec record { int32; Followees };
1216
- };
1217
-
1218
- type SetDissolveTimestamp = record {
1219
- dissolve_timestamp_seconds : nat64;
1220
- };
1221
-
1222
- type SetOpenTimeWindowRequest = record {
1223
- open_time_window : opt TimeWindow;
1224
- };
1225
-
1226
- type SetSnsTokenSwapOpenTimeWindow = record {
1227
- request : opt SetOpenTimeWindowRequest;
1228
- swap_canister_id : opt principal;
1229
- };
1230
-
1231
- type SetVisibility = record {
1232
- visibility : opt int32;
1233
- };
1234
-
1235
- type SettleCommunityFundParticipation = record {
1236
- result : opt Result_8;
1237
- open_sns_token_swap_proposal_id : opt nat64;
1238
- };
1239
-
1240
- type SettleNeuronsFundParticipationRequest = record {
1241
- result : opt Result_9;
1242
- nns_proposal_id : opt nat64;
1243
- };
1244
-
1245
- type SettleNeuronsFundParticipationResponse = record {
1246
- result : opt Result_10;
1247
- };
1248
-
1249
- type Spawn = record {
1250
- percentage_to_spawn : opt nat32;
1251
- new_controller : opt principal;
1252
- nonce : opt nat64;
1253
- };
1254
-
1255
- type SpawnResponse = record {
1256
- created_neuron_id : opt NeuronId;
1257
- };
1258
-
1259
- type Split = record {
1260
- amount_e8s : nat64;
1261
- memo : opt nat64;
1262
- };
1263
-
1264
- type StakeMaturity = record {
1265
- percentage_to_stake : opt nat32;
1266
- };
1267
-
1268
- type StakeMaturityResponse = record {
1269
- maturity_e8s : nat64;
1270
- staked_maturity_e8s : nat64;
1271
- };
1272
-
1273
- type StopOrStartCanister = record {
1274
- action : opt int32;
1275
- canister_id : opt principal;
1276
- };
1277
-
1278
- type SwapBackgroundInformation = record {
1279
- ledger_index_canister_summary : opt CanisterSummary;
1280
- fallback_controller_principal_ids : vec principal;
1281
- ledger_archive_canister_summaries : vec CanisterSummary;
1282
- ledger_canister_summary : opt CanisterSummary;
1283
- swap_canister_summary : opt CanisterSummary;
1284
- governance_canister_summary : opt CanisterSummary;
1285
- root_canister_summary : opt CanisterSummary;
1286
- dapp_canister_summaries : vec CanisterSummary;
1287
- };
1288
-
1289
- type SwapDistribution = record {
1290
- total : opt Tokens;
1291
- };
1292
-
1293
- type SwapParameters = record {
1294
- minimum_participants : opt nat64;
1295
- neurons_fund_participation : opt bool;
1296
- duration : opt Duration;
1297
- neuron_basket_construction_parameters : opt NeuronBasketConstructionParameters;
1298
- confirmation_text : opt text;
1299
- maximum_participant_icp : opt Tokens;
1300
- minimum_icp : opt Tokens;
1301
- minimum_direct_participation_icp : opt Tokens;
1302
- minimum_participant_icp : opt Tokens;
1303
- start_time : opt GlobalTimeOfDay;
1304
- maximum_direct_participation_icp : opt Tokens;
1305
- maximum_icp : opt Tokens;
1306
- neurons_fund_investment_icp : opt Tokens;
1307
- restricted_countries : opt Countries;
1308
- };
1309
-
1310
- type SwapParticipationLimits = record {
1311
- min_participant_icp_e8s : opt nat64;
1312
- max_participant_icp_e8s : opt nat64;
1313
- min_direct_participation_icp_e8s : opt nat64;
1314
- max_direct_participation_icp_e8s : opt nat64;
1315
- };
1316
-
1317
- type Tally = record {
1318
- no : nat64;
1319
- yes : nat64;
1320
- total : nat64;
1321
- timestamp_seconds : nat64;
1322
- };
1323
-
1324
- type TimeWindow = record {
1325
- start_timestamp_seconds : nat64;
1326
- end_timestamp_seconds : nat64;
1327
- };
1328
-
1329
- type Tokens = record {
1330
- e8s : opt nat64;
1331
- };
1332
-
1333
- type UpdateCanisterSettings = record {
1334
- canister_id : opt principal;
1335
- settings : opt CanisterSettings;
1336
- };
1337
-
1338
- type UpdateNodeProvider = record {
1339
- reward_account : opt AccountIdentifier;
1340
- };
1341
-
1342
- type VotingRewardParameters = record {
1343
- reward_rate_transition_duration : opt Duration;
1344
- initial_reward_rate : opt Percentage;
1345
- final_reward_rate : opt Percentage;
1346
- };
1347
-
1348
- type WaitForQuietState = record {
1349
- current_deadline_timestamp_seconds : nat64;
1350
- };
1351
-
1352
- type XdrConversionRate = record {
1353
- xdr_permyriad_per_icp : opt nat64;
1354
- timestamp_seconds : opt nat64;
1355
- };
1356
-
1357
- type MaturityDisbursement = record {
1358
- amount_e8s : opt nat64;
1359
- timestamp_of_disbursement_seconds : opt nat64;
1360
- finalize_disbursement_timestamp_seconds : opt nat64;
1361
- account_to_disburse_to : opt Account;
1362
- account_identifier_to_disburse_to : opt AccountIdentifier;
1363
- };
1364
-
1365
- // A topic that can be followed. It is almost the same as the topic on the
1366
- // proposal, except that the `CatchAll` is a special value and following on this
1367
- // `topic` will let the neuron follow the votes on all topics except for
1368
- // Governance and SnsAndCommunityFund.
1369
- type TopicToFollow = variant {
1370
- CatchAll;
1371
- NeuronManagement;
1372
- ExchangeRate;
1373
- NetworkEconomics;
1374
- Governance;
1375
- NodeAdmin;
1376
- ParticipantManagement;
1377
- SubnetManagement;
1378
- Kyc;
1379
- NodeProviderRewards;
1380
- IcOsVersionDeployment;
1381
- IcOsVersionElection;
1382
- SnsAndCommunityFund;
1383
- ApiBoundaryNodeManagement;
1384
- SubnetRental;
1385
- ApplicationCanisterManagement;
1386
- ProtocolCanisterManagement;
1387
- ServiceNervousSystemManagement;
1388
- };
1389
-
1390
- type ListNeuronVotesRequest = record {
1391
- // The neuron id for which the voting history will be returned. Currently, the voting history is
1392
- // only recorded for known neurons.
1393
- neuron_id : opt NeuronId;
1394
- // Only fetch the voting history for proposal whose id `< before_proposal`. This can be used as a
1395
- // pagination token - pass the minimum proposal id as `before_proposal` for the next page.
1396
- before_proposal : opt ProposalId;
1397
- // The maximum number of votes to fetch. The maximum number allowed is 500, and 500 will be used
1398
- // if is set as either null or > 500.
1399
- limit : opt nat64;
1400
- };
1401
-
1402
- type ListNeuronVotesResponse = variant {
1403
- Ok : record {
1404
- votes : opt vec NeuronVote;
1405
- // All the proposals before this id is "finalized", which means if a proposal before this id
1406
- // does not exist in the votes, it will never appear in the voting history, either because the
1407
- // neuron is not eligible to vote on the proposal, or the neuron is not a known neuron at the
1408
- // time of the proposal creation. Therefore, if a client syncs the entire voting history of a
1409
- // certain neuron and store `all_finalized_before_proposal`, it doesn't need to start from
1410
- // scratch the next time - it can stop as soon as they have seen any votes
1411
- // `< all_finalized_before_proposal`.
1412
- all_finalized_before_proposal : opt ProposalId;
1413
- };
1414
- Err : GovernanceError;
1415
- };
1416
-
1417
- type NeuronVote = record {
1418
- proposal_id : opt ProposalId;
1419
- // The vote of the neuron on the specific proposal id.
1420
- vote : opt Vote;
1421
- };
1422
-
1423
- type Vote = variant {
1424
- // Abstentions are recorded as Unspecified.
1425
- Unspecified;
1426
- Yes;
1427
- No;
1428
- };
1429
-
1430
- service : (Governance) -> {
1431
- claim_gtc_neurons : (principal, vec NeuronId) -> (Result);
1432
- claim_or_refresh_neuron_from_account : (ClaimOrRefreshNeuronFromAccount) -> (
1433
- ClaimOrRefreshNeuronFromAccountResponse,
1434
- );
1435
- get_build_metadata : () -> (text) query;
1436
- get_full_neuron : (nat64) -> (Result_2) query;
1437
- get_full_neuron_by_id_or_subaccount : (NeuronIdOrSubaccount) -> (
1438
- Result_2,
1439
- ) query;
1440
- get_latest_reward_event : () -> (RewardEvent) query;
1441
- get_metrics : () -> (Result_3) query;
1442
- get_monthly_node_provider_rewards : () -> (Result_4);
1443
- get_most_recent_monthly_node_provider_rewards : () -> (
1444
- opt MonthlyNodeProviderRewards,
1445
- ) query;
1446
- get_network_economics_parameters : () -> (NetworkEconomics) query;
1447
- get_neuron_ids : () -> (vec nat64) query;
1448
- get_neuron_index: (GetNeuronIndexRequest) -> (GetNeuronIndexResult) query;
1449
- get_neuron_info : (nat64) -> (Result_5) query;
1450
- get_neuron_info_by_id_or_subaccount : (NeuronIdOrSubaccount) -> (
1451
- Result_5,
1452
- ) query;
1453
- get_neurons_fund_audit_info : (GetNeuronsFundAuditInfoRequest) -> (
1454
- GetNeuronsFundAuditInfoResponse,
1455
- ) query;
1456
- get_node_provider_by_caller : (null) -> (Result_7) query;
1457
- get_pending_proposals : () -> (vec ProposalInfo) query;
1458
- get_proposal_info : (nat64) -> (opt ProposalInfo) query;
1459
- get_restore_aging_summary : () -> (RestoreAgingSummary) query;
1460
- list_known_neurons : () -> (ListKnownNeuronsResponse) query;
1461
- list_neurons : (ListNeurons) -> (ListNeuronsResponse) query;
1462
- list_node_provider_rewards : (ListNodeProviderRewardsRequest) -> (
1463
- ListNodeProviderRewardsResponse,
1464
- ) query;
1465
- list_node_providers : () -> (ListNodeProvidersResponse) query;
1466
- list_proposals : (ListProposalInfoRequest) -> (ListProposalInfoResponse) query;
1467
- list_neuron_votes : (ListNeuronVotesRequest) -> (ListNeuronVotesResponse) query;
1468
- manage_neuron : (ManageNeuronRequest) -> (ManageNeuronResponse);
1469
- settle_community_fund_participation : (SettleCommunityFundParticipation) -> (
1470
- Result,
1471
- );
1472
- settle_neurons_fund_participation : (
1473
- SettleNeuronsFundParticipationRequest,
1474
- ) -> (SettleNeuronsFundParticipationResponse);
1475
- simulate_manage_neuron : (ManageNeuronRequest) -> (ManageNeuronResponse);
1476
- transfer_gtc_neuron : (NeuronId, NeuronId) -> (Result);
1477
- update_node_provider : (UpdateNodeProvider) -> (Result);
1478
- }