From 18db1105c78fca520a97a64c0b674f6b9ff80bc1 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 24 Nov 2017 20:05:52 +1030 Subject: [PATCH] json_invoice: return absolute expiry_time Requested-by: Nadav Ivgi Signed-off-by: Rusty Russell --- lightningd/invoice.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lightningd/invoice.c b/lightningd/invoice.c index 006829b38..46a040e06 100644 --- a/lightningd/invoice.c +++ b/lightningd/invoice.c @@ -228,6 +228,7 @@ static void json_invoice(struct command *cmd, json_object_start(response, NULL); json_add_hex(response, "rhash", &invoice->rhash, sizeof(invoice->rhash)); + json_add_u64(response, "expiry_time", invoice->expiry_time); json_add_string(response, "bolt11", b11enc); if (b11->description_hash) json_add_string(response, "description", b11->description); @@ -240,7 +241,7 @@ static const struct json_command invoice_command = { "invoice", json_invoice, "Create invoice for {msatoshi} with {label} and {description} with optional {expiry} seconds (default 1 hour)", - "Returns the {rhash} and {bolt11} on success, and {description} if too alrge for {bolt11}. " + "Returns the {rhash}, {expiry_time} and {bolt11} on success, and {description} if too alrge for {bolt11}. " }; AUTODATA(json_command, &invoice_command);