@dfinity/nns 8.1.0 → 8.2.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/LICENSE +1 -1
- package/README.md +44 -33
- package/dist/candid/old_list_neurons_service.certified.idl.js +6 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +3 -3
- package/dist/esm/{chunk-2ADVJRZS.js → chunk-2YPF45NN.js} +3 -3
- package/dist/esm/chunk-2YPF45NN.js.map +7 -0
- package/dist/esm/governance.canister.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/types/canisters/governance/response.converters.d.ts +3 -2
- package/dist/types/governance.canister.d.ts +7 -1
- package/package.json +2 -2
- package/dist/esm/chunk-2ADVJRZS.js.map +0 -7
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
|
|
189
|
+
Copyright 2025 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
|
@@ -173,7 +173,7 @@ Parameters:
|
|
|
173
173
|
|
|
174
174
|
### :factory: GovernanceCanister
|
|
175
175
|
|
|
176
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
176
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L91)
|
|
177
177
|
|
|
178
178
|
#### Methods
|
|
179
179
|
|
|
@@ -209,6 +209,7 @@ Parameters:
|
|
|
209
209
|
- [claimOrRefreshNeuronFromAccount](#gear-claimorrefreshneuronfromaccount)
|
|
210
210
|
- [claimOrRefreshNeuron](#gear-claimorrefreshneuron)
|
|
211
211
|
- [getNeuron](#gear-getneuron)
|
|
212
|
+
- [getNetworkEconomicsParameters](#gear-getnetworkeconomicsparameters)
|
|
212
213
|
|
|
213
214
|
##### :gear: create
|
|
214
215
|
|
|
@@ -216,7 +217,7 @@ Parameters:
|
|
|
216
217
|
| -------- | ------------------------------------------------------------- |
|
|
217
218
|
| `create` | `(options?: GovernanceCanisterOptions) => GovernanceCanister` |
|
|
218
219
|
|
|
219
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
220
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L106)
|
|
220
221
|
|
|
221
222
|
##### :gear: listNeurons
|
|
222
223
|
|
|
@@ -233,7 +234,7 @@ The backend treats `includeEmptyNeurons` as true if absent.
|
|
|
233
234
|
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
234
235
|
| `listNeurons` | `({ certified, neuronIds, includeEmptyNeurons, includePublicNeurons, }: { certified: boolean; neuronIds?: bigint[] or undefined; includeEmptyNeurons?: boolean or undefined; includePublicNeurons?: boolean or undefined; }) => Promise<NeuronInfo[]>` |
|
|
235
236
|
|
|
236
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
237
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L146)
|
|
237
238
|
|
|
238
239
|
##### :gear: listKnownNeurons
|
|
239
240
|
|
|
@@ -247,7 +248,7 @@ it is fetched using a query call.
|
|
|
247
248
|
| ------------------ | ------------------------------------------------- |
|
|
248
249
|
| `listKnownNeurons` | `(certified?: boolean) => Promise<KnownNeuron[]>` |
|
|
249
250
|
|
|
250
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
251
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L189)
|
|
251
252
|
|
|
252
253
|
##### :gear: getLastestRewardEvent
|
|
253
254
|
|
|
@@ -260,7 +261,7 @@ it's fetched using a query call.
|
|
|
260
261
|
| ----------------------- | ----------------------------------------------- |
|
|
261
262
|
| `getLastestRewardEvent` | `(certified?: boolean) => Promise<RewardEvent>` |
|
|
262
263
|
|
|
263
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
264
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L211)
|
|
264
265
|
|
|
265
266
|
##### :gear: listProposals
|
|
266
267
|
|
|
@@ -279,7 +280,7 @@ Parameters:
|
|
|
279
280
|
- `request`: the options to list the proposals (limit number of results, topics to search for, etc.)
|
|
280
281
|
- `certified`: query or update calls
|
|
281
282
|
|
|
282
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
283
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L227)
|
|
283
284
|
|
|
284
285
|
##### :gear: stakeNeuron
|
|
285
286
|
|
|
@@ -287,7 +288,7 @@ Parameters:
|
|
|
287
288
|
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
288
289
|
| `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<...>` |
|
|
289
290
|
|
|
290
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
291
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L246)
|
|
291
292
|
|
|
292
293
|
##### :gear: increaseDissolveDelay
|
|
293
294
|
|
|
@@ -297,7 +298,7 @@ Increases dissolve delay of a neuron
|
|
|
297
298
|
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
298
299
|
| `increaseDissolveDelay` | `({ neuronId, additionalDissolveDelaySeconds, }: { neuronId: bigint; additionalDissolveDelaySeconds: number; }) => Promise<void>` |
|
|
299
300
|
|
|
300
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
301
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L307)
|
|
301
302
|
|
|
302
303
|
##### :gear: setDissolveDelay
|
|
303
304
|
|
|
@@ -308,7 +309,7 @@ The new date is now + dissolveDelaySeconds.
|
|
|
308
309
|
| ------------------ | ------------------------------------------------------------------------------------------------------------- |
|
|
309
310
|
| `setDissolveDelay` | `({ neuronId, dissolveDelaySeconds, }: { neuronId: bigint; dissolveDelaySeconds: number; }) => Promise<void>` |
|
|
310
311
|
|
|
311
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
312
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L333)
|
|
312
313
|
|
|
313
314
|
##### :gear: startDissolving
|
|
314
315
|
|
|
@@ -318,7 +319,7 @@ Start dissolving process of a neuron
|
|
|
318
319
|
| ----------------- | ------------------------------------- |
|
|
319
320
|
| `startDissolving` | `(neuronId: bigint) => Promise<void>` |
|
|
320
321
|
|
|
321
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
322
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L356)
|
|
322
323
|
|
|
323
324
|
##### :gear: stopDissolving
|
|
324
325
|
|
|
@@ -328,7 +329,7 @@ Stop dissolving process of a neuron
|
|
|
328
329
|
| ---------------- | ------------------------------------- |
|
|
329
330
|
| `stopDissolving` | `(neuronId: bigint) => Promise<void>` |
|
|
330
331
|
|
|
331
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
332
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L370)
|
|
332
333
|
|
|
333
334
|
##### :gear: joinCommunityFund
|
|
334
335
|
|
|
@@ -338,7 +339,7 @@ Neuron joins the community fund
|
|
|
338
339
|
| ------------------- | ------------------------------------- |
|
|
339
340
|
| `joinCommunityFund` | `(neuronId: bigint) => Promise<void>` |
|
|
340
341
|
|
|
341
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
342
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L384)
|
|
342
343
|
|
|
343
344
|
##### :gear: autoStakeMaturity
|
|
344
345
|
|
|
@@ -353,7 +354,7 @@ Parameters:
|
|
|
353
354
|
- `neuronId`: The id of the neuron for which to request a change of the auto stake feature
|
|
354
355
|
- `autoStake`: `true` to enable the auto-stake maturity for this neuron, `false` to turn it off
|
|
355
356
|
|
|
356
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
357
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L402)
|
|
357
358
|
|
|
358
359
|
##### :gear: leaveCommunityFund
|
|
359
360
|
|
|
@@ -363,7 +364,7 @@ Neuron leaves the community fund
|
|
|
363
364
|
| -------------------- | ------------------------------------- |
|
|
364
365
|
| `leaveCommunityFund` | `(neuronId: bigint) => Promise<void>` |
|
|
365
366
|
|
|
366
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
367
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L417)
|
|
367
368
|
|
|
368
369
|
##### :gear: setVisibility
|
|
369
370
|
|
|
@@ -373,7 +374,7 @@ Set visibility of a neuron
|
|
|
373
374
|
| --------------- | ------------------------------------------------------------------- |
|
|
374
375
|
| `setVisibility` | `(neuronId: bigint, visibility: NeuronVisibility) => Promise<void>` |
|
|
375
376
|
|
|
376
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
377
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L431)
|
|
377
378
|
|
|
378
379
|
##### :gear: setNodeProviderAccount
|
|
379
380
|
|
|
@@ -384,7 +385,7 @@ Where the reward is paid to.
|
|
|
384
385
|
| ------------------------ | ---------------------------------------------- |
|
|
385
386
|
| `setNodeProviderAccount` | `(accountIdentifier: string) => Promise<void>` |
|
|
386
387
|
|
|
387
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
388
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L451)
|
|
388
389
|
|
|
389
390
|
##### :gear: mergeNeurons
|
|
390
391
|
|
|
@@ -394,7 +395,7 @@ Merge two neurons
|
|
|
394
395
|
| -------------- | --------------------------------------------------------------------------------- |
|
|
395
396
|
| `mergeNeurons` | `(request: { sourceNeuronId: bigint; targetNeuronId: bigint; }) => Promise<void>` |
|
|
396
397
|
|
|
397
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
398
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L471)
|
|
398
399
|
|
|
399
400
|
##### :gear: simulateMergeNeurons
|
|
400
401
|
|
|
@@ -404,7 +405,7 @@ Simulate merging two neurons
|
|
|
404
405
|
| ---------------------- | --------------------------------------------------------------------------------------- |
|
|
405
406
|
| `simulateMergeNeurons` | `(request: { sourceNeuronId: bigint; targetNeuronId: bigint; }) => Promise<NeuronInfo>` |
|
|
406
407
|
|
|
407
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
408
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L488)
|
|
408
409
|
|
|
409
410
|
##### :gear: splitNeuron
|
|
410
411
|
|
|
@@ -414,7 +415,7 @@ Splits a neuron creating a new one
|
|
|
414
415
|
| ------------- | ----------------------------------------------------------------------------------- |
|
|
415
416
|
| `splitNeuron` | `({ neuronId, amount, }: { neuronId: bigint; amount: bigint; }) => Promise<bigint>` |
|
|
416
417
|
|
|
417
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
418
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L533)
|
|
418
419
|
|
|
419
420
|
##### :gear: getProposal
|
|
420
421
|
|
|
@@ -427,7 +428,7 @@ it is fetched using a query call.
|
|
|
427
428
|
| ------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
428
429
|
| `getProposal` | `({ proposalId, certified, }: { proposalId: bigint; certified?: boolean or undefined; }) => Promise<ProposalInfo or undefined>` |
|
|
429
430
|
|
|
430
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
431
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L573)
|
|
431
432
|
|
|
432
433
|
##### :gear: makeProposal
|
|
433
434
|
|
|
@@ -437,7 +438,7 @@ Create new proposal
|
|
|
437
438
|
| -------------- | ---------------------------------------------------------------- |
|
|
438
439
|
| `makeProposal` | `(request: MakeProposalRequest) => Promise<bigint or undefined>` |
|
|
439
440
|
|
|
440
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
441
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L591)
|
|
441
442
|
|
|
442
443
|
##### :gear: registerVote
|
|
443
444
|
|
|
@@ -447,7 +448,7 @@ Registers vote for a proposal from the neuron passed.
|
|
|
447
448
|
| -------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
448
449
|
| `registerVote` | `({ neuronId, vote, proposalId, }: { neuronId: bigint; vote: Vote; proposalId: bigint; }) => Promise<void>` |
|
|
449
450
|
|
|
450
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
451
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L612)
|
|
451
452
|
|
|
452
453
|
##### :gear: setFollowees
|
|
453
454
|
|
|
@@ -457,7 +458,7 @@ Edit neuron followees per topic
|
|
|
457
458
|
| -------------- | ------------------------------------------------- |
|
|
458
459
|
| `setFollowees` | `(followRequest: FollowRequest) => Promise<void>` |
|
|
459
460
|
|
|
460
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
461
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L634)
|
|
461
462
|
|
|
462
463
|
##### :gear: disburse
|
|
463
464
|
|
|
@@ -467,7 +468,7 @@ Disburse neuron on Account
|
|
|
467
468
|
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
468
469
|
| `disburse` | `({ neuronId, toAccountId, amount, }: { neuronId: bigint; toAccountId?: string or undefined; amount?: bigint or undefined; }) => Promise<void>` |
|
|
469
470
|
|
|
470
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
471
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L649)
|
|
471
472
|
|
|
472
473
|
##### :gear: refreshVotingPower
|
|
473
474
|
|
|
@@ -479,7 +480,7 @@ parameter of the neuron to the current time).
|
|
|
479
480
|
| -------------------- | --------------------------------------------------------- |
|
|
480
481
|
| `refreshVotingPower` | `({ neuronId, }: { neuronId: bigint; }) => Promise<void>` |
|
|
481
482
|
|
|
482
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
483
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L685)
|
|
483
484
|
|
|
484
485
|
##### :gear: mergeMaturity
|
|
485
486
|
|
|
@@ -489,7 +490,7 @@ Merge Maturity of a neuron
|
|
|
489
490
|
| --------------- | ------------------------------------------------------------------------------------------------------- |
|
|
490
491
|
| `mergeMaturity` | `({ neuronId, percentageToMerge, }: { neuronId: bigint; percentageToMerge: number; }) => Promise<void>` |
|
|
491
492
|
|
|
492
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
493
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L707)
|
|
493
494
|
|
|
494
495
|
##### :gear: stakeMaturity
|
|
495
496
|
|
|
@@ -504,7 +505,7 @@ Parameters:
|
|
|
504
505
|
- `neuronId`: The id of the neuron for which to stake the maturity
|
|
505
506
|
- `percentageToStake`: Optional. Percentage of the current maturity to stake. If not provided, all of the neuron's current maturity will be staked.
|
|
506
507
|
|
|
507
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
508
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L736)
|
|
508
509
|
|
|
509
510
|
##### :gear: spawnNeuron
|
|
510
511
|
|
|
@@ -514,7 +515,7 @@ Merge Maturity of a neuron
|
|
|
514
515
|
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
515
516
|
| `spawnNeuron` | `({ neuronId, percentageToSpawn, newController, nonce, }: { neuronId: bigint; percentageToSpawn?: number or undefined; newController?: Principal or undefined; nonce?: bigint or undefined; }) => Promise<bigint>` |
|
|
516
517
|
|
|
517
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
518
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L758)
|
|
518
519
|
|
|
519
520
|
##### :gear: addHotkey
|
|
520
521
|
|
|
@@ -524,7 +525,7 @@ Add hotkey to neuron
|
|
|
524
525
|
| ----------- | ------------------------------------------------------------------------------------------ |
|
|
525
526
|
| `addHotkey` | `({ neuronId, principal, }: { neuronId: bigint; principal: Principal; }) => Promise<void>` |
|
|
526
527
|
|
|
527
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
528
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L805)
|
|
528
529
|
|
|
529
530
|
##### :gear: removeHotkey
|
|
530
531
|
|
|
@@ -534,7 +535,7 @@ Remove hotkey to neuron
|
|
|
534
535
|
| -------------- | ------------------------------------------------------------------------------------------ |
|
|
535
536
|
| `removeHotkey` | `({ neuronId, principal, }: { neuronId: bigint; principal: Principal; }) => Promise<void>` |
|
|
536
537
|
|
|
537
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
538
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L825)
|
|
538
539
|
|
|
539
540
|
##### :gear: claimOrRefreshNeuronFromAccount
|
|
540
541
|
|
|
@@ -544,7 +545,7 @@ Gets the NeuronID of a newly created neuron.
|
|
|
544
545
|
| --------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
545
546
|
| `claimOrRefreshNeuronFromAccount` | `({ memo, controller, }: { memo: bigint; controller?: Principal or undefined; }) => Promise<bigint or undefined>` |
|
|
546
547
|
|
|
547
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
548
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L843)
|
|
548
549
|
|
|
549
550
|
##### :gear: claimOrRefreshNeuron
|
|
550
551
|
|
|
@@ -555,7 +556,7 @@ Uses query call only.
|
|
|
555
556
|
| ---------------------- | ------------------------------------------------------------------------ |
|
|
556
557
|
| `claimOrRefreshNeuron` | `(request: ClaimOrRefreshNeuronRequest) => Promise<bigint or undefined>` |
|
|
557
558
|
|
|
558
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
559
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L874)
|
|
559
560
|
|
|
560
561
|
##### :gear: getNeuron
|
|
561
562
|
|
|
@@ -565,7 +566,17 @@ Return the data of the neuron provided as id.
|
|
|
565
566
|
| ----------- | ----------------------------------------------------------------------------------------------------------- |
|
|
566
567
|
| `getNeuron` | `({ certified, neuronId, }: { certified: boolean; neuronId: bigint; }) => Promise<NeuronInfo or undefined>` |
|
|
567
568
|
|
|
568
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#
|
|
569
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L899)
|
|
570
|
+
|
|
571
|
+
##### :gear: getNetworkEconomicsParameters
|
|
572
|
+
|
|
573
|
+
Return the [Network Economics](https://github.com/dfinity/ic/blob/d90e934eb440c730d44d9d9b1ece2cc3f9505d05/rs/nns/governance/proto/ic_nns_governance/pb/v1/governance.proto#L1847).
|
|
574
|
+
|
|
575
|
+
| Method | Type |
|
|
576
|
+
| ------------------------------- | ------------------------------------------------------------------------ |
|
|
577
|
+
| `getNetworkEconomicsParameters` | `({ certified, }: { certified: boolean; }) => Promise<NetworkEconomics>` |
|
|
578
|
+
|
|
579
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L920)
|
|
569
580
|
|
|
570
581
|
### :factory: SnsWasmCanister
|
|
571
582
|
|
|
@@ -34,10 +34,13 @@ export const idlFactory = ({ IDL }) => {
|
|
|
34
34
|
'staked_maturity_e8s_equivalent' : IDL.Opt(IDL.Nat64),
|
|
35
35
|
'controller' : IDL.Opt(IDL.Principal),
|
|
36
36
|
'recent_ballots' : IDL.Vec(BallotInfo),
|
|
37
|
+
'voting_power_refreshed_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
37
38
|
'kyc_verified' : IDL.Bool,
|
|
39
|
+
'potential_voting_power' : IDL.Opt(IDL.Nat64),
|
|
38
40
|
'neuron_type' : IDL.Opt(IDL.Int32),
|
|
39
41
|
'not_for_profit' : IDL.Bool,
|
|
40
42
|
'maturity_e8s_equivalent' : IDL.Nat64,
|
|
43
|
+
'deciding_voting_power' : IDL.Opt(IDL.Nat64),
|
|
41
44
|
'cached_neuron_stake_e8s' : IDL.Nat64,
|
|
42
45
|
'created_timestamp_seconds' : IDL.Nat64,
|
|
43
46
|
'auto_stake_maturity' : IDL.Opt(IDL.Bool),
|
|
@@ -56,7 +59,10 @@ export const idlFactory = ({ IDL }) => {
|
|
|
56
59
|
const NeuronInfo = IDL.Record({
|
|
57
60
|
'dissolve_delay_seconds' : IDL.Nat64,
|
|
58
61
|
'recent_ballots' : IDL.Vec(BallotInfo),
|
|
62
|
+
'voting_power_refreshed_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
63
|
+
'potential_voting_power' : IDL.Opt(IDL.Nat64),
|
|
59
64
|
'neuron_type' : IDL.Opt(IDL.Int32),
|
|
65
|
+
'deciding_voting_power' : IDL.Opt(IDL.Nat64),
|
|
60
66
|
'created_timestamp_seconds' : IDL.Nat64,
|
|
61
67
|
'state' : IDL.Int32,
|
|
62
68
|
'stake_e8s' : IDL.Nat64,
|