@dfinity/ckbtc 4.0.1 → 4.0.3-next-2025-10-04

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.
@@ -2,6 +2,9 @@ import type { ActorMethod } from "@dfinity/agent";
2
2
  import type { IDL } from "@dfinity/candid";
3
3
  import type { Principal } from "@dfinity/principal";
4
4
 
5
+ /**
6
+ * Represents an account on the ckBTC ledger.
7
+ */
5
8
  export interface Account {
6
9
  owner: Principal;
7
10
  subaccount: [] | [Uint8Array | number[]];
@@ -13,10 +16,26 @@ export type BitcoinAddress =
13
16
  | { p2wpkh_v0: Uint8Array | number[] }
14
17
  | { p2pkh: Uint8Array | number[] };
15
18
  export type BtcNetwork =
16
- | { Mainnet: null }
17
- | { Regtest: null }
18
- | { Testnet: null };
19
+ | {
20
+ /**
21
+ * The public Bitcoin mainnet.
22
+ */
23
+ Mainnet: null;
24
+ }
25
+ | {
26
+ /**
27
+ * A local Bitcoin regtest installation.
28
+ */
29
+ Regtest: null;
30
+ }
31
+ | {
32
+ /**
33
+ * The public Bitcoin testnet.
34
+ */
35
+ Testnet: null;
36
+ };
19
37
  export interface CanisterStatusResponse {
38
+ memory_metrics: MemoryMetrics;
20
39
  status: CanisterStatusType;
21
40
  memory_size: bigint;
22
41
  cycles: bigint;
@@ -32,6 +51,7 @@ export type CanisterStatusType =
32
51
  | { running: null };
33
52
  export interface DefiniteCanisterSettings {
34
53
  freezing_threshold: bigint;
54
+ wasm_memory_threshold: bigint;
35
55
  controllers: Array<Principal>;
36
56
  reserved_cycles_limit: bigint;
37
57
  log_visibility: LogVisibility;
@@ -152,18 +172,62 @@ export type EventType =
152
172
  mint_block_index: bigint;
153
173
  };
154
174
  };
175
+ /**
176
+ * The initialization parameters of the minter canister.
177
+ */
155
178
  export interface InitArgs {
179
+ /**
180
+ * / The expiration duration (in seconds) for cached entries in the get_utxos cache.
181
+ */
156
182
  get_utxos_cache_expiration_seconds: [] | [bigint];
183
+ /**
184
+ * / The canister id of the KYT canister (deprecated, use btc_checker_principal instead).
185
+ */
157
186
  kyt_principal: [] | [Principal];
187
+ /**
188
+ * The name of the ECDSA key to use.
189
+ * E.g., "dfx_test_key" on the local replica.
190
+ */
158
191
  ecdsa_key_name: string;
192
+ /**
193
+ * / The minter's operation mode.
194
+ */
159
195
  mode: Mode;
196
+ /**
197
+ * The minimal amount of ckBTC that can be converted to BTC.
198
+ */
160
199
  retrieve_btc_min_amount: bigint;
200
+ /**
201
+ * The principal of the ledger that handles ckBTC transfers.
202
+ * The default account of the ckBTC minter must be configured as
203
+ * the minting account of the ledger.
204
+ */
161
205
  ledger_id: Principal;
206
+ /**
207
+ * / Maximum time in nanoseconds that a transaction should spend in the queue
208
+ * / before being sent.
209
+ */
162
210
  max_time_in_queue_nanos: bigint;
211
+ /**
212
+ * The minter will interact with this Bitcoin network.
213
+ */
163
214
  btc_network: BtcNetwork;
215
+ /**
216
+ * / The fee paid per Bitcoin check.
217
+ */
164
218
  check_fee: [] | [bigint];
219
+ /**
220
+ * / The canister id of the Bitcoin checker canister.
221
+ */
165
222
  btc_checker_principal: [] | [Principal];
223
+ /**
224
+ * / The minimum number of confirmations required for the minter to
225
+ * / accept a Bitcoin transaction.
226
+ */
166
227
  min_confirmations: [] | [number];
228
+ /**
229
+ * / The fee paid per check by the KYT canister (deprecated, use check_fee instead).
230
+ */
167
231
  kyt_fee: [] | [bigint];
168
232
  }
169
233
  export type InvalidTransactionError = {
@@ -173,17 +237,57 @@ export type LogVisibility =
173
237
  | { controllers: null }
174
238
  | { public: null }
175
239
  | { allowed_viewers: Array<Principal> };
240
+ export interface MemoryMetrics {
241
+ wasm_binary_size: bigint;
242
+ wasm_chunk_store_size: bigint;
243
+ canister_history_size: bigint;
244
+ stable_memory_size: bigint;
245
+ snapshots_size: bigint;
246
+ wasm_memory_size: bigint;
247
+ global_memory_size: bigint;
248
+ custom_sections_size: bigint;
249
+ }
176
250
  export type MinterArg = { Upgrade: [] | [UpgradeArgs] } | { Init: InitArgs };
177
251
  export interface MinterInfo {
252
+ /**
253
+ * This amount is based on the `retrieve_btc_min_amount` setting during canister
254
+ * initialization or upgrades, but may vary according to current network fees.
255
+ */
178
256
  retrieve_btc_min_amount: bigint;
179
257
  min_confirmations: number;
258
+ /**
259
+ * The same as `check_fee`, but the old name is kept here to be backward compatible.
260
+ */
180
261
  kyt_fee: bigint;
181
262
  }
182
263
  export type Mode =
183
- | { RestrictedTo: Array<Principal> }
184
- | { DepositsRestrictedTo: Array<Principal> }
185
- | { ReadOnly: null }
186
- | { GeneralAvailability: null };
264
+ | {
265
+ /**
266
+ * Only specified principals can modify minter's state.
267
+ */
268
+ RestrictedTo: Array<Principal>;
269
+ }
270
+ | {
271
+ /**
272
+ * Only specified principals can convert BTC to ckBTC.
273
+ */
274
+ DepositsRestrictedTo: Array<Principal>;
275
+ }
276
+ | {
277
+ /**
278
+ * The minter does not allow any state modifications.
279
+ */
280
+ ReadOnly: null;
281
+ }
282
+ | {
283
+ /**
284
+ * Anyone can interact with the minter.
285
+ */
286
+ GeneralAvailability: null;
287
+ };
288
+ /**
289
+ * Utxos that don't have enough confirmations to be processed.
290
+ */
187
291
  export interface PendingUtxo {
188
292
  confirmations: number;
189
293
  value: bigint;
@@ -215,64 +319,283 @@ export type ReplacedReason =
215
319
  }
216
320
  | { to_retry: null };
217
321
  export interface RetrieveBtcArgs {
322
+ /**
323
+ * The address to which the ckBTC minter should deposit BTC.
324
+ */
218
325
  address: string;
326
+ /**
327
+ * The amount of ckBTC in Satoshis that the client wants to withdraw.
328
+ */
219
329
  amount: bigint;
220
330
  }
221
331
  export type RetrieveBtcError =
222
- | { MalformedAddress: string }
223
- | { GenericError: { error_message: string; error_code: bigint } }
224
- | { TemporarilyUnavailable: string }
225
- | { AlreadyProcessing: null }
226
- | { AmountTooLow: bigint }
227
- | { InsufficientFunds: { balance: bigint } };
332
+ | {
333
+ /**
334
+ * The minter failed to parse the destination address.
335
+ */
336
+ MalformedAddress: string;
337
+ }
338
+ | {
339
+ /**
340
+ * A generic error reserved for future extensions.
341
+ */
342
+ GenericError: { error_message: string; error_code: bigint };
343
+ }
344
+ | {
345
+ /**
346
+ * The minter is overloaded, retry the request.
347
+ * The payload contains a human-readable message explaining what caused the unavailability.
348
+ */
349
+ TemporarilyUnavailable: string;
350
+ }
351
+ | {
352
+ /**
353
+ * The minter is already processing another retrieval request for the same
354
+ * principal.
355
+ */
356
+ AlreadyProcessing: null;
357
+ }
358
+ | {
359
+ /**
360
+ * The withdrawal amount is too low.
361
+ * The payload contains the minimal withdrawal amount.
362
+ */
363
+ AmountTooLow: bigint;
364
+ }
365
+ | {
366
+ /**
367
+ * The ckBTC balance of the withdrawal account is too low.
368
+ */
369
+ InsufficientFunds: { balance: bigint };
370
+ };
228
371
  export interface RetrieveBtcOk {
372
+ /**
373
+ * Returns the burn transaction index corresponding to the withdrawal.
374
+ * You can use this index to query the withdrawal status.
375
+ */
229
376
  block_index: bigint;
230
377
  }
231
378
  export type RetrieveBtcStatus =
232
- | { Signing: null }
233
- | { Confirmed: { txid: Uint8Array | number[] } }
234
- | { Sending: { txid: Uint8Array | number[] } }
235
- | { AmountTooLow: null }
236
- | { Unknown: null }
237
- | { Submitted: { txid: Uint8Array | number[] } }
238
- | { Pending: null };
379
+ | {
380
+ /**
381
+ * The minter is obtaining all required ECDSA signatures on the
382
+ * Bitcoin transaction for this request.
383
+ */
384
+ Signing: null;
385
+ }
386
+ | {
387
+ /**
388
+ * The minter received enough confirmations for the Bitcoin
389
+ * transaction for this request. The payload contains the
390
+ * identifier of the transaction on the Bitcoin network.
391
+ */
392
+ Confirmed: { txid: Uint8Array | number[] };
393
+ }
394
+ | {
395
+ /**
396
+ * The minter signed the transaction and is waiting for a reply
397
+ * from the Bitcoin canister.
398
+ */
399
+ Sending: { txid: Uint8Array | number[] };
400
+ }
401
+ | {
402
+ /**
403
+ * The amount was too low to cover the transaction fees.
404
+ */
405
+ AmountTooLow: null;
406
+ }
407
+ | {
408
+ /**
409
+ * The minter does not have any information on the specified
410
+ * retrieval request. It can be that nobody submitted the
411
+ * request or the minter pruned the relevant information from the
412
+ * history to save space.
413
+ */
414
+ Unknown: null;
415
+ }
416
+ | {
417
+ /**
418
+ * The minter sent a transaction for the retrieve request.
419
+ * The payload contains the identifier of the transaction on the Bitcoin network.
420
+ */
421
+ Submitted: { txid: Uint8Array | number[] };
422
+ }
423
+ | {
424
+ /**
425
+ * The minter did not send a Bitcoin transaction for this request yet.
426
+ */
427
+ Pending: null;
428
+ };
239
429
  export type RetrieveBtcStatusV2 =
240
- | { Signing: null }
241
- | { Confirmed: { txid: Uint8Array | number[] } }
242
- | { Sending: { txid: Uint8Array | number[] } }
243
- | { AmountTooLow: null }
244
- | { WillReimburse: ReimbursementRequest }
245
- | { Unknown: null }
246
- | { Submitted: { txid: Uint8Array | number[] } }
247
- | { Reimbursed: ReimbursedDeposit }
248
- | { Pending: null };
430
+ | {
431
+ /**
432
+ * The minter is obtaining all required ECDSA signatures on the
433
+ * Bitcoin transaction for this request.
434
+ */
435
+ Signing: null;
436
+ }
437
+ | {
438
+ /**
439
+ * The minter received enough confirmations for the Bitcoin
440
+ * transaction for this request. The payload contains the
441
+ * identifier of the transaction on the Bitcoin network.
442
+ */
443
+ Confirmed: { txid: Uint8Array | number[] };
444
+ }
445
+ | {
446
+ /**
447
+ * The minter signed the transaction and is waiting for a reply
448
+ * from the Bitcoin canister.
449
+ */
450
+ Sending: { txid: Uint8Array | number[] };
451
+ }
452
+ | {
453
+ /**
454
+ * The amount was too low to cover the transaction fees.
455
+ */
456
+ AmountTooLow: null;
457
+ }
458
+ | {
459
+ /**
460
+ * / The minter will try to reimburse this transaction.
461
+ */
462
+ WillReimburse: ReimbursementRequest;
463
+ }
464
+ | {
465
+ /**
466
+ * The minter does not have any information on the specified
467
+ * retrieval request. It can be that nobody submitted the
468
+ * request or the minter pruned the relevant information from the
469
+ * history to save space.
470
+ */
471
+ Unknown: null;
472
+ }
473
+ | {
474
+ /**
475
+ * The minter sent a transaction for the retrieve request.
476
+ * The payload contains the identifier of the transaction on the Bitcoin network.
477
+ */
478
+ Submitted: { txid: Uint8Array | number[] };
479
+ }
480
+ | {
481
+ /**
482
+ * / The retrieve Bitcoin request has been reimbursed.
483
+ */
484
+ Reimbursed: ReimbursedDeposit;
485
+ }
486
+ | {
487
+ /**
488
+ * The minter did not send a Bitcoin transaction for this request yet.
489
+ */
490
+ Pending: null;
491
+ };
249
492
  export interface RetrieveBtcWithApprovalArgs {
493
+ /**
494
+ * The subaccount to burn ckBTC from.
495
+ */
250
496
  from_subaccount: [] | [Uint8Array | number[]];
497
+ /**
498
+ * The address to which the ckBTC minter should deposit BTC.
499
+ */
251
500
  address: string;
501
+ /**
502
+ * The amount of ckBTC in Satoshis that the client wants to withdraw.
503
+ */
252
504
  amount: bigint;
253
505
  }
254
506
  export type RetrieveBtcWithApprovalError =
255
- | { MalformedAddress: string }
256
- | { GenericError: { error_message: string; error_code: bigint } }
257
- | { TemporarilyUnavailable: string }
258
- | { InsufficientAllowance: { allowance: bigint } }
259
- | { AlreadyProcessing: null }
260
- | { AmountTooLow: bigint }
261
- | { InsufficientFunds: { balance: bigint } };
262
- export type SuspendedReason = { ValueTooSmall: null } | { Quarantined: null };
507
+ | {
508
+ /**
509
+ * The minter failed to parse the destination address.
510
+ */
511
+ MalformedAddress: string;
512
+ }
513
+ | {
514
+ /**
515
+ * A generic error reserved for future extensions.
516
+ */
517
+ GenericError: { error_message: string; error_code: bigint };
518
+ }
519
+ | {
520
+ /**
521
+ * The minter is overloaded, retry the request.
522
+ * The payload contains a human-readable message explaining what caused the unavailability.
523
+ */
524
+ TemporarilyUnavailable: string;
525
+ }
526
+ | {
527
+ /**
528
+ * The allowance given to the minter is too low.
529
+ */
530
+ InsufficientAllowance: { allowance: bigint };
531
+ }
532
+ | {
533
+ /**
534
+ * The minter is already processing another retrieval request for the same
535
+ * principal.
536
+ */
537
+ AlreadyProcessing: null;
538
+ }
539
+ | {
540
+ /**
541
+ * The withdrawal amount is too low.
542
+ * The payload contains the minimal withdrawal amount.
543
+ */
544
+ AmountTooLow: bigint;
545
+ }
546
+ | {
547
+ /**
548
+ * The ckBTC balance of the withdrawal account is too low.
549
+ */
550
+ InsufficientFunds: { balance: bigint };
551
+ };
552
+ export type SuspendedReason =
553
+ | {
554
+ /**
555
+ * The minter ignored this UTXO because UTXO's value is too small to pay
556
+ * the check fees.
557
+ */
558
+ ValueTooSmall: null;
559
+ }
560
+ | {
561
+ /**
562
+ * The Bitcoin checker considered this UTXO to be tainted.
563
+ */
564
+ Quarantined: null;
565
+ };
263
566
  export interface SuspendedUtxo {
264
567
  utxo: Utxo;
265
568
  earliest_retry: Timestamp;
266
569
  reason: SuspendedReason;
267
570
  }
571
+ /**
572
+ * Number of nanoseconds since the Unix Epoch
573
+ */
268
574
  export type Timestamp = bigint;
269
575
  export type UpdateBalanceError =
270
576
  | {
577
+ /**
578
+ * A generic error reserved for future extensions.
579
+ */
271
580
  GenericError: { error_message: string; error_code: bigint };
272
581
  }
273
- | { TemporarilyUnavailable: string }
274
- | { AlreadyProcessing: null }
275
582
  | {
583
+ /**
584
+ * The minter is overloaded, retry the request.
585
+ * The payload contains a human-readable message explaining what caused the unavailability.
586
+ */
587
+ TemporarilyUnavailable: string;
588
+ }
589
+ | {
590
+ /**
591
+ * The minter is already processing another update balance request for the caller.
592
+ */
593
+ AlreadyProcessing: null;
594
+ }
595
+ | {
596
+ /**
597
+ * There are no new UTXOs to process.
598
+ */
276
599
  NoNewUtxos: {
277
600
  suspended_utxos: [] | [Array<SuspendedUtxo>];
278
601
  required_confirmations: number;
@@ -280,15 +603,47 @@ export type UpdateBalanceError =
280
603
  current_confirmations: [] | [number];
281
604
  };
282
605
  };
606
+ /**
607
+ * The upgrade parameters of the minter canister.
608
+ */
283
609
  export interface UpgradeArgs {
610
+ /**
611
+ * / The expiration duration (in seconds) for cached entries in the get_utxos cache.
612
+ */
284
613
  get_utxos_cache_expiration_seconds: [] | [bigint];
614
+ /**
615
+ * / The canister id of the KYT canister (deprecated, use btc_checker_principal instead).
616
+ */
285
617
  kyt_principal: [] | [Principal];
618
+ /**
619
+ * / If set, overrides the current minter's operation mode.
620
+ */
286
621
  mode: [] | [Mode];
622
+ /**
623
+ * The minimal amount of ckBTC that the minter converts to BTC.
624
+ */
287
625
  retrieve_btc_min_amount: [] | [bigint];
626
+ /**
627
+ * / Maximum time in nanoseconds that a transaction should spend in the queue
628
+ * / before being sent.
629
+ */
288
630
  max_time_in_queue_nanos: [] | [bigint];
631
+ /**
632
+ * / The fee per Bitcoin check.
633
+ */
289
634
  check_fee: [] | [bigint];
635
+ /**
636
+ * / The principal of the Bitcoin checker canister.
637
+ */
290
638
  btc_checker_principal: [] | [Principal];
639
+ /**
640
+ * / The minimum number of confirmations required for the minter to
641
+ * / accept a Bitcoin transaction.
642
+ */
291
643
  min_confirmations: [] | [number];
644
+ /**
645
+ * / The fee paid per check by the KYT canister (deprecated, use check_fee instead).
646
+ */
292
647
  kyt_fee: [] | [bigint];
293
648
  }
294
649
  export interface Utxo {
@@ -296,17 +651,41 @@ export interface Utxo {
296
651
  value: bigint;
297
652
  outpoint: { txid: Uint8Array | number[]; vout: number };
298
653
  }
654
+ /**
655
+ * The result of an [update_balance] call.
656
+ */
299
657
  export type UtxoStatus =
300
- | { ValueTooSmall: Utxo }
301
- | { Tainted: Utxo }
302
658
  | {
659
+ /**
660
+ * The minter ignored this UTXO because UTXO's value is too small to pay
661
+ * the check fees.
662
+ */
663
+ ValueTooSmall: Utxo;
664
+ }
665
+ | {
666
+ /**
667
+ * The Bitcoin checker considered this UTXO to be tainted.
668
+ */
669
+ Tainted: Utxo;
670
+ }
671
+ | {
672
+ /**
673
+ * The UTXO passed the Bitcoin check, and ckBTC has been minted.
674
+ */
303
675
  Minted: {
304
676
  minted_amount: bigint;
305
677
  block_index: bigint;
306
678
  utxo: Utxo;
307
679
  };
308
680
  }
309
- | { Checked: Utxo };
681
+ | {
682
+ /**
683
+ * The UTXO passed the Bitcoin check, but the minter failed to mint ckBTC
684
+ * because the Ledger was unavailable. Retrying the [update_balance] call
685
+ * should eventually advance the UTXO to the [Minted] state.
686
+ */
687
+ Checked: Utxo;
688
+ };
310
689
  export interface WithdrawalFee {
311
690
  minter_fee: bigint;
312
691
  bitcoin_fee: bigint;
@@ -315,10 +694,22 @@ export type WithdrawalReimbursementReason = {
315
694
  invalid_transaction: InvalidTransactionError;
316
695
  };
317
696
  export interface _SERVICE {
697
+ /**
698
+ * / Returns an estimate of the user's fee (in Satoshi) for a
699
+ * / retrieve_btc request based on the current status of the Bitcoin network.
700
+ */
318
701
  estimate_withdrawal_fee: ActorMethod<
319
702
  [{ amount: [] | [bigint] }],
320
703
  { minter_fee: bigint; bitcoin_fee: bigint }
321
704
  >;
705
+ /**
706
+ * Returns the Bitcoin address to which the owner should send BTC
707
+ * before converting the amount to ckBTC using the [update_balance]
708
+ * endpoint.
709
+ *
710
+ * If the owner is not set, it defaults to the caller's principal.
711
+ * The resolved owner must be a non-anonymous principal.
712
+ */
322
713
  get_btc_address: ActorMethod<
323
714
  [
324
715
  {
@@ -329,8 +720,28 @@ export interface _SERVICE {
329
720
  string
330
721
  >;
331
722
  get_canister_status: ActorMethod<[], CanisterStatusResponse>;
723
+ /**
724
+ * / Returns the fee that the minter will charge for a bitcoin deposit.
725
+ */
332
726
  get_deposit_fee: ActorMethod<[], bigint>;
727
+ /**
728
+ * The minter keeps track of all state modifications in an internal event log.
729
+ *
730
+ * This method returns a list of events in the specified range.
731
+ * The minter can return fewer events than requested. The result is
732
+ * an empty vector if the start position is greater than the total
733
+ * number of events.
734
+ *
735
+ * NOTE: this method exists for debugging purposes.
736
+ * The ckBTC minter authors do not guarantee backward compatibility for this method.
737
+ */
333
738
  get_events: ActorMethod<[{ start: bigint; length: bigint }], Array<Event>>;
739
+ /**
740
+ * Returns UTXOs of the given account known by the minter (with no
741
+ * guarantee in the ordering of the returned values).
742
+ *
743
+ * If the owner is not set, it defaults to the caller's principal.
744
+ */
334
745
  get_known_utxos: ActorMethod<
335
746
  [
336
747
  {
@@ -340,28 +751,91 @@ export interface _SERVICE {
340
751
  ],
341
752
  Array<Utxo>
342
753
  >;
754
+ /**
755
+ * Section "Minter Information" {{{
756
+ * Returns internal minter parameters.
757
+ */
343
758
  get_minter_info: ActorMethod<[], MinterInfo>;
759
+ /**
760
+ * Returns the account to which the caller should deposit ckBTC
761
+ * before withdrawing BTC using the [retrieve_btc] endpoint.
762
+ */
344
763
  get_withdrawal_account: ActorMethod<[], Account>;
764
+ /**
765
+ * Submits a request to convert ckBTC to BTC.
766
+ *
767
+ * # Note
768
+ *
769
+ * The BTC retrieval process is slow. Instead of
770
+ * synchronously waiting for a BTC transaction to settle, this
771
+ * method returns a request ([block_index]) that the caller can use
772
+ * to query the request status.
773
+ *
774
+ * # Preconditions
775
+ *
776
+ * * The caller deposited the requested amount in ckBTC to the account
777
+ * that the [get_withdrawal_account] endpoint returns.
778
+ */
345
779
  retrieve_btc: ActorMethod<
346
780
  [RetrieveBtcArgs],
347
781
  { Ok: RetrieveBtcOk } | { Err: RetrieveBtcError }
348
782
  >;
783
+ /**
784
+ * / [deprecated] Returns the status of a withdrawal request.
785
+ * / You should use retrieve_btc_status_v2 to retrieve the status of your withdrawal request.
786
+ */
349
787
  retrieve_btc_status: ActorMethod<
350
788
  [{ block_index: bigint }],
351
789
  RetrieveBtcStatus
352
790
  >;
791
+ /**
792
+ * / Returns the status of a withdrawal request request using the RetrieveBtcStatusV2 type.
793
+ */
353
794
  retrieve_btc_status_v2: ActorMethod<
354
795
  [{ block_index: bigint }],
355
796
  RetrieveBtcStatusV2
356
797
  >;
798
+ /**
799
+ * Returns the withdrawal statues by account.
800
+ *
801
+ * # Note
802
+ * The _v2_ part indicates that you get a response in line with the retrieve_btc_status_v2 endpoint,
803
+ * i.e., you get a vector of RetrieveBtcStatusV2 and not RetrieveBtcStatus.
804
+ *
805
+ */
357
806
  retrieve_btc_status_v2_by_account: ActorMethod<
358
807
  [[] | [Account]],
359
808
  Array<{ block_index: bigint; status_v2: [] | [RetrieveBtcStatusV2] }>
360
809
  >;
810
+ /**
811
+ * Submits a request to convert ckBTC to BTC.
812
+ *
813
+ * # Note
814
+ *
815
+ * The BTC retrieval process is slow. Instead of
816
+ * synchronously waiting for a BTC transaction to settle, this
817
+ * method returns a request ([block_index]) that the caller can use
818
+ * to query the request status.
819
+ *
820
+ * # Preconditions
821
+ *
822
+ * * The caller allowed the minter's principal to spend its funds
823
+ * using [icrc2_approve] on the ckBTC ledger.
824
+ */
361
825
  retrieve_btc_with_approval: ActorMethod<
362
826
  [RetrieveBtcWithApprovalArgs],
363
827
  { Ok: RetrieveBtcOk } | { Err: RetrieveBtcWithApprovalError }
364
828
  >;
829
+ /**
830
+ * Mints ckBTC for newly deposited UTXOs.
831
+ *
832
+ * If the owner is not set, it defaults to the caller's principal.
833
+ *
834
+ * # Preconditions
835
+ *
836
+ * * The owner deposited some BTC to the address that the
837
+ * [get_btc_address] endpoint returns.
838
+ */
365
839
  update_balance: ActorMethod<
366
840
  [
367
841
  {