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

SoB/BDKWallet: Explore on BDK signers (make it compatible for Swapcoin kind.) #173

Open
2 tasks
Tracked by #142
wthrajat opened this issue Jun 9, 2024 · 5 comments
Open
2 tasks
Tracked by #142
Assignees
Milestone

Comments

@wthrajat
Copy link
Collaborator

wthrajat commented Jun 9, 2024

Part of #142

  • build create_signers fn
  • build add_signers which will add an external signer to a particular keychain
@15IITian
Copy link

15IITian commented Jun 9, 2024

I'' take this up

@15IITian
Copy link

15IITian commented Jun 9, 2024

Overview

Wallet Struct

  • Required Field:
    • signers: HashMap<KeychainKind, Arc<SignersContainer>>
    • This indicates that each KeychainKind (e.g., External, Internal, Coinswap) will have its own SignersContainer.

SignersContainer Creation

KeyMap Generation

Issue with Non-Extended Descriptors

Conclusion

  • Problem:
    • There is no way to create a DerivedDescriptor from a string using parse_descriptor in BDK.
    • This missing functionality is needed to build SignersContainer for coinswap KeychainKind.

@15IITian
Copy link

15IITian commented Jun 9, 2024

Solution

Handling ExtendedDescriptor

  • No issues: These are well-handled by BDK.

Handling Non-ExtendedDescriptor (Swapcoin)

Proposed Solution:

  1. Create a Function: Develop a function similar to into_wallet_descriptor.
  2. Function Responsibilities:
    • Perform checksum-related checks.
    • Call parse_descriptor to obtain Descriptor<DescriptorPublicKey> and its KeyMap.

Reference:

Difference Between Handling ExtendedDescriptor and Non-ExtendedDescriptor

  • ExtendedDescriptor:

    • Implements the Into_Wallet_Descriptor trait.
  • Non-ExtendedDescriptor:

    • Does not require any traits such as Into_Wallet_Descriptor.

By following these steps, we can effectively manage both ExtendedDescriptor and Non-ExtendedDescriptor

@15IITian
Copy link

15IITian commented Jun 9, 2024

Create a Function: Develop a function similar to into_wallet_descriptor.
Function Responsibilities:
Perform checksum-related checks.
Call parse_descriptor to obtain Descriptor and its KeyMap.

This will also remove the need of using rpc-call to create discriptor from the string

@mojoX911
Copy link

ACK on all the approaches. Yes, we will need to build whats missing in BDK. Excited to see the product.

@mojoX911 mojoX911 added this to the bdk-wallet milestone Jun 27, 2024
@mojoX911 mojoX911 modified the milestones: bdk-wallet, v0.1.0, v0.1.1 Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants