|
@ -804,18 +804,37 @@ class LightningRpc(UnixDomainSocketRpc): |
|
|
} |
|
|
} |
|
|
return self.call("plugin", payload) |
|
|
return self.call("plugin", payload) |
|
|
|
|
|
|
|
|
def sendpay(self, route, payment_hash, description=None, msatoshi=None): |
|
|
def _deprecated_sendpay(self, route, payment_hash, description, msatoshi=None): |
|
|
""" |
|
|
warnings.warn("sendpay: the 'description' field is renamed 'label' : expect removal" |
|
|
Send along {route} in return for preimage of {payment_hash} |
|
|
" in early-2020", |
|
|
""" |
|
|
DeprecationWarning) |
|
|
payload = { |
|
|
payload = { |
|
|
"route": route, |
|
|
"route": route, |
|
|
"payment_hash": payment_hash, |
|
|
"payment_hash": payment_hash, |
|
|
"description": description, |
|
|
"label": description, |
|
|
"msatoshi": msatoshi, |
|
|
"msatoshi": msatoshi, |
|
|
} |
|
|
} |
|
|
return self.call("sendpay", payload) |
|
|
return self.call("sendpay", payload) |
|
|
|
|
|
|
|
|
|
|
|
def sendpay(self, route, payment_hash, *args, **kwargs): |
|
|
|
|
|
""" |
|
|
|
|
|
Send along {route} in return for preimage of {payment_hash} |
|
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
|
|
if 'description' in kwargs: |
|
|
|
|
|
return self._deprecated_sendpay(route, payment_hash, *args, **kwargs) |
|
|
|
|
|
|
|
|
|
|
|
def _sendpay(route, payment_hash, label=None, msatoshi=None): |
|
|
|
|
|
payload = { |
|
|
|
|
|
"route": route, |
|
|
|
|
|
"payment_hash": payment_hash, |
|
|
|
|
|
"label": label, |
|
|
|
|
|
"msatoshi": msatoshi, |
|
|
|
|
|
} |
|
|
|
|
|
return self.call("sendpay", payload) |
|
|
|
|
|
|
|
|
|
|
|
return _sendpay(route, payment_hash, *args, **kwargs) |
|
|
|
|
|
|
|
|
def setchannelfee(self, id, base=None, ppm=None): |
|
|
def setchannelfee(self, id, base=None, ppm=None): |
|
|
""" |
|
|
""" |
|
|
Set routing fees for a channel/peer {id} (or 'all'). {base} is a value in millisatoshi |
|
|
Set routing fees for a channel/peer {id} (or 'all'). {base} is a value in millisatoshi |
|
|