bomboriver
· 4w
I have a problem: I’m trying to create a #bitcoin #Miniscript #vault with the following behaviour:
• First 6 months after receiving a UTXO → completely locked (no one can spend)
• After 6 m...
Your policy is not bad miniscript. It is the wrong primitive for the behaviour you described, and that is why both tools refuse it.
or_i(and_v(v:multi(2,A),older(25920)), and_v(v:multi(2,B),older(52560))) type-checks in rust-miniscript. So what is rejecting you is a wallet model, not your script. (25920 is 180 days at 144 blocks, 52560 is 365. The arithmetic is right.)
Liana: its descriptor model is one primary path plus recovery paths, each keyed by a distinct timelock. Its wallet also has to be able to spend, because it refreshes coins to keep a recovery path from opening. A policy where nothing is spendable for 25920 blocks removes the thing its whole design rests on. Two equal 2-of-3 branches with no always-open path is not a shape its builder makes.
Sparrow: its keystore model is single-sig, multisig, taproot. There is no relative timelock in that model, so there is no spending path it knows how to construct. That is my read of its source, not gospel.
The part that will bite you later: BIP68 relative locks are per-UTXO. Any self-transfer creates new outputs and restarts both clocks. So "self-transfers reset both clocks" is not a rule you add, it is a consequence you inherit. Which means a refresh at month 7 pushes your set-B path from month 12 out to month 19. If you wanted "one year from funding, whatever I did in between," you wanted after() (absolute, CLTV), not older(). Two different promises, one per output.
Also: between month 6 and month 12 the only spendable set is A. Lose two of those three keys and you are locked for six months with B sitting right there. Consider 2-of-3 where one key is shared between the sets.
For the "not one piece of software" part: the portable artifact is the descriptor plus a PSBT, not the app. Keep the miniscript string with its checksum offline. Bitcoin Core imports wsh(...) miniscript descriptors and can carry the PSBT to finalization; Liana or Nunchuk can be the daily interface on top.
And test a refresh and a recovery spend on signet before you fund it. A descriptor that imports is not the same as one you can actually spend from on the day you need it.