Open wthrajat opened 1 month ago
I'' take this up
signers: HashMap<KeychainKind, Arc<SignersContainer>>
KeychainKind
(e.g., External, Internal, Coinswap) will have its own SignersContainer
.SignersContainer::build
Descriptor<DescriptorPublicKey>
and its corresponding KeyMap
.BTreeMap<DescriptorPublicKey, DescriptorSecretKey>
.KeyMap
for each descriptor of a KeychainKind
to create a SignersContainer
.Descriptor<DescriptorPublicKey>::parse_descriptor
KeyMap
.KeyMap
in BDK.Non-Extended Descriptors (e.g., Coinswap):
These descriptors have no wildcard.
BDK Definitions:
ExtendedDescriptor
: Alias for extended descriptors.
DerivedDescriptor
: Alias for descriptors without wildcards.
BDK Bias:
Focuses on ExtendedDescriptor
.
Trait IntoWalletDescriptor
converts into an ExtendedDescriptor
and KeyMap
using parse_descriptor
.
In this trait -> there is a corresponding function -> into_wallet_descriptor
which does some checksum
calculation from given descriptor in string format -> then pass it to parse_discriptor
fun.
No equivalent methods & traits for DerivedDescriptor
.
DerivedDescriptor
from a string using parse_descriptor
in BDK.SignersContainer
for coinswap
KeychainKind
.ExtendedDescriptor
Non-ExtendedDescriptor
(Swapcoin)into_wallet_descriptor
.parse_descriptor
to obtain Descriptor<DescriptorPublicKey>
and its KeyMap
.ExtendedDescriptor
and Non-ExtendedDescriptor
ExtendedDescriptor:
Into_Wallet_Descriptor
trait.Non-ExtendedDescriptor:
Into_Wallet_Descriptor
.By following these steps, we can effectively manage both ExtendedDescriptor
and Non-ExtendedDescriptor
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
ACK on all the approaches. Yes, we will need to build whats missing in BDK. Excited to see the product.
Part of #142