@dfinity/sns 0.0.18-next-2023-07-03 → 0.0.18

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 +161 -27
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -79,17 +79,11 @@ Lookup for the canister ids of a Sns and initialize the wrapper to access its fe
79
79
  | ---------------- | ---------------- |
80
80
  | `initSnsWrapper` | `InitSnsWrapper` |
81
81
 
82
- ### :factory: SnsGovernanceCanister
83
-
84
- #### Constructors
82
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.ts#L33)
85
83
 
86
- `public`
87
-
88
- Parameters:
84
+ ### :factory: SnsGovernanceCanister
89
85
 
90
- - `id`
91
- - `service`
92
- - `certifiedService`
86
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L60)
93
87
 
94
88
  #### Methods
95
89
 
@@ -130,6 +124,8 @@ Parameters:
130
124
 
131
125
  - `options`: Miscellaneous options to initialize the canister. Its ID being the only mandatory parammeter.
132
126
 
127
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L66)
128
+
133
129
  ##### :gear: listNeurons
134
130
 
135
131
  List the neurons of the Sns
@@ -138,6 +134,8 @@ List the neurons of the Sns
138
134
  | ------------- | ----------------------------------------------------- |
139
135
  | `listNeurons` | `(params: SnsListNeuronsParams) => Promise<Neuron[]>` |
140
136
 
137
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L80)
138
+
141
139
  ##### :gear: listProposals
142
140
 
143
141
  List the proposals of the Sns
@@ -146,6 +144,8 @@ List the proposals of the Sns
146
144
  | --------------- | ------------------------------------------------------------- |
147
145
  | `listProposals` | `(params: SnsListProposalsParams) => Promise<ProposalData[]>` |
148
146
 
147
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L94)
148
+
149
149
  ##### :gear: getProposal
150
150
 
151
151
  Get the proposal of the Sns
@@ -154,6 +154,8 @@ Get the proposal of the Sns
154
154
  | ------------- | --------------------------------------------------------- |
155
155
  | `getProposal` | `(params: SnsGetProposalParams) => Promise<ProposalData>` |
156
156
 
157
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L108)
158
+
157
159
  ##### :gear: listNervousSystemFunctions
158
160
 
159
161
  List Nervous System Functions
@@ -163,6 +165,8 @@ Neurons can follow other neurons in specific Nervous System Functions.
163
165
  | ---------------------------- | ---------------------------------------------------------------------- |
164
166
  | `listNervousSystemFunctions` | `(params: QueryParams) => Promise<ListNervousSystemFunctionsResponse>` |
165
167
 
168
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L127)
169
+
166
170
  ##### :gear: metadata
167
171
 
168
172
  Get the Sns metadata (title, description, etc.)
@@ -171,6 +175,8 @@ Get the Sns metadata (title, description, etc.)
171
175
  | ---------- | ------------------------------------------------------- |
172
176
  | `metadata` | `(params: QueryParams) => Promise<GetMetadataResponse>` |
173
177
 
178
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L135)
179
+
174
180
  ##### :gear: nervousSystemParameters
175
181
 
176
182
  Get the Sns nervous system parameters (default followees, max dissolve delay, max number of neurons, etc.)
@@ -179,6 +185,8 @@ Get the Sns nervous system parameters (default followees, max dissolve delay, ma
179
185
  | ------------------------- | ----------------------------------------------------------- |
180
186
  | `nervousSystemParameters` | `(params: QueryParams) => Promise<NervousSystemParameters>` |
181
187
 
188
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L141)
189
+
182
190
  ##### :gear: getNeuron
183
191
 
184
192
  Get the neuron of the Sns
@@ -187,6 +195,8 @@ Get the neuron of the Sns
187
195
  | ----------- | ------------------------------------------------- |
188
196
  | `getNeuron` | `(params: SnsGetNeuronParams) => Promise<Neuron>` |
189
197
 
198
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L149)
199
+
190
200
  ##### :gear: queryNeuron
191
201
 
192
202
  Same as `getNeuron` but returns undefined instead of raising error when not found.
@@ -195,6 +205,8 @@ Same as `getNeuron` but returns undefined instead of raising error when not foun
195
205
  | ------------- | ------------------------------------------------- |
196
206
  | `queryNeuron` | `(params: SnsGetNeuronParams) => Promise<Neuron>` |
197
207
 
208
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L167)
209
+
198
210
  ##### :gear: manageNeuron
199
211
 
200
212
  Manage neuron. For advanced users.
@@ -203,6 +215,8 @@ Manage neuron. For advanced users.
203
215
  | -------------- | ---------------------------------------------------------- |
204
216
  | `manageNeuron` | `(request: ManageNeuron) => Promise<ManageNeuronResponse>` |
205
217
 
218
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L187)
219
+
206
220
  ##### :gear: addNeuronPermissions
207
221
 
208
222
  Add permissions to a neuron for a specific principal
@@ -211,6 +225,8 @@ Add permissions to a neuron for a specific principal
211
225
  | ---------------------- | ------------------------------------------------------- |
212
226
  | `addNeuronPermissions` | `(params: SnsNeuronPermissionsParams) => Promise<void>` |
213
227
 
228
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L200)
229
+
214
230
  ##### :gear: removeNeuronPermissions
215
231
 
216
232
  Remove permissions to a neuron for a specific principal
@@ -219,6 +235,8 @@ Remove permissions to a neuron for a specific principal
219
235
  | ------------------------- | ------------------------------------------------------- |
220
236
  | `removeNeuronPermissions` | `(params: SnsNeuronPermissionsParams) => Promise<void>` |
221
237
 
238
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L210)
239
+
222
240
  ##### :gear: splitNeuron
223
241
 
224
242
  Split neuron
@@ -227,6 +245,8 @@ Split neuron
227
245
  | ------------- | ----------------------------------------------------- |
228
246
  | `splitNeuron` | `(params: SnsSplitNeuronParams) => Promise<NeuronId>` |
229
247
 
248
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L220)
249
+
230
250
  ##### :gear: disburse
231
251
 
232
252
  Disburse neuron on Account
@@ -235,6 +255,8 @@ Disburse neuron on Account
235
255
  | ---------- | ---------------------------------------------------- |
236
256
  | `disburse` | `(params: SnsDisburseNeuronParams) => Promise<void>` |
237
257
 
258
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L251)
259
+
238
260
  ##### :gear: startDissolving
239
261
 
240
262
  Start dissolving process of a neuron
@@ -243,6 +265,8 @@ Start dissolving process of a neuron
243
265
  | ----------------- | --------------------------------------- |
244
266
  | `startDissolving` | `(neuronId: NeuronId) => Promise<void>` |
245
267
 
268
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L259)
269
+
246
270
  ##### :gear: stopDissolving
247
271
 
248
272
  Stop dissolving process of a neuron
@@ -251,6 +275,8 @@ Stop dissolving process of a neuron
251
275
  | ---------------- | --------------------------------------- |
252
276
  | `stopDissolving` | `(neuronId: NeuronId) => Promise<void>` |
253
277
 
278
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L267)
279
+
254
280
  ##### :gear: stakeMaturity
255
281
 
256
282
  Stake the maturity of a neuron.
@@ -264,6 +290,8 @@ Parameters:
264
290
  - `neuronId`: The id of the neuron for which to stake the maturity
265
291
  - `percentageToStake`: Optional. Percentage of the current maturity to stake. If not provided, all of the neuron's current maturity will be staked.
266
292
 
293
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L279)
294
+
267
295
  ##### :gear: autoStakeMaturity
268
296
 
269
297
  Changes auto-stake maturity for a Neuron.
@@ -277,6 +305,8 @@ Parameters:
277
305
  - `neuronId`: The id of the neuron for which to request a change of the auto stake feature
278
306
  - `autoStake`: `true` to enable the auto-stake maturity for this neuron, `false` to turn it off
279
307
 
308
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L299)
309
+
280
310
  ##### :gear: setDissolveTimestamp
281
311
 
282
312
  Increase dissolve delay of a neuron
@@ -285,6 +315,8 @@ Increase dissolve delay of a neuron
285
315
  | ---------------------- | ---------------------------------------------------------- |
286
316
  | `setDissolveTimestamp` | `(params: SnsSetDissolveTimestampParams) => Promise<void>` |
287
317
 
318
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L309)
319
+
288
320
  ##### :gear: increaseDissolveDelay
289
321
 
290
322
  Increase dissolve delay of a neuron
@@ -293,6 +325,8 @@ Increase dissolve delay of a neuron
293
325
  | ----------------------- | ----------------------------------------------------------- |
294
326
  | `increaseDissolveDelay` | `(params: SnsIncreaseDissolveDelayParams) => Promise<void>` |
295
327
 
328
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L319)
329
+
296
330
  ##### :gear: setTopicFollowees
297
331
 
298
332
  Sets followees of a neuron for a specific Nervous System Function (topic)
@@ -301,6 +335,8 @@ Sets followees of a neuron for a specific Nervous System Function (topic)
301
335
  | ------------------- | ------------------------------------------------- |
302
336
  | `setTopicFollowees` | `(params: SnsSetTopicFollowees) => Promise<void>` |
303
337
 
338
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L329)
339
+
304
340
  ##### :gear: registerVote
305
341
 
306
342
  Registers vote for a proposal from the neuron passed.
@@ -309,6 +345,8 @@ Registers vote for a proposal from the neuron passed.
309
345
  | -------------- | -------------------------------------------------- |
310
346
  | `registerVote` | `(params: SnsRegisterVoteParams) => Promise<void>` |
311
347
 
348
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L337)
349
+
312
350
  ##### :gear: refreshNeuron
313
351
 
314
352
  Refresh neuron
@@ -317,6 +355,8 @@ Refresh neuron
317
355
  | --------------- | --------------------------------------- |
318
356
  | `refreshNeuron` | `(neuronId: NeuronId) => Promise<void>` |
319
357
 
358
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L345)
359
+
320
360
  ##### :gear: claimNeuron
321
361
 
322
362
  Claim neuron
@@ -325,17 +365,11 @@ Claim neuron
325
365
  | ------------- | -------------------------------------------------------------------------------- |
326
366
  | `claimNeuron` | `({ memo, controller, subaccount, }: SnsClaimNeuronParams) => Promise<NeuronId>` |
327
367
 
328
- ### :factory: SnsRootCanister
329
-
330
- #### Constructors
331
-
332
- `public`
368
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L355)
333
369
 
334
- Parameters:
370
+ ### :factory: SnsRootCanister
335
371
 
336
- - `id`
337
- - `service`
338
- - `certifiedService`
372
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/root.canister.ts#L10)
339
373
 
340
374
  #### Methods
341
375
 
@@ -348,6 +382,8 @@ Parameters:
348
382
  | -------- | ------------------------------------------------------------ |
349
383
  | `create` | `(options: SnsCanisterOptions<_SERVICE>) => SnsRootCanister` |
350
384
 
385
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/root.canister.ts#L11)
386
+
351
387
  ##### :gear: listSnsCanisters
352
388
 
353
389
  List the canisters that are part of the Sns.
@@ -358,17 +394,11 @@ Source code: https://github.com/dfinity/ic/blob/master/rs/sns/root/src/lib.rs
358
394
  | ------------------ | --------------------------------------------------------------------------------- |
359
395
  | `listSnsCanisters` | `({ certified, }: { certified?: boolean; }) => Promise<ListSnsCanistersResponse>` |
360
396
 
361
- ### :factory: SnsSwapCanister
362
-
363
- #### Constructors
397
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/root.canister.ts#L32)
364
398
 
365
- `public`
366
-
367
- Parameters:
399
+ ### :factory: SnsSwapCanister
368
400
 
369
- - `id`
370
- - `service`
371
- - `certifiedService`
401
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/swap.canister.ts#L30)
372
402
 
373
403
  #### Methods
374
404
 
@@ -389,6 +419,8 @@ Parameters:
389
419
  | -------- | ------------------------------------------------------------ |
390
420
  | `create` | `(options: SnsCanisterOptions<_SERVICE>) => SnsSwapCanister` |
391
421
 
422
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/swap.canister.ts#L31)
423
+
392
424
  ##### :gear: state
393
425
 
394
426
  Get the state of the swap
@@ -397,6 +429,8 @@ Get the state of the swap
397
429
  | ------- | ---------------------------------------------------- |
398
430
  | `state` | `(params: QueryParams) => Promise<GetStateResponse>` |
399
431
 
432
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/swap.canister.ts#L45)
433
+
400
434
  ##### :gear: notifyPaymentFailure
401
435
 
402
436
  Notify of the payment failure to remove the ticket
@@ -405,6 +439,8 @@ Notify of the payment failure to remove the ticket
405
439
  | ---------------------- | ----------------------- |
406
440
  | `notifyPaymentFailure` | `() => Promise<Ticket>` |
407
441
 
442
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/swap.canister.ts#L51)
443
+
408
444
  ##### :gear: notifyParticipation
409
445
 
410
446
  Notify of the user participating in the swap
@@ -413,6 +449,8 @@ Notify of the user participating in the swap
413
449
  | --------------------- | ---------------------------------------------------------------------------- |
414
450
  | `notifyParticipation` | `(params: RefreshBuyerTokensRequest) => Promise<RefreshBuyerTokensResponse>` |
415
451
 
452
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/swap.canister.ts#L61)
453
+
416
454
  ##### :gear: getUserCommitment
417
455
 
418
456
  Get user commitment
@@ -421,6 +459,8 @@ Get user commitment
421
459
  | ------------------- | ----------------------------------------------------------------------- |
422
460
  | `getUserCommitment` | `(params: GetBuyerStateRequest and QueryParams) => Promise<BuyerState>` |
423
461
 
462
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/swap.canister.ts#L69)
463
+
424
464
  ##### :gear: getDerivedState
425
465
 
426
466
  Get sale buyers state
@@ -429,6 +469,8 @@ Get sale buyers state
429
469
  | ----------------- | ------------------------------------------------------------------- |
430
470
  | `getDerivedState` | `({ certified, }: QueryParams) => Promise<GetDerivedStateResponse>` |
431
471
 
472
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/swap.canister.ts#L81)
473
+
432
474
  ##### :gear: getSaleParameters
433
475
 
434
476
  Get sale parameters
@@ -437,6 +479,8 @@ Get sale parameters
437
479
  | ------------------- | --------------------------------------------------------------------- |
438
480
  | `getSaleParameters` | `({ certified, }: QueryParams) => Promise<GetSaleParametersResponse>` |
439
481
 
482
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/swap.canister.ts#L90)
483
+
440
484
  ##### :gear: getOpenTicket
441
485
 
442
486
  Return a sale ticket if created and not yet removed (payment flow)
@@ -445,6 +489,8 @@ Return a sale ticket if created and not yet removed (payment flow)
445
489
  | --------------- | ------------------------------------------ |
446
490
  | `getOpenTicket` | `(params: QueryParams) => Promise<Ticket>` |
447
491
 
492
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/swap.canister.ts#L99)
493
+
448
494
  ##### :gear: newSaleTicket
449
495
 
450
496
  Create a sale ticket (payment flow)
@@ -453,6 +499,8 @@ Create a sale ticket (payment flow)
453
499
  | --------------- | -------------------------------------------------- |
454
500
  | `newSaleTicket` | `(params: NewSaleTicketParams) => Promise<Ticket>` |
455
501
 
502
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/swap.canister.ts#L116)
503
+
456
504
  ##### :gear: getLifecycle
457
505
 
458
506
  Get sale lifecycle state
@@ -461,12 +509,16 @@ Get sale lifecycle state
461
509
  | -------------- | -------------------------------------------------------- |
462
510
  | `getLifecycle` | `(params: QueryParams) => Promise<GetLifecycleResponse>` |
463
511
 
512
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/swap.canister.ts#L141)
513
+
464
514
  ### :factory: SnsWrapper
465
515
 
466
516
  Sns wrapper - notably used by NNS-dapp - ease the access to a particular Sns.
467
517
  It knows all the Sns' canisters, wrap and enhance their available features.
468
518
  A wrapper either performs query or update calls.
469
519
 
520
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L82)
521
+
470
522
  #### Constructors
471
523
 
472
524
  `public`: Constructor to instantiate a Sns
@@ -525,78 +577,104 @@ Parameters:
525
577
  | ------------- | ------------------------------------------------------------------------ |
526
578
  | `listNeurons` | `(params: Omit<SnsListNeuronsParams, "certified">) => Promise<Neuron[]>` |
527
579
 
580
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L128)
581
+
528
582
  ##### :gear: listProposals
529
583
 
530
584
  | Method | Type |
531
585
  | --------------- | -------------------------------------------------------------------------------- |
532
586
  | `listProposals` | `(params: Omit<SnsListProposalsParams, "certified">) => Promise<ProposalData[]>` |
533
587
 
588
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L132)
589
+
534
590
  ##### :gear: getProposal
535
591
 
536
592
  | Method | Type |
537
593
  | ------------- | ---------------------------------------------------------------------------- |
538
594
  | `getProposal` | `(params: Omit<SnsGetProposalParams, "certified">) => Promise<ProposalData>` |
539
595
 
596
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L137)
597
+
540
598
  ##### :gear: listNervousSystemFunctions
541
599
 
542
600
  | Method | Type |
543
601
  | ---------------------------- | ----------------------------------------------------------------------------------------- |
544
602
  | `listNervousSystemFunctions` | `(params: Omit<QueryParams, "certified">) => Promise<ListNervousSystemFunctionsResponse>` |
545
603
 
604
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L142)
605
+
546
606
  ##### :gear: metadata
547
607
 
548
608
  | Method | Type |
549
609
  | ---------- | ------------------------------------------------------------------------------------------------------- |
550
610
  | `metadata` | `(params: Omit<QueryParams, "certified">) => Promise<[GetMetadataResponse, IcrcTokenMetadataResponse]>` |
551
611
 
612
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L147)
613
+
552
614
  ##### :gear: nervousSystemParameters
553
615
 
554
616
  | Method | Type |
555
617
  | ------------------------- | ------------------------------------------------------------------------------ |
556
618
  | `nervousSystemParameters` | `(params: Omit<QueryParams, "certified">) => Promise<NervousSystemParameters>` |
557
619
 
620
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L155)
621
+
558
622
  ##### :gear: ledgerMetadata
559
623
 
560
624
  | Method | Type |
561
625
  | ---------------- | -------------------------------------------------------------------------------- |
562
626
  | `ledgerMetadata` | `(params: Omit<QueryParams, "certified">) => Promise<IcrcTokenMetadataResponse>` |
563
627
 
628
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L160)
629
+
564
630
  ##### :gear: transactionFee
565
631
 
566
632
  | Method | Type |
567
633
  | ---------------- | ------------------------------------------------------------- |
568
634
  | `transactionFee` | `(params: Omit<QueryParams, "certified">) => Promise<bigint>` |
569
635
 
636
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L165)
637
+
570
638
  ##### :gear: totalTokensSupply
571
639
 
572
640
  | Method | Type |
573
641
  | ------------------- | ------------------------------------------------------------- |
574
642
  | `totalTokensSupply` | `(params: Omit<QueryParams, "certified">) => Promise<bigint>` |
575
643
 
644
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L170)
645
+
576
646
  ##### :gear: balance
577
647
 
578
648
  | Method | Type |
579
649
  | --------- | --------------------------------------------------------------- |
580
650
  | `balance` | `(params: Omit<BalanceParams, "certified">) => Promise<bigint>` |
581
651
 
652
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L175)
653
+
582
654
  ##### :gear: transfer
583
655
 
584
656
  | Method | Type |
585
657
  | ---------- | --------------------------------------------- |
586
658
  | `transfer` | `(params: TransferParams) => Promise<bigint>` |
587
659
 
660
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L179)
661
+
588
662
  ##### :gear: getNeuron
589
663
 
590
664
  | Method | Type |
591
665
  | ----------- | -------------------------------------------------------------------- |
592
666
  | `getNeuron` | `(params: Omit<SnsGetNeuronParams, "certified">) => Promise<Neuron>` |
593
667
 
668
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L182)
669
+
594
670
  ##### :gear: queryNeuron
595
671
 
596
672
  | Method | Type |
597
673
  | ------------- | -------------------------------------------------------------------- |
598
674
  | `queryNeuron` | `(params: Omit<SnsGetNeuronParams, "certified">) => Promise<Neuron>` |
599
675
 
676
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L186)
677
+
600
678
  ##### :gear: nextNeuronAccount
601
679
 
602
680
  Returns the subaccount of the next neuron to be created.
@@ -615,6 +693,8 @@ This is how the backend can identify which neuron is being claimed.
615
693
  | ------------------- | ------------------------------------------------------------------------------ |
616
694
  | `nextNeuronAccount` | `(controller: Principal) => Promise<{ account: IcrcAccount; index: bigint; }>` |
617
695
 
696
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L207)
697
+
618
698
  ##### :gear: stakeNeuron
619
699
 
620
700
  Stakes a neuron.
@@ -627,6 +707,8 @@ This is a convenient method that transfers the stake to the neuron subaccount an
627
707
  | ------------- | ------------------------------------------------------------------------------------------------ |
628
708
  | `stakeNeuron` | `({ stakeE8s, source, controller, createdAt, fee, }: SnsStakeNeuronParams) => Promise<NeuronId>` |
629
709
 
710
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L254)
711
+
630
712
  ##### :gear: increaseStakeNeuron
631
713
 
632
714
  Increase the stake of a neuron.
@@ -639,90 +721,120 @@ This is a convenient method that transfers the stake to the neuron subaccount an
639
721
  | --------------------- | ---------------------------------------------------------------------------------- |
640
722
  | `increaseStakeNeuron` | `({ stakeE8s, source, neuronId, }: SnsIncreaseStakeNeuronParams) => Promise<void>` |
641
723
 
724
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L302)
725
+
642
726
  ##### :gear: getNeuronBalance
643
727
 
644
728
  | Method | Type |
645
729
  | ------------------ | ----------------------------------------- |
646
730
  | `getNeuronBalance` | `(neuronId: NeuronId) => Promise<bigint>` |
647
731
 
732
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L321)
733
+
648
734
  ##### :gear: addNeuronPermissions
649
735
 
650
736
  | Method | Type |
651
737
  | ---------------------- | ------------------------------------------------------- |
652
738
  | `addNeuronPermissions` | `(params: SnsNeuronPermissionsParams) => Promise<void>` |
653
739
 
740
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L330)
741
+
654
742
  ##### :gear: refreshNeuron
655
743
 
656
744
  | Method | Type |
657
745
  | --------------- | --------------------------------------- |
658
746
  | `refreshNeuron` | `(neuronId: NeuronId) => Promise<void>` |
659
747
 
748
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L334)
749
+
660
750
  ##### :gear: claimNeuron
661
751
 
662
752
  | Method | Type |
663
753
  | ------------- | ----------------------------------------------------- |
664
754
  | `claimNeuron` | `(params: SnsClaimNeuronParams) => Promise<NeuronId>` |
665
755
 
756
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L338)
757
+
666
758
  ##### :gear: removeNeuronPermissions
667
759
 
668
760
  | Method | Type |
669
761
  | ------------------------- | ------------------------------------------------------- |
670
762
  | `removeNeuronPermissions` | `(params: SnsNeuronPermissionsParams) => Promise<void>` |
671
763
 
764
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L342)
765
+
672
766
  ##### :gear: splitNeuron
673
767
 
674
768
  | Method | Type |
675
769
  | ------------- | ----------------------------------------------------- |
676
770
  | `splitNeuron` | `(params: SnsSplitNeuronParams) => Promise<NeuronId>` |
677
771
 
772
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L347)
773
+
678
774
  ##### :gear: disburse
679
775
 
680
776
  | Method | Type |
681
777
  | ---------- | ---------------------------------------------------- |
682
778
  | `disburse` | `(params: SnsDisburseNeuronParams) => Promise<void>` |
683
779
 
780
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L351)
781
+
684
782
  ##### :gear: startDissolving
685
783
 
686
784
  | Method | Type |
687
785
  | ----------------- | --------------------------------------- |
688
786
  | `startDissolving` | `(neuronId: NeuronId) => Promise<void>` |
689
787
 
788
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L355)
789
+
690
790
  ##### :gear: stopDissolving
691
791
 
692
792
  | Method | Type |
693
793
  | ---------------- | --------------------------------------- |
694
794
  | `stopDissolving` | `(neuronId: NeuronId) => Promise<void>` |
695
795
 
796
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L359)
797
+
696
798
  ##### :gear: setDissolveTimestamp
697
799
 
698
800
  | Method | Type |
699
801
  | ---------------------- | ---------------------------------------------------------- |
700
802
  | `setDissolveTimestamp` | `(params: SnsSetDissolveTimestampParams) => Promise<void>` |
701
803
 
804
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L363)
805
+
702
806
  ##### :gear: increaseDissolveDelay
703
807
 
704
808
  | Method | Type |
705
809
  | ----------------------- | ----------------------------------------------------------- |
706
810
  | `increaseDissolveDelay` | `(params: SnsIncreaseDissolveDelayParams) => Promise<void>` |
707
811
 
812
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L368)
813
+
708
814
  ##### :gear: setTopicFollowees
709
815
 
710
816
  | Method | Type |
711
817
  | ------------------- | ------------------------------------------------- |
712
818
  | `setTopicFollowees` | `(params: SnsSetTopicFollowees) => Promise<void>` |
713
819
 
820
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L373)
821
+
714
822
  ##### :gear: registerVote
715
823
 
716
824
  | Method | Type |
717
825
  | -------------- | -------------------------------------------------- |
718
826
  | `registerVote` | `(params: SnsRegisterVoteParams) => Promise<void>` |
719
827
 
828
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L377)
829
+
720
830
  ##### :gear: swapState
721
831
 
722
832
  | Method | Type |
723
833
  | ----------- | ----------------------------------------------------------------------- |
724
834
  | `swapState` | `(params: Omit<QueryParams, "certified">) => Promise<GetStateResponse>` |
725
835
 
836
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L380)
837
+
726
838
  ##### :gear: notifyPaymentFailure
727
839
 
728
840
  Returns the ticket if a ticket was found for the caller and the ticket
@@ -735,64 +847,86 @@ Always certified
735
847
  | ---------------------- | ----------------------- |
736
848
  | `notifyPaymentFailure` | `() => Promise<Ticket>` |
737
849
 
850
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L393)
851
+
738
852
  ##### :gear: notifyParticipation
739
853
 
740
854
  | Method | Type |
741
855
  | --------------------- | ---------------------------------------------------------------------------- |
742
856
  | `notifyParticipation` | `(params: RefreshBuyerTokensRequest) => Promise<RefreshBuyerTokensResponse>` |
743
857
 
858
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L397)
859
+
744
860
  ##### :gear: getUserCommitment
745
861
 
746
862
  | Method | Type |
747
863
  | ------------------- | ------------------------------------------------------- |
748
864
  | `getUserCommitment` | `(params: GetBuyerStateRequest) => Promise<BuyerState>` |
749
865
 
866
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L402)
867
+
750
868
  ##### :gear: getOpenTicket
751
869
 
752
870
  | Method | Type |
753
871
  | --------------- | ------------------------------------------------------------- |
754
872
  | `getOpenTicket` | `(params: Omit<QueryParams, "certified">) => Promise<Ticket>` |
755
873
 
874
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L407)
875
+
756
876
  ##### :gear: newSaleTicket
757
877
 
758
878
  | Method | Type |
759
879
  | --------------- | -------------------------------------------------- |
760
880
  | `newSaleTicket` | `(params: NewSaleTicketParams) => Promise<Ticket>` |
761
881
 
882
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L413)
883
+
762
884
  ##### :gear: getLifecycle
763
885
 
764
886
  | Method | Type |
765
887
  | -------------- | --------------------------------------------------------------------------- |
766
888
  | `getLifecycle` | `(params: Omit<QueryParams, "certified">) => Promise<GetLifecycleResponse>` |
767
889
 
890
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L416)
891
+
768
892
  ##### :gear: getSaleParameters
769
893
 
770
894
  | Method | Type |
771
895
  | ------------------- | -------------------------------------------------------------------------------- |
772
896
  | `getSaleParameters` | `(params: Omit<QueryParams, "certified">) => Promise<GetSaleParametersResponse>` |
773
897
 
898
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L421)
899
+
774
900
  ##### :gear: getDerivedState
775
901
 
776
902
  | Method | Type |
777
903
  | ----------------- | ------------------------------------------------------------------------------ |
778
904
  | `getDerivedState` | `(params: Omit<QueryParams, "certified">) => Promise<GetDerivedStateResponse>` |
779
905
 
906
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L426)
907
+
780
908
  ##### :gear: getTransactions
781
909
 
782
910
  | Method | Type |
783
911
  | ----------------- | -------------------------------------------------------------------- |
784
912
  | `getTransactions` | `(params: GetAccountTransactionsParams) => Promise<GetTransactions>` |
785
913
 
914
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L432)
915
+
786
916
  ##### :gear: stakeMaturity
787
917
 
788
918
  | Method | Type |
789
919
  | --------------- | --------------------------------------------------------- |
790
920
  | `stakeMaturity` | `(params: SnsNeuronStakeMaturityParams) => Promise<void>` |
791
921
 
922
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L437)
923
+
792
924
  ##### :gear: autoStakeMaturity
793
925
 
794
926
  | Method | Type |
795
927
  | ------------------- | ------------------------------------------------------------- |
796
928
  | `autoStakeMaturity` | `(params: SnsNeuronAutoStakeMaturityParams) => Promise<void>` |
797
929
 
930
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L441)
931
+
798
932
  <!-- TSDOC_END -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfinity/sns",
3
- "version": "0.0.18-next-2023-07-03",
3
+ "version": "0.0.18",
4
4
  "description": "A library for interfacing with a Service Nervous System (SNS) project.",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/cjs/index.cjs.js",
@@ -36,13 +36,13 @@
36
36
  "sns"
37
37
  ],
38
38
  "peerDependencies": {
39
- "@dfinity/agent": "*",
40
- "@dfinity/candid": "*",
41
- "@dfinity/ledger": "*",
42
- "@dfinity/principal": "*",
43
- "@dfinity/utils": "*"
39
+ "@dfinity/agent": "^0.15.4",
40
+ "@dfinity/candid": "^0.15.4",
41
+ "@dfinity/ledger": "^0.0.11",
42
+ "@dfinity/principal": "^0.15.4",
43
+ "@dfinity/utils": "^0.0.18"
44
44
  },
45
45
  "dependencies": {
46
46
  "js-sha256": "^0.9.0"
47
47
  }
48
- }
48
+ }