-
Notifications
You must be signed in to change notification settings - Fork 45
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 a type safe descriptor builder #165
Comments
Related to #98. |
Yes it's related to the static templates, they both should result in some |
Had a related discussion on Discord There's no BIP yet for multisig templates, but we could create a simple one that takes a given key threshold and array of keys, would also need to a
|
Related link with the types of descriptors other wallets use: https://github.com/nvk/walletsrecovery.org |
This looks great 👍
|
That's a great idea! But let's do it in a separate PR once we have the standard templates working ok? I'll think I'll move the multisig into it's own PR too since it might require more API discussion also. |
Sounds good 👍 |
@notmandatory mind if I take this on? |
Now that I'm looking at the templates from BDK I see they only build for account 0 (if you want/need a different account you must build the descriptor manually). |
Good point, I agree for the initial api let's stick with just what the |
Only here to say that I support this effort of adding 'ready to go' descriptor types. In my own Swift code I only got to describe two so far: public enum DescriptorType {
case singleKey_wpkh84 // Native Segwit
case singleKey_tr86 // Taproot
} You have more detailed knowledge about a wider range of types so I don't have much to add, other than please name them in an approachable and descriptive way. (Or at least add comments in the code). |
This is a good point about the naming. In BDK the templates are named by the bipxx + public added if they are for creating public key watch only descriptors, so that's what I am proposing for bdk-ffi. But we'll certainly need to add docs for anyone who's unfamiliar with the bips. |
As discussed in the team chat with kirillzhukov, the
bdk
lib uses rust macros to provide a type safe way to construct valid descriptors. Since the macro approach won't work forbdk-ffi
language bindings we should try to build a simple library, possibly as a new repo, that uses simple structs and enums to accomplish something similar to thebdk::descriptor::dsl
module.The text was updated successfully, but these errors were encountered: