@dfinity/nns 7.0.1 → 7.0.2-next-2024-11-01

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/LICENSE CHANGED
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2021 DFINITY LLC.
189
+ Copyright 2021 DFINITY Stiftung.
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -77,6 +77,8 @@ const myNeurons = await listNeurons({ certified: false });
77
77
  - [ineligibleNeurons](#gear-ineligibleneurons)
78
78
  - [votableNeurons](#gear-votableneurons)
79
79
  - [votedNeurons](#gear-votedneurons)
80
+ - [memoToNeuronSubaccount](#gear-memotoneuronsubaccount)
81
+ - [memoToNeuronAccountIdentifier](#gear-memotoneuronaccountidentifier)
80
82
 
81
83
  #### :gear: ineligibleNeurons
82
84
 
@@ -96,7 +98,7 @@ Parameters:
96
98
  - `params.neurons`: The neurons to filter.
97
99
  - `params.proposal`: The proposal to match against the selected neurons.
98
100
 
99
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/utils/neurons.utils.ts#L29)
101
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/utils/neurons.utils.ts#L37)
100
102
 
101
103
  #### :gear: votableNeurons
102
104
 
@@ -111,7 +113,7 @@ Parameters:
111
113
  - `params.neurons`: The neurons to filter.
112
114
  - `params.proposal`: The proposal to match against the selected neurons.
113
115
 
114
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/utils/neurons.utils.ts#L58)
116
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/utils/neurons.utils.ts#L66)
115
117
 
116
118
  #### :gear: votedNeurons
117
119
 
@@ -126,7 +128,23 @@ Parameters:
126
128
  - `params.neurons`: The neurons to filter.
127
129
  - `params.proposal`: The proposal for which some neurons might have already voted.
128
130
 
129
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/utils/neurons.utils.ts#L81)
131
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/utils/neurons.utils.ts#L89)
132
+
133
+ #### :gear: memoToNeuronSubaccount
134
+
135
+ | Function | Type |
136
+ | ------------------------ | --------------------------------------------------------------------------------- |
137
+ | `memoToNeuronSubaccount` | `({ controller, memo, }: { controller: Principal; memo: bigint; }) => SubAccount` |
138
+
139
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/utils/neurons.utils.ts#L101)
140
+
141
+ #### :gear: memoToNeuronAccountIdentifier
142
+
143
+ | Function | Type |
144
+ | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
145
+ | `memoToNeuronAccountIdentifier` | `({ controller, memo, governanceCanisterId, }: { controller: Principal; memo: bigint; governanceCanisterId: Principal; }) => AccountIdentifier` |
146
+
147
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/utils/neurons.utils.ts#L122)
130
148
 
131
149
  ### :factory: GenesisTokenCanister
132
150
 
@@ -155,7 +173,7 @@ Parameters:
155
173
 
156
174
  ### :factory: GovernanceCanister
157
175
 
158
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L94)
176
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L88)
159
177
 
160
178
  #### Methods
161
179
 
@@ -165,7 +183,6 @@ Parameters:
165
183
  - [getLastestRewardEvent](#gear-getlastestrewardevent)
166
184
  - [listProposals](#gear-listproposals)
167
185
  - [stakeNeuron](#gear-stakeneuron)
168
- - [stakeNeuronIcrc1](#gear-stakeneuronicrc1)
169
186
  - [increaseDissolveDelay](#gear-increasedissolvedelay)
170
187
  - [setDissolveDelay](#gear-setdissolvedelay)
171
188
  - [startDissolving](#gear-startdissolving)
@@ -198,7 +215,7 @@ Parameters:
198
215
  | -------- | ------------------------------------------------------------- |
199
216
  | `create` | `(options?: GovernanceCanisterOptions) => GovernanceCanister` |
200
217
 
201
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L109)
218
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L103)
202
219
 
203
220
  ##### :gear: listNeurons
204
221
 
@@ -215,7 +232,7 @@ The backend treats `includeEmptyNeurons` as true if absent.
215
232
  | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
216
233
  | `listNeurons` | `({ certified, neuronIds, includeEmptyNeurons, includePublicNeurons, }: { certified: boolean; neuronIds?: bigint[] or undefined; includeEmptyNeurons?: boolean or undefined; includePublicNeurons?: boolean or undefined; }) => Promise<NeuronInfo[]>` |
217
234
 
218
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L149)
235
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L143)
219
236
 
220
237
  ##### :gear: listKnownNeurons
221
238
 
@@ -229,7 +246,7 @@ it is fetched using a query call.
229
246
  | ------------------ | ------------------------------------------------- |
230
247
  | `listKnownNeurons` | `(certified?: boolean) => Promise<KnownNeuron[]>` |
231
248
 
232
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L192)
249
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L186)
233
250
 
234
251
  ##### :gear: getLastestRewardEvent
235
252
 
@@ -242,7 +259,7 @@ it's fetched using a query call.
242
259
  | ----------------------- | ----------------------------------------------- |
243
260
  | `getLastestRewardEvent` | `(certified?: boolean) => Promise<RewardEvent>` |
244
261
 
245
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L214)
262
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L208)
246
263
 
247
264
  ##### :gear: listProposals
248
265
 
@@ -261,7 +278,7 @@ Parameters:
261
278
  - `request`: the options to list the proposals (limit number of results, topics to search for, etc.)
262
279
  - `certified`: query or update calls
263
280
 
264
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L230)
281
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L224)
265
282
 
266
283
  ##### :gear: stakeNeuron
267
284
 
@@ -269,15 +286,7 @@ Parameters:
269
286
  | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
270
287
  | `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<...>` |
271
288
 
272
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L249)
273
-
274
- ##### :gear: stakeNeuronIcrc1
275
-
276
- | Method | Type |
277
- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
278
- | `stakeNeuronIcrc1` | `({ stake, principal, fromSubAccount, ledgerCanister, createdAt, fee, }: { stake: bigint; principal: Principal; fromSubAccount?: Uint8Array or undefined; ledgerCanister: LedgerCanister; createdAt?: bigint or undefined; fee?: bigint or undefined; }) => Promise<...>` |
279
-
280
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L315)
289
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L243)
281
290
 
282
291
  ##### :gear: increaseDissolveDelay
283
292
 
@@ -287,7 +296,7 @@ Increases dissolve delay of a neuron
287
296
  | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
288
297
  | `increaseDissolveDelay` | `({ neuronId, additionalDissolveDelaySeconds, }: { neuronId: bigint; additionalDissolveDelaySeconds: number; }) => Promise<void>` |
289
298
 
290
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L380)
299
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L304)
291
300
 
292
301
  ##### :gear: setDissolveDelay
293
302
 
@@ -298,7 +307,7 @@ The new date is now + dissolveDelaySeconds.
298
307
  | ------------------ | ------------------------------------------------------------------------------------------------------------- |
299
308
  | `setDissolveDelay` | `({ neuronId, dissolveDelaySeconds, }: { neuronId: bigint; dissolveDelaySeconds: number; }) => Promise<void>` |
300
309
 
301
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L406)
310
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L330)
302
311
 
303
312
  ##### :gear: startDissolving
304
313
 
@@ -308,7 +317,7 @@ Start dissolving process of a neuron
308
317
  | ----------------- | ------------------------------------- |
309
318
  | `startDissolving` | `(neuronId: bigint) => Promise<void>` |
310
319
 
311
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L429)
320
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L353)
312
321
 
313
322
  ##### :gear: stopDissolving
314
323
 
@@ -318,7 +327,7 @@ Stop dissolving process of a neuron
318
327
  | ---------------- | ------------------------------------- |
319
328
  | `stopDissolving` | `(neuronId: bigint) => Promise<void>` |
320
329
 
321
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L443)
330
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L367)
322
331
 
323
332
  ##### :gear: joinCommunityFund
324
333
 
@@ -328,7 +337,7 @@ Neuron joins the community fund
328
337
  | ------------------- | ------------------------------------- |
329
338
  | `joinCommunityFund` | `(neuronId: bigint) => Promise<void>` |
330
339
 
331
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L457)
340
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L381)
332
341
 
333
342
  ##### :gear: autoStakeMaturity
334
343
 
@@ -343,7 +352,7 @@ Parameters:
343
352
  - `neuronId`: The id of the neuron for which to request a change of the auto stake feature
344
353
  - `autoStake`: `true` to enable the auto-stake maturity for this neuron, `false` to turn it off
345
354
 
346
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L475)
355
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L399)
347
356
 
348
357
  ##### :gear: leaveCommunityFund
349
358
 
@@ -353,7 +362,7 @@ Neuron leaves the community fund
353
362
  | -------------------- | ------------------------------------- |
354
363
  | `leaveCommunityFund` | `(neuronId: bigint) => Promise<void>` |
355
364
 
356
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L490)
365
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L414)
357
366
 
358
367
  ##### :gear: setVisibility
359
368
 
@@ -363,7 +372,7 @@ Set visibility of a neuron
363
372
  | --------------- | ------------------------------------------------------------------- |
364
373
  | `setVisibility` | `(neuronId: bigint, visibility: NeuronVisibility) => Promise<void>` |
365
374
 
366
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L504)
375
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L428)
367
376
 
368
377
  ##### :gear: setNodeProviderAccount
369
378
 
@@ -374,7 +383,7 @@ Where the reward is paid to.
374
383
  | ------------------------ | ---------------------------------------------- |
375
384
  | `setNodeProviderAccount` | `(accountIdentifier: string) => Promise<void>` |
376
385
 
377
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L524)
386
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L448)
378
387
 
379
388
  ##### :gear: mergeNeurons
380
389
 
@@ -384,7 +393,7 @@ Merge two neurons
384
393
  | -------------- | --------------------------------------------------------------------------------- |
385
394
  | `mergeNeurons` | `(request: { sourceNeuronId: bigint; targetNeuronId: bigint; }) => Promise<void>` |
386
395
 
387
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L544)
396
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L468)
388
397
 
389
398
  ##### :gear: simulateMergeNeurons
390
399
 
@@ -394,7 +403,7 @@ Simulate merging two neurons
394
403
  | ---------------------- | --------------------------------------------------------------------------------------- |
395
404
  | `simulateMergeNeurons` | `(request: { sourceNeuronId: bigint; targetNeuronId: bigint; }) => Promise<NeuronInfo>` |
396
405
 
397
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L561)
406
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L485)
398
407
 
399
408
  ##### :gear: splitNeuron
400
409
 
@@ -404,7 +413,7 @@ Splits a neuron creating a new one
404
413
  | ------------- | ----------------------------------------------------------------------------------- |
405
414
  | `splitNeuron` | `({ neuronId, amount, }: { neuronId: bigint; amount: bigint; }) => Promise<bigint>` |
406
415
 
407
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L606)
416
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L530)
408
417
 
409
418
  ##### :gear: getProposal
410
419
 
@@ -417,7 +426,7 @@ it is fetched using a query call.
417
426
  | ------------- | ------------------------------------------------------------------------------------------------------------------------------- |
418
427
  | `getProposal` | `({ proposalId, certified, }: { proposalId: bigint; certified?: boolean or undefined; }) => Promise<ProposalInfo or undefined>` |
419
428
 
420
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L646)
429
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L570)
421
430
 
422
431
  ##### :gear: makeProposal
423
432
 
@@ -427,7 +436,7 @@ Create new proposal
427
436
  | -------------- | ---------------------------------------------------------------- |
428
437
  | `makeProposal` | `(request: MakeProposalRequest) => Promise<bigint or undefined>` |
429
438
 
430
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L664)
439
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L588)
431
440
 
432
441
  ##### :gear: registerVote
433
442
 
@@ -437,7 +446,7 @@ Registers vote for a proposal from the neuron passed.
437
446
  | -------------- | ----------------------------------------------------------------------------------------------------------- |
438
447
  | `registerVote` | `({ neuronId, vote, proposalId, }: { neuronId: bigint; vote: Vote; proposalId: bigint; }) => Promise<void>` |
439
448
 
440
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L685)
449
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L609)
441
450
 
442
451
  ##### :gear: setFollowees
443
452
 
@@ -447,7 +456,7 @@ Edit neuron followees per topic
447
456
  | -------------- | ------------------------------------------------- |
448
457
  | `setFollowees` | `(followRequest: FollowRequest) => Promise<void>` |
449
458
 
450
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L707)
459
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L631)
451
460
 
452
461
  ##### :gear: disburse
453
462
 
@@ -457,7 +466,7 @@ Disburse neuron on Account
457
466
  | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
458
467
  | `disburse` | `({ neuronId, toAccountId, amount, }: { neuronId: bigint; toAccountId?: string or undefined; amount?: bigint or undefined; }) => Promise<void>` |
459
468
 
460
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L722)
469
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L646)
461
470
 
462
471
  ##### :gear: mergeMaturity
463
472
 
@@ -467,7 +476,7 @@ Merge Maturity of a neuron
467
476
  | --------------- | ------------------------------------------------------------------------------------------------------- |
468
477
  | `mergeMaturity` | `({ neuronId, percentageToMerge, }: { neuronId: bigint; percentageToMerge: number; }) => Promise<void>` |
469
478
 
470
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L758)
479
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L682)
471
480
 
472
481
  ##### :gear: stakeMaturity
473
482
 
@@ -482,7 +491,7 @@ Parameters:
482
491
  - `neuronId`: The id of the neuron for which to stake the maturity
483
492
  - `percentageToStake`: Optional. Percentage of the current maturity to stake. If not provided, all of the neuron's current maturity will be staked.
484
493
 
485
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L787)
494
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L711)
486
495
 
487
496
  ##### :gear: spawnNeuron
488
497
 
@@ -492,7 +501,7 @@ Merge Maturity of a neuron
492
501
  | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
493
502
  | `spawnNeuron` | `({ neuronId, percentageToSpawn, newController, nonce, }: { neuronId: bigint; percentageToSpawn?: number or undefined; newController?: Principal or undefined; nonce?: bigint or undefined; }) => Promise<bigint>` |
494
503
 
495
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L809)
504
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L733)
496
505
 
497
506
  ##### :gear: addHotkey
498
507
 
@@ -502,7 +511,7 @@ Add hotkey to neuron
502
511
  | ----------- | ------------------------------------------------------------------------------------------ |
503
512
  | `addHotkey` | `({ neuronId, principal, }: { neuronId: bigint; principal: Principal; }) => Promise<void>` |
504
513
 
505
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L856)
514
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L780)
506
515
 
507
516
  ##### :gear: removeHotkey
508
517
 
@@ -512,7 +521,7 @@ Remove hotkey to neuron
512
521
  | -------------- | ------------------------------------------------------------------------------------------ |
513
522
  | `removeHotkey` | `({ neuronId, principal, }: { neuronId: bigint; principal: Principal; }) => Promise<void>` |
514
523
 
515
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L876)
524
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L800)
516
525
 
517
526
  ##### :gear: claimOrRefreshNeuronFromAccount
518
527
 
@@ -522,7 +531,7 @@ Gets the NeuronID of a newly created neuron.
522
531
  | --------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
523
532
  | `claimOrRefreshNeuronFromAccount` | `({ memo, controller, }: { memo: bigint; controller?: Principal or undefined; }) => Promise<bigint or undefined>` |
524
533
 
525
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L894)
534
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L818)
526
535
 
527
536
  ##### :gear: claimOrRefreshNeuron
528
537
 
@@ -533,7 +542,7 @@ Uses query call only.
533
542
  | ---------------------- | ------------------------------------------------------------------------ |
534
543
  | `claimOrRefreshNeuron` | `(request: ClaimOrRefreshNeuronRequest) => Promise<bigint or undefined>` |
535
544
 
536
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L925)
545
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L849)
537
546
 
538
547
  ##### :gear: getNeuron
539
548
 
@@ -543,7 +552,7 @@ Return the data of the neuron provided as id.
543
552
  | ----------- | ----------------------------------------------------------------------------------------------------------- |
544
553
  | `getNeuron` | `({ certified, neuronId, }: { certified: boolean; neuronId: bigint; }) => Promise<NeuronInfo or undefined>` |
545
554
 
546
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L976)
555
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L874)
547
556
 
548
557
  ### :factory: SnsWasmCanister
549
558
 
@@ -1,4 +1,4 @@
1
- // Generated from IC repo commit c43a488 (2024-09-27 tags: release-2024-09-26_01-31-no-canister-snapshots) 'rs/nns/gtc/canister/gtc.did' by import-candid
1
+ // Generated from IC repo commit a6ef593 (2024-10-24 tags: release-2024-10-23_03-07-ubuntu20.04) '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;
@@ -59,9 +59,10 @@ export const idlFactory = ({ IDL }) => {
59
59
  'SetDissolveTimestamp' : SetDissolveTimestamp,
60
60
  });
61
61
  const Configure = IDL.Record({ 'operation' : IDL.Opt(Operation) });
62
+ const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
62
63
  const RegisterVote = IDL.Record({
63
64
  'vote' : IDL.Int32,
64
- 'proposal' : IDL.Opt(NeuronId),
65
+ 'proposal' : IDL.Opt(ProposalId),
65
66
  });
66
67
  const Merge = IDL.Record({ 'source_neuron_id' : IDL.Opt(NeuronId) });
67
68
  const DisburseToNeuron = IDL.Record({
@@ -447,7 +448,7 @@ export const idlFactory = ({ IDL }) => {
447
448
  'total_available_e8s_equivalent' : IDL.Nat64,
448
449
  'latest_round_available_e8s_equivalent' : IDL.Opt(IDL.Nat64),
449
450
  'distributed_e8s_equivalent' : IDL.Nat64,
450
- 'settled_proposals' : IDL.Vec(NeuronId),
451
+ 'settled_proposals' : IDL.Vec(ProposalId),
451
452
  });
452
453
  const NeuronStakeTransfer = IDL.Record({
453
454
  'to_subaccount' : IDL.Vec(IDL.Nat8),
@@ -550,7 +551,7 @@ export const idlFactory = ({ IDL }) => {
550
551
  'current_deadline_timestamp_seconds' : IDL.Nat64,
551
552
  });
552
553
  const ProposalData = IDL.Record({
553
- 'id' : IDL.Opt(NeuronId),
554
+ 'id' : IDL.Opt(ProposalId),
554
555
  'failure_reason' : IDL.Opt(GovernanceError),
555
556
  'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
556
557
  'proposal_timestamp_seconds' : IDL.Nat64,
@@ -587,7 +588,7 @@ export const idlFactory = ({ IDL }) => {
587
588
  });
588
589
  const BallotInfo = IDL.Record({
589
590
  'vote' : IDL.Int32,
590
- 'proposal_id' : IDL.Opt(NeuronId),
591
+ 'proposal_id' : IDL.Opt(ProposalId),
591
592
  });
592
593
  const DissolveState = IDL.Variant({
593
594
  'DissolveDelaySeconds' : IDL.Nat64,
@@ -678,7 +679,7 @@ export const idlFactory = ({ IDL }) => {
678
679
  });
679
680
  const Result_5 = IDL.Variant({ 'Ok' : NeuronInfo, 'Err' : GovernanceError });
680
681
  const GetNeuronsFundAuditInfoRequest = IDL.Record({
681
- 'nns_proposal_id' : IDL.Opt(NeuronId),
682
+ 'nns_proposal_id' : IDL.Opt(ProposalId),
682
683
  });
683
684
  const NeuronsFundAuditInfo = IDL.Record({
684
685
  'final_neurons_fund_participation' : IDL.Opt(NeuronsFundParticipation),
@@ -697,7 +698,7 @@ export const idlFactory = ({ IDL }) => {
697
698
  'Err' : GovernanceError,
698
699
  });
699
700
  const ProposalInfo = IDL.Record({
700
- 'id' : IDL.Opt(NeuronId),
701
+ 'id' : IDL.Opt(ProposalId),
701
702
  'status' : IDL.Int32,
702
703
  'topic' : IDL.Int32,
703
704
  'failure_reason' : IDL.Opt(GovernanceError),
@@ -744,7 +745,7 @@ export const idlFactory = ({ IDL }) => {
744
745
  const ListProposalInfo = IDL.Record({
745
746
  'include_reward_status' : IDL.Vec(IDL.Int32),
746
747
  'omit_large_fields' : IDL.Opt(IDL.Bool),
747
- 'before_proposal' : IDL.Opt(NeuronId),
748
+ 'before_proposal' : IDL.Opt(ProposalId),
748
749
  'limit' : IDL.Nat32,
749
750
  'exclude_topic' : IDL.Vec(IDL.Int32),
750
751
  'include_all_manage_neuron_proposals' : IDL.Opt(IDL.Bool),
@@ -814,7 +815,7 @@ export const idlFactory = ({ IDL }) => {
814
815
  });
815
816
  const MakeProposalResponse = IDL.Record({
816
817
  'message' : IDL.Opt(IDL.Text),
817
- 'proposal_id' : IDL.Opt(NeuronId),
818
+ 'proposal_id' : IDL.Opt(ProposalId),
818
819
  });
819
820
  const StakeMaturityResponse = IDL.Record({
820
821
  'maturity_e8s' : IDL.Nat64,
@@ -1023,9 +1024,10 @@ export const init = ({ IDL }) => {
1023
1024
  'SetDissolveTimestamp' : SetDissolveTimestamp,
1024
1025
  });
1025
1026
  const Configure = IDL.Record({ 'operation' : IDL.Opt(Operation) });
1027
+ const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
1026
1028
  const RegisterVote = IDL.Record({
1027
1029
  'vote' : IDL.Int32,
1028
- 'proposal' : IDL.Opt(NeuronId),
1030
+ 'proposal' : IDL.Opt(ProposalId),
1029
1031
  });
1030
1032
  const Merge = IDL.Record({ 'source_neuron_id' : IDL.Opt(NeuronId) });
1031
1033
  const DisburseToNeuron = IDL.Record({
@@ -1411,7 +1413,7 @@ export const init = ({ IDL }) => {
1411
1413
  'total_available_e8s_equivalent' : IDL.Nat64,
1412
1414
  'latest_round_available_e8s_equivalent' : IDL.Opt(IDL.Nat64),
1413
1415
  'distributed_e8s_equivalent' : IDL.Nat64,
1414
- 'settled_proposals' : IDL.Vec(NeuronId),
1416
+ 'settled_proposals' : IDL.Vec(ProposalId),
1415
1417
  });
1416
1418
  const NeuronStakeTransfer = IDL.Record({
1417
1419
  'to_subaccount' : IDL.Vec(IDL.Nat8),
@@ -1514,7 +1516,7 @@ export const init = ({ IDL }) => {
1514
1516
  'current_deadline_timestamp_seconds' : IDL.Nat64,
1515
1517
  });
1516
1518
  const ProposalData = IDL.Record({
1517
- 'id' : IDL.Opt(NeuronId),
1519
+ 'id' : IDL.Opt(ProposalId),
1518
1520
  'failure_reason' : IDL.Opt(GovernanceError),
1519
1521
  'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
1520
1522
  'proposal_timestamp_seconds' : IDL.Nat64,
@@ -1551,7 +1553,7 @@ export const init = ({ IDL }) => {
1551
1553
  });
1552
1554
  const BallotInfo = IDL.Record({
1553
1555
  'vote' : IDL.Int32,
1554
- 'proposal_id' : IDL.Opt(NeuronId),
1556
+ 'proposal_id' : IDL.Opt(ProposalId),
1555
1557
  });
1556
1558
  const DissolveState = IDL.Variant({
1557
1559
  'DissolveDelaySeconds' : IDL.Nat64,
@@ -40,7 +40,7 @@ export interface Ballot {
40
40
  }
41
41
  export interface BallotInfo {
42
42
  vote: number;
43
- proposal_id: [] | [NeuronId];
43
+ proposal_id: [] | [ProposalId];
44
44
  }
45
45
  export type By =
46
46
  | { NeuronIdOrSubaccount: {} }
@@ -206,7 +206,7 @@ export interface FollowersMap {
206
206
  followers_map: Array<[bigint, Followers]>;
207
207
  }
208
208
  export interface GetNeuronsFundAuditInfoRequest {
209
- nns_proposal_id: [] | [NeuronId];
209
+ nns_proposal_id: [] | [ProposalId];
210
210
  }
211
211
  export interface GetNeuronsFundAuditInfoResponse {
212
212
  result: [] | [Result_6];
@@ -368,7 +368,7 @@ export interface ListNodeProvidersResponse {
368
368
  export interface ListProposalInfo {
369
369
  include_reward_status: Int32Array | number[];
370
370
  omit_large_fields: [] | [boolean];
371
- before_proposal: [] | [NeuronId];
371
+ before_proposal: [] | [ProposalId];
372
372
  limit: number;
373
373
  exclude_topic: Int32Array | number[];
374
374
  include_all_manage_neuron_proposals: [] | [boolean];
@@ -385,7 +385,7 @@ export interface MakeProposalRequest {
385
385
  }
386
386
  export interface MakeProposalResponse {
387
387
  message: [] | [string];
388
- proposal_id: [] | [NeuronId];
388
+ proposal_id: [] | [ProposalId];
389
389
  }
390
390
  export interface MakingSnsProposal {
391
391
  proposal: [] | [Proposal];
@@ -672,7 +672,7 @@ export type ProposalActionRequest =
672
672
  | { AddOrRemoveNodeProvider: AddOrRemoveNodeProvider }
673
673
  | { Motion: Motion };
674
674
  export interface ProposalData {
675
- id: [] | [NeuronId];
675
+ id: [] | [ProposalId];
676
676
  failure_reason: [] | [GovernanceError];
677
677
  ballots: Array<[bigint, Ballot]>;
678
678
  proposal_timestamp_seconds: bigint;
@@ -690,8 +690,11 @@ export interface ProposalData {
690
690
  executed_timestamp_seconds: bigint;
691
691
  original_total_community_fund_maturity_e8s_equivalent: [] | [bigint];
692
692
  }
693
+ export interface ProposalId {
694
+ id: bigint;
695
+ }
693
696
  export interface ProposalInfo {
694
- id: [] | [NeuronId];
697
+ id: [] | [ProposalId];
695
698
  status: number;
696
699
  topic: number;
697
700
  failure_reason: [] | [GovernanceError];
@@ -711,7 +714,7 @@ export interface ProposalInfo {
711
714
  }
712
715
  export interface RegisterVote {
713
716
  vote: number;
714
- proposal: [] | [NeuronId];
717
+ proposal: [] | [ProposalId];
715
718
  }
716
719
  export interface RemoveHotKey {
717
720
  hot_key_to_remove: [] | [Principal];
@@ -748,7 +751,7 @@ export interface RewardEvent {
748
751
  total_available_e8s_equivalent: bigint;
749
752
  latest_round_available_e8s_equivalent: [] | [bigint];
750
753
  distributed_e8s_equivalent: bigint;
751
- settled_proposals: Array<NeuronId>;
754
+ settled_proposals: Array<ProposalId>;
752
755
  }
753
756
  export type RewardMode =
754
757
  | { RewardToNeuron: RewardToNeuron }
@@ -1,4 +1,4 @@
1
- // Generated from IC repo commit c43a488 (2024-09-27 tags: release-2024-09-26_01-31-no-canister-snapshots) 'rs/nns/governance/canister/governance.did' by import-candid
1
+ // Generated from IC repo commit a6ef593 (2024-10-24 tags: release-2024-10-23_03-07-ubuntu20.04) 'rs/nns/governance/canister/governance.did' by import-candid
2
2
  type AccountIdentifier = record {
3
3
  hash : blob;
4
4
  };
@@ -45,7 +45,7 @@ type Ballot = record {
45
45
 
46
46
  type BallotInfo = record {
47
47
  vote : int32;
48
- proposal_id : opt NeuronId;
48
+ proposal_id : opt ProposalId;
49
49
  };
50
50
 
51
51
  type By = variant {
@@ -254,7 +254,7 @@ type FollowersMap = record {
254
254
  };
255
255
 
256
256
  type GetNeuronsFundAuditInfoRequest = record {
257
- nns_proposal_id : opt NeuronId;
257
+ nns_proposal_id : opt ProposalId;
258
258
  };
259
259
 
260
260
  type GetNeuronsFundAuditInfoResponse = record {
@@ -438,7 +438,7 @@ type ListNodeProvidersResponse = record {
438
438
  type ListProposalInfo = record {
439
439
  include_reward_status : vec int32;
440
440
  omit_large_fields : opt bool;
441
- before_proposal : opt NeuronId;
441
+ before_proposal : opt ProposalId;
442
442
  limit : nat32;
443
443
  exclude_topic : vec int32;
444
444
  include_all_manage_neuron_proposals : opt bool;
@@ -458,7 +458,7 @@ type MakeProposalRequest = record {
458
458
 
459
459
  type MakeProposalResponse = record {
460
460
  message : opt text;
461
- proposal_id : opt NeuronId;
461
+ proposal_id : opt ProposalId;
462
462
  };
463
463
 
464
464
  type MakingSnsProposal = record {
@@ -602,6 +602,10 @@ type NeuronId = record {
602
602
  id : nat64;
603
603
  };
604
604
 
605
+ type ProposalId = record {
606
+ id : nat64;
607
+ };
608
+
605
609
  type NeuronIdOrSubaccount = variant {
606
610
  Subaccount : blob;
607
611
  NeuronId : NeuronId;
@@ -789,7 +793,7 @@ type ProposalActionRequest = variant {
789
793
  };
790
794
 
791
795
  type ProposalData = record {
792
- id : opt NeuronId;
796
+ id : opt ProposalId;
793
797
  failure_reason : opt GovernanceError;
794
798
  ballots : vec record { nat64; Ballot };
795
799
  proposal_timestamp_seconds : nat64;
@@ -809,7 +813,7 @@ type ProposalData = record {
809
813
  };
810
814
 
811
815
  type ProposalInfo = record {
812
- id : opt NeuronId;
816
+ id : opt ProposalId;
813
817
  status : int32;
814
818
  topic : int32;
815
819
  failure_reason : opt GovernanceError;
@@ -830,7 +834,7 @@ type ProposalInfo = record {
830
834
 
831
835
  type RegisterVote = record {
832
836
  vote : int32;
833
- proposal : opt NeuronId;
837
+ proposal : opt ProposalId;
834
838
  };
835
839
 
836
840
  type RemoveHotKey = record {
@@ -909,7 +913,7 @@ type RewardEvent = record {
909
913
  total_available_e8s_equivalent : nat64;
910
914
  latest_round_available_e8s_equivalent : opt nat64;
911
915
  distributed_e8s_equivalent : nat64;
912
- settled_proposals : vec NeuronId;
916
+ settled_proposals : vec ProposalId;
913
917
  };
914
918
 
915
919
  type RewardMode = variant {