invoice: add ctlv option.

This is required if we want to create a "bouncer" plugin (in my copious free time!)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `invoice` now takes an optional `cltv` parameter.
This commit is contained in:
Rusty Russell
2021-01-08 15:13:50 +10:30
committed by Christian Decker
parent 4b2efd69d7
commit 1a8978100e
5 changed files with 23 additions and 6 deletions

View File

@@ -872,7 +872,7 @@ class LightningRpc(UnixDomainSocketRpc):
}
return self.call("help", payload)
def invoice(self, msatoshi, label, description, expiry=None, fallbacks=None, preimage=None, exposeprivatechannels=None):
def invoice(self, msatoshi, label, description, expiry=None, fallbacks=None, preimage=None, exposeprivatechannels=None, cltv=None):
"""
Create an invoice for {msatoshi} with {label} and {description} with
optional {expiry} seconds (default 1 week).
@@ -884,7 +884,8 @@ class LightningRpc(UnixDomainSocketRpc):
"expiry": expiry,
"fallbacks": fallbacks,
"preimage": preimage,
"exposeprivatechannels": exposeprivatechannels
"exposeprivatechannels": exposeprivatechannels,
"cltv": cltv,
}
return self.call("invoice", payload)