Sparrow Wallet descriptor miniscript for time locks and conditional multisig

4 replies 236 views
Posts: 2 · Reputation: 80
#1Aug 4, 2022, 07:07 AM
Hey everyone, I could really use some help with a project I’m diving into. It’s my first time posting here so I hope this is the right place to ask. I did throw this question on Reddit too, but honestly, I think I might get better insights here since it’s a bit technical. What I’m trying to achieve is setting up a 2-of-2 multisig wallet using Sparrow Wallet and Seedsigner that transitions to a 1-of-2 multisig wallet after a specific date. Basically, I want either key to be able to sign transactions after a certain point in time. Here’s the plan: Before July 5th, 2037 (which is the unix timestamp 2130393600), both the RED and GREEN keys need to sign off on a transaction. After that date, either of the keys can sign alone. I got some help from ChatGPT to generate this miniscript: wsh(thresh(1, and(and(pk([REDfp/48h/0h/0h/2h]xpubRED.../0/*), pk([GREENfp/48h/0h/0h/2h]xpubGREEN/0/*)), after(2130393600)), pk([REDfp/48h/0h/0h/2h]xpubRED.../0/*), pk([GREENfp/48h/0h/0h/2h]xpubGREEN.../0/*))) I think the miniscript looks solid. The hitch is that I can’t seem to get Sparrow Wallet to generate the wallet with this miniscript. I’m using version 2.1.2. After I put the script into "Edit wallet output descriptor" and hit "OK", it seems to accept it since I’m not getting any error messages. But when I check, the wallet doesn’t reflect the policy I laid out above. The main settings page keeps defaulting back to "wsh(sort...".
3 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#2Aug 6, 2022, 11:15 AM
Sparrow doesn't support miniscript (yet). There are a few still-open "Feature Request" issues concerning that but the developers seem to set it to low priority as of now. Links: Add support for miniscript descriptors #1700[FEATURE REQUEST] Time locked Recovery Support  #1296
2 Reply Quote Share
silentchainHero Member
Posts: 473 · Reputation: 2317
#3Aug 6, 2022, 02:18 PM
You might want to consider using Liana wallet, which supports Miniscript and offers various multisig schemes including decaying multisig, which seems to be your primary concern. Below is an example of a setup using three keys, but it can be easily adapted to your RED and Green keys configuration. In my view, the possible setup for you in Liana could look like this: Assign both your RED and Green keys as the primary signers for transactions. From there, you can configure decaying conditions allowing both of you keys to act separately after time delay if the primary 2-of-2 scheme is inactive.
1 Reply Quote Share
humbleledgerLegendary
Posts: 1027 · Reputation: 6554
#4Aug 6, 2022, 05:44 PM
This is the first time I've heard about decaying multisig. It sounds interesting in case you lose access to one of the keys over time, but the same applies to a potential attacker who gained access to that key! It may even increase the risk of a $5 wrench attack.
4 Reply Quote Share
Posts: 2 · Reputation: 80
#5Aug 6, 2022, 07:49 PM
Yup. Turns out you're correct! Thanks for pushing me in the right direction!!
0 Reply Quote Share
?Reply
Sign in to reply to this topic

Related topics