BIP 174 specifies a binary transaction format which contains the information necessary for a signer to produce signatures for the transaction and holds the signatures for an input while the input does not have a complete set of signatures.
BIP 174 is fully implemented in this pull request. It contains a struct for the a PSBT, serialization and deserialization functions, and a PSBT specific versions of ProduceSignature
(SignPartialTransaction
), SignStep
(SignSigsOnly
) and CombineSignatures
(FinalizePartialTransaction`).
Currently PSBT functionality is limited to 4 new RPC calls, walletupdatepsbt
, walletcreatepsbt
, combinepsbt
, and decodepsbt
.
walletupdatepsbt
updates a given PSBT with data from the wallet. For each input, it will attempt to add the proper UTXO, sign for the input, and finalize the input. It will also add any known redeem scripts, witness scripts, and public key derivation paths if they are known to the wallet.
walletcreatepsbt
takes a network serialized raw transaction as produced by the *rawtransaction
commands and converts it to a PSBT. Inputs are filled using information known to the wallet.
combinepsbt
combines multiple PSBTs and finalizes them if possible.
decodepsbt
decodes a PSBT and into a human readable format in order to more easily examine them. It is analogous to decoderawtransaction
.
All of the test vectors currently in BIP 174 are also implemented.