rgb-cln/doc/lightning-delinvoice.7.md

85 lines
2.9 KiB
Markdown
Raw Permalink Normal View History

lightning-delinvoice -- Command for removing an invoice (or just its description)
=================================================================================
SYNOPSIS
--------
**delinvoice** *label* *status* [*desconly*]
DESCRIPTION
-----------
The **delinvoice** RPC command removes an invoice with *status* as given
in **listinvoices**, or with *desconly* set, removes its description.
The caller should be particularly aware of the error case caused by the
*status* changing just before this command is invoked!
If *desconly* 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) *deschashonly*.
RETURN VALUE
------------
Note: The return is the same as an object from lightning-listinvoice(7).
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **label** (string): Unique label given at creation time
- **payment\_hash** (hash): the hash of the *payment\_preimage* which will prove payment
- **status** (string): State of invoice (one of "paid", "expired", "unpaid")
- **expires\_at** (u64): UNIX timestamp when invoice expires (or expired)
- **bolt11** (string, optional): BOLT11 string
- **bolt12** (string, optional): BOLT12 string
- **amount\_msat** (msat, optional): the amount required to pay this invoice
- **description** (string, optional): description used in the invoice
If **bolt12** is present:
- **local\_offer\_id** (hex, optional): offer for which this invoice was created
- **invreq\_payer\_note** (string, optional): the optional *invreq\_payer\_note* from invoice\_request which created this invoice
If **status** is "paid":
- **pay\_index** (u64): unique index for this invoice payment
- **amount\_received\_msat** (msat): how much was actually received
- **paid\_at** (u64): UNIX timestamp of when payment was received
- **payment\_preimage** (secret): SHA256 of this is the *payment\_hash* offered in the invoice
[comment]: # (GENERATE-FROM-SCHEMA-END)
ERRORS
------
The following errors may be reported:
- -1: Database error.
- 905: An invoice with that label does not exist.
- 906: The invoice *status* does not match the parameter.
An error object will be returned as error *data*, containing
doc: escape more naughty underscores The only time underscores aren't special in Markdown is when they appear in preformatted text. We have gotten away with not escaping underscores where an asterisk-enclosed span or the paragraph ends before the next underscore appears, but this is fragile and bad practice. Conversely, there are many places where we have not escaped underscores but needed to. Escape all underscores that do not appear in preformatted blocks or preformatted spans and are not themselves delineating emphasized spans. The changes in this commit are exactly the result of executing the following Bash code: ```bash e=':x;' # begin loop e+='s/^' # anchor match at beginning of line e+='(' # begin capturing subexpression e+='(' # begin list of alternatives e+='[^`_\\]|' # any mundane character, or e+='`([^`\\]|\\.)*`|' # backtick-enclosed span, or e+='\b_|_\b|' # underscore at boundary, or e+='\\.' # backslash-escaped character e+=')*' # any number of the preceding alternatives e+=')' # end capturing subexpression e+='\B_\B/\1\\_/;' # escape non-formatting underscore e+='tx' # repeat loop if we escaped an underscore escape_underscores=( sed # use extended regular expressions -E # skip over indented blocks (following an empty line) -e '/^$/{:i;n;/^( {4,}|\t)/bi}' # skip over preformatted blocks -e '/^\s*```/,/^\s*```/{p;d}' # skip over generated sections -e '/GENERATE-FROM-SCHEMA-START/,/GENERATE-FROM-SCHEMA-END/{p;d}' # escape underscores -e "${e}" ) "${escape_underscores[@]}" -i doc/*.[0-9].md ``` Changelog-None
2022-11-11 01:44:56 +00:00
*current\_status* and *expected\_status* fields.
This is most likely due to the *status* of the invoice
changing just before this command is invoked.
- 908: The invoice already has no description, and *desconly* was set.
AUTHOR
------
Rusty Russell <<rusty@rustcorp.com.au>> is mainly responsible.
SEE ALSO
--------
lightning-listinvoice(7), lightning-waitinvoice(7),
lightning-invoice(7), lightning-delexpiredinvoice(7),
lightning-autoclean-status(7)
RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:f29100ae7e0ad26fee559e175e104a9e29e1a2cd6917c4072d521ce0600d1656)