2

Is there any limitation to how many times the same set of private keys can exist within a multisig wallet? For example, could a 3 of 4 multisig wallet be created with two of the four keys being identical such that that key is always required to sign for a withdrawal along with one of the other two keys?

2 Answers 2

3

Yes, nothing stops you from creating such a wallet. However, there are more efficient ways of encoding your desired policy than a 3-of-4 multisig with one key repeated twice.

If you use the Miniscript policy compiler and input the policy and(pk(A),or(pk(B),pk(C))), you get this script which doesn't repeat any of the keys:

<B> OP_CHECKSIG
OP_NOTIF
  <C> OP_CHECKSIGVERIFY
OP_ENDIF
<A> OP_CHECKSIG
3
  • I tried to create a multisig wallet using the suggested policy in Sparrow wallet but it threw an "invalid output descriptor" error. If I try to create a simple 2 of 4 multisig wallet, it generates the following descriptor: wsh(sortedmulti(2,Keystore1,Keystore2,Keystore3,Keystore4)) This appears to be a different notation. What should the descriptor be in Sparrow wallet for a multisig wallet supporting (A and (B or C)) ? The Sparrow GUI doesn't seem to provide options to create more complex wallets such as this.
    – Guru Josh
    Aug 14, 2023 at 16:09
  • 1
    Hi Josh, if you have another question please use the Ask Question button. Aug 14, 2023 at 18:01
  • I have posted this as a new question: bitcoin.stackexchange.com/questions/119309/…
    – Guru Josh
    Aug 15, 2023 at 13:41
0

Try to test it in Bitcoin Core, better in Regtest:

  • Create a 'blank' 'watching-only' 'descriptor' wallet.
  • Get some public key(s) for testing as well as the corresponding WIF private keys.
  • Create an sh or wsh MultiSig descriptor using multiple public keys, for example (two same pubKeys): sh(sortedmulti(3,pubKey_1,pubKey_1,pubKey_2,pubKey_3))
  • Go to console and type the command getdescriptorinfo "YOUR_DESCRIPTOR" and take note of the "checksum" that you'll need to include to import the descriptor.
  • Import it to your newly created wallet using the command: importdescriptors "[{"desc": "YOUR_DESCRIPTOR#checksum","label": "YOUR_LABEL","timestamp": "now"}]"
  • The address should be included in your Receiving addresses with the specified label
  • Now, do some tests.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.