lightningd: createinvoice low-level invoice creation command.

This takes an unsigned bolt11 (or bolt12 if EXPERIMENTAL_FEATURES) string
and signs it and puts it in the database.

The invoice command could now be moved out to a plugin, in fact.

Changelog-Added: JSON-RPC: `createinvoice` new low-level invoice creation API.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-12-14 11:51:48 +10:30
committed by Christian Decker
parent 32d66b2740
commit fab0842d31
11 changed files with 508 additions and 121 deletions

View File

@@ -72,6 +72,7 @@ static const errcode_t INVOICE_EXPIRED_DURING_WAIT = 903;
static const errcode_t INVOICE_WAIT_TIMED_OUT = 904;
static const errcode_t INVOICE_NOT_FOUND = 905;
static const errcode_t INVOICE_STATUS_UNEXPECTED = 906;
static const errcode_t INVOICE_OFFER_INACTIVE = 907;
/* Errors from HSM crypto operations. */
static const errcode_t HSM_ECDH_FAILED = 800;