Skip to content

Add miniscript script cmd#56

Closed
louisinger wants to merge 3 commits intostevenroose:masterfrom
louisinger:miniscript-script-cmd
Closed

Add miniscript script cmd#56
louisinger wants to merge 3 commits intostevenroose:masterfrom
louisinger:miniscript-script-cmd

Conversation

@louisinger
Copy link
Contributor

This PR adds a new miniscript subcommand. script lets to convert a miniscript policy into bitcoin script.

for instance:

> hal miniscript script "and(pk(025625f41e4a065efc06d5019cbbd56fe8c07595af1231e7cbc03fafb87ebb71ec),pk(025625f41e4a065efc06d5019cbbd56fe8c07595af1231e7cbc03fafb87ebb71ec))"

{
  "hex": "205625f41e4a065efc06d5019cbbd56fe8c07595af1231e7cbc03fafb87ebb71ecad205625f41e4a065efc06d5019cbbd56fe8c07595af1231e7cbc03fafb87ebb71ecac",
  "asm": "Script(OP_PUSHBYTES_32 5625f41e4a065efc06d5019cbbd56fe8c07595af1231e7cbc03fafb87ebb71ec OP_CHECKSIGVERIFY OP_PUSHBYTES_32 5625f41e4a065efc06d5019cbbd56fe8c07595af1231e7cbc03fafb87ebb71ec OP_CHECKSIG)"
}

@stevenroose
Copy link
Owner

Hmm, I like this. Can you rename the command to compile? I think it's more clear for what it's doing, the word "script" is already overloaded enough with the while miniscript/tapscript/bitcoin script etc usage 😅

@louisinger
Copy link
Contributor Author

done @stevenroose

@stevenroose
Copy link
Owner

I took the liberty to rebase this on master (I changed all the deps in quite a hard breaking way) and then push to master :)

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

Successfully merging this pull request may close these issues.

2 participants