-
Notifications
You must be signed in to change notification settings - Fork 3
feat: improvement of key-wallet and creation of key wallet manager #100
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
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdds a new high-level wallet-management crate (key-wallet-manager) and extensive key-wallet refactors (accounts, gap limits, seed, PSBT, BIP38). In dash, replaces actual-serde with serde, adds (de)serialization gates, exposes crypto modules, and adjusts public exports. Workspace and docs updated. Multiple new modules, tests, and example rewrites introduced. Changes
Sequence Diagram(s)sequenceDiagram
participant App
participant WalletManager
participant TransactionBuilder
participant CoinSelector
participant FeeEstimator
participant DashCore as dashcore
App->>WalletManager: send_transaction(wallet_id, acct, recipients, fee_level)
WalletManager->>TransactionBuilder: new(network)
TransactionBuilder->>CoinSelector: select_coins(utxos, target, fee_rate, height)
CoinSelector-->>TransactionBuilder: SelectionResult(selected, fee, change)
TransactionBuilder->>FeeEstimator: estimate_fee_level(fee_level)
FeeEstimator-->>TransactionBuilder: FeeRate
TransactionBuilder->>DashCore: assemble Transaction (inputs/outputs/change)
TransactionBuilder->>DashCore: sign inputs (P2PKH)
DashCore-->>TransactionBuilder: Transaction
TransactionBuilder-->>WalletManager: Transaction
WalletManager-->>App: Transaction
sequenceDiagram
participant App
participant Wallet as key-wallet
participant Builder as DerivationPathBuilder
participant Accounts
App->>Wallet: from_mnemonic(..., network)
Wallet->>Builder: for_network_and_type(network, Standard, 0)
Builder-->>Wallet: DerivationPath
Wallet->>Accounts: add_account(index=0, Standard, network)
Accounts-->>Wallet: Account
Wallet-->>App: Wallet ready
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
🧪 Generate unit tests
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. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
This PR creates the key-wallet manager and separates the logic between the base wallet and the managed wallet manager that reflects the state of transactions and the chain sync.
Summary by CodeRabbit
New Features
Breaking Changes
Documentation
Tests
Chores