@dfinity/sns 6.0.1-next-2025-12-08.1 → 6.0.1-next-2025-12-10.1

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 (52) hide show
  1. package/dist/index.d.ts +54 -19
  2. package/dist/index.js +1 -6
  3. package/dist/index.js.map +4 -4
  4. package/dist/index.mjs +1 -6
  5. package/dist/index.mjs.map +4 -4
  6. package/package.json +3 -8
  7. package/dist/candid/sns_governance.certified.idl.d.ts +0 -2
  8. package/dist/candid/sns_governance.certified.idl.js +0 -1432
  9. package/dist/candid/sns_governance.d.ts +0 -933
  10. package/dist/candid/sns_governance.did +0 -1069
  11. package/dist/candid/sns_governance.idl.d.ts +0 -2
  12. package/dist/candid/sns_governance.idl.js +0 -1440
  13. package/dist/candid/sns_governance_test.certified.idl.d.ts +0 -2
  14. package/dist/candid/sns_governance_test.certified.idl.js +0 -1460
  15. package/dist/candid/sns_governance_test.d.ts +0 -962
  16. package/dist/candid/sns_governance_test.did +0 -1094
  17. package/dist/candid/sns_governance_test.idl.d.ts +0 -2
  18. package/dist/candid/sns_governance_test.idl.js +0 -1468
  19. package/dist/candid/sns_root.certified.idl.d.ts +0 -2
  20. package/dist/candid/sns_root.certified.idl.js +0 -266
  21. package/dist/candid/sns_root.d.ts +0 -225
  22. package/dist/candid/sns_root.did +0 -245
  23. package/dist/candid/sns_root.idl.d.ts +0 -2
  24. package/dist/candid/sns_root.idl.js +0 -266
  25. package/dist/candid/sns_swap.certified.idl.d.ts +0 -2
  26. package/dist/candid/sns_swap.certified.idl.js +0 -499
  27. package/dist/candid/sns_swap.d.ts +0 -438
  28. package/dist/candid/sns_swap.did +0 -505
  29. package/dist/candid/sns_swap.idl.d.ts +0 -2
  30. package/dist/candid/sns_swap.idl.js +0 -507
  31. package/dist/constants/governance.constants.d.ts +0 -8
  32. package/dist/converters/governance.converters.d.ts +0 -22
  33. package/dist/converters/swap.converters.d.ts +0 -3
  34. package/dist/enums/governance.enums.d.ts +0 -35
  35. package/dist/enums/swap.enums.d.ts +0 -22
  36. package/dist/errors/common.errors.d.ts +0 -4
  37. package/dist/errors/governance.errors.d.ts +0 -2
  38. package/dist/errors/swap.errors.d.ts +0 -16
  39. package/dist/governance.canister.d.ts +0 -138
  40. package/dist/governance_test.canister.d.ts +0 -16
  41. package/dist/root.canister.d.ts +0 -19
  42. package/dist/sns.d.ts +0 -21
  43. package/dist/sns.wrapper.d.ts +0 -160
  44. package/dist/swap.canister.d.ts +0 -47
  45. package/dist/types/actions.d.ts +0 -191
  46. package/dist/types/canister.options.d.ts +0 -5
  47. package/dist/types/common.d.ts +0 -2
  48. package/dist/types/governance.params.d.ts +0 -151
  49. package/dist/types/governance_test.params.d.ts +0 -7
  50. package/dist/types/swap.params.d.ts +0 -8
  51. package/dist/utils/error.utils.d.ts +0 -12
  52. package/dist/utils/governance.utils.d.ts +0 -14
@@ -1,151 +0,0 @@
1
- import type { IcrcAccount, IcrcSubaccount, IcrcTokens } from "@dfinity/ledger-icrc";
2
- import type { QueryParams } from "@dfinity/utils";
3
- import type { Principal } from "@icp-sdk/core/principal";
4
- import type { NeuronId, ProposalId, Topic } from "../candid/sns_governance";
5
- import type { SnsNeuronPermissionType, SnsProposalDecisionStatus, SnsProposalRewardStatus, SnsVote } from "../enums/governance.enums";
6
- import type { E8s } from "./common";
7
- /**
8
- * The parameters available to list Sns neurons
9
- */
10
- export interface SnsListNeuronsParams extends QueryParams {
11
- /** Scope the query to a particular principal */
12
- principal?: Principal | undefined;
13
- /** The maximum number of neurons returned by the method `list_neurons` */
14
- limit?: number;
15
- /** Index the search to returns a list that starts after specified neuron id */
16
- beforeNeuronId?: NeuronId;
17
- }
18
- /**
19
- * The parameters available to list Sns proposals
20
- */
21
- export interface SnsListProposalsParams extends QueryParams {
22
- includeRewardStatus?: SnsProposalRewardStatus[];
23
- beforeProposal?: ProposalId;
24
- limit?: number;
25
- excludeType?: bigint[];
26
- includeStatus?: SnsProposalDecisionStatus[];
27
- includeTopics?: Array<Topic | null>;
28
- }
29
- export type SnsListTopicsParams = QueryParams;
30
- /**
31
- * The parameters to get an sns proposal
32
- */
33
- export interface SnsGetProposalParams extends QueryParams {
34
- proposalId: ProposalId;
35
- }
36
- /**
37
- * The parameters to get a Sns neuron
38
- */
39
- export interface SnsGetNeuronParams extends QueryParams {
40
- neuronId: NeuronId;
41
- }
42
- export interface SnsStakeNeuronParams extends Omit<QueryParams, "certified"> {
43
- stakeE8s: IcrcTokens;
44
- source: IcrcAccount;
45
- controller: Principal;
46
- createdAt?: bigint;
47
- fee?: bigint;
48
- }
49
- export interface SnsIncreaseStakeNeuronParams extends Omit<QueryParams, "certified"> {
50
- stakeE8s: IcrcTokens;
51
- source: IcrcAccount;
52
- neuronId: NeuronId;
53
- }
54
- export interface SnsClaimOrRefreshArgs extends Omit<QueryParams, "certified"> {
55
- subaccount: Uint8Array;
56
- memo?: bigint;
57
- controller?: Principal;
58
- }
59
- /**
60
- * General neuron management request parameter interface
61
- */
62
- interface SnsNeuronManagementParams extends Omit<QueryParams, "certified"> {
63
- neuronId: NeuronId;
64
- }
65
- /**
66
- * The parameters to add permissions to a neuron
67
- */
68
- export interface SnsNeuronPermissionsParams extends SnsNeuronManagementParams {
69
- principal: Principal;
70
- permissions: SnsNeuronPermissionType[];
71
- }
72
- /**
73
- * The parameters to split a neuron
74
- */
75
- export interface SnsSplitNeuronParams extends SnsNeuronManagementParams {
76
- amount: E8s;
77
- memo: bigint;
78
- }
79
- /**
80
- * The parameters to disburse a neuron
81
- */
82
- export interface SnsDisburseNeuronParams extends SnsNeuronManagementParams {
83
- amount?: E8s;
84
- toAccount?: IcrcAccount;
85
- }
86
- /**
87
- * The parameters to set dissolve timestamp
88
- */
89
- export interface SnsSetDissolveTimestampParams extends SnsNeuronManagementParams {
90
- dissolveTimestampSeconds: bigint;
91
- }
92
- /**
93
- * The parameters to increase dissolve delay
94
- */
95
- export interface SnsIncreaseDissolveDelayParams extends SnsNeuronManagementParams {
96
- additionalDissolveDelaySeconds: number;
97
- }
98
- /**
99
- * The parameters to follow by ns-function
100
- */
101
- export interface SnsSetTopicFollowees extends SnsNeuronManagementParams {
102
- functionId: bigint;
103
- followees: NeuronId[];
104
- }
105
- /**
106
- * The parameters to follow by topic
107
- */
108
- export interface SnsSetFollowingParams extends SnsNeuronManagementParams {
109
- topicFollowing: Array<{
110
- topic: Topic;
111
- followees: Array<{
112
- neuronId: NeuronId;
113
- alias?: string;
114
- }>;
115
- }>;
116
- }
117
- /**
118
- * The parameters to register vote
119
- */
120
- export interface SnsRegisterVoteParams extends SnsNeuronManagementParams {
121
- vote: SnsVote;
122
- proposalId: ProposalId;
123
- }
124
- /**
125
- * The parameters to claim a neuron
126
- */
127
- export interface SnsClaimNeuronParams {
128
- memo: bigint;
129
- controller: Principal;
130
- subaccount: IcrcSubaccount;
131
- }
132
- /**
133
- * The parameters to stake maturity of a neuron
134
- */
135
- export interface SnsNeuronStakeMaturityParams extends SnsNeuronManagementParams {
136
- percentageToStake?: number;
137
- }
138
- /**
139
- * The parameters to disburse maturity of a neuron
140
- */
141
- export interface SnsNeuronDisburseMaturityParams extends SnsNeuronManagementParams {
142
- toAccount?: IcrcAccount;
143
- percentageToDisburse: number;
144
- }
145
- /**
146
- * The parameters to toggle auto stake maturity of a neuron
147
- */
148
- export interface SnsNeuronAutoStakeMaturityParams extends SnsNeuronManagementParams {
149
- autoStake: boolean;
150
- }
151
- export {};
@@ -1,7 +0,0 @@
1
- import type { QueryParams } from "@dfinity/utils";
2
- import type { NeuronId } from "../candid/sns_governance";
3
- import type { E8s } from "./common";
4
- export interface SnsAddMaturityParams extends QueryParams {
5
- id: NeuronId;
6
- amountE8s: E8s;
7
- }
@@ -1,8 +0,0 @@
1
- import type { E8s } from "./common";
2
- /**
3
- * The parameters to create a sale ticket (payment flow)
4
- */
5
- export interface NewSaleTicketParams {
6
- subaccount?: Uint8Array;
7
- amount_icp_e8s: E8s;
8
- }
@@ -1,12 +0,0 @@
1
- /**
2
- * Identifies errors of method not being present in the canister.
3
- *
4
- * This is useful because SNS projects have different versions of SNS canisters.
5
- * Therefore, what works in the latest version might not work in the previous one.
6
- *
7
- * Error message example: "Call was rejected:
8
- * Request ID: 3a6ef904b35fd19721c95c3df2b0b00b8abefba7f0ad188f5c472809b772c914
9
- * Reject code: 3
10
- * Reject text: Canister 75ffu-oaaaa-aaaaa-aabbq-cai has no update method 'get_auto_finalization_status'"
11
- */
12
- export declare const isMethodNotSupportedError: (err: unknown) => boolean;
@@ -1,14 +0,0 @@
1
- import type { IcrcSubaccount } from "@dfinity/ledger-icrc";
2
- import type { Principal } from "@icp-sdk/core/principal";
3
- /**
4
- * Neuron subaccount is calculated as "sha256(0x0c . “neuron-stake” . controller . i)"
5
- *
6
- * @param params
7
- * @param {Principal} params.newController
8
- * @param {number} params.index
9
- * @returns
10
- */
11
- export declare const neuronSubaccount: ({ index, controller, }: {
12
- index: number;
13
- controller: Principal;
14
- }) => IcrcSubaccount;