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

Enhance UtxoSelectionStrategy for HDWallet (WIP) #487

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

satran004
Copy link
Member

@satran004 satran004 commented Jan 16, 2025

API Changes / Enhancements:

  • Address:
    A new constructor to set the derivation path for the address. It's an optional property and is useful for HD Wallet implementation.

  • UtxoSupplier:
    A new method isUsedAddress(address) which returns whether the address has been used in at least one transaction. This is required to scan used addresses in HD wallet implementation.

  • UtxoSelectionStrategy:
    A new selectUtxos() method which takes an AddressIterator instead of a single address. For HD Wallets, there is an HDWalletAddressIterator which provides addresses at different indexes.

Other changes and refactoring have been made to include the above modifications.

Known Limitation:
The Wallet interface works with all non-script transactions. For ScriptTx, a few additional changes are required to handle cases when the wallet is used as a fee payer or collateral payer wallet. These will be addressed in another PR.

@satran004 satran004 marked this pull request as draft January 16, 2025 04:28
@satran004 satran004 changed the title Enhance UtxoSelectionStrategy for HDWallet Enhance UtxoSelectionStrategy for HDWallet (WIP) Jan 16, 2025
@satran004 satran004 marked this pull request as ready for review January 30, 2025 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant