@junobuild/admin 0.0.53 → 0.0.54-next-2024-08-24

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 (28) hide show
  1. package/dist/browser/index.js +7 -7
  2. package/dist/browser/index.js.map +3 -3
  3. package/dist/declarations/ic/ic.did.d.ts +48 -5
  4. package/dist/declarations/ic/ic.factory.did.js +53 -14
  5. package/dist/declarations/ic/ic.factory.did.mjs +53 -14
  6. package/dist/declarations/orbiter/orbiter.did.d.ts +60 -2
  7. package/dist/declarations/orbiter/orbiter.factory.did.js +71 -2
  8. package/dist/declarations/orbiter/orbiter.factory.did.mjs +71 -2
  9. package/dist/node/index.mjs +7 -7
  10. package/dist/node/index.mjs.map +3 -3
  11. package/package.json +7 -8
  12. package/declarations/ic/ic.did.d.ts +0 -301
  13. package/declarations/ic/ic.factory.did.js +0 -339
  14. package/declarations/ic/ic.factory.did.mjs +0 -339
  15. package/declarations/mission_control/mission_control.did.d.ts +0 -115
  16. package/declarations/mission_control/mission_control.factory.did.js +0 -147
  17. package/declarations/orbiter/orbiter.did.d.ts +0 -166
  18. package/declarations/orbiter/orbiter.factory.did.js +0 -197
  19. package/declarations/orbiter/orbiter.factory.did.mjs +0 -197
  20. package/declarations/satellite/satellite-deprecated-no-scope.did.d.ts +0 -183
  21. package/declarations/satellite/satellite-deprecated-no-scope.factory.did.js +0 -194
  22. package/declarations/satellite/satellite-deprecated-no-scope.factory.did.mjs +0 -192
  23. package/declarations/satellite/satellite-deprecated.did.d.ts +0 -182
  24. package/declarations/satellite/satellite-deprecated.factory.did.js +0 -191
  25. package/declarations/satellite/satellite-deprecated.factory.did.mjs +0 -191
  26. package/declarations/satellite/satellite.did.d.ts +0 -277
  27. package/declarations/satellite/satellite.factory.did.js +0 -305
  28. package/declarations/satellite/satellite.factory.did.mjs +0 -305
@@ -1,339 +0,0 @@
1
- // @ts-ignore
2
- export const idlFactory = ({IDL}) => {
3
- const bitcoin_network = IDL.Variant({
4
- mainnet: IDL.Null,
5
- testnet: IDL.Null
6
- });
7
- const bitcoin_address = IDL.Text;
8
- const bitcoin_get_balance_args = IDL.Record({
9
- network: bitcoin_network,
10
- address: bitcoin_address,
11
- min_confirmations: IDL.Opt(IDL.Nat32)
12
- });
13
- const satoshi = IDL.Nat64;
14
- const bitcoin_get_balance_result = satoshi;
15
- const bitcoin_get_balance_query_args = IDL.Record({
16
- network: bitcoin_network,
17
- address: bitcoin_address,
18
- min_confirmations: IDL.Opt(IDL.Nat32)
19
- });
20
- const bitcoin_get_balance_query_result = satoshi;
21
- const bitcoin_get_current_fee_percentiles_args = IDL.Record({
22
- network: bitcoin_network
23
- });
24
- const millisatoshi_per_byte = IDL.Nat64;
25
- const bitcoin_get_current_fee_percentiles_result = IDL.Vec(millisatoshi_per_byte);
26
- const bitcoin_get_utxos_args = IDL.Record({
27
- network: bitcoin_network,
28
- filter: IDL.Opt(
29
- IDL.Variant({
30
- page: IDL.Vec(IDL.Nat8),
31
- min_confirmations: IDL.Nat32
32
- })
33
- ),
34
- address: bitcoin_address
35
- });
36
- const block_hash = IDL.Vec(IDL.Nat8);
37
- const outpoint = IDL.Record({
38
- txid: IDL.Vec(IDL.Nat8),
39
- vout: IDL.Nat32
40
- });
41
- const utxo = IDL.Record({
42
- height: IDL.Nat32,
43
- value: satoshi,
44
- outpoint: outpoint
45
- });
46
- const bitcoin_get_utxos_result = IDL.Record({
47
- next_page: IDL.Opt(IDL.Vec(IDL.Nat8)),
48
- tip_height: IDL.Nat32,
49
- tip_block_hash: block_hash,
50
- utxos: IDL.Vec(utxo)
51
- });
52
- const bitcoin_get_utxos_query_args = IDL.Record({
53
- network: bitcoin_network,
54
- filter: IDL.Opt(
55
- IDL.Variant({
56
- page: IDL.Vec(IDL.Nat8),
57
- min_confirmations: IDL.Nat32
58
- })
59
- ),
60
- address: bitcoin_address
61
- });
62
- const bitcoin_get_utxos_query_result = IDL.Record({
63
- next_page: IDL.Opt(IDL.Vec(IDL.Nat8)),
64
- tip_height: IDL.Nat32,
65
- tip_block_hash: block_hash,
66
- utxos: IDL.Vec(utxo)
67
- });
68
- const bitcoin_send_transaction_args = IDL.Record({
69
- transaction: IDL.Vec(IDL.Nat8),
70
- network: bitcoin_network
71
- });
72
- const canister_id = IDL.Principal;
73
- const canister_info_args = IDL.Record({
74
- canister_id: canister_id,
75
- num_requested_changes: IDL.Opt(IDL.Nat64)
76
- });
77
- const change_origin = IDL.Variant({
78
- from_user: IDL.Record({user_id: IDL.Principal}),
79
- from_canister: IDL.Record({
80
- canister_version: IDL.Opt(IDL.Nat64),
81
- canister_id: IDL.Principal
82
- })
83
- });
84
- const change_details = IDL.Variant({
85
- creation: IDL.Record({controllers: IDL.Vec(IDL.Principal)}),
86
- code_deployment: IDL.Record({
87
- mode: IDL.Variant({
88
- reinstall: IDL.Null,
89
- upgrade: IDL.Null,
90
- install: IDL.Null
91
- }),
92
- module_hash: IDL.Vec(IDL.Nat8)
93
- }),
94
- controllers_change: IDL.Record({
95
- controllers: IDL.Vec(IDL.Principal)
96
- }),
97
- code_uninstall: IDL.Null
98
- });
99
- const change = IDL.Record({
100
- timestamp_nanos: IDL.Nat64,
101
- canister_version: IDL.Nat64,
102
- origin: change_origin,
103
- details: change_details
104
- });
105
- const canister_info_result = IDL.Record({
106
- controllers: IDL.Vec(IDL.Principal),
107
- module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
108
- recent_changes: IDL.Vec(change),
109
- total_num_changes: IDL.Nat64
110
- });
111
- const canister_status_args = IDL.Record({canister_id: canister_id});
112
- const log_visibility = IDL.Variant({
113
- controllers: IDL.Null,
114
- public: IDL.Null
115
- });
116
- const definite_canister_settings = IDL.Record({
117
- freezing_threshold: IDL.Nat,
118
- controllers: IDL.Vec(IDL.Principal),
119
- reserved_cycles_limit: IDL.Nat,
120
- log_visibility: log_visibility,
121
- memory_allocation: IDL.Nat,
122
- compute_allocation: IDL.Nat
123
- });
124
- const canister_status_result = IDL.Record({
125
- status: IDL.Variant({
126
- stopped: IDL.Null,
127
- stopping: IDL.Null,
128
- running: IDL.Null
129
- }),
130
- memory_size: IDL.Nat,
131
- cycles: IDL.Nat,
132
- settings: definite_canister_settings,
133
- idle_cycles_burned_per_day: IDL.Nat,
134
- module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
135
- reserved_cycles: IDL.Nat
136
- });
137
- const clear_chunk_store_args = IDL.Record({canister_id: canister_id});
138
- const canister_settings = IDL.Record({
139
- freezing_threshold: IDL.Opt(IDL.Nat),
140
- controllers: IDL.Opt(IDL.Vec(IDL.Principal)),
141
- reserved_cycles_limit: IDL.Opt(IDL.Nat),
142
- log_visibility: IDL.Opt(log_visibility),
143
- memory_allocation: IDL.Opt(IDL.Nat),
144
- compute_allocation: IDL.Opt(IDL.Nat)
145
- });
146
- const create_canister_args = IDL.Record({
147
- settings: IDL.Opt(canister_settings),
148
- sender_canister_version: IDL.Opt(IDL.Nat64)
149
- });
150
- const create_canister_result = IDL.Record({canister_id: canister_id});
151
- const delete_canister_args = IDL.Record({canister_id: canister_id});
152
- const deposit_cycles_args = IDL.Record({canister_id: canister_id});
153
- const ecdsa_curve = IDL.Variant({secp256k1: IDL.Null});
154
- const ecdsa_public_key_args = IDL.Record({
155
- key_id: IDL.Record({name: IDL.Text, curve: ecdsa_curve}),
156
- canister_id: IDL.Opt(canister_id),
157
- derivation_path: IDL.Vec(IDL.Vec(IDL.Nat8))
158
- });
159
- const ecdsa_public_key_result = IDL.Record({
160
- public_key: IDL.Vec(IDL.Nat8),
161
- chain_code: IDL.Vec(IDL.Nat8)
162
- });
163
- const fetch_canister_logs_args = IDL.Record({canister_id: canister_id});
164
- const canister_log_record = IDL.Record({
165
- idx: IDL.Nat64,
166
- timestamp_nanos: IDL.Nat64,
167
- content: IDL.Vec(IDL.Nat8)
168
- });
169
- const fetch_canister_logs_result = IDL.Record({
170
- canister_log_records: IDL.Vec(canister_log_record)
171
- });
172
- const http_header = IDL.Record({value: IDL.Text, name: IDL.Text});
173
- const http_request_result = IDL.Record({
174
- status: IDL.Nat,
175
- body: IDL.Vec(IDL.Nat8),
176
- headers: IDL.Vec(http_header)
177
- });
178
- const http_request_args = IDL.Record({
179
- url: IDL.Text,
180
- method: IDL.Variant({
181
- get: IDL.Null,
182
- head: IDL.Null,
183
- post: IDL.Null
184
- }),
185
- max_response_bytes: IDL.Opt(IDL.Nat64),
186
- body: IDL.Opt(IDL.Vec(IDL.Nat8)),
187
- transform: IDL.Opt(
188
- IDL.Record({
189
- function: IDL.Func(
190
- [
191
- IDL.Record({
192
- context: IDL.Vec(IDL.Nat8),
193
- response: http_request_result
194
- })
195
- ],
196
- [http_request_result],
197
- ['query']
198
- ),
199
- context: IDL.Vec(IDL.Nat8)
200
- })
201
- ),
202
- headers: IDL.Vec(http_header)
203
- });
204
- const chunk_hash = IDL.Vec(IDL.Nat8);
205
- const install_chunked_code_args = IDL.Record({
206
- arg: IDL.Vec(IDL.Nat8),
207
- wasm_module_hash: IDL.Vec(IDL.Nat8),
208
- mode: IDL.Variant({
209
- reinstall: IDL.Null,
210
- upgrade: IDL.Opt(IDL.Record({skip_pre_upgrade: IDL.Opt(IDL.Bool)})),
211
- install: IDL.Null
212
- }),
213
- chunk_hashes_list: IDL.Vec(chunk_hash),
214
- target_canister: canister_id,
215
- sender_canister_version: IDL.Opt(IDL.Nat64),
216
- storage_canister: IDL.Opt(canister_id)
217
- });
218
- const wasm_module = IDL.Vec(IDL.Nat8);
219
- const install_code_args = IDL.Record({
220
- arg: IDL.Vec(IDL.Nat8),
221
- wasm_module: wasm_module,
222
- mode: IDL.Variant({
223
- reinstall: IDL.Null,
224
- upgrade: IDL.Opt(IDL.Record({skip_pre_upgrade: IDL.Opt(IDL.Bool)})),
225
- install: IDL.Null
226
- }),
227
- canister_id: canister_id,
228
- sender_canister_version: IDL.Opt(IDL.Nat64)
229
- });
230
- const node_metrics_history_args = IDL.Record({
231
- start_at_timestamp_nanos: IDL.Nat64,
232
- subnet_id: IDL.Principal
233
- });
234
- const node_metrics = IDL.Record({
235
- num_block_failures_total: IDL.Nat64,
236
- node_id: IDL.Principal,
237
- num_blocks_total: IDL.Nat64
238
- });
239
- const node_metrics_history_result = IDL.Vec(
240
- IDL.Record({
241
- timestamp_nanos: IDL.Nat64,
242
- node_metrics: IDL.Vec(node_metrics)
243
- })
244
- );
245
- const provisional_create_canister_with_cycles_args = IDL.Record({
246
- settings: IDL.Opt(canister_settings),
247
- specified_id: IDL.Opt(canister_id),
248
- amount: IDL.Opt(IDL.Nat),
249
- sender_canister_version: IDL.Opt(IDL.Nat64)
250
- });
251
- const provisional_create_canister_with_cycles_result = IDL.Record({
252
- canister_id: canister_id
253
- });
254
- const provisional_top_up_canister_args = IDL.Record({
255
- canister_id: canister_id,
256
- amount: IDL.Nat
257
- });
258
- const raw_rand_result = IDL.Vec(IDL.Nat8);
259
- const sign_with_ecdsa_args = IDL.Record({
260
- key_id: IDL.Record({name: IDL.Text, curve: ecdsa_curve}),
261
- derivation_path: IDL.Vec(IDL.Vec(IDL.Nat8)),
262
- message_hash: IDL.Vec(IDL.Nat8)
263
- });
264
- const sign_with_ecdsa_result = IDL.Record({
265
- signature: IDL.Vec(IDL.Nat8)
266
- });
267
- const start_canister_args = IDL.Record({canister_id: canister_id});
268
- const stop_canister_args = IDL.Record({canister_id: canister_id});
269
- const stored_chunks_args = IDL.Record({canister_id: canister_id});
270
- const stored_chunks_result = IDL.Vec(chunk_hash);
271
- const uninstall_code_args = IDL.Record({
272
- canister_id: canister_id,
273
- sender_canister_version: IDL.Opt(IDL.Nat64)
274
- });
275
- const update_settings_args = IDL.Record({
276
- canister_id: IDL.Principal,
277
- settings: canister_settings,
278
- sender_canister_version: IDL.Opt(IDL.Nat64)
279
- });
280
- const upload_chunk_args = IDL.Record({
281
- chunk: IDL.Vec(IDL.Nat8),
282
- canister_id: IDL.Principal
283
- });
284
- const upload_chunk_result = chunk_hash;
285
- return IDL.Service({
286
- bitcoin_get_balance: IDL.Func([bitcoin_get_balance_args], [bitcoin_get_balance_result], []),
287
- bitcoin_get_balance_query: IDL.Func(
288
- [bitcoin_get_balance_query_args],
289
- [bitcoin_get_balance_query_result],
290
- ['query']
291
- ),
292
- bitcoin_get_current_fee_percentiles: IDL.Func(
293
- [bitcoin_get_current_fee_percentiles_args],
294
- [bitcoin_get_current_fee_percentiles_result],
295
- []
296
- ),
297
- bitcoin_get_utxos: IDL.Func([bitcoin_get_utxos_args], [bitcoin_get_utxos_result], []),
298
- bitcoin_get_utxos_query: IDL.Func(
299
- [bitcoin_get_utxos_query_args],
300
- [bitcoin_get_utxos_query_result],
301
- ['query']
302
- ),
303
- bitcoin_send_transaction: IDL.Func([bitcoin_send_transaction_args], [], []),
304
- canister_info: IDL.Func([canister_info_args], [canister_info_result], []),
305
- canister_status: IDL.Func([canister_status_args], [canister_status_result], []),
306
- clear_chunk_store: IDL.Func([clear_chunk_store_args], [], []),
307
- create_canister: IDL.Func([create_canister_args], [create_canister_result], []),
308
- delete_canister: IDL.Func([delete_canister_args], [], []),
309
- deposit_cycles: IDL.Func([deposit_cycles_args], [], []),
310
- ecdsa_public_key: IDL.Func([ecdsa_public_key_args], [ecdsa_public_key_result], []),
311
- fetch_canister_logs: IDL.Func(
312
- [fetch_canister_logs_args],
313
- [fetch_canister_logs_result],
314
- ['query']
315
- ),
316
- http_request: IDL.Func([http_request_args], [http_request_result], []),
317
- install_chunked_code: IDL.Func([install_chunked_code_args], [], []),
318
- install_code: IDL.Func([install_code_args], [], []),
319
- node_metrics_history: IDL.Func([node_metrics_history_args], [node_metrics_history_result], []),
320
- provisional_create_canister_with_cycles: IDL.Func(
321
- [provisional_create_canister_with_cycles_args],
322
- [provisional_create_canister_with_cycles_result],
323
- []
324
- ),
325
- provisional_top_up_canister: IDL.Func([provisional_top_up_canister_args], [], []),
326
- raw_rand: IDL.Func([], [raw_rand_result], []),
327
- sign_with_ecdsa: IDL.Func([sign_with_ecdsa_args], [sign_with_ecdsa_result], []),
328
- start_canister: IDL.Func([start_canister_args], [], []),
329
- stop_canister: IDL.Func([stop_canister_args], [], []),
330
- stored_chunks: IDL.Func([stored_chunks_args], [stored_chunks_result], []),
331
- uninstall_code: IDL.Func([uninstall_code_args], [], []),
332
- update_settings: IDL.Func([update_settings_args], [], []),
333
- upload_chunk: IDL.Func([upload_chunk_args], [upload_chunk_result], [])
334
- });
335
- };
336
- // @ts-ignore
337
- export const init = ({IDL}) => {
338
- return [];
339
- };
@@ -1,115 +0,0 @@
1
- import type {ActorMethod} from '@dfinity/agent';
2
- import type {IDL} from '@dfinity/candid';
3
- import type {Principal} from '@dfinity/principal';
4
-
5
- export type CanisterStatusType = {stopped: null} | {stopping: null} | {running: null};
6
- export interface Controller {
7
- updated_at: bigint;
8
- metadata: Array<[string, string]>;
9
- created_at: bigint;
10
- scope: ControllerScope;
11
- expires_at: [] | [bigint];
12
- }
13
- export type ControllerScope = {Write: null} | {Admin: null};
14
- export interface CronJobStatusesConfig {
15
- enabled: boolean;
16
- cycles_threshold: [] | [bigint];
17
- }
18
- export interface DepositCyclesArgs {
19
- cycles: bigint;
20
- destination_id: Principal;
21
- }
22
- export interface Orbiter {
23
- updated_at: bigint;
24
- orbiter_id: Principal;
25
- metadata: Array<[string, string]>;
26
- created_at: bigint;
27
- }
28
- export type Result = {Ok: SegmentStatus} | {Err: string};
29
- export interface Satellite {
30
- updated_at: bigint;
31
- metadata: Array<[string, string]>;
32
- created_at: bigint;
33
- satellite_id: Principal;
34
- }
35
- export interface SegmentCanisterSettings {
36
- freezing_threshold: bigint;
37
- controllers: Array<Principal>;
38
- memory_allocation: bigint;
39
- compute_allocation: bigint;
40
- }
41
- export interface SegmentCanisterStatus {
42
- status: CanisterStatusType;
43
- memory_size: bigint;
44
- cycles: bigint;
45
- settings: SegmentCanisterSettings;
46
- idle_cycles_burned_per_day: bigint;
47
- module_hash: [] | [Uint8Array | number[]];
48
- }
49
- export interface SegmentStatus {
50
- id: Principal;
51
- status: SegmentCanisterStatus;
52
- metadata: [] | [Array<[string, string]>];
53
- status_at: bigint;
54
- }
55
- export interface SegmentsStatuses {
56
- orbiters: [] | [Array<Result>];
57
- satellites: [] | [Array<Result>];
58
- mission_control: Result;
59
- }
60
- export interface SetController {
61
- metadata: Array<[string, string]>;
62
- scope: ControllerScope;
63
- expires_at: [] | [bigint];
64
- }
65
- export interface StatusesArgs {
66
- mission_control_cycles_threshold: [] | [bigint];
67
- orbiters: Array<[Principal, CronJobStatusesConfig]>;
68
- satellites: Array<[Principal, CronJobStatusesConfig]>;
69
- cycles_threshold: [] | [bigint];
70
- }
71
- export interface Tokens {
72
- e8s: bigint;
73
- }
74
- export interface _SERVICE {
75
- add_mission_control_controllers: ActorMethod<[Array<Principal>], undefined>;
76
- add_satellites_controllers: ActorMethod<[Array<Principal>, Array<Principal>], undefined>;
77
- create_orbiter: ActorMethod<[[] | [string]], Orbiter>;
78
- create_satellite: ActorMethod<[string], Satellite>;
79
- del_mission_control_controllers: ActorMethod<[Array<Principal>], undefined>;
80
- del_orbiter: ActorMethod<[Principal, bigint], undefined>;
81
- del_orbiters_controllers: ActorMethod<[Array<Principal>, Array<Principal>], undefined>;
82
- del_satellite: ActorMethod<[Principal, bigint], undefined>;
83
- del_satellites_controllers: ActorMethod<[Array<Principal>, Array<Principal>], undefined>;
84
- deposit_cycles: ActorMethod<[DepositCyclesArgs], undefined>;
85
- get_user: ActorMethod<[], Principal>;
86
- list_mission_control_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
87
- list_mission_control_statuses: ActorMethod<[], Array<[bigint, Result]>>;
88
- list_orbiter_statuses: ActorMethod<[Principal], [] | [Array<[bigint, Result]>]>;
89
- list_orbiters: ActorMethod<[], Array<[Principal, Orbiter]>>;
90
- list_satellite_statuses: ActorMethod<[Principal], [] | [Array<[bigint, Result]>]>;
91
- list_satellites: ActorMethod<[], Array<[Principal, Satellite]>>;
92
- remove_mission_control_controllers: ActorMethod<[Array<Principal>], undefined>;
93
- remove_satellites_controllers: ActorMethod<[Array<Principal>, Array<Principal>], undefined>;
94
- set_metadata: ActorMethod<[Array<[string, string]>], undefined>;
95
- set_mission_control_controllers: ActorMethod<[Array<Principal>, SetController], undefined>;
96
- set_orbiter: ActorMethod<[Principal, [] | [string]], Orbiter>;
97
- set_orbiter_metadata: ActorMethod<[Principal, Array<[string, string]>], Orbiter>;
98
- set_orbiters_controllers: ActorMethod<
99
- [Array<Principal>, Array<Principal>, SetController],
100
- undefined
101
- >;
102
- set_satellite: ActorMethod<[Principal, [] | [string]], Satellite>;
103
- set_satellite_metadata: ActorMethod<[Principal, Array<[string, string]>], Satellite>;
104
- set_satellites_controllers: ActorMethod<
105
- [Array<Principal>, Array<Principal>, SetController],
106
- undefined
107
- >;
108
- status: ActorMethod<[StatusesArgs], SegmentsStatuses>;
109
- top_up: ActorMethod<[Principal, Tokens], undefined>;
110
- unset_orbiter: ActorMethod<[Principal], undefined>;
111
- unset_satellite: ActorMethod<[Principal], undefined>;
112
- version: ActorMethod<[], string>;
113
- }
114
- export declare const idlFactory: IDL.InterfaceFactory;
115
- export declare const init: (args: {IDL: typeof IDL}) => IDL.Type[];
@@ -1,147 +0,0 @@
1
- // @ts-ignore
2
- export const idlFactory = ({IDL}) => {
3
- const Orbiter = IDL.Record({
4
- updated_at: IDL.Nat64,
5
- orbiter_id: IDL.Principal,
6
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
7
- created_at: IDL.Nat64
8
- });
9
- const Satellite = IDL.Record({
10
- updated_at: IDL.Nat64,
11
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
12
- created_at: IDL.Nat64,
13
- satellite_id: IDL.Principal
14
- });
15
- const DepositCyclesArgs = IDL.Record({
16
- cycles: IDL.Nat,
17
- destination_id: IDL.Principal
18
- });
19
- const ControllerScope = IDL.Variant({
20
- Write: IDL.Null,
21
- Admin: IDL.Null
22
- });
23
- const Controller = IDL.Record({
24
- updated_at: IDL.Nat64,
25
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
26
- created_at: IDL.Nat64,
27
- scope: ControllerScope,
28
- expires_at: IDL.Opt(IDL.Nat64)
29
- });
30
- const CanisterStatusType = IDL.Variant({
31
- stopped: IDL.Null,
32
- stopping: IDL.Null,
33
- running: IDL.Null
34
- });
35
- const SegmentCanisterSettings = IDL.Record({
36
- freezing_threshold: IDL.Nat,
37
- controllers: IDL.Vec(IDL.Principal),
38
- memory_allocation: IDL.Nat,
39
- compute_allocation: IDL.Nat
40
- });
41
- const SegmentCanisterStatus = IDL.Record({
42
- status: CanisterStatusType,
43
- memory_size: IDL.Nat,
44
- cycles: IDL.Nat,
45
- settings: SegmentCanisterSettings,
46
- idle_cycles_burned_per_day: IDL.Nat,
47
- module_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
48
- });
49
- const SegmentStatus = IDL.Record({
50
- id: IDL.Principal,
51
- status: SegmentCanisterStatus,
52
- metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
53
- status_at: IDL.Nat64
54
- });
55
- const Result = IDL.Variant({Ok: SegmentStatus, Err: IDL.Text});
56
- const SetController = IDL.Record({
57
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
58
- scope: ControllerScope,
59
- expires_at: IDL.Opt(IDL.Nat64)
60
- });
61
- const CronJobStatusesConfig = IDL.Record({
62
- enabled: IDL.Bool,
63
- cycles_threshold: IDL.Opt(IDL.Nat64)
64
- });
65
- const StatusesArgs = IDL.Record({
66
- mission_control_cycles_threshold: IDL.Opt(IDL.Nat64),
67
- orbiters: IDL.Vec(IDL.Tuple(IDL.Principal, CronJobStatusesConfig)),
68
- satellites: IDL.Vec(IDL.Tuple(IDL.Principal, CronJobStatusesConfig)),
69
- cycles_threshold: IDL.Opt(IDL.Nat64)
70
- });
71
- const SegmentsStatuses = IDL.Record({
72
- orbiters: IDL.Opt(IDL.Vec(Result)),
73
- satellites: IDL.Opt(IDL.Vec(Result)),
74
- mission_control: Result
75
- });
76
- const Tokens = IDL.Record({e8s: IDL.Nat64});
77
- return IDL.Service({
78
- add_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
79
- add_satellites_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
80
- create_orbiter: IDL.Func([IDL.Opt(IDL.Text)], [Orbiter], []),
81
- create_satellite: IDL.Func([IDL.Text], [Satellite], []),
82
- del_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
83
- del_orbiter: IDL.Func([IDL.Principal, IDL.Nat], [], []),
84
- del_orbiters_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
85
- del_satellite: IDL.Func([IDL.Principal, IDL.Nat], [], []),
86
- del_satellites_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
87
- deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
88
- get_user: IDL.Func([], [IDL.Principal], ['query']),
89
- list_mission_control_controllers: IDL.Func(
90
- [],
91
- [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
92
- ['query']
93
- ),
94
- list_mission_control_statuses: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Nat64, Result))], ['query']),
95
- list_orbiter_statuses: IDL.Func(
96
- [IDL.Principal],
97
- [IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Nat64, Result)))],
98
- ['query']
99
- ),
100
- list_orbiters: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Orbiter))], ['query']),
101
- list_satellite_statuses: IDL.Func(
102
- [IDL.Principal],
103
- [IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Nat64, Result)))],
104
- ['query']
105
- ),
106
- list_satellites: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Satellite))], ['query']),
107
- remove_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
108
- remove_satellites_controllers: IDL.Func(
109
- [IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)],
110
- [],
111
- []
112
- ),
113
- set_metadata: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], [], []),
114
- set_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal), SetController], [], []),
115
- set_orbiter: IDL.Func([IDL.Principal, IDL.Opt(IDL.Text)], [Orbiter], []),
116
- set_orbiter_metadata: IDL.Func(
117
- [IDL.Principal, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
118
- [Orbiter],
119
- []
120
- ),
121
- set_orbiters_controllers: IDL.Func(
122
- [IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal), SetController],
123
- [],
124
- []
125
- ),
126
- set_satellite: IDL.Func([IDL.Principal, IDL.Opt(IDL.Text)], [Satellite], []),
127
- set_satellite_metadata: IDL.Func(
128
- [IDL.Principal, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
129
- [Satellite],
130
- []
131
- ),
132
- set_satellites_controllers: IDL.Func(
133
- [IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal), SetController],
134
- [],
135
- []
136
- ),
137
- status: IDL.Func([StatusesArgs], [SegmentsStatuses], []),
138
- top_up: IDL.Func([IDL.Principal, Tokens], [], []),
139
- unset_orbiter: IDL.Func([IDL.Principal], [], []),
140
- unset_satellite: IDL.Func([IDL.Principal], [], []),
141
- version: IDL.Func([], [IDL.Text], ['query'])
142
- });
143
- };
144
- // @ts-ignore
145
- export const init = ({IDL}) => {
146
- return [];
147
- };