Typically, every signature commits the entire transaction using: SIGHASH_ALL
Sigh flag. In this case, signatures cannot be transferred from one transaction to another. Because the new transaction has different inputs or outputs, the original transaction’s signature does not commit the correct set of inputs and outputs and is invalid for the new transaction.
The exception is when you have a signature that applies only to one output and not to other inputs (SIGHASH_SINGLE
|SIGHASH_ANYONECANPAY
) or no output (SIGHASH_NONE
|SIGHASH_ANYONECANPAY
). In the first case, you can move one specific input and output pair to a new transaction, and in the second case, you can also use the input in any transaction you want. These signature hash types are not used very often, as the former has very limited applications and the latter is a way to sign money to whoever you want.
So you shouldn’t expect this to be possible since all input is almost exclusively signed. SIGHASH_ALL
.
You can learn more about Bitcoin’s signature hash types in Raghav Sood’s excellent blog post on the topic, or in the Signatures chapter of Mastering Bitcoin 3rd Edition.