@dfinity/ckbtc 6.0.1-next-2025-12-03.2 → 6.0.1-next-2025-12-08

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.
@@ -1,481 +0,0 @@
1
- /* eslint-disable */
2
-
3
- // @ts-nocheck
4
-
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
6
- // You should NOT make any changes in this file as it will be overwritten.
7
- // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
-
9
- export const idlFactory = ({ IDL }) => {
10
- const Mode = IDL.Variant({
11
- RestrictedTo: IDL.Vec(IDL.Principal),
12
- DepositsRestrictedTo: IDL.Vec(IDL.Principal),
13
- ReadOnly: IDL.Null,
14
- GeneralAvailability: IDL.Null,
15
- });
16
- const UpgradeArgs = IDL.Record({
17
- get_utxos_cache_expiration_seconds: IDL.Opt(IDL.Nat64),
18
- kyt_principal: IDL.Opt(IDL.Principal),
19
- mode: IDL.Opt(Mode),
20
- retrieve_btc_min_amount: IDL.Opt(IDL.Nat64),
21
- max_time_in_queue_nanos: IDL.Opt(IDL.Nat64),
22
- check_fee: IDL.Opt(IDL.Nat64),
23
- btc_checker_principal: IDL.Opt(IDL.Principal),
24
- min_confirmations: IDL.Opt(IDL.Nat32),
25
- kyt_fee: IDL.Opt(IDL.Nat64),
26
- });
27
- const BtcNetwork = IDL.Variant({
28
- Mainnet: IDL.Null,
29
- Regtest: IDL.Null,
30
- Testnet: IDL.Null,
31
- });
32
- const InitArgs = IDL.Record({
33
- get_utxos_cache_expiration_seconds: IDL.Opt(IDL.Nat64),
34
- kyt_principal: IDL.Opt(IDL.Principal),
35
- ecdsa_key_name: IDL.Text,
36
- mode: Mode,
37
- retrieve_btc_min_amount: IDL.Nat64,
38
- ledger_id: IDL.Principal,
39
- max_time_in_queue_nanos: IDL.Nat64,
40
- btc_network: BtcNetwork,
41
- check_fee: IDL.Opt(IDL.Nat64),
42
- btc_checker_principal: IDL.Opt(IDL.Principal),
43
- min_confirmations: IDL.Opt(IDL.Nat32),
44
- kyt_fee: IDL.Opt(IDL.Nat64),
45
- });
46
- const MinterArg = IDL.Variant({
47
- Upgrade: IDL.Opt(UpgradeArgs),
48
- Init: InitArgs,
49
- });
50
- const MemoryMetrics = IDL.Record({
51
- wasm_binary_size: IDL.Nat,
52
- wasm_chunk_store_size: IDL.Nat,
53
- canister_history_size: IDL.Nat,
54
- stable_memory_size: IDL.Nat,
55
- snapshots_size: IDL.Nat,
56
- wasm_memory_size: IDL.Nat,
57
- global_memory_size: IDL.Nat,
58
- custom_sections_size: IDL.Nat,
59
- });
60
- const CanisterStatusType = IDL.Variant({
61
- stopped: IDL.Null,
62
- stopping: IDL.Null,
63
- running: IDL.Null,
64
- });
65
- const environment_variable = IDL.Record({
66
- value: IDL.Text,
67
- name: IDL.Text,
68
- });
69
- const LogVisibility = IDL.Variant({
70
- controllers: IDL.Null,
71
- public: IDL.Null,
72
- allowed_viewers: IDL.Vec(IDL.Principal),
73
- });
74
- const DefiniteCanisterSettings = IDL.Record({
75
- freezing_threshold: IDL.Nat,
76
- wasm_memory_threshold: IDL.Nat,
77
- environment_variables: IDL.Vec(environment_variable),
78
- controllers: IDL.Vec(IDL.Principal),
79
- reserved_cycles_limit: IDL.Nat,
80
- log_visibility: LogVisibility,
81
- wasm_memory_limit: IDL.Nat,
82
- memory_allocation: IDL.Nat,
83
- compute_allocation: IDL.Nat,
84
- });
85
- const QueryStats = IDL.Record({
86
- response_payload_bytes_total: IDL.Nat,
87
- num_instructions_total: IDL.Nat,
88
- num_calls_total: IDL.Nat,
89
- request_payload_bytes_total: IDL.Nat,
90
- });
91
- const CanisterStatusResponse = IDL.Record({
92
- memory_metrics: MemoryMetrics,
93
- status: CanisterStatusType,
94
- memory_size: IDL.Nat,
95
- ready_for_migration: IDL.Bool,
96
- version: IDL.Nat64,
97
- cycles: IDL.Nat,
98
- settings: DefiniteCanisterSettings,
99
- query_stats: QueryStats,
100
- idle_cycles_burned_per_day: IDL.Nat,
101
- module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
102
- reserved_cycles: IDL.Nat,
103
- });
104
- const Account = IDL.Record({
105
- owner: IDL.Principal,
106
- subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
107
- });
108
- const Utxo = IDL.Record({
109
- height: IDL.Nat32,
110
- value: IDL.Nat64,
111
- outpoint: IDL.Record({ txid: IDL.Vec(IDL.Nat8), vout: IDL.Nat32 }),
112
- });
113
- const ReimbursementReason = IDL.Variant({
114
- CallFailed: IDL.Null,
115
- TaintedDestination: IDL.Record({
116
- kyt_fee: IDL.Nat64,
117
- kyt_provider: IDL.Principal,
118
- }),
119
- });
120
- const WithdrawalFee = IDL.Record({
121
- minter_fee: IDL.Nat64,
122
- bitcoin_fee: IDL.Nat64,
123
- });
124
- const SuspendedReason = IDL.Variant({
125
- ValueTooSmall: IDL.Null,
126
- Quarantined: IDL.Null,
127
- });
128
- const BitcoinAddress = IDL.Variant({
129
- p2wsh_v0: IDL.Vec(IDL.Nat8),
130
- p2tr_v1: IDL.Vec(IDL.Nat8),
131
- p2sh: IDL.Vec(IDL.Nat8),
132
- p2wpkh_v0: IDL.Vec(IDL.Nat8),
133
- p2pkh: IDL.Vec(IDL.Nat8),
134
- });
135
- const InvalidTransactionError = IDL.Variant({
136
- too_many_inputs: IDL.Record({
137
- max_num_inputs: IDL.Nat64,
138
- num_inputs: IDL.Nat64,
139
- }),
140
- });
141
- const WithdrawalReimbursementReason = IDL.Variant({
142
- invalid_transaction: InvalidTransactionError,
143
- });
144
- const ReplacedReason = IDL.Variant({
145
- to_cancel: IDL.Record({ reason: WithdrawalReimbursementReason }),
146
- to_retry: IDL.Null,
147
- });
148
- const EventType = IDL.Variant({
149
- received_utxos: IDL.Record({
150
- to_account: Account,
151
- mint_txid: IDL.Opt(IDL.Nat64),
152
- utxos: IDL.Vec(Utxo),
153
- }),
154
- schedule_deposit_reimbursement: IDL.Record({
155
- burn_block_index: IDL.Nat64,
156
- account: Account,
157
- amount: IDL.Nat64,
158
- reason: ReimbursementReason,
159
- }),
160
- sent_transaction: IDL.Record({
161
- fee: IDL.Opt(IDL.Nat64),
162
- change_output: IDL.Opt(IDL.Record({ value: IDL.Nat64, vout: IDL.Nat32 })),
163
- txid: IDL.Vec(IDL.Nat8),
164
- withdrawal_fee: IDL.Opt(WithdrawalFee),
165
- utxos: IDL.Vec(Utxo),
166
- requests: IDL.Vec(IDL.Nat64),
167
- submitted_at: IDL.Nat64,
168
- }),
169
- distributed_kyt_fee: IDL.Record({
170
- block_index: IDL.Nat64,
171
- amount: IDL.Nat64,
172
- kyt_provider: IDL.Principal,
173
- }),
174
- init: InitArgs,
175
- upgrade: UpgradeArgs,
176
- retrieve_btc_kyt_failed: IDL.Record({
177
- block_index: IDL.Nat64,
178
- owner: IDL.Principal,
179
- uuid: IDL.Text,
180
- address: IDL.Text,
181
- amount: IDL.Nat64,
182
- kyt_provider: IDL.Principal,
183
- }),
184
- suspended_utxo: IDL.Record({
185
- utxo: Utxo,
186
- account: Account,
187
- reason: SuspendedReason,
188
- }),
189
- accepted_retrieve_btc_request: IDL.Record({
190
- received_at: IDL.Nat64,
191
- block_index: IDL.Nat64,
192
- address: BitcoinAddress,
193
- reimbursement_account: IDL.Opt(Account),
194
- amount: IDL.Nat64,
195
- kyt_provider: IDL.Opt(IDL.Principal),
196
- }),
197
- checked_utxo: IDL.Record({
198
- clean: IDL.Bool,
199
- utxo: Utxo,
200
- uuid: IDL.Text,
201
- kyt_provider: IDL.Opt(IDL.Principal),
202
- }),
203
- schedule_withdrawal_reimbursement: IDL.Record({
204
- burn_block_index: IDL.Nat64,
205
- account: Account,
206
- amount: IDL.Nat64,
207
- reason: WithdrawalReimbursementReason,
208
- }),
209
- quarantined_withdrawal_reimbursement: IDL.Record({
210
- burn_block_index: IDL.Nat64,
211
- }),
212
- removed_retrieve_btc_request: IDL.Record({ block_index: IDL.Nat64 }),
213
- confirmed_transaction: IDL.Record({ txid: IDL.Vec(IDL.Nat8) }),
214
- replaced_transaction: IDL.Record({
215
- fee: IDL.Nat64,
216
- change_output: IDL.Record({ value: IDL.Nat64, vout: IDL.Nat32 }),
217
- new_utxos: IDL.Opt(IDL.Vec(Utxo)),
218
- old_txid: IDL.Vec(IDL.Nat8),
219
- withdrawal_fee: IDL.Opt(WithdrawalFee),
220
- new_txid: IDL.Vec(IDL.Nat8),
221
- submitted_at: IDL.Nat64,
222
- reason: IDL.Opt(ReplacedReason),
223
- }),
224
- checked_utxo_v2: IDL.Record({ utxo: Utxo, account: Account }),
225
- ignored_utxo: IDL.Record({ utxo: Utxo }),
226
- checked_utxo_mint_unknown: IDL.Record({
227
- utxo: Utxo,
228
- account: Account,
229
- }),
230
- reimbursed_failed_deposit: IDL.Record({
231
- burn_block_index: IDL.Nat64,
232
- mint_block_index: IDL.Nat64,
233
- }),
234
- reimbursed_withdrawal: IDL.Record({
235
- burn_block_index: IDL.Nat64,
236
- mint_block_index: IDL.Nat64,
237
- }),
238
- });
239
- const Event = IDL.Record({
240
- timestamp: IDL.Opt(IDL.Nat64),
241
- payload: EventType,
242
- });
243
- const MinterInfo = IDL.Record({
244
- retrieve_btc_min_amount: IDL.Nat64,
245
- min_confirmations: IDL.Nat32,
246
- kyt_fee: IDL.Nat64,
247
- });
248
- const RetrieveBtcArgs = IDL.Record({
249
- address: IDL.Text,
250
- amount: IDL.Nat64,
251
- });
252
- const RetrieveBtcOk = IDL.Record({ block_index: IDL.Nat64 });
253
- const RetrieveBtcError = IDL.Variant({
254
- MalformedAddress: IDL.Text,
255
- GenericError: IDL.Record({
256
- error_message: IDL.Text,
257
- error_code: IDL.Nat64,
258
- }),
259
- TemporarilyUnavailable: IDL.Text,
260
- AlreadyProcessing: IDL.Null,
261
- AmountTooLow: IDL.Nat64,
262
- InsufficientFunds: IDL.Record({ balance: IDL.Nat64 }),
263
- });
264
- const RetrieveBtcStatus = IDL.Variant({
265
- Signing: IDL.Null,
266
- Confirmed: IDL.Record({ txid: IDL.Vec(IDL.Nat8) }),
267
- Sending: IDL.Record({ txid: IDL.Vec(IDL.Nat8) }),
268
- AmountTooLow: IDL.Null,
269
- Unknown: IDL.Null,
270
- Submitted: IDL.Record({ txid: IDL.Vec(IDL.Nat8) }),
271
- Pending: IDL.Null,
272
- });
273
- const ReimbursementRequest = IDL.Record({
274
- account: Account,
275
- amount: IDL.Nat64,
276
- reason: ReimbursementReason,
277
- });
278
- const ReimbursedDeposit = IDL.Record({
279
- account: Account,
280
- mint_block_index: IDL.Nat64,
281
- amount: IDL.Nat64,
282
- reason: ReimbursementReason,
283
- });
284
- const RetrieveBtcStatusV2 = IDL.Variant({
285
- Signing: IDL.Null,
286
- Confirmed: IDL.Record({ txid: IDL.Vec(IDL.Nat8) }),
287
- Sending: IDL.Record({ txid: IDL.Vec(IDL.Nat8) }),
288
- AmountTooLow: IDL.Null,
289
- WillReimburse: ReimbursementRequest,
290
- Unknown: IDL.Null,
291
- Submitted: IDL.Record({ txid: IDL.Vec(IDL.Nat8) }),
292
- Reimbursed: ReimbursedDeposit,
293
- Pending: IDL.Null,
294
- });
295
- const RetrieveBtcWithApprovalArgs = IDL.Record({
296
- from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
297
- address: IDL.Text,
298
- amount: IDL.Nat64,
299
- });
300
- const RetrieveBtcWithApprovalError = IDL.Variant({
301
- MalformedAddress: IDL.Text,
302
- GenericError: IDL.Record({
303
- error_message: IDL.Text,
304
- error_code: IDL.Nat64,
305
- }),
306
- TemporarilyUnavailable: IDL.Text,
307
- InsufficientAllowance: IDL.Record({ allowance: IDL.Nat64 }),
308
- AlreadyProcessing: IDL.Null,
309
- AmountTooLow: IDL.Nat64,
310
- InsufficientFunds: IDL.Record({ balance: IDL.Nat64 }),
311
- });
312
- const UtxoStatus = IDL.Variant({
313
- ValueTooSmall: Utxo,
314
- Tainted: Utxo,
315
- Minted: IDL.Record({
316
- minted_amount: IDL.Nat64,
317
- block_index: IDL.Nat64,
318
- utxo: Utxo,
319
- }),
320
- Checked: Utxo,
321
- });
322
- const Timestamp = IDL.Nat64;
323
- const SuspendedUtxo = IDL.Record({
324
- utxo: Utxo,
325
- earliest_retry: Timestamp,
326
- reason: SuspendedReason,
327
- });
328
- const PendingUtxo = IDL.Record({
329
- confirmations: IDL.Nat32,
330
- value: IDL.Nat64,
331
- outpoint: IDL.Record({ txid: IDL.Vec(IDL.Nat8), vout: IDL.Nat32 }),
332
- });
333
- const UpdateBalanceError = IDL.Variant({
334
- GenericError: IDL.Record({
335
- error_message: IDL.Text,
336
- error_code: IDL.Nat64,
337
- }),
338
- TemporarilyUnavailable: IDL.Text,
339
- AlreadyProcessing: IDL.Null,
340
- NoNewUtxos: IDL.Record({
341
- suspended_utxos: IDL.Opt(IDL.Vec(SuspendedUtxo)),
342
- required_confirmations: IDL.Nat32,
343
- pending_utxos: IDL.Opt(IDL.Vec(PendingUtxo)),
344
- current_confirmations: IDL.Opt(IDL.Nat32),
345
- }),
346
- });
347
-
348
- return IDL.Service({
349
- estimate_withdrawal_fee: IDL.Func(
350
- [IDL.Record({ amount: IDL.Opt(IDL.Nat64) })],
351
- [IDL.Record({ minter_fee: IDL.Nat64, bitcoin_fee: IDL.Nat64 })],
352
- [],
353
- ),
354
- get_btc_address: IDL.Func(
355
- [
356
- IDL.Record({
357
- owner: IDL.Opt(IDL.Principal),
358
- subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
359
- }),
360
- ],
361
- [IDL.Text],
362
- [],
363
- ),
364
- get_canister_status: IDL.Func([], [CanisterStatusResponse], []),
365
- get_deposit_fee: IDL.Func([], [IDL.Nat64], []),
366
- get_events: IDL.Func(
367
- [IDL.Record({ start: IDL.Nat64, length: IDL.Nat64 })],
368
- [IDL.Vec(Event)],
369
- [],
370
- ),
371
- get_known_utxos: IDL.Func(
372
- [
373
- IDL.Record({
374
- owner: IDL.Opt(IDL.Principal),
375
- subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
376
- }),
377
- ],
378
- [IDL.Vec(Utxo)],
379
- [],
380
- ),
381
- get_minter_info: IDL.Func([], [MinterInfo], []),
382
- get_withdrawal_account: IDL.Func([], [Account], []),
383
- retrieve_btc: IDL.Func(
384
- [RetrieveBtcArgs],
385
- [IDL.Variant({ Ok: RetrieveBtcOk, Err: RetrieveBtcError })],
386
- [],
387
- ),
388
- retrieve_btc_status: IDL.Func(
389
- [IDL.Record({ block_index: IDL.Nat64 })],
390
- [RetrieveBtcStatus],
391
- [],
392
- ),
393
- retrieve_btc_status_v2: IDL.Func(
394
- [IDL.Record({ block_index: IDL.Nat64 })],
395
- [RetrieveBtcStatusV2],
396
- [],
397
- ),
398
- retrieve_btc_status_v2_by_account: IDL.Func(
399
- [IDL.Opt(Account)],
400
- [
401
- IDL.Vec(
402
- IDL.Record({
403
- block_index: IDL.Nat64,
404
- status_v2: IDL.Opt(RetrieveBtcStatusV2),
405
- }),
406
- ),
407
- ],
408
- [],
409
- ),
410
- retrieve_btc_with_approval: IDL.Func(
411
- [RetrieveBtcWithApprovalArgs],
412
- [
413
- IDL.Variant({
414
- Ok: RetrieveBtcOk,
415
- Err: RetrieveBtcWithApprovalError,
416
- }),
417
- ],
418
- [],
419
- ),
420
- update_balance: IDL.Func(
421
- [
422
- IDL.Record({
423
- owner: IDL.Opt(IDL.Principal),
424
- subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
425
- }),
426
- ],
427
- [
428
- IDL.Variant({
429
- Ok: IDL.Vec(UtxoStatus),
430
- Err: UpdateBalanceError,
431
- }),
432
- ],
433
- [],
434
- ),
435
- });
436
- };
437
-
438
- export const init = ({ IDL }) => {
439
- const Mode = IDL.Variant({
440
- RestrictedTo: IDL.Vec(IDL.Principal),
441
- DepositsRestrictedTo: IDL.Vec(IDL.Principal),
442
- ReadOnly: IDL.Null,
443
- GeneralAvailability: IDL.Null,
444
- });
445
- const UpgradeArgs = IDL.Record({
446
- get_utxos_cache_expiration_seconds: IDL.Opt(IDL.Nat64),
447
- kyt_principal: IDL.Opt(IDL.Principal),
448
- mode: IDL.Opt(Mode),
449
- retrieve_btc_min_amount: IDL.Opt(IDL.Nat64),
450
- max_time_in_queue_nanos: IDL.Opt(IDL.Nat64),
451
- check_fee: IDL.Opt(IDL.Nat64),
452
- btc_checker_principal: IDL.Opt(IDL.Principal),
453
- min_confirmations: IDL.Opt(IDL.Nat32),
454
- kyt_fee: IDL.Opt(IDL.Nat64),
455
- });
456
- const BtcNetwork = IDL.Variant({
457
- Mainnet: IDL.Null,
458
- Regtest: IDL.Null,
459
- Testnet: IDL.Null,
460
- });
461
- const InitArgs = IDL.Record({
462
- get_utxos_cache_expiration_seconds: IDL.Opt(IDL.Nat64),
463
- kyt_principal: IDL.Opt(IDL.Principal),
464
- ecdsa_key_name: IDL.Text,
465
- mode: Mode,
466
- retrieve_btc_min_amount: IDL.Nat64,
467
- ledger_id: IDL.Principal,
468
- max_time_in_queue_nanos: IDL.Nat64,
469
- btc_network: BtcNetwork,
470
- check_fee: IDL.Opt(IDL.Nat64),
471
- btc_checker_principal: IDL.Opt(IDL.Principal),
472
- min_confirmations: IDL.Opt(IDL.Nat32),
473
- kyt_fee: IDL.Opt(IDL.Nat64),
474
- });
475
- const MinterArg = IDL.Variant({
476
- Upgrade: IDL.Opt(UpgradeArgs),
477
- Init: InitArgs,
478
- });
479
-
480
- return [MinterArg];
481
- };