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

Create descriptors for standard wallet types(bip44/49/84) #32

Open
BitcoinZavior opened this issue Oct 20, 2022 · 1 comment
Open

Create descriptors for standard wallet types(bip44/49/84) #32

BitcoinZavior opened this issue Oct 20, 2022 · 1 comment

Comments

@BitcoinZavior
Copy link
Contributor

Currently, CreateDescriptors creates descriptors based on the path and script type specified by the user.
This is probably not as useful as having the ability to create a descriptor based on a standard BIP.
Because it assumes that the user knows the path and script type for a specific wallet type.

It will be more useful to have the ability to create descriptors for standard wallet types(bip44/49/84) based on BDK templates already available:

https://docs.rs/bdk/latest/bdk/descriptor/template/index.html

Templates currently available:

Bip44 BIP44 template. Expands to pkh(key/44'/{0,1}'/0'/{0,1}/)
Bip44Public BIP44 public template. Expands to pkh(key/{0,1}/
)
Bip49 BIP49 template. Expands to sh(wpkh(key/49'/{0,1}'/0'/{0,1}/))
Bip49Public BIP49 public template. Expands to sh(wpkh(key/{0,1}/
))
Bip84 BIP84 template. Expands to wpkh(key/84'/{0,1}'/0'/{0,1}/)
Bip84Public BIP84 public template. Expands to wpkh(key/{0,1}/
)
P2Pkh P2PKH template. Expands to a descriptor pkh(key)
P2Wpkh P2WPKH template. Expands to a descriptor wpkh(key)
P2Wpkh_P2Sh P2WPKH-P2SH template. Expands to a descriptor sh(wpkh(key))

Reference for descriptors: https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md

@BitcoinZavior
Copy link
Contributor Author

Will be implemented once api is added to bdk-ffi bitcoindevkit/bdk-ffi#165

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

No branches or pull requests

1 participant