@junobuild/admin 0.0.46 → 0.0.47-next-2024-05-06

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 (44) hide show
  1. package/declarations/ic/ic.did.d.ts +221 -140
  2. package/declarations/ic/ic.factory.did.js +234 -169
  3. package/declarations/ic/ic.factory.did.mjs +339 -0
  4. package/declarations/mission_control/mission_control.did.d.ts +1 -0
  5. package/declarations/orbiter/orbiter.did.d.ts +8 -2
  6. package/declarations/orbiter/orbiter.factory.did.js +8 -3
  7. package/declarations/orbiter/orbiter.factory.did.mjs +8 -3
  8. package/declarations/satellite/satellite.did.d.ts +18 -3
  9. package/declarations/satellite/satellite.factory.did.js +20 -6
  10. package/declarations/satellite/satellite.factory.did.mjs +20 -6
  11. package/dist/browser/index.js +7 -7
  12. package/dist/browser/index.js.map +3 -3
  13. package/dist/declarations/ic/ic.did.d.ts +221 -140
  14. package/dist/declarations/ic/ic.factory.did.js +234 -169
  15. package/dist/declarations/ic/ic.factory.did.mjs +339 -0
  16. package/dist/declarations/mission_control/mission_control.did.d.ts +1 -0
  17. package/dist/declarations/orbiter/orbiter.did.d.ts +8 -2
  18. package/dist/declarations/orbiter/orbiter.factory.did.js +8 -3
  19. package/dist/declarations/orbiter/orbiter.factory.did.mjs +8 -3
  20. package/dist/declarations/satellite/satellite.did.d.ts +18 -3
  21. package/dist/declarations/satellite/satellite.factory.did.js +20 -6
  22. package/dist/declarations/satellite/satellite.factory.did.mjs +20 -6
  23. package/dist/node/index.mjs +7 -7
  24. package/dist/node/index.mjs.map +3 -3
  25. package/dist/types/api/ic.api.d.ts +1 -1
  26. package/dist/types/api/satellite.api.d.ts +8 -1
  27. package/dist/types/services/satellite.services.d.ts +8 -1
  28. package/dist/types/types/ic.types.d.ts +3 -11
  29. package/dist/types/utils/rule.utils.d.ts +1 -1
  30. package/package.json +6 -6
  31. package/declarations/ic/ic.did +0 -195
  32. package/declarations/mission_control/index.d.ts +0 -45
  33. package/declarations/mission_control/index.js +0 -38
  34. package/declarations/orbiter/index.d.ts +0 -45
  35. package/declarations/orbiter/index.js +0 -37
  36. package/declarations/satellite/index.d.ts +0 -45
  37. package/declarations/satellite/index.js +0 -37
  38. package/dist/declarations/ic/ic.did +0 -195
  39. package/dist/declarations/mission_control/index.d.ts +0 -45
  40. package/dist/declarations/mission_control/index.js +0 -38
  41. package/dist/declarations/orbiter/index.d.ts +0 -45
  42. package/dist/declarations/orbiter/index.js +0 -37
  43. package/dist/declarations/satellite/index.d.ts +0 -45
  44. package/dist/declarations/satellite/index.js +0 -37
@@ -5,17 +5,25 @@ export const idlFactory = ({IDL}) => {
5
5
  testnet: IDL.Null
6
6
  });
7
7
  const bitcoin_address = IDL.Text;
8
- const get_balance_request = IDL.Record({
8
+ const bitcoin_get_balance_args = IDL.Record({
9
9
  network: bitcoin_network,
10
10
  address: bitcoin_address,
11
11
  min_confirmations: IDL.Opt(IDL.Nat32)
12
12
  });
13
13
  const satoshi = IDL.Nat64;
14
- const get_current_fee_percentiles_request = IDL.Record({
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({
15
22
  network: bitcoin_network
16
23
  });
17
24
  const millisatoshi_per_byte = IDL.Nat64;
18
- const get_utxos_request = IDL.Record({
25
+ const bitcoin_get_current_fee_percentiles_result = IDL.Vec(millisatoshi_per_byte);
26
+ const bitcoin_get_utxos_args = IDL.Record({
19
27
  network: bitcoin_network,
20
28
  filter: IDL.Opt(
21
29
  IDL.Variant({
@@ -35,17 +43,37 @@ export const idlFactory = ({IDL}) => {
35
43
  value: satoshi,
36
44
  outpoint: outpoint
37
45
  });
38
- const get_utxos_response = IDL.Record({
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({
39
63
  next_page: IDL.Opt(IDL.Vec(IDL.Nat8)),
40
64
  tip_height: IDL.Nat32,
41
65
  tip_block_hash: block_hash,
42
66
  utxos: IDL.Vec(utxo)
43
67
  });
44
- const send_transaction_request = IDL.Record({
68
+ const bitcoin_send_transaction_args = IDL.Record({
45
69
  transaction: IDL.Vec(IDL.Nat8),
46
70
  network: bitcoin_network
47
71
  });
48
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
+ });
49
77
  const change_origin = IDL.Variant({
50
78
  from_user: IDL.Record({user_id: IDL.Principal}),
51
79
  from_canister: IDL.Record({
@@ -74,198 +102,235 @@ export const idlFactory = ({IDL}) => {
74
102
  origin: change_origin,
75
103
  details: change_details
76
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
+ });
77
116
  const definite_canister_settings = IDL.Record({
78
117
  freezing_threshold: IDL.Nat,
79
118
  controllers: IDL.Vec(IDL.Principal),
119
+ reserved_cycles_limit: IDL.Nat,
120
+ log_visibility: log_visibility,
80
121
  memory_allocation: IDL.Nat,
81
122
  compute_allocation: IDL.Nat
82
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});
83
138
  const canister_settings = IDL.Record({
84
139
  freezing_threshold: IDL.Opt(IDL.Nat),
85
140
  controllers: IDL.Opt(IDL.Vec(IDL.Principal)),
141
+ reserved_cycles_limit: IDL.Opt(IDL.Nat),
142
+ log_visibility: IDL.Opt(log_visibility),
86
143
  memory_allocation: IDL.Opt(IDL.Nat),
87
144
  compute_allocation: IDL.Opt(IDL.Nat)
88
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});
89
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
+ });
90
172
  const http_header = IDL.Record({value: IDL.Text, name: IDL.Text});
91
- const http_response = IDL.Record({
173
+ const http_request_result = IDL.Record({
92
174
  status: IDL.Nat,
93
175
  body: IDL.Vec(IDL.Nat8),
94
176
  headers: IDL.Vec(http_header)
95
177
  });
96
- const wasm_module = IDL.Vec(IDL.Nat8);
97
- return IDL.Service({
98
- bitcoin_get_balance: IDL.Func([get_balance_request], [satoshi], []),
99
- bitcoin_get_current_fee_percentiles: IDL.Func(
100
- [get_current_fee_percentiles_request],
101
- [IDL.Vec(millisatoshi_per_byte)],
102
- []
103
- ),
104
- bitcoin_get_utxos: IDL.Func([get_utxos_request], [get_utxos_response], []),
105
- bitcoin_send_transaction: IDL.Func([send_transaction_request], [], []),
106
- canister_info: IDL.Func(
107
- [
108
- IDL.Record({
109
- canister_id: canister_id,
110
- num_requested_changes: IDL.Opt(IDL.Nat64)
111
- })
112
- ],
113
- [
114
- IDL.Record({
115
- controllers: IDL.Vec(IDL.Principal),
116
- module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
117
- recent_changes: IDL.Vec(change),
118
- total_num_changes: IDL.Nat64
119
- })
120
- ],
121
- []
122
- ),
123
- canister_status: IDL.Func(
124
- [IDL.Record({canister_id: canister_id})],
125
- [
126
- IDL.Record({
127
- status: IDL.Variant({
128
- stopped: IDL.Null,
129
- stopping: IDL.Null,
130
- running: IDL.Null
131
- }),
132
- memory_size: IDL.Nat,
133
- cycles: IDL.Nat,
134
- settings: definite_canister_settings,
135
- idle_cycles_burned_per_day: IDL.Nat,
136
- module_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
137
- })
138
- ],
139
- []
140
- ),
141
- create_canister: IDL.Func(
142
- [
143
- IDL.Record({
144
- settings: IDL.Opt(canister_settings),
145
- sender_canister_version: IDL.Opt(IDL.Nat64)
146
- })
147
- ],
148
- [IDL.Record({canister_id: canister_id})],
149
- []
150
- ),
151
- delete_canister: IDL.Func([IDL.Record({canister_id: canister_id})], [], []),
152
- deposit_cycles: IDL.Func([IDL.Record({canister_id: canister_id})], [], []),
153
- ecdsa_public_key: IDL.Func(
154
- [
155
- IDL.Record({
156
- key_id: IDL.Record({name: IDL.Text, curve: ecdsa_curve}),
157
- canister_id: IDL.Opt(canister_id),
158
- derivation_path: IDL.Vec(IDL.Vec(IDL.Nat8))
159
- })
160
- ],
161
- [
162
- IDL.Record({
163
- public_key: IDL.Vec(IDL.Nat8),
164
- chain_code: IDL.Vec(IDL.Nat8)
165
- })
166
- ],
167
- []
168
- ),
169
- http_request: IDL.Func(
170
- [
171
- IDL.Record({
172
- url: IDL.Text,
173
- method: IDL.Variant({
174
- get: IDL.Null,
175
- head: IDL.Null,
176
- post: IDL.Null
177
- }),
178
- max_response_bytes: IDL.Opt(IDL.Nat64),
179
- body: IDL.Opt(IDL.Vec(IDL.Nat8)),
180
- transform: IDL.Opt(
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
+ [
181
191
  IDL.Record({
182
- function: IDL.Func(
183
- [
184
- IDL.Record({
185
- context: IDL.Vec(IDL.Nat8),
186
- response: http_response
187
- })
188
- ],
189
- [http_response],
190
- ['query']
191
- ),
192
- context: IDL.Vec(IDL.Nat8)
192
+ context: IDL.Vec(IDL.Nat8),
193
+ response: http_request_result
193
194
  })
194
- ),
195
- headers: IDL.Vec(http_header)
196
- })
197
- ],
198
- [http_response],
199
- []
195
+ ],
196
+ [http_request_result],
197
+ ['query']
198
+ ),
199
+ context: IDL.Vec(IDL.Nat8)
200
+ })
200
201
  ),
201
- install_code: IDL.Func(
202
- [
203
- IDL.Record({
204
- arg: IDL.Vec(IDL.Nat8),
205
- wasm_module: wasm_module,
206
- mode: IDL.Variant({
207
- reinstall: IDL.Null,
208
- upgrade: IDL.Null,
209
- install: IDL.Null
210
- }),
211
- canister_id: canister_id,
212
- sender_canister_version: IDL.Opt(IDL.Nat64)
213
- })
214
- ],
215
- [],
216
- []
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']
217
291
  ),
218
- provisional_create_canister_with_cycles: IDL.Func(
219
- [
220
- IDL.Record({
221
- settings: IDL.Opt(canister_settings),
222
- specified_id: IDL.Opt(canister_id),
223
- amount: IDL.Opt(IDL.Nat)
224
- })
225
- ],
226
- [IDL.Record({canister_id: canister_id})],
292
+ bitcoin_get_current_fee_percentiles: IDL.Func(
293
+ [bitcoin_get_current_fee_percentiles_args],
294
+ [bitcoin_get_current_fee_percentiles_result],
227
295
  []
228
296
  ),
229
- provisional_top_up_canister: IDL.Func(
230
- [IDL.Record({canister_id: canister_id, amount: IDL.Nat})],
231
- [],
232
- []
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']
233
302
  ),
234
- raw_rand: IDL.Func([], [IDL.Vec(IDL.Nat8)], []),
235
- sign_with_ecdsa: IDL.Func(
236
- [
237
- IDL.Record({
238
- key_id: IDL.Record({name: IDL.Text, curve: ecdsa_curve}),
239
- derivation_path: IDL.Vec(IDL.Vec(IDL.Nat8)),
240
- message_hash: IDL.Vec(IDL.Nat8)
241
- })
242
- ],
243
- [IDL.Record({signature: IDL.Vec(IDL.Nat8)})],
244
- []
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']
245
315
  ),
246
- start_canister: IDL.Func([IDL.Record({canister_id: canister_id})], [], []),
247
- stop_canister: IDL.Func([IDL.Record({canister_id: canister_id})], [], []),
248
- uninstall_code: IDL.Func(
249
- [
250
- IDL.Record({
251
- canister_id: canister_id,
252
- sender_canister_version: IDL.Opt(IDL.Nat64)
253
- })
254
- ],
255
- [],
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],
256
323
  []
257
324
  ),
258
- update_settings: IDL.Func(
259
- [
260
- IDL.Record({
261
- canister_id: IDL.Principal,
262
- settings: canister_settings,
263
- sender_canister_version: IDL.Opt(IDL.Nat64)
264
- })
265
- ],
266
- [],
267
- []
268
- )
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], [])
269
334
  });
270
335
  };
271
336
  // @ts-ignore