rpc: new signpsbt + sendpsbt rpcs

Changelog-Added: JSON-RPC: new call `signpsbt` which will add the wallet's signatures to a provided psbt
Changelog-Added: JSON-RPC: new call `sendpsbt` which will finalize and send a signed PSBT
This commit is contained in:
niftynei
2020-06-16 13:47:07 -05:00
committed by Christian Decker
parent fd8a716695
commit 9830c94778
3 changed files with 316 additions and 15 deletions

View File

@@ -1129,6 +1129,24 @@ class LightningRpc(UnixDomainSocketRpc):
}
return self.call("unreserveinputs", payload)
def signpsbt(self, psbt):
"""
Add internal wallet's signatures to PSBT
"""
payload = {
"psbt": psbt,
}
return self.call("signpsbt", payload)
def sendpsbt(self, psbt):
"""
Finalize extract and broadcast a PSBT
"""
payload = {
"psbt": psbt,
}
return self.call("sendpsbt", payload)
def signmessage(self, message):
"""
Sign a message with this node's secret key.