@dfinity/nns 10.0.1 → 10.1.1

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.
@@ -15,6 +15,7 @@ export type Action =
15
15
  | { ManageNeuron: ManageNeuron }
16
16
  | { UpdateCanisterSettings: UpdateCanisterSettings }
17
17
  | { InstallCode: InstallCode }
18
+ | { DeregisterKnownNeuron: DeregisterKnownNeuron }
18
19
  | { StopOrStartCanister: StopOrStartCanister }
19
20
  | { CreateServiceNervousSystem: CreateServiceNervousSystem }
20
21
  | { ExecuteNnsFunction: ExecuteNnsFunction }
@@ -174,6 +175,9 @@ export interface DateRangeFilter {
174
175
  export interface Decimal {
175
176
  human_readable: [] | [string];
176
177
  }
178
+ export interface DeregisterKnownNeuron {
179
+ id: [] | [NeuronId];
180
+ }
177
181
  export interface DerivedProposalInformation {
178
182
  swap_background_information: [] | [SwapBackgroundInformation];
179
183
  }
@@ -223,9 +227,41 @@ export interface FolloweesForTopic {
223
227
  topic: [] | [number];
224
228
  followees: [] | [Array<NeuronId>];
225
229
  }
230
+ /**
231
+ * Creates a rented subnet from a rental request (in the Subnet Rental
232
+ * canister).
233
+ */
226
234
  export interface FulfillSubnetRentalRequest {
235
+ /**
236
+ * Identifies which rental request to fulfill.
237
+ *
238
+ * (Identifying the rental request by user works, because a user can have at
239
+ * most one rental request in the Subnet Rental canister).
240
+ */
227
241
  user: [] | [Principal];
242
+ /**
243
+ * What software the nodes will run.
244
+ *
245
+ * This must be approved by a prior proposal to bless an IC OS version.
246
+ *
247
+ * This is a FULL git commit ID in the ic repo. (Therefore, it must be a 40
248
+ * character hexidecimal string, not an abbreviated git commit ID.)
249
+ *
250
+ * One way to find a suitable value is with the following command:
251
+ *
252
+ * ic-admin \
253
+ * get-subnet 0 \
254
+ * --nns-urls https://nns.ic0.app \
255
+ * | grep replica_version_id
256
+ *
257
+ * Where to obtain a recent version of ic-admin:
258
+ *
259
+ * https://github.com/dfinity/ic/releases/latest
260
+ */
228
261
  replica_version_id: [] | [string];
262
+ /**
263
+ * Which nodes will be members of the subnet.
264
+ */
229
265
  node_ids: [] | [Array<Principal>];
230
266
  }
231
267
  export interface GetNeuronsFundAuditInfoRequest {
@@ -239,7 +275,6 @@ export interface GlobalTimeOfDay {
239
275
  }
240
276
  export interface Governance {
241
277
  default_followees: Array<[number, Followees]>;
242
- making_sns_proposal: [] | [MakingSnsProposal];
243
278
  most_recent_monthly_node_provider_rewards: [] | [MonthlyNodeProviderRewards];
244
279
  maturity_modulation_last_updated_at_timestamp_seconds: [] | [bigint];
245
280
  wait_for_quiet_threshold_seconds: bigint;
@@ -360,6 +395,7 @@ export interface KnownNeuron {
360
395
  export interface KnownNeuronData {
361
396
  name: string;
362
397
  description: [] | [string];
398
+ links: [] | [Array<string>];
363
399
  }
364
400
  export interface LedgerParameters {
365
401
  transaction_fee: [] | [Tokens];
@@ -415,11 +451,6 @@ export interface MakeProposalResponse {
415
451
  message: [] | [string];
416
452
  proposal_id: [] | [ProposalId];
417
453
  }
418
- export interface MakingSnsProposal {
419
- proposal: [] | [Proposal];
420
- caller: [] | [Principal];
421
- proposer_id: [] | [NeuronId];
422
- }
423
454
  export interface ManageNeuron {
424
455
  id: [] | [NeuronId];
425
456
  command: [] | [Command];
@@ -486,6 +517,9 @@ export interface Motion {
486
517
  }
487
518
  export interface NetworkEconomics {
488
519
  neuron_minimum_stake_e8s: bigint;
520
+ /**
521
+ * Parameters that affect the voting power of neurons.
522
+ */
489
523
  voting_power_economics: [] | [VotingPowerEconomics];
490
524
  max_proposals_to_keep_per_topic: number;
491
525
  neuron_management_fee_per_proposal_e8s: bigint;
@@ -706,6 +740,7 @@ export type ProposalActionRequest =
706
740
  | { ManageNeuron: ManageNeuronRequest }
707
741
  | { UpdateCanisterSettings: UpdateCanisterSettings }
708
742
  | { InstallCode: InstallCodeRequest }
743
+ | { DeregisterKnownNeuron: DeregisterKnownNeuron }
709
744
  | { StopOrStartCanister: StopOrStartCanister }
710
745
  | { CreateServiceNervousSystem: CreateServiceNervousSystem }
711
746
  | { ExecuteNnsFunction: ExecuteNnsFunction }
@@ -759,6 +794,11 @@ export interface ProposalInfo {
759
794
  proposer: [] | [NeuronId];
760
795
  executed_timestamp_seconds: bigint;
761
796
  }
797
+ /**
798
+ * This is one way for a neuron to make sure that its deciding_voting_power is
799
+ * not less than its potential_voting_power. See the description of those fields
800
+ * in Neuron.
801
+ */
762
802
  export type RefreshVotingPower = {};
763
803
  export type RefreshVotingPowerResponse = {};
764
804
  export interface RegisterVote {
@@ -860,6 +900,7 @@ export interface SpawnResponse {
860
900
  created_neuron_id: [] | [NeuronId];
861
901
  }
862
902
  export interface Split {
903
+ memo: [] | [bigint];
863
904
  amount_e8s: bigint;
864
905
  }
865
906
  export interface StakeMaturity {
@@ -930,9 +971,41 @@ export interface UpdateCanisterSettings {
930
971
  export interface UpdateNodeProvider {
931
972
  reward_account: [] | [AccountIdentifier];
932
973
  }
974
+ /**
975
+ * Parameters that affect the voting power of neurons.
976
+ */
933
977
  export interface VotingPowerEconomics {
978
+ /**
979
+ * If a neuron has not "refreshed" its voting power after this amount of time,
980
+ * its deciding voting power starts decreasing linearly. See also
981
+ * clear_following_after_seconds.
982
+ *
983
+ * For explanation of what "refresh" means in this context, see
984
+ * https://dashboard.internetcomputer.org/proposal/132411
985
+ *
986
+ * Initially, set to 0.5 years. (The nominal length of a year is 365.25 days).
987
+ */
934
988
  start_reducing_voting_power_after_seconds: [] | [bigint];
989
+ /**
990
+ * The minimum dissolve delay a neuron must have in order to be eligible to vote.
991
+ *
992
+ * Neurons with a dissolve delay lower than this threshold will not have
993
+ * voting power, even if they are otherwise active.
994
+ *
995
+ * This value is an essential part of the staking mechanism, promoting
996
+ * long-term alignment with the network's governance.
997
+ */
935
998
  neuron_minimum_dissolve_delay_to_vote_seconds: [] | [bigint];
999
+ /**
1000
+ * After a neuron has experienced voting power reduction for this amount of
1001
+ * time, a couple of things happen:
1002
+ *
1003
+ * 1. Deciding voting power reaches 0.
1004
+ *
1005
+ * 2. Its following on topics other than NeuronManagement are cleared.
1006
+ *
1007
+ * Initially, set to 1/12 years.
1008
+ */
936
1009
  clear_following_after_seconds: [] | [bigint];
937
1010
  }
938
1011
  export interface VotingRewardParameters {
@@ -1,10 +1,12 @@
1
- // Generated from IC repo commit 9173238 (2025-08-18 tags: release-2025-08-28_03-17-snapshot-feature) 'rs/nns/governance/canister/governance_test.did' by import-candid
1
+ // Generated from IC repo commit 206b61a (2025-09-25 tags: release-2025-09-25_09-52-base) 'rs/nns/governance/canister/governance_test.did' by import-candid
2
+
2
3
  type AccountIdentifier = record {
3
4
  hash : blob;
4
5
  };
5
6
 
6
7
  type Action = variant {
7
8
  RegisterKnownNeuron : KnownNeuron;
9
+ DeregisterKnownNeuron : DeregisterKnownNeuron;
8
10
  ManageNeuron : ManageNeuron;
9
11
  UpdateCanisterSettings : UpdateCanisterSettings;
10
12
  InstallCode : InstallCode;
@@ -309,7 +311,6 @@ type GlobalTimeOfDay = record {
309
311
 
310
312
  type Governance = record {
311
313
  default_followees : vec record { int32; Followees };
312
- making_sns_proposal : opt MakingSnsProposal;
313
314
  most_recent_monthly_node_provider_rewards : opt MonthlyNodeProviderRewards;
314
315
  maturity_modulation_last_updated_at_timestamp_seconds : opt nat64;
315
316
  wait_for_quiet_threshold_seconds : nat64;
@@ -439,9 +440,14 @@ type KnownNeuron = record {
439
440
  known_neuron_data : opt KnownNeuronData;
440
441
  };
441
442
 
443
+ type DeregisterKnownNeuron = record {
444
+ id : opt NeuronId;
445
+ };
446
+
442
447
  type KnownNeuronData = record {
443
448
  name : text;
444
449
  description : opt text;
450
+ links : opt vec text;
445
451
  };
446
452
 
447
453
  type LedgerParameters = record {
@@ -513,12 +519,6 @@ type MakeProposalResponse = record {
513
519
  proposal_id : opt ProposalId;
514
520
  };
515
521
 
516
- type MakingSnsProposal = record {
517
- proposal : opt Proposal;
518
- caller : opt principal;
519
- proposer_id : opt NeuronId;
520
- };
521
-
522
522
  type ManageNeuron = record {
523
523
  id : opt NeuronId;
524
524
  command : opt Command;
@@ -869,6 +869,7 @@ type Proposal = record {
869
869
 
870
870
  type ProposalActionRequest = variant {
871
871
  RegisterKnownNeuron : KnownNeuron;
872
+ DeregisterKnownNeuron : DeregisterKnownNeuron;
872
873
  ManageNeuron : ManageNeuronRequest;
873
874
  UpdateCanisterSettings : UpdateCanisterSettings;
874
875
  InstallCode : InstallCodeRequest;
@@ -900,8 +901,19 @@ type FulfillSubnetRentalRequest = record {
900
901
  //
901
902
  // This must be approved by a prior proposal to bless an IC OS version.
902
903
  //
903
- // This is a full git commit ID in the ic repo. (Therefore, it must be a 40
904
- // character hexidecimal string.)
904
+ // This is a FULL git commit ID in the ic repo. (Therefore, it must be a 40
905
+ // character hexidecimal string, not an abbreviated git commit ID.)
906
+ //
907
+ // One way to find a suitable value is with the following command:
908
+ //
909
+ // ic-admin \
910
+ // get-subnet 0 \
911
+ // --nns-urls https://nns.ic0.app \
912
+ // | grep replica_version_id
913
+ //
914
+ // Where to obtain a recent version of ic-admin:
915
+ //
916
+ // https://github.com/dfinity/ic/releases/latest
905
917
  replica_version_id : opt text;
906
918
  };
907
919
 
@@ -1103,6 +1115,7 @@ type SpawnResponse = record {
1103
1115
 
1104
1116
  type Split = record {
1105
1117
  amount_e8s : nat64;
1118
+ memo : opt nat64;
1106
1119
  };
1107
1120
 
1108
1121
  type StakeMaturity = record {