bsv-wallet-cli: Instructions file for Claude Code

CLAUDE.md

bsv-wallet-cli CLAUDE.md is an instructions file for Claude Code from Calhooon/bsv-wallet-cli. It costs 3,271 tokens per session, scanned A, original, MIT.

Project-specific instructions for bsv-wallet-cli, a Rust program that works as both a command-line cryptocurrency wallet and an HTTP server.

In plain words
What is it for?
They are used when developing, building, or reviewing the wallet, its SQLite storage, or its 28 wallet API endpoints.
Why use it?
They explain its architecture and compatibility requirements so changes do not break its wallet commands or server interface.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is Calhooon/bsv-wallet-cli's own configuration. It tells Claude Code how to work on bsv-wallet-cli itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything bsv-wallet-cli configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is cd e2e-funder && ../target/release/bsv-wallet init.

Reuse

Borrowing it

Nothing to install: this file belongs to Calhooon/bsv-wallet-cli. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Calhooon/bsv-wallet-cli/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/Calhooon/bsv-wallet-cli

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bsv-wallet-cli CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/calhooon/bsv-wallet-cli/claude-md/github.svg)](https://agentmods.dev/instructions/calhooon/bsv-wallet-cli/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/calhooon/bsv-wallet-cli/claude-md"><img src="https://agentmods.dev/badge/instructions/calhooon/bsv-wallet-cli/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bsv-wallet-cli CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/calhooon/bsv-wallet-cli/claude-md"><img src="https://agentmods.dev/badge/instructions/calhooon/bsv-wallet-cli/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,271 This file is loaded in full into every session.
When invoked 3,271 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.03271 $0.03271
Opus 5.5 $0.01308 $0.01308
Sonnet 5.5 $0.00654 $0.00654
Haiku 4.5 $0.00327 $0.00327

Measured 8d ago against content hash 04588d4a8b9a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bsv-wallet-cli CLAUDE.md 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 8d 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.

CLAUDE.md · 127 lines

How it starts

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

bsv-wallet-cli

Single Rust binary providing both a CLI wallet and an HTTP server that implements all 28 BRC WalletInterface endpoints, wire-compatible with the MetaNet Client.

Architecture

The binary has two modes: CLI commands for interactive wallet use, and an HTTP server (port 3322) that is wire-compatible with MetaNet Client.

src/
  main.rs          — CLI entrypoint, routes clap subcommands
  context.rs       — WalletContext: loads ROOT_KEY, opens SQLite, configures services
  cli.rs           — Clap argument definitions
  commands/        — One file per CLI command (init, send, daemon, serve, split, etc.)
  server/
    mod.rs         — Axum router setup, CORS, auth middleware, SpendingLock
    handlers.rs    — All 28 endpoint handlers, each translating MetaNet JSON ↔ SDK types
    types.rs       — MetaNet Client JSON request/response structs (the translation layer)

Dependency chain: bsv-wallet-cli → bsv-wallet-toolbox-rs (wallet engine, SQLite storage, signing, broadcasting) → bsv-rs (WalletInterface trait, crypto primitives). Both are published on crates.io.

Conventions

  • MetaNet Client wire compatibility is the top constraint. The HTTP server must produce identical JSON to the MetaNet Client so existing tools (x402 skill, BRC-31 auth) work without modification.
  • Translation layer (server/types.rs): MetaNet Client uses different JSON shapes than the Rust SDK. Key differences:
    • protocolID: mixed array [2, "name"] vs SDK's Protocol { security_level, protocol_name }
    • counterparty: hex string vs Counterparty::Other(PublicKey)
    • Binary data (tx, signature): JSON number arrays [0,1,2,...] vs hex strings
    • Field names: MetaNet Client uses protocolID / keyID (capital D). Use #[serde(alias = "protocolID")] since rename_all = "camelCase" produces lowercase d.
  • SpendingLock: A FIFO mutex serializes createAction calls. With limited UTXOs, concurrent spending races on SQLite's write lock. Non-spending endpoints (crypto, queries) run fully concurrent.
  • Daemon vs Serve: daemon = Monitor (background sync tasks) + HTTP server. serve = HTTP server only (dev mode, no background sync).
  • The explorer ladder (0.17.0, #50; the owner's word of 2026-10-22): each chain scanner has its own rate limits, so when one fails we go to the next. Every chain question that leaves the wallet asks WhatsOnChain, BananaBlocks and Bitails as each other's fallbacks: the toolbox's ladders (=0.13.1: get_raw_tx, get_merkle_path, get_utxo_status, get_status_for_txids, is_utxo; is_utxo_with_spender for the spend probe (0.18.2, #196: one ladder pass per outpoint, four explorer requests in the bound-spender witness with or without the header service, plus a proof and header when needed; without the header service this is four rather than 0.13.0's two. Bytes alone name the bound spender unconfirmed; an unreadable or unbound name is (Unknown, None), never unspent, toolbox #96); get_utxo_leads for sync's discovery, where one explorer's list is a lead and each lead is verified before it is received) and the CLI's own rungs in src/explorers.rs (receive's couriers: WoC /beef, then BananaBlocks /hex with the services' checked proof, then get_beef) and broadcast_verify's chain indexes (WoC, Bitails, BananaBlocks). A fault (a 429, a timeout, a 5xx, a malformed body, bytes that do not hash to the txid) is "could not look": it moves to the next rung at once and is never "unspent" or "absent". A negative needs a second provider's clean answer (BananaBlocks' 404 is a gap, never a vote). No rung sleeps on a 429: the rung is skipped without a request until its Retry-After passes (the toolbox's RateGate). Every explorer call logs explorer_call at info with provider, call, status, ms. The spend gate and the tracker read the wallet's own proof records, never an explorer. The broadcaster is not an explorer rung: postBeef's ladder in Arcade mode is ArcadeV2, TaalArcBeef (the toolbox's, unauthenticated, until toolbox #317), Bitails, WhatsOnChain, all four in that order (#300); GorillaPool's ARC is never a rung.

Read the full file on GitHub · 127 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. 8d ago Changed · +1 lines · +336 tokens per session 04588d4a8b9a
  2. 10d ago Changed · +214 tokens per session ef94ad76644c
  3. 11d ago Changed · +56 tokens per session f83d86e481a8
  4. 14d ago Changed · +2 lines · +303 tokens per session 0d4849b7287b
  5. 15d ago Changed · +4 lines · +697 tokens per session f379e3d7261e
  6. 20d ago Changed · +60 tokens per session 449fbf209e9e
  7. 29d ago Changed · +26 tokens per session 9c7f32cf7a65
  8. 2mo ago First seen · 120 lines · 1,579 tokens per session scan A 8c6e5fa4287d

Subscribe to this mod's changes

bsv-wallet-cli CLAUDE.md is an instructions file published in the GitHub repository Calhooon/bsv-wallet-cli (13 stars, last pushed 2d ago), licensed MIT. It adds 3,271 tokens to every session, about $0.0131 per session on Opus 5.5. 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.

Related

bsv-wallet-cli CLAUDE.md compared with instructions from other repositories

bsv-wallet-cli CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
bsv-wallet-cli CLAUDE.mdCalhooon/bsv-wallet-cliInstructions file132d agoMITA3,271Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode