Skip to content
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

Provide HD Wallet implementation #213

Closed
satran004 opened this issue Jan 26, 2023 · 0 comments · Fixed by #363
Closed

Provide HD Wallet implementation #213

satran004 opened this issue Jan 26, 2023 · 0 comments · Fixed by #363
Assignees
Labels
enhancement New feature or request

Comments

@satran004
Copy link
Member

satran004 commented Jan 26, 2023

Currently CCL has implementation for CIP 1852 which can be used to derive pub/priv key pairs and addresses at different derivation paths. This can be used in an application to provide HD wallet functionalities. For example, generate addresses at different indexes and find used/unused addresses, utxos from blockchain.

But instead of each application trying to implement their own HD wallet, CCL can provide a basic implementation of HD wallet and provide high level apis.

A java application should be able to use these apis to get list of utxos for an account by scanning addresses at different indexes and also required signers.

This should be developed as a separate optional module.

Notes about BIP-44 and address discovery https://input-output-hk.github.io/cardano-wallet/design/Notes-about-BIP-44

@satran004 satran004 added the enhancement New feature or request label Jan 26, 2023
@Kammerlo Kammerlo self-assigned this Jan 15, 2024
Kammerlo added a commit that referenced this issue Jan 18, 2024
…m Wallet.java

Need to rework signing to get addresses.
Kammerlo added a commit that referenced this issue Jan 22, 2024
Thus removing the unneeded utxosupplier value in Wallet.
@Kammerlo Kammerlo linked a pull request Jan 22, 2024 that will close this issue
satran004 added a commit that referenced this issue Nov 25, 2024
* #213 rough sketch of needed functionality as a discussion basis

* still work in progress

* basic transaction working now. Still need to refactor a lot! But first good step.

* #213 added WalletUtxoSupplier and removed getUtxo functionalities from Wallet.java
Need to rework signing to get addresses.

* #213 added stakekey registrations and address caching to wallet

* #213 added Tests, WalletUtxoSupplier interface and DefaultWalletUtxoSupplier.java

* #213 implemented signing with wallet. A UTXOSupplier will be passed.
Thus removing the unneeded utxosupplier value in Wallet.

* Refactor Tx sender wallet handling and clean up AbstractTx.

Changed the sender wallet handling to return null instead of throwing an exception in Tx.java to allow flexibility in error management. Also, removed redundant 'amounts' field and its initialization from AbstractTx.java for a cleaner codebase.

* Refactor TxBuilderContext and QuickTxBuilder

Move the transaction building logic into a dedicated private method in `TxBuilderContext`. Refactor `QuickTxBuilder` to use the new build method and streamline the signing process, eliminating redundant code and improving code readability.

* Refactor TxSigner to include TxBuilderContext

* Normalize mnemonic phrase whitespaces

* Update logging dependency to reload4j in build.gradle

* Refactor: Change MnemonicUtil import path

* Refactor Wallet signing and UTXO handling

* Refactor Wallet class and update related tests

Refactor Wallet methods and variables for better naming consistency. Remove unused methods and annotations. Add new test for scanning specific indexes in DefaultWalletUtxoSupplier. Update existing tests to align with the refactored method names and structures.

* fix: changes to fix SonarQube errors

---------

Co-authored-by: Satya <satran004@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants