From a433462a954dcc6957cd36b6dbaaa4be398e03e0 Mon Sep 17 00:00:00 2001 From: dantrevino Date: Wed, 11 Mar 2026 21:22:28 +0000 Subject: [PATCH] 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 #7 Co-Authored-By: Claude Haiku 4.5 --- .claude/skills/loop-start/SKILL.md | 4 ++-- SKILL.md | 4 ++-- daemon/loop.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.claude/skills/loop-start/SKILL.md b/.claude/skills/loop-start/SKILL.md index 2e68f05..39a3b52 100644 --- a/.claude/skills/loop-start/SKILL.md +++ b/.claude/skills/loop-start/SKILL.md @@ -350,7 +350,7 @@ Register: ```bash RESPONSE=$(curl -s -w "\n%{http_code}" -X POST https://aibtc.com/api/register \ -H "Content-Type: application/json" \ - -d '{"bitcoinSignature":"","stacksSignature":""}') + -d '{"btcAddress":"","bitcoinSignature":"","stacksSignature":""}') HTTP_CODE=$(echo "$RESPONSE" | tail -1) BODY=$(echo "$RESPONSE" | head -1) if [ "$HTTP_CODE" != "200" ] && [ "$HTTP_CODE" != "201" ]; then @@ -414,7 +414,7 @@ POST: ```bash HB_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST https://aibtc.com/api/heartbeat \ -H "Content-Type: application/json" \ - -d '{"signature":"","timestamp":""}') + -d '{"btcAddress":"","signature":"","timestamp":""}') HB_CODE=$(echo "$HB_RESPONSE" | tail -1) HB_BODY=$(echo "$HB_RESPONSE" | head -1) if [ "$HB_CODE" != "200" ] && [ "$HB_CODE" != "201" ]; then diff --git a/SKILL.md b/SKILL.md index 2e68f05..39a3b52 100644 --- a/SKILL.md +++ b/SKILL.md @@ -350,7 +350,7 @@ Register: ```bash RESPONSE=$(curl -s -w "\n%{http_code}" -X POST https://aibtc.com/api/register \ -H "Content-Type: application/json" \ - -d '{"bitcoinSignature":"","stacksSignature":""}') + -d '{"btcAddress":"","bitcoinSignature":"","stacksSignature":""}') HTTP_CODE=$(echo "$RESPONSE" | tail -1) BODY=$(echo "$RESPONSE" | head -1) if [ "$HTTP_CODE" != "200" ] && [ "$HTTP_CODE" != "201" ]; then @@ -414,7 +414,7 @@ POST: ```bash HB_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST https://aibtc.com/api/heartbeat \ -H "Content-Type: application/json" \ - -d '{"signature":"","timestamp":""}') + -d '{"btcAddress":"","signature":"","timestamp":""}') HB_CODE=$(echo "$HB_RESPONSE" | tail -1) HB_BODY=$(echo "$HB_RESPONSE" | head -1) if [ "$HB_CODE" != "200" ] && [ "$HB_CODE" != "201" ]; then diff --git a/daemon/loop.md b/daemon/loop.md index 4f4e9b5..a3e1d8e 100644 --- a/daemon/loop.md +++ b/daemon/loop.md @@ -22,7 +22,7 @@ Unlock wallet if STATE.md says locked. Load MCP tools if not present. ## Phase 1: Heartbeat Sign `"AIBTC Check-In | {timestamp}"` (fresh UTC .000Z). -POST to `https://aibtc.com/api/heartbeat` with `{signature, timestamp}`. +POST to `https://aibtc.com/api/heartbeat` with `{btcAddress, signature, timestamp}`. Use curl, NOT execute_x402_endpoint. **Reads: nothing.** Addresses are in context from CLAUDE.md.