transactions – Query about the right way to mix psbt

transactions – Query about the right way to mix psbt

[ad_1]

Usually all signatures decide to your complete transaction through the use of 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 appropriate set of inputs and outputs and can be invalid for the brand new transaction.

The exception is when you’ve got 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 possibly can 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. On condition that the previous has very restricted functions and the latter is outright signing your cash away to anybody that desires it, these signature hash sorts get used occasionally.

Subsequently, you shouldn’t anticipate this to be potential, as all inputs can be signed nearly solely with SIGHASH_ALL.

You possibly can learn extra about Bitcoin’s signature hash sorts in Raghav Sood’s wonderful weblog submit on that matter, or within the Signatures chapter of Mastering Bitcoin third Version.

[ad_2]

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *