forked from ElementsProject/lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: add documentation for invoicerequest commands.
As reported on Discord, these are undocumented. And thus, um, hard to find! Reported-by: Aaron Barnard Signed-off-by: Rusty Russell <[email protected]>
- Loading branch information
1 parent
df10c62
commit 5e394ef
Showing
11 changed files
with
394 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
lightning-disableinvoicerequest -- Command for removing an invoice request | ||
========================================================================== | ||
|
||
SYNOPSIS | ||
-------- | ||
**(WARNING: experimental-offers only)** | ||
|
||
**disableinvoicerequest** *invreq\_id* | ||
|
||
DESCRIPTION | ||
----------- | ||
|
||
The **disableinvoicerequest** RPC command disables an | ||
invoice\_request, so that no further invoices will be accepted (and | ||
thus, no further payments made).. | ||
|
||
We currently don't support deletion of invoice\_requests, so they are | ||
not forgotten entirely (there may be payments which refer to this | ||
invoice\_request). | ||
|
||
|
||
RETURN VALUE | ||
------------ | ||
|
||
Note: the returned object is the same format as **listinvoicerequest**. | ||
|
||
[comment]: # (GENERATE-FROM-SCHEMA-START) | ||
On success, an object is returned, containing: | ||
|
||
- **invreq\_id** (hash): the SHA256 hash of all invoice\_request fields less than 160 | ||
- **active** (boolean): whether the invoice\_request is currently active (always *false*) | ||
- **single\_use** (boolean): whether the invoice\_request will become inactive after we pay an invoice for it | ||
- **bolt12** (string): the bolt12 string starting with lnr | ||
- **used** (boolean): whether the invoice\_request has already been used | ||
- **label** (string, optional): the label provided when creating the invoice\_request | ||
|
||
[comment]: # (GENERATE-FROM-SCHEMA-END) | ||
|
||
AUTHOR | ||
------ | ||
|
||
Rusty Russell <<[email protected]>> is mainly responsible. | ||
|
||
SEE ALSO | ||
-------- | ||
|
||
lightning-invoicerequest(7), lightning-listinvoicerequest(7). | ||
|
||
RESOURCES | ||
--------- | ||
|
||
Main web site: <https://github.com/ElementsProject/lightning> | ||
|
||
[comment]: # ( SHA256STAMP:a862f4bfdcef7db2b7e331ea64f5d79cbdf7553ea5bfd49775a675b21dc7004c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
lightning-invoicerequest -- Command for offering payments | ||
========================================================= | ||
|
||
SYNOPSIS | ||
-------- | ||
|
||
**(WARNING: experimental-offers only)** | ||
|
||
**invoicerequest** *amount* *description* [*issuer*] [*label*] [*absolute\_expiry*] [*single\_use*] | ||
|
||
DESCRIPTION | ||
----------- | ||
|
||
The **invoicerequest** RPC command creates an `invoice_request` to | ||
send payments: it automatically enables the processing of an incoming | ||
invoice, and payment of it. The reader of the resulting | ||
`invoice_request` can use lightning-sendinvoice(7) to collect their | ||
payment. | ||
|
||
The *amount* parameter can be a positive value in millisatoshi | ||
precision; it can be a whole number, or a whole number ending in | ||
*msat* or *sat*, or a number with three decimal places ending in | ||
*sat*, or a number with 1 to 11 decimal places ending in *btc*. | ||
|
||
The *description* is a short description of purpose of the payment, | ||
e.g. *ATM withdrawl*. This value is encoded into the resulting | ||
`invoice_request` and is viewable by anyone you expose it to. It must | ||
be UTF-8, and cannot use *\\u* JSON escape codes. | ||
|
||
The *issuer* is another (optional) field exposed in the | ||
`invoice_request`, and reflects who is issuing it (i.e. you) if | ||
appropriate. | ||
|
||
The *label* field is an internal-use name for the offer, which can | ||
be any UTF-8 string. | ||
|
||
The *absolute\_expiry* is optionally the time the offer is valid | ||
until, in seconds since the first day of 1970 UTC. If not set, the | ||
`invoice_request` remains valid (though it can be deactivated by the | ||
issuer of course). This is encoded in the `invoice_request`. | ||
|
||
*single\_use* (default true) indicates that the `invoice_request` is | ||
only valid once; we may attempt multiple payments, but as soon as one | ||
is successful no more invoices are accepted (i.e. only one person can | ||
take the money). | ||
|
||
RETURN VALUE | ||
------------ | ||
|
||
[comment]: # (GENERATE-FROM-SCHEMA-START) | ||
On success, an object is returned, containing: | ||
|
||
- **invreq\_id** (hash): the SHA256 hash of all invoice\_request fields less than 160 | ||
- **active** (boolean): whether the invoice\_request is currently active (always *true*) | ||
- **single\_use** (boolean): whether the invoice\_request will become inactive after we pay an invoice for it | ||
- **bolt12** (string): the bolt12 string starting with lnr | ||
- **used** (boolean): whether the invoice\_request has already been used (always *false*) | ||
- **label** (string, optional): the label provided when creating the invoice\_request | ||
|
||
[comment]: # (GENERATE-FROM-SCHEMA-END) | ||
|
||
On failure, an error is returned and no `invoice_request` is | ||
created. If the lightning process fails before responding, the caller | ||
should use lightning-listinvoicerequests(7) to query whether it was | ||
created or not. | ||
|
||
The following error codes may occur: | ||
- -1: Catchall nonspecific error. | ||
|
||
AUTHOR | ||
------ | ||
|
||
Rusty Russell <<[email protected]>> is mainly responsible. | ||
|
||
SEE ALSO | ||
-------- | ||
|
||
lightning-listinvoicerequests(7), lightning-disableinvoicerequest(7). | ||
|
||
RESOURCES | ||
--------- | ||
|
||
Main web site: <https://github.com/ElementsProject/lightning> | ||
|
||
[comment]: # ( SHA256STAMP:fef519902c0eeb8caa1ae0e9f1a0a16fc5fc6eaa4106af6a1d3a83058e5747c1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
lightning-listinvoicerequests -- Command for querying invoice\_request status | ||
============================================================================= | ||
|
||
SYNOPSIS | ||
-------- | ||
|
||
**listinvoicerequests** [*invreq\_id*] [*active\_only*] | ||
|
||
DESCRIPTION | ||
----------- | ||
|
||
The **listinvoicerequests** RPC command gets the status of a specific `invoice_request`, | ||
if it exists, or the status of all `invoice_requests` if given no argument. | ||
|
||
A specific invoice can be queried by providing the `invreq_id`, which | ||
is presented by lightning-invoicerequest(7), or can be calculated from | ||
a bolt12 invoice. If `active_only` is `true` (default is `false`) then | ||
only active invoice\_requests are returned. | ||
|
||
RETURN VALUE | ||
------------ | ||
|
||
[comment]: # (GENERATE-FROM-SCHEMA-START) | ||
On success, an object containing **invoicerequests** is returned. It is an array of objects, where each object contains: | ||
|
||
- **invreq\_id** (hash): the SHA256 hash of all invoice\_request fields less than 160 | ||
- **active** (boolean): whether the invoice\_request is currently active | ||
- **single\_use** (boolean): whether the invoice\_request will become inactive after we pay an invoice for it | ||
- **bolt12** (string): the bolt12 string starting with lnr | ||
- **used** (boolean): whether the invoice\_request has already been used | ||
- **label** (string, optional): the label provided when creating the invoice\_request | ||
|
||
[comment]: # (GENERATE-FROM-SCHEMA-END) | ||
|
||
AUTHOR | ||
------ | ||
|
||
Rusty Russell <<[email protected]>> is mainly responsible. | ||
|
||
SEE ALSO | ||
-------- | ||
|
||
lightning-invoicerequests(7), lightning-disableinvoicerequest(7). | ||
|
||
RESOURCES | ||
--------- | ||
|
||
Main web site: <https://github.com/ElementsProject/lightning> | ||
|
||
[comment]: # ( SHA256STAMP:233e28e40752d6e8db2eb7928a1ced18bf16db1dddfe6c16d0f3a32b5e51ccd4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"required": [ | ||
"invreq_id" | ||
], | ||
"properties": { | ||
"invreq_id": { | ||
"type": "string", | ||
"description": "" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"required": [ | ||
"invreq_id", | ||
"single_use", | ||
"active", | ||
"bolt12", | ||
"used" | ||
], | ||
"added": "v22.11", | ||
"properties": { | ||
"invreq_id": { | ||
"type": "hash", | ||
"description": "the SHA256 hash of all invoice_request fields less than 160" | ||
}, | ||
"active": { | ||
"type": "boolean", | ||
"enum": [ | ||
false | ||
], | ||
"description": "whether the invoice_request is currently active" | ||
}, | ||
"single_use": { | ||
"type": "boolean", | ||
"description": "whether the invoice_request will become inactive after we pay an invoice for it" | ||
}, | ||
"bolt12": { | ||
"type": "string", | ||
"description": "the bolt12 string starting with lnr" | ||
}, | ||
"used": { | ||
"type": "boolean", | ||
"description": "whether the invoice_request has already been used" | ||
}, | ||
"label": { | ||
"type": "string", | ||
"description": "the label provided when creating the invoice_request" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"required": [ | ||
"amount", | ||
"description" | ||
], | ||
"added": "v22.11", | ||
"properties": { | ||
"amount": { | ||
"type": "msat", | ||
"description": "" | ||
}, | ||
"description": { | ||
"type": "string", | ||
"description": "" | ||
}, | ||
"issuer": { | ||
"type": "string", | ||
"description": "" | ||
}, | ||
"absolute_expiry": { | ||
"type": "u64", | ||
"description": "" | ||
}, | ||
"single_use": { | ||
"type": "boolean", | ||
"description": "" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"required": [ | ||
"invreq_id", | ||
"single_use", | ||
"active", | ||
"bolt12", | ||
"used" | ||
], | ||
"properties": { | ||
"invreq_id": { | ||
"type": "hash", | ||
"description": "the SHA256 hash of all invoice_request fields less than 160" | ||
}, | ||
"active": { | ||
"type": "boolean", | ||
"enum": [ | ||
true | ||
], | ||
"description": "whether the invoice_request is currently active" | ||
}, | ||
"single_use": { | ||
"type": "boolean", | ||
"description": "whether the invoice_request will become inactive after we pay an invoice for it" | ||
}, | ||
"bolt12": { | ||
"type": "string", | ||
"description": "the bolt12 string starting with lnr" | ||
}, | ||
"used": { | ||
"type": "boolean", | ||
"enum": [ | ||
false | ||
], | ||
"description": "whether the invoice_request has already been used" | ||
}, | ||
"label": { | ||
"type": "string", | ||
"description": "the label provided when creating the invoice_request" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"required": [], | ||
"added": "v22.11", | ||
"properties": { | ||
"invreq_id": { | ||
"type": "string", | ||
"description": "" | ||
}, | ||
"active_only": { | ||
"type": "boolean", | ||
"description": "" | ||
} | ||
} | ||
} |
Oops, something went wrong.