@dfinity/nns 0.16.3-next-2023-07-03 → 0.16.3

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 (2) hide show
  1. package/README.md +126 -0
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -87,6 +87,8 @@ Parameters:
87
87
  - `params.neurons`: The neurons to filter.
88
88
  - `params.proposal`: The proposal to match against the selected neurons.
89
89
 
90
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/utils/neurons.utils.ts#L39)
91
+
90
92
  #### :gear: votableNeurons
91
93
 
92
94
  Filter the neurons that can vote for a proposal - i.e. the neurons that have not voted yet and are eligible
@@ -100,6 +102,8 @@ Parameters:
100
102
  - `params.neurons`: The neurons to filter.
101
103
  - `params.proposal`: The proposal to match against the selected neurons.
102
104
 
105
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/utils/neurons.utils.ts#L68)
106
+
103
107
  #### :gear: votedNeurons
104
108
 
105
109
  Filter the neurons that have voted for a proposal.
@@ -113,8 +117,12 @@ Parameters:
113
117
  - `params.neurons`: The neurons to filter.
114
118
  - `params.proposal`: The proposal for which some neurons might have already voted.
115
119
 
120
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/utils/neurons.utils.ts#L94)
121
+
116
122
  ### :factory: AccountIdentifier
117
123
 
124
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/account_identifier.ts#L12)
125
+
118
126
  #### Methods
119
127
 
120
128
  - [fromHex](#gear-fromhex)
@@ -131,44 +139,60 @@ Parameters:
131
139
  | --------- | ------------------------------------ |
132
140
  | `fromHex` | `(hex: string) => AccountIdentifier` |
133
141
 
142
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/account_identifier.ts#L15)
143
+
134
144
  ##### :gear: fromPrincipal
135
145
 
136
146
  | Method | Type |
137
147
  | --------------- | ------------------------------------------------------------------------------------------------------- |
138
148
  | `fromPrincipal` | `({ principal, subAccount, }: { principal: Principal; subAccount?: SubAccount; }) => AccountIdentifier` |
139
149
 
150
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/account_identifier.ts#L19)
151
+
140
152
  ##### :gear: toProto
141
153
 
142
154
  | Method | Type |
143
155
  | --------- | ---------------------------------- |
144
156
  | `toProto` | `() => Promise<AccountIdentifier>` |
145
157
 
158
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/account_identifier.ts#L46)
159
+
146
160
  ##### :gear: toHex
147
161
 
148
162
  | Method | Type |
149
163
  | ------- | -------------- |
150
164
  | `toHex` | `() => string` |
151
165
 
166
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/account_identifier.ts#L54)
167
+
152
168
  ##### :gear: toUint8Array
153
169
 
154
170
  | Method | Type |
155
171
  | -------------- | ------------------ |
156
172
  | `toUint8Array` | `() => Uint8Array` |
157
173
 
174
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/account_identifier.ts#L58)
175
+
158
176
  ##### :gear: toNumbers
159
177
 
160
178
  | Method | Type |
161
179
  | ----------- | ---------------- |
162
180
  | `toNumbers` | `() => number[]` |
163
181
 
182
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/account_identifier.ts#L62)
183
+
164
184
  ##### :gear: toAccountIdentifierHash
165
185
 
166
186
  | Method | Type |
167
187
  | ------------------------- | ------------------------- |
168
188
  | `toAccountIdentifierHash` | `() => AccountIdentifier` |
169
189
 
190
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/account_identifier.ts#L66)
191
+
170
192
  ### :factory: SubAccount
171
193
 
194
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/account_identifier.ts#L73)
195
+
172
196
  #### Methods
173
197
 
174
198
  - [fromBytes](#gear-frombytes)
@@ -182,26 +206,36 @@ Parameters:
182
206
  | ----------- | -------------------------------------------- |
183
207
  | `fromBytes` | `(bytes: Uint8Array) => SubAccount or Error` |
184
208
 
209
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/account_identifier.ts#L76)
210
+
185
211
  ##### :gear: fromPrincipal
186
212
 
187
213
  | Method | Type |
188
214
  | --------------- | -------------------------------------- |
189
215
  | `fromPrincipal` | `(principal: Principal) => SubAccount` |
190
216
 
217
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/account_identifier.ts#L84)
218
+
191
219
  ##### :gear: fromID
192
220
 
193
221
  | Method | Type |
194
222
  | -------- | ---------------------------- |
195
223
  | `fromID` | `(id: number) => SubAccount` |
196
224
 
225
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/account_identifier.ts#L97)
226
+
197
227
  ##### :gear: toUint8Array
198
228
 
199
229
  | Method | Type |
200
230
  | -------------- | ------------------ |
201
231
  | `toUint8Array` | `() => Uint8Array` |
202
232
 
233
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/account_identifier.ts#L109)
234
+
203
235
  ### :factory: GenesisTokenCanister
204
236
 
237
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/genesis_token.canister.ts#L9)
238
+
205
239
  #### Methods
206
240
 
207
241
  - [create](#gear-create)
@@ -213,14 +247,20 @@ Parameters:
213
247
  | -------- | --------------------------------------------------------------- |
214
248
  | `create` | `(options?: CanisterOptions<_SERVICE>) => GenesisTokenCanister` |
215
249
 
250
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/genesis_token.canister.ts#L14)
251
+
216
252
  ##### :gear: claimNeurons
217
253
 
218
254
  | Method | Type |
219
255
  | -------------- | --------------------------------------------------------------- |
220
256
  | `claimNeurons` | `({ hexPubKey, }: { hexPubKey: string; }) => Promise<bigint[]>` |
221
257
 
258
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/genesis_token.canister.ts#L27)
259
+
222
260
  ### :factory: LedgerCanister
223
261
 
262
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/ledger.canister.ts#L27)
263
+
224
264
  #### Methods
225
265
 
226
266
  - [create](#gear-create)
@@ -234,6 +274,8 @@ Parameters:
234
274
  | -------- | ----------------------------------------------------- |
235
275
  | `create` | `(options?: LedgerCanisterOptions) => LedgerCanister` |
236
276
 
277
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/ledger.canister.ts#L38)
278
+
237
279
  ##### :gear: accountBalance
238
280
 
239
281
  Returns the balance of the specified account identifier.
@@ -245,6 +287,8 @@ it is fetched using a query call.
245
287
  | ---------------- | ------------------------------------------------------------------------------------------------------------------------ |
246
288
  | `accountBalance` | `({ accountIdentifier, certified, }: { accountIdentifier: AccountIdentifier; certified?: boolean; }) => Promise<bigint>` |
247
289
 
290
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/ledger.canister.ts#L70)
291
+
248
292
  ##### :gear: transactionFee
249
293
 
250
294
  Returns the transaction fee of the ledger canister
@@ -253,6 +297,8 @@ Returns the transaction fee of the ledger canister
253
297
  | ---------------- | ----------------------- |
254
298
  | `transactionFee` | `() => Promise<bigint>` |
255
299
 
300
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/ledger.canister.ts#L94)
301
+
256
302
  ##### :gear: transfer
257
303
 
258
304
  Transfer ICP from the caller to the destination `accountIdentifier`.
@@ -262,8 +308,12 @@ Returns the index of the block containing the tx if it was successful.
262
308
  | ---------- | ----------------------------------------------- |
263
309
  | `transfer` | `(request: TransferRequest) => Promise<bigint>` |
264
310
 
311
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/ledger.canister.ts#L107)
312
+
265
313
  ### :factory: GovernanceCanister
266
314
 
315
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L106)
316
+
267
317
  #### Methods
268
318
 
269
319
  - [create](#gear-create)
@@ -303,6 +353,8 @@ Returns the index of the block containing the tx if it was successful.
303
353
  | -------- | ------------------------------------------------------------- |
304
354
  | `create` | `(options?: GovernanceCanisterOptions) => GovernanceCanister` |
305
355
 
356
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L121)
357
+
306
358
  ##### :gear: listNeurons
307
359
 
308
360
  Returns the list of neurons controlled by the caller.
@@ -316,6 +368,8 @@ it is fetched using a query call.
316
368
  | ------------- | ----------------------------------------------------------------------------------------------------- |
317
369
  | `listNeurons` | `({ certified, neuronIds, }: { certified: boolean; neuronIds?: bigint[]; }) => Promise<NeuronInfo[]>` |
318
370
 
371
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L153)
372
+
319
373
  ##### :gear: listKnownNeurons
320
374
 
321
375
  Returns the list of neurons who have been approved by the community to
@@ -328,6 +382,8 @@ it is fetched using a query call.
328
382
  | ------------------ | ------------------------------------------------- |
329
383
  | `listKnownNeurons` | `(certified?: boolean) => Promise<KnownNeuron[]>` |
330
384
 
385
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L185)
386
+
331
387
  ##### :gear: getLastestRewardEvent
332
388
 
333
389
  Returns the latest reward event.
@@ -339,6 +395,8 @@ it's fetched using a query call.
339
395
  | ----------------------- | ----------------------------------------------- |
340
396
  | `getLastestRewardEvent` | `(certified?: boolean) => Promise<RewardEvent>` |
341
397
 
398
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L208)
399
+
342
400
  ##### :gear: listProposals
343
401
 
344
402
  Returns the list of proposals made for the community to vote on,
@@ -356,12 +414,16 @@ Parameters:
356
414
  - `request`: the options to list the proposals (limit number of results, topics to search for, etc.)
357
415
  - `certified`: query or update calls
358
416
 
417
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L224)
418
+
359
419
  ##### :gear: stakeNeuron
360
420
 
361
421
  | Method | Type |
362
422
  | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
363
423
  | `stakeNeuron` | `({ stake, principal, fromSubAccount, ledgerCanister, createdAt, fee, }: { stake: bigint; principal: Principal; fromSubAccount?: number[]; ledgerCanister: LedgerCanister; createdAt?: bigint; fee?: bigint; }) => Promise<bigint>` |
364
424
 
425
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L244)
426
+
365
427
  ##### :gear: increaseDissolveDelay
366
428
 
367
429
  Increases dissolve delay of a neuron
@@ -370,6 +432,8 @@ Increases dissolve delay of a neuron
370
432
  | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
371
433
  | `increaseDissolveDelay` | `({ neuronId, additionalDissolveDelaySeconds, }: { neuronId: bigint; additionalDissolveDelaySeconds: number; }) => Promise<void>` |
372
434
 
435
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L305)
436
+
373
437
  ##### :gear: setDissolveDelay
374
438
 
375
439
  Sets dissolve delay of a neuron.
@@ -379,6 +443,8 @@ The new date is now + dissolveDelaySeconds.
379
443
  | ------------------ | ------------------------------------------------------------------------------------------------------------- |
380
444
  | `setDissolveDelay` | `({ neuronId, dissolveDelaySeconds, }: { neuronId: bigint; dissolveDelaySeconds: number; }) => Promise<void>` |
381
445
 
446
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L337)
447
+
382
448
  ##### :gear: startDissolving
383
449
 
384
450
  Start dissolving process of a neuron
@@ -387,6 +453,8 @@ Start dissolving process of a neuron
387
453
  | ----------------- | ------------------------------------- |
388
454
  | `startDissolving` | `(neuronId: bigint) => Promise<void>` |
389
455
 
456
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L360)
457
+
390
458
  ##### :gear: stopDissolving
391
459
 
392
460
  Stop dissolving process of a neuron
@@ -395,6 +463,8 @@ Stop dissolving process of a neuron
395
463
  | ---------------- | ------------------------------------- |
396
464
  | `stopDissolving` | `(neuronId: bigint) => Promise<void>` |
397
465
 
466
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L377)
467
+
398
468
  ##### :gear: joinCommunityFund
399
469
 
400
470
  Neuron joins the community fund
@@ -403,6 +473,8 @@ Neuron joins the community fund
403
473
  | ------------------- | ------------------------------------- |
404
474
  | `joinCommunityFund` | `(neuronId: bigint) => Promise<void>` |
405
475
 
476
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L394)
477
+
406
478
  ##### :gear: autoStakeMaturity
407
479
 
408
480
  Changes auto-stake maturity for this Neuron. While on, auto-stake maturity will cause all the maturity generated by voting rewards to this neuron to be automatically staked and contribute to the voting power of the neuron.
@@ -416,6 +488,8 @@ Parameters:
416
488
  - `neuronId`: The id of the neuron for which to request a change of the auto stake feature
417
489
  - `autoStake`: `true` to enable the auto-stake maturity for this neuron, `false` to turn it off
418
490
 
491
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L416)
492
+
419
493
  ##### :gear: leaveCommunityFund
420
494
 
421
495
  Neuron leaves the community fund
@@ -424,6 +498,8 @@ Neuron leaves the community fund
424
498
  | -------------------- | ------------------------------------- |
425
499
  | `leaveCommunityFund` | `(neuronId: bigint) => Promise<void>` |
426
500
 
501
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L430)
502
+
427
503
  ##### :gear: setNodeProviderAccount
428
504
 
429
505
  Sets node provider reward account.
@@ -433,6 +509,8 @@ Where the reward is paid to.
433
509
  | ------------------------ | ---------------------------------------------- |
434
510
  | `setNodeProviderAccount` | `(accountIdentifier: string) => Promise<void>` |
435
511
 
512
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L447)
513
+
436
514
  ##### :gear: mergeNeurons
437
515
 
438
516
  Merge two neurons
@@ -441,6 +519,8 @@ Merge two neurons
441
519
  | -------------- | --------------------------------------------------------------------------------- |
442
520
  | `mergeNeurons` | `(request: { sourceNeuronId: bigint; targetNeuronId: bigint; }) => Promise<void>` |
443
521
 
522
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L467)
523
+
444
524
  ##### :gear: simulateMergeNeurons
445
525
 
446
526
  Simulate merging two neurons
@@ -449,6 +529,8 @@ Simulate merging two neurons
449
529
  | ---------------------- | --------------------------------------------------------------------------------------- |
450
530
  | `simulateMergeNeurons` | `(request: { sourceNeuronId: bigint; targetNeuronId: bigint; }) => Promise<NeuronInfo>` |
451
531
 
532
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L484)
533
+
452
534
  ##### :gear: splitNeuron
453
535
 
454
536
  Splits a neuron creating a new one
@@ -457,6 +539,8 @@ Splits a neuron creating a new one
457
539
  | ------------- | ----------------------------------------------------------------------------------- |
458
540
  | `splitNeuron` | `({ neuronId, amount, }: { neuronId: bigint; amount: bigint; }) => Promise<bigint>` |
459
541
 
542
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L529)
543
+
460
544
  ##### :gear: getProposal
461
545
 
462
546
  Returns single proposal info
@@ -468,6 +552,8 @@ it is fetched using a query call.
468
552
  | ------------- | ----------------------------------------------------------------------------------------------------- |
469
553
  | `getProposal` | `({ proposalId, certified, }: { proposalId: bigint; certified?: boolean; }) => Promise<ProposalInfo>` |
470
554
 
555
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L569)
556
+
471
557
  ##### :gear: makeProposal
472
558
 
473
559
  Create new proposal
@@ -476,6 +562,8 @@ Create new proposal
476
562
  | -------------- | ------------------------------------------------- |
477
563
  | `makeProposal` | `(request: MakeProposalRequest) => Promise<void>` |
478
564
 
565
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L586)
566
+
479
567
  ##### :gear: registerVote
480
568
 
481
569
  Registers vote for a proposal from the neuron passed.
@@ -484,6 +572,8 @@ Registers vote for a proposal from the neuron passed.
484
572
  | -------------- | ----------------------------------------------------------------------------------------------------------- |
485
573
  | `registerVote` | `({ neuronId, vote, proposalId, }: { neuronId: bigint; vote: Vote; proposalId: bigint; }) => Promise<void>` |
486
574
 
575
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L601)
576
+
487
577
  ##### :gear: setFollowees
488
578
 
489
579
  Edit neuron followees per topic
@@ -492,6 +582,8 @@ Edit neuron followees per topic
492
582
  | -------------- | ------------------------------------------------- |
493
583
  | `setFollowees` | `(followRequest: FollowRequest) => Promise<void>` |
494
584
 
585
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L623)
586
+
495
587
  ##### :gear: disburse
496
588
 
497
589
  Disburse neuron on Account
@@ -500,6 +592,8 @@ Disburse neuron on Account
500
592
  | ---------- | --------------------------------------------------------------------------------------------------------------------- |
501
593
  | `disburse` | `({ neuronId, toAccountId, amount, }: { neuronId: bigint; toAccountId?: string; amount?: bigint; }) => Promise<void>` |
502
594
 
595
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L638)
596
+
503
597
  ##### :gear: mergeMaturity
504
598
 
505
599
  Merge Maturity of a neuron
@@ -508,6 +602,8 @@ Merge Maturity of a neuron
508
602
  | --------------- | ------------------------------------------------------------------------------------------------------- |
509
603
  | `mergeMaturity` | `({ neuronId, percentageToMerge, }: { neuronId: bigint; percentageToMerge: number; }) => Promise<void>` |
510
604
 
605
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L677)
606
+
511
607
  ##### :gear: stakeMaturity
512
608
 
513
609
  Stake the maturity of a neuron.
@@ -521,6 +617,8 @@ Parameters:
521
617
  - `neuronId`: The id of the neuron for which to stake the maturity
522
618
  - `percentageToStake`: Optional. Percentage of the current maturity to stake. If not provided, all of the neuron's current maturity will be staked.
523
619
 
620
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L710)
621
+
524
622
  ##### :gear: spawnNeuron
525
623
 
526
624
  Merge Maturity of a neuron
@@ -529,6 +627,8 @@ Merge Maturity of a neuron
529
627
  | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
530
628
  | `spawnNeuron` | `({ neuronId, percentageToSpawn, newController, nonce, }: { neuronId: bigint; percentageToSpawn?: number; newController?: Principal; nonce?: bigint; }) => Promise<bigint>` |
531
629
 
630
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L732)
631
+
532
632
  ##### :gear: addHotkey
533
633
 
534
634
  Add hotkey to neuron
@@ -537,6 +637,8 @@ Add hotkey to neuron
537
637
  | ----------- | ------------------------------------------------------------------------------------------ |
538
638
  | `addHotkey` | `({ neuronId, principal, }: { neuronId: bigint; principal: Principal; }) => Promise<void>` |
539
639
 
640
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L786)
641
+
540
642
  ##### :gear: removeHotkey
541
643
 
542
644
  Remove hotkey to neuron
@@ -545,6 +647,8 @@ Remove hotkey to neuron
545
647
  | -------------- | ------------------------------------------------------------------------------------------ |
546
648
  | `removeHotkey` | `({ neuronId, principal, }: { neuronId: bigint; principal: Principal; }) => Promise<void>` |
547
649
 
650
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L810)
651
+
548
652
  ##### :gear: claimOrRefreshNeuronFromAccount
549
653
 
550
654
  Gets the NeuronID of a newly created neuron.
@@ -553,6 +657,8 @@ Gets the NeuronID of a newly created neuron.
553
657
  | --------------------------------- | --------------------------------------------------------------------------------------- |
554
658
  | `claimOrRefreshNeuronFromAccount` | `({ memo, controller, }: { memo: bigint; controller?: Principal; }) => Promise<bigint>` |
555
659
 
660
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L831)
661
+
556
662
  ##### :gear: claimOrRefreshNeuron
557
663
 
558
664
  Refreshes neuron and returns neuronId when successful
@@ -562,6 +668,8 @@ Uses query call only.
562
668
  | ---------------------- | ----------------------------------------------------------- |
563
669
  | `claimOrRefreshNeuron` | `(request: ClaimOrRefreshNeuronRequest) => Promise<bigint>` |
564
670
 
671
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L862)
672
+
565
673
  ##### :gear: getNeuron
566
674
 
567
675
  Return the data of the neuron provided as id.
@@ -570,10 +678,14 @@ Return the data of the neuron provided as id.
570
678
  | ----------- | ---------------------------------------------------------------------------------------------- |
571
679
  | `getNeuron` | `({ certified, neuronId, }: { certified: boolean; neuronId: bigint; }) => Promise<NeuronInfo>` |
572
680
 
681
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L897)
682
+
573
683
  ### :factory: ICP
574
684
 
575
685
  We don't extend to keep `fromE8s` and `fromString` as backwards compatible.
576
686
 
687
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/icp.ts#L14)
688
+
577
689
  #### Methods
578
690
 
579
691
  - [fromE8s](#gear-frome8s)
@@ -587,6 +699,8 @@ We don't extend to keep `fromE8s` and `fromString` as backwards compatible.
587
699
  | --------- | ------------------------- |
588
700
  | `fromE8s` | `(amount: bigint) => ICP` |
589
701
 
702
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/icp.ts#L17)
703
+
590
704
  ##### :gear: fromString
591
705
 
592
706
  Initialize from a string. Accepted formats:
@@ -599,20 +713,28 @@ Initialize from a string. Accepted formats:
599
713
  | ------------ | --------------------------------------------------- |
600
714
  | `fromString` | `(amount: string) => ICP or FromStringToTokenError` |
601
715
 
716
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/icp.ts#L28)
717
+
602
718
  ##### :gear: toE8s
603
719
 
604
720
  | Method | Type |
605
721
  | ------- | -------------- |
606
722
  | `toE8s` | `() => bigint` |
607
723
 
724
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/icp.ts#L36)
725
+
608
726
  ##### :gear: toProto
609
727
 
610
728
  | Method | Type |
611
729
  | --------- | ---------------------- |
612
730
  | `toProto` | `() => Promise<ICPTs>` |
613
731
 
732
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/icp.ts#L40)
733
+
614
734
  ### :factory: SnsWasmCanister
615
735
 
736
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/sns_wasm.canister.ts#L10)
737
+
616
738
  #### Methods
617
739
 
618
740
  - [create](#gear-create)
@@ -624,10 +746,14 @@ Initialize from a string. Accepted formats:
624
746
  | -------- | ---------------------------------------------------------- |
625
747
  | `create` | `(options?: CanisterOptions<_SERVICE>) => SnsWasmCanister` |
626
748
 
749
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/sns_wasm.canister.ts#L16)
750
+
627
751
  ##### :gear: listSnses
628
752
 
629
753
  | Method | Type |
630
754
  | ----------- | ---------------------------------------------------------------------- |
631
755
  | `listSnses` | `({ certified, }: { certified?: boolean; }) => Promise<DeployedSns[]>` |
632
756
 
757
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/sns_wasm.canister.ts#L29)
758
+
633
759
  <!-- TSDOC_END -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfinity/nns",
3
- "version": "0.16.3-next-2023-07-03",
3
+ "version": "0.16.3",
4
4
  "description": "A library for interfacing with the Internet Computer's Network Nervous System.",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/cjs/index.cjs.js",
@@ -51,10 +51,10 @@
51
51
  "network-nervous-system"
52
52
  ],
53
53
  "peerDependencies": {
54
- "@dfinity/agent": "*",
55
- "@dfinity/candid": "*",
56
- "@dfinity/nns-proto": "*",
57
- "@dfinity/principal": "*",
58
- "@dfinity/utils": "*"
54
+ "@dfinity/agent": "^0.15.4",
55
+ "@dfinity/candid": "^0.15.4",
56
+ "@dfinity/nns-proto": "^0.0.4",
57
+ "@dfinity/principal": "^0.15.4",
58
+ "@dfinity/utils": "^0.0.18"
59
59
  }
60
- }
60
+ }