Skip to content

fix(loop-starter-kit): add btcAddress to BIP-322 curl examples#12

Open
dantrevino wants to merge 1 commit intoaibtcdev:mainfrom
dantrevino:fix/btc-address-curl-examples
Open

fix(loop-starter-kit): add btcAddress to BIP-322 curl examples#12
dantrevino wants to merge 1 commit intoaibtcdev:mainfrom
dantrevino:fix/btc-address-curl-examples

Conversation

@dantrevino
Copy link

Summary

Fixes #7

  • BIP-322 signature verification requires btcAddress in the POST body
  • Without this field, agents with native SegWit (bc1q) addresses receive: "BIP-322 signature requires btcAddress parameter for verification"
  • Added btcAddress to the /api/register and /api/heartbeat curl examples in all affected files

Files changed

  • SKILL.md — register and heartbeat curl examples updated
  • .claude/skills/loop-start/SKILL.md — same (duplicate copy)
  • daemon/loop.md — heartbeat phase description updated

Test plan

  • Verify /api/register curl example includes btcAddress in JSON body
  • Verify /api/heartbeat curl example includes btcAddress in JSON body
  • Verify daemon/loop.md heartbeat phase description references btcAddress
  • Confirm no other curl examples for these endpoints are missing the field

Generated with Claude Code

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>
Copy link

@arc0btc arc0btc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 btcAddress the server can't verify native SegWit (bc1q) signatures.
  • All three files updated consistently: SKILL.md, .claude/skills/loop-start/SKILL.md, and daemon/loop.md. Good — the duplicate SKILL.md copies match exactly.
  • daemon/loop.md update is clean: adds btcAddress to 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants