-
Notifications
You must be signed in to change notification settings - Fork 4
refactor(key-wallet): improve API with standard FromStr trait and bet… #85
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
refactor(key-wallet): improve API with standard FromStr trait and bet… #85
Conversation
WalkthroughThe changes refactor address parsing and script generation in the Address struct, moving parsing logic into a FromStr trait implementation and introducing a standalone script_pubkey method. Error handling in key derivation is standardized to use Error::Bip32. Minor cleanups and import adjustments are made in example and test files. Changes
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Clippy (1.86.0)warning: profiles for the non root package will be ignored, specify profiles at the workspace root: Caused by: Caused by: Caused by: 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
🧰 Additional context used🧠 Learnings (6)📓 Common learningskey-wallet/tests/mnemonic_tests.rs (2)key-wallet/tests/address_tests.rs (2)key-wallet/examples/basic_usage.rs (1)key-wallet/src/derivation.rs (2)key-wallet/src/address.rs (3)🔇 Additional comments (11)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
a892419 to
908213e
Compare
…ter error handling - Implement standard FromStr trait for Address parsing - Keep explicit to_string() method for backward compatibility - Add from_string() convenience method - Improve error handling by using explicit Error::Bip32 wrapping instead of generic Into - Fix AccountDerivation to derive private keys first, then convert to public - Update tests to import FromStr trait where needed These changes make the key-wallet API more idiomatic while maintaining compatibility.
908213e to
bc14806
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
…ter error handling
These changes make the key-wallet API more idiomatic while maintaining compatibility.
Summary by CodeRabbit
Refactor
Bug Fixes