The bark CLI is a self-custodial wallet for making fast, low-cost payments on Ark. It supports boarding funds, sending to Ark addresses, Lightning invoices, and on-chain addresses.
Installation
See the Installation guide for installation instructions.
Global Options
These options are available for all commands:
Option Description --datadir <PATH>The datadir of the bark wallet (default: ~/.bark) -v, --verboseEnable verbose logging -q, --quietDisable all terminal logging --helpPrint help information --versionPrint version information
Creating a Wallet
Create New Wallet
Create a new bark wallet with configuration:
Signet (default backend)
Mainnet
Regtest
With bitcoind cookie
bark create --signet --ark https://ark.signet.2nd.dev
Options
--mainnet - Use bitcoin mainnet
--signet - Use the official signet network
--regtest - Use regtest network
--mutinynet - Use mutinynet
--force - Force re-create the wallet (any funds will be lost)
--ark <URL> - The address of your Ark server
--esplora <URL> - The address of the Esplora HTTP server
--bitcoind <URL> - The address of the bitcoind RPC server
--bitcoind-cookie <PATH> - Path to the bitcoind RPC cookie file
--bitcoind-user <USER> - The bitcoind RPC username
--bitcoind-pass <PASS> - The bitcoind RPC password
--mnemonic <WORDS> - Recover a wallet with an existing mnemonic
--birthday-height <HEIGHT> - The wallet’s birthday blockheight (required with —mnemonic and —bitcoind)
Recover Wallet from Mnemonic
Recover an existing wallet using your 12-word mnemonic:
bark create --signet \
--ark https://ark.signet.2nd.dev \
--esplora https://esplora.signet.2nd.dev \
--mnemonic "word1 word2 word3 ... word12"
Recovering from mnemonic currently only supports recovering on-chain funds. Off-chain VTXOs cannot be recovered.
View Configuration
Print the configuration of your bark wallet:
Example output:
{
"server_address" : "https://ark.signet.2nd.dev" ,
"esplora_address" : "https://esplora.signet.2nd.dev/" ,
"bitcoind_address" : null ,
"bitcoind_cookiefile" : null ,
"bitcoind_user" : null ,
"bitcoind_pass" : null ,
"vtxo_refresh_expiry_threshold" : 12 ,
"vtxo_exit_margin" : 12 ,
"htlc_recv_claim_delta" : 18 ,
"fallback_fee_rate" : "0.25 sat/vB" ,
"round_tx_required_confirmations" : 1
}
Ark Server Info
Print information about the connected Ark server:
Get Address
Get an Ark address to receive VTXOs:
Get a specific address by index:
Check Balance
Get the wallet balance:
Example output:
{
"offchain" : "250000 sats" ,
"onchain" : "100000 sats" ,
"total" : "350000 sats"
}
Skip syncing before checking balance:
List VTXOs
List the wallet’s VTXOs (Virtual Transaction Outputs):
List all VTXOs regardless of their state:
Skip syncing:
Transaction History
List the wallet’s payment history:
Alias:
Boarding & Offboarding
Board Funds
Board from the on-chain wallet into the Ark:
Specific amount
All funds
Skip sync
Example output:
{
"txid" : "a1b2c3..." ,
"amount" : "100000 sats" ,
"status" : "pending"
}
Offboard Funds
Turn VTXOs into UTXOs (on-chain funds):
All VTXOs
Specific VTXOs
To specific address
Sending Payments
Send to Ark Address
Send an Ark payment to another Ark address:
bark send ark1q... 50000sat
Send to Lightning Invoice
Pay a BOLT11 Lightning invoice:
With amount in invoice
Override amount
Wait for completion
Send to Lightning Address
Pay a Lightning address ([email protected] ):
With comment:
Send to BOLT12 Offer
Pay a BOLT12 offer:
bark send lno1... 30000sat
Send On-Chain
Send from your VTXOs to an on-chain address (requires waiting for a round):
bark send-onchain bc1q... 100000sat
Skip sync:
bark send-onchain bc1q... 100000sat --no-sync
Refresh VTXOs
Refresh expiring VTXOs to extend their lifetime:
Default threshold
Custom block threshold
Custom time threshold
Refresh all
Specific VTXOs
Delegated mode
Counterparty VTXOs
On-Chain Wallet
The built-in on-chain wallet manages bitcoin UTXOs:
On-Chain Balance
Get On-Chain Address
Send On-Chain
bark onchain send bc1q... 50000sat
Send to Multiple Addresses
bark onchain send-many \
--destination bc1pfq...:10000sat \
--destination bc1pke...:20000sat
Immediate send (skip confirmation):
bark onchain send-many \
--destination bc1p...:10000sat \
--immediate
Drain Wallet
Send all on-chain funds to an address:
bark onchain drain bc1q...
List UTXOs
List Transactions
bark onchain transactions
Lightning Commands
Manage Lightning payments:
Pay Invoice
BOLT11 invoice
BOLT12 offer
Lightning address
With comment
Wait for settlement
bark lightning pay lnbc1...
Alias:
Create Invoice
Create a BOLT11 invoice:
bark lightning invoice 50000sat
Wait for payment:
bark lightning invoice 50000sat --wait
With authentication token:
bark lightning invoice 50000sat --token auth_token_here
Check Invoice Status
By payment hash
By invoice
By preimage
bark lightning status payment_hash_here
List Invoices
List all generated invoices:
Claim Payment
Claim the receipt of a Lightning payment:
Specific invoice
By payment hash
All pending
Wait for completion
With token
bark lightning claim lnbc1...
Exit Commands
Perform unilateral exits from the Ark:
Start Exit
Exit all VTXOs
Exit specific VTXOs
Progress Exit
Progress the exit until it completes:
Wait until completion:
bark exit progress --wait
With custom fee rate (in sat/kvB):
bark exit progress --fee-rate 5000
Exit Status
Check the status of an exit:
With detailed history:
bark exit status vtxo_id --history
With transactions:
bark exit status vtxo_id --transactions
List Exits
List all exits (in-progress, completed, and failed):
With history and transactions:
bark exit list --history --transactions
Claim Exited VTXOs
Claim exited VTXOs to an on-chain address:
Claim all
Claim specific VTXOs
bark exit claim bc1q... --all
Round Management
Manage Ark rounds:
Cancel Round
Cancel specific round
Cancel all rounds
bark round cancel --round 123
Progress Rounds
Keep progressing until finished:
bark round progress --continue
Maintenance
Run wallet maintenance tasks:
This includes:
On-chain sync
Off-chain sync
Registering boards with the server
Syncing Lightning VTXOs
Syncing exits
Refreshing soon-to-expire VTXOs
Delegated mode:
bark maintain --delegated
Environment Variables
All global options can be set via environment variables:
Variable Description BARK_DATADIRSet the datadir path BARK_VERBOSEEnable verbose logging BARK_QUIETDisable all terminal logging
Example:
export BARK_DATADIR = "/custom/path"
export BARK_VERBOSE = 1
bark balance
All commands output JSON by default for easy parsing and automation:
bark balance | jq '.total'
Logging
Debug logs are stored in $DATADIR/debug.log.
Enable verbose logging:
Disable all output: