[ad_1]
Typically all signatures decide to the complete transaction by utilizing the SIGHASH_ALL
sighash flag. In that case, you can not switch a signature from one transaction to a different. The brand new transaction has totally different inputs or outputs, so the signature from the unique transaction doesn’t decide to the best set of inputs and outputs and shall be invalid for the brand new transaction.
The exception is when you could have a signature that doesn’t decide to different inputs and simply to at least one output (SIGHASH_SINGLE
|SIGHASH_ANYONECANPAY
) or no output (SIGHASH_NONE
|SIGHASH_ANYONECANPAY
). Within the first case, you’ll be able to transfer one particular enter and output pair to a brand new transaction, or within the second case even use the enter on any transaction you want. Provided that the previous has very restricted functions and the latter is outright signing your cash away to anybody that wishes it, these signature hash sorts get used sometimes.
Subsequently, you shouldn’t count on this to be potential, as all inputs shall be signed virtually completely with SIGHASH_ALL
.
You’ll be able to learn extra about Bitcoin’s signature hash sorts in Raghav Sood’s wonderful weblog submit on that subject, or within the Signatures chapter of Mastering Bitcoin third Version.
[ad_2]
Supply hyperlink
Leave a Reply