Skip to content

Add Bitcoin API support - #9

Draft
benma-agent wants to merge 3 commits into
BitBoxSwiss:masterfrom
benma-agent:benma-agent/add-bitcoin-api
Draft

Add Bitcoin API support#9
benma-agent wants to merge 3 commits into
BitBoxSwiss:masterfrom
benma-agent:benma-agent/add-bitcoin-api

Conversation

@benma-agent

@benma-agent benma-agent commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Move Anti-Klepto helpers into a shared internal module.
  • Add Bitcoin APIs, PSBT signing, sandbox actions, and simulator transaction coverage.
  • Validate compact and recoverable ECDSA signatures, including low-S and recovery IDs 0..3.
  • Bump the unreleased package version to 0.3.0 and update the changelog.

Verification

  • npm test (281 tests)
  • npm run typecheck
  • npm run lint
  • npm run build

Move the protocol helpers into the shared internal module so Bitcoin and
Ethereum can use them without cross-coin imports.
Port the Bitcoin API, PSBT signing flow, and sandbox actions from bitbox-api-rs.

Use bitcoinjs-lib for PSBT parsing, signature checks, and finalization in simulator tests.

Include the upstream transaction vectors across supported firmware versions.

Bump the package version to 0.3.0.
Use shared compact and recoverable ECDSA validators for direct signing
responses and from inside Anti-Klepto verification. Reject invalid
scalars, high-S encodings, and recovery IDs outside the secp256k1
range.

Apply compact validation to Bitcoin transaction signatures and
recoverable validation to Bitcoin message and Ethereum signatures.

Add regression coverage on top of the unreleased 0.3.0 Bitcoin branch.
@benma-agent
benma-agent force-pushed the benma-agent/add-bitcoin-api branch from bdb6050 to 9039240 Compare August 6, 2026 03:56
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.

1 participant