You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Descriptor type is one of the most complex types coming from BDK/Miniscript, and we expose a simplified version of what's available in Rust, partly because it's a whole lot of generics on top of generics.
I still need to play around with the Rust code to figure out a few things we could add to make the type more powerful in the bindings, but the first thing that I realized only today is that given a descriptor, there is currently not a lot of introspection available into it.
For example, at any point your Descriptor probably came from either the domain layer (you created it yourself from entropy or a recovery phrase) and used our descriptor templates, in which case you know the script type (P2TR, P2WPKH, etc.), or it was given to you by a user in the form of a string. In this case, you can create the descriptor but cannot query it directly for metadata (script type, checksum, etc.). The only way to do this currently is to manually parse the string, but surely we can do better because those methods are available in some form in Rust.
The text was updated successfully, but these errors were encountered:
The
Descriptor
type is one of the most complex types coming from BDK/Miniscript, and we expose a simplified version of what's available in Rust, partly because it's a whole lot of generics on top of generics.I still need to play around with the Rust code to figure out a few things we could add to make the type more powerful in the bindings, but the first thing that I realized only today is that given a descriptor, there is currently not a lot of introspection available into it.
For example, at any point your
Descriptor
probably came from either the domain layer (you created it yourself from entropy or a recovery phrase) and used our descriptor templates, in which case you know the script type (P2TR, P2WPKH, etc.), or it was given to you by a user in the form of a string. In this case, you can create the descriptor but cannot query it directly for metadata (script type, checksum, etc.). The only way to do this currently is to manually parse the string, but surely we can do better because those methods are available in some form in Rust.The text was updated successfully, but these errors were encountered: