Author

Topic: Multisig/P2SH use cases help (Read 939 times)

member
Activity: 62
Merit: 10
May 19, 2013, 10:54:21 AM
#1
I have some questions regarding M-of-N transactions and P2SH. Help with any of them would be appreciated. Imagine a case where two people want to agree on all transactions with their money. Some funds have been sent to a P2SH address which requires 2-of-2 signatures.

Case 1:
Person 1 goes to the grocery store and needs to pay the cashier. He generates a Tx, signs it, and sends the Tx to Person 2. Person 2 signs the Tx and broadcasts to the network.
 - How is this partial signing done?

Case 2:
Person 1 wants to receive a payment from someone at a new address. He generates a P2SH address such that the funds sent to it would require 2-of-2 signatures to spend. Person 2's wallet notices a Tx sent to the P2SH address and updates the balance shown in his client.
 - How does one generate a new P2SH address?
 - How can Person 2 know about this Tx and update their wallet balance to include the funds sent to this new address?

Case 3:
Person 1 wants to send funds from multiple 2-of-2 P2SH addresses in one Tx. His client is able to scan the blockchain and find unspent outputs that match his pub keys. Using this list, the client builds a Tx that spends funds from 2 separate multisig addresses. He passes the Tx to Person 2 for signing.
 - How can a client find unspent outputs in the blockchain that correspond to this 2-of-2 situation?
 - Could a wallet contain both standard unspent outputs and multisig unspent outputs? I.E. one can use their private keys to create/spend normal Tx as well as M-of-N Tx? If so, how would a client differentiate between these outputs?
Jump to: