Merge pull request #6559 from ErikEk/doc-subscribe-invoice-rest
doc: subscribe/cancel/lookup invoices rest
This commit is contained in:
4 files changed
+19
-6
No files matched your search
@@ -5,5 +5,11 @@
|
|||||||
* [Add `payment_addr` flag to `buildroute`](https://github.com/lightningnetwork/lnd/pull/6576)
|
* [Add `payment_addr` flag to `buildroute`](https://github.com/lightningnetwork/lnd/pull/6576)
|
||||||
so that the mpp record of the route can be set correctly.
|
so that the mpp record of the route can be set correctly.
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
* [Add minor comment](https://github.com/lightningnetwork/lnd/pull/6559) on
|
||||||
|
subscribe/cancel/lookup invoice parameter encoding.
|
||||||
|
|
||||||
# Contributors (Alphabetical Order)
|
# Contributors (Alphabetical Order)
|
||||||
* Elle Mouton
|
* Elle Mouton
|
||||||
|
* ErikEk
|
||||||
@@ -84,7 +84,8 @@ type CancelInvoiceMsg struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
// Hash corresponding to the (hold) invoice to cancel.
|
// Hash corresponding to the (hold) invoice to cancel. When using
|
||||||
|
// REST, this field must be encoded as base64.
|
||||||
PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
|
PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -477,7 +478,8 @@ type SubscribeSingleInvoiceRequest struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
// Hash corresponding to the (hold) invoice to subscribe to.
|
// Hash corresponding to the (hold) invoice to subscribe to. When using
|
||||||
|
// REST, this field must be encoded as base64url.
|
||||||
RHash []byte `protobuf:"bytes,2,opt,name=r_hash,json=rHash,proto3" json:"r_hash,omitempty"`
|
RHash []byte `protobuf:"bytes,2,opt,name=r_hash,json=rHash,proto3" json:"r_hash,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -605,6 +607,7 @@ type isLookupInvoiceMsg_InvoiceRef interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type LookupInvoiceMsg_PaymentHash struct {
|
type LookupInvoiceMsg_PaymentHash struct {
|
||||||
|
// When using REST, this field must be encoded as base64.
|
||||||
PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3,oneof"`
|
PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3,oneof"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ service Invoices {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message CancelInvoiceMsg {
|
message CancelInvoiceMsg {
|
||||||
// Hash corresponding to the (hold) invoice to cancel.
|
// Hash corresponding to the (hold) invoice to cancel. When using
|
||||||
|
// REST, this field must be encoded as base64.
|
||||||
bytes payment_hash = 1;
|
bytes payment_hash = 1;
|
||||||
}
|
}
|
||||||
message CancelInvoiceResp {
|
message CancelInvoiceResp {
|
||||||
@@ -138,7 +139,8 @@ message SettleInvoiceResp {
|
|||||||
message SubscribeSingleInvoiceRequest {
|
message SubscribeSingleInvoiceRequest {
|
||||||
reserved 1;
|
reserved 1;
|
||||||
|
|
||||||
// Hash corresponding to the (hold) invoice to subscribe to.
|
// Hash corresponding to the (hold) invoice to subscribe to. When using
|
||||||
|
// REST, this field must be encoded as base64url.
|
||||||
bytes r_hash = 2;
|
bytes r_hash = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,6 +165,7 @@ enum LookupModifier {
|
|||||||
|
|
||||||
message LookupInvoiceMsg {
|
message LookupInvoiceMsg {
|
||||||
oneof invoice_ref {
|
oneof invoice_ref {
|
||||||
|
// When using REST, this field must be encoded as base64.
|
||||||
bytes payment_hash = 1;
|
bytes payment_hash = 1;
|
||||||
bytes payment_addr = 2;
|
bytes payment_addr = 2;
|
||||||
bytes set_id = 3;
|
bytes set_id = 3;
|
||||||
|
|||||||
@@ -103,6 +103,7 @@
|
|||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "payment_hash",
|
"name": "payment_hash",
|
||||||
|
"description": "When using REST, this field must be encoded as base64.",
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"required": false,
|
"required": false,
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -204,7 +205,7 @@
|
|||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "r_hash",
|
"name": "r_hash",
|
||||||
"description": "Hash corresponding to the (hold) invoice to subscribe to.",
|
"description": "Hash corresponding to the (hold) invoice to subscribe to. When using\nREST, this field must be encoded as base64url.",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -309,7 +310,7 @@
|
|||||||
"payment_hash": {
|
"payment_hash": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "byte",
|
"format": "byte",
|
||||||
"description": "Hash corresponding to the (hold) invoice to cancel."
|
"description": "Hash corresponding to the (hold) invoice to cancel. When using\nREST, this field must be encoded as base64."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user