@dfinity/nns 8.4.1 → 8.5.0-beta-2025-06-26

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 (35) hide show
  1. package/README.md +60 -38
  2. package/dist/candid/genesis_token.did +1 -1
  3. package/dist/candid/governance.certified.idl.js +45 -2
  4. package/dist/candid/governance.d.ts +21 -0
  5. package/dist/candid/governance.did +30 -1
  6. package/dist/candid/governance.idl.js +45 -2
  7. package/dist/candid/governance_test.certified.idl.js +45 -2
  8. package/dist/candid/governance_test.d.ts +21 -0
  9. package/dist/candid/governance_test.did +27 -1
  10. package/dist/candid/governance_test.idl.js +45 -2
  11. package/dist/candid/sns_wasm.did +1 -1
  12. package/dist/cjs/index.cjs.js +2 -1
  13. package/dist/cjs/index.cjs.js.map +4 -4
  14. package/dist/esm/chunk-5GLUU6KD.js +8 -0
  15. package/dist/esm/chunk-5GLUU6KD.js.map +7 -0
  16. package/dist/esm/{chunk-UZGLNEQP.js → chunk-GJ7FSPCW.js} +2 -2
  17. package/dist/esm/{chunk-UZGLNEQP.js.map → chunk-GJ7FSPCW.js.map} +2 -2
  18. package/dist/esm/{chunk-GQ6HQ3NJ.js → chunk-LT33VVWB.js} +2 -2
  19. package/dist/esm/{chunk-GQ6HQ3NJ.js.map → chunk-LT33VVWB.js.map} +2 -2
  20. package/dist/esm/chunk-W6BBRGPQ.js +2 -0
  21. package/dist/esm/{chunk-IIFH2XLR.js.map → chunk-W6BBRGPQ.js.map} +1 -1
  22. package/dist/esm/genesis_token.canister.js +1 -1
  23. package/dist/esm/governance.canister.js +1 -1
  24. package/dist/esm/index.js +1 -1
  25. package/dist/esm/index.js.map +3 -3
  26. package/dist/esm/sns_wasm.canister.js +1 -1
  27. package/dist/types/canisters/governance/request.converters.d.ts +10 -4
  28. package/dist/types/governance.canister.d.ts +20 -3
  29. package/dist/types/index.d.ts +1 -0
  30. package/dist/types/types/governance_converters.d.ts +20 -0
  31. package/dist/types/utils/account_identifier.utils.d.ts +5 -0
  32. package/package.json +9 -12
  33. package/dist/esm/chunk-IIFH2XLR.js +0 -2
  34. package/dist/esm/chunk-ZA4DZTQU.js +0 -19
  35. package/dist/esm/chunk-ZA4DZTQU.js.map +0 -7
package/README.md CHANGED
@@ -176,7 +176,7 @@ Parameters:
176
176
 
177
177
  ### :factory: GovernanceCanister
178
178
 
179
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L93)
179
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L97)
180
180
 
181
181
  #### Static Methods
182
182
 
@@ -188,7 +188,7 @@ Parameters:
188
188
  | -------- | ------------------------------------------------------------- |
189
189
  | `create` | `(options?: GovernanceCanisterOptions) => GovernanceCanister` |
190
190
 
191
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L108)
191
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L112)
192
192
 
193
193
  #### Methods
194
194
 
@@ -225,6 +225,7 @@ Parameters:
225
225
  - [getNeuron](#gear-getneuron)
226
226
  - [getNetworkEconomicsParameters](#gear-getnetworkeconomicsparameters)
227
227
  - [disburseMaturity](#gear-disbursematurity)
228
+ - [setFollowing](#gear-setfollowing)
228
229
 
229
230
  ##### :gear: listNeurons
230
231
 
@@ -244,7 +245,7 @@ combined into a single return value.
244
245
  | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
245
246
  | `listNeurons` | `({ certified, neuronIds, includeEmptyNeurons, includePublicNeurons, neuronSubaccounts, }: { certified: boolean; neuronIds?: bigint[] or undefined; includeEmptyNeurons?: boolean or undefined; includePublicNeurons?: boolean or undefined; neuronSubaccounts?: NeuronSubaccount[] or undefined; }) => Promise<...>` |
246
247
 
247
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L151)
248
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L155)
248
249
 
249
250
  ##### :gear: listKnownNeurons
250
251
 
@@ -258,7 +259,7 @@ it is fetched using a query call.
258
259
  | ------------------ | ------------------------------------------------- |
259
260
  | `listKnownNeurons` | `(certified?: boolean) => Promise<KnownNeuron[]>` |
260
261
 
261
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L279)
262
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L288)
262
263
 
263
264
  ##### :gear: getLastestRewardEvent
264
265
 
@@ -271,7 +272,7 @@ it's fetched using a query call.
271
272
  | ----------------------- | ----------------------------------------------- |
272
273
  | `getLastestRewardEvent` | `(certified?: boolean) => Promise<RewardEvent>` |
273
274
 
274
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L301)
275
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L310)
275
276
 
276
277
  ##### :gear: listProposals
277
278
 
@@ -290,7 +291,7 @@ Parameters:
290
291
  - `request`: the options to list the proposals (limit number of results, topics to search for, etc.)
291
292
  - `certified`: query or update calls
292
293
 
293
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L317)
294
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L323)
294
295
 
295
296
  ##### :gear: stakeNeuron
296
297
 
@@ -298,7 +299,7 @@ Parameters:
298
299
  | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
299
300
  | `stakeNeuron` | `({ stake, principal, fromSubAccount, ledgerCanister, createdAt, fee, }: { stake: bigint; principal: Principal; fromSubAccount?: number[] or undefined; ledgerCanister: LedgerCanister; createdAt?: bigint or undefined; fee?: bigint or undefined; }) => Promise<...>` |
300
301
 
301
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L336)
302
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L342)
302
303
 
303
304
  ##### :gear: increaseDissolveDelay
304
305
 
@@ -308,7 +309,7 @@ Increases dissolve delay of a neuron
308
309
  | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
309
310
  | `increaseDissolveDelay` | `({ neuronId, additionalDissolveDelaySeconds, }: { neuronId: bigint; additionalDissolveDelaySeconds: number; }) => Promise<void>` |
310
311
 
311
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L397)
312
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L403)
312
313
 
313
314
  ##### :gear: setDissolveDelay
314
315
 
@@ -319,7 +320,7 @@ The new date is now + dissolveDelaySeconds.
319
320
  | ------------------ | ------------------------------------------------------------------------------------------------------------- |
320
321
  | `setDissolveDelay` | `({ neuronId, dissolveDelaySeconds, }: { neuronId: bigint; dissolveDelaySeconds: number; }) => Promise<void>` |
321
322
 
322
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L423)
323
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L429)
323
324
 
324
325
  ##### :gear: startDissolving
325
326
 
@@ -329,7 +330,7 @@ Start dissolving process of a neuron
329
330
  | ----------------- | ------------------------------------- |
330
331
  | `startDissolving` | `(neuronId: bigint) => Promise<void>` |
331
332
 
332
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L446)
333
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L452)
333
334
 
334
335
  ##### :gear: stopDissolving
335
336
 
@@ -339,7 +340,7 @@ Stop dissolving process of a neuron
339
340
  | ---------------- | ------------------------------------- |
340
341
  | `stopDissolving` | `(neuronId: bigint) => Promise<void>` |
341
342
 
342
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L460)
343
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L466)
343
344
 
344
345
  ##### :gear: joinCommunityFund
345
346
 
@@ -349,7 +350,7 @@ Neuron joins the community fund
349
350
  | ------------------- | ------------------------------------- |
350
351
  | `joinCommunityFund` | `(neuronId: bigint) => Promise<void>` |
351
352
 
352
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L474)
353
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L480)
353
354
 
354
355
  ##### :gear: autoStakeMaturity
355
356
 
@@ -364,7 +365,7 @@ Parameters:
364
365
  - `neuronId`: The id of the neuron for which to request a change of the auto stake feature
365
366
  - `autoStake`: `true` to enable the auto-stake maturity for this neuron, `false` to turn it off
366
367
 
367
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L492)
368
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L498)
368
369
 
369
370
  ##### :gear: leaveCommunityFund
370
371
 
@@ -374,7 +375,7 @@ Neuron leaves the community fund
374
375
  | -------------------- | ------------------------------------- |
375
376
  | `leaveCommunityFund` | `(neuronId: bigint) => Promise<void>` |
376
377
 
377
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L507)
378
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L513)
378
379
 
379
380
  ##### :gear: setVisibility
380
381
 
@@ -384,7 +385,7 @@ Set visibility of a neuron
384
385
  | --------------- | ------------------------------------------------------------------- |
385
386
  | `setVisibility` | `(neuronId: bigint, visibility: NeuronVisibility) => Promise<void>` |
386
387
 
387
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L521)
388
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L528)
388
389
 
389
390
  ##### :gear: setNodeProviderAccount
390
391
 
@@ -395,7 +396,7 @@ Where the reward is paid to.
395
396
  | ------------------------ | ---------------------------------------------- |
396
397
  | `setNodeProviderAccount` | `(accountIdentifier: string) => Promise<void>` |
397
398
 
398
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L541)
399
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L548)
399
400
 
400
401
  ##### :gear: mergeNeurons
401
402
 
@@ -405,7 +406,7 @@ Merge two neurons
405
406
  | -------------- | --------------------------------------------------------------------------------- |
406
407
  | `mergeNeurons` | `(request: { sourceNeuronId: bigint; targetNeuronId: bigint; }) => Promise<void>` |
407
408
 
408
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L561)
409
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L568)
409
410
 
410
411
  ##### :gear: simulateMergeNeurons
411
412
 
@@ -415,7 +416,7 @@ Simulate merging two neurons
415
416
  | ---------------------- | --------------------------------------------------------------------------------------- |
416
417
  | `simulateMergeNeurons` | `(request: { sourceNeuronId: bigint; targetNeuronId: bigint; }) => Promise<NeuronInfo>` |
417
418
 
418
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L578)
419
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L585)
419
420
 
420
421
  ##### :gear: splitNeuron
421
422
 
@@ -425,7 +426,7 @@ Splits a neuron creating a new one
425
426
  | ------------- | ----------------------------------------------------------------------------------- |
426
427
  | `splitNeuron` | `({ neuronId, amount, }: { neuronId: bigint; amount: bigint; }) => Promise<bigint>` |
427
428
 
428
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L623)
429
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L630)
429
430
 
430
431
  ##### :gear: getProposal
431
432
 
@@ -438,7 +439,7 @@ it is fetched using a query call.
438
439
  | ------------- | ------------------------------------------------------------------------------------------------------------------------------- |
439
440
  | `getProposal` | `({ proposalId, certified, }: { proposalId: bigint; certified?: boolean or undefined; }) => Promise<ProposalInfo or undefined>` |
440
441
 
441
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L663)
442
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L670)
442
443
 
443
444
  ##### :gear: makeProposal
444
445
 
@@ -448,7 +449,7 @@ Create new proposal
448
449
  | -------------- | ---------------------------------------------------------------- |
449
450
  | `makeProposal` | `(request: MakeProposalRequest) => Promise<bigint or undefined>` |
450
451
 
451
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L681)
452
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L688)
452
453
 
453
454
  ##### :gear: registerVote
454
455
 
@@ -458,7 +459,7 @@ Registers vote for a proposal from the neuron passed.
458
459
  | -------------- | ----------------------------------------------------------------------------------------------------------- |
459
460
  | `registerVote` | `({ neuronId, vote, proposalId, }: { neuronId: bigint; vote: Vote; proposalId: bigint; }) => Promise<void>` |
460
461
 
461
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L702)
462
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L709)
462
463
 
463
464
  ##### :gear: setFollowees
464
465
 
@@ -468,7 +469,7 @@ Edit neuron followees per topic
468
469
  | -------------- | ------------------------------------------------- |
469
470
  | `setFollowees` | `(followRequest: FollowRequest) => Promise<void>` |
470
471
 
471
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L724)
472
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L731)
472
473
 
473
474
  ##### :gear: disburse
474
475
 
@@ -478,7 +479,7 @@ Disburse neuron on Account
478
479
  | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
479
480
  | `disburse` | `({ neuronId, toAccountId, amount, }: { neuronId: bigint; toAccountId?: string or undefined; amount?: bigint or undefined; }) => Promise<void>` |
480
481
 
481
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L739)
482
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L746)
482
483
 
483
484
  ##### :gear: refreshVotingPower
484
485
 
@@ -490,7 +491,7 @@ parameter of the neuron to the current time).
490
491
  | -------------------- | --------------------------------------------------------- |
491
492
  | `refreshVotingPower` | `({ neuronId, }: { neuronId: bigint; }) => Promise<void>` |
492
493
 
493
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L775)
494
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L782)
494
495
 
495
496
  ##### :gear: mergeMaturity
496
497
 
@@ -500,7 +501,7 @@ Merge Maturity of a neuron
500
501
  | --------------- | ------------------------------------------------------------------------------------------------------- |
501
502
  | `mergeMaturity` | `({ neuronId, percentageToMerge, }: { neuronId: bigint; percentageToMerge: number; }) => Promise<void>` |
502
503
 
503
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L797)
504
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L804)
504
505
 
505
506
  ##### :gear: stakeMaturity
506
507
 
@@ -515,7 +516,7 @@ Parameters:
515
516
  - `neuronId`: The id of the neuron for which to stake the maturity
516
517
  - `percentageToStake`: Optional. Percentage of the current maturity to stake. If not provided, all of the neuron's current maturity will be staked.
517
518
 
518
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L826)
519
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L833)
519
520
 
520
521
  ##### :gear: spawnNeuron
521
522
 
@@ -525,7 +526,7 @@ Merge Maturity of a neuron
525
526
  | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
526
527
  | `spawnNeuron` | `({ neuronId, percentageToSpawn, newController, nonce, }: { neuronId: bigint; percentageToSpawn?: number or undefined; newController?: Principal or undefined; nonce?: bigint or undefined; }) => Promise<bigint>` |
527
528
 
528
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L848)
529
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L855)
529
530
 
530
531
  ##### :gear: addHotkey
531
532
 
@@ -535,7 +536,7 @@ Add hotkey to neuron
535
536
  | ----------- | ------------------------------------------------------------------------------------------ |
536
537
  | `addHotkey` | `({ neuronId, principal, }: { neuronId: bigint; principal: Principal; }) => Promise<void>` |
537
538
 
538
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L895)
539
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L902)
539
540
 
540
541
  ##### :gear: removeHotkey
541
542
 
@@ -545,7 +546,7 @@ Remove hotkey to neuron
545
546
  | -------------- | ------------------------------------------------------------------------------------------ |
546
547
  | `removeHotkey` | `({ neuronId, principal, }: { neuronId: bigint; principal: Principal; }) => Promise<void>` |
547
548
 
548
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L915)
549
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L922)
549
550
 
550
551
  ##### :gear: claimOrRefreshNeuronFromAccount
551
552
 
@@ -555,7 +556,7 @@ Gets the NeuronID of a newly created neuron.
555
556
  | --------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
556
557
  | `claimOrRefreshNeuronFromAccount` | `({ memo, controller, }: { memo: bigint; controller?: Principal or undefined; }) => Promise<bigint or undefined>` |
557
558
 
558
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L933)
559
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L940)
559
560
 
560
561
  ##### :gear: claimOrRefreshNeuron
561
562
 
@@ -566,7 +567,7 @@ Uses query call only.
566
567
  | ---------------------- | ------------------------------------------------------------------------ |
567
568
  | `claimOrRefreshNeuron` | `(request: ClaimOrRefreshNeuronRequest) => Promise<bigint or undefined>` |
568
569
 
569
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L964)
570
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L971)
570
571
 
571
572
  ##### :gear: getNeuron
572
573
 
@@ -576,7 +577,7 @@ Return the data of the neuron provided as id.
576
577
  | ----------- | ----------------------------------------------------------------------------------------------------------- |
577
578
  | `getNeuron` | `({ certified, neuronId, }: { certified: boolean; neuronId: bigint; }) => Promise<NeuronInfo or undefined>` |
578
579
 
579
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L989)
580
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L996)
580
581
 
581
582
  ##### :gear: getNetworkEconomicsParameters
582
583
 
@@ -586,18 +587,39 @@ Return the [Network Economics](https://github.com/dfinity/ic/blob/d90e934eb440c7
586
587
  | ------------------------------- | ------------------------------------------------------------------------ |
587
588
  | `getNetworkEconomicsParameters` | `({ certified, }: { certified: boolean; }) => Promise<NetworkEconomics>` |
588
589
 
589
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L1010)
590
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L1017)
590
591
 
591
592
  ##### :gear: disburseMaturity
592
593
 
593
594
  Disburses a neuron's maturity (always certified).
594
595
  Reference: https://github.com/dfinity/ic/blob/ca2be53acf413bb92478ee7694ac0fb92af07030/rs/sns/governance/src/governance.rs#L1614
595
596
 
596
- | Method | Type |
597
- | ------------------ | ------------------------------------------------------------------------------------------------------------- |
598
- | `disburseMaturity` | `({ neuronId, percentageToDisburse, }: { neuronId: bigint; percentageToDisburse: number; }) => Promise<void>` |
597
+ | Method | Type |
598
+ | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
599
+ | `disburseMaturity` | `({ neuronId, percentageToDisburse, toAccountIdentifier, }: { neuronId: bigint; percentageToDisburse: number; toAccountIdentifier?: string or undefined; }) => Promise<void>` |
600
+
601
+ Parameters:
602
+
603
+ - `params.neuronId`: The id of the neuron for which to disburse maturity
604
+ - `params.percentageToDisburse`: The percentage of the neuron's maturity to disburse, between 1 and 100 (inclusive).
605
+ - `params.accountIdentifier`: Optional. The account identifier to which the maturity will be disbursed. If not provided, the maturity will be disbursed to the caller's Main account.
606
+
607
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L1045)
608
+
609
+ ##### :gear: setFollowing
610
+
611
+ Set the following topics for a neuron.
612
+
613
+ | Method | Type |
614
+ | -------------- | -------------------------------------------------------------------------------------------------------------- |
615
+ | `setFollowing` | `({ neuronId, topicFollowing, }: { neuronId: bigint; topicFollowing: FolloweesForTopic[]; }) => Promise<void>` |
616
+
617
+ Parameters:
618
+
619
+ - `params.neuronId`: The id of the neuron for which to set the following topics
620
+ - `params.topicFollowing`: The topics and the followees for each topic that the neuron should follow.
599
621
 
600
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L1033)
622
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L1073)
601
623
 
602
624
  ### :factory: SnsWasmCanister
603
625
 
@@ -1,4 +1,4 @@
1
- // Generated from IC repo commit 579b8ba (2025-04-11 tags: release-2025-04-11_13-20-base) 'rs/nns/gtc/canister/gtc.did' by import-candid
1
+ // Generated from IC repo commit 9bdaa01adf (2025-06-25) 'rs/nns/gtc/canister/gtc.did' by import-candid
2
2
  type AccountState = record {
3
3
  authenticated_principal_id : opt principal;
4
4
  successfully_transferred_neurons : vec TransferredNeuron;
@@ -22,11 +22,13 @@ export const idlFactory = ({ IDL }) => {
22
22
  'topic' : IDL.Int32,
23
23
  'followees' : IDL.Vec(NeuronId),
24
24
  });
25
+ const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
25
26
  const Account = IDL.Record({
26
27
  'owner' : IDL.Opt(IDL.Principal),
27
28
  'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),
28
29
  });
29
30
  const DisburseMaturity = IDL.Record({
31
+ 'to_account_identifier' : IDL.Opt(AccountIdentifier),
30
32
  'to_account' : IDL.Opt(Account),
31
33
  'percentage_to_disburse' : IDL.Nat32,
32
34
  });
@@ -81,11 +83,17 @@ export const idlFactory = ({ IDL }) => {
81
83
  'new_controller' : IDL.Opt(IDL.Principal),
82
84
  'nonce' : IDL.Nat64,
83
85
  });
86
+ const FolloweesForTopic = IDL.Record({
87
+ 'topic' : IDL.Opt(IDL.Int32),
88
+ 'followees' : IDL.Opt(IDL.Vec(NeuronId)),
89
+ });
90
+ const SetFollowing = IDL.Record({
91
+ 'topic_following' : IDL.Opt(IDL.Vec(FolloweesForTopic)),
92
+ });
84
93
  const StakeMaturity = IDL.Record({
85
94
  'percentage_to_stake' : IDL.Opt(IDL.Nat32),
86
95
  });
87
96
  const MergeMaturity = IDL.Record({ 'percentage_to_merge' : IDL.Nat32 });
88
- const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
89
97
  const Amount = IDL.Record({ 'e8s' : IDL.Nat64 });
90
98
  const Disburse = IDL.Record({
91
99
  'to_account' : IDL.Opt(AccountIdentifier),
@@ -102,6 +110,7 @@ export const idlFactory = ({ IDL }) => {
102
110
  'RegisterVote' : RegisterVote,
103
111
  'Merge' : Merge,
104
112
  'DisburseToNeuron' : DisburseToNeuron,
113
+ 'SetFollowing' : SetFollowing,
105
114
  'MakeProposal' : Proposal,
106
115
  'StakeMaturity' : StakeMaturity,
107
116
  'MergeMaturity' : MergeMaturity,
@@ -566,6 +575,7 @@ export const idlFactory = ({ IDL }) => {
566
575
  });
567
576
  const ProposalData = IDL.Record({
568
577
  'id' : IDL.Opt(ProposalId),
578
+ 'topic' : IDL.Opt(IDL.Int32),
569
579
  'failure_reason' : IDL.Opt(GovernanceError),
570
580
  'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
571
581
  'proposal_timestamp_seconds' : IDL.Nat64,
@@ -605,6 +615,13 @@ export const idlFactory = ({ IDL }) => {
605
615
  'vote' : IDL.Int32,
606
616
  'proposal_id' : IDL.Opt(ProposalId),
607
617
  });
618
+ const MaturityDisbursement = IDL.Record({
619
+ 'account_identifier_to_disburse_to' : IDL.Opt(AccountIdentifier),
620
+ 'timestamp_of_disbursement_seconds' : IDL.Opt(IDL.Nat64),
621
+ 'amount_e8s' : IDL.Opt(IDL.Nat64),
622
+ 'account_to_disburse_to' : IDL.Opt(Account),
623
+ 'finalize_disbursement_timestamp_seconds' : IDL.Opt(IDL.Nat64),
624
+ });
608
625
  const DissolveState = IDL.Variant({
609
626
  'DissolveDelaySeconds' : IDL.Nat64,
610
627
  'WhenDissolvedTimestampSeconds' : IDL.Nat64,
@@ -628,6 +645,9 @@ export const idlFactory = ({ IDL }) => {
628
645
  'hot_keys' : IDL.Vec(IDL.Principal),
629
646
  'account' : IDL.Vec(IDL.Nat8),
630
647
  'joined_community_fund_timestamp_seconds' : IDL.Opt(IDL.Nat64),
648
+ 'maturity_disbursements_in_progress' : IDL.Opt(
649
+ IDL.Vec(MaturityDisbursement)
650
+ ),
631
651
  'dissolve_state' : IDL.Opt(DissolveState),
632
652
  'followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
633
653
  'neuron_fees_e8s' : IDL.Nat64,
@@ -818,6 +838,7 @@ export const idlFactory = ({ IDL }) => {
818
838
  'RegisterVote' : RegisterVote,
819
839
  'Merge' : Merge,
820
840
  'DisburseToNeuron' : DisburseToNeuron,
841
+ 'SetFollowing' : SetFollowing,
821
842
  'MakeProposal' : MakeProposalRequest,
822
843
  'StakeMaturity' : StakeMaturity,
823
844
  'MergeMaturity' : MergeMaturity,
@@ -844,6 +865,7 @@ export const idlFactory = ({ IDL }) => {
844
865
  'target_neuron_info' : IDL.Opt(NeuronInfo),
845
866
  'source_neuron_info' : IDL.Opt(NeuronInfo),
846
867
  });
868
+ const SetFollowingResponse = IDL.Record({});
847
869
  const MakeProposalResponse = IDL.Record({
848
870
  'message' : IDL.Opt(IDL.Text),
849
871
  'proposal_id' : IDL.Opt(ProposalId),
@@ -869,6 +891,7 @@ export const idlFactory = ({ IDL }) => {
869
891
  'RegisterVote' : IDL.Record({}),
870
892
  'Merge' : MergeResponse,
871
893
  'DisburseToNeuron' : SpawnResponse,
894
+ 'SetFollowing' : SetFollowingResponse,
872
895
  'MakeProposal' : MakeProposalResponse,
873
896
  'StakeMaturity' : StakeMaturityResponse,
874
897
  'MergeMaturity' : MergeMaturityResponse,
@@ -1020,11 +1043,13 @@ export const init = ({ IDL }) => {
1020
1043
  'topic' : IDL.Int32,
1021
1044
  'followees' : IDL.Vec(NeuronId),
1022
1045
  });
1046
+ const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
1023
1047
  const Account = IDL.Record({
1024
1048
  'owner' : IDL.Opt(IDL.Principal),
1025
1049
  'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),
1026
1050
  });
1027
1051
  const DisburseMaturity = IDL.Record({
1052
+ 'to_account_identifier' : IDL.Opt(AccountIdentifier),
1028
1053
  'to_account' : IDL.Opt(Account),
1029
1054
  'percentage_to_disburse' : IDL.Nat32,
1030
1055
  });
@@ -1079,11 +1104,17 @@ export const init = ({ IDL }) => {
1079
1104
  'new_controller' : IDL.Opt(IDL.Principal),
1080
1105
  'nonce' : IDL.Nat64,
1081
1106
  });
1107
+ const FolloweesForTopic = IDL.Record({
1108
+ 'topic' : IDL.Opt(IDL.Int32),
1109
+ 'followees' : IDL.Opt(IDL.Vec(NeuronId)),
1110
+ });
1111
+ const SetFollowing = IDL.Record({
1112
+ 'topic_following' : IDL.Opt(IDL.Vec(FolloweesForTopic)),
1113
+ });
1082
1114
  const StakeMaturity = IDL.Record({
1083
1115
  'percentage_to_stake' : IDL.Opt(IDL.Nat32),
1084
1116
  });
1085
1117
  const MergeMaturity = IDL.Record({ 'percentage_to_merge' : IDL.Nat32 });
1086
- const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
1087
1118
  const Amount = IDL.Record({ 'e8s' : IDL.Nat64 });
1088
1119
  const Disburse = IDL.Record({
1089
1120
  'to_account' : IDL.Opt(AccountIdentifier),
@@ -1100,6 +1131,7 @@ export const init = ({ IDL }) => {
1100
1131
  'RegisterVote' : RegisterVote,
1101
1132
  'Merge' : Merge,
1102
1133
  'DisburseToNeuron' : DisburseToNeuron,
1134
+ 'SetFollowing' : SetFollowing,
1103
1135
  'MakeProposal' : Proposal,
1104
1136
  'StakeMaturity' : StakeMaturity,
1105
1137
  'MergeMaturity' : MergeMaturity,
@@ -1564,6 +1596,7 @@ export const init = ({ IDL }) => {
1564
1596
  });
1565
1597
  const ProposalData = IDL.Record({
1566
1598
  'id' : IDL.Opt(ProposalId),
1599
+ 'topic' : IDL.Opt(IDL.Int32),
1567
1600
  'failure_reason' : IDL.Opt(GovernanceError),
1568
1601
  'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
1569
1602
  'proposal_timestamp_seconds' : IDL.Nat64,
@@ -1603,6 +1636,13 @@ export const init = ({ IDL }) => {
1603
1636
  'vote' : IDL.Int32,
1604
1637
  'proposal_id' : IDL.Opt(ProposalId),
1605
1638
  });
1639
+ const MaturityDisbursement = IDL.Record({
1640
+ 'account_identifier_to_disburse_to' : IDL.Opt(AccountIdentifier),
1641
+ 'timestamp_of_disbursement_seconds' : IDL.Opt(IDL.Nat64),
1642
+ 'amount_e8s' : IDL.Opt(IDL.Nat64),
1643
+ 'account_to_disburse_to' : IDL.Opt(Account),
1644
+ 'finalize_disbursement_timestamp_seconds' : IDL.Opt(IDL.Nat64),
1645
+ });
1606
1646
  const DissolveState = IDL.Variant({
1607
1647
  'DissolveDelaySeconds' : IDL.Nat64,
1608
1648
  'WhenDissolvedTimestampSeconds' : IDL.Nat64,
@@ -1626,6 +1666,9 @@ export const init = ({ IDL }) => {
1626
1666
  'hot_keys' : IDL.Vec(IDL.Principal),
1627
1667
  'account' : IDL.Vec(IDL.Nat8),
1628
1668
  'joined_community_fund_timestamp_seconds' : IDL.Opt(IDL.Nat64),
1669
+ 'maturity_disbursements_in_progress' : IDL.Opt(
1670
+ IDL.Vec(MaturityDisbursement)
1671
+ ),
1629
1672
  'dissolve_state' : IDL.Opt(DissolveState),
1630
1673
  'followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
1631
1674
  'neuron_fees_e8s' : IDL.Nat64,
@@ -103,6 +103,7 @@ export type Command =
103
103
  | { RegisterVote: RegisterVote }
104
104
  | { Merge: Merge }
105
105
  | { DisburseToNeuron: DisburseToNeuron }
106
+ | { SetFollowing: SetFollowing }
106
107
  | { MakeProposal: Proposal }
107
108
  | { StakeMaturity: StakeMaturity }
108
109
  | { MergeMaturity: MergeMaturity }
@@ -119,6 +120,7 @@ export type Command_1 =
119
120
  | { RegisterVote: {} }
120
121
  | { Merge: MergeResponse }
121
122
  | { DisburseToNeuron: SpawnResponse }
123
+ | { SetFollowing: SetFollowingResponse }
122
124
  | { MakeProposal: MakeProposalResponse }
123
125
  | { StakeMaturity: StakeMaturityResponse }
124
126
  | { MergeMaturity: MergeMaturityResponse }
@@ -182,6 +184,7 @@ export interface Disburse {
182
184
  amount: [] | [Amount];
183
185
  }
184
186
  export interface DisburseMaturity {
187
+ to_account_identifier: [] | [AccountIdentifier];
185
188
  to_account: [] | [Account];
186
189
  percentage_to_disburse: number;
187
190
  }
@@ -215,6 +218,10 @@ export interface Follow {
215
218
  export interface Followees {
216
219
  followees: Array<NeuronId>;
217
220
  }
221
+ export interface FolloweesForTopic {
222
+ topic: [] | [number];
223
+ followees: [] | [Array<NeuronId>];
224
+ }
218
225
  export interface GetNeuronsFundAuditInfoRequest {
219
226
  nns_proposal_id: [] | [ProposalId];
220
227
  }
@@ -422,6 +429,7 @@ export type ManageNeuronCommandRequest =
422
429
  | { RegisterVote: RegisterVote }
423
430
  | { Merge: Merge }
424
431
  | { DisburseToNeuron: DisburseToNeuron }
432
+ | { SetFollowing: SetFollowing }
425
433
  | { MakeProposal: MakeProposalRequest }
426
434
  | { StakeMaturity: StakeMaturity }
427
435
  | { MergeMaturity: MergeMaturity }
@@ -434,6 +442,13 @@ export interface ManageNeuronRequest {
434
442
  export interface ManageNeuronResponse {
435
443
  command: [] | [Command_1];
436
444
  }
445
+ export interface MaturityDisbursement {
446
+ account_identifier_to_disburse_to: [] | [AccountIdentifier];
447
+ timestamp_of_disbursement_seconds: [] | [bigint];
448
+ amount_e8s: [] | [bigint];
449
+ account_to_disburse_to: [] | [Account];
450
+ finalize_disbursement_timestamp_seconds: [] | [bigint];
451
+ }
437
452
  export interface Merge {
438
453
  source_neuron_id: [] | [NeuronId];
439
454
  }
@@ -493,6 +508,7 @@ export interface Neuron {
493
508
  hot_keys: Array<Principal>;
494
509
  account: Uint8Array | number[];
495
510
  joined_community_fund_timestamp_seconds: [] | [bigint];
511
+ maturity_disbursements_in_progress: [] | [Array<MaturityDisbursement>];
496
512
  dissolve_state: [] | [DissolveState];
497
513
  followees: Array<[number, Followees]>;
498
514
  neuron_fees_e8s: bigint;
@@ -693,6 +709,7 @@ export type ProposalActionRequest =
693
709
  | { Motion: Motion };
694
710
  export interface ProposalData {
695
711
  id: [] | [ProposalId];
712
+ topic: [] | [number];
696
713
  failure_reason: [] | [GovernanceError];
697
714
  ballots: Array<[bigint, Ballot]>;
698
715
  proposal_timestamp_seconds: bigint;
@@ -801,6 +818,10 @@ export interface SetDefaultFollowees {
801
818
  export interface SetDissolveTimestamp {
802
819
  dissolve_timestamp_seconds: bigint;
803
820
  }
821
+ export interface SetFollowing {
822
+ topic_following: [] | [Array<FolloweesForTopic>];
823
+ }
824
+ export type SetFollowingResponse = {};
804
825
  export interface SetOpenTimeWindowRequest {
805
826
  open_time_window: [] | [TimeWindow];
806
827
  }