From 23e78460535313a67bf59bf73b07380b53563a5a Mon Sep 17 00:00:00 2001 From: lisa neigut Date: Wed, 22 May 2019 16:27:56 -0700 Subject: [PATCH] pylightning: add fundchannel_start Add method to rpc handler --- contrib/pylightning/lightning/lightning.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/contrib/pylightning/lightning/lightning.py b/contrib/pylightning/lightning/lightning.py index fb960f894..72d0b2db0 100644 --- a/contrib/pylightning/lightning/lightning.py +++ b/contrib/pylightning/lightning/lightning.py @@ -481,6 +481,24 @@ class LightningRpc(UnixDomainSocketRpc): } return self.call("fundchannel", payload) + def fundchannel_start(self, node_id, satoshi, feerate=None, announce=True): + """ + Start channel funding with {id} for {satoshi} satoshis + with feerate of {feerate} (uses default feerate if unset). + If {announce} is False, don't send channel announcements. + Returns a Bech32 {funding_address} for an external wallet + to create a funding transaction for. Requires a call to + 'fundchannel_continue' to complete channel establishment + with peer. + """ + payload = { + "id": node_id, + "satoshi": satoshi, + "feerate": feerate, + "announce": announce, + } + return self.call("fundchannel_start", payload) + def getinfo(self): """ Show information about this node