Page MenuHomePhabricator

Create wallet RPCs for PSBT
ClosedPublic

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

Details

Summary

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
update.

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
in.

This is a partial backport of Core PR13557 : https://github.com/bitcoin/bitcoin/pull/13557/commits/a4b06fb42eb0ad94e562ca839391b57e69285136

Depends on D4351

Test Plan

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested changes to this revision.Nov 4 2019, 13:09
Fabien added a subscriber: Fabien.

This deserves release notes.

src/wallet/rpcwallet.cpp
4694 ↗(On Diff #13869)

Nit: Sighash vs sighash

4769 ↗(On Diff #13869)

default=ALL|FORKID

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
This revision is now accepted and ready to land.Nov 9 2019, 17:22
This revision was automatically updated to reflect the committed changes.