The Bitcoin API call of createmultisig
returns two parameters - address
and redeemScript
. What is the latter used for?
2 Answers
To really understand this, you would need to read the protocol specs. But I'll describe it briefly.
Each transaction contains a script. In order to claim the bitcoins from a transaction (e.g.: you want to spend them in a new transaction) you have to provide whatever proof is described by the script.
Normally, the script is pretty much the same: the intended recipient has to provide a digital signature that proves they own the destination address. But you can requires a lot of different kinds of proof: require more signatories, no proof at all, or require the claimant to solve a puzzle.
It has to do with this: https://en.bitcoin.it/wiki/BIP_0016. Instead of providing the necessary scriptSignature when sending coins, you can just provide the hash of the script, and let the redeemer provide the actual script upon spending.