CLAUDE

A project reference for the commands and files in a Bitcoin wallet command-line tool, including setup, sending, funding, balances, addresses, and transaction actions.

In plain words
What is it for?
It helps locate command implementations, understand how the wallet is initialized and served, and work with payments, external funding, UTXO splitting, balances, addresses, identities, and action listings.
Why use it?
It gives developers a quick view of each subcommand’s purpose and function signature without searching through every source file.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/calhooon/bsv-wallet-cli/claude
Clone the repo
git clone --depth 1 https://github.com/Calhooon/bsv-wallet-cli
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,465 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01465
Opus 5 $0.00000 $0.00732
Sonnet 5 $0.00000 $0.00293
Haiku 4.5 $0.00000 $0.00146

Measured 3d ago against content hash eace053d68f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

CLAUDE scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/commands/CLAUDE.md · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.

commands

One file per CLI subcommand, each exposing a single pub async fn run(...). Plus ui.rs, which is a standalone web-based wallet inspector.

Files

File Signature Purpose
init.rs run(db_path, key?) Generate or import root key, create SQLite DB, write .env
daemon.rs run(&Cli) Monitor + Wallet + HTTP server (production mode)
serve.rs run(WalletContext, port) HTTP server only, no monitor (dev mode)
send.rs run(&WalletContext, address, satoshis) P2PKH send, outputs AtomicBEEF hex
fund.rs run(&WalletContext, beef_hex, vout) Internalize external BEEF (faucet/exchange funding)
split.rs run(&WalletContext, count) Split all UTXOs into N equal outputs
balance.rs run(&WalletContext) Sum all spendable sats (paginates through all outputs)
address.rs run(&WalletContext) Derive and display BRC-29 receiving address
identity.rs run(&WalletContext) Show identity key, address, chain
actions.rs run(&WalletContext, label?) List transaction actions, optional label filter
outputs.rs run(&WalletContext, basket?, tag?) List UTXOs, optional basket/tag filters
services.rs run(&Cli) Check chain services health (block height)
compact.rs run(&WalletContext) Debug BEEF compaction on largest stored BEEF blob
ui.rs run(db_path, port) Web-based wallet inspector (standalone Axum server)

Decisions

  • Three initialization patterns: (1) Most commands take &WalletContext. (2) init takes raw db_path + optional key (no context exists yet). (3) daemon, services, and ui take &Cli or raw args because they manage their own storage/services.
  • daemon vs serve: daemon creates its own Arc<Storage> + Arc<Services> for the Monitor (background sync tasks) + Wallet + HTTP server, with a periodic UTXO count check (every 5 min, threshold via MIN_UTXOS env var, default 3). serve takes an owned WalletContext and runs the HTTP server only — no monitor, no UTXO warnings. Use serve for dev, daemon for production.
  • TLS support: Both daemon and serve read TLS_CERT_PATH and TLS_KEY_PATH env vars. If both are set, the server binds with TLS. Otherwise plain HTTP.
  • send output tagging: Send outputs are tagged "relinquish" to mark them as belonging to the recipient, not this wallet. This prevents the wallet from counting sent funds in its own balance. The result also builds AtomicBEEF hex from the returned BEEF for wallet-to-wallet transfers.
  • AUTH_TOKEN env var: Both daemon and serve pass AUTH_TOKEN to ServerConfig. When set, the HTTP server requires bearer auth on all endpoints.
  • JSON output mode: All WalletContext-based commands check ctx.json_output and emit structured JSON when --json is passed. Commands using &Cli check cli.json.
  • ui is a separate web server: It opens its own SQLite connection (read-only queries) and serves an embedded HTML dashboard at a configurable port. It does NOT go through the wallet engine — it queries the database directly via sqlx.

Read the full file on GitHub · 52 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 52 lines · 0 tokens per session scan A eace053d68f2

Subscribe to this mod's changes

CLAUDE is a command published in the GitHub repository Calhooon/bsv-wallet-cli (10 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,465 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.