@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,2 +0,0 @@
1
- import type { IDL } from "@icp-sdk/core/candid";
2
- export const idlFactory: IDL.InterfaceFactory;
@@ -1,251 +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
- export const idlFactory = ({ IDL }) => {
10
- const Timers = IDL.Record({
11
- last_spawned_timestamp_seconds: IDL.Opt(IDL.Nat64),
12
- last_reset_timestamp_seconds: IDL.Opt(IDL.Nat64),
13
- requires_periodic_tasks: IDL.Opt(IDL.Bool),
14
- });
15
- const Extensions = IDL.Record({
16
- extension_canister_ids: IDL.Vec(IDL.Principal),
17
- });
18
- const SnsRootCanister = IDL.Record({
19
- dapp_canister_ids: IDL.Vec(IDL.Principal),
20
- timers: IDL.Opt(Timers),
21
- testflight: IDL.Bool,
22
- extensions: IDL.Opt(Extensions),
23
- archive_canister_ids: IDL.Vec(IDL.Principal),
24
- governance_canister_id: IDL.Opt(IDL.Principal),
25
- index_canister_id: IDL.Opt(IDL.Principal),
26
- swap_canister_id: IDL.Opt(IDL.Principal),
27
- ledger_canister_id: IDL.Opt(IDL.Principal),
28
- });
29
- const CanisterIdRecord = IDL.Record({ canister_id: IDL.Principal });
30
- const MemoryMetrics = IDL.Record({
31
- wasm_binary_size: IDL.Opt(IDL.Nat),
32
- wasm_chunk_store_size: IDL.Opt(IDL.Nat),
33
- canister_history_size: IDL.Opt(IDL.Nat),
34
- stable_memory_size: IDL.Opt(IDL.Nat),
35
- snapshots_size: IDL.Opt(IDL.Nat),
36
- wasm_memory_size: IDL.Opt(IDL.Nat),
37
- global_memory_size: IDL.Opt(IDL.Nat),
38
- custom_sections_size: IDL.Opt(IDL.Nat),
39
- });
40
- const CanisterStatusType = IDL.Variant({
41
- stopped: IDL.Null,
42
- stopping: IDL.Null,
43
- running: IDL.Null,
44
- });
45
- const LogVisibility = IDL.Variant({
46
- controllers: IDL.Null,
47
- public: IDL.Null,
48
- allowed_viewers: IDL.Vec(IDL.Principal),
49
- });
50
- const DefiniteCanisterSettings = IDL.Record({
51
- freezing_threshold: IDL.Opt(IDL.Nat),
52
- wasm_memory_threshold: IDL.Opt(IDL.Nat),
53
- controllers: IDL.Vec(IDL.Principal),
54
- reserved_cycles_limit: IDL.Opt(IDL.Nat),
55
- log_visibility: IDL.Opt(LogVisibility),
56
- wasm_memory_limit: IDL.Opt(IDL.Nat),
57
- memory_allocation: IDL.Opt(IDL.Nat),
58
- compute_allocation: IDL.Opt(IDL.Nat),
59
- });
60
- const QueryStats = IDL.Record({
61
- response_payload_bytes_total: IDL.Opt(IDL.Nat),
62
- num_instructions_total: IDL.Opt(IDL.Nat),
63
- num_calls_total: IDL.Opt(IDL.Nat),
64
- request_payload_bytes_total: IDL.Opt(IDL.Nat),
65
- });
66
- const CanisterStatusResult = IDL.Record({
67
- memory_metrics: IDL.Opt(MemoryMetrics),
68
- status: CanisterStatusType,
69
- memory_size: IDL.Nat,
70
- cycles: IDL.Nat,
71
- settings: DefiniteCanisterSettings,
72
- query_stats: IDL.Opt(QueryStats),
73
- idle_cycles_burned_per_day: IDL.Opt(IDL.Nat),
74
- module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
75
- reserved_cycles: IDL.Opt(IDL.Nat),
76
- });
77
- const CanisterInstallMode = IDL.Variant({
78
- reinstall: IDL.Null,
79
- upgrade: IDL.Null,
80
- install: IDL.Null,
81
- });
82
- const ChunkedCanisterWasm = IDL.Record({
83
- wasm_module_hash: IDL.Vec(IDL.Nat8),
84
- chunk_hashes_list: IDL.Vec(IDL.Vec(IDL.Nat8)),
85
- store_canister_id: IDL.Principal,
86
- });
87
- const ChangeCanisterRequest = IDL.Record({
88
- arg: IDL.Vec(IDL.Nat8),
89
- wasm_module: IDL.Vec(IDL.Nat8),
90
- stop_before_installing: IDL.Bool,
91
- mode: CanisterInstallMode,
92
- canister_id: IDL.Principal,
93
- chunked_canister_wasm: IDL.Opt(ChunkedCanisterWasm),
94
- });
95
- const GetSnsCanistersSummaryRequest = IDL.Record({
96
- update_canister_list: IDL.Opt(IDL.Bool),
97
- });
98
- const DefiniteCanisterSettingsArgs = IDL.Record({
99
- freezing_threshold: IDL.Nat,
100
- wasm_memory_threshold: IDL.Opt(IDL.Nat),
101
- controllers: IDL.Vec(IDL.Principal),
102
- wasm_memory_limit: IDL.Opt(IDL.Nat),
103
- memory_allocation: IDL.Nat,
104
- compute_allocation: IDL.Nat,
105
- });
106
- const CanisterStatusResultV2 = IDL.Record({
107
- memory_metrics: IDL.Opt(MemoryMetrics),
108
- status: CanisterStatusType,
109
- memory_size: IDL.Nat,
110
- cycles: IDL.Nat,
111
- settings: DefiniteCanisterSettingsArgs,
112
- query_stats: IDL.Opt(QueryStats),
113
- idle_cycles_burned_per_day: IDL.Nat,
114
- module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
115
- });
116
- const CanisterSummary = IDL.Record({
117
- status: IDL.Opt(CanisterStatusResultV2),
118
- canister_id: IDL.Opt(IDL.Principal),
119
- });
120
- const GetSnsCanistersSummaryResponse = IDL.Record({
121
- root: IDL.Opt(CanisterSummary),
122
- swap: IDL.Opt(CanisterSummary),
123
- ledger: IDL.Opt(CanisterSummary),
124
- index: IDL.Opt(CanisterSummary),
125
- governance: IDL.Opt(CanisterSummary),
126
- dapps: IDL.Vec(CanisterSummary),
127
- archives: IDL.Vec(CanisterSummary),
128
- });
129
- const GetTimersResponse = IDL.Record({ timers: IDL.Opt(Timers) });
130
- const ListSnsCanistersResponse = IDL.Record({
131
- root: IDL.Opt(IDL.Principal),
132
- swap: IDL.Opt(IDL.Principal),
133
- extensions: IDL.Opt(Extensions),
134
- ledger: IDL.Opt(IDL.Principal),
135
- index: IDL.Opt(IDL.Principal),
136
- governance: IDL.Opt(IDL.Principal),
137
- dapps: IDL.Vec(IDL.Principal),
138
- archives: IDL.Vec(IDL.Principal),
139
- });
140
- const ManageDappCanisterSettingsRequest = IDL.Record({
141
- freezing_threshold: IDL.Opt(IDL.Nat64),
142
- wasm_memory_threshold: IDL.Opt(IDL.Nat64),
143
- canister_ids: IDL.Vec(IDL.Principal),
144
- reserved_cycles_limit: IDL.Opt(IDL.Nat64),
145
- log_visibility: IDL.Opt(IDL.Int32),
146
- wasm_memory_limit: IDL.Opt(IDL.Nat64),
147
- memory_allocation: IDL.Opt(IDL.Nat64),
148
- compute_allocation: IDL.Opt(IDL.Nat64),
149
- });
150
- const ManageDappCanisterSettingsResponse = IDL.Record({
151
- failure_reason: IDL.Opt(IDL.Text),
152
- });
153
- const RegisterDappCanisterRequest = IDL.Record({
154
- canister_id: IDL.Opt(IDL.Principal),
155
- });
156
- const RegisterDappCanistersRequest = IDL.Record({
157
- canister_ids: IDL.Vec(IDL.Principal),
158
- });
159
- const RegisterExtensionRequest = IDL.Record({
160
- canister_id: IDL.Opt(IDL.Principal),
161
- });
162
- const CanisterCallError = IDL.Record({
163
- code: IDL.Opt(IDL.Int32),
164
- description: IDL.Text,
165
- });
166
- const RegisterExtensionResult = IDL.Variant({
167
- Ok: IDL.Record({}),
168
- Err: CanisterCallError,
169
- });
170
- const RegisterExtensionResponse = IDL.Record({
171
- result: IDL.Opt(RegisterExtensionResult),
172
- });
173
- const SetDappControllersRequest = IDL.Record({
174
- canister_ids: IDL.Opt(RegisterDappCanistersRequest),
175
- controller_principal_ids: IDL.Vec(IDL.Principal),
176
- });
177
- const FailedUpdate = IDL.Record({
178
- err: IDL.Opt(CanisterCallError),
179
- dapp_canister_id: IDL.Opt(IDL.Principal),
180
- });
181
- const SetDappControllersResponse = IDL.Record({
182
- failed_updates: IDL.Vec(FailedUpdate),
183
- });
184
-
185
- return IDL.Service({
186
- canister_status: IDL.Func([CanisterIdRecord], [CanisterStatusResult], []),
187
- change_canister: IDL.Func([ChangeCanisterRequest], [], []),
188
- get_build_metadata: IDL.Func([], [IDL.Text], []),
189
- get_sns_canisters_summary: IDL.Func(
190
- [GetSnsCanistersSummaryRequest],
191
- [GetSnsCanistersSummaryResponse],
192
- [],
193
- ),
194
- get_timers: IDL.Func([IDL.Record({})], [GetTimersResponse], []),
195
- list_sns_canisters: IDL.Func(
196
- [IDL.Record({})],
197
- [ListSnsCanistersResponse],
198
- [],
199
- ),
200
- manage_dapp_canister_settings: IDL.Func(
201
- [ManageDappCanisterSettingsRequest],
202
- [ManageDappCanisterSettingsResponse],
203
- [],
204
- ),
205
- register_dapp_canister: IDL.Func(
206
- [RegisterDappCanisterRequest],
207
- [IDL.Record({})],
208
- [],
209
- ),
210
- register_dapp_canisters: IDL.Func(
211
- [RegisterDappCanistersRequest],
212
- [IDL.Record({})],
213
- [],
214
- ),
215
- register_extension: IDL.Func(
216
- [RegisterExtensionRequest],
217
- [RegisterExtensionResponse],
218
- [],
219
- ),
220
- reset_timers: IDL.Func([IDL.Record({})], [IDL.Record({})], []),
221
- set_dapp_controllers: IDL.Func(
222
- [SetDappControllersRequest],
223
- [SetDappControllersResponse],
224
- [],
225
- ),
226
- });
227
- };
228
-
229
- export const init = ({ IDL }) => {
230
- const Timers = IDL.Record({
231
- last_spawned_timestamp_seconds: IDL.Opt(IDL.Nat64),
232
- last_reset_timestamp_seconds: IDL.Opt(IDL.Nat64),
233
- requires_periodic_tasks: IDL.Opt(IDL.Bool),
234
- });
235
- const Extensions = IDL.Record({
236
- extension_canister_ids: IDL.Vec(IDL.Principal),
237
- });
238
- const SnsRootCanister = IDL.Record({
239
- dapp_canister_ids: IDL.Vec(IDL.Principal),
240
- timers: IDL.Opt(Timers),
241
- testflight: IDL.Bool,
242
- extensions: IDL.Opt(Extensions),
243
- archive_canister_ids: IDL.Vec(IDL.Principal),
244
- governance_canister_id: IDL.Opt(IDL.Principal),
245
- index_canister_id: IDL.Opt(IDL.Principal),
246
- swap_canister_id: IDL.Opt(IDL.Principal),
247
- ledger_canister_id: IDL.Opt(IDL.Principal),
248
- });
249
-
250
- return [SnsRootCanister];
251
- };
@@ -1,212 +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 CanisterCallError {
14
- code: [] | [number];
15
- description: string;
16
- }
17
- export interface CanisterIdRecord {
18
- canister_id: Principal;
19
- }
20
- export type CanisterInstallMode =
21
- | { reinstall: null }
22
- | { upgrade: null }
23
- | { install: null };
24
- export interface CanisterStatusResult {
25
- memory_metrics: [] | [MemoryMetrics];
26
- status: CanisterStatusType;
27
- memory_size: bigint;
28
- cycles: bigint;
29
- settings: DefiniteCanisterSettings;
30
- query_stats: [] | [QueryStats];
31
- idle_cycles_burned_per_day: [] | [bigint];
32
- module_hash: [] | [Uint8Array];
33
- reserved_cycles: [] | [bigint];
34
- }
35
- export interface CanisterStatusResultV2 {
36
- memory_metrics: [] | [MemoryMetrics];
37
- status: CanisterStatusType;
38
- memory_size: bigint;
39
- cycles: bigint;
40
- settings: DefiniteCanisterSettingsArgs;
41
- query_stats: [] | [QueryStats];
42
- idle_cycles_burned_per_day: bigint;
43
- module_hash: [] | [Uint8Array];
44
- }
45
- export type CanisterStatusType =
46
- | { stopped: null }
47
- | { stopping: null }
48
- | { running: null };
49
- export interface CanisterSummary {
50
- status: [] | [CanisterStatusResultV2];
51
- canister_id: [] | [Principal];
52
- }
53
- export interface ChangeCanisterRequest {
54
- arg: Uint8Array;
55
- wasm_module: Uint8Array;
56
- stop_before_installing: boolean;
57
- mode: CanisterInstallMode;
58
- canister_id: Principal;
59
- chunked_canister_wasm: [] | [ChunkedCanisterWasm];
60
- }
61
- export interface ChunkedCanisterWasm {
62
- wasm_module_hash: Uint8Array;
63
- chunk_hashes_list: Array<Uint8Array>;
64
- store_canister_id: Principal;
65
- }
66
- export interface DefiniteCanisterSettings {
67
- freezing_threshold: [] | [bigint];
68
- wasm_memory_threshold: [] | [bigint];
69
- controllers: Array<Principal>;
70
- reserved_cycles_limit: [] | [bigint];
71
- log_visibility: [] | [LogVisibility];
72
- wasm_memory_limit: [] | [bigint];
73
- memory_allocation: [] | [bigint];
74
- compute_allocation: [] | [bigint];
75
- }
76
- export interface DefiniteCanisterSettingsArgs {
77
- freezing_threshold: bigint;
78
- wasm_memory_threshold: [] | [bigint];
79
- controllers: Array<Principal>;
80
- wasm_memory_limit: [] | [bigint];
81
- memory_allocation: bigint;
82
- compute_allocation: bigint;
83
- }
84
- export interface Extensions {
85
- extension_canister_ids: Array<Principal>;
86
- }
87
- export interface FailedUpdate {
88
- err: [] | [CanisterCallError];
89
- dapp_canister_id: [] | [Principal];
90
- }
91
- export interface GetSnsCanistersSummaryRequest {
92
- update_canister_list: [] | [boolean];
93
- }
94
- export interface GetSnsCanistersSummaryResponse {
95
- root: [] | [CanisterSummary];
96
- swap: [] | [CanisterSummary];
97
- ledger: [] | [CanisterSummary];
98
- index: [] | [CanisterSummary];
99
- governance: [] | [CanisterSummary];
100
- dapps: Array<CanisterSummary>;
101
- archives: Array<CanisterSummary>;
102
- }
103
- export interface GetTimersResponse {
104
- timers: [] | [Timers];
105
- }
106
- export interface ListSnsCanistersResponse {
107
- root: [] | [Principal];
108
- swap: [] | [Principal];
109
- extensions: [] | [Extensions];
110
- ledger: [] | [Principal];
111
- index: [] | [Principal];
112
- governance: [] | [Principal];
113
- dapps: Array<Principal>;
114
- archives: Array<Principal>;
115
- }
116
- export type LogVisibility =
117
- | { controllers: null }
118
- | { public: null }
119
- | { allowed_viewers: Array<Principal> };
120
- export interface ManageDappCanisterSettingsRequest {
121
- freezing_threshold: [] | [bigint];
122
- wasm_memory_threshold: [] | [bigint];
123
- canister_ids: Array<Principal>;
124
- reserved_cycles_limit: [] | [bigint];
125
- log_visibility: [] | [number];
126
- wasm_memory_limit: [] | [bigint];
127
- memory_allocation: [] | [bigint];
128
- compute_allocation: [] | [bigint];
129
- }
130
- export interface ManageDappCanisterSettingsResponse {
131
- failure_reason: [] | [string];
132
- }
133
- export interface MemoryMetrics {
134
- wasm_binary_size: [] | [bigint];
135
- wasm_chunk_store_size: [] | [bigint];
136
- canister_history_size: [] | [bigint];
137
- stable_memory_size: [] | [bigint];
138
- snapshots_size: [] | [bigint];
139
- wasm_memory_size: [] | [bigint];
140
- global_memory_size: [] | [bigint];
141
- custom_sections_size: [] | [bigint];
142
- }
143
- export interface QueryStats {
144
- response_payload_bytes_total: [] | [bigint];
145
- num_instructions_total: [] | [bigint];
146
- num_calls_total: [] | [bigint];
147
- request_payload_bytes_total: [] | [bigint];
148
- }
149
- export interface RegisterDappCanisterRequest {
150
- canister_id: [] | [Principal];
151
- }
152
- export interface RegisterDappCanistersRequest {
153
- canister_ids: Array<Principal>;
154
- }
155
- export interface RegisterExtensionRequest {
156
- canister_id: [] | [Principal];
157
- }
158
- export interface RegisterExtensionResponse {
159
- result: [] | [RegisterExtensionResult];
160
- }
161
- export type RegisterExtensionResult = { Ok: {} } | { Err: CanisterCallError };
162
- export interface SetDappControllersRequest {
163
- canister_ids: [] | [RegisterDappCanistersRequest];
164
- controller_principal_ids: Array<Principal>;
165
- }
166
- export interface SetDappControllersResponse {
167
- failed_updates: Array<FailedUpdate>;
168
- }
169
- export interface SnsRootCanister {
170
- dapp_canister_ids: Array<Principal>;
171
- timers: [] | [Timers];
172
- testflight: boolean;
173
- extensions: [] | [Extensions];
174
- archive_canister_ids: Array<Principal>;
175
- governance_canister_id: [] | [Principal];
176
- index_canister_id: [] | [Principal];
177
- swap_canister_id: [] | [Principal];
178
- ledger_canister_id: [] | [Principal];
179
- }
180
- export interface Timers {
181
- last_spawned_timestamp_seconds: [] | [bigint];
182
- last_reset_timestamp_seconds: [] | [bigint];
183
- requires_periodic_tasks: [] | [boolean];
184
- }
185
- export interface _SERVICE {
186
- canister_status: ActorMethod<[CanisterIdRecord], CanisterStatusResult>;
187
- change_canister: ActorMethod<[ChangeCanisterRequest], undefined>;
188
- get_build_metadata: ActorMethod<[], string>;
189
- get_sns_canisters_summary: ActorMethod<
190
- [GetSnsCanistersSummaryRequest],
191
- GetSnsCanistersSummaryResponse
192
- >;
193
- get_timers: ActorMethod<[{}], GetTimersResponse>;
194
- list_sns_canisters: ActorMethod<[{}], ListSnsCanistersResponse>;
195
- manage_dapp_canister_settings: ActorMethod<
196
- [ManageDappCanisterSettingsRequest],
197
- ManageDappCanisterSettingsResponse
198
- >;
199
- register_dapp_canister: ActorMethod<[RegisterDappCanisterRequest], {}>;
200
- register_dapp_canisters: ActorMethod<[RegisterDappCanistersRequest], {}>;
201
- register_extension: ActorMethod<
202
- [RegisterExtensionRequest],
203
- RegisterExtensionResponse
204
- >;
205
- reset_timers: ActorMethod<[{}], {}>;
206
- set_dapp_controllers: ActorMethod<
207
- [SetDappControllersRequest],
208
- SetDappControllersResponse
209
- >;
210
- }
211
- export declare const idlFactory: IDL.InterfaceFactory;
212
- export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
@@ -1,231 +0,0 @@
1
- // Generated from IC repo commit fa06b0e (2025-11-12 tags: release-2025-11-13_03-24-base) 'rs/sns/root/canister/root.did' by import-candid
2
-
3
- type CanisterCallError = record {
4
- code : opt int32;
5
- description : text;
6
- };
7
-
8
- type CanisterIdRecord = record {
9
- canister_id : principal;
10
- };
11
-
12
- type CanisterInstallMode = variant {
13
- reinstall;
14
- upgrade;
15
- install;
16
- };
17
-
18
- type MemoryMetrics = record {
19
- wasm_memory_size : opt nat;
20
- stable_memory_size : opt nat;
21
- global_memory_size : opt nat;
22
- wasm_binary_size : opt nat;
23
- custom_sections_size : opt nat;
24
- canister_history_size : opt nat;
25
- wasm_chunk_store_size : opt nat;
26
- snapshots_size : opt nat;
27
- };
28
-
29
- type CanisterStatusResult = record {
30
- status : CanisterStatusType;
31
- memory_size : nat;
32
- cycles : nat;
33
- settings : DefiniteCanisterSettings;
34
- idle_cycles_burned_per_day : opt nat;
35
- module_hash : opt blob;
36
- reserved_cycles : opt nat;
37
- query_stats : opt QueryStats;
38
- memory_metrics : opt MemoryMetrics;
39
- };
40
-
41
- type CanisterStatusResultV2 = record {
42
- status : CanisterStatusType;
43
- memory_size : nat;
44
- cycles : nat;
45
- settings : DefiniteCanisterSettingsArgs;
46
- idle_cycles_burned_per_day : nat;
47
- module_hash : opt blob;
48
- query_stats : opt QueryStats;
49
- memory_metrics : opt MemoryMetrics;
50
- };
51
-
52
- type CanisterStatusType = variant {
53
- stopped;
54
- stopping;
55
- running;
56
- };
57
-
58
- type CanisterSummary = record {
59
- status : opt CanisterStatusResultV2;
60
- canister_id : opt principal;
61
- };
62
-
63
- type ChunkedCanisterWasm = record {
64
- wasm_module_hash : blob;
65
- store_canister_id : principal;
66
- chunk_hashes_list : vec blob;
67
- };
68
-
69
- type ChangeCanisterRequest = record {
70
- arg : blob;
71
- wasm_module : blob;
72
- chunked_canister_wasm : opt ChunkedCanisterWasm;
73
- stop_before_installing : bool;
74
- mode : CanisterInstallMode;
75
- canister_id : principal;
76
- };
77
-
78
- type DefiniteCanisterSettings = record {
79
- freezing_threshold : opt nat;
80
- controllers : vec principal;
81
- reserved_cycles_limit : opt nat;
82
- log_visibility : opt LogVisibility;
83
- wasm_memory_limit : opt nat;
84
- memory_allocation : opt nat;
85
- compute_allocation : opt nat;
86
- wasm_memory_threshold : opt nat;
87
- };
88
-
89
- type DefiniteCanisterSettingsArgs = record {
90
- freezing_threshold : nat;
91
- controllers : vec principal;
92
- wasm_memory_limit : opt nat;
93
- memory_allocation : nat;
94
- compute_allocation : nat;
95
- wasm_memory_threshold : opt nat;
96
- };
97
-
98
- type QueryStats = record {
99
- num_calls_total : opt nat;
100
- num_instructions_total : opt nat;
101
- request_payload_bytes_total : opt nat;
102
- response_payload_bytes_total : opt nat;
103
- };
104
-
105
- type FailedUpdate = record {
106
- err : opt CanisterCallError;
107
- dapp_canister_id : opt principal;
108
- };
109
-
110
- type GetSnsCanistersSummaryRequest = record {
111
- update_canister_list : opt bool;
112
- };
113
-
114
- type GetSnsCanistersSummaryResponse = record {
115
- root : opt CanisterSummary;
116
- swap : opt CanisterSummary;
117
- ledger : opt CanisterSummary;
118
- index : opt CanisterSummary;
119
- governance : opt CanisterSummary;
120
- dapps : vec CanisterSummary;
121
- archives : vec CanisterSummary;
122
- };
123
-
124
- type ListSnsCanistersResponse = record {
125
- root : opt principal;
126
- swap : opt principal;
127
- ledger : opt principal;
128
- index : opt principal;
129
- governance : opt principal;
130
- dapps : vec principal;
131
- extensions : opt Extensions;
132
- archives : vec principal;
133
- };
134
-
135
- type LogVisibility = variant {
136
- controllers;
137
- public;
138
- allowed_viewers: vec principal;
139
- };
140
-
141
- type ManageDappCanisterSettingsRequest = record {
142
- freezing_threshold : opt nat64;
143
- canister_ids : vec principal;
144
- reserved_cycles_limit : opt nat64;
145
- log_visibility : opt int32;
146
- wasm_memory_limit : opt nat64;
147
- memory_allocation : opt nat64;
148
- compute_allocation : opt nat64;
149
- wasm_memory_threshold : opt nat64;
150
- };
151
-
152
- type ManageDappCanisterSettingsResponse = record {
153
- failure_reason : opt text;
154
- };
155
-
156
- type RegisterExtensionRequest = record {
157
- canister_id : opt principal;
158
- };
159
-
160
- type RegisterExtensionResult = variant {
161
- Ok : record {};
162
- Err : CanisterCallError;
163
- };
164
-
165
- type RegisterExtensionResponse = record {
166
- result : opt RegisterExtensionResult;
167
- };
168
-
169
- type RegisterDappCanisterRequest = record {
170
- canister_id : opt principal;
171
- };
172
-
173
- type RegisterDappCanistersRequest = record {
174
- canister_ids : vec principal;
175
- };
176
-
177
- type SetDappControllersRequest = record {
178
- canister_ids : opt RegisterDappCanistersRequest;
179
- controller_principal_ids : vec principal;
180
- };
181
-
182
- type SetDappControllersResponse = record {
183
- failed_updates : vec FailedUpdate;
184
- };
185
-
186
- type Extensions = record {
187
- extension_canister_ids : vec principal;
188
- };
189
-
190
- type SnsRootCanister = record {
191
- dapp_canister_ids : vec principal;
192
- extensions : opt Extensions;
193
- testflight : bool;
194
- archive_canister_ids : vec principal;
195
- governance_canister_id : opt principal;
196
- index_canister_id : opt principal;
197
- swap_canister_id : opt principal;
198
- ledger_canister_id : opt principal;
199
- timers : opt Timers;
200
- };
201
-
202
- type Timers = record {
203
- requires_periodic_tasks : opt bool;
204
- last_reset_timestamp_seconds : opt nat64;
205
- last_spawned_timestamp_seconds : opt nat64;
206
- };
207
-
208
- type GetTimersResponse = record {
209
- timers : opt Timers;
210
- };
211
-
212
- service : (SnsRootCanister) -> {
213
- canister_status : (CanisterIdRecord) -> (CanisterStatusResult);
214
- change_canister : (ChangeCanisterRequest) -> ();
215
- get_build_metadata : () -> (text) query;
216
- get_sns_canisters_summary : (GetSnsCanistersSummaryRequest) -> (
217
- GetSnsCanistersSummaryResponse,
218
- );
219
- list_sns_canisters : (record {}) -> (ListSnsCanistersResponse) query;
220
- manage_dapp_canister_settings : (ManageDappCanisterSettingsRequest) -> (
221
- ManageDappCanisterSettingsResponse,
222
- );
223
- register_extension : (RegisterExtensionRequest) -> (RegisterExtensionResponse);
224
- register_dapp_canister : (RegisterDappCanisterRequest) -> (record {});
225
- register_dapp_canisters : (RegisterDappCanistersRequest) -> (record {});
226
- set_dapp_controllers : (SetDappControllersRequest) -> (
227
- SetDappControllersResponse,
228
- );
229
- reset_timers : (record {}) -> (record {});
230
- get_timers : (record {}) -> (GetTimersResponse) query;
231
- }
@@ -1,2 +0,0 @@
1
- import type { IDL } from "@icp-sdk/core/candid";
2
- export const idlFactory: IDL.InterfaceFactory;