fix-btc-e2e-p2

fix-btc-e2e-p2 is a command for Claude Code from hiromaily/go-crypto-wallet. It costs 0 tokens per session (564 once invoked), scanned A, original, MIT.

A command guide for fixing a Bitcoin end-to-end test using a single-signature payment pattern. It covers the test script, wallet configuration, commands, and common errors.

In plain words
What is it for?
Use it to debug, reset, run verbosely, or clean up the Bitcoin P2PKH single-signature test.
Why use it?
End-to-end tests exercise a complete flow across multiple components, so failures can be difficult to isolate. The guide provides the exact pattern and checks needed for this case.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to debug, reset, run verbosely, or clean up the Bitcoin P2PKH single-signature test.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/hiromaily/go-crypto-wallet/fix-btc-e2e-p2
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.

Clone the repo
git clone --depth 1 https://github.com/hiromaily/go-crypto-wallet

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 fix-btc-e2e-p2

README.md
[![agentmods](https://agentmods.dev/badge/commands/hiromaily/go-crypto-wallet/fix-btc-e2e-p2/github.svg)](https://agentmods.dev/commands/hiromaily/go-crypto-wallet/fix-btc-e2e-p2)
Your own site
<a href="https://agentmods.dev/commands/hiromaily/go-crypto-wallet/fix-btc-e2e-p2"><img src="https://agentmods.dev/badge/commands/hiromaily/go-crypto-wallet/fix-btc-e2e-p2/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 fix-btc-e2e-p2

Your own site · 80×15
<a href="https://agentmods.dev/commands/hiromaily/go-crypto-wallet/fix-btc-e2e-p2"><img src="https://agentmods.dev/badge/commands/hiromaily/go-crypto-wallet/fix-btc-e2e-p2.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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 564 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00564
Opus 5 $0.00000 $0.00282
Sonnet 5 $0.00000 $0.00113
Haiku 4.5 $0.00000 $0.00056

Measured 10d ago against content hash d80dd5befc4b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

fix-btc-e2e-p2 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 10d 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/commands/e2e/btc/fix-btc-e2e-p2.md · 85 lines

What it actually says

Fix BTC E2E Pattern 2 #{issue_number}

Fix errors in BTC E2E test (Pattern 2: P2PKH 2-of-3 Multisig).

Prerequisites

MUST read: @.claude/rules/btc/e2e-script.md (common rules, errors, debug commands)

Pattern 2 Specifications

Item Value
Pattern 2 - P2PKH 2-of-3 Multisig
address_type legacy
Address Format 2... (regtest P2SH)
Descriptor sh(multi(2,[fp/44'/0'/0']xpub1/0/*,xpub2/0/*,xpub3/0/*))
Signature 2-of-3 (any 2 signatures)
Wallets watch, keygen, sign1, sign2

Execution

# Run E2E test (build is automatic)
make btc-e2e-reset P=2

# Verbose mode
make btc-e2e-verbose P=2

# Cleanup
make btc-e2e-cleanup P=2

Pattern-Specific Files

Type File
Script scripts/operation/btc/e2e/e2e-p2-p2pkh-2of3.sh
Account Config config/wallet/account/account_2of3.yaml

Signing Flow (2-of-3)

Watch (create unsigned tx)
    ↓
Keygen (1st signature)
    ↓
Sign1 (2nd signature) ← Complete here
    ↓
Watch (broadcast)

※ Sign2 not required - 2 signatures satisfy 2-of-3

Pattern-Specific Errors

Descriptor Format Error

Using BIP49 format instead of BIP44.

echo $WALLET_ADDRESS_TYPE  # Should be "legacy"

fullpubkey Import Error

# Check fullpubkey files exist
ls data/fullpubkey/btc/

Insufficient/Too Many Signatures

# Check PSBT signature status
btc_cli "btc-watch" analyzepsbt "${psbt_hex}"

Git Workflow

When {issue_number} is specified:

  • Branch: fix/btc-e2e-p2-{issue_number}
  • Commit: fix(btc): ...
  • Skill: @.claude/skills/git-workflow/SKILL.md
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. 10d ago First seen · 85 lines · 0 tokens per session scan A d80dd5befc4b

Subscribe to this mod's changes

fix-btc-e2e-p2 is a command published in the GitHub repository hiromaily/go-crypto-wallet (127 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 564 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-09-01.