Add Bitcoin API support - #9
Draft
benma-agent wants to merge 3 commits into
Draft
Conversation
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
force-pushed
the
benma-agent/add-bitcoin-api
branch
from
August 6, 2026 03:56
bdb6050 to
9039240
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
npm test(281 tests)npm run typechecknpm run lintnpm run build