.TH "LIGHTNING-SIGNPSBT" "7" "" "" "lightning-signpsbt"
.SH NAME
lightning-signpsbt - Command to sign a wallet's inputs on a provided bitcoin transaction (PSBT)\.
.SH SYNOPSIS
\fB signpsbt\fR \fI psbt\fR [\fI signonly\fR ]
.SH DESCRIPTION
\fB signpsbt\fR is a low-level RPC command which signs a PSBT as defined by
BIP-174\.
.RS
.IP \[ bu]
\fI psbt\fR : A string that represents the PSBT value\.
.IP \[ bu]
\fI signonly\fR : An optional array of input numbers to sign\.
.RE
By default, all known inputs are signed, and others ignored: with
\fI signonly\fR , only those inputs are signed, and an error is returned if
one of them cannot be signed\.
Note that the command will fail if there are no inputs to sign, or
if the inputs to be signed were not previously reserved\.
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "signpsbt",
"params": {
"psbt": "some_psbt"
}
}
.RE
.fi
.SH RETURN VALUE
On success, a object will be returned with a string\.
.RS
.IP \[ bu]
\fI psbt\fR : A string that represents the psbt value with all inputs signed transaction\.
.RE
On failure, one of the following error codes may be returned:
.RS
.IP \[ bu]
-32602: Error in given parameters, or there aren't wallet's inputs to sign, or we couldn't sign all of \fI signonly\fR , or inputs are not reserved\.
.RE
.SH EXAMPLE JSON RESPONSE
.nf
.RS
{
"psbt": "some_psbt"
}
.RE
.fi
.SH AUTHOR
Vincenzo Palazzo \fI <vincenzo.palazzo@protonmail.com\fR > wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\.
.SH SEE ALSO
\fB lightning-fundpsbt\fR (7), \fB lightning-sendpsbt\fR (7)
.SH RESOURCES
Main web site: \fI https://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:5d7f12bed20a73dabf41d219ccd960e4e36a4674e8528d95ef26f7c8c55b1a0f