@junobuild/functions 0.4.1 → 0.5.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 (137) hide show
  1. package/canisters/_canister.d.ts +17 -0
  2. package/canisters/_constants.d.ts +3 -0
  3. package/canisters/ckbtc/index.d.ts +1 -0
  4. package/canisters/ckbtc/index.js +2 -0
  5. package/canisters/cketh/index.d.ts +1 -0
  6. package/canisters/cketh/index.js +2 -0
  7. package/canisters/cketh/index.js.map +7 -0
  8. package/canisters/cmc/cmc.canister.d.ts +28 -0
  9. package/canisters/cmc/index.d.ts +2 -0
  10. package/canisters/cmc/index.js +2 -0
  11. package/canisters/cmc/index.js.map +7 -0
  12. package/canisters/declarations/_idl.d.ts +16 -0
  13. package/canisters/declarations/_types.d.ts +16 -0
  14. package/canisters/declarations/ckbtc/bitcoin.did.d.ts +134 -0
  15. package/canisters/declarations/ckbtc/bitcoin.did.idl.d.ts +40 -0
  16. package/canisters/declarations/ckbtc/minter.did.d.ts +831 -0
  17. package/canisters/declarations/ckbtc/minter.did.idl.d.ts +61 -0
  18. package/canisters/declarations/cketh/minter.did.d.ts +893 -0
  19. package/canisters/declarations/cketh/minter.did.idl.d.ts +58 -0
  20. package/canisters/declarations/cketh/orchestrator.did.d.ts +302 -0
  21. package/canisters/declarations/cketh/orchestrator.did.idl.d.ts +34 -0
  22. package/canisters/declarations/cmc/cmc.did.d.ts +344 -0
  23. package/canisters/declarations/cmc/cmc.did.idl.d.ts +53 -0
  24. package/canisters/declarations/ic-management/ic-management.did.d.ts +583 -0
  25. package/canisters/declarations/ic-management/ic-management.did.idl.d.ts +147 -0
  26. package/canisters/declarations/index.d.ts +2 -0
  27. package/canisters/declarations/ledger-icp/index.did.d.ts +119 -0
  28. package/canisters/declarations/ledger-icp/index.did.idl.d.ts +35 -0
  29. package/canisters/declarations/ledger-icp/ledger.did.d.ts +606 -0
  30. package/canisters/declarations/ledger-icp/ledger.did.idl.d.ts +106 -0
  31. package/canisters/declarations/ledger-icrc/icrc_index-ng.did.d.ts +148 -0
  32. package/canisters/declarations/ledger-icrc/icrc_index-ng.did.idl.d.ts +44 -0
  33. package/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +102 -0
  34. package/canisters/declarations/ledger-icrc/icrc_index.did.idl.d.ts +28 -0
  35. package/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +579 -0
  36. package/canisters/declarations/ledger-icrc/icrc_ledger.did.idl.d.ts +100 -0
  37. package/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.d.ts +81 -0
  38. package/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.idl.d.ts +39 -0
  39. package/canisters/declarations/nns/genesis_token.did.d.ts +49 -0
  40. package/canisters/declarations/nns/genesis_token.did.idl.d.ts +24 -0
  41. package/canisters/declarations/nns/governance.did.d.ts +1254 -0
  42. package/canisters/declarations/nns/governance.did.idl.d.ts +217 -0
  43. package/canisters/declarations/nns/governance_test.did.d.ts +1258 -0
  44. package/canisters/declarations/nns/governance_test.did.idl.d.ts +218 -0
  45. package/canisters/declarations/nns/sns_wasm.did.d.ts +286 -0
  46. package/canisters/declarations/nns/sns_wasm.did.idl.d.ts +80 -0
  47. package/canisters/declarations/sns/sns_governance.did.d.ts +834 -0
  48. package/canisters/declarations/sns/sns_governance.did.idl.d.ts +189 -0
  49. package/canisters/declarations/sns/sns_governance_test.did.d.ts +861 -0
  50. package/canisters/declarations/sns/sns_governance_test.did.idl.d.ts +199 -0
  51. package/canisters/declarations/sns/sns_root.did.d.ts +204 -0
  52. package/canisters/declarations/sns/sns_root.did.idl.d.ts +53 -0
  53. package/canisters/declarations/sns/sns_swap.did.d.ts +411 -0
  54. package/canisters/declarations/sns/sns_swap.did.idl.d.ts +108 -0
  55. package/canisters/ic-management/index.d.ts +1 -0
  56. package/canisters/ic-management/index.js +2 -0
  57. package/canisters/ic-management/index.js.map +7 -0
  58. package/canisters/index.d.ts +1 -0
  59. package/canisters/index.js +2 -0
  60. package/canisters/index.js.map +7 -0
  61. package/canisters/ledger/icp/index.d.ts +2 -0
  62. package/canisters/ledger/icp/index.js +2 -0
  63. package/canisters/ledger/icp/index.js.map +7 -0
  64. package/canisters/ledger/icp/ledger.canister.d.ts +24 -0
  65. package/canisters/ledger/icrc/index.d.ts +3 -0
  66. package/canisters/ledger/icrc/index.js +2 -0
  67. package/canisters/ledger/icrc/index.js.map +7 -0
  68. package/canisters/ledger/icrc/ledger.canister.d.ts +45 -0
  69. package/canisters/ledger/icrc/schemas.d.ts +11 -0
  70. package/canisters/nns/index.d.ts +1 -0
  71. package/canisters/nns/index.js +2 -0
  72. package/canisters/nns/index.js.map +7 -0
  73. package/canisters/schemas.d.ts +11 -0
  74. package/canisters/sns/index.d.ts +1 -0
  75. package/canisters/sns/index.js +2 -0
  76. package/canisters/sns/index.js.map +7 -0
  77. package/chunk-4C666HHU.js +2 -0
  78. package/chunk-4C666HHU.js.map +7 -0
  79. package/chunk-5NZMOUKF.js +2 -0
  80. package/chunk-5NZMOUKF.js.map +7 -0
  81. package/chunk-BXZ5PSUW.js +2 -0
  82. package/chunk-BXZ5PSUW.js.map +7 -0
  83. package/chunk-EMQQE34V.js +2 -0
  84. package/chunk-EMQQE34V.js.map +7 -0
  85. package/chunk-HANEPD6T.js +2 -0
  86. package/chunk-HANEPD6T.js.map +7 -0
  87. package/chunk-TZVF5LQY.js +2 -0
  88. package/chunk-TZVF5LQY.js.map +7 -0
  89. package/ic-cdk.js +1 -1
  90. package/ic-cdk.js.map +4 -4
  91. package/index.js +1 -1
  92. package/index.js.map +1 -1
  93. package/package.json +39 -2
  94. package/sdk.js +1 -1
  95. package/sdk.js.map +1 -1
  96. package/src/canisters/declarations/ckbtc/bitcoin.did.d.ts +134 -0
  97. package/src/canisters/declarations/ckbtc/bitcoin.did.idl.js +302 -0
  98. package/src/canisters/declarations/ckbtc/minter.did.d.ts +831 -0
  99. package/src/canisters/declarations/ckbtc/minter.did.idl.js +893 -0
  100. package/src/canisters/declarations/cketh/minter.did.d.ts +893 -0
  101. package/src/canisters/declarations/cketh/minter.did.idl.js +878 -0
  102. package/src/canisters/declarations/cketh/orchestrator.did.d.ts +302 -0
  103. package/src/canisters/declarations/cketh/orchestrator.did.idl.js +343 -0
  104. package/src/canisters/declarations/cmc/cmc.did.d.ts +344 -0
  105. package/src/canisters/declarations/cmc/cmc.did.idl.js +338 -0
  106. package/src/canisters/declarations/ic-management/ic-management.did.d.ts +583 -0
  107. package/src/canisters/declarations/ic-management/ic-management.did.idl.js +1150 -0
  108. package/src/canisters/declarations/ledger-icp/index.did.d.ts +119 -0
  109. package/src/canisters/declarations/ledger-icp/index.did.idl.js +225 -0
  110. package/src/canisters/declarations/ledger-icp/ledger.did.d.ts +606 -0
  111. package/src/canisters/declarations/ledger-icp/ledger.did.idl.js +813 -0
  112. package/src/canisters/declarations/ledger-icrc/icrc_index-ng.did.d.ts +148 -0
  113. package/src/canisters/declarations/ledger-icrc/icrc_index-ng.did.idl.js +274 -0
  114. package/src/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +102 -0
  115. package/src/canisters/declarations/ledger-icrc/icrc_index.did.idl.js +171 -0
  116. package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +579 -0
  117. package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.idl.js +923 -0
  118. package/src/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.d.ts +81 -0
  119. package/src/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.idl.js +163 -0
  120. package/src/canisters/declarations/nns/genesis_token.did.d.ts +49 -0
  121. package/src/canisters/declarations/nns/genesis_token.did.idl.js +84 -0
  122. package/src/canisters/declarations/nns/governance.did.d.ts +1254 -0
  123. package/src/canisters/declarations/nns/governance.did.idl.js +2756 -0
  124. package/src/canisters/declarations/nns/governance_test.did.d.ts +1258 -0
  125. package/src/canisters/declarations/nns/governance_test.did.idl.js +2758 -0
  126. package/src/canisters/declarations/nns/sns_wasm.did.d.ts +286 -0
  127. package/src/canisters/declarations/nns/sns_wasm.did.idl.js +589 -0
  128. package/src/canisters/declarations/sns/sns_governance.did.d.ts +834 -0
  129. package/src/canisters/declarations/sns/sns_governance.did.idl.js +2235 -0
  130. package/src/canisters/declarations/sns/sns_governance_test.did.d.ts +861 -0
  131. package/src/canisters/declarations/sns/sns_governance_test.did.idl.js +2283 -0
  132. package/src/canisters/declarations/sns/sns_root.did.d.ts +204 -0
  133. package/src/canisters/declarations/sns/sns_root.did.idl.js +433 -0
  134. package/src/canisters/declarations/sns/sns_swap.did.d.ts +411 -0
  135. package/src/canisters/declarations/sns/sns_swap.did.idl.js +858 -0
  136. package/global.d.js +0 -1
  137. /package/{global.d.js.map → canisters/ckbtc/index.js.map} +0 -0
@@ -0,0 +1,1150 @@
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 {IDL} from '@icp-sdk/core/candid';
10
+
11
+ export const bitcoin_network = IDL.Variant({
12
+ mainnet: IDL.Null,
13
+ testnet: IDL.Null
14
+ });
15
+ export const bitcoin_address = IDL.Text;
16
+ export const bitcoin_get_balance_args = IDL.Record({
17
+ network: bitcoin_network,
18
+ address: bitcoin_address,
19
+ min_confirmations: IDL.Opt(IDL.Nat32)
20
+ });
21
+ export const satoshi = IDL.Nat64;
22
+ export const bitcoin_get_balance_result = satoshi;
23
+ export const bitcoin_block_height = IDL.Nat32;
24
+ export const bitcoin_get_block_headers_args = IDL.Record({
25
+ start_height: bitcoin_block_height,
26
+ end_height: IDL.Opt(bitcoin_block_height),
27
+ network: bitcoin_network
28
+ });
29
+ export const bitcoin_block_header = IDL.Vec(IDL.Nat8);
30
+ export const bitcoin_get_block_headers_result = IDL.Record({
31
+ tip_height: bitcoin_block_height,
32
+ block_headers: IDL.Vec(bitcoin_block_header)
33
+ });
34
+ export const bitcoin_get_current_fee_percentiles_args = IDL.Record({
35
+ network: bitcoin_network
36
+ });
37
+ export const millisatoshi_per_byte = IDL.Nat64;
38
+ export const bitcoin_get_current_fee_percentiles_result = IDL.Vec(millisatoshi_per_byte);
39
+ export const bitcoin_get_utxos_args = IDL.Record({
40
+ network: bitcoin_network,
41
+ filter: IDL.Opt(IDL.Variant({page: IDL.Vec(IDL.Nat8), min_confirmations: IDL.Nat32})),
42
+ address: bitcoin_address
43
+ });
44
+ export const bitcoin_block_hash = IDL.Vec(IDL.Nat8);
45
+ export const outpoint = IDL.Record({
46
+ txid: IDL.Vec(IDL.Nat8),
47
+ vout: IDL.Nat32
48
+ });
49
+ export const utxo = IDL.Record({
50
+ height: IDL.Nat32,
51
+ value: satoshi,
52
+ outpoint: outpoint
53
+ });
54
+ export const bitcoin_get_utxos_result = IDL.Record({
55
+ next_page: IDL.Opt(IDL.Vec(IDL.Nat8)),
56
+ tip_height: bitcoin_block_height,
57
+ tip_block_hash: bitcoin_block_hash,
58
+ utxos: IDL.Vec(utxo)
59
+ });
60
+ export const bitcoin_send_transaction_args = IDL.Record({
61
+ transaction: IDL.Vec(IDL.Nat8),
62
+ network: bitcoin_network
63
+ });
64
+ export const canister_id = IDL.Principal;
65
+ export const canister_info_args = IDL.Record({
66
+ canister_id: canister_id,
67
+ num_requested_changes: IDL.Opt(IDL.Nat64)
68
+ });
69
+ export const change_origin = IDL.Variant({
70
+ from_user: IDL.Record({user_id: IDL.Principal}),
71
+ from_canister: IDL.Record({
72
+ canister_version: IDL.Opt(IDL.Nat64),
73
+ canister_id: IDL.Principal
74
+ })
75
+ });
76
+ export const snapshot_id = IDL.Vec(IDL.Nat8);
77
+ export const change_details = IDL.Variant({
78
+ creation: IDL.Record({
79
+ controllers: IDL.Vec(IDL.Principal),
80
+ environment_variables_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
81
+ }),
82
+ code_deployment: IDL.Record({
83
+ mode: IDL.Variant({
84
+ reinstall: IDL.Null,
85
+ upgrade: IDL.Null,
86
+ install: IDL.Null
87
+ }),
88
+ module_hash: IDL.Vec(IDL.Nat8)
89
+ }),
90
+ load_snapshot: IDL.Record({
91
+ canister_version: IDL.Nat64,
92
+ source: IDL.Variant({
93
+ metadata_upload: IDL.Reserved,
94
+ taken_from_canister: IDL.Reserved
95
+ }),
96
+ from_canister_id: IDL.Opt(IDL.Principal),
97
+ taken_at_timestamp: IDL.Nat64,
98
+ snapshot_id: snapshot_id
99
+ }),
100
+ controllers_change: IDL.Record({controllers: IDL.Vec(IDL.Principal)}),
101
+ code_uninstall: IDL.Null
102
+ });
103
+ export const change = IDL.Record({
104
+ timestamp_nanos: IDL.Nat64,
105
+ canister_version: IDL.Nat64,
106
+ origin: change_origin,
107
+ details: change_details
108
+ });
109
+ export const canister_info_result = IDL.Record({
110
+ controllers: IDL.Vec(IDL.Principal),
111
+ module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
112
+ recent_changes: IDL.Vec(change),
113
+ total_num_changes: IDL.Nat64
114
+ });
115
+ export const canister_metadata_args = IDL.Record({
116
+ name: IDL.Text,
117
+ canister_id: canister_id
118
+ });
119
+ export const canister_metadata_result = IDL.Record({
120
+ value: IDL.Vec(IDL.Nat8)
121
+ });
122
+ export const canister_status_args = IDL.Record({canister_id: canister_id});
123
+ export const environment_variable = IDL.Record({
124
+ value: IDL.Text,
125
+ name: IDL.Text
126
+ });
127
+ export const log_visibility = IDL.Variant({
128
+ controllers: IDL.Null,
129
+ public: IDL.Null,
130
+ allowed_viewers: IDL.Vec(IDL.Principal)
131
+ });
132
+ export const definite_canister_settings = IDL.Record({
133
+ freezing_threshold: IDL.Nat,
134
+ wasm_memory_threshold: IDL.Nat,
135
+ environment_variables: IDL.Vec(environment_variable),
136
+ controllers: IDL.Vec(IDL.Principal),
137
+ reserved_cycles_limit: IDL.Nat,
138
+ log_visibility: log_visibility,
139
+ wasm_memory_limit: IDL.Nat,
140
+ memory_allocation: IDL.Nat,
141
+ compute_allocation: IDL.Nat
142
+ });
143
+ export const canister_status_result = IDL.Record({
144
+ memory_metrics: IDL.Record({
145
+ wasm_binary_size: IDL.Nat,
146
+ wasm_chunk_store_size: IDL.Nat,
147
+ canister_history_size: IDL.Nat,
148
+ stable_memory_size: IDL.Nat,
149
+ snapshots_size: IDL.Nat,
150
+ wasm_memory_size: IDL.Nat,
151
+ global_memory_size: IDL.Nat,
152
+ custom_sections_size: IDL.Nat
153
+ }),
154
+ status: IDL.Variant({
155
+ stopped: IDL.Null,
156
+ stopping: IDL.Null,
157
+ running: IDL.Null
158
+ }),
159
+ memory_size: IDL.Nat,
160
+ ready_for_migration: IDL.Bool,
161
+ version: IDL.Nat64,
162
+ cycles: IDL.Nat,
163
+ settings: definite_canister_settings,
164
+ query_stats: IDL.Record({
165
+ response_payload_bytes_total: IDL.Nat,
166
+ num_instructions_total: IDL.Nat,
167
+ num_calls_total: IDL.Nat,
168
+ request_payload_bytes_total: IDL.Nat
169
+ }),
170
+ idle_cycles_burned_per_day: IDL.Nat,
171
+ module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
172
+ reserved_cycles: IDL.Nat
173
+ });
174
+ export const clear_chunk_store_args = IDL.Record({
175
+ canister_id: canister_id
176
+ });
177
+ export const canister_settings = IDL.Record({
178
+ freezing_threshold: IDL.Opt(IDL.Nat),
179
+ wasm_memory_threshold: IDL.Opt(IDL.Nat),
180
+ environment_variables: IDL.Opt(IDL.Vec(environment_variable)),
181
+ controllers: IDL.Opt(IDL.Vec(IDL.Principal)),
182
+ reserved_cycles_limit: IDL.Opt(IDL.Nat),
183
+ log_visibility: IDL.Opt(log_visibility),
184
+ wasm_memory_limit: IDL.Opt(IDL.Nat),
185
+ memory_allocation: IDL.Opt(IDL.Nat),
186
+ compute_allocation: IDL.Opt(IDL.Nat)
187
+ });
188
+ export const create_canister_args = IDL.Record({
189
+ settings: IDL.Opt(canister_settings),
190
+ sender_canister_version: IDL.Opt(IDL.Nat64)
191
+ });
192
+ export const create_canister_result = IDL.Record({
193
+ canister_id: canister_id
194
+ });
195
+ export const delete_canister_args = IDL.Record({canister_id: canister_id});
196
+ export const delete_canister_snapshot_args = IDL.Record({
197
+ canister_id: canister_id,
198
+ snapshot_id: snapshot_id
199
+ });
200
+ export const deposit_cycles_args = IDL.Record({canister_id: canister_id});
201
+ export const ecdsa_curve = IDL.Variant({secp256k1: IDL.Null});
202
+ export const ecdsa_public_key_args = IDL.Record({
203
+ key_id: IDL.Record({name: IDL.Text, curve: ecdsa_curve}),
204
+ canister_id: IDL.Opt(canister_id),
205
+ derivation_path: IDL.Vec(IDL.Vec(IDL.Nat8))
206
+ });
207
+ export const ecdsa_public_key_result = IDL.Record({
208
+ public_key: IDL.Vec(IDL.Nat8),
209
+ chain_code: IDL.Vec(IDL.Nat8)
210
+ });
211
+ export const fetch_canister_logs_args = IDL.Record({
212
+ canister_id: canister_id
213
+ });
214
+ export const canister_log_record = IDL.Record({
215
+ idx: IDL.Nat64,
216
+ timestamp_nanos: IDL.Nat64,
217
+ content: IDL.Vec(IDL.Nat8)
218
+ });
219
+ export const fetch_canister_logs_result = IDL.Record({
220
+ canister_log_records: IDL.Vec(canister_log_record)
221
+ });
222
+ export const http_header = IDL.Record({
223
+ value: IDL.Text,
224
+ name: IDL.Text
225
+ });
226
+ export const http_request_result = IDL.Record({
227
+ status: IDL.Nat,
228
+ body: IDL.Vec(IDL.Nat8),
229
+ headers: IDL.Vec(http_header)
230
+ });
231
+ export const http_request_args = IDL.Record({
232
+ url: IDL.Text,
233
+ method: IDL.Variant({
234
+ get: IDL.Null,
235
+ head: IDL.Null,
236
+ post: IDL.Null
237
+ }),
238
+ max_response_bytes: IDL.Opt(IDL.Nat64),
239
+ body: IDL.Opt(IDL.Vec(IDL.Nat8)),
240
+ transform: IDL.Opt(
241
+ IDL.Record({
242
+ function: IDL.Func(
243
+ [
244
+ IDL.Record({
245
+ context: IDL.Vec(IDL.Nat8),
246
+ response: http_request_result
247
+ })
248
+ ],
249
+ [http_request_result],
250
+ ['query']
251
+ ),
252
+ context: IDL.Vec(IDL.Nat8)
253
+ })
254
+ ),
255
+ headers: IDL.Vec(http_header),
256
+ is_replicated: IDL.Opt(IDL.Bool)
257
+ });
258
+ export const canister_install_mode = IDL.Variant({
259
+ reinstall: IDL.Null,
260
+ upgrade: IDL.Opt(
261
+ IDL.Record({
262
+ wasm_memory_persistence: IDL.Opt(IDL.Variant({keep: IDL.Null, replace: IDL.Null})),
263
+ skip_pre_upgrade: IDL.Opt(IDL.Bool)
264
+ })
265
+ ),
266
+ install: IDL.Null
267
+ });
268
+ export const chunk_hash = IDL.Record({hash: IDL.Vec(IDL.Nat8)});
269
+ export const install_chunked_code_args = IDL.Record({
270
+ arg: IDL.Vec(IDL.Nat8),
271
+ wasm_module_hash: IDL.Vec(IDL.Nat8),
272
+ mode: canister_install_mode,
273
+ chunk_hashes_list: IDL.Vec(chunk_hash),
274
+ target_canister: canister_id,
275
+ store_canister: IDL.Opt(canister_id),
276
+ sender_canister_version: IDL.Opt(IDL.Nat64)
277
+ });
278
+ export const wasm_module = IDL.Vec(IDL.Nat8);
279
+ export const install_code_args = IDL.Record({
280
+ arg: IDL.Vec(IDL.Nat8),
281
+ wasm_module: wasm_module,
282
+ mode: canister_install_mode,
283
+ canister_id: canister_id,
284
+ sender_canister_version: IDL.Opt(IDL.Nat64)
285
+ });
286
+ export const list_canister_snapshots_args = IDL.Record({
287
+ canister_id: canister_id
288
+ });
289
+ export const snapshot = IDL.Record({
290
+ id: snapshot_id,
291
+ total_size: IDL.Nat64,
292
+ taken_at_timestamp: IDL.Nat64
293
+ });
294
+ export const list_canister_snapshots_result = IDL.Vec(snapshot);
295
+ export const load_canister_snapshot_args = IDL.Record({
296
+ canister_id: canister_id,
297
+ sender_canister_version: IDL.Opt(IDL.Nat64),
298
+ snapshot_id: snapshot_id
299
+ });
300
+ export const node_metrics_history_args = IDL.Record({
301
+ start_at_timestamp_nanos: IDL.Nat64,
302
+ subnet_id: IDL.Principal
303
+ });
304
+ export const node_metrics = IDL.Record({
305
+ num_block_failures_total: IDL.Nat64,
306
+ node_id: IDL.Principal,
307
+ num_blocks_proposed_total: IDL.Nat64
308
+ });
309
+ export const node_metrics_history_result = IDL.Vec(
310
+ IDL.Record({
311
+ timestamp_nanos: IDL.Nat64,
312
+ node_metrics: IDL.Vec(node_metrics)
313
+ })
314
+ );
315
+ export const provisional_create_canister_with_cycles_args = IDL.Record({
316
+ settings: IDL.Opt(canister_settings),
317
+ specified_id: IDL.Opt(canister_id),
318
+ amount: IDL.Opt(IDL.Nat),
319
+ sender_canister_version: IDL.Opt(IDL.Nat64)
320
+ });
321
+ export const provisional_create_canister_with_cycles_result = IDL.Record({
322
+ canister_id: canister_id
323
+ });
324
+ export const provisional_top_up_canister_args = IDL.Record({
325
+ canister_id: canister_id,
326
+ amount: IDL.Nat
327
+ });
328
+ export const raw_rand_result = IDL.Vec(IDL.Nat8);
329
+ export const read_canister_snapshot_data_args = IDL.Record({
330
+ kind: IDL.Variant({
331
+ wasm_module: IDL.Record({size: IDL.Nat64, offset: IDL.Nat64}),
332
+ wasm_memory: IDL.Record({size: IDL.Nat64, offset: IDL.Nat64}),
333
+ stable_memory: IDL.Record({size: IDL.Nat64, offset: IDL.Nat64}),
334
+ wasm_chunk: IDL.Record({hash: IDL.Vec(IDL.Nat8)})
335
+ }),
336
+ canister_id: canister_id,
337
+ snapshot_id: snapshot_id
338
+ });
339
+ export const read_canister_snapshot_data_response = IDL.Record({
340
+ chunk: IDL.Vec(IDL.Nat8)
341
+ });
342
+ export const read_canister_snapshot_metadata_args = IDL.Record({
343
+ canister_id: canister_id,
344
+ snapshot_id: snapshot_id
345
+ });
346
+ export const read_canister_snapshot_metadata_response = IDL.Record({
347
+ globals: IDL.Vec(
348
+ IDL.Variant({
349
+ f32: IDL.Float32,
350
+ f64: IDL.Float64,
351
+ i32: IDL.Int32,
352
+ i64: IDL.Int64,
353
+ v128: IDL.Nat
354
+ })
355
+ ),
356
+ canister_version: IDL.Nat64,
357
+ source: IDL.Variant({
358
+ metadata_upload: IDL.Reserved,
359
+ taken_from_canister: IDL.Reserved
360
+ }),
361
+ certified_data: IDL.Vec(IDL.Nat8),
362
+ global_timer: IDL.Opt(IDL.Variant({active: IDL.Nat64, inactive: IDL.Null})),
363
+ on_low_wasm_memory_hook_status: IDL.Opt(
364
+ IDL.Variant({
365
+ condition_not_satisfied: IDL.Null,
366
+ executed: IDL.Null,
367
+ ready: IDL.Null
368
+ })
369
+ ),
370
+ wasm_module_size: IDL.Nat64,
371
+ stable_memory_size: IDL.Nat64,
372
+ wasm_chunk_store: IDL.Vec(IDL.Record({hash: IDL.Vec(IDL.Nat8)})),
373
+ taken_at_timestamp: IDL.Nat64,
374
+ wasm_memory_size: IDL.Nat64
375
+ });
376
+ export const schnorr_algorithm = IDL.Variant({
377
+ ed25519: IDL.Null,
378
+ bip340secp256k1: IDL.Null
379
+ });
380
+ export const schnorr_public_key_args = IDL.Record({
381
+ key_id: IDL.Record({algorithm: schnorr_algorithm, name: IDL.Text}),
382
+ canister_id: IDL.Opt(canister_id),
383
+ derivation_path: IDL.Vec(IDL.Vec(IDL.Nat8))
384
+ });
385
+ export const schnorr_public_key_result = IDL.Record({
386
+ public_key: IDL.Vec(IDL.Nat8),
387
+ chain_code: IDL.Vec(IDL.Nat8)
388
+ });
389
+ export const sign_with_ecdsa_args = IDL.Record({
390
+ key_id: IDL.Record({name: IDL.Text, curve: ecdsa_curve}),
391
+ derivation_path: IDL.Vec(IDL.Vec(IDL.Nat8)),
392
+ message_hash: IDL.Vec(IDL.Nat8)
393
+ });
394
+ export const sign_with_ecdsa_result = IDL.Record({
395
+ signature: IDL.Vec(IDL.Nat8)
396
+ });
397
+ export const schnorr_aux = IDL.Variant({
398
+ bip341: IDL.Record({merkle_root_hash: IDL.Vec(IDL.Nat8)})
399
+ });
400
+ export const sign_with_schnorr_args = IDL.Record({
401
+ aux: IDL.Opt(schnorr_aux),
402
+ key_id: IDL.Record({algorithm: schnorr_algorithm, name: IDL.Text}),
403
+ derivation_path: IDL.Vec(IDL.Vec(IDL.Nat8)),
404
+ message: IDL.Vec(IDL.Nat8)
405
+ });
406
+ export const sign_with_schnorr_result = IDL.Record({
407
+ signature: IDL.Vec(IDL.Nat8)
408
+ });
409
+ export const start_canister_args = IDL.Record({canister_id: canister_id});
410
+ export const stop_canister_args = IDL.Record({canister_id: canister_id});
411
+ export const stored_chunks_args = IDL.Record({canister_id: canister_id});
412
+ export const stored_chunks_result = IDL.Vec(chunk_hash);
413
+ export const subnet_info_args = IDL.Record({subnet_id: IDL.Principal});
414
+ export const subnet_info_result = IDL.Record({
415
+ replica_version: IDL.Text,
416
+ registry_version: IDL.Nat64
417
+ });
418
+ export const take_canister_snapshot_args = IDL.Record({
419
+ replace_snapshot: IDL.Opt(snapshot_id),
420
+ canister_id: canister_id
421
+ });
422
+ export const take_canister_snapshot_result = snapshot;
423
+ export const uninstall_code_args = IDL.Record({
424
+ canister_id: canister_id,
425
+ sender_canister_version: IDL.Opt(IDL.Nat64)
426
+ });
427
+ export const update_settings_args = IDL.Record({
428
+ canister_id: IDL.Principal,
429
+ settings: canister_settings,
430
+ sender_canister_version: IDL.Opt(IDL.Nat64)
431
+ });
432
+ export const upload_canister_snapshot_data_args = IDL.Record({
433
+ chunk: IDL.Vec(IDL.Nat8),
434
+ kind: IDL.Variant({
435
+ wasm_module: IDL.Record({offset: IDL.Nat64}),
436
+ wasm_memory: IDL.Record({offset: IDL.Nat64}),
437
+ stable_memory: IDL.Record({offset: IDL.Nat64}),
438
+ wasm_chunk: IDL.Null
439
+ }),
440
+ canister_id: canister_id,
441
+ snapshot_id: snapshot_id
442
+ });
443
+ export const upload_canister_snapshot_metadata_args = IDL.Record({
444
+ globals: IDL.Vec(
445
+ IDL.Variant({
446
+ f32: IDL.Float32,
447
+ f64: IDL.Float64,
448
+ i32: IDL.Int32,
449
+ i64: IDL.Int64,
450
+ v128: IDL.Nat
451
+ })
452
+ ),
453
+ replace_snapshot: IDL.Opt(snapshot_id),
454
+ certified_data: IDL.Vec(IDL.Nat8),
455
+ global_timer: IDL.Opt(IDL.Variant({active: IDL.Nat64, inactive: IDL.Null})),
456
+ on_low_wasm_memory_hook_status: IDL.Opt(
457
+ IDL.Variant({
458
+ condition_not_satisfied: IDL.Null,
459
+ executed: IDL.Null,
460
+ ready: IDL.Null
461
+ })
462
+ ),
463
+ wasm_module_size: IDL.Nat64,
464
+ canister_id: canister_id,
465
+ stable_memory_size: IDL.Nat64,
466
+ wasm_memory_size: IDL.Nat64
467
+ });
468
+ export const upload_canister_snapshot_metadata_response = IDL.Record({
469
+ snapshot_id: snapshot_id
470
+ });
471
+ export const upload_chunk_args = IDL.Record({
472
+ chunk: IDL.Vec(IDL.Nat8),
473
+ canister_id: IDL.Principal
474
+ });
475
+ export const upload_chunk_result = chunk_hash;
476
+ export const vetkd_curve = IDL.Variant({bls12_381_g2: IDL.Null});
477
+ export const vetkd_derive_key_args = IDL.Record({
478
+ context: IDL.Vec(IDL.Nat8),
479
+ key_id: IDL.Record({name: IDL.Text, curve: vetkd_curve}),
480
+ input: IDL.Vec(IDL.Nat8),
481
+ transport_public_key: IDL.Vec(IDL.Nat8)
482
+ });
483
+ export const vetkd_derive_key_result = IDL.Record({
484
+ encrypted_key: IDL.Vec(IDL.Nat8)
485
+ });
486
+ export const vetkd_public_key_args = IDL.Record({
487
+ context: IDL.Vec(IDL.Nat8),
488
+ key_id: IDL.Record({name: IDL.Text, curve: vetkd_curve}),
489
+ canister_id: IDL.Opt(canister_id)
490
+ });
491
+ export const vetkd_public_key_result = IDL.Record({
492
+ public_key: IDL.Vec(IDL.Nat8)
493
+ });
494
+
495
+ export const idlService = IDL.Service({
496
+ bitcoin_get_balance: IDL.Func([bitcoin_get_balance_args], [bitcoin_get_balance_result], []),
497
+ bitcoin_get_block_headers: IDL.Func(
498
+ [bitcoin_get_block_headers_args],
499
+ [bitcoin_get_block_headers_result],
500
+ []
501
+ ),
502
+ bitcoin_get_current_fee_percentiles: IDL.Func(
503
+ [bitcoin_get_current_fee_percentiles_args],
504
+ [bitcoin_get_current_fee_percentiles_result],
505
+ []
506
+ ),
507
+ bitcoin_get_utxos: IDL.Func([bitcoin_get_utxos_args], [bitcoin_get_utxos_result], []),
508
+ bitcoin_send_transaction: IDL.Func([bitcoin_send_transaction_args], [], []),
509
+ canister_info: IDL.Func([canister_info_args], [canister_info_result], []),
510
+ canister_metadata: IDL.Func([canister_metadata_args], [canister_metadata_result], []),
511
+ canister_status: IDL.Func([canister_status_args], [canister_status_result], ['query']),
512
+ clear_chunk_store: IDL.Func([clear_chunk_store_args], [], []),
513
+ create_canister: IDL.Func([create_canister_args], [create_canister_result], []),
514
+ delete_canister: IDL.Func([delete_canister_args], [], []),
515
+ delete_canister_snapshot: IDL.Func([delete_canister_snapshot_args], [], []),
516
+ deposit_cycles: IDL.Func([deposit_cycles_args], [], []),
517
+ ecdsa_public_key: IDL.Func([ecdsa_public_key_args], [ecdsa_public_key_result], []),
518
+ fetch_canister_logs: IDL.Func(
519
+ [fetch_canister_logs_args],
520
+ [fetch_canister_logs_result],
521
+ ['query']
522
+ ),
523
+ http_request: IDL.Func([http_request_args], [http_request_result], []),
524
+ install_chunked_code: IDL.Func([install_chunked_code_args], [], []),
525
+ install_code: IDL.Func([install_code_args], [], []),
526
+ list_canister_snapshots: IDL.Func(
527
+ [list_canister_snapshots_args],
528
+ [list_canister_snapshots_result],
529
+ []
530
+ ),
531
+ load_canister_snapshot: IDL.Func([load_canister_snapshot_args], [], []),
532
+ node_metrics_history: IDL.Func([node_metrics_history_args], [node_metrics_history_result], []),
533
+ provisional_create_canister_with_cycles: IDL.Func(
534
+ [provisional_create_canister_with_cycles_args],
535
+ [provisional_create_canister_with_cycles_result],
536
+ []
537
+ ),
538
+ provisional_top_up_canister: IDL.Func([provisional_top_up_canister_args], [], []),
539
+ raw_rand: IDL.Func([], [raw_rand_result], []),
540
+ read_canister_snapshot_data: IDL.Func(
541
+ [read_canister_snapshot_data_args],
542
+ [read_canister_snapshot_data_response],
543
+ []
544
+ ),
545
+ read_canister_snapshot_metadata: IDL.Func(
546
+ [read_canister_snapshot_metadata_args],
547
+ [read_canister_snapshot_metadata_response],
548
+ []
549
+ ),
550
+ schnorr_public_key: IDL.Func([schnorr_public_key_args], [schnorr_public_key_result], []),
551
+ sign_with_ecdsa: IDL.Func([sign_with_ecdsa_args], [sign_with_ecdsa_result], []),
552
+ sign_with_schnorr: IDL.Func([sign_with_schnorr_args], [sign_with_schnorr_result], []),
553
+ start_canister: IDL.Func([start_canister_args], [], []),
554
+ stop_canister: IDL.Func([stop_canister_args], [], []),
555
+ stored_chunks: IDL.Func([stored_chunks_args], [stored_chunks_result], []),
556
+ subnet_info: IDL.Func([subnet_info_args], [subnet_info_result], []),
557
+ take_canister_snapshot: IDL.Func(
558
+ [take_canister_snapshot_args],
559
+ [take_canister_snapshot_result],
560
+ []
561
+ ),
562
+ uninstall_code: IDL.Func([uninstall_code_args], [], []),
563
+ update_settings: IDL.Func([update_settings_args], [], []),
564
+ upload_canister_snapshot_data: IDL.Func([upload_canister_snapshot_data_args], [], []),
565
+ upload_canister_snapshot_metadata: IDL.Func(
566
+ [upload_canister_snapshot_metadata_args],
567
+ [upload_canister_snapshot_metadata_response],
568
+ []
569
+ ),
570
+ upload_chunk: IDL.Func([upload_chunk_args], [upload_chunk_result], []),
571
+ vetkd_derive_key: IDL.Func([vetkd_derive_key_args], [vetkd_derive_key_result], []),
572
+ vetkd_public_key: IDL.Func([vetkd_public_key_args], [vetkd_public_key_result], [])
573
+ });
574
+
575
+ export const idlInitArgs = [];
576
+
577
+ export const idlFactory = ({IDL}) => {
578
+ const bitcoin_network = IDL.Variant({
579
+ mainnet: IDL.Null,
580
+ testnet: IDL.Null
581
+ });
582
+ const bitcoin_address = IDL.Text;
583
+ const bitcoin_get_balance_args = IDL.Record({
584
+ network: bitcoin_network,
585
+ address: bitcoin_address,
586
+ min_confirmations: IDL.Opt(IDL.Nat32)
587
+ });
588
+ const satoshi = IDL.Nat64;
589
+ const bitcoin_get_balance_result = satoshi;
590
+ const bitcoin_block_height = IDL.Nat32;
591
+ const bitcoin_get_block_headers_args = IDL.Record({
592
+ start_height: bitcoin_block_height,
593
+ end_height: IDL.Opt(bitcoin_block_height),
594
+ network: bitcoin_network
595
+ });
596
+ const bitcoin_block_header = IDL.Vec(IDL.Nat8);
597
+ const bitcoin_get_block_headers_result = IDL.Record({
598
+ tip_height: bitcoin_block_height,
599
+ block_headers: IDL.Vec(bitcoin_block_header)
600
+ });
601
+ const bitcoin_get_current_fee_percentiles_args = IDL.Record({
602
+ network: bitcoin_network
603
+ });
604
+ const millisatoshi_per_byte = IDL.Nat64;
605
+ const bitcoin_get_current_fee_percentiles_result = IDL.Vec(millisatoshi_per_byte);
606
+ const bitcoin_get_utxos_args = IDL.Record({
607
+ network: bitcoin_network,
608
+ filter: IDL.Opt(
609
+ IDL.Variant({
610
+ page: IDL.Vec(IDL.Nat8),
611
+ min_confirmations: IDL.Nat32
612
+ })
613
+ ),
614
+ address: bitcoin_address
615
+ });
616
+ const bitcoin_block_hash = IDL.Vec(IDL.Nat8);
617
+ const outpoint = IDL.Record({
618
+ txid: IDL.Vec(IDL.Nat8),
619
+ vout: IDL.Nat32
620
+ });
621
+ const utxo = IDL.Record({
622
+ height: IDL.Nat32,
623
+ value: satoshi,
624
+ outpoint: outpoint
625
+ });
626
+ const bitcoin_get_utxos_result = IDL.Record({
627
+ next_page: IDL.Opt(IDL.Vec(IDL.Nat8)),
628
+ tip_height: bitcoin_block_height,
629
+ tip_block_hash: bitcoin_block_hash,
630
+ utxos: IDL.Vec(utxo)
631
+ });
632
+ const bitcoin_send_transaction_args = IDL.Record({
633
+ transaction: IDL.Vec(IDL.Nat8),
634
+ network: bitcoin_network
635
+ });
636
+ const canister_id = IDL.Principal;
637
+ const canister_info_args = IDL.Record({
638
+ canister_id: canister_id,
639
+ num_requested_changes: IDL.Opt(IDL.Nat64)
640
+ });
641
+ const change_origin = IDL.Variant({
642
+ from_user: IDL.Record({user_id: IDL.Principal}),
643
+ from_canister: IDL.Record({
644
+ canister_version: IDL.Opt(IDL.Nat64),
645
+ canister_id: IDL.Principal
646
+ })
647
+ });
648
+ const snapshot_id = IDL.Vec(IDL.Nat8);
649
+ const change_details = IDL.Variant({
650
+ creation: IDL.Record({
651
+ controllers: IDL.Vec(IDL.Principal),
652
+ environment_variables_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
653
+ }),
654
+ code_deployment: IDL.Record({
655
+ mode: IDL.Variant({
656
+ reinstall: IDL.Null,
657
+ upgrade: IDL.Null,
658
+ install: IDL.Null
659
+ }),
660
+ module_hash: IDL.Vec(IDL.Nat8)
661
+ }),
662
+ load_snapshot: IDL.Record({
663
+ canister_version: IDL.Nat64,
664
+ source: IDL.Variant({
665
+ metadata_upload: IDL.Reserved,
666
+ taken_from_canister: IDL.Reserved
667
+ }),
668
+ from_canister_id: IDL.Opt(IDL.Principal),
669
+ taken_at_timestamp: IDL.Nat64,
670
+ snapshot_id: snapshot_id
671
+ }),
672
+ controllers_change: IDL.Record({
673
+ controllers: IDL.Vec(IDL.Principal)
674
+ }),
675
+ code_uninstall: IDL.Null
676
+ });
677
+ const change = IDL.Record({
678
+ timestamp_nanos: IDL.Nat64,
679
+ canister_version: IDL.Nat64,
680
+ origin: change_origin,
681
+ details: change_details
682
+ });
683
+ const canister_info_result = IDL.Record({
684
+ controllers: IDL.Vec(IDL.Principal),
685
+ module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
686
+ recent_changes: IDL.Vec(change),
687
+ total_num_changes: IDL.Nat64
688
+ });
689
+ const canister_metadata_args = IDL.Record({
690
+ name: IDL.Text,
691
+ canister_id: canister_id
692
+ });
693
+ const canister_metadata_result = IDL.Record({value: IDL.Vec(IDL.Nat8)});
694
+ const canister_status_args = IDL.Record({canister_id: canister_id});
695
+ const environment_variable = IDL.Record({
696
+ value: IDL.Text,
697
+ name: IDL.Text
698
+ });
699
+ const log_visibility = IDL.Variant({
700
+ controllers: IDL.Null,
701
+ public: IDL.Null,
702
+ allowed_viewers: IDL.Vec(IDL.Principal)
703
+ });
704
+ const definite_canister_settings = IDL.Record({
705
+ freezing_threshold: IDL.Nat,
706
+ wasm_memory_threshold: IDL.Nat,
707
+ environment_variables: IDL.Vec(environment_variable),
708
+ controllers: IDL.Vec(IDL.Principal),
709
+ reserved_cycles_limit: IDL.Nat,
710
+ log_visibility: log_visibility,
711
+ wasm_memory_limit: IDL.Nat,
712
+ memory_allocation: IDL.Nat,
713
+ compute_allocation: IDL.Nat
714
+ });
715
+ const canister_status_result = IDL.Record({
716
+ memory_metrics: IDL.Record({
717
+ wasm_binary_size: IDL.Nat,
718
+ wasm_chunk_store_size: IDL.Nat,
719
+ canister_history_size: IDL.Nat,
720
+ stable_memory_size: IDL.Nat,
721
+ snapshots_size: IDL.Nat,
722
+ wasm_memory_size: IDL.Nat,
723
+ global_memory_size: IDL.Nat,
724
+ custom_sections_size: IDL.Nat
725
+ }),
726
+ status: IDL.Variant({
727
+ stopped: IDL.Null,
728
+ stopping: IDL.Null,
729
+ running: IDL.Null
730
+ }),
731
+ memory_size: IDL.Nat,
732
+ ready_for_migration: IDL.Bool,
733
+ version: IDL.Nat64,
734
+ cycles: IDL.Nat,
735
+ settings: definite_canister_settings,
736
+ query_stats: IDL.Record({
737
+ response_payload_bytes_total: IDL.Nat,
738
+ num_instructions_total: IDL.Nat,
739
+ num_calls_total: IDL.Nat,
740
+ request_payload_bytes_total: IDL.Nat
741
+ }),
742
+ idle_cycles_burned_per_day: IDL.Nat,
743
+ module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
744
+ reserved_cycles: IDL.Nat
745
+ });
746
+ const clear_chunk_store_args = IDL.Record({canister_id: canister_id});
747
+ const canister_settings = IDL.Record({
748
+ freezing_threshold: IDL.Opt(IDL.Nat),
749
+ wasm_memory_threshold: IDL.Opt(IDL.Nat),
750
+ environment_variables: IDL.Opt(IDL.Vec(environment_variable)),
751
+ controllers: IDL.Opt(IDL.Vec(IDL.Principal)),
752
+ reserved_cycles_limit: IDL.Opt(IDL.Nat),
753
+ log_visibility: IDL.Opt(log_visibility),
754
+ wasm_memory_limit: IDL.Opt(IDL.Nat),
755
+ memory_allocation: IDL.Opt(IDL.Nat),
756
+ compute_allocation: IDL.Opt(IDL.Nat)
757
+ });
758
+ const create_canister_args = IDL.Record({
759
+ settings: IDL.Opt(canister_settings),
760
+ sender_canister_version: IDL.Opt(IDL.Nat64)
761
+ });
762
+ const create_canister_result = IDL.Record({canister_id: canister_id});
763
+ const delete_canister_args = IDL.Record({canister_id: canister_id});
764
+ const delete_canister_snapshot_args = IDL.Record({
765
+ canister_id: canister_id,
766
+ snapshot_id: snapshot_id
767
+ });
768
+ const deposit_cycles_args = IDL.Record({canister_id: canister_id});
769
+ const ecdsa_curve = IDL.Variant({secp256k1: IDL.Null});
770
+ const ecdsa_public_key_args = IDL.Record({
771
+ key_id: IDL.Record({name: IDL.Text, curve: ecdsa_curve}),
772
+ canister_id: IDL.Opt(canister_id),
773
+ derivation_path: IDL.Vec(IDL.Vec(IDL.Nat8))
774
+ });
775
+ const ecdsa_public_key_result = IDL.Record({
776
+ public_key: IDL.Vec(IDL.Nat8),
777
+ chain_code: IDL.Vec(IDL.Nat8)
778
+ });
779
+ const fetch_canister_logs_args = IDL.Record({canister_id: canister_id});
780
+ const canister_log_record = IDL.Record({
781
+ idx: IDL.Nat64,
782
+ timestamp_nanos: IDL.Nat64,
783
+ content: IDL.Vec(IDL.Nat8)
784
+ });
785
+ const fetch_canister_logs_result = IDL.Record({
786
+ canister_log_records: IDL.Vec(canister_log_record)
787
+ });
788
+ const http_header = IDL.Record({value: IDL.Text, name: IDL.Text});
789
+ const http_request_result = IDL.Record({
790
+ status: IDL.Nat,
791
+ body: IDL.Vec(IDL.Nat8),
792
+ headers: IDL.Vec(http_header)
793
+ });
794
+ const http_request_args = IDL.Record({
795
+ url: IDL.Text,
796
+ method: IDL.Variant({
797
+ get: IDL.Null,
798
+ head: IDL.Null,
799
+ post: IDL.Null
800
+ }),
801
+ max_response_bytes: IDL.Opt(IDL.Nat64),
802
+ body: IDL.Opt(IDL.Vec(IDL.Nat8)),
803
+ transform: IDL.Opt(
804
+ IDL.Record({
805
+ function: IDL.Func(
806
+ [
807
+ IDL.Record({
808
+ context: IDL.Vec(IDL.Nat8),
809
+ response: http_request_result
810
+ })
811
+ ],
812
+ [http_request_result],
813
+ ['query']
814
+ ),
815
+ context: IDL.Vec(IDL.Nat8)
816
+ })
817
+ ),
818
+ headers: IDL.Vec(http_header),
819
+ is_replicated: IDL.Opt(IDL.Bool)
820
+ });
821
+ const canister_install_mode = IDL.Variant({
822
+ reinstall: IDL.Null,
823
+ upgrade: IDL.Opt(
824
+ IDL.Record({
825
+ wasm_memory_persistence: IDL.Opt(IDL.Variant({keep: IDL.Null, replace: IDL.Null})),
826
+ skip_pre_upgrade: IDL.Opt(IDL.Bool)
827
+ })
828
+ ),
829
+ install: IDL.Null
830
+ });
831
+ const chunk_hash = IDL.Record({hash: IDL.Vec(IDL.Nat8)});
832
+ const install_chunked_code_args = IDL.Record({
833
+ arg: IDL.Vec(IDL.Nat8),
834
+ wasm_module_hash: IDL.Vec(IDL.Nat8),
835
+ mode: canister_install_mode,
836
+ chunk_hashes_list: IDL.Vec(chunk_hash),
837
+ target_canister: canister_id,
838
+ store_canister: IDL.Opt(canister_id),
839
+ sender_canister_version: IDL.Opt(IDL.Nat64)
840
+ });
841
+ const wasm_module = IDL.Vec(IDL.Nat8);
842
+ const install_code_args = IDL.Record({
843
+ arg: IDL.Vec(IDL.Nat8),
844
+ wasm_module: wasm_module,
845
+ mode: canister_install_mode,
846
+ canister_id: canister_id,
847
+ sender_canister_version: IDL.Opt(IDL.Nat64)
848
+ });
849
+ const list_canister_snapshots_args = IDL.Record({
850
+ canister_id: canister_id
851
+ });
852
+ const snapshot = IDL.Record({
853
+ id: snapshot_id,
854
+ total_size: IDL.Nat64,
855
+ taken_at_timestamp: IDL.Nat64
856
+ });
857
+ const list_canister_snapshots_result = IDL.Vec(snapshot);
858
+ const load_canister_snapshot_args = IDL.Record({
859
+ canister_id: canister_id,
860
+ sender_canister_version: IDL.Opt(IDL.Nat64),
861
+ snapshot_id: snapshot_id
862
+ });
863
+ const node_metrics_history_args = IDL.Record({
864
+ start_at_timestamp_nanos: IDL.Nat64,
865
+ subnet_id: IDL.Principal
866
+ });
867
+ const node_metrics = IDL.Record({
868
+ num_block_failures_total: IDL.Nat64,
869
+ node_id: IDL.Principal,
870
+ num_blocks_proposed_total: IDL.Nat64
871
+ });
872
+ const node_metrics_history_result = IDL.Vec(
873
+ IDL.Record({
874
+ timestamp_nanos: IDL.Nat64,
875
+ node_metrics: IDL.Vec(node_metrics)
876
+ })
877
+ );
878
+ const provisional_create_canister_with_cycles_args = IDL.Record({
879
+ settings: IDL.Opt(canister_settings),
880
+ specified_id: IDL.Opt(canister_id),
881
+ amount: IDL.Opt(IDL.Nat),
882
+ sender_canister_version: IDL.Opt(IDL.Nat64)
883
+ });
884
+ const provisional_create_canister_with_cycles_result = IDL.Record({
885
+ canister_id: canister_id
886
+ });
887
+ const provisional_top_up_canister_args = IDL.Record({
888
+ canister_id: canister_id,
889
+ amount: IDL.Nat
890
+ });
891
+ const raw_rand_result = IDL.Vec(IDL.Nat8);
892
+ const read_canister_snapshot_data_args = IDL.Record({
893
+ kind: IDL.Variant({
894
+ wasm_module: IDL.Record({size: IDL.Nat64, offset: IDL.Nat64}),
895
+ wasm_memory: IDL.Record({size: IDL.Nat64, offset: IDL.Nat64}),
896
+ stable_memory: IDL.Record({
897
+ size: IDL.Nat64,
898
+ offset: IDL.Nat64
899
+ }),
900
+ wasm_chunk: IDL.Record({hash: IDL.Vec(IDL.Nat8)})
901
+ }),
902
+ canister_id: canister_id,
903
+ snapshot_id: snapshot_id
904
+ });
905
+ const read_canister_snapshot_data_response = IDL.Record({
906
+ chunk: IDL.Vec(IDL.Nat8)
907
+ });
908
+ const read_canister_snapshot_metadata_args = IDL.Record({
909
+ canister_id: canister_id,
910
+ snapshot_id: snapshot_id
911
+ });
912
+ const read_canister_snapshot_metadata_response = IDL.Record({
913
+ globals: IDL.Vec(
914
+ IDL.Variant({
915
+ f32: IDL.Float32,
916
+ f64: IDL.Float64,
917
+ i32: IDL.Int32,
918
+ i64: IDL.Int64,
919
+ v128: IDL.Nat
920
+ })
921
+ ),
922
+ canister_version: IDL.Nat64,
923
+ source: IDL.Variant({
924
+ metadata_upload: IDL.Reserved,
925
+ taken_from_canister: IDL.Reserved
926
+ }),
927
+ certified_data: IDL.Vec(IDL.Nat8),
928
+ global_timer: IDL.Opt(IDL.Variant({active: IDL.Nat64, inactive: IDL.Null})),
929
+ on_low_wasm_memory_hook_status: IDL.Opt(
930
+ IDL.Variant({
931
+ condition_not_satisfied: IDL.Null,
932
+ executed: IDL.Null,
933
+ ready: IDL.Null
934
+ })
935
+ ),
936
+ wasm_module_size: IDL.Nat64,
937
+ stable_memory_size: IDL.Nat64,
938
+ wasm_chunk_store: IDL.Vec(IDL.Record({hash: IDL.Vec(IDL.Nat8)})),
939
+ taken_at_timestamp: IDL.Nat64,
940
+ wasm_memory_size: IDL.Nat64
941
+ });
942
+ const schnorr_algorithm = IDL.Variant({
943
+ ed25519: IDL.Null,
944
+ bip340secp256k1: IDL.Null
945
+ });
946
+ const schnorr_public_key_args = IDL.Record({
947
+ key_id: IDL.Record({
948
+ algorithm: schnorr_algorithm,
949
+ name: IDL.Text
950
+ }),
951
+ canister_id: IDL.Opt(canister_id),
952
+ derivation_path: IDL.Vec(IDL.Vec(IDL.Nat8))
953
+ });
954
+ const schnorr_public_key_result = IDL.Record({
955
+ public_key: IDL.Vec(IDL.Nat8),
956
+ chain_code: IDL.Vec(IDL.Nat8)
957
+ });
958
+ const sign_with_ecdsa_args = IDL.Record({
959
+ key_id: IDL.Record({name: IDL.Text, curve: ecdsa_curve}),
960
+ derivation_path: IDL.Vec(IDL.Vec(IDL.Nat8)),
961
+ message_hash: IDL.Vec(IDL.Nat8)
962
+ });
963
+ const sign_with_ecdsa_result = IDL.Record({
964
+ signature: IDL.Vec(IDL.Nat8)
965
+ });
966
+ const schnorr_aux = IDL.Variant({
967
+ bip341: IDL.Record({merkle_root_hash: IDL.Vec(IDL.Nat8)})
968
+ });
969
+ const sign_with_schnorr_args = IDL.Record({
970
+ aux: IDL.Opt(schnorr_aux),
971
+ key_id: IDL.Record({
972
+ algorithm: schnorr_algorithm,
973
+ name: IDL.Text
974
+ }),
975
+ derivation_path: IDL.Vec(IDL.Vec(IDL.Nat8)),
976
+ message: IDL.Vec(IDL.Nat8)
977
+ });
978
+ const sign_with_schnorr_result = IDL.Record({
979
+ signature: IDL.Vec(IDL.Nat8)
980
+ });
981
+ const start_canister_args = IDL.Record({canister_id: canister_id});
982
+ const stop_canister_args = IDL.Record({canister_id: canister_id});
983
+ const stored_chunks_args = IDL.Record({canister_id: canister_id});
984
+ const stored_chunks_result = IDL.Vec(chunk_hash);
985
+ const subnet_info_args = IDL.Record({subnet_id: IDL.Principal});
986
+ const subnet_info_result = IDL.Record({
987
+ replica_version: IDL.Text,
988
+ registry_version: IDL.Nat64
989
+ });
990
+ const take_canister_snapshot_args = IDL.Record({
991
+ replace_snapshot: IDL.Opt(snapshot_id),
992
+ canister_id: canister_id
993
+ });
994
+ const take_canister_snapshot_result = snapshot;
995
+ const uninstall_code_args = IDL.Record({
996
+ canister_id: canister_id,
997
+ sender_canister_version: IDL.Opt(IDL.Nat64)
998
+ });
999
+ const update_settings_args = IDL.Record({
1000
+ canister_id: IDL.Principal,
1001
+ settings: canister_settings,
1002
+ sender_canister_version: IDL.Opt(IDL.Nat64)
1003
+ });
1004
+ const upload_canister_snapshot_data_args = IDL.Record({
1005
+ chunk: IDL.Vec(IDL.Nat8),
1006
+ kind: IDL.Variant({
1007
+ wasm_module: IDL.Record({offset: IDL.Nat64}),
1008
+ wasm_memory: IDL.Record({offset: IDL.Nat64}),
1009
+ stable_memory: IDL.Record({offset: IDL.Nat64}),
1010
+ wasm_chunk: IDL.Null
1011
+ }),
1012
+ canister_id: canister_id,
1013
+ snapshot_id: snapshot_id
1014
+ });
1015
+ const upload_canister_snapshot_metadata_args = IDL.Record({
1016
+ globals: IDL.Vec(
1017
+ IDL.Variant({
1018
+ f32: IDL.Float32,
1019
+ f64: IDL.Float64,
1020
+ i32: IDL.Int32,
1021
+ i64: IDL.Int64,
1022
+ v128: IDL.Nat
1023
+ })
1024
+ ),
1025
+ replace_snapshot: IDL.Opt(snapshot_id),
1026
+ certified_data: IDL.Vec(IDL.Nat8),
1027
+ global_timer: IDL.Opt(IDL.Variant({active: IDL.Nat64, inactive: IDL.Null})),
1028
+ on_low_wasm_memory_hook_status: IDL.Opt(
1029
+ IDL.Variant({
1030
+ condition_not_satisfied: IDL.Null,
1031
+ executed: IDL.Null,
1032
+ ready: IDL.Null
1033
+ })
1034
+ ),
1035
+ wasm_module_size: IDL.Nat64,
1036
+ canister_id: canister_id,
1037
+ stable_memory_size: IDL.Nat64,
1038
+ wasm_memory_size: IDL.Nat64
1039
+ });
1040
+ const upload_canister_snapshot_metadata_response = IDL.Record({
1041
+ snapshot_id: snapshot_id
1042
+ });
1043
+ const upload_chunk_args = IDL.Record({
1044
+ chunk: IDL.Vec(IDL.Nat8),
1045
+ canister_id: IDL.Principal
1046
+ });
1047
+ const upload_chunk_result = chunk_hash;
1048
+ const vetkd_curve = IDL.Variant({bls12_381_g2: IDL.Null});
1049
+ const vetkd_derive_key_args = IDL.Record({
1050
+ context: IDL.Vec(IDL.Nat8),
1051
+ key_id: IDL.Record({name: IDL.Text, curve: vetkd_curve}),
1052
+ input: IDL.Vec(IDL.Nat8),
1053
+ transport_public_key: IDL.Vec(IDL.Nat8)
1054
+ });
1055
+ const vetkd_derive_key_result = IDL.Record({
1056
+ encrypted_key: IDL.Vec(IDL.Nat8)
1057
+ });
1058
+ const vetkd_public_key_args = IDL.Record({
1059
+ context: IDL.Vec(IDL.Nat8),
1060
+ key_id: IDL.Record({name: IDL.Text, curve: vetkd_curve}),
1061
+ canister_id: IDL.Opt(canister_id)
1062
+ });
1063
+ const vetkd_public_key_result = IDL.Record({
1064
+ public_key: IDL.Vec(IDL.Nat8)
1065
+ });
1066
+
1067
+ return IDL.Service({
1068
+ bitcoin_get_balance: IDL.Func([bitcoin_get_balance_args], [bitcoin_get_balance_result], []),
1069
+ bitcoin_get_block_headers: IDL.Func(
1070
+ [bitcoin_get_block_headers_args],
1071
+ [bitcoin_get_block_headers_result],
1072
+ []
1073
+ ),
1074
+ bitcoin_get_current_fee_percentiles: IDL.Func(
1075
+ [bitcoin_get_current_fee_percentiles_args],
1076
+ [bitcoin_get_current_fee_percentiles_result],
1077
+ []
1078
+ ),
1079
+ bitcoin_get_utxos: IDL.Func([bitcoin_get_utxos_args], [bitcoin_get_utxos_result], []),
1080
+ bitcoin_send_transaction: IDL.Func([bitcoin_send_transaction_args], [], []),
1081
+ canister_info: IDL.Func([canister_info_args], [canister_info_result], []),
1082
+ canister_metadata: IDL.Func([canister_metadata_args], [canister_metadata_result], []),
1083
+ canister_status: IDL.Func([canister_status_args], [canister_status_result], ['query']),
1084
+ clear_chunk_store: IDL.Func([clear_chunk_store_args], [], []),
1085
+ create_canister: IDL.Func([create_canister_args], [create_canister_result], []),
1086
+ delete_canister: IDL.Func([delete_canister_args], [], []),
1087
+ delete_canister_snapshot: IDL.Func([delete_canister_snapshot_args], [], []),
1088
+ deposit_cycles: IDL.Func([deposit_cycles_args], [], []),
1089
+ ecdsa_public_key: IDL.Func([ecdsa_public_key_args], [ecdsa_public_key_result], []),
1090
+ fetch_canister_logs: IDL.Func(
1091
+ [fetch_canister_logs_args],
1092
+ [fetch_canister_logs_result],
1093
+ ['query']
1094
+ ),
1095
+ http_request: IDL.Func([http_request_args], [http_request_result], []),
1096
+ install_chunked_code: IDL.Func([install_chunked_code_args], [], []),
1097
+ install_code: IDL.Func([install_code_args], [], []),
1098
+ list_canister_snapshots: IDL.Func(
1099
+ [list_canister_snapshots_args],
1100
+ [list_canister_snapshots_result],
1101
+ []
1102
+ ),
1103
+ load_canister_snapshot: IDL.Func([load_canister_snapshot_args], [], []),
1104
+ node_metrics_history: IDL.Func([node_metrics_history_args], [node_metrics_history_result], []),
1105
+ provisional_create_canister_with_cycles: IDL.Func(
1106
+ [provisional_create_canister_with_cycles_args],
1107
+ [provisional_create_canister_with_cycles_result],
1108
+ []
1109
+ ),
1110
+ provisional_top_up_canister: IDL.Func([provisional_top_up_canister_args], [], []),
1111
+ raw_rand: IDL.Func([], [raw_rand_result], []),
1112
+ read_canister_snapshot_data: IDL.Func(
1113
+ [read_canister_snapshot_data_args],
1114
+ [read_canister_snapshot_data_response],
1115
+ []
1116
+ ),
1117
+ read_canister_snapshot_metadata: IDL.Func(
1118
+ [read_canister_snapshot_metadata_args],
1119
+ [read_canister_snapshot_metadata_response],
1120
+ []
1121
+ ),
1122
+ schnorr_public_key: IDL.Func([schnorr_public_key_args], [schnorr_public_key_result], []),
1123
+ sign_with_ecdsa: IDL.Func([sign_with_ecdsa_args], [sign_with_ecdsa_result], []),
1124
+ sign_with_schnorr: IDL.Func([sign_with_schnorr_args], [sign_with_schnorr_result], []),
1125
+ start_canister: IDL.Func([start_canister_args], [], []),
1126
+ stop_canister: IDL.Func([stop_canister_args], [], []),
1127
+ stored_chunks: IDL.Func([stored_chunks_args], [stored_chunks_result], []),
1128
+ subnet_info: IDL.Func([subnet_info_args], [subnet_info_result], []),
1129
+ take_canister_snapshot: IDL.Func(
1130
+ [take_canister_snapshot_args],
1131
+ [take_canister_snapshot_result],
1132
+ []
1133
+ ),
1134
+ uninstall_code: IDL.Func([uninstall_code_args], [], []),
1135
+ update_settings: IDL.Func([update_settings_args], [], []),
1136
+ upload_canister_snapshot_data: IDL.Func([upload_canister_snapshot_data_args], [], []),
1137
+ upload_canister_snapshot_metadata: IDL.Func(
1138
+ [upload_canister_snapshot_metadata_args],
1139
+ [upload_canister_snapshot_metadata_response],
1140
+ []
1141
+ ),
1142
+ upload_chunk: IDL.Func([upload_chunk_args], [upload_chunk_result], []),
1143
+ vetkd_derive_key: IDL.Func([vetkd_derive_key_args], [vetkd_derive_key_result], []),
1144
+ vetkd_public_key: IDL.Func([vetkd_public_key_args], [vetkd_public_key_result], [])
1145
+ });
1146
+ };
1147
+
1148
+ export const init = ({IDL}) => {
1149
+ return [];
1150
+ };