listinvoice: populate local_offer_id when iterating whole db.

And add the local_offer_id to the schemas too.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-EXPERIMENTAL: JSONRPC: `listoffers` now shows `local_offer_id` when listing all offers.
This commit is contained in:
Rusty Russell
2021-07-01 13:58:56 +09:30
parent 68962083e7
commit 33a40ca73b
11 changed files with 33 additions and 17 deletions

View File

@@ -93,4 +93,4 @@ Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:ff36afbf0c8f27efd0c6e82f32ba783e511f53f5978342b210ba78038c1934bf
\" SHA256STAMP:59f9becf74ee1b70ad9eb4316baaed1d26a95e34c3a5000e095fc8b7bfa291cf

View File

@@ -71,4 +71,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:6435d88007d1b21e97c969cc202e240ed57df572a3312a6b77ea66ed3a8d512a)
[comment]: # ( SHA256STAMP:62a3bdd502ed0b3b555f3cfda6a0e5f7c2417ce0f5b23202d613216de58a23f3)

View File

@@ -37,6 +37,8 @@ On success, an object containing \fBinvoices\fR is returned\. It is an array of
\fBbolt11\fR (string, optional): the BOLT11 string (always present unless \fIbolt12\fR is)
.IP \[bu]
\fBbolt12\fR (string, optional): the BOLT12 string (always present unless \fIbolt11\fR is)
.IP \[bu]
\fBlocal_offer_id\fR (hex, optional): the \fIid\fR of our offer which created this invoice (\fBexperimental-offers\fR only)\. (always 64 characters)
.RE
@@ -65,4 +67,4 @@ Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:1ac6fb88dc05d683e81dc951a593d88027310b9c62dd81c57e134238994b0562
\" SHA256STAMP:d6bc8b6c09aee1f5e29900fffacbc9d3fdf1e32d27e7b90b0709a5f50ecb5c13

View File

@@ -30,6 +30,7 @@ On success, an object containing **invoices** is returned. It is an array of ob
- **amount_msat** (msat, optional): the amount required to pay this invoice
- **bolt11** (string, optional): the BOLT11 string (always present unless *bolt12* is)
- **bolt12** (string, optional): the BOLT12 string (always present unless *bolt11* is)
- **local_offer_id** (hex, optional): the *id* of our offer which created this invoice (**experimental-offers** only). (always 64 characters)
If **status** is "paid":
- **pay_index** (u64): Unique incrementing index for this payment
@@ -53,4 +54,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:67ff5d9aa945301f23d6694304e4b657a37f0b3f80cc1c13c2ff23a55fe51d4b)
[comment]: # ( SHA256STAMP:cc6d7b4549d2ab905ab18041f34d13143e4ffed2bb6cc7c1df0307800e59a2fa)

View File

@@ -111,6 +111,7 @@
"amount_msat": { },
"description": { },
"payment_hash": { },
"local_offer_id": { },
"pay_index": {
"type": "u64",
"description": "unique index for this invoice payment"

View File

@@ -48,6 +48,12 @@
"bolt12": {
"type": "string",
"description": "the BOLT12 string (always present unless *bolt11* is)"
},
"local_offer_id": {
"type": "hex",
"description": "the *id* of our offer which created this invoice (**experimental-offers** only).",
"maxLength": 64,
"minLength": 64
}
},
"allOf": [
@@ -72,6 +78,7 @@
"amount_msat": { },
"bolt11": { },
"bolt12": { },
"local_offer_id": { },
"expires_at": { },
"pay_index": {
"type": "u64",
@@ -107,6 +114,7 @@
"amount_msat": { },
"bolt11": { },
"bolt12": { },
"local_offer_id": { },
"expires_at": { }
}
}