rgb-cln/doc/lightning-delinvoice.7

148 lines
3.6 KiB
Groff

.\" -*- mode: troff; coding: utf-8 -*-
.TH "LIGHTNING-DELINVOICE" "7" "" "Core Lightning 0.12.1" ""
.SH
NAME
.LP
lightning-delinvoice -- Command for removing an invoice (or just its description)
.SH
SYNOPSIS
.LP
\fBdelinvoice\fR \fIlabel\fR \fIstatus\fR [\fIdesconly\fR]
.SH
DESCRIPTION
.LP
The \fBdelinvoice\fR RPC command removes an invoice with \fIstatus\fR as given
in \fBlistinvoices\fR, or with \fIdesconly\fR set, removes its description.
.PP
The caller should be particularly aware of the error case caused by the
\fIstatus\fR changing just before this command is invoked!
.PP
If \fIdesconly\fR is set, the invoice is not deleted, but has its
description removed (this can save space with very large descriptions,
as would be used with lightning-invoice(7) \fIdeschashonly\fR.
.SH
RETURN VALUE
.LP
Note: The return is the same as an object from lightning-listinvoice(7).
.PP
On success, an object is returned, containing:
.IP "\(bu" 2
\fBlabel\fR (string): Unique label given at creation time
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 2
\fBpayment_hash\fR (hash): the hash of the \fIpayment_preimage\fR which will prove payment (always 64 characters)
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 2
\fBstatus\fR (string): State of invoice (one of \(dqpaid\(dq, \(dqexpired\(dq, \(dqunpaid\(dq)
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 2
\fBexpires_at\fR (u64): UNIX timestamp when invoice expires (or expired)
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 2
\fBbolt11\fR (string, optional): BOLT11 string
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 2
\fBbolt12\fR (string, optional): BOLT12 string
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 2
\fBamount_msat\fR (msat, optional): the amount required to pay this invoice
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 2
\fBdescription\fR (string, optional): description used in the invoice
.LP
If \fBbolt12\fR is present:
.IP "\(bu" 2
\fBlocal_offer_id\fR (hex, optional): offer for which this invoice was created
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 2
\fBpayer_note\fR (string, optional): the optional \fIpayer_note\fR from invoice_request which created this invoice
.LP
If \fBstatus\fR is \(dqpaid\(dq:
.IP "\(bu" 2
\fBpay_index\fR (u64): unique index for this invoice payment
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 2
\fBamount_received_msat\fR (msat): how much was actually received
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 2
\fBpaid_at\fR (u64): UNIX timestamp of when payment was received
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 2
\fBpayment_preimage\fR (secret): SHA256 of this is the \fIpayment_hash\fR offered in the invoice (always 64 characters)
.SH
ERRORS
.LP
The following errors may be reported:
.IP "\(bu" 2
-1: Database error.
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 2
905: An invoice with that label does not exist.
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 2
906: The invoice \fIstatus\fR does not match the parameter.
An error object will be returned as error \fIdata\fR, containing
\fIcurrent_status\fR and \fIexpected_status\fR fields.
This is most likely due to the \fIstatus\fR of the invoice
changing just before this command is invoked.
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 2
908: The invoice already has no description, and \fIdesconly\fR was set.
.SH
AUTHOR
.LP
Rusty Russell <\fIrusty@rustcorp.com.au\fR> is mainly responsible.
.SH
SEE ALSO
.LP
lightning-listinvoice(7), lightning-waitinvoice(7),
lightning-invoice(7), lightning-delexpiredinvoice(7),
lightning-autocleaninvoice(7)
.SH
RESOURCES
.LP
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:331f8ccd1f6682ffc0f34b7f2aac4adc931436f719df4c7fdf7b3788175346eb