Bitcoin Forum
June 13, 2025, 08:12:18 AM *
News: Latest Bitcoin Core release: 29.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Sparrow Wallet descriptor miniscript: time-locked, conditionally multisig wallet  (Read 136 times)
drdeus (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 2


View Profile
May 24, 2025, 06:08:05 AM
Merited by ABCbits (1), dkbit98 (1)
 #1

Hello, I'm looking for help on a project I'm working on. This is my first time posting on the Bitcoin Forum. I'm not sure if it's appropriate to ask for help in this way. I have also posted this on Reddit - but I suspect as this question (to me at least) is somewhat technical, I may get better advice from a more specific (or sophisticated) crowd. 

My intended goal: use Sparrow Wallet and Seedsigner to create a 2-of-2 multi sig wallet that after a certain amount of time becomes a 1-of-2 multi sig wallet, such that either wallet can sign a transaction on its own.

To be clear, my intended policy is:

Both RED key and GREEN key are required to sign a transaction prior to a certain date (in this case July 5th, 2037, which is unix timestamp 2130393600)
AFTER 2130393600 either RED key OR GREEN key can sign a transaction alone

I've used ChatGPT to help me with this. This is the miniscript it came up with:

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 believe the miniscript is correct.

The problem is that I'm not able to get Sparrow Wallet to create the wallet using this miniscript. I'm using Sparrow 2.1.2.

After placing the script in the "Edit wallet output descriptor" and hitting "OK", sparrow wallet seems to accept the script (or at least I get no error messages). However, it does not create the wallet with the intended policy as I've stated above.

The Descriptor on the main settings page reverts to "wsh(sortedmulti(1..." rather than "wsh(thresh(..."

I've spent hours trying to troubleshoot this problem with ChatGPT and have ultimately been unsuccessful. ChatGPT seems to believe if I'm still getting "wsh(sortedmulti(..." that it is a syntax error.

Do you have any advice? Any ideas on solutions? Any help you can provide is very much appreciated!!

This is the link to the reddit post if looking at a few screenshots I've taken for this question are helpful:
https://www.reddit.com/r/Bitcoin/comments/1ku4cmm/help_help_with_sparrow_wallet_descriptor/
nc50lc
Legendary
*
Offline Offline

Activity: 2814
Merit: 7281


Self-proclaimed Genius


View Profile
May 24, 2025, 06:46:16 AM
Merited by ABCbits (1)
 #2

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:

satscraper
Legendary
*
Offline Offline

Activity: 1134
Merit: 1915



View Profile
May 24, 2025, 12:37:44 PM
Last edit: May 24, 2025, 03:31:15 PM by satscraper
Merited by LoyceV (6), ABCbits (5), dkbit98 (2)
 #3


To be clear, my intended policy is:

Both RED key and GREEN key are required to sign a transaction prior to a certain date (in this case July 5th, 2037, which is unix timestamp 2130393600)
AFTER 2130393600 either RED key OR GREEN key can sign a transaction alone


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.

Quote from: satscraper_over_Liana

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.

Quote from: satscraper_over_Liana

▄███████████████████▄
████████████████████████

██████████▀▀▀▀██████████
███████████████▀▀███████
█████████▄▄███▄▄█████
████████▀▀████▀███████
█████████▄▄██▀██████████
████████████▄███████████
██████████████▄█████████
██████████▀▀███▀▀███████
███████████████████████
█████████▄▄████▄▄████████
▀███████████████████▀
.
 BC.GAME 
███████████████
███████████████
███████████████
███████████████
██████▀░▀██████
████▀░░░░░▀████
███░░░░░░░░░███
███▄░░▄░▄░░▄███
█████▀░░░▀█████

███████████████

███████████████

███████████████

███████████████
███████████████
███████████████
███████████████
███████████████
███░░▀░░░▀░░███
███░░▄▄▄░░▄████
███▄▄█▀░░▄█████
█████▀░░▐██████
█████░░░░██████

███████████████

███████████████

███████████████

███████████████
███████████████
███████████████
███████████████
███████████████
██████▀▀░▀▄░███
████▀░░▄░▄░▀███
███▀░░▀▄▀▄░▄███
███▄░░▀░▀░▄████
███░▀▄░▄▄██████

███████████████

███████████████

███████████████

███████████████

DEPOSIT BONUS
.1000%.
GET FREE
...5 BTC...

REFER & EARN
..$1000 + 15%..
COMMISSION


 Play Now 
LoyceV
Legendary
*
Offline Offline

Activity: 3710
Merit: 19086


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
May 25, 2025, 07:03:00 AM
 #4

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.

¡uʍop ǝpᴉsdn pɐǝɥ ɹnoʎ ɥʇᴉʍ ʎuunɟ ʞool no⅄
drdeus (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 2


View Profile
May 27, 2025, 07:46:13 AM
 #5

Yup. Turns out you're correct! Thanks for pushing me in the right direction!!

Sparrow doesn't support miniscript (yet).

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!