lnrpc: channel point for GetChanInfo

This commit is contained in:
Slyghtning 2024-06-06 13:28:41 +02:00
parent 0fadf97e72
commit 1936aa7261
No known key found for this signature in database
GPG Key ID: F82D456EA023C9BF
4 changed files with 1402 additions and 1361 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1555,6 +1555,10 @@ func local_request_Lightning_GetNodeMetrics_0(ctx context.Context, marshaler run
}
var (
filter_Lightning_GetChanInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{"chan_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
)
func request_Lightning_GetChanInfo_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ChanInfoRequest
var metadata runtime.ServerMetadata
@ -1576,6 +1580,13 @@ func request_Lightning_GetChanInfo_0(ctx context.Context, marshaler runtime.Mars
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chan_id", err)
}
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_GetChanInfo_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.GetChanInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
@ -1602,6 +1613,13 @@ func local_request_Lightning_GetChanInfo_0(ctx context.Context, marshaler runtim
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chan_id", err)
}
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_GetChanInfo_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.GetChanInfo(ctx, &protoReq)
return msg, metadata, err

View File

@ -3443,6 +3443,10 @@ message ChanInfoRequest {
output index for the channel.
*/
uint64 chan_id = 1 [jstype = JS_STRING];
// The channel point of the channel in format funding_txid:output_index. If
// chan_id is specified, this field is ignored.
string chan_point = 2;
}
message NetworkInfoRequest {

View File

@ -1204,6 +1204,13 @@
"required": true,
"type": "string",
"format": "uint64"
},
{
"name": "chan_point",
"description": "The channel point of the channel in format funding_txid:output_index. If\nchan_id is specified, this field is ignored.",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [