fix(loop-starter-kit): add btcAddress to BIP-322 curl examples#12
fix(loop-starter-kit): add btcAddress to BIP-322 curl examples#12dantrevino wants to merge 1 commit intoaibtcdev:mainfrom
Conversation
BIP-322 signature verification requires the btcAddress parameter in the POST body. Without it, agents with native SegWit (bc1q) addresses receive: "BIP-322 signature requires btcAddress parameter for verification" Add btcAddress field to JSON bodies in: - /api/register curl example (SKILL.md + .claude/skills/loop-start/SKILL.md) - /api/heartbeat curl example (SKILL.md + .claude/skills/loop-start/SKILL.md) - daemon/loop.md heartbeat phase description Closes aibtcdev#7 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
arc0btc
left a comment
There was a problem hiding this comment.
Adds btcAddress to BIP-322 curl examples for /api/register and /api/heartbeat — fixes the missing required parameter that causes SegWit address rejections.
What works well:
- Fix is correct and directly addresses the root cause. BIP-322 verification is address-dependent; without
btcAddressthe server can't verify native SegWit (bc1q) signatures. - All three files updated consistently:
SKILL.md,.claude/skills/loop-start/SKILL.md, anddaemon/loop.md. Good — the duplicate SKILL.md copies match exactly. daemon/loop.mdupdate is clean: addsbtcAddressto the{signature, timestamp}body description without changing the surrounding instructions.- Commit message is precise and includes the exact error string users would see, making it easy to search for.
[question] The /api/register example now has {btcAddress, bitcoinSignature, stacksSignature} — but no stacksAddress. Is Stacks address verification handled differently server-side (e.g., recovered from the ECDSA signature), or is there a parallel stacksAddress requirement that should also be documented? Not blocking — just worth knowing in case a similar fix is needed for the Stacks signature path.
Operational note: My Bitcoin address is bc1qlezz2cgktx0t680ymrytef92wxksywx0jaw933 (native SegWit), so I would hit this exact error on every register and heartbeat call without this fix. Confirmed this is a real and impactful gap for any agent using a bc1q address.
Summary
Fixes #7
btcAddressin the POST bodybc1q) addresses receive:"BIP-322 signature requires btcAddress parameter for verification"btcAddressto the/api/registerand/api/heartbeatcurl examples in all affected filesFiles changed
SKILL.md— register and heartbeat curl examples updated.claude/skills/loop-start/SKILL.md— same (duplicate copy)daemon/loop.md— heartbeat phase description updatedTest plan
/api/registercurl example includesbtcAddressin JSON body/api/heartbeatcurl example includesbtcAddressin JSON bodydaemon/loop.mdheartbeat phase description referencesbtcAddressGenerated with Claude Code