Page MenuHomePhabricator

Create wallet RPCs for PSBT

Authored by deadalnix on Nov 2 2019, 01:43.



walletprocesspsbt takes a PSBT format transaction, updates the
PSBT with any inputs related to this wallet, signs, and finalizes
the transaction. There is also an option to not sign and just

walletcreatefundedpsbt creates a PSBT from user provided data
in the same form as createrawtransaction. It also funds the transaction
and takes an options argument in the same form as fundrawtransaction.
The resulting PSBT is blank with no input or output data filled

This is a partial backport of Core PR13557 :

Depends on D4351

Test Plan

Unfortunately, the test have all been dumped at once at the end.

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

deadalnix created this revision.Nov 2 2019, 01:43
Herald added a reviewer: Restricted Project. · View Herald TranscriptNov 2 2019, 01:43
Fabien requested changes to this revision.Nov 4 2019, 13:09
Fabien added a subscriber: Fabien.

This deserves release notes.

4694 ↗(On Diff #13869)

Nit: Sighash vs sighash

4769 ↗(On Diff #13869)


4807 ↗(On Diff #13869)

This doesn't check for FORKID:

if (!nHashType.hasForkId()) {
    throw JSONRPCError(RPC_INVALID_PARAMETER, "Signature must use SIGHASH_FORKID");
This revision now requires changes to proceed.Nov 4 2019, 13:09
deadalnix updated this revision to Diff 14025.Nov 9 2019, 15:58

Address comments

Fabien accepted this revision.Nov 9 2019, 17:22
This revision is now accepted and ready to land.Nov 9 2019, 17:22
This revision was automatically updated to reflect the committed changes.