@dfinity/nns 10.3.1 → 10.4.0

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.
@@ -262,8 +262,29 @@ export const idlFactory = ({ IDL }) => {
262
262
  'total' : IDL.Nat64,
263
263
  'timestamp_seconds' : IDL.Nat64,
264
264
  });
265
+ const TopicToFollow = IDL.Variant({
266
+ 'Kyc' : IDL.Null,
267
+ 'ServiceNervousSystemManagement' : IDL.Null,
268
+ 'ApiBoundaryNodeManagement' : IDL.Null,
269
+ 'ApplicationCanisterManagement' : IDL.Null,
270
+ 'SubnetRental' : IDL.Null,
271
+ 'NeuronManagement' : IDL.Null,
272
+ 'NodeProviderRewards' : IDL.Null,
273
+ 'SubnetManagement' : IDL.Null,
274
+ 'ExchangeRate' : IDL.Null,
275
+ 'CatchAll' : IDL.Null,
276
+ 'NodeAdmin' : IDL.Null,
277
+ 'IcOsVersionElection' : IDL.Null,
278
+ 'ProtocolCanisterManagement' : IDL.Null,
279
+ 'NetworkEconomics' : IDL.Null,
280
+ 'IcOsVersionDeployment' : IDL.Null,
281
+ 'ParticipantManagement' : IDL.Null,
282
+ 'Governance' : IDL.Null,
283
+ 'SnsAndCommunityFund' : IDL.Null,
284
+ });
265
285
  const KnownNeuronData = IDL.Record({
266
286
  'name' : IDL.Text,
287
+ 'committed_topics' : IDL.Opt(IDL.Vec(IDL.Opt(TopicToFollow))),
267
288
  'description' : IDL.Opt(IDL.Text),
268
289
  'links' : IDL.Opt(IDL.Vec(IDL.Text)),
269
290
  });
@@ -706,6 +727,10 @@ export const idlFactory = ({ IDL }) => {
706
727
  'Ok' : MonthlyNodeProviderRewards,
707
728
  'Err' : GovernanceError,
708
729
  });
730
+ const GetNeuronIndexRequest = IDL.Record({
731
+ 'page_size' : IDL.Opt(IDL.Nat32),
732
+ 'exclusive_start_neuron_id' : IDL.Opt(NeuronId),
733
+ });
709
734
  const NeuronInfo = IDL.Record({
710
735
  'dissolve_delay_seconds' : IDL.Nat64,
711
736
  'recent_ballots' : IDL.Vec(BallotInfo),
@@ -723,6 +748,11 @@ export const idlFactory = ({ IDL }) => {
723
748
  'voting_power' : IDL.Nat64,
724
749
  'age_seconds' : IDL.Nat64,
725
750
  });
751
+ const NeuronIndexData = IDL.Record({ 'neurons' : IDL.Vec(NeuronInfo) });
752
+ const GetNeuronIndexResult = IDL.Variant({
753
+ 'Ok' : NeuronIndexData,
754
+ 'Err' : GovernanceError,
755
+ });
726
756
  const Result_5 = IDL.Variant({ 'Ok' : NeuronInfo, 'Err' : GovernanceError });
727
757
  const GetNeuronsFundAuditInfoRequest = IDL.Record({
728
758
  'nns_proposal_id' : IDL.Opt(ProposalId),
@@ -978,6 +1008,11 @@ export const idlFactory = ({ IDL }) => {
978
1008
  ),
979
1009
  'get_network_economics_parameters' : IDL.Func([], [NetworkEconomics], []),
980
1010
  'get_neuron_ids' : IDL.Func([], [IDL.Vec(IDL.Nat64)], []),
1011
+ 'get_neuron_index' : IDL.Func(
1012
+ [GetNeuronIndexRequest],
1013
+ [GetNeuronIndexResult],
1014
+ [],
1015
+ ),
981
1016
  'get_neuron_info' : IDL.Func([IDL.Nat64], [Result_5], []),
982
1017
  'get_neuron_info_by_id_or_subaccount' : IDL.Func(
983
1018
  [NeuronIdOrSubaccount],
@@ -1293,8 +1328,29 @@ export const init = ({ IDL }) => {
1293
1328
  'total' : IDL.Nat64,
1294
1329
  'timestamp_seconds' : IDL.Nat64,
1295
1330
  });
1331
+ const TopicToFollow = IDL.Variant({
1332
+ 'Kyc' : IDL.Null,
1333
+ 'ServiceNervousSystemManagement' : IDL.Null,
1334
+ 'ApiBoundaryNodeManagement' : IDL.Null,
1335
+ 'ApplicationCanisterManagement' : IDL.Null,
1336
+ 'SubnetRental' : IDL.Null,
1337
+ 'NeuronManagement' : IDL.Null,
1338
+ 'NodeProviderRewards' : IDL.Null,
1339
+ 'SubnetManagement' : IDL.Null,
1340
+ 'ExchangeRate' : IDL.Null,
1341
+ 'CatchAll' : IDL.Null,
1342
+ 'NodeAdmin' : IDL.Null,
1343
+ 'IcOsVersionElection' : IDL.Null,
1344
+ 'ProtocolCanisterManagement' : IDL.Null,
1345
+ 'NetworkEconomics' : IDL.Null,
1346
+ 'IcOsVersionDeployment' : IDL.Null,
1347
+ 'ParticipantManagement' : IDL.Null,
1348
+ 'Governance' : IDL.Null,
1349
+ 'SnsAndCommunityFund' : IDL.Null,
1350
+ });
1296
1351
  const KnownNeuronData = IDL.Record({
1297
1352
  'name' : IDL.Text,
1353
+ 'committed_topics' : IDL.Opt(IDL.Vec(IDL.Opt(TopicToFollow))),
1298
1354
  'description' : IDL.Opt(IDL.Text),
1299
1355
  'links' : IDL.Opt(IDL.Vec(IDL.Text)),
1300
1356
  });
@@ -267,6 +267,13 @@ export interface FulfillSubnetRentalRequest {
267
267
  */
268
268
  node_ids: [] | [Array<Principal>];
269
269
  }
270
+ export interface GetNeuronIndexRequest {
271
+ page_size: [] | [number];
272
+ exclusive_start_neuron_id: [] | [NeuronId];
273
+ }
274
+ export type GetNeuronIndexResult =
275
+ | { Ok: NeuronIndexData }
276
+ | { Err: GovernanceError };
270
277
  export interface GetNeuronsFundAuditInfoRequest {
271
278
  nns_proposal_id: [] | [ProposalId];
272
279
  }
@@ -397,6 +404,12 @@ export interface KnownNeuron {
397
404
  }
398
405
  export interface KnownNeuronData {
399
406
  name: string;
407
+ /**
408
+ * The first `opt` makes it so that the field can be renamed/deprecated in the future, and
409
+ * the second `opt` makes it so that an older client not recognizing a new variant can still
410
+ * get the rest of the `vec`.
411
+ */
412
+ committed_topics: [] | [Array<[] | [TopicToFollow]>];
400
413
  description: [] | [string];
401
414
  links: [] | [Array<string>];
402
415
  }
@@ -701,6 +714,9 @@ export interface NeuronInFlightCommand {
701
714
  command: [] | [Command_2];
702
715
  timestamp: bigint;
703
716
  }
717
+ export interface NeuronIndexData {
718
+ neurons: Array<NeuronInfo>;
719
+ }
704
720
  /**
705
721
  * A limit view of Neuron that allows some aspects of all neurons to be read by
706
722
  * anyone (i.e. without having to be the neuron's controller nor one of its
@@ -1106,6 +1122,31 @@ export interface TimeWindow {
1106
1122
  export interface Tokens {
1107
1123
  e8s: [] | [bigint];
1108
1124
  }
1125
+ /**
1126
+ * A topic that can be followed. It is almost the same as the topic on the
1127
+ * proposal, except that the `CatchAll` is a special value and following on this
1128
+ * `topic` will let the neuron follow the votes on all topics except for
1129
+ * Governance and SnsAndCommunityFund.
1130
+ */
1131
+ export type TopicToFollow =
1132
+ | { Kyc: null }
1133
+ | { ServiceNervousSystemManagement: null }
1134
+ | { ApiBoundaryNodeManagement: null }
1135
+ | { ApplicationCanisterManagement: null }
1136
+ | { SubnetRental: null }
1137
+ | { NeuronManagement: null }
1138
+ | { NodeProviderRewards: null }
1139
+ | { SubnetManagement: null }
1140
+ | { ExchangeRate: null }
1141
+ | { CatchAll: null }
1142
+ | { NodeAdmin: null }
1143
+ | { IcOsVersionElection: null }
1144
+ | { ProtocolCanisterManagement: null }
1145
+ | { NetworkEconomics: null }
1146
+ | { IcOsVersionDeployment: null }
1147
+ | { ParticipantManagement: null }
1148
+ | { Governance: null }
1149
+ | { SnsAndCommunityFund: null };
1109
1150
  export interface UpdateCanisterSettings {
1110
1151
  canister_id: [] | [Principal];
1111
1152
  settings: [] | [CanisterSettings];
@@ -1183,6 +1224,7 @@ export interface _SERVICE {
1183
1224
  >;
1184
1225
  get_network_economics_parameters: ActorMethod<[], NetworkEconomics>;
1185
1226
  get_neuron_ids: ActorMethod<[], BigUint64Array | bigint[]>;
1227
+ get_neuron_index: ActorMethod<[GetNeuronIndexRequest], GetNeuronIndexResult>;
1186
1228
  get_neuron_info: ActorMethod<[bigint], Result_5>;
1187
1229
  get_neuron_info_by_id_or_subaccount: ActorMethod<
1188
1230
  [NeuronIdOrSubaccount],
@@ -1,4 +1,4 @@
1
- // Generated from IC repo commit 285897d (2025-10-08 tags: release-2025-10-09_03-15-base) 'packages/nns/candid/governance_test.did.tmp' by import-candid
1
+ // Generated from IC repo commit c211885f7c (2025-10-09) 'packages/nns/candid/governance_test.did.tmp' by import-candid
2
2
 
3
3
  type AccountIdentifier = record {
4
4
  hash : blob;
@@ -451,6 +451,10 @@ type KnownNeuronData = record {
451
451
  name : text;
452
452
  description : opt text;
453
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;
454
458
  };
455
459
 
456
460
  type LedgerParameters = record {
@@ -793,6 +797,20 @@ type NeuronInFlightCommand = record {
793
797
  timestamp : nat64;
794
798
  };
795
799
 
800
+ type GetNeuronIndexRequest = record {
801
+ exclusive_start_neuron_id: opt NeuronId;
802
+ page_size: opt nat32;
803
+ };
804
+
805
+ type NeuronIndexData = record {
806
+ neurons: vec NeuronInfo;
807
+ };
808
+
809
+ type GetNeuronIndexResult = variant {
810
+ Ok : NeuronIndexData;
811
+ Err : GovernanceError;
812
+ };
813
+
796
814
  // A limit view of Neuron that allows some aspects of all neurons to be read by
797
815
  // anyone (i.e. without having to be the neuron's controller nor one of its
798
816
  // hotkeys).
@@ -1335,6 +1353,31 @@ type MaturityDisbursement = record {
1335
1353
  account_identifier_to_disburse_to : opt AccountIdentifier;
1336
1354
  };
1337
1355
 
1356
+ // A topic that can be followed. It is almost the same as the topic on the
1357
+ // proposal, except that the `CatchAll` is a special value and following on this
1358
+ // `topic` will let the neuron follow the votes on all topics except for
1359
+ // Governance and SnsAndCommunityFund.
1360
+ type TopicToFollow = variant {
1361
+ CatchAll;
1362
+ NeuronManagement;
1363
+ ExchangeRate;
1364
+ NetworkEconomics;
1365
+ Governance;
1366
+ NodeAdmin;
1367
+ ParticipantManagement;
1368
+ SubnetManagement;
1369
+ Kyc;
1370
+ NodeProviderRewards;
1371
+ IcOsVersionDeployment;
1372
+ IcOsVersionElection;
1373
+ SnsAndCommunityFund;
1374
+ ApiBoundaryNodeManagement;
1375
+ SubnetRental;
1376
+ ApplicationCanisterManagement;
1377
+ ProtocolCanisterManagement;
1378
+ ServiceNervousSystemManagement;
1379
+ };
1380
+
1338
1381
  service : (Governance) -> {
1339
1382
  claim_gtc_neurons : (principal, vec NeuronId) -> (Result);
1340
1383
  claim_or_refresh_neuron_from_account : (ClaimOrRefreshNeuronFromAccount) -> (
@@ -1353,6 +1396,7 @@ service : (Governance) -> {
1353
1396
  ) query;
1354
1397
  get_network_economics_parameters : () -> (NetworkEconomics) query;
1355
1398
  get_neuron_ids : () -> (vec nat64) query;
1399
+ get_neuron_index: (GetNeuronIndexRequest) -> (GetNeuronIndexResult) query;
1356
1400
  get_neuron_info : (nat64) -> (Result_5) query;
1357
1401
  get_neuron_info_by_id_or_subaccount : (NeuronIdOrSubaccount) -> (
1358
1402
  Result_5,
@@ -262,8 +262,29 @@ export const idlFactory = ({ IDL }) => {
262
262
  'total' : IDL.Nat64,
263
263
  'timestamp_seconds' : IDL.Nat64,
264
264
  });
265
+ const TopicToFollow = IDL.Variant({
266
+ 'Kyc' : IDL.Null,
267
+ 'ServiceNervousSystemManagement' : IDL.Null,
268
+ 'ApiBoundaryNodeManagement' : IDL.Null,
269
+ 'ApplicationCanisterManagement' : IDL.Null,
270
+ 'SubnetRental' : IDL.Null,
271
+ 'NeuronManagement' : IDL.Null,
272
+ 'NodeProviderRewards' : IDL.Null,
273
+ 'SubnetManagement' : IDL.Null,
274
+ 'ExchangeRate' : IDL.Null,
275
+ 'CatchAll' : IDL.Null,
276
+ 'NodeAdmin' : IDL.Null,
277
+ 'IcOsVersionElection' : IDL.Null,
278
+ 'ProtocolCanisterManagement' : IDL.Null,
279
+ 'NetworkEconomics' : IDL.Null,
280
+ 'IcOsVersionDeployment' : IDL.Null,
281
+ 'ParticipantManagement' : IDL.Null,
282
+ 'Governance' : IDL.Null,
283
+ 'SnsAndCommunityFund' : IDL.Null,
284
+ });
265
285
  const KnownNeuronData = IDL.Record({
266
286
  'name' : IDL.Text,
287
+ 'committed_topics' : IDL.Opt(IDL.Vec(IDL.Opt(TopicToFollow))),
267
288
  'description' : IDL.Opt(IDL.Text),
268
289
  'links' : IDL.Opt(IDL.Vec(IDL.Text)),
269
290
  });
@@ -706,6 +727,10 @@ export const idlFactory = ({ IDL }) => {
706
727
  'Ok' : MonthlyNodeProviderRewards,
707
728
  'Err' : GovernanceError,
708
729
  });
730
+ const GetNeuronIndexRequest = IDL.Record({
731
+ 'page_size' : IDL.Opt(IDL.Nat32),
732
+ 'exclusive_start_neuron_id' : IDL.Opt(NeuronId),
733
+ });
709
734
  const NeuronInfo = IDL.Record({
710
735
  'dissolve_delay_seconds' : IDL.Nat64,
711
736
  'recent_ballots' : IDL.Vec(BallotInfo),
@@ -723,6 +748,11 @@ export const idlFactory = ({ IDL }) => {
723
748
  'voting_power' : IDL.Nat64,
724
749
  'age_seconds' : IDL.Nat64,
725
750
  });
751
+ const NeuronIndexData = IDL.Record({ 'neurons' : IDL.Vec(NeuronInfo) });
752
+ const GetNeuronIndexResult = IDL.Variant({
753
+ 'Ok' : NeuronIndexData,
754
+ 'Err' : GovernanceError,
755
+ });
726
756
  const Result_5 = IDL.Variant({ 'Ok' : NeuronInfo, 'Err' : GovernanceError });
727
757
  const GetNeuronsFundAuditInfoRequest = IDL.Record({
728
758
  'nns_proposal_id' : IDL.Opt(ProposalId),
@@ -982,6 +1012,11 @@ export const idlFactory = ({ IDL }) => {
982
1012
  ['query'],
983
1013
  ),
984
1014
  'get_neuron_ids' : IDL.Func([], [IDL.Vec(IDL.Nat64)], ['query']),
1015
+ 'get_neuron_index' : IDL.Func(
1016
+ [GetNeuronIndexRequest],
1017
+ [GetNeuronIndexResult],
1018
+ ['query'],
1019
+ ),
985
1020
  'get_neuron_info' : IDL.Func([IDL.Nat64], [Result_5], ['query']),
986
1021
  'get_neuron_info_by_id_or_subaccount' : IDL.Func(
987
1022
  [NeuronIdOrSubaccount],
@@ -1309,8 +1344,29 @@ export const init = ({ IDL }) => {
1309
1344
  'total' : IDL.Nat64,
1310
1345
  'timestamp_seconds' : IDL.Nat64,
1311
1346
  });
1347
+ const TopicToFollow = IDL.Variant({
1348
+ 'Kyc' : IDL.Null,
1349
+ 'ServiceNervousSystemManagement' : IDL.Null,
1350
+ 'ApiBoundaryNodeManagement' : IDL.Null,
1351
+ 'ApplicationCanisterManagement' : IDL.Null,
1352
+ 'SubnetRental' : IDL.Null,
1353
+ 'NeuronManagement' : IDL.Null,
1354
+ 'NodeProviderRewards' : IDL.Null,
1355
+ 'SubnetManagement' : IDL.Null,
1356
+ 'ExchangeRate' : IDL.Null,
1357
+ 'CatchAll' : IDL.Null,
1358
+ 'NodeAdmin' : IDL.Null,
1359
+ 'IcOsVersionElection' : IDL.Null,
1360
+ 'ProtocolCanisterManagement' : IDL.Null,
1361
+ 'NetworkEconomics' : IDL.Null,
1362
+ 'IcOsVersionDeployment' : IDL.Null,
1363
+ 'ParticipantManagement' : IDL.Null,
1364
+ 'Governance' : IDL.Null,
1365
+ 'SnsAndCommunityFund' : IDL.Null,
1366
+ });
1312
1367
  const KnownNeuronData = IDL.Record({
1313
1368
  'name' : IDL.Text,
1369
+ 'committed_topics' : IDL.Opt(IDL.Vec(IDL.Opt(TopicToFollow))),
1314
1370
  'description' : IDL.Opt(IDL.Text),
1315
1371
  'links' : IDL.Opt(IDL.Vec(IDL.Text)),
1316
1372
  });
@@ -1,4 +1,4 @@
1
- // Generated from IC repo commit 285897d (2025-10-08 tags: release-2025-10-09_03-15-base) 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid
1
+ // Generated from IC repo commit c211885f7c (2025-10-09) 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid
2
2
 
3
3
  type AddWasmRequest = record {
4
4
  hash : blob;