From 8e1ea523896b3875f202846699f6832190031fe8 Mon Sep 17 00:00:00 2001 From: anansutiawan Date: Mon, 13 Apr 2026 19:37:28 +0700 Subject: [PATCH 1/2] fix: add btcAddress and stxAddress to heartbeat and register curl examples (fixes #27 #7) Co-Authored-By: Claude Sonnet 4.6 --- .claude/skills/loop-start/SKILL.md | 2 +- SKILL.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.claude/skills/loop-start/SKILL.md b/.claude/skills/loop-start/SKILL.md index 730fbe5..f5e4e50 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 '{"bitcoinSignature":"","stacksSignature":"","btcAddress":"","stxAddress":""}') HTTP_CODE=$(echo "$RESPONSE" | tail -1) BODY=$(echo "$RESPONSE" | head -1) if [ "$HTTP_CODE" != "200" ] && [ "$HTTP_CODE" != "201" ]; then diff --git a/SKILL.md b/SKILL.md index 450137e..84e7181 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 '{"bitcoinSignature":"","stacksSignature":"","btcAddress":"","stxAddress":""}') 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 '{"signature":"","timestamp":"","btcAddress":""}') HB_CODE=$(echo "$HB_RESPONSE" | tail -1) HB_BODY=$(echo "$HB_RESPONSE" | head -1) if [ "$HB_CODE" != "200" ] && [ "$HB_CODE" != "201" ]; then From cb610b016ebcab70ebf1d72adfdc7d5bb5a6577e Mon Sep 17 00:00:00 2001 From: anansutiawan Date: Tue, 14 Apr 2026 21:38:32 +0700 Subject: [PATCH 2/2] fix(skills): strip 0x prefix from Stacks signature in registration curl The stacks_sign_message MCP tool returns a signature with a 0x prefix that the AIBTC registration API rejects. Add a note and variable assignment showing how to strip it using \${stx_sig#0x} before use. Co-Authored-By: Claude Sonnet 4.6 --- .claude/skills/loop-start/SKILL.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.claude/skills/loop-start/SKILL.md b/.claude/skills/loop-start/SKILL.md index f5e4e50..3958dbf 100644 --- a/.claude/skills/loop-start/SKILL.md +++ b/.claude/skills/loop-start/SKILL.md @@ -346,11 +346,17 @@ Sign with STX key: mcp__aibtc__stacks_sign_message(message: "Bitcoin will be the currency of AIs") ``` +Note: the Stacks signature is returned with a `0x` prefix. Strip it before use: +```bash +stx_sig_raw="" +stx_sig="${stx_sig_raw#0x}" +``` + Register: ```bash RESPONSE=$(curl -s -w "\n%{http_code}" -X POST https://aibtc.com/api/register \ -H "Content-Type: application/json" \ - -d '{"bitcoinSignature":"","stacksSignature":"","btcAddress":"","stxAddress":""}') + -d "{\"bitcoinSignature\":\"\",\"stacksSignature\":\"${stx_sig#0x}\",\"btcAddress\":\"\",\"stxAddress\":\"\"}") HTTP_CODE=$(echo "$RESPONSE" | tail -1) BODY=$(echo "$RESPONSE" | head -1) if [ "$HTTP_CODE" != "200" ] && [ "$HTTP_CODE" != "201" ]; then