mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
5545 lines
235 KiB
Go
5545 lines
235 KiB
Go
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
|
// source: lightning.proto
|
|
|
|
/*
|
|
Package lnrpc is a reverse proxy.
|
|
|
|
It translates gRPC into RESTful JSON APIs.
|
|
*/
|
|
package lnrpc
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
"net/http"
|
|
|
|
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
|
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
|
|
"google.golang.org/grpc"
|
|
"google.golang.org/grpc/codes"
|
|
"google.golang.org/grpc/grpclog"
|
|
"google.golang.org/grpc/metadata"
|
|
"google.golang.org/grpc/status"
|
|
"google.golang.org/protobuf/proto"
|
|
)
|
|
|
|
// Suppress "imported and not used" errors
|
|
var _ codes.Code
|
|
var _ io.Reader
|
|
var _ status.Status
|
|
var _ = runtime.String
|
|
var _ = utilities.NewDoubleArray
|
|
var _ = metadata.Join
|
|
|
|
func request_Lightning_WalletBalance_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq WalletBalanceRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := client.WalletBalance(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_WalletBalance_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq WalletBalanceRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := server.WalletBalance(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_ChannelBalance_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ChannelBalanceRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := client.ChannelBalance(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_ChannelBalance_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ChannelBalanceRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := server.ChannelBalance(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_GetTransactions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
)
|
|
|
|
func request_Lightning_GetTransactions_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq GetTransactionsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_GetTransactions_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.GetTransactions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_GetTransactions_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq GetTransactionsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_GetTransactions_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.GetTransactions(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_EstimateFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
)
|
|
|
|
func request_Lightning_EstimateFee_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq EstimateFeeRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_EstimateFee_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.EstimateFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_EstimateFee_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq EstimateFeeRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_EstimateFee_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.EstimateFee(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_SendCoins_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq SendCoinsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.SendCoins(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_SendCoins_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq SendCoinsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.SendCoins(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_ListUnspent_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
)
|
|
|
|
func request_Lightning_ListUnspent_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListUnspentRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_ListUnspent_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.ListUnspent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_ListUnspent_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListUnspentRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_ListUnspent_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.ListUnspent(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_SubscribeTransactions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
)
|
|
|
|
func request_Lightning_SubscribeTransactions_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (Lightning_SubscribeTransactionsClient, runtime.ServerMetadata, error) {
|
|
var protoReq GetTransactionsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_SubscribeTransactions_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
stream, err := client.SubscribeTransactions(ctx, &protoReq)
|
|
if err != nil {
|
|
return nil, metadata, err
|
|
}
|
|
header, err := stream.Header()
|
|
if err != nil {
|
|
return nil, metadata, err
|
|
}
|
|
metadata.HeaderMD = header
|
|
return stream, metadata, nil
|
|
|
|
}
|
|
|
|
func request_Lightning_SendMany_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq SendManyRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.SendMany(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_SendMany_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq SendManyRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.SendMany(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_NewAddress_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
)
|
|
|
|
func request_Lightning_NewAddress_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq NewAddressRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_NewAddress_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.NewAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_NewAddress_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq NewAddressRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_NewAddress_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.NewAddress(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_SignMessage_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq SignMessageRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.SignMessage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_SignMessage_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq SignMessageRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.SignMessage(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_VerifyMessage_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq VerifyMessageRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.VerifyMessage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_VerifyMessage_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq VerifyMessageRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.VerifyMessage(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_ConnectPeer_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ConnectPeerRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.ConnectPeer(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_ConnectPeer_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ConnectPeerRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.ConnectPeer(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_DisconnectPeer_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DisconnectPeerRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["pub_key"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pub_key")
|
|
}
|
|
|
|
protoReq.PubKey, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pub_key", err)
|
|
}
|
|
|
|
msg, err := client.DisconnectPeer(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_DisconnectPeer_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DisconnectPeerRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["pub_key"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pub_key")
|
|
}
|
|
|
|
protoReq.PubKey, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pub_key", err)
|
|
}
|
|
|
|
msg, err := server.DisconnectPeer(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_ListPeers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
)
|
|
|
|
func request_Lightning_ListPeers_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListPeersRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_ListPeers_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.ListPeers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_ListPeers_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListPeersRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_ListPeers_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.ListPeers(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_SubscribePeerEvents_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (Lightning_SubscribePeerEventsClient, runtime.ServerMetadata, error) {
|
|
var protoReq PeerEventSubscription
|
|
var metadata runtime.ServerMetadata
|
|
|
|
stream, err := client.SubscribePeerEvents(ctx, &protoReq)
|
|
if err != nil {
|
|
return nil, metadata, err
|
|
}
|
|
header, err := stream.Header()
|
|
if err != nil {
|
|
return nil, metadata, err
|
|
}
|
|
metadata.HeaderMD = header
|
|
return stream, metadata, nil
|
|
|
|
}
|
|
|
|
func request_Lightning_GetInfo_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq GetInfoRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := client.GetInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_GetInfo_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq GetInfoRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := server.GetInfo(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_GetRecoveryInfo_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq GetRecoveryInfoRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := client.GetRecoveryInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_GetRecoveryInfo_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq GetRecoveryInfoRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := server.GetRecoveryInfo(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_PendingChannels_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq PendingChannelsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := client.PendingChannels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_PendingChannels_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq PendingChannelsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := server.PendingChannels(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_ListChannels_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
)
|
|
|
|
func request_Lightning_ListChannels_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListChannelsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_ListChannels_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.ListChannels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_ListChannels_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListChannelsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_ListChannels_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.ListChannels(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_SubscribeChannelEvents_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (Lightning_SubscribeChannelEventsClient, runtime.ServerMetadata, error) {
|
|
var protoReq ChannelEventSubscription
|
|
var metadata runtime.ServerMetadata
|
|
|
|
stream, err := client.SubscribeChannelEvents(ctx, &protoReq)
|
|
if err != nil {
|
|
return nil, metadata, err
|
|
}
|
|
header, err := stream.Header()
|
|
if err != nil {
|
|
return nil, metadata, err
|
|
}
|
|
metadata.HeaderMD = header
|
|
return stream, metadata, nil
|
|
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_ClosedChannels_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
)
|
|
|
|
func request_Lightning_ClosedChannels_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ClosedChannelsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_ClosedChannels_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.ClosedChannels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_ClosedChannels_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ClosedChannelsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_ClosedChannels_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.ClosedChannels(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_OpenChannelSync_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq OpenChannelRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.OpenChannelSync(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_OpenChannelSync_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq OpenChannelRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.OpenChannelSync(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_OpenChannel_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (Lightning_OpenChannelClient, runtime.ServerMetadata, error) {
|
|
var protoReq OpenChannelRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
stream, err := client.OpenChannel(ctx, &protoReq)
|
|
if err != nil {
|
|
return nil, metadata, err
|
|
}
|
|
header, err := stream.Header()
|
|
if err != nil {
|
|
return nil, metadata, err
|
|
}
|
|
metadata.HeaderMD = header
|
|
return stream, metadata, nil
|
|
|
|
}
|
|
|
|
func request_Lightning_BatchOpenChannel_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq BatchOpenChannelRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.BatchOpenChannel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_BatchOpenChannel_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq BatchOpenChannelRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.BatchOpenChannel(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_FundingStateStep_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq FundingTransitionMsg
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.FundingStateStep(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_FundingStateStep_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq FundingTransitionMsg
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.FundingStateStep(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_ChannelAcceptor_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (Lightning_ChannelAcceptorClient, runtime.ServerMetadata, error) {
|
|
var metadata runtime.ServerMetadata
|
|
stream, err := client.ChannelAcceptor(ctx)
|
|
if err != nil {
|
|
grpclog.Infof("Failed to start streaming: %v", err)
|
|
return nil, metadata, err
|
|
}
|
|
dec := marshaler.NewDecoder(req.Body)
|
|
handleSend := func() error {
|
|
var protoReq ChannelAcceptResponse
|
|
err := dec.Decode(&protoReq)
|
|
if err == io.EOF {
|
|
return err
|
|
}
|
|
if err != nil {
|
|
grpclog.Infof("Failed to decode request: %v", err)
|
|
return err
|
|
}
|
|
if err := stream.Send(&protoReq); err != nil {
|
|
grpclog.Infof("Failed to send request: %v", err)
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
if err := handleSend(); err != nil {
|
|
if cerr := stream.CloseSend(); cerr != nil {
|
|
grpclog.Infof("Failed to terminate client stream: %v", cerr)
|
|
}
|
|
if err == io.EOF {
|
|
return stream, metadata, nil
|
|
}
|
|
return nil, metadata, err
|
|
}
|
|
go func() {
|
|
for {
|
|
if err := handleSend(); err != nil {
|
|
break
|
|
}
|
|
}
|
|
if err := stream.CloseSend(); err != nil {
|
|
grpclog.Infof("Failed to terminate client stream: %v", err)
|
|
}
|
|
}()
|
|
header, err := stream.Header()
|
|
if err != nil {
|
|
grpclog.Infof("Failed to get header from client: %v", err)
|
|
return nil, metadata, err
|
|
}
|
|
metadata.HeaderMD = header
|
|
return stream, metadata, nil
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_CloseChannel_0 = &utilities.DoubleArray{Encoding: map[string]int{"channel_point": 0, "funding_txid_str": 1, "output_index": 2}, Base: []int{1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 2, 3, 4}}
|
|
)
|
|
|
|
func request_Lightning_CloseChannel_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (Lightning_CloseChannelClient, runtime.ServerMetadata, error) {
|
|
var protoReq CloseChannelRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["channel_point.funding_txid_str"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_point.funding_txid_str")
|
|
}
|
|
|
|
err = runtime.PopulateFieldFromPath(&protoReq, "channel_point.funding_txid_str", val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_point.funding_txid_str", err)
|
|
}
|
|
|
|
val, ok = pathParams["channel_point.output_index"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_point.output_index")
|
|
}
|
|
|
|
err = runtime.PopulateFieldFromPath(&protoReq, "channel_point.output_index", val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_point.output_index", 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_CloseChannel_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
stream, err := client.CloseChannel(ctx, &protoReq)
|
|
if err != nil {
|
|
return nil, metadata, err
|
|
}
|
|
header, err := stream.Header()
|
|
if err != nil {
|
|
return nil, metadata, err
|
|
}
|
|
metadata.HeaderMD = header
|
|
return stream, metadata, nil
|
|
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_AbandonChannel_0 = &utilities.DoubleArray{Encoding: map[string]int{"channel_point": 0, "funding_txid_str": 1, "output_index": 2}, Base: []int{1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 2, 3, 4}}
|
|
)
|
|
|
|
func request_Lightning_AbandonChannel_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq AbandonChannelRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["channel_point.funding_txid_str"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_point.funding_txid_str")
|
|
}
|
|
|
|
err = runtime.PopulateFieldFromPath(&protoReq, "channel_point.funding_txid_str", val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_point.funding_txid_str", err)
|
|
}
|
|
|
|
val, ok = pathParams["channel_point.output_index"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_point.output_index")
|
|
}
|
|
|
|
err = runtime.PopulateFieldFromPath(&protoReq, "channel_point.output_index", val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_point.output_index", 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_AbandonChannel_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.AbandonChannel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_AbandonChannel_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq AbandonChannelRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["channel_point.funding_txid_str"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_point.funding_txid_str")
|
|
}
|
|
|
|
err = runtime.PopulateFieldFromPath(&protoReq, "channel_point.funding_txid_str", val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_point.funding_txid_str", err)
|
|
}
|
|
|
|
val, ok = pathParams["channel_point.output_index"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_point.output_index")
|
|
}
|
|
|
|
err = runtime.PopulateFieldFromPath(&protoReq, "channel_point.output_index", val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_point.output_index", 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_AbandonChannel_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.AbandonChannel(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_SendPayment_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (Lightning_SendPaymentClient, runtime.ServerMetadata, error) {
|
|
var metadata runtime.ServerMetadata
|
|
stream, err := client.SendPayment(ctx)
|
|
if err != nil {
|
|
grpclog.Infof("Failed to start streaming: %v", err)
|
|
return nil, metadata, err
|
|
}
|
|
dec := marshaler.NewDecoder(req.Body)
|
|
handleSend := func() error {
|
|
var protoReq SendRequest
|
|
err := dec.Decode(&protoReq)
|
|
if err == io.EOF {
|
|
return err
|
|
}
|
|
if err != nil {
|
|
grpclog.Infof("Failed to decode request: %v", err)
|
|
return err
|
|
}
|
|
if err := stream.Send(&protoReq); err != nil {
|
|
grpclog.Infof("Failed to send request: %v", err)
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
if err := handleSend(); err != nil {
|
|
if cerr := stream.CloseSend(); cerr != nil {
|
|
grpclog.Infof("Failed to terminate client stream: %v", cerr)
|
|
}
|
|
if err == io.EOF {
|
|
return stream, metadata, nil
|
|
}
|
|
return nil, metadata, err
|
|
}
|
|
go func() {
|
|
for {
|
|
if err := handleSend(); err != nil {
|
|
break
|
|
}
|
|
}
|
|
if err := stream.CloseSend(); err != nil {
|
|
grpclog.Infof("Failed to terminate client stream: %v", err)
|
|
}
|
|
}()
|
|
header, err := stream.Header()
|
|
if err != nil {
|
|
grpclog.Infof("Failed to get header from client: %v", err)
|
|
return nil, metadata, err
|
|
}
|
|
metadata.HeaderMD = header
|
|
return stream, metadata, nil
|
|
}
|
|
|
|
func request_Lightning_SendPaymentSync_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq SendRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.SendPaymentSync(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_SendPaymentSync_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq SendRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.SendPaymentSync(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_SendToRouteSync_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq SendToRouteRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.SendToRouteSync(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_SendToRouteSync_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq SendToRouteRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.SendToRouteSync(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_AddInvoice_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq Invoice
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.AddInvoice(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_AddInvoice_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq Invoice
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.AddInvoice(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_ListInvoices_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
)
|
|
|
|
func request_Lightning_ListInvoices_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListInvoiceRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_ListInvoices_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.ListInvoices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_ListInvoices_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListInvoiceRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_ListInvoices_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.ListInvoices(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_LookupInvoice_0 = &utilities.DoubleArray{Encoding: map[string]int{"r_hash_str": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
|
|
)
|
|
|
|
func request_Lightning_LookupInvoice_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq PaymentHash
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["r_hash_str"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "r_hash_str")
|
|
}
|
|
|
|
protoReq.RHashStr, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "r_hash_str", 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_LookupInvoice_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.LookupInvoice(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_LookupInvoice_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq PaymentHash
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["r_hash_str"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "r_hash_str")
|
|
}
|
|
|
|
protoReq.RHashStr, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "r_hash_str", 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_LookupInvoice_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.LookupInvoice(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_SubscribeInvoices_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
)
|
|
|
|
func request_Lightning_SubscribeInvoices_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (Lightning_SubscribeInvoicesClient, runtime.ServerMetadata, error) {
|
|
var protoReq InvoiceSubscription
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_SubscribeInvoices_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
stream, err := client.SubscribeInvoices(ctx, &protoReq)
|
|
if err != nil {
|
|
return nil, metadata, err
|
|
}
|
|
header, err := stream.Header()
|
|
if err != nil {
|
|
return nil, metadata, err
|
|
}
|
|
metadata.HeaderMD = header
|
|
return stream, metadata, nil
|
|
|
|
}
|
|
|
|
func request_Lightning_DecodePayReq_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq PayReqString
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["pay_req"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pay_req")
|
|
}
|
|
|
|
protoReq.PayReq, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pay_req", err)
|
|
}
|
|
|
|
msg, err := client.DecodePayReq(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_DecodePayReq_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq PayReqString
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["pay_req"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pay_req")
|
|
}
|
|
|
|
protoReq.PayReq, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pay_req", err)
|
|
}
|
|
|
|
msg, err := server.DecodePayReq(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_ListPayments_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
)
|
|
|
|
func request_Lightning_ListPayments_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListPaymentsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_ListPayments_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.ListPayments(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_ListPayments_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListPaymentsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_ListPayments_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.ListPayments(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_DeletePayment_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
)
|
|
|
|
func request_Lightning_DeletePayment_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DeletePaymentRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_DeletePayment_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.DeletePayment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_DeletePayment_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DeletePaymentRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_DeletePayment_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.DeletePayment(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_DeleteAllPayments_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
)
|
|
|
|
func request_Lightning_DeleteAllPayments_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DeleteAllPaymentsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_DeleteAllPayments_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.DeleteAllPayments(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_DeleteAllPayments_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DeleteAllPaymentsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_DeleteAllPayments_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.DeleteAllPayments(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_DescribeGraph_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
)
|
|
|
|
func request_Lightning_DescribeGraph_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ChannelGraphRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_DescribeGraph_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.DescribeGraph(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_DescribeGraph_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ChannelGraphRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_DescribeGraph_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.DescribeGraph(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_GetNodeMetrics_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
)
|
|
|
|
func request_Lightning_GetNodeMetrics_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq NodeMetricsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_GetNodeMetrics_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.GetNodeMetrics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_GetNodeMetrics_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq NodeMetricsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_GetNodeMetrics_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.GetNodeMetrics(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
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
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["chan_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chan_id")
|
|
}
|
|
|
|
protoReq.ChanId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chan_id", err)
|
|
}
|
|
|
|
msg, err := client.GetChanInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_GetChanInfo_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ChanInfoRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["chan_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chan_id")
|
|
}
|
|
|
|
protoReq.ChanId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chan_id", err)
|
|
}
|
|
|
|
msg, err := server.GetChanInfo(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_GetNodeInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{"pub_key": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
|
|
)
|
|
|
|
func request_Lightning_GetNodeInfo_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq NodeInfoRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["pub_key"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pub_key")
|
|
}
|
|
|
|
protoReq.PubKey, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pub_key", 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_GetNodeInfo_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.GetNodeInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_GetNodeInfo_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq NodeInfoRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["pub_key"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pub_key")
|
|
}
|
|
|
|
protoReq.PubKey, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pub_key", 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_GetNodeInfo_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.GetNodeInfo(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_QueryRoutes_0 = &utilities.DoubleArray{Encoding: map[string]int{"pub_key": 0, "amt": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}}
|
|
)
|
|
|
|
func request_Lightning_QueryRoutes_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq QueryRoutesRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["pub_key"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pub_key")
|
|
}
|
|
|
|
protoReq.PubKey, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pub_key", err)
|
|
}
|
|
|
|
val, ok = pathParams["amt"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "amt")
|
|
}
|
|
|
|
protoReq.Amt, err = runtime.Int64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "amt", 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_QueryRoutes_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.QueryRoutes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_QueryRoutes_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq QueryRoutesRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["pub_key"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pub_key")
|
|
}
|
|
|
|
protoReq.PubKey, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pub_key", err)
|
|
}
|
|
|
|
val, ok = pathParams["amt"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "amt")
|
|
}
|
|
|
|
protoReq.Amt, err = runtime.Int64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "amt", 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_QueryRoutes_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.QueryRoutes(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_QueryRoutes_1(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq QueryRoutesRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["pub_key"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pub_key")
|
|
}
|
|
|
|
protoReq.PubKey, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pub_key", err)
|
|
}
|
|
|
|
val, ok = pathParams["amt"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "amt")
|
|
}
|
|
|
|
protoReq.Amt, err = runtime.Int64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "amt", err)
|
|
}
|
|
|
|
msg, err := client.QueryRoutes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_QueryRoutes_1(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq QueryRoutesRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["pub_key"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pub_key")
|
|
}
|
|
|
|
protoReq.PubKey, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pub_key", err)
|
|
}
|
|
|
|
val, ok = pathParams["amt"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "amt")
|
|
}
|
|
|
|
protoReq.Amt, err = runtime.Int64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "amt", err)
|
|
}
|
|
|
|
msg, err := server.QueryRoutes(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_GetNetworkInfo_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq NetworkInfoRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := client.GetNetworkInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_GetNetworkInfo_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq NetworkInfoRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := server.GetNetworkInfo(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_StopDaemon_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq StopRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.StopDaemon(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_StopDaemon_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq StopRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.StopDaemon(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_SubscribeChannelGraph_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (Lightning_SubscribeChannelGraphClient, runtime.ServerMetadata, error) {
|
|
var protoReq GraphTopologySubscription
|
|
var metadata runtime.ServerMetadata
|
|
|
|
stream, err := client.SubscribeChannelGraph(ctx, &protoReq)
|
|
if err != nil {
|
|
return nil, metadata, err
|
|
}
|
|
header, err := stream.Header()
|
|
if err != nil {
|
|
return nil, metadata, err
|
|
}
|
|
metadata.HeaderMD = header
|
|
return stream, metadata, nil
|
|
|
|
}
|
|
|
|
func request_Lightning_DebugLevel_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DebugLevelRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.DebugLevel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_DebugLevel_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DebugLevelRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.DebugLevel(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_FeeReport_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq FeeReportRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := client.FeeReport(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_FeeReport_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq FeeReportRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := server.FeeReport(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_UpdateChannelPolicy_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq PolicyUpdateRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.UpdateChannelPolicy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_UpdateChannelPolicy_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq PolicyUpdateRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.UpdateChannelPolicy(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_ForwardingHistory_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ForwardingHistoryRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.ForwardingHistory(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_ForwardingHistory_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ForwardingHistoryRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.ForwardingHistory(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_Lightning_ExportChannelBackup_0 = &utilities.DoubleArray{Encoding: map[string]int{"chan_point": 0, "funding_txid_str": 1, "output_index": 2}, Base: []int{1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 2, 3, 4}}
|
|
)
|
|
|
|
func request_Lightning_ExportChannelBackup_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ExportChannelBackupRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["chan_point.funding_txid_str"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chan_point.funding_txid_str")
|
|
}
|
|
|
|
err = runtime.PopulateFieldFromPath(&protoReq, "chan_point.funding_txid_str", val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chan_point.funding_txid_str", err)
|
|
}
|
|
|
|
val, ok = pathParams["chan_point.output_index"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chan_point.output_index")
|
|
}
|
|
|
|
err = runtime.PopulateFieldFromPath(&protoReq, "chan_point.output_index", val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chan_point.output_index", 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_ExportChannelBackup_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.ExportChannelBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_ExportChannelBackup_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ExportChannelBackupRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["chan_point.funding_txid_str"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chan_point.funding_txid_str")
|
|
}
|
|
|
|
err = runtime.PopulateFieldFromPath(&protoReq, "chan_point.funding_txid_str", val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chan_point.funding_txid_str", err)
|
|
}
|
|
|
|
val, ok = pathParams["chan_point.output_index"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chan_point.output_index")
|
|
}
|
|
|
|
err = runtime.PopulateFieldFromPath(&protoReq, "chan_point.output_index", val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chan_point.output_index", 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_ExportChannelBackup_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.ExportChannelBackup(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_ExportAllChannelBackups_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ChanBackupExportRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := client.ExportAllChannelBackups(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_ExportAllChannelBackups_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ChanBackupExportRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := server.ExportAllChannelBackups(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_VerifyChanBackup_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ChanBackupSnapshot
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.VerifyChanBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_VerifyChanBackup_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ChanBackupSnapshot
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.VerifyChanBackup(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_RestoreChannelBackups_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq RestoreChanBackupRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.RestoreChannelBackups(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_RestoreChannelBackups_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq RestoreChanBackupRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.RestoreChannelBackups(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_SubscribeChannelBackups_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (Lightning_SubscribeChannelBackupsClient, runtime.ServerMetadata, error) {
|
|
var protoReq ChannelBackupSubscription
|
|
var metadata runtime.ServerMetadata
|
|
|
|
stream, err := client.SubscribeChannelBackups(ctx, &protoReq)
|
|
if err != nil {
|
|
return nil, metadata, err
|
|
}
|
|
header, err := stream.Header()
|
|
if err != nil {
|
|
return nil, metadata, err
|
|
}
|
|
metadata.HeaderMD = header
|
|
return stream, metadata, nil
|
|
|
|
}
|
|
|
|
func request_Lightning_BakeMacaroon_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq BakeMacaroonRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.BakeMacaroon(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_BakeMacaroon_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq BakeMacaroonRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.BakeMacaroon(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_ListMacaroonIDs_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListMacaroonIDsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := client.ListMacaroonIDs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_ListMacaroonIDs_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListMacaroonIDsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := server.ListMacaroonIDs(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_DeleteMacaroonID_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DeleteMacaroonIDRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["root_key_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "root_key_id")
|
|
}
|
|
|
|
protoReq.RootKeyId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "root_key_id", err)
|
|
}
|
|
|
|
msg, err := client.DeleteMacaroonID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_DeleteMacaroonID_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DeleteMacaroonIDRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["root_key_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "root_key_id")
|
|
}
|
|
|
|
protoReq.RootKeyId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "root_key_id", err)
|
|
}
|
|
|
|
msg, err := server.DeleteMacaroonID(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_ListPermissions_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListPermissionsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := client.ListPermissions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_ListPermissions_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListPermissionsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := server.ListPermissions(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_CheckMacaroonPermissions_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq CheckMacPermRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.CheckMacaroonPermissions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_CheckMacaroonPermissions_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq CheckMacPermRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.CheckMacaroonPermissions(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_RegisterRPCMiddleware_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (Lightning_RegisterRPCMiddlewareClient, runtime.ServerMetadata, error) {
|
|
var metadata runtime.ServerMetadata
|
|
stream, err := client.RegisterRPCMiddleware(ctx)
|
|
if err != nil {
|
|
grpclog.Infof("Failed to start streaming: %v", err)
|
|
return nil, metadata, err
|
|
}
|
|
dec := marshaler.NewDecoder(req.Body)
|
|
handleSend := func() error {
|
|
var protoReq RPCMiddlewareResponse
|
|
err := dec.Decode(&protoReq)
|
|
if err == io.EOF {
|
|
return err
|
|
}
|
|
if err != nil {
|
|
grpclog.Infof("Failed to decode request: %v", err)
|
|
return err
|
|
}
|
|
if err := stream.Send(&protoReq); err != nil {
|
|
grpclog.Infof("Failed to send request: %v", err)
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
if err := handleSend(); err != nil {
|
|
if cerr := stream.CloseSend(); cerr != nil {
|
|
grpclog.Infof("Failed to terminate client stream: %v", cerr)
|
|
}
|
|
if err == io.EOF {
|
|
return stream, metadata, nil
|
|
}
|
|
return nil, metadata, err
|
|
}
|
|
go func() {
|
|
for {
|
|
if err := handleSend(); err != nil {
|
|
break
|
|
}
|
|
}
|
|
if err := stream.CloseSend(); err != nil {
|
|
grpclog.Infof("Failed to terminate client stream: %v", err)
|
|
}
|
|
}()
|
|
header, err := stream.Header()
|
|
if err != nil {
|
|
grpclog.Infof("Failed to get header from client: %v", err)
|
|
return nil, metadata, err
|
|
}
|
|
metadata.HeaderMD = header
|
|
return stream, metadata, nil
|
|
}
|
|
|
|
func request_Lightning_SendCustomMessage_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq SendCustomMessageRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.SendCustomMessage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_SendCustomMessage_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq SendCustomMessageRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
|
if berr != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
|
}
|
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.SendCustomMessage(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_SubscribeCustomMessages_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (Lightning_SubscribeCustomMessagesClient, runtime.ServerMetadata, error) {
|
|
var protoReq SubscribeCustomMessagesRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
stream, err := client.SubscribeCustomMessages(ctx, &protoReq)
|
|
if err != nil {
|
|
return nil, metadata, err
|
|
}
|
|
header, err := stream.Header()
|
|
if err != nil {
|
|
return nil, metadata, err
|
|
}
|
|
metadata.HeaderMD = header
|
|
return stream, metadata, nil
|
|
|
|
}
|
|
|
|
func request_Lightning_ListAliases_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListAliasesRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := client.ListAliases(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_ListAliases_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListAliasesRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := server.ListAliases(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_Lightning_LookupHtlc_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq LookupHtlcRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["chan_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chan_id")
|
|
}
|
|
|
|
protoReq.ChanId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chan_id", err)
|
|
}
|
|
|
|
val, ok = pathParams["htlc_index"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "htlc_index")
|
|
}
|
|
|
|
protoReq.HtlcIndex, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "htlc_index", err)
|
|
}
|
|
|
|
msg, err := client.LookupHtlc(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_Lightning_LookupHtlc_0(ctx context.Context, marshaler runtime.Marshaler, server LightningServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq LookupHtlcRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["chan_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chan_id")
|
|
}
|
|
|
|
protoReq.ChanId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chan_id", err)
|
|
}
|
|
|
|
val, ok = pathParams["htlc_index"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "htlc_index")
|
|
}
|
|
|
|
protoReq.HtlcIndex, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "htlc_index", err)
|
|
}
|
|
|
|
msg, err := server.LookupHtlc(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
// RegisterLightningHandlerServer registers the http handlers for service Lightning to "mux".
|
|
// UnaryRPC :call LightningServer directly.
|
|
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
|
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterLightningHandlerFromEndpoint instead.
|
|
func RegisterLightningHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LightningServer) error {
|
|
|
|
mux.Handle("GET", pattern_Lightning_WalletBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/WalletBalance", runtime.WithHTTPPathPattern("/v1/balance/blockchain"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_WalletBalance_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_WalletBalance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ChannelBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/ChannelBalance", runtime.WithHTTPPathPattern("/v1/balance/channels"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_ChannelBalance_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ChannelBalance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_GetTransactions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/GetTransactions", runtime.WithHTTPPathPattern("/v1/transactions"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_GetTransactions_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_GetTransactions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_EstimateFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/EstimateFee", runtime.WithHTTPPathPattern("/v1/transactions/fee"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_EstimateFee_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_EstimateFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_SendCoins_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/SendCoins", runtime.WithHTTPPathPattern("/v1/transactions"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_SendCoins_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_SendCoins_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ListUnspent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/ListUnspent", runtime.WithHTTPPathPattern("/v1/utxos"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_ListUnspent_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ListUnspent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_SubscribeTransactions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
|
|
_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_SendMany_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/SendMany", runtime.WithHTTPPathPattern("/v1/transactions/many"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_SendMany_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_SendMany_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_NewAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/NewAddress", runtime.WithHTTPPathPattern("/v1/newaddress"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_NewAddress_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_NewAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_SignMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/SignMessage", runtime.WithHTTPPathPattern("/v1/signmessage"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_SignMessage_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_SignMessage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_VerifyMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/VerifyMessage", runtime.WithHTTPPathPattern("/v1/verifymessage"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_VerifyMessage_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_VerifyMessage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_ConnectPeer_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/ConnectPeer", runtime.WithHTTPPathPattern("/v1/peers"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_ConnectPeer_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ConnectPeer_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("DELETE", pattern_Lightning_DisconnectPeer_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/DisconnectPeer", runtime.WithHTTPPathPattern("/v1/peers/{pub_key}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_DisconnectPeer_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_DisconnectPeer_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ListPeers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/ListPeers", runtime.WithHTTPPathPattern("/v1/peers"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_ListPeers_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ListPeers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_SubscribePeerEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
|
|
_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_GetInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/GetInfo", runtime.WithHTTPPathPattern("/v1/getinfo"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_GetInfo_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_GetInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_GetRecoveryInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/GetRecoveryInfo", runtime.WithHTTPPathPattern("/v1/getrecoveryinfo"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_GetRecoveryInfo_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_GetRecoveryInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_PendingChannels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/PendingChannels", runtime.WithHTTPPathPattern("/v1/channels/pending"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_PendingChannels_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_PendingChannels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ListChannels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/ListChannels", runtime.WithHTTPPathPattern("/v1/channels"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_ListChannels_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ListChannels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_SubscribeChannelEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
|
|
_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ClosedChannels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/ClosedChannels", runtime.WithHTTPPathPattern("/v1/channels/closed"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_ClosedChannels_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ClosedChannels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_OpenChannelSync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/OpenChannelSync", runtime.WithHTTPPathPattern("/v1/channels"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_OpenChannelSync_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_OpenChannelSync_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_OpenChannel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
|
|
_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_BatchOpenChannel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/BatchOpenChannel", runtime.WithHTTPPathPattern("/v1/channels/batch"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_BatchOpenChannel_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_BatchOpenChannel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_FundingStateStep_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/FundingStateStep", runtime.WithHTTPPathPattern("/v1/funding/step"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_FundingStateStep_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_FundingStateStep_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_ChannelAcceptor_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
|
|
_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
})
|
|
|
|
mux.Handle("DELETE", pattern_Lightning_CloseChannel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
|
|
_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
})
|
|
|
|
mux.Handle("DELETE", pattern_Lightning_AbandonChannel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/AbandonChannel", runtime.WithHTTPPathPattern("/v1/channels/abandon/{channel_point.funding_txid_str}/{channel_point.output_index}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_AbandonChannel_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_AbandonChannel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_SendPayment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
|
|
_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_SendPaymentSync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/SendPaymentSync", runtime.WithHTTPPathPattern("/v1/channels/transactions"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_SendPaymentSync_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_SendPaymentSync_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_SendToRouteSync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/SendToRouteSync", runtime.WithHTTPPathPattern("/v1/channels/transactions/route"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_SendToRouteSync_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_SendToRouteSync_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_AddInvoice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/AddInvoice", runtime.WithHTTPPathPattern("/v1/invoices"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_AddInvoice_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_AddInvoice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ListInvoices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/ListInvoices", runtime.WithHTTPPathPattern("/v1/invoices"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_ListInvoices_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ListInvoices_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_LookupInvoice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/LookupInvoice", runtime.WithHTTPPathPattern("/v1/invoice/{r_hash_str}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_LookupInvoice_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_LookupInvoice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_SubscribeInvoices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
|
|
_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_DecodePayReq_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/DecodePayReq", runtime.WithHTTPPathPattern("/v1/payreq/{pay_req}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_DecodePayReq_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_DecodePayReq_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ListPayments_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/ListPayments", runtime.WithHTTPPathPattern("/v1/payments"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_ListPayments_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ListPayments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("DELETE", pattern_Lightning_DeletePayment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/DeletePayment", runtime.WithHTTPPathPattern("/v1/payment"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_DeletePayment_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_DeletePayment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("DELETE", pattern_Lightning_DeleteAllPayments_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/DeleteAllPayments", runtime.WithHTTPPathPattern("/v1/payments"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_DeleteAllPayments_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_DeleteAllPayments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_DescribeGraph_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/DescribeGraph", runtime.WithHTTPPathPattern("/v1/graph"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_DescribeGraph_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_DescribeGraph_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_GetNodeMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/GetNodeMetrics", runtime.WithHTTPPathPattern("/v1/graph/nodemetrics"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_GetNodeMetrics_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_GetNodeMetrics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_GetChanInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/GetChanInfo", runtime.WithHTTPPathPattern("/v1/graph/edge/{chan_id}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_GetChanInfo_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_GetChanInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_GetNodeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/GetNodeInfo", runtime.WithHTTPPathPattern("/v1/graph/node/{pub_key}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_GetNodeInfo_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_GetNodeInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_QueryRoutes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/QueryRoutes", runtime.WithHTTPPathPattern("/v1/graph/routes/{pub_key}/{amt}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_QueryRoutes_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_QueryRoutes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_QueryRoutes_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/QueryRoutes", runtime.WithHTTPPathPattern("/v1/graph/routes/{pub_key}/{amt}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_QueryRoutes_1(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_QueryRoutes_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_GetNetworkInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/GetNetworkInfo", runtime.WithHTTPPathPattern("/v1/graph/info"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_GetNetworkInfo_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_GetNetworkInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_StopDaemon_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/StopDaemon", runtime.WithHTTPPathPattern("/v1/stop"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_StopDaemon_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_StopDaemon_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_SubscribeChannelGraph_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
|
|
_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_DebugLevel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/DebugLevel", runtime.WithHTTPPathPattern("/v1/debuglevel"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_DebugLevel_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_DebugLevel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_FeeReport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/FeeReport", runtime.WithHTTPPathPattern("/v1/fees"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_FeeReport_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_FeeReport_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_UpdateChannelPolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/UpdateChannelPolicy", runtime.WithHTTPPathPattern("/v1/chanpolicy"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_UpdateChannelPolicy_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_UpdateChannelPolicy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_ForwardingHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/ForwardingHistory", runtime.WithHTTPPathPattern("/v1/switch"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_ForwardingHistory_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ForwardingHistory_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ExportChannelBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/ExportChannelBackup", runtime.WithHTTPPathPattern("/v1/channels/backup/{chan_point.funding_txid_str}/{chan_point.output_index}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_ExportChannelBackup_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ExportChannelBackup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ExportAllChannelBackups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/ExportAllChannelBackups", runtime.WithHTTPPathPattern("/v1/channels/backup"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_ExportAllChannelBackups_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ExportAllChannelBackups_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_VerifyChanBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/VerifyChanBackup", runtime.WithHTTPPathPattern("/v1/channels/backup/verify"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_VerifyChanBackup_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_VerifyChanBackup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_RestoreChannelBackups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/RestoreChannelBackups", runtime.WithHTTPPathPattern("/v1/channels/backup/restore"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_RestoreChannelBackups_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_RestoreChannelBackups_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_SubscribeChannelBackups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
|
|
_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_BakeMacaroon_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/BakeMacaroon", runtime.WithHTTPPathPattern("/v1/macaroon"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_BakeMacaroon_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_BakeMacaroon_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ListMacaroonIDs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/ListMacaroonIDs", runtime.WithHTTPPathPattern("/v1/macaroon/ids"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_ListMacaroonIDs_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ListMacaroonIDs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("DELETE", pattern_Lightning_DeleteMacaroonID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/DeleteMacaroonID", runtime.WithHTTPPathPattern("/v1/macaroon/{root_key_id}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_DeleteMacaroonID_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_DeleteMacaroonID_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ListPermissions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/ListPermissions", runtime.WithHTTPPathPattern("/v1/macaroon/permissions"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_ListPermissions_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ListPermissions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_CheckMacaroonPermissions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/CheckMacaroonPermissions", runtime.WithHTTPPathPattern("/v1/macaroon/checkpermissions"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_CheckMacaroonPermissions_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_CheckMacaroonPermissions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_RegisterRPCMiddleware_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
|
|
_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_SendCustomMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/SendCustomMessage", runtime.WithHTTPPathPattern("/v1/custommessage"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_SendCustomMessage_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_SendCustomMessage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_SubscribeCustomMessages_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
|
|
_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ListAliases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/ListAliases", runtime.WithHTTPPathPattern("/v1/aliases/list"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_ListAliases_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ListAliases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_LookupHtlc_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lnrpc.Lightning/LookupHtlc", runtime.WithHTTPPathPattern("/v1/htlc/{chan_id}/{htlc_index}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_Lightning_LookupHtlc_0(rctx, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_LookupHtlc_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
return nil
|
|
}
|
|
|
|
// RegisterLightningHandlerFromEndpoint is same as RegisterLightningHandler but
|
|
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
|
func RegisterLightningHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
|
conn, err := grpc.Dial(endpoint, opts...)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
defer func() {
|
|
if err != nil {
|
|
if cerr := conn.Close(); cerr != nil {
|
|
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
|
}
|
|
return
|
|
}
|
|
go func() {
|
|
<-ctx.Done()
|
|
if cerr := conn.Close(); cerr != nil {
|
|
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
|
}
|
|
}()
|
|
}()
|
|
|
|
return RegisterLightningHandler(ctx, mux, conn)
|
|
}
|
|
|
|
// RegisterLightningHandler registers the http handlers for service Lightning to "mux".
|
|
// The handlers forward requests to the grpc endpoint over "conn".
|
|
func RegisterLightningHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
|
|
return RegisterLightningHandlerClient(ctx, mux, NewLightningClient(conn))
|
|
}
|
|
|
|
// RegisterLightningHandlerClient registers the http handlers for service Lightning
|
|
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "LightningClient".
|
|
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "LightningClient"
|
|
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
|
// "LightningClient" to call the correct interceptors.
|
|
func RegisterLightningHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LightningClient) error {
|
|
|
|
mux.Handle("GET", pattern_Lightning_WalletBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/WalletBalance", runtime.WithHTTPPathPattern("/v1/balance/blockchain"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_WalletBalance_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_WalletBalance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ChannelBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/ChannelBalance", runtime.WithHTTPPathPattern("/v1/balance/channels"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_ChannelBalance_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ChannelBalance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_GetTransactions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/GetTransactions", runtime.WithHTTPPathPattern("/v1/transactions"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_GetTransactions_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_GetTransactions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_EstimateFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/EstimateFee", runtime.WithHTTPPathPattern("/v1/transactions/fee"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_EstimateFee_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_EstimateFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_SendCoins_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/SendCoins", runtime.WithHTTPPathPattern("/v1/transactions"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_SendCoins_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_SendCoins_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ListUnspent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/ListUnspent", runtime.WithHTTPPathPattern("/v1/utxos"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_ListUnspent_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ListUnspent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_SubscribeTransactions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/SubscribeTransactions", runtime.WithHTTPPathPattern("/v1/transactions/subscribe"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_SubscribeTransactions_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_SubscribeTransactions_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_SendMany_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/SendMany", runtime.WithHTTPPathPattern("/v1/transactions/many"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_SendMany_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_SendMany_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_NewAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/NewAddress", runtime.WithHTTPPathPattern("/v1/newaddress"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_NewAddress_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_NewAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_SignMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/SignMessage", runtime.WithHTTPPathPattern("/v1/signmessage"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_SignMessage_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_SignMessage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_VerifyMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/VerifyMessage", runtime.WithHTTPPathPattern("/v1/verifymessage"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_VerifyMessage_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_VerifyMessage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_ConnectPeer_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/ConnectPeer", runtime.WithHTTPPathPattern("/v1/peers"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_ConnectPeer_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ConnectPeer_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("DELETE", pattern_Lightning_DisconnectPeer_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/DisconnectPeer", runtime.WithHTTPPathPattern("/v1/peers/{pub_key}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_DisconnectPeer_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_DisconnectPeer_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ListPeers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/ListPeers", runtime.WithHTTPPathPattern("/v1/peers"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_ListPeers_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ListPeers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_SubscribePeerEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/SubscribePeerEvents", runtime.WithHTTPPathPattern("/v1/peers/subscribe"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_SubscribePeerEvents_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_SubscribePeerEvents_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_GetInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/GetInfo", runtime.WithHTTPPathPattern("/v1/getinfo"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_GetInfo_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_GetInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_GetRecoveryInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/GetRecoveryInfo", runtime.WithHTTPPathPattern("/v1/getrecoveryinfo"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_GetRecoveryInfo_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_GetRecoveryInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_PendingChannels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/PendingChannels", runtime.WithHTTPPathPattern("/v1/channels/pending"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_PendingChannels_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_PendingChannels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ListChannels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/ListChannels", runtime.WithHTTPPathPattern("/v1/channels"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_ListChannels_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ListChannels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_SubscribeChannelEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/SubscribeChannelEvents", runtime.WithHTTPPathPattern("/v1/channels/subscribe"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_SubscribeChannelEvents_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_SubscribeChannelEvents_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ClosedChannels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/ClosedChannels", runtime.WithHTTPPathPattern("/v1/channels/closed"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_ClosedChannels_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ClosedChannels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_OpenChannelSync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/OpenChannelSync", runtime.WithHTTPPathPattern("/v1/channels"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_OpenChannelSync_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_OpenChannelSync_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_OpenChannel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/OpenChannel", runtime.WithHTTPPathPattern("/v1/channels/stream"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_OpenChannel_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_OpenChannel_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_BatchOpenChannel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/BatchOpenChannel", runtime.WithHTTPPathPattern("/v1/channels/batch"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_BatchOpenChannel_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_BatchOpenChannel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_FundingStateStep_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/FundingStateStep", runtime.WithHTTPPathPattern("/v1/funding/step"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_FundingStateStep_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_FundingStateStep_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_ChannelAcceptor_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/ChannelAcceptor", runtime.WithHTTPPathPattern("/v1/channels/acceptor"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_ChannelAcceptor_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ChannelAcceptor_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("DELETE", pattern_Lightning_CloseChannel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/CloseChannel", runtime.WithHTTPPathPattern("/v1/channels/{channel_point.funding_txid_str}/{channel_point.output_index}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_CloseChannel_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_CloseChannel_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("DELETE", pattern_Lightning_AbandonChannel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/AbandonChannel", runtime.WithHTTPPathPattern("/v1/channels/abandon/{channel_point.funding_txid_str}/{channel_point.output_index}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_AbandonChannel_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_AbandonChannel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_SendPayment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/SendPayment", runtime.WithHTTPPathPattern("/v1/channels/transaction-stream"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_SendPayment_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_SendPayment_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_SendPaymentSync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/SendPaymentSync", runtime.WithHTTPPathPattern("/v1/channels/transactions"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_SendPaymentSync_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_SendPaymentSync_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_SendToRouteSync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/SendToRouteSync", runtime.WithHTTPPathPattern("/v1/channels/transactions/route"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_SendToRouteSync_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_SendToRouteSync_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_AddInvoice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/AddInvoice", runtime.WithHTTPPathPattern("/v1/invoices"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_AddInvoice_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_AddInvoice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ListInvoices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/ListInvoices", runtime.WithHTTPPathPattern("/v1/invoices"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_ListInvoices_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ListInvoices_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_LookupInvoice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/LookupInvoice", runtime.WithHTTPPathPattern("/v1/invoice/{r_hash_str}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_LookupInvoice_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_LookupInvoice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_SubscribeInvoices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/SubscribeInvoices", runtime.WithHTTPPathPattern("/v1/invoices/subscribe"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_SubscribeInvoices_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_SubscribeInvoices_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_DecodePayReq_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/DecodePayReq", runtime.WithHTTPPathPattern("/v1/payreq/{pay_req}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_DecodePayReq_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_DecodePayReq_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ListPayments_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/ListPayments", runtime.WithHTTPPathPattern("/v1/payments"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_ListPayments_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ListPayments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("DELETE", pattern_Lightning_DeletePayment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/DeletePayment", runtime.WithHTTPPathPattern("/v1/payment"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_DeletePayment_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_DeletePayment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("DELETE", pattern_Lightning_DeleteAllPayments_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/DeleteAllPayments", runtime.WithHTTPPathPattern("/v1/payments"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_DeleteAllPayments_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_DeleteAllPayments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_DescribeGraph_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/DescribeGraph", runtime.WithHTTPPathPattern("/v1/graph"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_DescribeGraph_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_DescribeGraph_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_GetNodeMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/GetNodeMetrics", runtime.WithHTTPPathPattern("/v1/graph/nodemetrics"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_GetNodeMetrics_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_GetNodeMetrics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_GetChanInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/GetChanInfo", runtime.WithHTTPPathPattern("/v1/graph/edge/{chan_id}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_GetChanInfo_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_GetChanInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_GetNodeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/GetNodeInfo", runtime.WithHTTPPathPattern("/v1/graph/node/{pub_key}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_GetNodeInfo_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_GetNodeInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_QueryRoutes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/QueryRoutes", runtime.WithHTTPPathPattern("/v1/graph/routes/{pub_key}/{amt}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_QueryRoutes_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_QueryRoutes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_QueryRoutes_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/QueryRoutes", runtime.WithHTTPPathPattern("/v1/graph/routes/{pub_key}/{amt}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_QueryRoutes_1(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_QueryRoutes_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_GetNetworkInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/GetNetworkInfo", runtime.WithHTTPPathPattern("/v1/graph/info"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_GetNetworkInfo_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_GetNetworkInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_StopDaemon_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/StopDaemon", runtime.WithHTTPPathPattern("/v1/stop"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_StopDaemon_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_StopDaemon_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_SubscribeChannelGraph_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/SubscribeChannelGraph", runtime.WithHTTPPathPattern("/v1/graph/subscribe"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_SubscribeChannelGraph_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_SubscribeChannelGraph_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_DebugLevel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/DebugLevel", runtime.WithHTTPPathPattern("/v1/debuglevel"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_DebugLevel_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_DebugLevel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_FeeReport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/FeeReport", runtime.WithHTTPPathPattern("/v1/fees"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_FeeReport_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_FeeReport_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_UpdateChannelPolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/UpdateChannelPolicy", runtime.WithHTTPPathPattern("/v1/chanpolicy"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_UpdateChannelPolicy_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_UpdateChannelPolicy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_ForwardingHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/ForwardingHistory", runtime.WithHTTPPathPattern("/v1/switch"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_ForwardingHistory_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ForwardingHistory_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ExportChannelBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/ExportChannelBackup", runtime.WithHTTPPathPattern("/v1/channels/backup/{chan_point.funding_txid_str}/{chan_point.output_index}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_ExportChannelBackup_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ExportChannelBackup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ExportAllChannelBackups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/ExportAllChannelBackups", runtime.WithHTTPPathPattern("/v1/channels/backup"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_ExportAllChannelBackups_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ExportAllChannelBackups_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_VerifyChanBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/VerifyChanBackup", runtime.WithHTTPPathPattern("/v1/channels/backup/verify"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_VerifyChanBackup_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_VerifyChanBackup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_RestoreChannelBackups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/RestoreChannelBackups", runtime.WithHTTPPathPattern("/v1/channels/backup/restore"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_RestoreChannelBackups_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_RestoreChannelBackups_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_SubscribeChannelBackups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/SubscribeChannelBackups", runtime.WithHTTPPathPattern("/v1/channels/backup/subscribe"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_SubscribeChannelBackups_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_SubscribeChannelBackups_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_BakeMacaroon_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/BakeMacaroon", runtime.WithHTTPPathPattern("/v1/macaroon"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_BakeMacaroon_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_BakeMacaroon_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ListMacaroonIDs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/ListMacaroonIDs", runtime.WithHTTPPathPattern("/v1/macaroon/ids"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_ListMacaroonIDs_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ListMacaroonIDs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("DELETE", pattern_Lightning_DeleteMacaroonID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/DeleteMacaroonID", runtime.WithHTTPPathPattern("/v1/macaroon/{root_key_id}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_DeleteMacaroonID_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_DeleteMacaroonID_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ListPermissions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/ListPermissions", runtime.WithHTTPPathPattern("/v1/macaroon/permissions"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_ListPermissions_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ListPermissions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_CheckMacaroonPermissions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/CheckMacaroonPermissions", runtime.WithHTTPPathPattern("/v1/macaroon/checkpermissions"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_CheckMacaroonPermissions_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_CheckMacaroonPermissions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_RegisterRPCMiddleware_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/RegisterRPCMiddleware", runtime.WithHTTPPathPattern("/v1/middleware"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_RegisterRPCMiddleware_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_RegisterRPCMiddleware_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_Lightning_SendCustomMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/SendCustomMessage", runtime.WithHTTPPathPattern("/v1/custommessage"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_SendCustomMessage_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_SendCustomMessage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_SubscribeCustomMessages_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/SubscribeCustomMessages", runtime.WithHTTPPathPattern("/v1/custommessage/subscribe"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_SubscribeCustomMessages_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_SubscribeCustomMessages_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_ListAliases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/ListAliases", runtime.WithHTTPPathPattern("/v1/aliases/list"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_ListAliases_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_ListAliases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_Lightning_LookupHtlc_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/lnrpc.Lightning/LookupHtlc", runtime.WithHTTPPathPattern("/v1/htlc/{chan_id}/{htlc_index}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_Lightning_LookupHtlc_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_Lightning_LookupHtlc_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
return nil
|
|
}
|
|
|
|
var (
|
|
pattern_Lightning_WalletBalance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "balance", "blockchain"}, ""))
|
|
|
|
pattern_Lightning_ChannelBalance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "balance", "channels"}, ""))
|
|
|
|
pattern_Lightning_GetTransactions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "transactions"}, ""))
|
|
|
|
pattern_Lightning_EstimateFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "transactions", "fee"}, ""))
|
|
|
|
pattern_Lightning_SendCoins_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "transactions"}, ""))
|
|
|
|
pattern_Lightning_ListUnspent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "utxos"}, ""))
|
|
|
|
pattern_Lightning_SubscribeTransactions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "transactions", "subscribe"}, ""))
|
|
|
|
pattern_Lightning_SendMany_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "transactions", "many"}, ""))
|
|
|
|
pattern_Lightning_NewAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "newaddress"}, ""))
|
|
|
|
pattern_Lightning_SignMessage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "signmessage"}, ""))
|
|
|
|
pattern_Lightning_VerifyMessage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "verifymessage"}, ""))
|
|
|
|
pattern_Lightning_ConnectPeer_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "peers"}, ""))
|
|
|
|
pattern_Lightning_DisconnectPeer_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "peers", "pub_key"}, ""))
|
|
|
|
pattern_Lightning_ListPeers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "peers"}, ""))
|
|
|
|
pattern_Lightning_SubscribePeerEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "peers", "subscribe"}, ""))
|
|
|
|
pattern_Lightning_GetInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getinfo"}, ""))
|
|
|
|
pattern_Lightning_GetRecoveryInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getrecoveryinfo"}, ""))
|
|
|
|
pattern_Lightning_PendingChannels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "channels", "pending"}, ""))
|
|
|
|
pattern_Lightning_ListChannels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "channels"}, ""))
|
|
|
|
pattern_Lightning_SubscribeChannelEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "channels", "subscribe"}, ""))
|
|
|
|
pattern_Lightning_ClosedChannels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "channels", "closed"}, ""))
|
|
|
|
pattern_Lightning_OpenChannelSync_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "channels"}, ""))
|
|
|
|
pattern_Lightning_OpenChannel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "channels", "stream"}, ""))
|
|
|
|
pattern_Lightning_BatchOpenChannel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "channels", "batch"}, ""))
|
|
|
|
pattern_Lightning_FundingStateStep_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "funding", "step"}, ""))
|
|
|
|
pattern_Lightning_ChannelAcceptor_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "channels", "acceptor"}, ""))
|
|
|
|
pattern_Lightning_CloseChannel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "channels", "channel_point.funding_txid_str", "channel_point.output_index"}, ""))
|
|
|
|
pattern_Lightning_AbandonChannel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"v1", "channels", "abandon", "channel_point.funding_txid_str", "channel_point.output_index"}, ""))
|
|
|
|
pattern_Lightning_SendPayment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "channels", "transaction-stream"}, ""))
|
|
|
|
pattern_Lightning_SendPaymentSync_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "channels", "transactions"}, ""))
|
|
|
|
pattern_Lightning_SendToRouteSync_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "channels", "transactions", "route"}, ""))
|
|
|
|
pattern_Lightning_AddInvoice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "invoices"}, ""))
|
|
|
|
pattern_Lightning_ListInvoices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "invoices"}, ""))
|
|
|
|
pattern_Lightning_LookupInvoice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "invoice", "r_hash_str"}, ""))
|
|
|
|
pattern_Lightning_SubscribeInvoices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "invoices", "subscribe"}, ""))
|
|
|
|
pattern_Lightning_DecodePayReq_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "payreq", "pay_req"}, ""))
|
|
|
|
pattern_Lightning_ListPayments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "payments"}, ""))
|
|
|
|
pattern_Lightning_DeletePayment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "payment"}, ""))
|
|
|
|
pattern_Lightning_DeleteAllPayments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "payments"}, ""))
|
|
|
|
pattern_Lightning_DescribeGraph_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "graph"}, ""))
|
|
|
|
pattern_Lightning_GetNodeMetrics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "graph", "nodemetrics"}, ""))
|
|
|
|
pattern_Lightning_GetChanInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "graph", "edge", "chan_id"}, ""))
|
|
|
|
pattern_Lightning_GetNodeInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "graph", "node", "pub_key"}, ""))
|
|
|
|
pattern_Lightning_QueryRoutes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"v1", "graph", "routes", "pub_key", "amt"}, ""))
|
|
|
|
pattern_Lightning_QueryRoutes_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"v1", "graph", "routes", "pub_key", "amt"}, ""))
|
|
|
|
pattern_Lightning_GetNetworkInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "graph", "info"}, ""))
|
|
|
|
pattern_Lightning_StopDaemon_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "stop"}, ""))
|
|
|
|
pattern_Lightning_SubscribeChannelGraph_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "graph", "subscribe"}, ""))
|
|
|
|
pattern_Lightning_DebugLevel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "debuglevel"}, ""))
|
|
|
|
pattern_Lightning_FeeReport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "fees"}, ""))
|
|
|
|
pattern_Lightning_UpdateChannelPolicy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "chanpolicy"}, ""))
|
|
|
|
pattern_Lightning_ForwardingHistory_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "switch"}, ""))
|
|
|
|
pattern_Lightning_ExportChannelBackup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"v1", "channels", "backup", "chan_point.funding_txid_str", "chan_point.output_index"}, ""))
|
|
|
|
pattern_Lightning_ExportAllChannelBackups_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "channels", "backup"}, ""))
|
|
|
|
pattern_Lightning_VerifyChanBackup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "channels", "backup", "verify"}, ""))
|
|
|
|
pattern_Lightning_RestoreChannelBackups_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "channels", "backup", "restore"}, ""))
|
|
|
|
pattern_Lightning_SubscribeChannelBackups_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "channels", "backup", "subscribe"}, ""))
|
|
|
|
pattern_Lightning_BakeMacaroon_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "macaroon"}, ""))
|
|
|
|
pattern_Lightning_ListMacaroonIDs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "macaroon", "ids"}, ""))
|
|
|
|
pattern_Lightning_DeleteMacaroonID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "macaroon", "root_key_id"}, ""))
|
|
|
|
pattern_Lightning_ListPermissions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "macaroon", "permissions"}, ""))
|
|
|
|
pattern_Lightning_CheckMacaroonPermissions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "macaroon", "checkpermissions"}, ""))
|
|
|
|
pattern_Lightning_RegisterRPCMiddleware_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "middleware"}, ""))
|
|
|
|
pattern_Lightning_SendCustomMessage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "custommessage"}, ""))
|
|
|
|
pattern_Lightning_SubscribeCustomMessages_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "custommessage", "subscribe"}, ""))
|
|
|
|
pattern_Lightning_ListAliases_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "aliases", "list"}, ""))
|
|
|
|
pattern_Lightning_LookupHtlc_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "htlc", "chan_id", "htlc_index"}, ""))
|
|
)
|
|
|
|
var (
|
|
forward_Lightning_WalletBalance_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_ChannelBalance_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_GetTransactions_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_EstimateFee_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_SendCoins_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_ListUnspent_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_SubscribeTransactions_0 = runtime.ForwardResponseStream
|
|
|
|
forward_Lightning_SendMany_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_NewAddress_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_SignMessage_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_VerifyMessage_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_ConnectPeer_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_DisconnectPeer_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_ListPeers_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_SubscribePeerEvents_0 = runtime.ForwardResponseStream
|
|
|
|
forward_Lightning_GetInfo_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_GetRecoveryInfo_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_PendingChannels_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_ListChannels_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_SubscribeChannelEvents_0 = runtime.ForwardResponseStream
|
|
|
|
forward_Lightning_ClosedChannels_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_OpenChannelSync_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_OpenChannel_0 = runtime.ForwardResponseStream
|
|
|
|
forward_Lightning_BatchOpenChannel_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_FundingStateStep_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_ChannelAcceptor_0 = runtime.ForwardResponseStream
|
|
|
|
forward_Lightning_CloseChannel_0 = runtime.ForwardResponseStream
|
|
|
|
forward_Lightning_AbandonChannel_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_SendPayment_0 = runtime.ForwardResponseStream
|
|
|
|
forward_Lightning_SendPaymentSync_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_SendToRouteSync_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_AddInvoice_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_ListInvoices_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_LookupInvoice_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_SubscribeInvoices_0 = runtime.ForwardResponseStream
|
|
|
|
forward_Lightning_DecodePayReq_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_ListPayments_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_DeletePayment_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_DeleteAllPayments_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_DescribeGraph_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_GetNodeMetrics_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_GetChanInfo_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_GetNodeInfo_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_QueryRoutes_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_QueryRoutes_1 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_GetNetworkInfo_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_StopDaemon_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_SubscribeChannelGraph_0 = runtime.ForwardResponseStream
|
|
|
|
forward_Lightning_DebugLevel_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_FeeReport_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_UpdateChannelPolicy_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_ForwardingHistory_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_ExportChannelBackup_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_ExportAllChannelBackups_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_VerifyChanBackup_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_RestoreChannelBackups_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_SubscribeChannelBackups_0 = runtime.ForwardResponseStream
|
|
|
|
forward_Lightning_BakeMacaroon_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_ListMacaroonIDs_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_DeleteMacaroonID_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_ListPermissions_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_CheckMacaroonPermissions_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_RegisterRPCMiddleware_0 = runtime.ForwardResponseStream
|
|
|
|
forward_Lightning_SendCustomMessage_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_SubscribeCustomMessages_0 = runtime.ForwardResponseStream
|
|
|
|
forward_Lightning_ListAliases_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_Lightning_LookupHtlc_0 = runtime.ForwardResponseMessage
|
|
)
|