Skip to content

Conversation

@OttoAllmendinger
Copy link
Contributor

This PR adds several features to the wasm-utxo module to enhance Bitcoin
wallet capabilities:

  • Add Bitcoin message signing utilities (BIP-137)

    • Implements signMessage and verifyMessage functions
    • Follows the BIP-137 standard
    • Works with ECPair keys
  • Add BIP32 improvements

    • Add equals() method for key comparison
    • Add toJSON() for safe serialization
    • Implement custom Node.js inspect representation
    • Add Rust implementation of key equality
  • Add descriptor testing utilities

    • Port test utilities from utxo-core
    • Add fixture handling and serialization helpers
    • Add descriptor template functions
    • Add mock PSBT utilities
  • Add PSBT address resolution

    • New getOutputsWithAddress method
    • Returns outputs with formatted address strings
    • Resolves addresses for specific networks

Issue: BTC-2866

@OttoAllmendinger OttoAllmendinger changed the title feat(wasm-utxo): implement Bitcoin wallet utilities and improvements feat(wasm-utxo): extend descriptor testutils Feb 10, 2026
@OttoAllmendinger OttoAllmendinger force-pushed the BTC-2866.extend-descriptor-tooling branch 5 times, most recently from 045c7b1 to 405e90a Compare February 10, 2026 12:59
OttoAllmendinger and others added 5 commits February 10, 2026 15:07
Implements Bitcoin message signing and verification according to BIP-137
standard. This adds a new `message` module with `signMessage` and
`verifyMessage` functions that work with ECPair keys.

Issue: BTC-2866

Co-authored-by: llm-git <llm-git@ttll.de>
Add methods to properly compare BIP32 keys and safely serialize them:
- `equals()` method for checking key equality without serialization
- `toJSON()` that safely returns xpub even for private keys
- Custom Node.js inspect representation for better debugging
- Rust implementation of key equality comparison

Issue: BTC-2866

Co-authored-by: llm-git <llm-git@ttll.de>
Port test utilities from utxo-core for descriptor wallet testing:
- Add fixture handling and object serialization helpers
- Add descriptor template functions to create common test descriptors
- Add mock PSBT utilities for descriptor wallet testing

Issue: BTC-2866

Co-authored-by: llm-git <llm-git@ttll.de>
Adds a new method to PSBT that returns outputs with resolved address strings
derived from each output script. This allows getting proper addresses
formatted for specific coin networks without needing to call
address.fromOutputScript separately for each output.

Issue: BTC-2866

Co-authored-by: llm-git <llm-git@ttll.de>
Add a new export for testutils in package.json to allow other modules to
import helper functions and test fixtures.

Issue: BTC-2866

Co-authored-by: llm-git <llm-git@ttll.de>
@OttoAllmendinger OttoAllmendinger force-pushed the BTC-2866.extend-descriptor-tooling branch from 405e90a to 7e28567 Compare February 10, 2026 14:07
@OttoAllmendinger OttoAllmendinger marked this pull request as ready for review February 10, 2026 14:23
@OttoAllmendinger OttoAllmendinger requested a review from a team as a code owner February 10, 2026 14:23
@OttoAllmendinger OttoAllmendinger merged commit 91840ce into master Feb 10, 2026
6 checks passed
@OttoAllmendinger OttoAllmendinger deleted the BTC-2866.extend-descriptor-tooling branch February 10, 2026 14:46
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.

2 participants