@dfinity/nns 3.0.0 → 3.1.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.
package/README.md CHANGED
@@ -45,6 +45,27 @@ const { listNeurons } = GovernanceCanister.create({
45
45
  const myNeurons = await listNeurons({ certified: false });
46
46
  ```
47
47
 
48
+ To execute this on a local environment, you will need to fetch the root key when initializing the agent. Additionally, you might need to adapt the port. The following snippet also demonstrates how you can inline a canister ID as well.
49
+
50
+ ```typescript
51
+ import { GovernanceCanister } from "@dfinity/nns";
52
+ import { Principal } from "@dfinity/principal";
53
+ import { createAgent } from "@dfinity/utils";
54
+
55
+ const agent = await createAgent({
56
+ identity,
57
+ host: "http://localhost:8000",
58
+ fetchRootKey: true,
59
+ });
60
+
61
+ const { listNeurons } = GovernanceCanister.create({
62
+ agent,
63
+ canisterId: Principal.fromText("rrkah-fqaaa-aaaaa-aaaaq-cai"),
64
+ });
65
+
66
+ const myNeurons = await listNeurons({ certified: false });
67
+ ```
68
+
48
69
  ## Features
49
70
 
50
71
  `nns-js` implements following features:
@@ -329,7 +350,7 @@ Neuron leaves the community fund
329
350
  | -------------------- | ------------------------------------- |
330
351
  | `leaveCommunityFund` | `(neuronId: bigint) => Promise<void>` |
331
352
 
332
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L501)
353
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L502)
333
354
 
334
355
  ##### :gear: setNodeProviderAccount
335
356
 
@@ -340,7 +361,7 @@ Where the reward is paid to.
340
361
  | ------------------------ | ---------------------------------------------- |
341
362
  | `setNodeProviderAccount` | `(accountIdentifier: string) => Promise<void>` |
342
363
 
343
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L518)
364
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L519)
344
365
 
345
366
  ##### :gear: mergeNeurons
346
367
 
@@ -350,7 +371,7 @@ Merge two neurons
350
371
  | -------------- | --------------------------------------------------------------------------------- |
351
372
  | `mergeNeurons` | `(request: { sourceNeuronId: bigint; targetNeuronId: bigint; }) => Promise<void>` |
352
373
 
353
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L538)
374
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L539)
354
375
 
355
376
  ##### :gear: simulateMergeNeurons
356
377
 
@@ -360,7 +381,7 @@ Simulate merging two neurons
360
381
  | ---------------------- | --------------------------------------------------------------------------------------- |
361
382
  | `simulateMergeNeurons` | `(request: { sourceNeuronId: bigint; targetNeuronId: bigint; }) => Promise<NeuronInfo>` |
362
383
 
363
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L555)
384
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L556)
364
385
 
365
386
  ##### :gear: splitNeuron
366
387
 
@@ -370,7 +391,7 @@ Splits a neuron creating a new one
370
391
  | ------------- | ----------------------------------------------------------------------------------- |
371
392
  | `splitNeuron` | `({ neuronId, amount, }: { neuronId: bigint; amount: bigint; }) => Promise<bigint>` |
372
393
 
373
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L600)
394
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L601)
374
395
 
375
396
  ##### :gear: getProposal
376
397
 
@@ -383,17 +404,17 @@ it is fetched using a query call.
383
404
  | ------------- | ----------------------------------------------------------------------------------------------------- |
384
405
  | `getProposal` | `({ proposalId, certified, }: { proposalId: bigint; certified?: boolean; }) => Promise<ProposalInfo>` |
385
406
 
386
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L640)
407
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L641)
387
408
 
388
409
  ##### :gear: makeProposal
389
410
 
390
411
  Create new proposal
391
412
 
392
- | Method | Type |
393
- | -------------- | ------------------------------------------------- |
394
- | `makeProposal` | `(request: MakeProposalRequest) => Promise<void>` |
413
+ | Method | Type |
414
+ | -------------- | --------------------------------------------------- |
415
+ | `makeProposal` | `(request: MakeProposalRequest) => Promise<bigint>` |
395
416
 
396
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L657)
417
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L659)
397
418
 
398
419
  ##### :gear: registerVote
399
420
 
@@ -403,7 +424,7 @@ Registers vote for a proposal from the neuron passed.
403
424
  | -------------- | ----------------------------------------------------------------------------------------------------------- |
404
425
  | `registerVote` | `({ neuronId, vote, proposalId, }: { neuronId: bigint; vote: Vote; proposalId: bigint; }) => Promise<void>` |
405
426
 
406
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L672)
427
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L680)
407
428
 
408
429
  ##### :gear: setFollowees
409
430
 
@@ -413,7 +434,7 @@ Edit neuron followees per topic
413
434
  | -------------- | ------------------------------------------------- |
414
435
  | `setFollowees` | `(followRequest: FollowRequest) => Promise<void>` |
415
436
 
416
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L694)
437
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L702)
417
438
 
418
439
  ##### :gear: disburse
419
440
 
@@ -423,7 +444,7 @@ Disburse neuron on Account
423
444
  | ---------- | --------------------------------------------------------------------------------------------------------------------- |
424
445
  | `disburse` | `({ neuronId, toAccountId, amount, }: { neuronId: bigint; toAccountId?: string; amount?: bigint; }) => Promise<void>` |
425
446
 
426
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L709)
447
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L717)
427
448
 
428
449
  ##### :gear: mergeMaturity
429
450
 
@@ -433,7 +454,7 @@ Merge Maturity of a neuron
433
454
  | --------------- | ------------------------------------------------------------------------------------------------------- |
434
455
  | `mergeMaturity` | `({ neuronId, percentageToMerge, }: { neuronId: bigint; percentageToMerge: number; }) => Promise<void>` |
435
456
 
436
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L748)
457
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L756)
437
458
 
438
459
  ##### :gear: stakeMaturity
439
460
 
@@ -448,7 +469,7 @@ Parameters:
448
469
  - `neuronId`: The id of the neuron for which to stake the maturity
449
470
  - `percentageToStake`: Optional. Percentage of the current maturity to stake. If not provided, all of the neuron's current maturity will be staked.
450
471
 
451
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L781)
472
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L789)
452
473
 
453
474
  ##### :gear: spawnNeuron
454
475
 
@@ -458,7 +479,7 @@ Merge Maturity of a neuron
458
479
  | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
459
480
  | `spawnNeuron` | `({ neuronId, percentageToSpawn, newController, nonce, }: { neuronId: bigint; percentageToSpawn?: number; newController?: Principal; nonce?: bigint; }) => Promise<bigint>` |
460
481
 
461
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L803)
482
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L811)
462
483
 
463
484
  ##### :gear: addHotkey
464
485
 
@@ -468,7 +489,7 @@ Add hotkey to neuron
468
489
  | ----------- | ------------------------------------------------------------------------------------------ |
469
490
  | `addHotkey` | `({ neuronId, principal, }: { neuronId: bigint; principal: Principal; }) => Promise<void>` |
470
491
 
471
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L857)
492
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L865)
472
493
 
473
494
  ##### :gear: removeHotkey
474
495
 
@@ -478,7 +499,7 @@ Remove hotkey to neuron
478
499
  | -------------- | ------------------------------------------------------------------------------------------ |
479
500
  | `removeHotkey` | `({ neuronId, principal, }: { neuronId: bigint; principal: Principal; }) => Promise<void>` |
480
501
 
481
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L881)
502
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L889)
482
503
 
483
504
  ##### :gear: claimOrRefreshNeuronFromAccount
484
505
 
@@ -488,7 +509,7 @@ Gets the NeuronID of a newly created neuron.
488
509
  | --------------------------------- | --------------------------------------------------------------------------------------- |
489
510
  | `claimOrRefreshNeuronFromAccount` | `({ memo, controller, }: { memo: bigint; controller?: Principal; }) => Promise<bigint>` |
490
511
 
491
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L902)
512
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L910)
492
513
 
493
514
  ##### :gear: claimOrRefreshNeuron
494
515
 
@@ -499,7 +520,7 @@ Uses query call only.
499
520
  | ---------------------- | ----------------------------------------------------------- |
500
521
  | `claimOrRefreshNeuron` | `(request: ClaimOrRefreshNeuronRequest) => Promise<bigint>` |
501
522
 
502
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L933)
523
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L941)
503
524
 
504
525
  ##### :gear: getNeuron
505
526
 
@@ -509,7 +530,7 @@ Return the data of the neuron provided as id.
509
530
  | ----------- | ---------------------------------------------------------------------------------------------- |
510
531
  | `getNeuron` | `({ certified, neuronId, }: { certified: boolean; neuronId: bigint; }) => Promise<NeuronInfo>` |
511
532
 
512
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L984)
533
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L992)
513
534
 
514
535
  ### :factory: SnsWasmCanister
515
536
 
@@ -293,6 +293,14 @@ export const idlFactory = ({ IDL }) => {
293
293
  'caller' : IDL.Opt(IDL.Principal),
294
294
  'proposer_id' : IDL.Opt(NeuronId),
295
295
  });
296
+ const SeedAccount = IDL.Record({
297
+ 'error_count' : IDL.Nat64,
298
+ 'account_id' : IDL.Text,
299
+ 'neuron_type' : IDL.Int32,
300
+ 'tag_end_timestamp_seconds' : IDL.Opt(IDL.Nat64),
301
+ 'tag_start_timestamp_seconds' : IDL.Opt(IDL.Nat64),
302
+ });
303
+ const SeedAccounts = IDL.Record({ 'accounts' : IDL.Vec(SeedAccount) });
296
304
  const MostRecentMonthlyNodeProviderRewards = IDL.Record({
297
305
  'timestamp' : IDL.Nat64,
298
306
  'rewards' : IDL.Vec(RewardNodeProvider),
@@ -311,17 +319,27 @@ export const idlFactory = ({ IDL }) => {
311
319
  'not_dissolving_neurons_count_buckets' : IDL.Vec(
312
320
  IDL.Tuple(IDL.Nat64, IDL.Nat64)
313
321
  ),
322
+ 'ect_neuron_count' : IDL.Nat64,
314
323
  'total_supply_icp' : IDL.Nat64,
315
324
  'neurons_with_less_than_6_months_dissolve_delay_count' : IDL.Nat64,
316
325
  'dissolved_neurons_count' : IDL.Nat64,
317
326
  'community_fund_total_maturity_e8s_equivalent' : IDL.Nat64,
327
+ 'total_staked_e8s_seed' : IDL.Nat64,
328
+ 'total_staked_maturity_e8s_equivalent_ect' : IDL.Nat64,
318
329
  'total_staked_e8s' : IDL.Nat64,
319
330
  'not_dissolving_neurons_count' : IDL.Nat64,
320
331
  'total_locked_e8s' : IDL.Nat64,
321
332
  'neurons_fund_total_active_neurons' : IDL.Nat64,
322
333
  'total_staked_maturity_e8s_equivalent' : IDL.Nat64,
334
+ 'not_dissolving_neurons_e8s_buckets_ect' : IDL.Vec(
335
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
336
+ ),
337
+ 'total_staked_e8s_ect' : IDL.Nat64,
323
338
  'not_dissolving_neurons_staked_maturity_e8s_equivalent_sum' : IDL.Nat64,
324
339
  'dissolved_neurons_e8s' : IDL.Nat64,
340
+ 'dissolving_neurons_e8s_buckets_seed' : IDL.Vec(
341
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
342
+ ),
325
343
  'neurons_with_less_than_6_months_dissolve_delay_e8s' : IDL.Nat64,
326
344
  'not_dissolving_neurons_staked_maturity_e8s_equivalent_buckets' : IDL.Vec(
327
345
  IDL.Tuple(IDL.Nat64, IDL.Float64)
@@ -329,12 +347,20 @@ export const idlFactory = ({ IDL }) => {
329
347
  'dissolving_neurons_count_buckets' : IDL.Vec(
330
348
  IDL.Tuple(IDL.Nat64, IDL.Nat64)
331
349
  ),
350
+ 'dissolving_neurons_e8s_buckets_ect' : IDL.Vec(
351
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
352
+ ),
332
353
  'dissolving_neurons_count' : IDL.Nat64,
333
354
  'dissolving_neurons_e8s_buckets' : IDL.Vec(
334
355
  IDL.Tuple(IDL.Nat64, IDL.Float64)
335
356
  ),
357
+ 'total_staked_maturity_e8s_equivalent_seed' : IDL.Nat64,
336
358
  'community_fund_total_staked_e8s' : IDL.Nat64,
359
+ 'not_dissolving_neurons_e8s_buckets_seed' : IDL.Vec(
360
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
361
+ ),
337
362
  'timestamp_seconds' : IDL.Nat64,
363
+ 'seed_neuron_count' : IDL.Nat64,
338
364
  });
339
365
  const RewardEvent = IDL.Record({
340
366
  'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
@@ -354,6 +380,10 @@ export const idlFactory = ({ IDL }) => {
354
380
  'transfer_timestamp' : IDL.Nat64,
355
381
  'block_height' : IDL.Nat64,
356
382
  });
383
+ const Followers = IDL.Record({ 'followers' : IDL.Vec(NeuronId) });
384
+ const FollowersMap = IDL.Record({
385
+ 'followers_map' : IDL.Vec(IDL.Tuple(IDL.Nat64, Followers)),
386
+ });
357
387
  const Progress = IDL.Variant({ 'LastNeuronId' : NeuronId });
358
388
  const Migration = IDL.Record({
359
389
  'status' : IDL.Opt(IDL.Int32),
@@ -407,6 +437,7 @@ export const idlFactory = ({ IDL }) => {
407
437
  'ideal_matched_participation_function' : IDL.Opt(
408
438
  IdealMatchedParticipationFunction
409
439
  ),
440
+ 'allocated_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
410
441
  });
411
442
  const NeuronsFundData = IDL.Record({
412
443
  'final_neurons_fund_participation' : IDL.Opt(NeuronsFundParticipation),
@@ -499,6 +530,7 @@ export const idlFactory = ({ IDL }) => {
499
530
  'controller' : IDL.Opt(IDL.Principal),
500
531
  'recent_ballots' : IDL.Vec(BallotInfo),
501
532
  'kyc_verified' : IDL.Bool,
533
+ 'neuron_type' : IDL.Opt(IDL.Int32),
502
534
  'not_for_profit' : IDL.Bool,
503
535
  'maturity_e8s_equivalent' : IDL.Nat64,
504
536
  'cached_neuron_stake_e8s' : IDL.Nat64,
@@ -518,6 +550,7 @@ export const idlFactory = ({ IDL }) => {
518
550
  const Governance = IDL.Record({
519
551
  'default_followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
520
552
  'making_sns_proposal' : IDL.Opt(MakingSnsProposal),
553
+ 'seed_accounts' : IDL.Opt(SeedAccounts),
521
554
  'most_recent_monthly_node_provider_rewards' : IDL.Opt(
522
555
  MostRecentMonthlyNodeProviderRewards
523
556
  ),
@@ -534,6 +567,7 @@ export const idlFactory = ({ IDL }) => {
534
567
  'latest_reward_event' : IDL.Opt(RewardEvent),
535
568
  'to_claim_transfers' : IDL.Vec(NeuronStakeTransfer),
536
569
  'short_voting_period_seconds' : IDL.Nat64,
570
+ 'topic_followee_index' : IDL.Vec(IDL.Tuple(IDL.Int32, FollowersMap)),
537
571
  'migrations' : IDL.Opt(Migrations),
538
572
  'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
539
573
  'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
@@ -560,6 +594,7 @@ export const idlFactory = ({ IDL }) => {
560
594
  const NeuronInfo = IDL.Record({
561
595
  'dissolve_delay_seconds' : IDL.Nat64,
562
596
  'recent_ballots' : IDL.Vec(BallotInfo),
597
+ 'neuron_type' : IDL.Opt(IDL.Int32),
563
598
  'created_timestamp_seconds' : IDL.Nat64,
564
599
  'state' : IDL.Int32,
565
600
  'stake_e8s' : IDL.Nat64,
@@ -570,7 +605,22 @@ export const idlFactory = ({ IDL }) => {
570
605
  'age_seconds' : IDL.Nat64,
571
606
  });
572
607
  const Result_5 = IDL.Variant({ 'Ok' : NeuronInfo, 'Err' : GovernanceError });
573
- const Result_6 = IDL.Variant({
608
+ const GetNeuronsFundAuditInfoRequest = IDL.Record({
609
+ 'nns_proposal_id' : IDL.Opt(NeuronId),
610
+ });
611
+ const NeuronsFundAuditInfo = IDL.Record({
612
+ 'final_neurons_fund_participation' : IDL.Opt(NeuronsFundParticipation),
613
+ 'initial_neurons_fund_participation' : IDL.Opt(NeuronsFundParticipation),
614
+ 'neurons_fund_refunds' : IDL.Opt(NeuronsFundSnapshot),
615
+ });
616
+ const Ok = IDL.Record({
617
+ 'neurons_fund_audit_info' : IDL.Opt(NeuronsFundAuditInfo),
618
+ });
619
+ const Result_6 = IDL.Variant({ 'Ok' : Ok, 'Err' : GovernanceError });
620
+ const GetNeuronsFundAuditInfoResponse = IDL.Record({
621
+ 'result' : IDL.Opt(Result_6),
622
+ });
623
+ const Result_7 = IDL.Variant({
574
624
  'Ok' : NodeProvider,
575
625
  'Err' : GovernanceError,
576
626
  });
@@ -662,12 +712,12 @@ export const idlFactory = ({ IDL }) => {
662
712
  'total_neurons_fund_contribution_icp_e8s' : IDL.Opt(IDL.Nat64),
663
713
  'sns_governance_canister_id' : IDL.Opt(IDL.Principal),
664
714
  });
665
- const Result_7 = IDL.Variant({
715
+ const Result_8 = IDL.Variant({
666
716
  'Committed' : Committed,
667
717
  'Aborted' : IDL.Record({}),
668
718
  });
669
719
  const SettleCommunityFundParticipation = IDL.Record({
670
- 'result' : IDL.Opt(Result_7),
720
+ 'result' : IDL.Opt(Result_8),
671
721
  'open_sns_token_swap_proposal_id' : IDL.Opt(IDL.Nat64),
672
722
  });
673
723
  const Committed_1 = IDL.Record({
@@ -675,12 +725,12 @@ export const idlFactory = ({ IDL }) => {
675
725
  'total_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
676
726
  'sns_governance_canister_id' : IDL.Opt(IDL.Principal),
677
727
  });
678
- const Result_8 = IDL.Variant({
728
+ const Result_9 = IDL.Variant({
679
729
  'Committed' : Committed_1,
680
730
  'Aborted' : IDL.Record({}),
681
731
  });
682
732
  const SettleNeuronsFundParticipationRequest = IDL.Record({
683
- 'result' : IDL.Opt(Result_8),
733
+ 'result' : IDL.Opt(Result_9),
684
734
  'nns_proposal_id' : IDL.Opt(IDL.Nat64),
685
735
  });
686
736
  const NeuronsFundNeuron = IDL.Record({
@@ -689,12 +739,12 @@ export const idlFactory = ({ IDL }) => {
689
739
  'nns_neuron_id' : IDL.Opt(IDL.Nat64),
690
740
  'amount_icp_e8s' : IDL.Opt(IDL.Nat64),
691
741
  });
692
- const Ok = IDL.Record({
742
+ const Ok_1 = IDL.Record({
693
743
  'neurons_fund_neuron_portions' : IDL.Vec(NeuronsFundNeuron),
694
744
  });
695
- const Result_9 = IDL.Variant({ 'Ok' : Ok, 'Err' : GovernanceError });
745
+ const Result_10 = IDL.Variant({ 'Ok' : Ok_1, 'Err' : GovernanceError });
696
746
  const SettleNeuronsFundParticipationResponse = IDL.Record({
697
- 'result' : IDL.Opt(Result_9),
747
+ 'result' : IDL.Opt(Result_10),
698
748
  });
699
749
  const UpdateNodeProvider = IDL.Record({
700
750
  'reward_account' : IDL.Opt(AccountIdentifier),
@@ -733,7 +783,12 @@ export const idlFactory = ({ IDL }) => {
733
783
  [Result_5],
734
784
  [],
735
785
  ),
736
- 'get_node_provider_by_caller' : IDL.Func([IDL.Null], [Result_6], []),
786
+ 'get_neurons_fund_audit_info' : IDL.Func(
787
+ [GetNeuronsFundAuditInfoRequest],
788
+ [GetNeuronsFundAuditInfoResponse],
789
+ [],
790
+ ),
791
+ 'get_node_provider_by_caller' : IDL.Func([IDL.Null], [Result_7], []),
737
792
  'get_pending_proposals' : IDL.Func([], [IDL.Vec(ProposalInfo)], []),
738
793
  'get_proposal_info' : IDL.Func([IDL.Nat64], [IDL.Opt(ProposalInfo)], []),
739
794
  'list_known_neurons' : IDL.Func([], [ListKnownNeuronsResponse], []),
@@ -1058,6 +1113,14 @@ export const init = ({ IDL }) => {
1058
1113
  'caller' : IDL.Opt(IDL.Principal),
1059
1114
  'proposer_id' : IDL.Opt(NeuronId),
1060
1115
  });
1116
+ const SeedAccount = IDL.Record({
1117
+ 'error_count' : IDL.Nat64,
1118
+ 'account_id' : IDL.Text,
1119
+ 'neuron_type' : IDL.Int32,
1120
+ 'tag_end_timestamp_seconds' : IDL.Opt(IDL.Nat64),
1121
+ 'tag_start_timestamp_seconds' : IDL.Opt(IDL.Nat64),
1122
+ });
1123
+ const SeedAccounts = IDL.Record({ 'accounts' : IDL.Vec(SeedAccount) });
1061
1124
  const MostRecentMonthlyNodeProviderRewards = IDL.Record({
1062
1125
  'timestamp' : IDL.Nat64,
1063
1126
  'rewards' : IDL.Vec(RewardNodeProvider),
@@ -1076,17 +1139,27 @@ export const init = ({ IDL }) => {
1076
1139
  'not_dissolving_neurons_count_buckets' : IDL.Vec(
1077
1140
  IDL.Tuple(IDL.Nat64, IDL.Nat64)
1078
1141
  ),
1142
+ 'ect_neuron_count' : IDL.Nat64,
1079
1143
  'total_supply_icp' : IDL.Nat64,
1080
1144
  'neurons_with_less_than_6_months_dissolve_delay_count' : IDL.Nat64,
1081
1145
  'dissolved_neurons_count' : IDL.Nat64,
1082
1146
  'community_fund_total_maturity_e8s_equivalent' : IDL.Nat64,
1147
+ 'total_staked_e8s_seed' : IDL.Nat64,
1148
+ 'total_staked_maturity_e8s_equivalent_ect' : IDL.Nat64,
1083
1149
  'total_staked_e8s' : IDL.Nat64,
1084
1150
  'not_dissolving_neurons_count' : IDL.Nat64,
1085
1151
  'total_locked_e8s' : IDL.Nat64,
1086
1152
  'neurons_fund_total_active_neurons' : IDL.Nat64,
1087
1153
  'total_staked_maturity_e8s_equivalent' : IDL.Nat64,
1154
+ 'not_dissolving_neurons_e8s_buckets_ect' : IDL.Vec(
1155
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
1156
+ ),
1157
+ 'total_staked_e8s_ect' : IDL.Nat64,
1088
1158
  'not_dissolving_neurons_staked_maturity_e8s_equivalent_sum' : IDL.Nat64,
1089
1159
  'dissolved_neurons_e8s' : IDL.Nat64,
1160
+ 'dissolving_neurons_e8s_buckets_seed' : IDL.Vec(
1161
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
1162
+ ),
1090
1163
  'neurons_with_less_than_6_months_dissolve_delay_e8s' : IDL.Nat64,
1091
1164
  'not_dissolving_neurons_staked_maturity_e8s_equivalent_buckets' : IDL.Vec(
1092
1165
  IDL.Tuple(IDL.Nat64, IDL.Float64)
@@ -1094,12 +1167,20 @@ export const init = ({ IDL }) => {
1094
1167
  'dissolving_neurons_count_buckets' : IDL.Vec(
1095
1168
  IDL.Tuple(IDL.Nat64, IDL.Nat64)
1096
1169
  ),
1170
+ 'dissolving_neurons_e8s_buckets_ect' : IDL.Vec(
1171
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
1172
+ ),
1097
1173
  'dissolving_neurons_count' : IDL.Nat64,
1098
1174
  'dissolving_neurons_e8s_buckets' : IDL.Vec(
1099
1175
  IDL.Tuple(IDL.Nat64, IDL.Float64)
1100
1176
  ),
1177
+ 'total_staked_maturity_e8s_equivalent_seed' : IDL.Nat64,
1101
1178
  'community_fund_total_staked_e8s' : IDL.Nat64,
1179
+ 'not_dissolving_neurons_e8s_buckets_seed' : IDL.Vec(
1180
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
1181
+ ),
1102
1182
  'timestamp_seconds' : IDL.Nat64,
1183
+ 'seed_neuron_count' : IDL.Nat64,
1103
1184
  });
1104
1185
  const RewardEvent = IDL.Record({
1105
1186
  'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
@@ -1119,6 +1200,10 @@ export const init = ({ IDL }) => {
1119
1200
  'transfer_timestamp' : IDL.Nat64,
1120
1201
  'block_height' : IDL.Nat64,
1121
1202
  });
1203
+ const Followers = IDL.Record({ 'followers' : IDL.Vec(NeuronId) });
1204
+ const FollowersMap = IDL.Record({
1205
+ 'followers_map' : IDL.Vec(IDL.Tuple(IDL.Nat64, Followers)),
1206
+ });
1122
1207
  const Progress = IDL.Variant({ 'LastNeuronId' : NeuronId });
1123
1208
  const Migration = IDL.Record({
1124
1209
  'status' : IDL.Opt(IDL.Int32),
@@ -1172,6 +1257,7 @@ export const init = ({ IDL }) => {
1172
1257
  'ideal_matched_participation_function' : IDL.Opt(
1173
1258
  IdealMatchedParticipationFunction
1174
1259
  ),
1260
+ 'allocated_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
1175
1261
  });
1176
1262
  const NeuronsFundData = IDL.Record({
1177
1263
  'final_neurons_fund_participation' : IDL.Opt(NeuronsFundParticipation),
@@ -1264,6 +1350,7 @@ export const init = ({ IDL }) => {
1264
1350
  'controller' : IDL.Opt(IDL.Principal),
1265
1351
  'recent_ballots' : IDL.Vec(BallotInfo),
1266
1352
  'kyc_verified' : IDL.Bool,
1353
+ 'neuron_type' : IDL.Opt(IDL.Int32),
1267
1354
  'not_for_profit' : IDL.Bool,
1268
1355
  'maturity_e8s_equivalent' : IDL.Nat64,
1269
1356
  'cached_neuron_stake_e8s' : IDL.Nat64,
@@ -1283,6 +1370,7 @@ export const init = ({ IDL }) => {
1283
1370
  const Governance = IDL.Record({
1284
1371
  'default_followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
1285
1372
  'making_sns_proposal' : IDL.Opt(MakingSnsProposal),
1373
+ 'seed_accounts' : IDL.Opt(SeedAccounts),
1286
1374
  'most_recent_monthly_node_provider_rewards' : IDL.Opt(
1287
1375
  MostRecentMonthlyNodeProviderRewards
1288
1376
  ),
@@ -1299,6 +1387,7 @@ export const init = ({ IDL }) => {
1299
1387
  'latest_reward_event' : IDL.Opt(RewardEvent),
1300
1388
  'to_claim_transfers' : IDL.Vec(NeuronStakeTransfer),
1301
1389
  'short_voting_period_seconds' : IDL.Nat64,
1390
+ 'topic_followee_index' : IDL.Vec(IDL.Tuple(IDL.Int32, FollowersMap)),
1302
1391
  'migrations' : IDL.Opt(Migrations),
1303
1392
  'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
1304
1393
  'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
@@ -186,12 +186,25 @@ export interface Follow {
186
186
  export interface Followees {
187
187
  followees: Array<NeuronId>;
188
188
  }
189
+ export interface Followers {
190
+ followers: Array<NeuronId>;
191
+ }
192
+ export interface FollowersMap {
193
+ followers_map: Array<[bigint, Followers]>;
194
+ }
195
+ export interface GetNeuronsFundAuditInfoRequest {
196
+ nns_proposal_id: [] | [NeuronId];
197
+ }
198
+ export interface GetNeuronsFundAuditInfoResponse {
199
+ result: [] | [Result_6];
200
+ }
189
201
  export interface GlobalTimeOfDay {
190
202
  seconds_after_utc_midnight: [] | [bigint];
191
203
  }
192
204
  export interface Governance {
193
205
  default_followees: Array<[number, Followees]>;
194
206
  making_sns_proposal: [] | [MakingSnsProposal];
207
+ seed_accounts: [] | [SeedAccounts];
195
208
  most_recent_monthly_node_provider_rewards:
196
209
  | []
197
210
  | [MostRecentMonthlyNodeProviderRewards];
@@ -206,6 +219,7 @@ export interface Governance {
206
219
  latest_reward_event: [] | [RewardEvent];
207
220
  to_claim_transfers: Array<NeuronStakeTransfer>;
208
221
  short_voting_period_seconds: bigint;
222
+ topic_followee_index: Array<[number, FollowersMap]>;
209
223
  migrations: [] | [Migrations];
210
224
  proposals: Array<[bigint, ProposalData]>;
211
225
  in_flight_commands: Array<[bigint, NeuronInFlightCommand]>;
@@ -222,26 +236,36 @@ export interface GovernanceCachedMetrics {
222
236
  >;
223
237
  neurons_with_invalid_stake_count: bigint;
224
238
  not_dissolving_neurons_count_buckets: Array<[bigint, bigint]>;
239
+ ect_neuron_count: bigint;
225
240
  total_supply_icp: bigint;
226
241
  neurons_with_less_than_6_months_dissolve_delay_count: bigint;
227
242
  dissolved_neurons_count: bigint;
228
243
  community_fund_total_maturity_e8s_equivalent: bigint;
244
+ total_staked_e8s_seed: bigint;
245
+ total_staked_maturity_e8s_equivalent_ect: bigint;
229
246
  total_staked_e8s: bigint;
230
247
  not_dissolving_neurons_count: bigint;
231
248
  total_locked_e8s: bigint;
232
249
  neurons_fund_total_active_neurons: bigint;
233
250
  total_staked_maturity_e8s_equivalent: bigint;
251
+ not_dissolving_neurons_e8s_buckets_ect: Array<[bigint, number]>;
252
+ total_staked_e8s_ect: bigint;
234
253
  not_dissolving_neurons_staked_maturity_e8s_equivalent_sum: bigint;
235
254
  dissolved_neurons_e8s: bigint;
255
+ dissolving_neurons_e8s_buckets_seed: Array<[bigint, number]>;
236
256
  neurons_with_less_than_6_months_dissolve_delay_e8s: bigint;
237
257
  not_dissolving_neurons_staked_maturity_e8s_equivalent_buckets: Array<
238
258
  [bigint, number]
239
259
  >;
240
260
  dissolving_neurons_count_buckets: Array<[bigint, bigint]>;
261
+ dissolving_neurons_e8s_buckets_ect: Array<[bigint, number]>;
241
262
  dissolving_neurons_count: bigint;
242
263
  dissolving_neurons_e8s_buckets: Array<[bigint, number]>;
264
+ total_staked_maturity_e8s_equivalent_seed: bigint;
243
265
  community_fund_total_staked_e8s: bigint;
266
+ not_dissolving_neurons_e8s_buckets_seed: Array<[bigint, number]>;
244
267
  timestamp_seconds: bigint;
268
+ seed_neuron_count: bigint;
245
269
  }
246
270
  export interface GovernanceError {
247
271
  error_message: string;
@@ -377,6 +401,7 @@ export interface Neuron {
377
401
  controller: [] | [Principal];
378
402
  recent_ballots: Array<BallotInfo>;
379
403
  kyc_verified: boolean;
404
+ neuron_type: [] | [number];
380
405
  not_for_profit: boolean;
381
406
  maturity_e8s_equivalent: bigint;
382
407
  cached_neuron_stake_e8s: bigint;
@@ -421,6 +446,7 @@ export interface NeuronInFlightCommand {
421
446
  export interface NeuronInfo {
422
447
  dissolve_delay_seconds: bigint;
423
448
  recent_ballots: Array<BallotInfo>;
449
+ neuron_type: [] | [number];
424
450
  created_timestamp_seconds: bigint;
425
451
  state: number;
426
452
  stake_e8s: bigint;
@@ -439,6 +465,11 @@ export interface NeuronStakeTransfer {
439
465
  transfer_timestamp: bigint;
440
466
  block_height: bigint;
441
467
  }
468
+ export interface NeuronsFundAuditInfo {
469
+ final_neurons_fund_participation: [] | [NeuronsFundParticipation];
470
+ initial_neurons_fund_participation: [] | [NeuronsFundParticipation];
471
+ neurons_fund_refunds: [] | [NeuronsFundSnapshot];
472
+ }
442
473
  export interface NeuronsFundData {
443
474
  final_neurons_fund_participation: [] | [NeuronsFundParticipation];
444
475
  initial_neurons_fund_participation: [] | [NeuronsFundParticipation];
@@ -467,6 +498,7 @@ export interface NeuronsFundParticipation {
467
498
  ideal_matched_participation_function:
468
499
  | []
469
500
  | [IdealMatchedParticipationFunction];
501
+ allocated_neurons_fund_participation_icp_e8s: [] | [bigint];
470
502
  }
471
503
  export interface NeuronsFundSnapshot {
472
504
  neurons_fund_neuron_portions: Array<NeuronsFundNeuronPortion>;
@@ -476,6 +508,9 @@ export interface NodeProvider {
476
508
  reward_account: [] | [AccountIdentifier];
477
509
  }
478
510
  export interface Ok {
511
+ neurons_fund_audit_info: [] | [NeuronsFundAuditInfo];
512
+ }
513
+ export interface Ok_1 {
479
514
  neurons_fund_neuron_portions: Array<NeuronsFundNeuron>;
480
515
  }
481
516
  export interface OpenSnsTokenSwap {
@@ -566,16 +601,17 @@ export interface RemoveHotKey {
566
601
  }
567
602
  export type Result = { Ok: null } | { Err: GovernanceError };
568
603
  export type Result_1 = { Error: GovernanceError } | { NeuronId: NeuronId };
604
+ export type Result_10 = { Ok: Ok_1 } | { Err: GovernanceError };
569
605
  export type Result_2 = { Ok: Neuron } | { Err: GovernanceError };
570
606
  export type Result_3 =
571
607
  | { Ok: GovernanceCachedMetrics }
572
608
  | { Err: GovernanceError };
573
609
  export type Result_4 = { Ok: RewardNodeProviders } | { Err: GovernanceError };
574
610
  export type Result_5 = { Ok: NeuronInfo } | { Err: GovernanceError };
575
- export type Result_6 = { Ok: NodeProvider } | { Err: GovernanceError };
576
- export type Result_7 = { Committed: Committed } | { Aborted: {} };
577
- export type Result_8 = { Committed: Committed_1 } | { Aborted: {} };
578
- export type Result_9 = { Ok: Ok } | { Err: GovernanceError };
611
+ export type Result_6 = { Ok: Ok } | { Err: GovernanceError };
612
+ export type Result_7 = { Ok: NodeProvider } | { Err: GovernanceError };
613
+ export type Result_8 = { Committed: Committed } | { Aborted: {} };
614
+ export type Result_9 = { Committed: Committed_1 } | { Aborted: {} };
579
615
  export interface RewardEvent {
580
616
  rounds_since_last_distribution: [] | [bigint];
581
617
  day_after_genesis: bigint;
@@ -603,6 +639,16 @@ export interface RewardToAccount {
603
639
  export interface RewardToNeuron {
604
640
  dissolve_delay_seconds: bigint;
605
641
  }
642
+ export interface SeedAccount {
643
+ error_count: bigint;
644
+ account_id: string;
645
+ neuron_type: number;
646
+ tag_end_timestamp_seconds: [] | [bigint];
647
+ tag_start_timestamp_seconds: [] | [bigint];
648
+ }
649
+ export interface SeedAccounts {
650
+ accounts: Array<SeedAccount>;
651
+ }
606
652
  export interface SetDefaultFollowees {
607
653
  default_followees: Array<[number, Followees]>;
608
654
  }
@@ -617,15 +663,15 @@ export interface SetSnsTokenSwapOpenTimeWindow {
617
663
  swap_canister_id: [] | [Principal];
618
664
  }
619
665
  export interface SettleCommunityFundParticipation {
620
- result: [] | [Result_7];
666
+ result: [] | [Result_8];
621
667
  open_sns_token_swap_proposal_id: [] | [bigint];
622
668
  }
623
669
  export interface SettleNeuronsFundParticipationRequest {
624
- result: [] | [Result_8];
670
+ result: [] | [Result_9];
625
671
  nns_proposal_id: [] | [bigint];
626
672
  }
627
673
  export interface SettleNeuronsFundParticipationResponse {
628
- result: [] | [Result_9];
674
+ result: [] | [Result_10];
629
675
  }
630
676
  export interface Spawn {
631
677
  percentage_to_spawn: [] | [number];
@@ -732,7 +778,11 @@ export interface _SERVICE {
732
778
  [NeuronIdOrSubaccount],
733
779
  Result_5
734
780
  >;
735
- get_node_provider_by_caller: ActorMethod<[null], Result_6>;
781
+ get_neurons_fund_audit_info: ActorMethod<
782
+ [GetNeuronsFundAuditInfoRequest],
783
+ GetNeuronsFundAuditInfoResponse
784
+ >;
785
+ get_node_provider_by_caller: ActorMethod<[null], Result_7>;
736
786
  get_pending_proposals: ActorMethod<[], Array<ProposalInfo>>;
737
787
  get_proposal_info: ActorMethod<[bigint], [] | [ProposalInfo]>;
738
788
  list_known_neurons: ActorMethod<[], ListKnownNeuronsResponse>;