Feature/bip32 key derivation #18
Merged
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.
Pull Request: BIP32 and BIP44 Key Derivation Refinements
Description
This pull request improves the HD wallet key derivation interface by:
Adding a clearer BIP32 derivation path interface
Enhancing error messages for hardened key derivation from xpub
Creating dedicated BIP32 and BIP44 functions with proper naming conventions
Adding comprehensive unit tests for key derivation consistency
Maintaining backward compatibility with deprecated functions
Changes
Added BIP32_DERIVATION_PATH environment variable
Refined error messages for hardened derivation attempts from xpub keys
Implemented dedicated BIP32 derivation functions with clearer interfaces
Added BIP44-specific functions that build on the BIP32 foundation
Created comprehensive tests to ensure derivation consistency across methods
Marked legacy functions as deprecated while maintaining compatibility
Testing
The changes have been tested with:
Unit tests for derivation consistency between BIP32 and BIP44
Tests for proper error handling with invalid inputs
Backward compatibility tests with existing code
These improvements make the HD wallet functionality more robust and user-friendly while maintaining compatibility with existing code that might rely on the previous interface.
Checklist:
CHANGELOG.mdwith my changes