-
Notifications
You must be signed in to change notification settings - Fork 2
feat(wasm-utxo): implement key management and signature verification #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Add elliptic curve key pair functionality with ECPair class that wraps the WasmECPair Rust implementation. This provides key generation, import/export functions including WIF format, and supports both private and public keys. Issue: BTC-2786 Co-authored-by: llm-git <llm-git@ttll.de>
Add complete BIP32 implementation with both Rust and TypeScript interfaces. The implementation handles key derivation for both private and public keys, including hardened derivation, path-based derivation, and WIF export. This provides a full replacement for the BIP32 functionality from utxo-lib, with test coverage to ensure API parity. Issue: BTC-2786 Co-authored-by: llm-git <llm-git@ttll.de>
Added a new TypeScript class wrapper for wallet keys that provides a more type-safe and consistent API over the raw WASM bindings. - Created RootWalletKeys class with proper static factory methods - Updated fixedScriptWallet to work with the new RootWalletKeys class - Extended BitGoPsbt.verifySignature to support both BIP32 and ECPair - Improved README.md with detailed architecture patterns documentation - Updated tests to use the new API This implements a clean class wrapper pattern similar to BIP32 and ECPair, maintaining a consistent API style across the library. Issue: BTC-2786 Co-authored-by: llm-git <llm-git@ttll.de>
Reorganize fixedScriptWallet into a proper directory structure with separate files for distinct functionality. Move RootWalletKeys and address functions into their own modules while keeping the same API through the index file. Issue: BTC-2786 Co-authored-by: llm-git <llm-git@ttll.de>
Add support for verifying replay protection signatures using a wallet key directly through the main verifySignature method, rather than requiring the deprecated verifyReplayProtectionSignature method. This adds cleaner support for replay protection verification with the same API as normal signature verification. Issue: BTC-2786 Co-authored-by: llm-git <llm-git@ttll.de>
Add a new utility function `verifyAllInputSignatures` that handles the common pattern of verifying signatures across all inputs in a PSBT. This simplifies the test code by centralizing the verification logic. Issue: BTC-2786 Co-authored-by: llm-git <llm-git@ttll.de>
Add a dedicated ReplayProtection class to handle replay protection inputs in transactions. The implementation supports creating replay protection from public keys, output scripts, or addresses, providing a cleaner API than the previous approach using plain objects. Issue: BTC-2786 Co-authored-by: llm-git <llm-git@ttll.de>
…ctions Update parseTransactionWithWalletKeys and verifyReplayProtectionSignature to use publicKeys instead of outputScripts for replay protection validation. This provides a cleaner API and better aligns with the key-based security model. Issue: BTC-2786 Co-authored-by: llm-git <llm-git@ttll.de>
4288062 to
483cccb
Compare
Remove WASM-specific test code and the helper module that is no longer needed after implementing wallet keys functionality in Rust rather than JavaScript/TypeScript. Issue: BTC-2786 Co-authored-by: llm-git <llm-git@ttll.de>
lcovar
approved these changes
Nov 26, 2025
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.
This PR implements comprehensive key management functionality and signature
verification improvements for the WASM UTXO library:
These changes provide a complete key management system with proper TypeScript
interfaces, consistent API patterns, and improved signature verification
capabilities.
Issue: BTC-2786