Skip to content

Commit a433462

Browse files
dantrevinoclaude
andcommitted
fix(loop-starter-kit): add btcAddress to BIP-322 curl examples
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>
1 parent 10dbd43 commit a433462

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

.claude/skills/loop-start/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ Register:
350350
```bash
351351
RESPONSE=$(curl -s -w "\n%{http_code}" -X POST https://aibtc.com/api/register \
352352
-H "Content-Type: application/json" \
353-
-d '{"bitcoinSignature":"<btc_sig>","stacksSignature":"<stx_sig>"}')
353+
-d '{"btcAddress":"<btc_address>","bitcoinSignature":"<btc_sig>","stacksSignature":"<stx_sig>"}')
354354
HTTP_CODE=$(echo "$RESPONSE" | tail -1)
355355
BODY=$(echo "$RESPONSE" | head -1)
356356
if [ "$HTTP_CODE" != "200" ] && [ "$HTTP_CODE" != "201" ]; then
@@ -414,7 +414,7 @@ POST:
414414
```bash
415415
HB_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST https://aibtc.com/api/heartbeat \
416416
-H "Content-Type: application/json" \
417-
-d '{"signature":"<base64_sig>","timestamp":"<timestamp>"}')
417+
-d '{"btcAddress":"<btc_address>","signature":"<base64_sig>","timestamp":"<timestamp>"}')
418418
HB_CODE=$(echo "$HB_RESPONSE" | tail -1)
419419
HB_BODY=$(echo "$HB_RESPONSE" | head -1)
420420
if [ "$HB_CODE" != "200" ] && [ "$HB_CODE" != "201" ]; then

SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ Register:
350350
```bash
351351
RESPONSE=$(curl -s -w "\n%{http_code}" -X POST https://aibtc.com/api/register \
352352
-H "Content-Type: application/json" \
353-
-d '{"bitcoinSignature":"<btc_sig>","stacksSignature":"<stx_sig>"}')
353+
-d '{"btcAddress":"<btc_address>","bitcoinSignature":"<btc_sig>","stacksSignature":"<stx_sig>"}')
354354
HTTP_CODE=$(echo "$RESPONSE" | tail -1)
355355
BODY=$(echo "$RESPONSE" | head -1)
356356
if [ "$HTTP_CODE" != "200" ] && [ "$HTTP_CODE" != "201" ]; then
@@ -414,7 +414,7 @@ POST:
414414
```bash
415415
HB_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST https://aibtc.com/api/heartbeat \
416416
-H "Content-Type: application/json" \
417-
-d '{"signature":"<base64_sig>","timestamp":"<timestamp>"}')
417+
-d '{"btcAddress":"<btc_address>","signature":"<base64_sig>","timestamp":"<timestamp>"}')
418418
HB_CODE=$(echo "$HB_RESPONSE" | tail -1)
419419
HB_BODY=$(echo "$HB_RESPONSE" | head -1)
420420
if [ "$HB_CODE" != "200" ] && [ "$HB_CODE" != "201" ]; then

daemon/loop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Unlock wallet if STATE.md says locked. Load MCP tools if not present.
2222
## Phase 1: Heartbeat
2323

2424
Sign `"AIBTC Check-In | {timestamp}"` (fresh UTC .000Z).
25-
POST to `https://aibtc.com/api/heartbeat` with `{signature, timestamp}`.
25+
POST to `https://aibtc.com/api/heartbeat` with `{btcAddress, signature, timestamp}`.
2626
Use curl, NOT execute_x402_endpoint.
2727

2828
**Reads: nothing.** Addresses are in context from CLAUDE.md.

0 commit comments

Comments
 (0)