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