pylightning: add fundchannel_start

Add method to rpc handler
This commit is contained in:
lisa neigut 2019-05-22 16:27:56 -07:00 committed by Rusty Russell
parent 5920e656cf
commit 23e7846053
1 changed files with 18 additions and 0 deletions

View File

@ -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