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

Potential feature request #33

Open
rajarshimaitra opened this issue Oct 21, 2022 · 0 comments
Open

Potential feature request #33

rajarshimaitra opened this issue Oct 21, 2022 · 0 comments

Comments

@rajarshimaitra
Copy link

rajarshimaitra commented Oct 21, 2022

First of all, thank you for writing such an woke af miniscript abstraction.. I personally feel this unlocks some very useful abstraction layer to play around with complex bitcoin scripts without needing to understand any underlying details of policy/minscript/descriptor or even raw bitcoin scripts..

With tools like https://github.com/bitcoindevkit/bdk-cli, which is a very simple yet powerful wrapper, to wrap over any complex miniscript and create a functioning wallet + bitcoin regtest node framework around it, this now allows us to very quickly try out complex miniscripts and play the transaction scenarios.

The general workflow of this play will look like this

  • write your woke script at https://min.sc/
  • copy the compiled descriptor in a bdk-cli app. You can have multiple bdk-cli app with different (Xprv/Xpub) combination of the same miniscript structure to represent different parties (the wallets technically) of the contract situation.
  • Fund the wallet -> Create transaction -> Partially sign PSBTS -> Pass PSBTs around and collect required party signature -< Broadcast to the network -> fast forward blocks -> watch the result in wallet balance (or run all kind of checks around your wallet DB if you are too serious about your scripts). This entire process if framed around bdk-cli, to make it a one step tool to make miniscripts real playable concepts..

We are planning to use min.sc to create a set of tutorials using bdk-cli, but if few extra niceties could be added (at least in the web UI) that would be awesome.. We can of course copy the descriptor string and do the surgery ourselves, but would be nice to have them built in..

  • Create descriptor with configurable script_pubkey type.. Basically a drop down allowing me to select the top level of the descriptor string. wpkh, wsh, p2pkh etc.. (having tr descriptors would be stoke af, but I think that might require more complex changes and can be done later)

  • Create descriptors with Xpubs/Xprvs instead of concrete public keys.. The keys could be random, doesn't matter.. But having derivable keys is important to simulate real world like situations.. Even better, a drop down in the UI for allowing to select specific type for specific key parties involved.. This allows to quickly create different version of the same policy for wallets of different parties.. And no other information is required for bdk-cli to derive how it can sign for stuffs.. If there's an Xpriv at specific location, bdk-cli will know that it can only sign for those pubkeys.

I am open to helping out in the tooling required for this work.. I am one of the maintainers of bdk-cli and I think there's a very clear potential overlap between the objective of these two tools.. One complements the other..

bdk-cli almost does something very similar to minsc but using some graphical UI framework and not at all as elaborate in its grammar as minsc.. Here's the playground for it.. And it uses bdk-cli the lib in the background to do this.. You can also check the drop downs there that I am talking about, allowing to configure both descriptors and individual key types..

Thanking you again for this nice piece of rust love..

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