mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-03 13:14:22 +01:00
pylightning: Expose minconf in fundchannel and withdraw
Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
c0d38aa99c
commit
683b601dc7
@@ -513,17 +513,19 @@ class LightningRpc(UnixDomainSocketRpc):
|
||||
}
|
||||
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
|
||||
with feerate of {feerate} (uses default feerate if unset).
|
||||
If {announce} is False, don't send channel announcements.
|
||||
Only select outputs with {minconf} confirmations
|
||||
"""
|
||||
payload = {
|
||||
"id": node_id,
|
||||
"satoshi": satoshi,
|
||||
"feerate": feerate,
|
||||
"announce": announce
|
||||
"announce": announce,
|
||||
"minconf": minconf,
|
||||
}
|
||||
return self.call("fundchannel", payload)
|
||||
|
||||
@@ -590,15 +592,17 @@ class LightningRpc(UnixDomainSocketRpc):
|
||||
"""
|
||||
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")
|
||||
amount via Bitcoin transaction
|
||||
amount via Bitcoin transaction. Only select outputs
|
||||
with {minconf} confirmations
|
||||
"""
|
||||
payload = {
|
||||
"destination": destination,
|
||||
"satoshi": satoshi,
|
||||
"feerate": feerate
|
||||
"feerate": feerate,
|
||||
"minconf": minconf,
|
||||
}
|
||||
return self.call("withdraw", payload)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user