Skip to main content

Frequently Asked Questions

General

Bark is an implementation of the Ark protocol on Bitcoin, led by Second. The Ark protocol is a Bitcoin layer 2 for making fast, low-cost, self-custodial payments at scale. Ark uses a client-server model to enable users to transact off-chain while still being able to “exit” their balances on-chain at any time.The project consists of:
  • The Ark wallet: bark
  • The Ark server: captaind
  • A set of libraries containing all protocol primitives
No. Bark is experimental software. Using it with real bitcoin is reckless and can result in loss of funds.
  • Updating bark or captaind may corrupt your wallet - we prioritize development velocity over backward compatibility
  • Known bugs and vulnerabilities can still lead to loss of funds
Bark is currently in beta and should only be used on signet or testnet for testing purposes.
For bark (client wallet):
  • Any modern operating system (Linux, macOS, Windows)
  • Minimal disk space for wallet data
  • Internet connection to communicate with Ark server
For captaind (Ark server):
  • Linux server (Ubuntu/Debian recommended)
  • PostgreSQL database
  • Bitcoin Core node (bitcoind)
  • Core Lightning node with hold plugin
  • At least 4GB RAM recommended
  • SSD storage for database and blockchain data
Ark and Lightning are complementary scaling solutions:Ark advantages:
  • No channels to open or manage
  • No liquidity requirements
  • Simpler onboarding experience
  • Client-server architecture reduces complexity
  • Universal payments (Ark, Lightning, on-chain) from one balance
Lightning advantages:
  • Fully peer-to-peer (no server dependency)
  • Mature ecosystem with wide adoption
  • Lower fees for frequent small payments
Bark actually integrates with Lightning, allowing you to send and receive Lightning payments from your Ark balance.

Technical

A VTXO (Virtual Transaction Output) is the fundamental unit of ownership in Ark. It represents a user’s balance within the shared UTXO tree structure.VTXOs are created through:
  • Onboarding to the Ark (on-chain deposit)
  • Receiving Ark payments
  • Round participation (refresh/maintenance)
VTXOs can be spent:
  • Cooperatively with the server (instant, off-chain)
  • Unilaterally on-chain (exit without server cooperation)
hArk is an evolution of the Ark protocol that uses CTV (OP_CHECKTEMPLATEVERIFY) and CSFS (OP_CHECKSIGFROMSTACK) to improve efficiency and reduce interactivity.Key features:
  • All leaves have an unlock hash attached
  • Leaf transactions are no longer signed during the interactive process
  • Enables more efficient VTXO trees
For technical details, see Evolving the Ark Protocol Using CTV and CSFS.
Bark uses a unified mailbox system for receiving VTXOs. When someone sends you Ark funds:
  1. Sender posts VTXOs to your mailbox address on the Ark server
  2. You subscribe to your mailbox to receive notifications
  3. You retrieve and validate VTXOs from the mailbox
  4. VTXOs are added to your wallet balance
This provides reliable delivery across different sources (direct sends, Lightning receives, round outputs).
Rounds are periodic on-chain transactions where the Ark server:
  1. Collects user requests (refreshes, maintenance, payments)
  2. Creates a new shared UTXO tree
  3. Distributes VTXOs to participants
Rounds are needed to:
  • Refresh expiring VTXOs (every VTXO has a timeout)
  • Consolidate and optimize the UTXO tree
  • Enable batched payments for better efficiency
Users participate in rounds automatically when needed (e.g., before VTXOs expire).
Most crates do not yet specify a MSRV, but we will commit to one once we make an official release.The ark-lib crate (and by extension the bark-bitcoin-ext crate) have a MSRV of v1.74.0.For development, we recommend using Rust 1.82 or later.

Development

The recommended approach is using the Nix flake:
nix develop
Or with direnv for automatic loading:
echo "use flake" > .envrc
direnv allow
This provides all dependencies including:
  • Rust toolchain
  • just task runner
  • bitcoind and lightningd
  • PostgreSQL tools
See the Contributing Guide for manual setup instructions.
Use the just task runner:
# Run all checks before committing
just checks

# Run unit tests
just unit

# Run integration tests
just int

# Run all tests
just test
Important: Never run integration tests with cargo test directly - they require environment variables set by just.See the Testing Guide for more details.
Key conventions:
  • Tabs for indentation (not spaces)
  • No strict rustfmt - format for readability
  • No blind clippy fixes - they can introduce bugs
  • Follow bitcoin patterns and naming conventions
  • Imports at the top of modules
  • Match surrounding code style
Commit conventions:
  • Prefix commits with subsystem (bark:, server:, lib:, etc.)
  • Write descriptive messages focusing on “why” not “what”
  • Make commits individually compile
  • Squash fixups into original commits
See the Style Guide for complete details.
When adding database migrations:For bark (SQLite):
just dump-bark-sql-schema
For server (PostgreSQL):
just dump-server-sql-schema
For server configuration:
just default-server-config
CI will verify these files match the actual schema.
If you run into any issues:

Usage

Absolutely not. Bark is experimental software and must not be used with real bitcoin on mainnet. You will lose your funds.Use signet or testnet only:
Rust:
  • Native bark CLI wallet
  • bark-wallet library for custom integrations
Other languages:
  • barkd REST API with clients in TypeScript and C# (barkd-clients)
  • uniffi-bindings for native mobile/desktop apps (bark-ffi) - experimental but stabilizing
The REST API and FFI bindings allow integration without writing Rust.
Prerequisites:Build bark CLI:
cargo build --release --manifest-path bark-cli/Cargo.toml
Build captaind server:
cargo build --release --manifest-path server/Cargo.toml
Or use just:
just build
See the Getting Started guide for detailed instructions.
Bark can:
  • Send Lightning invoices (BOLT 11)
  • Send to Lightning offers (BOLT 12)
  • Send to Lightning addresses
  • Receive Lightning payments (generates invoices)
Lightning payments are sent from your Ark balance without needing to manage channels or liquidity.Note: Some features may be temporarily disabled in beta versions - check the changelog for current status.
The Ark protocol code is experimental and must not be used in production.If you find a vulnerability, please file a public issue on GitLab.We do not have a private security disclosure process at this time since the software is not production-ready.

Resources

Bark is released under the CC0 1.0 Universal license, which is essentially public domain.This means you can:
  • Use it for any purpose
  • Modify and distribute it
  • Use it in proprietary software
  • No attribution required (though appreciated)
See the LICENSE file for details.

Build docs developers (and LLMs) love