--- name: btc-anchor description: > Anchor a Merkle root (root_hex) to Bitcoin testnet or mainnet using OP_RETURN via bitcoin-cli. Emits PROOF.json + tx metadata with plan/apply/rollback and verification. Consumes merkle-forest ROOT.txt (or explicit ROOT_HEX). Triggers: 'btc anchor', 'anchor root on bitcoin', 'op_return', 'taproot proof', 'bitcoin-cli'. version: 1.0.0 --- # BTC Anchor (OP_RETURN via bitcoin-cli) This skill anchors a **root_hex** on Bitcoin by creating a transaction with an **OP_RETURN** output containing the root bytes. ## Requirements - `bitcoin-cli` connected to a synced node (mainnet/testnet/signet) - Wallet loaded + funded (UTXOs) - Network parameters set (v1 uses `bitcoin-cli -testnet` / `-signet` flags) ## Quick Start ```bash cd ~/.claude/skills/btc-anchor export ROOT_FILE="$HOME/.claude/skills/merkle-forest/outputs/runs//ROOT.txt" export BTC_NETWORK="testnet" # mainnet|testnet|signet export BTC_FEE_RATE="5" # sat/vB (rough) export OP_RETURN_PREFIX="VM" # 2-byte ascii prefix ./scripts/00_preflight.sh ./scripts/10_plan.sh export DRY_RUN=0 ./scripts/11_apply.sh ./scripts/90_verify.sh ./scripts/99_report.sh ``` ## Inputs | Parameter | Required | Default | Description | |---|---:|---|---| | ROOT_FILE | No | (empty) | ROOT.txt path | | ROOT_HEX | No | (empty) | Explicit root hex (overrides ROOT_FILE) | | BTC_NETWORK | No | testnet | mainnet/testnet/signet | | BTC_FEE_RATE | No | 5 | sat/vB (passed to walletcreatefundedpsbt) | | OP_RETURN_PREFIX | No | VM | ASCII prefix (helps identify payloads) | | DRY_RUN | No | 1 | Apply refuses unless DRY_RUN=0 | | REQUIRE_CONFIRM | No | 1 | Require confirmation phrase | | CONFIRM_PHRASE | No | I UNDERSTAND THIS WILL BROADCAST A BITCOIN TX | Safety phrase | ## Outputs `outputs/runs/