# How to mint ckBTC?

**URL:** <https://forum.dfinity.org/t/how-to-mint-ckbtc/18453>\
**Category:** Developers\
**Created:** [February 11, 2023, 5:13pm UTC](https://forum.dfinity.org/t/how-to-mint-ckbtc/18453 "2023-02-11T17:13:46Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![solavrov](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/solavrov/32/2259_2.png) [@solavrov](https://forum.dfinity.org/u/solavrov)\
**Post date:** [February 11, 2023, 5:13pm UTC](https://forum.dfinity.org/t/how-to-mint-ckbtc/18453/1 "2023-02-11T17:13:46Z")

</div>

I see that ckBTC is live. Where is a tutorial how to mint ckBTC?

---

<div class="post-metadata">

**Author:** ![anonymous1](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/anonymous1/32/9762_2.png) [@anonymous1](https://forum.dfinity.org/u/anonymous1)\
**Post date:** [February 12, 2023, 4:31am UTC](https://forum.dfinity.org/t/how-to-mint-ckbtc/18453/2 "2023-02-12T04:31:35Z")

</div>

Mint process isn’t really live for public use yet. From what I’ve gathered, it’ll be available in a future proposal that could possibly come at anytime now.

---

<div class="post-metadata">

**Author:** ![Ang](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@Ang](https://forum.dfinity.org/u/Ang)\
**Post date:** [February 12, 2023, 6:01pm UTC](https://forum.dfinity.org/t/how-to-mint-ckbtc/18453/3 "2023-02-12T18:01:13Z")

</div>

There is some developer documentation explaining the minting process available here: [Chain-key Bitcoin - Internet Computer Wiki](https://wiki.internetcomputer.org/wiki/Chain-key_Bitcoin)

There are also efforts underway for third party apps such as ICPSwap and others to support minting and swapping.

---

<div class="post-metadata">

**Author:** ![markicp](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@markicp](https://forum.dfinity.org/u/markicp)\
**Post date:** [February 12, 2023, 8:53pm UTC](https://forum.dfinity.org/t/how-to-mint-ckbtc/18453/5 "2023-02-12T20:53:17Z")

</div>

Can you keep this crap on twitter - thanks.

---

<div class="post-metadata">

**Author:** ![CatPirate](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/catpirate/32/10096_2.png) [@CatPirate](https://forum.dfinity.org/u/CatPirate)\
**Post date:** [February 12, 2023, 9:07pm UTC](https://forum.dfinity.org/t/how-to-mint-ckbtc/18453/6 "2023-02-12T21:07:10Z")

</div>

Can you not talk to me, thanks?

---

<div class="post-metadata">

**Author:** ![Forreal](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/forreal/32/25191_2.png) [@Forreal](https://forum.dfinity.org/u/Forreal)\
**Post date:** [February 12, 2023, 11:04pm UTC](https://forum.dfinity.org/t/how-to-mint-ckbtc/18453/7 "2023-02-12T23:04:55Z")

</div>

Shouldn’t this be available for anyone who transfers BTC to a canister?

---

<div class="post-metadata">

**Author:** ![anonymous1](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/anonymous1/32/9762_2.png) [@anonymous1](https://forum.dfinity.org/u/anonymous1)\
**Post date:** [February 13, 2023, 1:18am UTC](https://forum.dfinity.org/t/how-to-mint-ckbtc/18453/8 "2023-02-13T01:18:40Z")

</div>

This forum is a relevant source to keep updated too…

---

<div class="post-metadata">

**Author:** ![PeanutNJam](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/peanutnjam/32/6366_2.png) [@PeanutNJam](https://forum.dfinity.org/u/PeanutNJam)\
**Post date:** [February 13, 2023, 5:15am UTC](https://forum.dfinity.org/t/how-to-mint-ckbtc/18453/9 "2023-02-13T05:15:10Z")

</div>

Here is a demo for ckBTC by one of the dfinity dev’s and most helpful. it builds on another feature called http calls, so i suggest to first complete the http calls then do this demo (both demos are by moritz) see link on youtubd → [[DAY 5 |&nbsp;LECTURE] Motoko: unlock the power of Bitcoin! - YouTube](https://www.youtube.com/watch?v=IWWcnPj1Dfo&list=PLeNYxb7vPrkhQN6-ps2krq5Un3xPD3vBQ&index=19)

---

<div class="post-metadata">

**Author:** ![solavrov](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/solavrov/32/2259_2.png) [@solavrov](https://forum.dfinity.org/u/solavrov)\
**Post date:** [February 17, 2023, 4:43pm UTC](https://forum.dfinity.org/t/how-to-mint-ckbtc/18453/10 "2023-02-17T16:43:33Z")

</div>

I decided to answer to my question in detail by myself (I can be completely WRONG, so do your own research).

Minting of ckBTC is not live yet. When it is live, we, hopefully, will be able to mint in dfx command line by the following way (thanks to Ang for the link [Chain-key Bitcoin - Internet Computer Wiki](https://wiki.internetcomputer.org/wiki/Chain-key_Bitcoin) shared in this post):

The minter is a canister with id “mqygn-kiaaa-aaaar-qaadq-cai” ([Canister: mqygn-kiaaa-aaaar-qaadq-cai - IC Dashboard](https://dashboard.internetcomputer.org/canister/mqygn-kiaaa-aaaar-qaadq-cai)). The minter’s dashboard: [https://mqygn-kiaaa-aaaar-qaadq-cai.raw.ic0.app/dashboard](https://mqygn-kiaaa-aaaar-qaadq-cai.raw.ic0.app/dashboard)

**First** , we need a BTC address to which we should send bitcoins to the minter. To get that address use minter’s method “get\_btc\_address”. You need to pass YOUR principal id as an argument. For example, MY principal id IS “uus5n-5xj5l-ngo5q-uqe5v-aqpgd-4nsod-w3gxa-7eqel-n77j4-5ekqg-hae”. So, call the method:

`dfx canister --network ic call mqygn-kiaaa-aaaar-qaadq-cai get_btc_address '(record {principal "uus5n-5xj5l-ngo5q-uqe5v-aqpgd-4nsod-w3gxa-7eqel-n77j4-5ekqg-hae"; null})'`

And we get the address:  
`("bc1q89k4508nfnje74hhqn4fxcq3emxca879rwkky5")`

The second argument of “get\_btc\_address” is optional subaccount. I don’t know why I may need it, so I simply skip it by plugging null.

**Second** , send (do not send before the minter is officially live!) bitcoins to the address that you received from “get\_btc\_address” method and wait for 72 bitcoin blockchain’s conformations. 72 conformations is a lot, but the minter has parameter “min\_confirmations” that is set at 72 (it can be adjusted by NNS in the future). So you should wait for about 30 hours before you receive your ckBTC.

**Third** , when your transaction has 72 confirmations, use minter’s method “update\_balance” to get your ckBTC. Plug same arguments (your principal id and subaccount (null)) into it:

`dfx canister --network ic call mqygn-kiaaa-aaaar-qaadq-cai update_balance '(record {principal "uus5n-5xj5l-ngo5q-uqe5v-aqpgd-4nsod-w3gxa-7eqel-n77j4-5ekqg-hae"; null})'`

After that your principal id will receive minted ckBTC.

I guess that because the minter does not work yet, today you will receive the following result:

```auto
(
  variant {
    3_456_837 = variant {
      658_180_290 = "BTC deposits are temporarily restricted"
    }
  },
)

```

---

<div class="post-metadata">

**Author:** ![bytesun](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/bytesun/32/2682_2.png) [@bytesun](https://forum.dfinity.org/u/bytesun)\
**Post date:** [April 14, 2023, 3:05pm UTC](https://forum.dfinity.org/t/how-to-mint-ckbtc/18453/11 "2023-04-14T15:05:12Z")

</div>

has anyone successfully minted ckbtc? I continue to get notice without enough confirmations

> (  
> variant {  
> Err = variant {  
> NoNewUtxos = record {  
> required\_confirmations = 12 : nat32;  
> current\_confirmations = null;  
> }  
> }  
> },  
> )

---

<div class="post-metadata">

**Author:** ![anonymous1](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/anonymous1/32/9762_2.png) [@anonymous1](https://forum.dfinity.org/u/anonymous1)\
**Post date:** [April 14, 2023, 3:13pm UTC](https://forum.dfinity.org/t/how-to-mint-ckbtc/18453/12 "2023-04-14T15:13:55Z")

</div>

Isn’t minting still not available to the public yet? Or did I miss something?

---

<div class="post-metadata">

**Author:** ![bytesun](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/bytesun/32/2682_2.png) [@bytesun](https://forum.dfinity.org/u/bytesun)\
**Post date:** [April 15, 2023, 1:52am UTC](https://forum.dfinity.org/t/how-to-mint-ckbtc/18453/13 "2023-04-15T01:52:12Z")

</div>

full screen news about ckBTC live from Dfinity, did I understand wrongly 😂

---

<div class="post-metadata">

**Author:** ![timo](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/timo/32/5543_2.png) [@timo](https://forum.dfinity.org/u/timo)\
**Post date:** [April 15, 2023, 8:13am UTC](https://forum.dfinity.org/t/how-to-mint-ckbtc/18453/14 "2023-04-15T08:13:02Z")

</div>

> [@solavrov](#):
>
> dfx canister --network ic call mqygn-kiaaa-aaaar-qaadq-cai get\_btc\_address ‘(record {principal “uus5n-5xj5l-ngo5q-uqe5v-aqpgd-4nsod-w3gxa-7eqel-n77j4-5ekqg-hae”; null})’

I think it must be

> dfx canister --network ic call mqygn-kiaaa-aaaar-qaadq-cai get\_btc\_address ‘(record {owner = principal “uus5n-5xj5l-ngo5q-uqe5v-aqpgd-4nsod-w3gxa-7eqel-n77j4-5ekqg-hae”})’

Note the `owner =` in the record. Without it candid’s sub-typing will assign `null` to `owner` and you will get the deposit address of the caller instead of the deposit address of the specified principal. Also note that `; subaccount = null` following the owner in record can be omitted due to candid sub-typing.
