@dfinity/ckbtc 4.0.2 → 4.0.3

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,4 +1,5 @@
1
1
  // Generated from dfinity/bitcoin-canister commit 47c5d1f14eff39282245ea6aec6e9f821571b024 for file 'canister/candid.did'
2
+
2
3
  type network = variant {
3
4
  mainnet;
4
5
  testnet; // Bitcoin testnet4.
@@ -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,9 +16,24 @@ 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 {
20
38
  memory_metrics: MemoryMetrics;
21
39
  status: CanisterStatusType;
@@ -154,18 +172,62 @@ export type EventType =
154
172
  mint_block_index: bigint;
155
173
  };
156
174
  };
175
+ /**
176
+ * The initialization parameters of the minter canister.
177
+ */
157
178
  export interface InitArgs {
179
+ /**
180
+ * / The expiration duration (in seconds) for cached entries in the get_utxos cache.
181
+ */
158
182
  get_utxos_cache_expiration_seconds: [] | [bigint];
183
+ /**
184
+ * / The canister id of the KYT canister (deprecated, use btc_checker_principal instead).
185
+ */
159
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
+ */
160
191
  ecdsa_key_name: string;
192
+ /**
193
+ * / The minter's operation mode.
194
+ */
161
195
  mode: Mode;
196
+ /**
197
+ * The minimal amount of ckBTC that can be converted to BTC.
198
+ */
162
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
+ */
163
205
  ledger_id: Principal;
206
+ /**
207
+ * / Maximum time in nanoseconds that a transaction should spend in the queue
208
+ * / before being sent.
209
+ */
164
210
  max_time_in_queue_nanos: bigint;
211
+ /**
212
+ * The minter will interact with this Bitcoin network.
213
+ */
165
214
  btc_network: BtcNetwork;
215
+ /**
216
+ * / The fee paid per Bitcoin check.
217
+ */
166
218
  check_fee: [] | [bigint];
219
+ /**
220
+ * / The canister id of the Bitcoin checker canister.
221
+ */
167
222
  btc_checker_principal: [] | [Principal];
223
+ /**
224
+ * / The minimum number of confirmations required for the minter to
225
+ * / accept a Bitcoin transaction.
226
+ */
168
227
  min_confirmations: [] | [number];
228
+ /**
229
+ * / The fee paid per check by the KYT canister (deprecated, use check_fee instead).
230
+ */
169
231
  kyt_fee: [] | [bigint];
170
232
  }
171
233
  export type InvalidTransactionError = {
@@ -187,15 +249,45 @@ export interface MemoryMetrics {
187
249
  }
188
250
  export type MinterArg = { Upgrade: [] | [UpgradeArgs] } | { Init: InitArgs };
189
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
+ */
190
256
  retrieve_btc_min_amount: bigint;
191
257
  min_confirmations: number;
258
+ /**
259
+ * The same as `check_fee`, but the old name is kept here to be backward compatible.
260
+ */
192
261
  kyt_fee: bigint;
193
262
  }
194
263
  export type Mode =
195
- | { RestrictedTo: Array<Principal> }
196
- | { DepositsRestrictedTo: Array<Principal> }
197
- | { ReadOnly: null }
198
- | { 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
+ */
199
291
  export interface PendingUtxo {
200
292
  confirmations: number;
201
293
  value: bigint;
@@ -227,64 +319,283 @@ export type ReplacedReason =
227
319
  }
228
320
  | { to_retry: null };
229
321
  export interface RetrieveBtcArgs {
322
+ /**
323
+ * The address to which the ckBTC minter should deposit BTC.
324
+ */
230
325
  address: string;
326
+ /**
327
+ * The amount of ckBTC in Satoshis that the client wants to withdraw.
328
+ */
231
329
  amount: bigint;
232
330
  }
233
331
  export type RetrieveBtcError =
234
- | { MalformedAddress: string }
235
- | { GenericError: { error_message: string; error_code: bigint } }
236
- | { TemporarilyUnavailable: string }
237
- | { AlreadyProcessing: null }
238
- | { AmountTooLow: bigint }
239
- | { 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
+ };
240
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
+ */
241
376
  block_index: bigint;
242
377
  }
243
378
  export type RetrieveBtcStatus =
244
- | { Signing: null }
245
- | { Confirmed: { txid: Uint8Array | number[] } }
246
- | { Sending: { txid: Uint8Array | number[] } }
247
- | { AmountTooLow: null }
248
- | { Unknown: null }
249
- | { Submitted: { txid: Uint8Array | number[] } }
250
- | { 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
+ };
251
429
  export type RetrieveBtcStatusV2 =
252
- | { Signing: null }
253
- | { Confirmed: { txid: Uint8Array | number[] } }
254
- | { Sending: { txid: Uint8Array | number[] } }
255
- | { AmountTooLow: null }
256
- | { WillReimburse: ReimbursementRequest }
257
- | { Unknown: null }
258
- | { Submitted: { txid: Uint8Array | number[] } }
259
- | { Reimbursed: ReimbursedDeposit }
260
- | { 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
+ };
261
492
  export interface RetrieveBtcWithApprovalArgs {
493
+ /**
494
+ * The subaccount to burn ckBTC from.
495
+ */
262
496
  from_subaccount: [] | [Uint8Array | number[]];
497
+ /**
498
+ * The address to which the ckBTC minter should deposit BTC.
499
+ */
263
500
  address: string;
501
+ /**
502
+ * The amount of ckBTC in Satoshis that the client wants to withdraw.
503
+ */
264
504
  amount: bigint;
265
505
  }
266
506
  export type RetrieveBtcWithApprovalError =
267
- | { MalformedAddress: string }
268
- | { GenericError: { error_message: string; error_code: bigint } }
269
- | { TemporarilyUnavailable: string }
270
- | { InsufficientAllowance: { allowance: bigint } }
271
- | { AlreadyProcessing: null }
272
- | { AmountTooLow: bigint }
273
- | { InsufficientFunds: { balance: bigint } };
274
- 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
+ };
275
566
  export interface SuspendedUtxo {
276
567
  utxo: Utxo;
277
568
  earliest_retry: Timestamp;
278
569
  reason: SuspendedReason;
279
570
  }
571
+ /**
572
+ * Number of nanoseconds since the Unix Epoch
573
+ */
280
574
  export type Timestamp = bigint;
281
575
  export type UpdateBalanceError =
282
576
  | {
577
+ /**
578
+ * A generic error reserved for future extensions.
579
+ */
283
580
  GenericError: { error_message: string; error_code: bigint };
284
581
  }
285
- | { TemporarilyUnavailable: string }
286
- | { AlreadyProcessing: null }
287
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
+ */
288
599
  NoNewUtxos: {
289
600
  suspended_utxos: [] | [Array<SuspendedUtxo>];
290
601
  required_confirmations: number;
@@ -292,15 +603,47 @@ export type UpdateBalanceError =
292
603
  current_confirmations: [] | [number];
293
604
  };
294
605
  };
606
+ /**
607
+ * The upgrade parameters of the minter canister.
608
+ */
295
609
  export interface UpgradeArgs {
610
+ /**
611
+ * / The expiration duration (in seconds) for cached entries in the get_utxos cache.
612
+ */
296
613
  get_utxos_cache_expiration_seconds: [] | [bigint];
614
+ /**
615
+ * / The canister id of the KYT canister (deprecated, use btc_checker_principal instead).
616
+ */
297
617
  kyt_principal: [] | [Principal];
618
+ /**
619
+ * / If set, overrides the current minter's operation mode.
620
+ */
298
621
  mode: [] | [Mode];
622
+ /**
623
+ * The minimal amount of ckBTC that the minter converts to BTC.
624
+ */
299
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
+ */
300
630
  max_time_in_queue_nanos: [] | [bigint];
631
+ /**
632
+ * / The fee per Bitcoin check.
633
+ */
301
634
  check_fee: [] | [bigint];
635
+ /**
636
+ * / The principal of the Bitcoin checker canister.
637
+ */
302
638
  btc_checker_principal: [] | [Principal];
639
+ /**
640
+ * / The minimum number of confirmations required for the minter to
641
+ * / accept a Bitcoin transaction.
642
+ */
303
643
  min_confirmations: [] | [number];
644
+ /**
645
+ * / The fee paid per check by the KYT canister (deprecated, use check_fee instead).
646
+ */
304
647
  kyt_fee: [] | [bigint];
305
648
  }
306
649
  export interface Utxo {
@@ -308,17 +651,41 @@ export interface Utxo {
308
651
  value: bigint;
309
652
  outpoint: { txid: Uint8Array | number[]; vout: number };
310
653
  }
654
+ /**
655
+ * The result of an [update_balance] call.
656
+ */
311
657
  export type UtxoStatus =
312
- | { ValueTooSmall: Utxo }
313
- | { Tainted: Utxo }
314
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
+ */
315
675
  Minted: {
316
676
  minted_amount: bigint;
317
677
  block_index: bigint;
318
678
  utxo: Utxo;
319
679
  };
320
680
  }
321
- | { 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
+ };
322
689
  export interface WithdrawalFee {
323
690
  minter_fee: bigint;
324
691
  bitcoin_fee: bigint;
@@ -327,10 +694,22 @@ export type WithdrawalReimbursementReason = {
327
694
  invalid_transaction: InvalidTransactionError;
328
695
  };
329
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
+ */
330
701
  estimate_withdrawal_fee: ActorMethod<
331
702
  [{ amount: [] | [bigint] }],
332
703
  { minter_fee: bigint; bitcoin_fee: bigint }
333
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
+ */
334
713
  get_btc_address: ActorMethod<
335
714
  [
336
715
  {
@@ -341,8 +720,28 @@ export interface _SERVICE {
341
720
  string
342
721
  >;
343
722
  get_canister_status: ActorMethod<[], CanisterStatusResponse>;
723
+ /**
724
+ * / Returns the fee that the minter will charge for a bitcoin deposit.
725
+ */
344
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
+ */
345
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
+ */
346
745
  get_known_utxos: ActorMethod<
347
746
  [
348
747
  {
@@ -352,28 +751,91 @@ export interface _SERVICE {
352
751
  ],
353
752
  Array<Utxo>
354
753
  >;
754
+ /**
755
+ * Section "Minter Information" {{{
756
+ * Returns internal minter parameters.
757
+ */
355
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
+ */
356
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
+ */
357
779
  retrieve_btc: ActorMethod<
358
780
  [RetrieveBtcArgs],
359
781
  { Ok: RetrieveBtcOk } | { Err: RetrieveBtcError }
360
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
+ */
361
787
  retrieve_btc_status: ActorMethod<
362
788
  [{ block_index: bigint }],
363
789
  RetrieveBtcStatus
364
790
  >;
791
+ /**
792
+ * / Returns the status of a withdrawal request request using the RetrieveBtcStatusV2 type.
793
+ */
365
794
  retrieve_btc_status_v2: ActorMethod<
366
795
  [{ block_index: bigint }],
367
796
  RetrieveBtcStatusV2
368
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
+ */
369
806
  retrieve_btc_status_v2_by_account: ActorMethod<
370
807
  [[] | [Account]],
371
808
  Array<{ block_index: bigint; status_v2: [] | [RetrieveBtcStatusV2] }>
372
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
+ */
373
825
  retrieve_btc_with_approval: ActorMethod<
374
826
  [RetrieveBtcWithApprovalArgs],
375
827
  { Ok: RetrieveBtcOk } | { Err: RetrieveBtcWithApprovalError }
376
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
+ */
377
839
  update_balance: ActorMethod<
378
840
  [
379
841
  {
@@ -1,4 +1,5 @@
1
1
  // Generated from IC repo commit 206b61a (2025-09-25 tags: release-2025-09-25_09-52-base) 'rs/bitcoin/ckbtc/minter/ckbtc_minter.did' by import-candid
2
+
2
3
  // Represents an account on the ckBTC ledger.
3
4
  type Account = record { owner : principal; subaccount : opt blob };
4
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfinity/ckbtc",
3
- "version": "4.0.2",
3
+ "version": "4.0.3",
4
4
  "description": "A library for interfacing with ckBTC.",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/cjs/index.cjs.js",