lnrpc/invoicesrpc: add new invoice ref LookupInvoiceV2 method

In this commit, we add a new `LookupInvoiceV2` method attached to the
invoice RPC sub-server. Compared to the existing version, this version
allows an invoice to be looked up by an invoice ref. This enables users
to query an AMP invoice based on a specific _set ID_, so they can get
the information related to the set of cumulative settles to that
invoices.
This commit is contained in:
Olaoluwa Osuntokun committed 2021-10-28 15:49:25 -07:00
1 parent b45c4ea7e3
commit 8299d632e8
9 files changed
+441 -35

No files matched your search

+46
View File
@@ -82,6 +82,52 @@
]
}
},
"/v2/invoices/lookup": {
"get": {
"summary": "LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced\nusing either its payment hash, payment address, or set ID.",
"operationId": "Invoices_LookupInvoiceV2",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/lnrpcInvoice"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "payment_hash",
"in": "query",
"required": false,
"type": "string",
"format": "byte"
},
{
"name": "payment_addr",
"in": "query",
"required": false,
"type": "string",
"format": "byte"
},
{
"name": "set_id",
"in": "query",
"required": false,
"type": "string",
"format": "byte"
}
],
"tags": [
"Invoices"
]
}
},
"/v2/invoices/settle": {
"post": {
"summary": "SettleInvoice settles an accepted invoice. If the invoice is already\nsettled, this call will succeed.",