lnrpc: update docs on LookupHtlc

This commit is contained in:
yyforyongyu committed 2023-02-27 16:59:17 +08:00
1 parent 38063a4720
commit 2bf84fbe41
4 files changed
+18 -3

No files matched your search

+3 -1
View File
@@ -1355,7 +1355,9 @@ type LookupHtlcResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Settled bool `protobuf:"varint,1,opt,name=settled,proto3" json:"settled,omitempty"`
// Settled is true is the htlc was settled. If false, the htlc was failed.
Settled bool `protobuf:"varint,1,opt,name=settled,proto3" json:"settled,omitempty"`
// Offchain indicates whether the htlc was resolved off-chain or on-chain.
Offchain bool `protobuf:"varint,2,opt,name=offchain,proto3" json:"offchain,omitempty"`
}
+6
View File
@@ -582,6 +582,10 @@ service Lightning {
*/
rpc ListAliases (ListAliasesRequest) returns (ListAliasesResponse);
/*
LookupHtlc retrieves a final htlc resolution from the database. If the htlc
has no final resolution yet, a NotFound grpc status code is returned.
*/
rpc LookupHtlc (LookupHtlcRequest) returns (LookupHtlcResponse);
}
@@ -592,8 +596,10 @@ message LookupHtlcRequest {
}
message LookupHtlcResponse {
// Settled is true is the htlc was settled. If false, the htlc was failed.
bool settled = 1;
// Offchain indicates whether the htlc was resolved off-chain or on-chain.
bool offchain = 2;
}
+5 -2
View File
@@ -1603,6 +1603,7 @@
},
"/v1/htlc/{chan_id}/{htlc_index}": {
"get": {
"summary": "LookupHtlc retrieves a final htlc resolution from the database. If the htlc\nhas no final resolution yet, a NotFound grpc status code is returned.",
"operationId": "Lightning_LookupHtlc",
"responses": {
"200": {
@@ -5440,10 +5441,12 @@
"type": "object",
"properties": {
"settled": {
"type": "boolean"
"type": "boolean",
"description": "Settled is true is the htlc was settled. If false, the htlc was failed."
},
"offchain": {
"type": "boolean"
"type": "boolean",
"description": "Offchain indicates whether the htlc was resolved off-chain or on-chain."
}
}
},
+4
View File
@@ -402,6 +402,8 @@ type LightningClient interface {
// their confirmed SCID (if it exists) and/or the base SCID (in the case of
// zero conf).
ListAliases(ctx context.Context, in *ListAliasesRequest, opts ...grpc.CallOption) (*ListAliasesResponse, error)
// LookupHtlc retrieves a final htlc resolution from the database. If the htlc
// has no final resolution yet, a NotFound grpc status code is returned.
LookupHtlc(ctx context.Context, in *LookupHtlcRequest, opts ...grpc.CallOption) (*LookupHtlcResponse, error)
}
@@ -1701,6 +1703,8 @@ type LightningServer interface {
// their confirmed SCID (if it exists) and/or the base SCID (in the case of
// zero conf).
ListAliases(context.Context, *ListAliasesRequest) (*ListAliasesResponse, error)
// LookupHtlc retrieves a final htlc resolution from the database. If the htlc
// has no final resolution yet, a NotFound grpc status code is returned.
LookupHtlc(context.Context, *LookupHtlcRequest) (*LookupHtlcResponse, error)
mustEmbedUnimplementedLightningServer()
}