mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
pyln: Add wrapper for the keysend command
This commit is contained in:
parent
b5291179e0
commit
a4e3773408
@ -1353,3 +1353,26 @@ class LightningRpc(UnixDomainSocketRpc):
|
||||
}
|
||||
payload.update({k: v for k, v in kwargs.items()})
|
||||
return self.call("getsharedsecret", payload)
|
||||
|
||||
def keysend(self, destination, msatoshi, label=None, maxfeepercent=None,
|
||||
retry_for=None, maxdelay=None, exemptfee=None,
|
||||
extratlvs=None):
|
||||
"""
|
||||
"""
|
||||
|
||||
if extra_tlvs is not None and not isinstance(extra_tlvs, dict):
|
||||
raise ValueErrr(
|
||||
"extra_tlvs is not a dictionary with integer keys and hexadecimal values"
|
||||
)
|
||||
|
||||
payload = {
|
||||
"destination": destination,
|
||||
"msatoshi": msatoshi,
|
||||
"label": label,
|
||||
"maxfeepercent": maxfeepercent,
|
||||
"retry_for": retry_for,
|
||||
"maxdelay": maxdelay,
|
||||
"exemptfee": exemptfee,
|
||||
"extratlvs": extratlvs,
|
||||
}
|
||||
return self.call("keysend", payload)
|
||||
|
Loading…
Reference in New Issue
Block a user