pull down to refresh

a typical 2 of 3 multisig wallet has a script that checks to see if at least two of the three listed keys signed the transaction. The keys just show up, they don't express anything about the threshold or even that other keys are required.

just to be a bit more explicit about this... it's not the wallet that has the script. you may have used a piece of software that helped you construct the address in a way you could sign for, but it's the UTXO which contains the rules about whether you can spend it to somebody else.

wallets aren't real, manwallets aren't real, man

when you received the bitcoin into that multisig situation, you computed an address for the sender to direct it to... and then the nodes determined to include a valid transaction in the chain.

in order to spend that UTXO which was sent to you, you must be able to calculate a signature which any node will perceive as being a valid signature to include in a block. and since your multisig software situation will not be available to the validators, the UTXO contains the necessary details for a validator to determine if the signature is valid.

that's not to say there aren't things that seem like walletsthat's not to say there aren't things that seem like wallets

wallets are a useful abstraction, but it's important to remember that the only thing that matters are the keys. wallet software gets used to construct keys, and when We go around talking to people about "wallets" the noobs can get confused about what is going on... that's why it's often such a delightful experience to put your xpub into a new piece of software and be able to 'see your coins' just sitting there. it feels like magic because the abstraction we have taught ourselves doesn't match the reality.

it's not the wallet that has the script

I'm pretty sure modern wallet software (especially any wallet software that can make multisigs) mostly uses descriptors. When you make a backup in something like Sparrow or Nunchuk or Liana, it will do so as a descriptor. I think it's okay to tell people that a wallet = a descriptor.

The only thing that matters is the keys.

If you have a multisig, this is not true. Without some idea of how to compose the keys, having the keys won't help you when it comes time for spending. You need to have the descriptor.

Sure, as far as validators go, they just want to see a locking script and an unlocking script, but if they are your coins, and you want to succesfully generate an unlocking script, you need a bit more information than just a quorum of keys. You have to know how to create the signature.

Finally, I wanted an easy way to distinguish between a spending policy and the keys which may be required by the spending policy. Wallet software pretty much follows the rule of one spending policy = one wallet.

For instance, in Sparrow, you might create two different spending policies: one that is a multisig and another that is a single sig. It's even possible that the key you use in the single sig is also part of the quorum for the multisig. Sparrow will show these two you as two separate wallets. I think this is a good way to do things.

Wallet software ties one and only one specific spending policy to a wallet. I've never yet used a wallet that let you have multiple spending policies within a single wallet.

reply
it's important to remember that the only thing that matters are the keys. wallet software gets used to construct keys,

I totally flubbed that explanation, by using wrong word.

s/keys/signatures

if you can't sign, u can't spend. only thing that matters is the signatures

You need to have the descriptor.

that's true. the descriptor points to the private sig, same way it points to the public address

I've never yet used a wallet that let you have multiple spending policies within a single wallet.

yah, because the sig construction follows the same pattern as the address construction.

reply