Hash Type (hashtype)

A single byte appended to a transaction signature in the transaction inout which describes how the transaction should be hashed in order to verify that signature. Three types affecting outputs exist: ALL (default), SINGLE, NONE and one optional modifier ANYONECANPAY affecting the inputs and can be combined with either of the first three. ALL requires all outputs to be hashed. Thus, all outputs are signed. SINGLE clears all output scripts but the one with the same index as the input in question. NONE clears all outputs, thus allowing changes at will. ANYONECANPAY removes all inputs except the current which allows anyone to contribute independently. The actual behavior is more subtle than this overview, so one should check the actual source code for more comments.