Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Implement BIP 174 Partially Signed Bitcoin Transactions serialization and RPCs #12136
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
Currently PSBT functionality is limited to 4 new RPC calls,
All of the test vectors currently in BIP 174 are also implemented.
"ERROR: walletcreatepsbt argument 2 (named include_output_info in vRPCConvertParams) is not defined in dispatch table
ERROR: walletupdatepsbt argument 3 (named include_output_info in vRPCConvertParams) is not defined in dispatch table"
You need to add the new named args to the dispatch table
I have rebased the externalhd branch onto this PR, with minor modifications, for ledger support, combined with @achow101 's HWI repo for signing. https://github.com/instagibbs/bitcoin/tree/external_psbt
1 similar comment
referenced this pull request
May 14, 2018
Rebased this and did some reorganization.
I squashed down a lot of the commits so that the changes to different parts aren't scattered around in different commits.
I also de-duplicated the signing code by using a PSBT specific SIgningProvider and SignatureCreator. The SigningProvider handles providing pubkeys and scripts from the PSBT itself along with the wallet and the SignatureCreator adds signatures and public keys directly to the PSBT once the signature is created. This avoids the previous code duplication.
Hopefully the reorganization and the PSBT specific SigningProvider and SignatureCreator will make this easier to review.
@luke-jr They also have a non-unique encoding, and are too complicated for what we need. Protobuf is also not a dependency already of all (or even most) software (including hardware devices) we expect to implement this, while all of those already need to implement Bitcoin P2P-like serialization, which this extends.
The discussion for that probably belongs on the ML.