How to deposit and withdraw sidechain Bitcoin


To transfer BTC to your Echo account, you have to create btc_deposit_address for your account in the Echo network.

For it, call the method create_btc_address. The second parameter here is the backup of your Bitcoin network account. In the mainnet, it starts with ‘1’ (1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2). In the test net, it starts with m or n (mipcBbFg9gMiCh81Kj8tqqdgoZub1ZJRfn)

After creating an address you can view it using the method get_btc_address. Example:

unlocked >>> get_btc_address nathan
"id": "1.19.0",
"account": "1.2.26",
"deposit_address": {
"address": "2NA1MLubzNsYtdWt6Qzh6aFiGbYAqasWv1Q"
"committee_member_ids_in_script": [[
"is_relevant": true,
"backup_address": "muBbJomENuCpiaW6NtBE4byah7sQXZFoHu",
"extensions": []

deposit_address is our deposit address.

Now, we can make in-network transfers using this address. To do it, you can use any wallet. For instance, here is what a transfer via bitcoin-cli looks like:

./bitcoin-cli sendtoaddress 2NA1MLubzNsYtdWt6Qzh6aFiGbYAqasWv1Q 25

Normally, the funds reach your account within 24 hours. You can check your balance using the methods

list_id_balances and list_account_balances.

The balance will be expressed in eBTC.

list_account_balances nathan
9999999.99813941 ECHO
624.99892000 EBTC

If the amount you see is less than the one you sent, don’t worry. In the example above, the total amount sent was 625 BTC. The transaction fee was 0.00108 BTC. The system charges this fee to reward the committee members for transaction verification.

Also, you can view your deposits using the method get_account_deposits.

If you want to get the btc script used to create your address, call the method get_btc_deposit_script.


If you want to withdraw your eBTC from your Echo account to your BTC account, call the method withdraw_btc.

The balance of your account will change immediately, but it takes some time for the funds to reach the Bitcoin network.

To get your withdrawals you can use get_account_withdrawals method.