Liquid peg-ins require a moderate level of technical proficiency and around a day to confirm (102 Bitcoin blocks), therefore most users will prefer to acquire their Liquid Bitcoin (L-BTC) from a third party that handles the peg-ins for them.
Warning: Do not peg-in L-BTC without having a method of converting it back to BTC. L-BTC peg-outs can only be performed by a Liquid Federation member.
Before you start the peg-in process, you will need to make sure you have the following prepared on your desktop computer:
- A Bitcoin node (Bitcoin Core) installed and fully synced
- A Liquid node (Elements Core) installed and fully synced
- Peg-in validation enabled on Elements Core
Run Elements Core, and open the console window: Window > Console.
Get a peg-in address by using the following command in the terminal.
Send the bitcoin to be converted to the
mainchain_address and record the transaction ID provided by your wallet.
Wait for 102 confirmations on the Bitcoin blockchain. You can track the transaction on Blockstream Explorer.
After the transaction has received 102 confirmations, run Bitcoin Core and open the console: Window > Console.
Enter the following two commands in the console using the transaction ID recorded in Step 4. Record each result—you'll need these to claim the peg-in on Liquid.
Enter the following command in the Elements Core console to initiate a claim transaction on Liquid.
<raw>with the result from
getrawtransaction <yourTXID>in Step 7.
<proof>with the result from
gettxoutproof '["<yourTXID>"]'in Step 7.
claim_scriptvalue obtained in Step 3.
claimpegin <raw> <proof> <claim_script>
After the transaction confirms on the Liquid sidechain (around two minutes), your L-BTC balance in Elements Core should be updated.
All done! You now should have successfully converted your BTC to L-BTC using a peg-in.
Note: Unless you are Liquid Federation member, converting L-BTC back to BTC requires a third party. See our guide for a variety of methods on how to achieve this.