minsc
minsc copied to clipboard
OP_CTV support
UTXOS.org specifically lists minsc under resources as supporting CTV. I don’t see any mention of this on the website or the repo. I know also that Sapio uses rust-miniscript under the hood, just like this project.
Does this policy language actually support CTV? If so, how can I use it? Also curious if this repo has any relation to Sapio.
Thanks.
Hi there, sorry for the slow reply.
Minsc indeed supports CTV, the website's documentation is outdated and doesn't include quite a few features. The playground on the main website is outdated too, but you can find an updated version at https://min.sc/v0.3/.
The current version of Minsc supports CTV in Script, using the ctv()
and ctvHash()
functions. There are some examples here.
There was also a previous Minsc version that supported CTV in Miniscript too, using Sapio's rust-miniscript fork with support for the txtmpl()
policy. However using two different versions of rust-miniscript
was too cumbersome so currently it is only supported in raw Script.
(If you're interested, the old code for CTV in Miniscript is available in this branch, and there's also an old playground version that supports it at https://min.sc/nextc/. Here are some example of its use: two-step recovery, chicken hodl.)
Also curious if this repo has any relation to Sapio.
No relation, apart from previously using its miniscript library.