From 26ba01a5cbd93912bff513502e25848a0ce69377 Mon Sep 17 00:00:00 2001 From: ErikEk Date: Sun, 22 May 2022 13:30:12 +0200 Subject: [PATCH] doc: subscribe/cancel/lookup invoices rest --- lnrpc/invoicesrpc/invoices.pb.go | 7 +++++-- lnrpc/invoicesrpc/invoices.proto | 7 +++++-- lnrpc/invoicesrpc/invoices.swagger.json | 5 +++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/lnrpc/invoicesrpc/invoices.pb.go b/lnrpc/invoicesrpc/invoices.pb.go index 56725eacc..77d157064 100644 --- a/lnrpc/invoicesrpc/invoices.pb.go +++ b/lnrpc/invoicesrpc/invoices.pb.go @@ -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"` } diff --git a/lnrpc/invoicesrpc/invoices.proto b/lnrpc/invoicesrpc/invoices.proto index 810e663c4..f98c64a03 100644 --- a/lnrpc/invoicesrpc/invoices.proto +++ b/lnrpc/invoicesrpc/invoices.proto @@ -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; diff --git a/lnrpc/invoicesrpc/invoices.swagger.json b/lnrpc/invoicesrpc/invoices.swagger.json index 7dadf1b0e..2d24be798 100644 --- a/lnrpc/invoicesrpc/invoices.swagger.json +++ b/lnrpc/invoicesrpc/invoices.swagger.json @@ -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." } } },