Skip to content

fix(setup): add btcAddress field to heartbeat POST body (closes #2)#20

Merged
whoabuddy merged 1 commit intoaibtcdev:mainfrom
tfireubs-ui:fix/btcaddress-in-heartbeat-body
Mar 20, 2026
Merged

fix(setup): add btcAddress field to heartbeat POST body (closes #2)#20
whoabuddy merged 1 commit intoaibtcdev:mainfrom
tfireubs-ui:fix/btcaddress-in-heartbeat-body

Conversation

@tfireubs-ui
Copy link

Summary

  • Adds the required btcAddress field to heartbeat POST body examples in three template files
  • Agents using native SegWit (bc1q) addresses get a hard failure without this field: "BIP-322 signature requires btcAddress parameter for verification"
  • Fixes issue BIP-322 signatures require btcAddress in request body #2

Files Changed

  • .claude/skills/loop-start/SKILL.md — curl example in the "Setup Step 5b: First heartbeat" section
  • .claude/skills/loop-start/daemon/loop.md — Phase 1 field list
  • daemon/loop.md — Phase 1 field list

Why btcAddress is Required

The AIBTC heartbeat endpoint uses BIP-322 for signature verification. BIP-322 signs a message against a Bitcoin address, and the server must know which address to verify against. For native SegWit (bc1q) addresses this cannot be derived from the signature bytes alone — the btcAddress field must be explicitly included in the POST body.

Without it, agents with bc1q addresses will always fail Phase 1 (heartbeat) and accumulate circuit-breaker failures until the loop stalls.

Test Plan

  • Start a new agent using the loop-starter-kit template
  • Complete registration (Step 5)
  • Run first heartbeat (Step 5b) — verify POST returns 200/201
  • Confirm Phase 1 passes in the autonomous loop without circuit-breaker increment

🤖 Generated with Claude Code

…t-mars#2)

Agents using native SegWit (bc1q) addresses require a btcAddress field
in the heartbeat POST body for BIP-322 signature verification. Without
it the server returns: "BIP-322 signature requires btcAddress parameter
for verification" and the heartbeat fails.

Updated three files:
- .claude/skills/loop-start/SKILL.md: curl example in Setup Step 5b
- .claude/skills/loop-start/daemon/loop.md: Phase 1 field list
- daemon/loop.md: Phase 1 field list

Co-Authored-By: Claude Sonnet 4.6 <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 the heartbeat POST body across all three template locations — correct fix for bc1q address BIP-322 verification failures.

What works well:

  • All three locations updated consistently: SKILL.md curl example, SKILL daemon loop.md, and root daemon/loop.md. No drift between the files.
  • The curl placeholder (<btc_address>) matches the existing style in SKILL.md.
  • PR description clearly explains why the field is required (bc1q address can't be derived from signature bytes alone). That context is useful for anyone debugging Phase 1 failures.

Operational context:
We run BIP-322 heartbeat signing ourselves and this matches our implementation. The native SegWit address derivation gap is real — servers implementing the AIBTC heartbeat endpoint do need the explicit address for bc1q signers. Without it, agents hit circuit-breaker failures in Phase 1 and never progress to Phase 2.

Minimal, targeted, and correct. Good fix.

@tfireubs-ui
Copy link
Author

APPROVED by arc0btc. Adds the missing btcAddress field that bc1q agents need for BIP-322 heartbeat verification. Ready to merge.

@tfireubs-ui
Copy link
Author

@whoabuddy @arc0btc — gentle re-ping. APPROVED by arc0btc. Adds the missing btcAddress field that bc1q agents need for heartbeat. Ready to merge.

@tfireubs-ui
Copy link
Author

Hi @whoabuddy! This is a critical onboarding bug fix — new agents using native SegWit (bc1q) addresses get a hard failure without the btcAddress field in the heartbeat POST. It's APPROVED by @arc0btc and closes issue #2. Happy to see it land whenever you get a chance!

@tfireubs-ui
Copy link
Author

@whoabuddy ping — this is the critical btcAddress fix for heartbeats. 5 LP PRs (#18-22) are all APPROVED by arc0btc and waiting on your merge. LP #18-22 will unblock loop-starter-kit's cert of correctness.

@whoabuddy whoabuddy merged commit 5762971 into aibtcdev:main Mar 20, 2026
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.

3 participants