Browse Source

pylightning: Expose minconf in fundchannel and withdraw

Signed-off-by: Christian Decker <decker.christian@gmail.com>
confirmed-only
Christian Decker 6 years ago
parent
commit
741489a8d5
No known key found for this signature in database GPG Key ID: 1416D83DC4F0E86D
  1. 14
      contrib/pylightning/lightning/lightning.py

14
contrib/pylightning/lightning/lightning.py

@ -511,17 +511,19 @@ class LightningRpc(UnixDomainSocketRpc):
} }
return self.call("listpeers", payload) return self.call("listpeers", payload)
def fundchannel(self, node_id, satoshi, feerate=None, announce=True): def fundchannel(self, node_id, satoshi, feerate=None, announce=True, minconf=None):
""" """
Fund channel with {id} using {satoshi} satoshis Fund channel with {id} using {satoshi} satoshis
with feerate of {feerate} (uses default feerate if unset). with feerate of {feerate} (uses default feerate if unset).
If {announce} is False, don't send channel announcements. If {announce} is False, don't send channel announcements.
Only select outputs with {minconf} confirmations
""" """
payload = { payload = {
"id": node_id, "id": node_id,
"satoshi": satoshi, "satoshi": satoshi,
"feerate": feerate, "feerate": feerate,
"announce": announce "announce": announce,
"minconf": minconf,
} }
return self.call("fundchannel", payload) return self.call("fundchannel", payload)
@ -588,15 +590,17 @@ class LightningRpc(UnixDomainSocketRpc):
""" """
return self.call("dev-memleak") return self.call("dev-memleak")
def withdraw(self, destination, satoshi, feerate=None): def withdraw(self, destination, satoshi, feerate=None, minconf=None):
""" """
Send to {destination} address {satoshi} (or "all") Send to {destination} address {satoshi} (or "all")
amount via Bitcoin transaction amount via Bitcoin transaction. Only select outputs
with {minconf} confirmations
""" """
payload = { payload = {
"destination": destination, "destination": destination,
"satoshi": satoshi, "satoshi": satoshi,
"feerate": feerate "feerate": feerate,
"minconf": minconf,
} }
return self.call("withdraw", payload) return self.call("withdraw", payload)

Loading…
Cancel
Save