@dfinity/sns 6.0.1 → 7.0.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.
Files changed (53) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.ts +54 -19
  3. package/dist/index.js +1 -6
  4. package/dist/index.js.map +4 -4
  5. package/dist/index.mjs +1 -6
  6. package/dist/index.mjs.map +4 -4
  7. package/package.json +3 -8
  8. package/dist/candid/sns_governance.certified.idl.d.ts +0 -2
  9. package/dist/candid/sns_governance.certified.idl.js +0 -1432
  10. package/dist/candid/sns_governance.d.ts +0 -933
  11. package/dist/candid/sns_governance.did +0 -1069
  12. package/dist/candid/sns_governance.idl.d.ts +0 -2
  13. package/dist/candid/sns_governance.idl.js +0 -1440
  14. package/dist/candid/sns_governance_test.certified.idl.d.ts +0 -2
  15. package/dist/candid/sns_governance_test.certified.idl.js +0 -1460
  16. package/dist/candid/sns_governance_test.d.ts +0 -962
  17. package/dist/candid/sns_governance_test.did +0 -1094
  18. package/dist/candid/sns_governance_test.idl.d.ts +0 -2
  19. package/dist/candid/sns_governance_test.idl.js +0 -1468
  20. package/dist/candid/sns_root.certified.idl.d.ts +0 -2
  21. package/dist/candid/sns_root.certified.idl.js +0 -251
  22. package/dist/candid/sns_root.d.ts +0 -212
  23. package/dist/candid/sns_root.did +0 -231
  24. package/dist/candid/sns_root.idl.d.ts +0 -2
  25. package/dist/candid/sns_root.idl.js +0 -251
  26. package/dist/candid/sns_swap.certified.idl.d.ts +0 -2
  27. package/dist/candid/sns_swap.certified.idl.js +0 -499
  28. package/dist/candid/sns_swap.d.ts +0 -438
  29. package/dist/candid/sns_swap.did +0 -505
  30. package/dist/candid/sns_swap.idl.d.ts +0 -2
  31. package/dist/candid/sns_swap.idl.js +0 -507
  32. package/dist/constants/governance.constants.d.ts +0 -8
  33. package/dist/converters/governance.converters.d.ts +0 -22
  34. package/dist/converters/swap.converters.d.ts +0 -3
  35. package/dist/enums/governance.enums.d.ts +0 -35
  36. package/dist/enums/swap.enums.d.ts +0 -22
  37. package/dist/errors/common.errors.d.ts +0 -4
  38. package/dist/errors/governance.errors.d.ts +0 -2
  39. package/dist/errors/swap.errors.d.ts +0 -16
  40. package/dist/governance.canister.d.ts +0 -138
  41. package/dist/governance_test.canister.d.ts +0 -16
  42. package/dist/root.canister.d.ts +0 -19
  43. package/dist/sns.d.ts +0 -21
  44. package/dist/sns.wrapper.d.ts +0 -160
  45. package/dist/swap.canister.d.ts +0 -47
  46. package/dist/types/actions.d.ts +0 -191
  47. package/dist/types/canister.options.d.ts +0 -5
  48. package/dist/types/common.d.ts +0 -2
  49. package/dist/types/governance.params.d.ts +0 -151
  50. package/dist/types/governance_test.params.d.ts +0 -7
  51. package/dist/types/swap.params.d.ts +0 -8
  52. package/dist/utils/error.utils.d.ts +0 -12
  53. package/dist/utils/governance.utils.d.ts +0 -14
@@ -1,438 +0,0 @@
1
- /* eslint-disable */
2
-
3
- // @ts-nocheck
4
-
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
6
- // You should NOT make any changes in this file as it will be overwritten.
7
- // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
-
9
- import type { ActorMethod } from "@icp-sdk/core/agent";
10
- import type { IDL } from "@icp-sdk/core/candid";
11
- import type { Principal } from "@icp-sdk/core/principal";
12
-
13
- export interface BuyerState {
14
- icp: [] | [TransferableAmount];
15
- has_created_neuron_recipes: [] | [boolean];
16
- }
17
- export interface CanisterCallError {
18
- code: [] | [number];
19
- description: string;
20
- }
21
- export interface CanisterStatusResultV2 {
22
- memory_metrics: [] | [MemoryMetrics];
23
- status: CanisterStatusType;
24
- memory_size: bigint;
25
- cycles: bigint;
26
- settings: DefiniteCanisterSettingsArgs;
27
- query_stats: [] | [QueryStats];
28
- idle_cycles_burned_per_day: bigint;
29
- module_hash: [] | [Uint8Array];
30
- }
31
- export type CanisterStatusType =
32
- | { stopped: null }
33
- | { stopping: null }
34
- | { running: null };
35
- export interface CfInvestment {
36
- controller: [] | [Principal];
37
- hotkey_principal: string;
38
- hotkeys: [] | [Principals];
39
- nns_neuron_id: bigint;
40
- }
41
- export interface CfNeuron {
42
- has_created_neuron_recipes: [] | [boolean];
43
- hotkeys: [] | [Principals];
44
- nns_neuron_id: bigint;
45
- amount_icp_e8s: bigint;
46
- }
47
- export interface CfParticipant {
48
- controller: [] | [Principal];
49
- hotkey_principal: string;
50
- cf_neurons: Array<CfNeuron>;
51
- }
52
- export interface Countries {
53
- iso_codes: Array<string>;
54
- }
55
- export interface DefiniteCanisterSettingsArgs {
56
- freezing_threshold: bigint;
57
- wasm_memory_threshold: [] | [bigint];
58
- controllers: Array<Principal>;
59
- wasm_memory_limit: [] | [bigint];
60
- memory_allocation: bigint;
61
- compute_allocation: bigint;
62
- }
63
- export interface DerivedState {
64
- sns_tokens_per_icp: number;
65
- buyer_total_icp_e8s: bigint;
66
- cf_participant_count: [] | [bigint];
67
- neurons_fund_participation_icp_e8s: [] | [bigint];
68
- direct_participation_icp_e8s: [] | [bigint];
69
- direct_participant_count: [] | [bigint];
70
- cf_neuron_count: [] | [bigint];
71
- }
72
- export interface DirectInvestment {
73
- buyer_principal: string;
74
- }
75
- export interface Err {
76
- description: [] | [string];
77
- error_type: [] | [number];
78
- }
79
- export interface Err_1 {
80
- error_type: [] | [number];
81
- }
82
- export interface Err_2 {
83
- invalid_user_amount: [] | [InvalidUserAmount];
84
- existing_ticket: [] | [Ticket];
85
- error_type: number;
86
- }
87
- export interface Error {
88
- message: [] | [string];
89
- }
90
- export interface ErrorRefundIcpRequest {
91
- source_principal_id: [] | [Principal];
92
- }
93
- export interface ErrorRefundIcpResponse {
94
- result: [] | [Result];
95
- }
96
- export interface FailedUpdate {
97
- err: [] | [CanisterCallError];
98
- dapp_canister_id: [] | [Principal];
99
- }
100
- export interface FinalizeSwapResponse {
101
- set_dapp_controllers_call_result: [] | [SetDappControllersCallResult];
102
- create_sns_neuron_recipes_result: [] | [SweepResult];
103
- settle_community_fund_participation_result:
104
- | []
105
- | [SettleCommunityFundParticipationResult];
106
- error_message: [] | [string];
107
- settle_neurons_fund_participation_result:
108
- | []
109
- | [SettleNeuronsFundParticipationResult];
110
- set_mode_call_result: [] | [SetModeCallResult];
111
- sweep_icp_result: [] | [SweepResult];
112
- claim_neuron_result: [] | [SweepResult];
113
- sweep_sns_result: [] | [SweepResult];
114
- }
115
- export interface GetAutoFinalizationStatusResponse {
116
- auto_finalize_swap_response: [] | [FinalizeSwapResponse];
117
- has_auto_finalize_been_attempted: [] | [boolean];
118
- is_auto_finalize_enabled: [] | [boolean];
119
- }
120
- export interface GetBuyerStateRequest {
121
- principal_id: [] | [Principal];
122
- }
123
- export interface GetBuyerStateResponse {
124
- buyer_state: [] | [BuyerState];
125
- }
126
- export interface GetBuyersTotalResponse {
127
- buyers_total: bigint;
128
- }
129
- export interface GetDerivedStateResponse {
130
- sns_tokens_per_icp: [] | [number];
131
- buyer_total_icp_e8s: [] | [bigint];
132
- cf_participant_count: [] | [bigint];
133
- neurons_fund_participation_icp_e8s: [] | [bigint];
134
- direct_participation_icp_e8s: [] | [bigint];
135
- direct_participant_count: [] | [bigint];
136
- cf_neuron_count: [] | [bigint];
137
- }
138
- export interface GetInitResponse {
139
- init: [] | [Init];
140
- }
141
- export interface GetLifecycleResponse {
142
- decentralization_sale_open_timestamp_seconds: [] | [bigint];
143
- lifecycle: [] | [number];
144
- decentralization_swap_termination_timestamp_seconds: [] | [bigint];
145
- }
146
- export interface GetOpenTicketResponse {
147
- result: [] | [Result_1];
148
- }
149
- export interface GetSaleParametersResponse {
150
- params: [] | [Params];
151
- }
152
- export interface GetStateResponse {
153
- swap: [] | [Swap];
154
- derived: [] | [DerivedState];
155
- }
156
- export interface GetTimersResponse {
157
- timers: [] | [Timers];
158
- }
159
- export interface GovernanceError {
160
- error_message: string;
161
- error_type: number;
162
- }
163
- export interface Icrc1Account {
164
- owner: [] | [Principal];
165
- subaccount: [] | [Uint8Array];
166
- }
167
- export interface IdealMatchedParticipationFunction {
168
- serialized_representation: [] | [string];
169
- }
170
- export interface Init {
171
- nns_proposal_id: [] | [bigint];
172
- sns_root_canister_id: string;
173
- neurons_fund_participation: [] | [boolean];
174
- min_participant_icp_e8s: [] | [bigint];
175
- neuron_basket_construction_parameters:
176
- | []
177
- | [NeuronBasketConstructionParameters];
178
- fallback_controller_principal_ids: Array<string>;
179
- max_icp_e8s: [] | [bigint];
180
- neuron_minimum_stake_e8s: [] | [bigint];
181
- confirmation_text: [] | [string];
182
- swap_start_timestamp_seconds: [] | [bigint];
183
- swap_due_timestamp_seconds: [] | [bigint];
184
- min_participants: [] | [number];
185
- sns_token_e8s: [] | [bigint];
186
- nns_governance_canister_id: string;
187
- transaction_fee_e8s: [] | [bigint];
188
- icp_ledger_canister_id: string;
189
- sns_ledger_canister_id: string;
190
- neurons_fund_participation_constraints:
191
- | []
192
- | [NeuronsFundParticipationConstraints];
193
- should_auto_finalize: [] | [boolean];
194
- max_participant_icp_e8s: [] | [bigint];
195
- sns_governance_canister_id: string;
196
- min_direct_participation_icp_e8s: [] | [bigint];
197
- restricted_countries: [] | [Countries];
198
- min_icp_e8s: [] | [bigint];
199
- max_direct_participation_icp_e8s: [] | [bigint];
200
- }
201
- export interface InvalidUserAmount {
202
- min_amount_icp_e8s_included: bigint;
203
- max_amount_icp_e8s_included: bigint;
204
- }
205
- export type Investor =
206
- | { CommunityFund: CfInvestment }
207
- | { Direct: DirectInvestment };
208
- export interface LinearScalingCoefficient {
209
- slope_numerator: [] | [bigint];
210
- intercept_icp_e8s: [] | [bigint];
211
- from_direct_participation_icp_e8s: [] | [bigint];
212
- slope_denominator: [] | [bigint];
213
- to_direct_participation_icp_e8s: [] | [bigint];
214
- }
215
- export interface ListCommunityFundParticipantsRequest {
216
- offset: [] | [bigint];
217
- limit: [] | [number];
218
- }
219
- export interface ListCommunityFundParticipantsResponse {
220
- cf_participants: Array<CfParticipant>;
221
- }
222
- export interface ListDirectParticipantsRequest {
223
- offset: [] | [number];
224
- limit: [] | [number];
225
- }
226
- export interface ListDirectParticipantsResponse {
227
- participants: Array<Participant>;
228
- }
229
- export interface ListSnsNeuronRecipesRequest {
230
- offset: [] | [bigint];
231
- limit: [] | [number];
232
- }
233
- export interface ListSnsNeuronRecipesResponse {
234
- sns_neuron_recipes: Array<SnsNeuronRecipe>;
235
- }
236
- export interface MemoryMetrics {
237
- wasm_binary_size: [] | [bigint];
238
- wasm_chunk_store_size: [] | [bigint];
239
- canister_history_size: [] | [bigint];
240
- stable_memory_size: [] | [bigint];
241
- snapshots_size: [] | [bigint];
242
- wasm_memory_size: [] | [bigint];
243
- global_memory_size: [] | [bigint];
244
- custom_sections_size: [] | [bigint];
245
- }
246
- export interface NeuronAttributes {
247
- dissolve_delay_seconds: bigint;
248
- memo: bigint;
249
- followees: Array<NeuronId>;
250
- }
251
- export interface NeuronBasketConstructionParameters {
252
- dissolve_delay_interval_seconds: bigint;
253
- count: bigint;
254
- }
255
- export interface NeuronId {
256
- id: Uint8Array;
257
- }
258
- export interface NeuronsFundParticipationConstraints {
259
- coefficient_intervals: Array<LinearScalingCoefficient>;
260
- max_neurons_fund_participation_icp_e8s: [] | [bigint];
261
- min_direct_participation_threshold_icp_e8s: [] | [bigint];
262
- ideal_matched_participation_function:
263
- | []
264
- | [IdealMatchedParticipationFunction];
265
- }
266
- export interface NewSaleTicketRequest {
267
- subaccount: [] | [Uint8Array];
268
- amount_icp_e8s: bigint;
269
- }
270
- export interface NewSaleTicketResponse {
271
- result: [] | [Result_2];
272
- }
273
- export interface Ok {
274
- block_height: [] | [bigint];
275
- }
276
- export interface Ok_1 {
277
- neurons_fund_participation_icp_e8s: [] | [bigint];
278
- neurons_fund_neurons_count: [] | [bigint];
279
- }
280
- export interface Ok_2 {
281
- ticket: [] | [Ticket];
282
- }
283
- export interface Params {
284
- min_participant_icp_e8s: bigint;
285
- neuron_basket_construction_parameters:
286
- | []
287
- | [NeuronBasketConstructionParameters];
288
- max_icp_e8s: bigint;
289
- swap_due_timestamp_seconds: bigint;
290
- min_participants: number;
291
- sns_token_e8s: bigint;
292
- sale_delay_seconds: [] | [bigint];
293
- max_participant_icp_e8s: bigint;
294
- min_direct_participation_icp_e8s: [] | [bigint];
295
- min_icp_e8s: bigint;
296
- max_direct_participation_icp_e8s: [] | [bigint];
297
- }
298
- export interface Participant {
299
- participation: [] | [BuyerState];
300
- participant_id: [] | [Principal];
301
- }
302
- export type Possibility =
303
- | { Ok: SetDappControllersResponse }
304
- | { Err: CanisterCallError };
305
- export type Possibility_1 = { Ok: Response } | { Err: CanisterCallError };
306
- export type Possibility_2 = { Ok: Ok_1 } | { Err: Error };
307
- export type Possibility_3 = { Ok: {} } | { Err: CanisterCallError };
308
- export interface Principals {
309
- principals: Array<Principal>;
310
- }
311
- export interface QueryStats {
312
- response_payload_bytes_total: [] | [bigint];
313
- num_instructions_total: [] | [bigint];
314
- num_calls_total: [] | [bigint];
315
- request_payload_bytes_total: [] | [bigint];
316
- }
317
- export interface RefreshBuyerTokensRequest {
318
- confirmation_text: [] | [string];
319
- buyer: string;
320
- }
321
- export interface RefreshBuyerTokensResponse {
322
- icp_accepted_participation_e8s: bigint;
323
- icp_ledger_account_balance_e8s: bigint;
324
- }
325
- export interface Response {
326
- governance_error: [] | [GovernanceError];
327
- }
328
- export type Result = { Ok: Ok } | { Err: Err };
329
- export type Result_1 = { Ok: Ok_2 } | { Err: Err_1 };
330
- export type Result_2 = { Ok: Ok_2 } | { Err: Err_2 };
331
- export interface SetDappControllersCallResult {
332
- possibility: [] | [Possibility];
333
- }
334
- export interface SetDappControllersResponse {
335
- failed_updates: Array<FailedUpdate>;
336
- }
337
- export interface SetModeCallResult {
338
- possibility: [] | [Possibility_3];
339
- }
340
- export interface SettleCommunityFundParticipationResult {
341
- possibility: [] | [Possibility_1];
342
- }
343
- export interface SettleNeuronsFundParticipationResult {
344
- possibility: [] | [Possibility_2];
345
- }
346
- export interface SnsNeuronRecipe {
347
- sns: [] | [TransferableAmount];
348
- claimed_status: [] | [number];
349
- neuron_attributes: [] | [NeuronAttributes];
350
- investor: [] | [Investor];
351
- }
352
- export interface Swap {
353
- auto_finalize_swap_response: [] | [FinalizeSwapResponse];
354
- neuron_recipes: Array<SnsNeuronRecipe>;
355
- next_ticket_id: [] | [bigint];
356
- decentralization_sale_open_timestamp_seconds: [] | [bigint];
357
- finalize_swap_in_progress: [] | [boolean];
358
- timers: [] | [Timers];
359
- cf_participants: Array<CfParticipant>;
360
- init: [] | [Init];
361
- already_tried_to_auto_finalize: [] | [boolean];
362
- neurons_fund_participation_icp_e8s: [] | [bigint];
363
- purge_old_tickets_last_completion_timestamp_nanoseconds: [] | [bigint];
364
- direct_participation_icp_e8s: [] | [bigint];
365
- lifecycle: number;
366
- purge_old_tickets_next_principal: [] | [Uint8Array];
367
- decentralization_swap_termination_timestamp_seconds: [] | [bigint];
368
- buyers: Array<[string, BuyerState]>;
369
- params: [] | [Params];
370
- open_sns_token_swap_proposal_id: [] | [bigint];
371
- }
372
- export interface SweepResult {
373
- failure: number;
374
- skipped: number;
375
- invalid: number;
376
- success: number;
377
- global_failures: number;
378
- }
379
- export interface Ticket {
380
- creation_time: bigint;
381
- ticket_id: bigint;
382
- account: [] | [Icrc1Account];
383
- amount_icp_e8s: bigint;
384
- }
385
- export interface Timers {
386
- last_spawned_timestamp_seconds: [] | [bigint];
387
- last_reset_timestamp_seconds: [] | [bigint];
388
- requires_periodic_tasks: [] | [boolean];
389
- }
390
- export interface TransferableAmount {
391
- transfer_fee_paid_e8s: [] | [bigint];
392
- transfer_start_timestamp_seconds: bigint;
393
- amount_e8s: bigint;
394
- amount_transferred_e8s: [] | [bigint];
395
- transfer_success_timestamp_seconds: bigint;
396
- }
397
- export interface _SERVICE {
398
- error_refund_icp: ActorMethod<
399
- [ErrorRefundIcpRequest],
400
- ErrorRefundIcpResponse
401
- >;
402
- finalize_swap: ActorMethod<[{}], FinalizeSwapResponse>;
403
- get_auto_finalization_status: ActorMethod<
404
- [{}],
405
- GetAutoFinalizationStatusResponse
406
- >;
407
- get_buyer_state: ActorMethod<[GetBuyerStateRequest], GetBuyerStateResponse>;
408
- get_buyers_total: ActorMethod<[{}], GetBuyersTotalResponse>;
409
- get_canister_status: ActorMethod<[{}], CanisterStatusResultV2>;
410
- get_derived_state: ActorMethod<[{}], GetDerivedStateResponse>;
411
- get_init: ActorMethod<[{}], GetInitResponse>;
412
- get_lifecycle: ActorMethod<[{}], GetLifecycleResponse>;
413
- get_open_ticket: ActorMethod<[{}], GetOpenTicketResponse>;
414
- get_sale_parameters: ActorMethod<[{}], GetSaleParametersResponse>;
415
- get_state: ActorMethod<[{}], GetStateResponse>;
416
- get_timers: ActorMethod<[{}], GetTimersResponse>;
417
- list_community_fund_participants: ActorMethod<
418
- [ListCommunityFundParticipantsRequest],
419
- ListCommunityFundParticipantsResponse
420
- >;
421
- list_direct_participants: ActorMethod<
422
- [ListDirectParticipantsRequest],
423
- ListDirectParticipantsResponse
424
- >;
425
- list_sns_neuron_recipes: ActorMethod<
426
- [ListSnsNeuronRecipesRequest],
427
- ListSnsNeuronRecipesResponse
428
- >;
429
- new_sale_ticket: ActorMethod<[NewSaleTicketRequest], NewSaleTicketResponse>;
430
- notify_payment_failure: ActorMethod<[{}], Ok_2>;
431
- refresh_buyer_tokens: ActorMethod<
432
- [RefreshBuyerTokensRequest],
433
- RefreshBuyerTokensResponse
434
- >;
435
- reset_timers: ActorMethod<[{}], {}>;
436
- }
437
- export declare const idlFactory: IDL.InterfaceFactory;
438
- export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];