The Ark Wallet CLI (Command Line Interface) is a powerful tool that allows users to interact with the Ark protocol directly from their terminal. It provides a streamlined way to manage your Ark wallet, conduct transactions, and interact with Ark Servers without the need for a graphical interface.
Begin by downloading a compatible binary from the latest GitHub releases.
Move the binary to a location in your PATH and make it executable:
mv <binary> /usr/local/bin/ark
chmod +x /usr/local/bin/ark
Initialize your wallet and connect to a liquidity provider running an arkd
server:
ark init --password <password> --server-url <server_url>
To restore a wallet, use the --prvkey
flag with the hex-encoded private key.
View your onchain and offchain balances:
ark balance
For balance with VTXO expiration details:
ark balance --expiry-details
Display your boarding and offchain receiving addresses:
ark receive
Send payments to one or multiple receivers co-signing only with the Server and delivering the pending payment to te recipient through the Server:
ark send --to <address> --amount <amount>
ark send --receivers '[{"to": "<address>", "amount": <amount>}, ...]'
NOTE: You can send to both onchain and offchain addresses. In case of onchain address, the send is done by joining a round with a collaborative exit.
The settle
command can be used to settle your pre-confirmed VTXOs or to complete the onboarding procedure and join the Ark with your own funds.
ark settle
The redeem-notes
command can be used to redeem ark-notes.
ark redeem-notes --note <note1,note2> --password <password>
Work with the Server to redeem funds onchain:
ark redeem --amount <amount> --address <onchain_address>
NOTE: Change from this operation goes to your offchain address. This operation is equal to send --amount <amount> --to <onchain_address>
If the Server is unresponsive, redeem all offchain funds:
ark redeem --force --password <password>
NOTE: The --force
flag ignores --address
and --amount
and redeems all funds.
Every vtxo unrolled onchain has a locktime that must expire before being able to move those funds to your bitcoin wallet.
You can know when your onchain funds reach maturity for the claim with:
ark balance
Once the funds are mature they can be claimed:
ark redeem --complete --address <your_btc_wallet_address>
For a list of all available commands:
ark help
To run a second CLI instance, use a different data directory:
export ARK_WALLET_DATADIR=path/to/custom
ark init --password <password> --server-url <server_url>
NOTE: Default data directories:
- POSIX (Linux/BSD):
~/.Ark-cli
- Mac OS:
$HOME/Library/Application Support/Ark-cli
- Windows:
%LOCALAPPDATA%\Ark-cli
- Plan 9:
$home/Ark-cli