@dfinity/sns 3.0.1 → 3.0.2-next-2024-03-25

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 +49 -45
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -219,9 +219,9 @@ Get the neuron of the Sns
219
219
 
220
220
  Same as `getNeuron` but returns undefined instead of raising error when not found.
221
221
 
222
- | Method | Type |
223
- | ------------- | ------------------------------------------------- |
224
- | `queryNeuron` | `(params: SnsGetNeuronParams) => Promise<Neuron>` |
222
+ | Method | Type |
223
+ | ------------- | -------------------------------------------------------------- |
224
+ | `queryNeuron` | `(params: SnsGetNeuronParams) => Promise<Neuron or undefined>` |
225
225
 
226
226
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L170)
227
227
 
@@ -259,9 +259,9 @@ Remove permissions to a neuron for a specific principal
259
259
 
260
260
  Split neuron
261
261
 
262
- | Method | Type |
263
- | ------------- | ----------------------------------------------------- |
264
- | `splitNeuron` | `(params: SnsSplitNeuronParams) => Promise<NeuronId>` |
262
+ | Method | Type |
263
+ | ------------- | ------------------------------------------------------------------ |
264
+ | `splitNeuron` | `(params: SnsSplitNeuronParams) => Promise<NeuronId or undefined>` |
265
265
 
266
266
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L223)
267
267
 
@@ -424,9 +424,13 @@ List the canisters that are part of the Sns.
424
424
 
425
425
  Source code: https://github.com/dfinity/ic/blob/master/rs/sns/root/src/lib.rs
426
426
 
427
- | Method | Type |
428
- | ------------------ | --------------------------------------------------------------------------------- |
429
- | `listSnsCanisters` | `({ certified, }: { certified?: boolean; }) => Promise<ListSnsCanistersResponse>` |
427
+ | Method | Type |
428
+ | ------------------ | ---------------------------------------------------------------------------------------------- |
429
+ | `listSnsCanisters` | `({ certified, }: { certified?: boolean or undefined; }) => Promise<ListSnsCanistersResponse>` |
430
+
431
+ Parameters:
432
+
433
+ - `params.certified`: - Query or update calls
430
434
 
431
435
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/root.canister.ts#L32)
432
436
 
@@ -470,9 +474,9 @@ Get the state of the swap
470
474
 
471
475
  Notify of the payment failure to remove the ticket
472
476
 
473
- | Method | Type |
474
- | ---------------------- | ----------------------- |
475
- | `notifyPaymentFailure` | `() => Promise<Ticket>` |
477
+ | Method | Type |
478
+ | ---------------------- | ------------------------------------ |
479
+ | `notifyPaymentFailure` | `() => Promise<Ticket or undefined>` |
476
480
 
477
481
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/swap.canister.ts#L54)
478
482
 
@@ -490,9 +494,9 @@ Notify of the user participating in the swap
490
494
 
491
495
  Get user commitment
492
496
 
493
- | Method | Type |
494
- | ------------------- | ----------------------------------------------------------------------- |
495
- | `getUserCommitment` | `(params: GetBuyerStateRequest and QueryParams) => Promise<BuyerState>` |
497
+ | Method | Type |
498
+ | ------------------- | ------------------------------------------------------------------------------------ |
499
+ | `getUserCommitment` | `(params: GetBuyerStateRequest and QueryParams) => Promise<BuyerState or undefined>` |
496
500
 
497
501
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/swap.canister.ts#L72)
498
502
 
@@ -520,9 +524,9 @@ Get sale parameters
520
524
 
521
525
  Return a sale ticket if created and not yet removed (payment flow)
522
526
 
523
- | Method | Type |
524
- | --------------- | ------------------------------------------ |
525
- | `getOpenTicket` | `(params: QueryParams) => Promise<Ticket>` |
527
+ | Method | Type |
528
+ | --------------- | ------------------------------------------------------- |
529
+ | `getOpenTicket` | `(params: QueryParams) => Promise<Ticket or undefined>` |
526
530
 
527
531
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/swap.canister.ts#L102)
528
532
 
@@ -716,9 +720,9 @@ Parameters:
716
720
 
717
721
  ##### :gear: queryNeuron
718
722
 
719
- | Method | Type |
720
- | ------------- | -------------------------------------------------------------------- |
721
- | `queryNeuron` | `(params: Omit<SnsGetNeuronParams, "certified">) => Promise<Neuron>` |
723
+ | Method | Type |
724
+ | ------------- | --------------------------------------------------------------------------------- |
725
+ | `queryNeuron` | `(params: Omit<SnsGetNeuronParams, "certified">) => Promise<Neuron or undefined>` |
722
726
 
723
727
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L189)
724
728
 
@@ -812,9 +816,9 @@ This is a convenient method that transfers the stake to the neuron subaccount an
812
816
 
813
817
  ##### :gear: splitNeuron
814
818
 
815
- | Method | Type |
816
- | ------------- | ----------------------------------------------------- |
817
- | `splitNeuron` | `(params: SnsSplitNeuronParams) => Promise<NeuronId>` |
819
+ | Method | Type |
820
+ | ------------- | ------------------------------------------------------------------ |
821
+ | `splitNeuron` | `(params: SnsSplitNeuronParams) => Promise<NeuronId or undefined>` |
818
822
 
819
823
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L349)
820
824
 
@@ -890,9 +894,9 @@ Only the owner of a ticket can remove it.
890
894
 
891
895
  Always certified
892
896
 
893
- | Method | Type |
894
- | ---------------------- | ----------------------- |
895
- | `notifyPaymentFailure` | `() => Promise<Ticket>` |
897
+ | Method | Type |
898
+ | ---------------------- | ------------------------------------ |
899
+ | `notifyPaymentFailure` | `() => Promise<Ticket or undefined>` |
896
900
 
897
901
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L395)
898
902
 
@@ -906,17 +910,17 @@ Always certified
906
910
 
907
911
  ##### :gear: getUserCommitment
908
912
 
909
- | Method | Type |
910
- | ------------------- | ------------------------------------------------------- |
911
- | `getUserCommitment` | `(params: GetBuyerStateRequest) => Promise<BuyerState>` |
913
+ | Method | Type |
914
+ | ------------------- | -------------------------------------------------------------------- |
915
+ | `getUserCommitment` | `(params: GetBuyerStateRequest) => Promise<BuyerState or undefined>` |
912
916
 
913
917
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L404)
914
918
 
915
919
  ##### :gear: getOpenTicket
916
920
 
917
- | Method | Type |
918
- | --------------- | ------------------------------------------------------------- |
919
- | `getOpenTicket` | `(params: Omit<QueryParams, "certified">) => Promise<Ticket>` |
921
+ | Method | Type |
922
+ | --------------- | -------------------------------------------------------------------------- |
923
+ | `getOpenTicket` | `(params: Omit<QueryParams, "certified">) => Promise<Ticket or undefined>` |
920
924
 
921
925
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L409)
922
926
 
@@ -930,33 +934,33 @@ Always certified
930
934
 
931
935
  ##### :gear: getLifecycle
932
936
 
933
- | Method | Type |
934
- | -------------- | --------------------------------------------------------------------------- |
935
- | `getLifecycle` | `(params: Omit<QueryParams, "certified">) => Promise<GetLifecycleResponse>` |
937
+ | Method | Type |
938
+ | -------------- | ---------------------------------------------------------------------------------------- |
939
+ | `getLifecycle` | `(params: Omit<QueryParams, "certified">) => Promise<GetLifecycleResponse or undefined>` |
936
940
 
937
941
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L418)
938
942
 
939
943
  ##### :gear: getFinalizationStatus
940
944
 
941
- | Method | Type |
942
- | ----------------------- | ---------------------------------------------------------------------------------------- |
943
- | `getFinalizationStatus` | `(params: Omit<QueryParams, "certified">) => Promise<GetAutoFinalizationStatusResponse>` |
945
+ | Method | Type |
946
+ | ----------------------- | ----------------------------------------------------------------------------------------------------- |
947
+ | `getFinalizationStatus` | `(params: Omit<QueryParams, "certified">) => Promise<GetAutoFinalizationStatusResponse or undefined>` |
944
948
 
945
949
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L423)
946
950
 
947
951
  ##### :gear: getSaleParameters
948
952
 
949
- | Method | Type |
950
- | ------------------- | -------------------------------------------------------------------------------- |
951
- | `getSaleParameters` | `(params: Omit<QueryParams, "certified">) => Promise<GetSaleParametersResponse>` |
953
+ | Method | Type |
954
+ | ------------------- | --------------------------------------------------------------------------------------------- |
955
+ | `getSaleParameters` | `(params: Omit<QueryParams, "certified">) => Promise<GetSaleParametersResponse or undefined>` |
952
956
 
953
957
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L428)
954
958
 
955
959
  ##### :gear: getDerivedState
956
960
 
957
- | Method | Type |
958
- | ----------------- | ------------------------------------------------------------------------------ |
959
- | `getDerivedState` | `(params: Omit<QueryParams, "certified">) => Promise<GetDerivedStateResponse>` |
961
+ | Method | Type |
962
+ | ----------------- | ------------------------------------------------------------------------------------------- |
963
+ | `getDerivedState` | `(params: Omit<QueryParams, "certified">) => Promise<GetDerivedStateResponse or undefined>` |
960
964
 
961
965
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/sns.wrapper.ts#L433)
962
966
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfinity/sns",
3
- "version": "3.0.1",
3
+ "version": "3.0.2-next-2024-03-25",
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": "^1.0.1",
40
- "@dfinity/candid": "^1.0.1",
41
- "@dfinity/ledger-icrc": "^2.2.0",
42
- "@dfinity/principal": "^1.0.1",
43
- "@dfinity/utils": "^2.1.2"
39
+ "@dfinity/agent": "*",
40
+ "@dfinity/candid": "*",
41
+ "@dfinity/ledger-icrc": "*",
42
+ "@dfinity/principal": "*",
43
+ "@dfinity/utils": "*"
44
44
  },
45
45
  "dependencies": {
46
46
  "@noble/hashes": "^1.3.2"
47
47
  }
48
- }
48
+ }