mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-01 03:24:41 +01:00
fab0842d31
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>
61 lines
1.6 KiB
Groff
Generated
61 lines
1.6 KiB
Groff
Generated
.TH "LIGHTNING-CREATEINVOICE" "7" "" "" "lightning-createinvoice"
|
|
.SH NAME
|
|
lightning-createinvoice - Low-level invoice creation
|
|
.SH SYNOPSIS
|
|
|
|
\fBcreateinvoice\fR \fIinvstring\fR \fIpreimage\fR \fIlabel\fR
|
|
|
|
.SH DESCRIPTION
|
|
|
|
The \fBcreateinvoice\fR RPC command signs and saves an invoice into the
|
|
database\.
|
|
|
|
|
|
The \fIinvstring\fR parameter is of bolt11 form, but without the final
|
|
signature appended\. Minimal sanity checks are done\.
|
|
|
|
|
|
The \fIpreimage\fR is the preimage to supply upon successful payment of
|
|
the invoice\.
|
|
|
|
|
|
The \fIlabel\fR must be a unique string or number (which is treated as a
|
|
string, so "01" is different from "1"); it is never revealed to other
|
|
nodes on the lightning network, but it can be used to query the status
|
|
of this invoice\.
|
|
|
|
.SH RETURN VALUE
|
|
|
|
On success, an invoice object is returned, as per \fBlistinvoices\fR(7)\.
|
|
|
|
|
|
On failure, an error is returned and no invoice is created\. If the
|
|
lightning process fails before responding, the caller should use
|
|
\fBlightning-listinvoices\fR(7) to query whether this invoice was created or
|
|
not\.
|
|
|
|
|
|
The following error codes may occur:
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
-1: Catchall nonspecific error\.
|
|
.IP \[bu]
|
|
900: An invoice with the given \fIlabel\fR already exists\.
|
|
|
|
.RE
|
|
.SH AUTHOR
|
|
|
|
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
|
|
|
|
.SH SEE ALSO
|
|
|
|
\fBlightning-invoice\fR(7), \fBlightning-listinvoices\fR(7), \fBlightning-delinvoice\fR(7),
|
|
\fBlightning-getroute\fR(7), \fBlightning-sendpay\fR(7)\.
|
|
|
|
.SH RESOURCES
|
|
|
|
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
|
|
|
|
\" SHA256STAMP:1b6598e430d416615867dc09604574c62a8ecb47c51a370711da75359ff80ef3
|