@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.
- package/README.md +1 -1
- package/dist/index.d.ts +54 -19
- package/dist/index.js +1 -6
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +1 -6
- package/dist/index.mjs.map +4 -4
- package/package.json +3 -8
- package/dist/candid/sns_governance.certified.idl.d.ts +0 -2
- package/dist/candid/sns_governance.certified.idl.js +0 -1432
- package/dist/candid/sns_governance.d.ts +0 -933
- package/dist/candid/sns_governance.did +0 -1069
- package/dist/candid/sns_governance.idl.d.ts +0 -2
- package/dist/candid/sns_governance.idl.js +0 -1440
- package/dist/candid/sns_governance_test.certified.idl.d.ts +0 -2
- package/dist/candid/sns_governance_test.certified.idl.js +0 -1460
- package/dist/candid/sns_governance_test.d.ts +0 -962
- package/dist/candid/sns_governance_test.did +0 -1094
- package/dist/candid/sns_governance_test.idl.d.ts +0 -2
- package/dist/candid/sns_governance_test.idl.js +0 -1468
- package/dist/candid/sns_root.certified.idl.d.ts +0 -2
- package/dist/candid/sns_root.certified.idl.js +0 -251
- package/dist/candid/sns_root.d.ts +0 -212
- package/dist/candid/sns_root.did +0 -231
- package/dist/candid/sns_root.idl.d.ts +0 -2
- package/dist/candid/sns_root.idl.js +0 -251
- package/dist/candid/sns_swap.certified.idl.d.ts +0 -2
- package/dist/candid/sns_swap.certified.idl.js +0 -499
- package/dist/candid/sns_swap.d.ts +0 -438
- package/dist/candid/sns_swap.did +0 -505
- package/dist/candid/sns_swap.idl.d.ts +0 -2
- package/dist/candid/sns_swap.idl.js +0 -507
- package/dist/constants/governance.constants.d.ts +0 -8
- package/dist/converters/governance.converters.d.ts +0 -22
- package/dist/converters/swap.converters.d.ts +0 -3
- package/dist/enums/governance.enums.d.ts +0 -35
- package/dist/enums/swap.enums.d.ts +0 -22
- package/dist/errors/common.errors.d.ts +0 -4
- package/dist/errors/governance.errors.d.ts +0 -2
- package/dist/errors/swap.errors.d.ts +0 -16
- package/dist/governance.canister.d.ts +0 -138
- package/dist/governance_test.canister.d.ts +0 -16
- package/dist/root.canister.d.ts +0 -19
- package/dist/sns.d.ts +0 -21
- package/dist/sns.wrapper.d.ts +0 -160
- package/dist/swap.canister.d.ts +0 -47
- package/dist/types/actions.d.ts +0 -191
- package/dist/types/canister.options.d.ts +0 -5
- package/dist/types/common.d.ts +0 -2
- package/dist/types/governance.params.d.ts +0 -151
- package/dist/types/governance_test.params.d.ts +0 -7
- package/dist/types/swap.params.d.ts +0 -8
- package/dist/utils/error.utils.d.ts +0 -12
- package/dist/utils/governance.utils.d.ts +0 -14
|
@@ -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], ["query"]),
|
|
189
|
-
get_sns_canisters_summary: IDL.Func(
|
|
190
|
-
[GetSnsCanistersSummaryRequest],
|
|
191
|
-
[GetSnsCanistersSummaryResponse],
|
|
192
|
-
[],
|
|
193
|
-
),
|
|
194
|
-
get_timers: IDL.Func([IDL.Record({})], [GetTimersResponse], ["query"]),
|
|
195
|
-
list_sns_canisters: IDL.Func(
|
|
196
|
-
[IDL.Record({})],
|
|
197
|
-
[ListSnsCanistersResponse],
|
|
198
|
-
["query"],
|
|
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
|
-
};
|