Skip to content

Advanced bark

There are two additional bark features that we don't expect most users will have to do, but that we still want you to try out:

  • Boarding: Taking on-chain bitcoin off-chain, onto an Ark
  • Unilateral exit: Taking off-chain bitcoin on-chain, without any cooperation from the Ark server

Boarding

We expect most users will receive their first sats over Ark directly, in the same way you received yours from our faucet. But it is definitely possible to move your on-chain funds into the Ark as well—we call it boarding!

Boarding is currently only possible from within bark's internal on-chain wallet. So for you to try it out, you need to have an on-chain balance.

Check your on-chain balance using:

bark onchain balance

If you don't have any, our faucet can help you out. Grab an on-chain address from your bark wallet:

bark onchain address
Then use the faucet to send some on-chain (signet) sats to this address.

You can use bark balance to double-check they've arrived.

Once you have some on-chain sats, you can board the Ark:

# Board entire on-chain balance
bark board --all

# Board a specified amount
bark board "10000 sat"

After boarding, you should see that you now have a new VTXO with the type "board":

bark vtxos

You've successfully taken your on-chain bitcoin off-chain!

Unilateral exit

Finally, let's walk through performing a unilateral exit.

This process requires broadcasting multiple transactions sequentially, so please allocate 1-2 hours to complete this test.

Note

We're currently addressing some known issues with unilateral exits that may occur in certain edge cases. Let us know if you need help.

What you'll need

To get started, you will need the following:

  • at least one VTXO
  • at least 15,000 on-chain sats per VTXO you're exiting (just to be on the safe side!)
  • make sure you have at least one confirmation for all on-chain UTXOs. Check this using bark onchain utxos or at mempool.space.
  • patience

Under the hood

Each of your VTXOs consists of a series of transactions that must be broadcast to retrieve your sats on-chain.

The unilateral exit process will work as follows:

  • Each of the transactions in your unilateral exit will have to be broadcast and confirmed using a child-pays-for-parent (CPFP) transaction.
  • Each child transaction has to wait an average of 10 minutes for its parent to confirm.
  • Once the final transaction of a VTXO's exit is confirmed, you will have to wait for a time lock to expire. The time-lock is 12 blocks or about two hours.

Note

If you are using your own bitcoin node instead of the esplora backend, make sure the -txindex is enabled.

Performing the exit

Because the exit is a multi-step process, you can either manually run the exit command multiple times, or use the --wait flag to keep running until the entire process has been completed. We'd recommend the latter and keeping your terminal running while you get some coffee.

Exit a single VTXO

bark exit --vtxos <your_vtxo_id> --wait

Exit all VTXOs in your wallet

bark exit --all --wait

Be aware that you might see some scary logging, this does not necessarily mean that your exit will not succeed, often the process will automatically recover by waiting for an additional confirmation and retrying.

Note

If you really want to dig deeper, use the --verbose flag to follow everything that happens under the hood.