invoice: add deschashonly parameter.

LNURL wants this so they can include images etc in descriptions.

Replaces: #4892
Changelog-Added: JSON-RPC: `invoice` has a new parameter `deschashonly` to put hash of description in bolt11.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-03-24 10:27:20 +10:30
parent 290dfd2b81
commit ccaf04d268
5 changed files with 55 additions and 9 deletions

View File

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