doc: subscribe/cancel/lookup invoices rest

This commit is contained in:
ErikEk 2022-05-22 13:30:12 +02:00
parent 9988d392eb
commit 26ba01a5cb
3 changed files with 13 additions and 6 deletions

View file

@ -84,7 +84,8 @@ type CancelInvoiceMsg struct {
sizeCache protoimpl.SizeCache
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"`
}
@ -477,7 +478,8 @@ type SubscribeSingleInvoiceRequest struct {
sizeCache protoimpl.SizeCache
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"`
}
@ -605,6 +607,7 @@ type isLookupInvoiceMsg_InvoiceRef interface {
}
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"`
}

View file

@ -44,7 +44,8 @@ service Invoices {
}
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;
}
message CancelInvoiceResp {
@ -138,7 +139,8 @@ message SettleInvoiceResp {
message SubscribeSingleInvoiceRequest {
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;
}
@ -163,6 +165,7 @@ enum LookupModifier {
message LookupInvoiceMsg {
oneof invoice_ref {
// When using REST, this field must be encoded as base64.
bytes payment_hash = 1;
bytes payment_addr = 2;
bytes set_id = 3;

View file

@ -103,6 +103,7 @@
"parameters": [
{
"name": "payment_hash",
"description": "When using REST, this field must be encoded as base64.",
"in": "query",
"required": false,
"type": "string",
@ -204,7 +205,7 @@
"parameters": [
{
"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",
"required": true,
"type": "string",
@ -309,7 +310,7 @@
"payment_hash": {
"type": "string",
"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."
}
}
},