How to mint ckBTC?

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

2 Likes

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.

3 Likes

There is some developer documentation explaining the minting process available here: Chain-key Bitcoin - Internet Computer Wiki

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

3 Likes

Can you keep this crap on twitter - thanks.

1 Like

Can you not talk to me, thanks?

Shouldnā€™t this be available for anyone who transfers BTC to a canister?

This forum is a relevant source to keep updated tooā€¦

1 Like

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 |Ā LECTURE] Motoko: unlock the power of Bitcoin! - YouTube

4 Likes

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 shared in this post):

The minter is a canister with id ā€œmqygn-kiaaa-aaaar-qaadq-caiā€ (Canister: mqygn-kiaaa-aaaar-qaadq-cai - IC Dashboard). The minterā€™s 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:

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

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;
}
}
},
)

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

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

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.

2 Likes