lnrpc: update grpc-gateway library to v2
This commit is contained in:
70 files changed
+8799
-8287
No files matched your search
@@ -1,18 +1,13 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v3.6.1
|
||||
// source: routerrpc/router.proto
|
||||
|
||||
package routerrpc
|
||||
|
||||
import (
|
||||
context "context"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
lnrpc "github.com/lightningnetwork/lnd/lnrpc"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -26,10 +21,6 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type FailureDetail int32
|
||||
|
||||
const (
|
||||
@@ -3937,966 +3928,3 @@ func file_routerrpc_router_proto_init() {
|
||||
file_routerrpc_router_proto_goTypes = nil
|
||||
file_routerrpc_router_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// RouterClient is the client API for Router service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type RouterClient interface {
|
||||
//
|
||||
//SendPaymentV2 attempts to route a payment described by the passed
|
||||
//PaymentRequest to the final destination. The call returns a stream of
|
||||
//payment updates.
|
||||
SendPaymentV2(ctx context.Context, in *SendPaymentRequest, opts ...grpc.CallOption) (Router_SendPaymentV2Client, error)
|
||||
//
|
||||
//TrackPaymentV2 returns an update stream for the payment identified by the
|
||||
//payment hash.
|
||||
TrackPaymentV2(ctx context.Context, in *TrackPaymentRequest, opts ...grpc.CallOption) (Router_TrackPaymentV2Client, error)
|
||||
//
|
||||
//EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
|
||||
//may cost to send an HTLC to the target end destination.
|
||||
EstimateRouteFee(ctx context.Context, in *RouteFeeRequest, opts ...grpc.CallOption) (*RouteFeeResponse, error)
|
||||
// Deprecated: Do not use.
|
||||
//
|
||||
//Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via
|
||||
//the specified route. This method differs from SendPayment in that it
|
||||
//allows users to specify a full route manually. This can be used for
|
||||
//things like rebalancing, and atomic swaps. It differs from the newer
|
||||
//SendToRouteV2 in that it doesn't return the full HTLC information.
|
||||
SendToRoute(ctx context.Context, in *SendToRouteRequest, opts ...grpc.CallOption) (*SendToRouteResponse, error)
|
||||
//
|
||||
//SendToRouteV2 attempts to make a payment via the specified route. This
|
||||
//method differs from SendPayment in that it allows users to specify a full
|
||||
//route manually. This can be used for things like rebalancing, and atomic
|
||||
//swaps.
|
||||
SendToRouteV2(ctx context.Context, in *SendToRouteRequest, opts ...grpc.CallOption) (*lnrpc.HTLCAttempt, error)
|
||||
//
|
||||
//ResetMissionControl clears all mission control state and starts with a clean
|
||||
//slate.
|
||||
ResetMissionControl(ctx context.Context, in *ResetMissionControlRequest, opts ...grpc.CallOption) (*ResetMissionControlResponse, error)
|
||||
//
|
||||
//QueryMissionControl exposes the internal mission control state to callers.
|
||||
//It is a development feature.
|
||||
QueryMissionControl(ctx context.Context, in *QueryMissionControlRequest, opts ...grpc.CallOption) (*QueryMissionControlResponse, error)
|
||||
//
|
||||
//XImportMissionControl is an experimental API that imports the state provided
|
||||
//to the internal mission control's state, using all results which are more
|
||||
//recent than our existing values. These values will only be imported
|
||||
//in-memory, and will not be persisted across restarts.
|
||||
XImportMissionControl(ctx context.Context, in *XImportMissionControlRequest, opts ...grpc.CallOption) (*XImportMissionControlResponse, error)
|
||||
//
|
||||
//GetMissionControlConfig returns mission control's current config.
|
||||
GetMissionControlConfig(ctx context.Context, in *GetMissionControlConfigRequest, opts ...grpc.CallOption) (*GetMissionControlConfigResponse, error)
|
||||
//
|
||||
//SetMissionControlConfig will set mission control's config, if the config
|
||||
//provided is valid.
|
||||
SetMissionControlConfig(ctx context.Context, in *SetMissionControlConfigRequest, opts ...grpc.CallOption) (*SetMissionControlConfigResponse, error)
|
||||
//
|
||||
//QueryProbability returns the current success probability estimate for a
|
||||
//given node pair and amount.
|
||||
QueryProbability(ctx context.Context, in *QueryProbabilityRequest, opts ...grpc.CallOption) (*QueryProbabilityResponse, error)
|
||||
//
|
||||
//BuildRoute builds a fully specified route based on a list of hop public
|
||||
//keys. It retrieves the relevant channel policies from the graph in order to
|
||||
//calculate the correct fees and time locks.
|
||||
BuildRoute(ctx context.Context, in *BuildRouteRequest, opts ...grpc.CallOption) (*BuildRouteResponse, error)
|
||||
//
|
||||
//SubscribeHtlcEvents creates a uni-directional stream from the server to
|
||||
//the client which delivers a stream of htlc events.
|
||||
SubscribeHtlcEvents(ctx context.Context, in *SubscribeHtlcEventsRequest, opts ...grpc.CallOption) (Router_SubscribeHtlcEventsClient, error)
|
||||
// Deprecated: Do not use.
|
||||
//
|
||||
//Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
|
||||
//described by the passed PaymentRequest to the final destination. The call
|
||||
//returns a stream of payment status updates.
|
||||
SendPayment(ctx context.Context, in *SendPaymentRequest, opts ...grpc.CallOption) (Router_SendPaymentClient, error)
|
||||
// Deprecated: Do not use.
|
||||
//
|
||||
//Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
|
||||
//the payment identified by the payment hash.
|
||||
TrackPayment(ctx context.Context, in *TrackPaymentRequest, opts ...grpc.CallOption) (Router_TrackPaymentClient, error)
|
||||
//*
|
||||
//HtlcInterceptor dispatches a bi-directional streaming RPC in which
|
||||
//Forwarded HTLC requests are sent to the client and the client responds with
|
||||
//a boolean that tells LND if this htlc should be intercepted.
|
||||
//In case of interception, the htlc can be either settled, cancelled or
|
||||
//resumed later by using the ResolveHoldForward endpoint.
|
||||
HtlcInterceptor(ctx context.Context, opts ...grpc.CallOption) (Router_HtlcInterceptorClient, error)
|
||||
//
|
||||
//UpdateChanStatus attempts to manually set the state of a channel
|
||||
//(enabled, disabled, or auto). A manual "disable" request will cause the
|
||||
//channel to stay disabled until a subsequent manual request of either
|
||||
//"enable" or "auto".
|
||||
UpdateChanStatus(ctx context.Context, in *UpdateChanStatusRequest, opts ...grpc.CallOption) (*UpdateChanStatusResponse, error)
|
||||
}
|
||||
|
||||
type routerClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewRouterClient(cc grpc.ClientConnInterface) RouterClient {
|
||||
return &routerClient{cc}
|
||||
}
|
||||
|
||||
func (c *routerClient) SendPaymentV2(ctx context.Context, in *SendPaymentRequest, opts ...grpc.CallOption) (Router_SendPaymentV2Client, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_Router_serviceDesc.Streams[0], "/routerrpc.Router/SendPaymentV2", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &routerSendPaymentV2Client{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Router_SendPaymentV2Client interface {
|
||||
Recv() (*lnrpc.Payment, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type routerSendPaymentV2Client struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *routerSendPaymentV2Client) Recv() (*lnrpc.Payment, error) {
|
||||
m := new(lnrpc.Payment)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) TrackPaymentV2(ctx context.Context, in *TrackPaymentRequest, opts ...grpc.CallOption) (Router_TrackPaymentV2Client, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_Router_serviceDesc.Streams[1], "/routerrpc.Router/TrackPaymentV2", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &routerTrackPaymentV2Client{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Router_TrackPaymentV2Client interface {
|
||||
Recv() (*lnrpc.Payment, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type routerTrackPaymentV2Client struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *routerTrackPaymentV2Client) Recv() (*lnrpc.Payment, error) {
|
||||
m := new(lnrpc.Payment)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) EstimateRouteFee(ctx context.Context, in *RouteFeeRequest, opts ...grpc.CallOption) (*RouteFeeResponse, error) {
|
||||
out := new(RouteFeeResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/EstimateRouteFee", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (c *routerClient) SendToRoute(ctx context.Context, in *SendToRouteRequest, opts ...grpc.CallOption) (*SendToRouteResponse, error) {
|
||||
out := new(SendToRouteResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/SendToRoute", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) SendToRouteV2(ctx context.Context, in *SendToRouteRequest, opts ...grpc.CallOption) (*lnrpc.HTLCAttempt, error) {
|
||||
out := new(lnrpc.HTLCAttempt)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/SendToRouteV2", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) ResetMissionControl(ctx context.Context, in *ResetMissionControlRequest, opts ...grpc.CallOption) (*ResetMissionControlResponse, error) {
|
||||
out := new(ResetMissionControlResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/ResetMissionControl", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) QueryMissionControl(ctx context.Context, in *QueryMissionControlRequest, opts ...grpc.CallOption) (*QueryMissionControlResponse, error) {
|
||||
out := new(QueryMissionControlResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/QueryMissionControl", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) XImportMissionControl(ctx context.Context, in *XImportMissionControlRequest, opts ...grpc.CallOption) (*XImportMissionControlResponse, error) {
|
||||
out := new(XImportMissionControlResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/XImportMissionControl", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) GetMissionControlConfig(ctx context.Context, in *GetMissionControlConfigRequest, opts ...grpc.CallOption) (*GetMissionControlConfigResponse, error) {
|
||||
out := new(GetMissionControlConfigResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/GetMissionControlConfig", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) SetMissionControlConfig(ctx context.Context, in *SetMissionControlConfigRequest, opts ...grpc.CallOption) (*SetMissionControlConfigResponse, error) {
|
||||
out := new(SetMissionControlConfigResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/SetMissionControlConfig", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) QueryProbability(ctx context.Context, in *QueryProbabilityRequest, opts ...grpc.CallOption) (*QueryProbabilityResponse, error) {
|
||||
out := new(QueryProbabilityResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/QueryProbability", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) BuildRoute(ctx context.Context, in *BuildRouteRequest, opts ...grpc.CallOption) (*BuildRouteResponse, error) {
|
||||
out := new(BuildRouteResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/BuildRoute", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) SubscribeHtlcEvents(ctx context.Context, in *SubscribeHtlcEventsRequest, opts ...grpc.CallOption) (Router_SubscribeHtlcEventsClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_Router_serviceDesc.Streams[2], "/routerrpc.Router/SubscribeHtlcEvents", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &routerSubscribeHtlcEventsClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Router_SubscribeHtlcEventsClient interface {
|
||||
Recv() (*HtlcEvent, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type routerSubscribeHtlcEventsClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *routerSubscribeHtlcEventsClient) Recv() (*HtlcEvent, error) {
|
||||
m := new(HtlcEvent)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (c *routerClient) SendPayment(ctx context.Context, in *SendPaymentRequest, opts ...grpc.CallOption) (Router_SendPaymentClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_Router_serviceDesc.Streams[3], "/routerrpc.Router/SendPayment", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &routerSendPaymentClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Router_SendPaymentClient interface {
|
||||
Recv() (*PaymentStatus, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type routerSendPaymentClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *routerSendPaymentClient) Recv() (*PaymentStatus, error) {
|
||||
m := new(PaymentStatus)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (c *routerClient) TrackPayment(ctx context.Context, in *TrackPaymentRequest, opts ...grpc.CallOption) (Router_TrackPaymentClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_Router_serviceDesc.Streams[4], "/routerrpc.Router/TrackPayment", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &routerTrackPaymentClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Router_TrackPaymentClient interface {
|
||||
Recv() (*PaymentStatus, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type routerTrackPaymentClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *routerTrackPaymentClient) Recv() (*PaymentStatus, error) {
|
||||
m := new(PaymentStatus)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) HtlcInterceptor(ctx context.Context, opts ...grpc.CallOption) (Router_HtlcInterceptorClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_Router_serviceDesc.Streams[5], "/routerrpc.Router/HtlcInterceptor", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &routerHtlcInterceptorClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Router_HtlcInterceptorClient interface {
|
||||
Send(*ForwardHtlcInterceptResponse) error
|
||||
Recv() (*ForwardHtlcInterceptRequest, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type routerHtlcInterceptorClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *routerHtlcInterceptorClient) Send(m *ForwardHtlcInterceptResponse) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *routerHtlcInterceptorClient) Recv() (*ForwardHtlcInterceptRequest, error) {
|
||||
m := new(ForwardHtlcInterceptRequest)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) UpdateChanStatus(ctx context.Context, in *UpdateChanStatusRequest, opts ...grpc.CallOption) (*UpdateChanStatusResponse, error) {
|
||||
out := new(UpdateChanStatusResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/UpdateChanStatus", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RouterServer is the server API for Router service.
|
||||
type RouterServer interface {
|
||||
//
|
||||
//SendPaymentV2 attempts to route a payment described by the passed
|
||||
//PaymentRequest to the final destination. The call returns a stream of
|
||||
//payment updates.
|
||||
SendPaymentV2(*SendPaymentRequest, Router_SendPaymentV2Server) error
|
||||
//
|
||||
//TrackPaymentV2 returns an update stream for the payment identified by the
|
||||
//payment hash.
|
||||
TrackPaymentV2(*TrackPaymentRequest, Router_TrackPaymentV2Server) error
|
||||
//
|
||||
//EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
|
||||
//may cost to send an HTLC to the target end destination.
|
||||
EstimateRouteFee(context.Context, *RouteFeeRequest) (*RouteFeeResponse, error)
|
||||
// Deprecated: Do not use.
|
||||
//
|
||||
//Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via
|
||||
//the specified route. This method differs from SendPayment in that it
|
||||
//allows users to specify a full route manually. This can be used for
|
||||
//things like rebalancing, and atomic swaps. It differs from the newer
|
||||
//SendToRouteV2 in that it doesn't return the full HTLC information.
|
||||
SendToRoute(context.Context, *SendToRouteRequest) (*SendToRouteResponse, error)
|
||||
//
|
||||
//SendToRouteV2 attempts to make a payment via the specified route. This
|
||||
//method differs from SendPayment in that it allows users to specify a full
|
||||
//route manually. This can be used for things like rebalancing, and atomic
|
||||
//swaps.
|
||||
SendToRouteV2(context.Context, *SendToRouteRequest) (*lnrpc.HTLCAttempt, error)
|
||||
//
|
||||
//ResetMissionControl clears all mission control state and starts with a clean
|
||||
//slate.
|
||||
ResetMissionControl(context.Context, *ResetMissionControlRequest) (*ResetMissionControlResponse, error)
|
||||
//
|
||||
//QueryMissionControl exposes the internal mission control state to callers.
|
||||
//It is a development feature.
|
||||
QueryMissionControl(context.Context, *QueryMissionControlRequest) (*QueryMissionControlResponse, error)
|
||||
//
|
||||
//XImportMissionControl is an experimental API that imports the state provided
|
||||
//to the internal mission control's state, using all results which are more
|
||||
//recent than our existing values. These values will only be imported
|
||||
//in-memory, and will not be persisted across restarts.
|
||||
XImportMissionControl(context.Context, *XImportMissionControlRequest) (*XImportMissionControlResponse, error)
|
||||
//
|
||||
//GetMissionControlConfig returns mission control's current config.
|
||||
GetMissionControlConfig(context.Context, *GetMissionControlConfigRequest) (*GetMissionControlConfigResponse, error)
|
||||
//
|
||||
//SetMissionControlConfig will set mission control's config, if the config
|
||||
//provided is valid.
|
||||
SetMissionControlConfig(context.Context, *SetMissionControlConfigRequest) (*SetMissionControlConfigResponse, error)
|
||||
//
|
||||
//QueryProbability returns the current success probability estimate for a
|
||||
//given node pair and amount.
|
||||
QueryProbability(context.Context, *QueryProbabilityRequest) (*QueryProbabilityResponse, error)
|
||||
//
|
||||
//BuildRoute builds a fully specified route based on a list of hop public
|
||||
//keys. It retrieves the relevant channel policies from the graph in order to
|
||||
//calculate the correct fees and time locks.
|
||||
BuildRoute(context.Context, *BuildRouteRequest) (*BuildRouteResponse, error)
|
||||
//
|
||||
//SubscribeHtlcEvents creates a uni-directional stream from the server to
|
||||
//the client which delivers a stream of htlc events.
|
||||
SubscribeHtlcEvents(*SubscribeHtlcEventsRequest, Router_SubscribeHtlcEventsServer) error
|
||||
// Deprecated: Do not use.
|
||||
//
|
||||
//Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
|
||||
//described by the passed PaymentRequest to the final destination. The call
|
||||
//returns a stream of payment status updates.
|
||||
SendPayment(*SendPaymentRequest, Router_SendPaymentServer) error
|
||||
// Deprecated: Do not use.
|
||||
//
|
||||
//Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
|
||||
//the payment identified by the payment hash.
|
||||
TrackPayment(*TrackPaymentRequest, Router_TrackPaymentServer) error
|
||||
//*
|
||||
//HtlcInterceptor dispatches a bi-directional streaming RPC in which
|
||||
//Forwarded HTLC requests are sent to the client and the client responds with
|
||||
//a boolean that tells LND if this htlc should be intercepted.
|
||||
//In case of interception, the htlc can be either settled, cancelled or
|
||||
//resumed later by using the ResolveHoldForward endpoint.
|
||||
HtlcInterceptor(Router_HtlcInterceptorServer) error
|
||||
//
|
||||
//UpdateChanStatus attempts to manually set the state of a channel
|
||||
//(enabled, disabled, or auto). A manual "disable" request will cause the
|
||||
//channel to stay disabled until a subsequent manual request of either
|
||||
//"enable" or "auto".
|
||||
UpdateChanStatus(context.Context, *UpdateChanStatusRequest) (*UpdateChanStatusResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedRouterServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedRouterServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedRouterServer) SendPaymentV2(*SendPaymentRequest, Router_SendPaymentV2Server) error {
|
||||
return status.Errorf(codes.Unimplemented, "method SendPaymentV2 not implemented")
|
||||
}
|
||||
func (*UnimplementedRouterServer) TrackPaymentV2(*TrackPaymentRequest, Router_TrackPaymentV2Server) error {
|
||||
return status.Errorf(codes.Unimplemented, "method TrackPaymentV2 not implemented")
|
||||
}
|
||||
func (*UnimplementedRouterServer) EstimateRouteFee(context.Context, *RouteFeeRequest) (*RouteFeeResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method EstimateRouteFee not implemented")
|
||||
}
|
||||
func (*UnimplementedRouterServer) SendToRoute(context.Context, *SendToRouteRequest) (*SendToRouteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SendToRoute not implemented")
|
||||
}
|
||||
func (*UnimplementedRouterServer) SendToRouteV2(context.Context, *SendToRouteRequest) (*lnrpc.HTLCAttempt, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SendToRouteV2 not implemented")
|
||||
}
|
||||
func (*UnimplementedRouterServer) ResetMissionControl(context.Context, *ResetMissionControlRequest) (*ResetMissionControlResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ResetMissionControl not implemented")
|
||||
}
|
||||
func (*UnimplementedRouterServer) QueryMissionControl(context.Context, *QueryMissionControlRequest) (*QueryMissionControlResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QueryMissionControl not implemented")
|
||||
}
|
||||
func (*UnimplementedRouterServer) XImportMissionControl(context.Context, *XImportMissionControlRequest) (*XImportMissionControlResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method XImportMissionControl not implemented")
|
||||
}
|
||||
func (*UnimplementedRouterServer) GetMissionControlConfig(context.Context, *GetMissionControlConfigRequest) (*GetMissionControlConfigResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetMissionControlConfig not implemented")
|
||||
}
|
||||
func (*UnimplementedRouterServer) SetMissionControlConfig(context.Context, *SetMissionControlConfigRequest) (*SetMissionControlConfigResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetMissionControlConfig not implemented")
|
||||
}
|
||||
func (*UnimplementedRouterServer) QueryProbability(context.Context, *QueryProbabilityRequest) (*QueryProbabilityResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QueryProbability not implemented")
|
||||
}
|
||||
func (*UnimplementedRouterServer) BuildRoute(context.Context, *BuildRouteRequest) (*BuildRouteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BuildRoute not implemented")
|
||||
}
|
||||
func (*UnimplementedRouterServer) SubscribeHtlcEvents(*SubscribeHtlcEventsRequest, Router_SubscribeHtlcEventsServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method SubscribeHtlcEvents not implemented")
|
||||
}
|
||||
func (*UnimplementedRouterServer) SendPayment(*SendPaymentRequest, Router_SendPaymentServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method SendPayment not implemented")
|
||||
}
|
||||
func (*UnimplementedRouterServer) TrackPayment(*TrackPaymentRequest, Router_TrackPaymentServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method TrackPayment not implemented")
|
||||
}
|
||||
func (*UnimplementedRouterServer) HtlcInterceptor(Router_HtlcInterceptorServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method HtlcInterceptor not implemented")
|
||||
}
|
||||
func (*UnimplementedRouterServer) UpdateChanStatus(context.Context, *UpdateChanStatusRequest) (*UpdateChanStatusResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateChanStatus not implemented")
|
||||
}
|
||||
|
||||
func RegisterRouterServer(s *grpc.Server, srv RouterServer) {
|
||||
s.RegisterService(&_Router_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _Router_SendPaymentV2_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(SendPaymentRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(RouterServer).SendPaymentV2(m, &routerSendPaymentV2Server{stream})
|
||||
}
|
||||
|
||||
type Router_SendPaymentV2Server interface {
|
||||
Send(*lnrpc.Payment) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type routerSendPaymentV2Server struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *routerSendPaymentV2Server) Send(m *lnrpc.Payment) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _Router_TrackPaymentV2_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(TrackPaymentRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(RouterServer).TrackPaymentV2(m, &routerTrackPaymentV2Server{stream})
|
||||
}
|
||||
|
||||
type Router_TrackPaymentV2Server interface {
|
||||
Send(*lnrpc.Payment) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type routerTrackPaymentV2Server struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *routerTrackPaymentV2Server) Send(m *lnrpc.Payment) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _Router_EstimateRouteFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RouteFeeRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).EstimateRouteFee(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/EstimateRouteFee",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).EstimateRouteFee(ctx, req.(*RouteFeeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_SendToRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SendToRouteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).SendToRoute(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/SendToRoute",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).SendToRoute(ctx, req.(*SendToRouteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_SendToRouteV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SendToRouteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).SendToRouteV2(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/SendToRouteV2",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).SendToRouteV2(ctx, req.(*SendToRouteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_ResetMissionControl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ResetMissionControlRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).ResetMissionControl(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/ResetMissionControl",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).ResetMissionControl(ctx, req.(*ResetMissionControlRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_QueryMissionControl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryMissionControlRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).QueryMissionControl(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/QueryMissionControl",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).QueryMissionControl(ctx, req.(*QueryMissionControlRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_XImportMissionControl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(XImportMissionControlRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).XImportMissionControl(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/XImportMissionControl",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).XImportMissionControl(ctx, req.(*XImportMissionControlRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_GetMissionControlConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetMissionControlConfigRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).GetMissionControlConfig(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/GetMissionControlConfig",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).GetMissionControlConfig(ctx, req.(*GetMissionControlConfigRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_SetMissionControlConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SetMissionControlConfigRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).SetMissionControlConfig(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/SetMissionControlConfig",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).SetMissionControlConfig(ctx, req.(*SetMissionControlConfigRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_QueryProbability_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryProbabilityRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).QueryProbability(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/QueryProbability",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).QueryProbability(ctx, req.(*QueryProbabilityRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_BuildRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BuildRouteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).BuildRoute(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/BuildRoute",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).BuildRoute(ctx, req.(*BuildRouteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_SubscribeHtlcEvents_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(SubscribeHtlcEventsRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(RouterServer).SubscribeHtlcEvents(m, &routerSubscribeHtlcEventsServer{stream})
|
||||
}
|
||||
|
||||
type Router_SubscribeHtlcEventsServer interface {
|
||||
Send(*HtlcEvent) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type routerSubscribeHtlcEventsServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *routerSubscribeHtlcEventsServer) Send(m *HtlcEvent) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _Router_SendPayment_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(SendPaymentRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(RouterServer).SendPayment(m, &routerSendPaymentServer{stream})
|
||||
}
|
||||
|
||||
type Router_SendPaymentServer interface {
|
||||
Send(*PaymentStatus) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type routerSendPaymentServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *routerSendPaymentServer) Send(m *PaymentStatus) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _Router_TrackPayment_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(TrackPaymentRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(RouterServer).TrackPayment(m, &routerTrackPaymentServer{stream})
|
||||
}
|
||||
|
||||
type Router_TrackPaymentServer interface {
|
||||
Send(*PaymentStatus) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type routerTrackPaymentServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *routerTrackPaymentServer) Send(m *PaymentStatus) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _Router_HtlcInterceptor_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(RouterServer).HtlcInterceptor(&routerHtlcInterceptorServer{stream})
|
||||
}
|
||||
|
||||
type Router_HtlcInterceptorServer interface {
|
||||
Send(*ForwardHtlcInterceptRequest) error
|
||||
Recv() (*ForwardHtlcInterceptResponse, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type routerHtlcInterceptorServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *routerHtlcInterceptorServer) Send(m *ForwardHtlcInterceptRequest) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *routerHtlcInterceptorServer) Recv() (*ForwardHtlcInterceptResponse, error) {
|
||||
m := new(ForwardHtlcInterceptResponse)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func _Router_UpdateChanStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateChanStatusRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).UpdateChanStatus(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/UpdateChanStatus",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).UpdateChanStatus(ctx, req.(*UpdateChanStatusRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _Router_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "routerrpc.Router",
|
||||
HandlerType: (*RouterServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "EstimateRouteFee",
|
||||
Handler: _Router_EstimateRouteFee_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SendToRoute",
|
||||
Handler: _Router_SendToRoute_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SendToRouteV2",
|
||||
Handler: _Router_SendToRouteV2_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ResetMissionControl",
|
||||
Handler: _Router_ResetMissionControl_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QueryMissionControl",
|
||||
Handler: _Router_QueryMissionControl_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "XImportMissionControl",
|
||||
Handler: _Router_XImportMissionControl_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetMissionControlConfig",
|
||||
Handler: _Router_GetMissionControlConfig_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetMissionControlConfig",
|
||||
Handler: _Router_SetMissionControlConfig_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QueryProbability",
|
||||
Handler: _Router_QueryProbability_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BuildRoute",
|
||||
Handler: _Router_BuildRoute_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateChanStatus",
|
||||
Handler: _Router_UpdateChanStatus_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "SendPaymentV2",
|
||||
Handler: _Router_SendPaymentV2_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "TrackPaymentV2",
|
||||
Handler: _Router_TrackPaymentV2_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "SubscribeHtlcEvents",
|
||||
Handler: _Router_SubscribeHtlcEvents_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "SendPayment",
|
||||
Handler: _Router_SendPayment_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "TrackPayment",
|
||||
Handler: _Router_TrackPayment_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "HtlcInterceptor",
|
||||
Handler: _Router_HtlcInterceptor_Handler,
|
||||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "routerrpc/router.proto",
|
||||
}
|
||||
@@ -13,14 +13,14 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/golang/protobuf/descriptor"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/utilities"
|
||||
"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
|
||||
@@ -29,7 +29,7 @@ var _ io.Reader
|
||||
var _ status.Status
|
||||
var _ = runtime.String
|
||||
var _ = utilities.NewDoubleArray
|
||||
var _ = descriptor.ForMessage
|
||||
var _ = metadata.Join
|
||||
|
||||
func request_Router_SendPaymentV2_0(ctx context.Context, marshaler runtime.Marshaler, client RouterClient, req *http.Request, pathParams map[string]string) (Router_SendPaymentV2Client, runtime.ServerMetadata, error) {
|
||||
var protoReq SendPaymentRequest
|
||||
@@ -77,7 +77,6 @@ func request_Router_TrackPaymentV2_0(ctx context.Context, marshaler runtime.Mars
|
||||
}
|
||||
|
||||
protoReq.PaymentHash, err = runtime.Bytes(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "payment_hash", err)
|
||||
}
|
||||
@@ -325,7 +324,6 @@ func request_Router_QueryProbability_0(ctx context.Context, marshaler runtime.Ma
|
||||
}
|
||||
|
||||
protoReq.FromNode, err = runtime.Bytes(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "from_node", err)
|
||||
}
|
||||
@@ -336,7 +334,6 @@ func request_Router_QueryProbability_0(ctx context.Context, marshaler runtime.Ma
|
||||
}
|
||||
|
||||
protoReq.ToNode, err = runtime.Bytes(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "to_node", err)
|
||||
}
|
||||
@@ -347,7 +344,6 @@ func request_Router_QueryProbability_0(ctx context.Context, marshaler runtime.Ma
|
||||
}
|
||||
|
||||
protoReq.AmtMsat, err = runtime.Int64(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "amt_msat", err)
|
||||
}
|
||||
@@ -374,7 +370,6 @@ func local_request_Router_QueryProbability_0(ctx context.Context, marshaler runt
|
||||
}
|
||||
|
||||
protoReq.FromNode, err = runtime.Bytes(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "from_node", err)
|
||||
}
|
||||
@@ -385,7 +380,6 @@ func local_request_Router_QueryProbability_0(ctx context.Context, marshaler runt
|
||||
}
|
||||
|
||||
protoReq.ToNode, err = runtime.Bytes(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "to_node", err)
|
||||
}
|
||||
@@ -396,7 +390,6 @@ func local_request_Router_QueryProbability_0(ctx context.Context, marshaler runt
|
||||
}
|
||||
|
||||
protoReq.AmtMsat, err = runtime.Int64(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "amt_msat", err)
|
||||
}
|
||||
@@ -546,6 +539,7 @@ func local_request_Router_UpdateChanStatus_0(ctx context.Context, marshaler runt
|
||||
// RegisterRouterHandlerServer registers the http handlers for service Router to "mux".
|
||||
// UnaryRPC :call RouterServer 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 RegisterRouterHandlerFromEndpoint instead.
|
||||
func RegisterRouterHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RouterServer) error {
|
||||
|
||||
mux.Handle("POST", pattern_Router_SendPaymentV2_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
@@ -565,13 +559,16 @@ func RegisterRouterHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
|
||||
mux.Handle("POST", pattern_Router_EstimateRouteFee_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)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/routerrpc.Router/EstimateRouteFee", runtime.WithHTTPPathPattern("/v2/router/route/estimatefee"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Router_EstimateRouteFee_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)
|
||||
@@ -585,13 +582,16 @@ func RegisterRouterHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
|
||||
mux.Handle("POST", pattern_Router_SendToRouteV2_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)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/routerrpc.Router/SendToRouteV2", runtime.WithHTTPPathPattern("/v2/router/route/send"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Router_SendToRouteV2_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)
|
||||
@@ -605,13 +605,16 @@ func RegisterRouterHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
|
||||
mux.Handle("POST", pattern_Router_ResetMissionControl_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)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/routerrpc.Router/ResetMissionControl", runtime.WithHTTPPathPattern("/v2/router/mc/reset"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Router_ResetMissionControl_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)
|
||||
@@ -625,13 +628,16 @@ func RegisterRouterHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
|
||||
mux.Handle("GET", pattern_Router_QueryMissionControl_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)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/routerrpc.Router/QueryMissionControl", runtime.WithHTTPPathPattern("/v2/router/mc"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Router_QueryMissionControl_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)
|
||||
@@ -645,13 +651,16 @@ func RegisterRouterHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
|
||||
mux.Handle("POST", pattern_Router_XImportMissionControl_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)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/routerrpc.Router/XImportMissionControl", runtime.WithHTTPPathPattern("/v2/router/x/importhistory"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Router_XImportMissionControl_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)
|
||||
@@ -665,13 +674,16 @@ func RegisterRouterHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
|
||||
mux.Handle("GET", pattern_Router_GetMissionControlConfig_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)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/routerrpc.Router/GetMissionControlConfig", runtime.WithHTTPPathPattern("/v2/router/mccfg"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Router_GetMissionControlConfig_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)
|
||||
@@ -685,13 +697,16 @@ func RegisterRouterHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
|
||||
mux.Handle("POST", pattern_Router_SetMissionControlConfig_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)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/routerrpc.Router/SetMissionControlConfig", runtime.WithHTTPPathPattern("/v2/router/mccfg"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Router_SetMissionControlConfig_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)
|
||||
@@ -705,13 +720,16 @@ func RegisterRouterHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
|
||||
mux.Handle("GET", pattern_Router_QueryProbability_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)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/routerrpc.Router/QueryProbability", runtime.WithHTTPPathPattern("/v2/router/mc/probability/{from_node}/{to_node}/{amt_msat}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Router_QueryProbability_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)
|
||||
@@ -725,13 +743,16 @@ func RegisterRouterHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
|
||||
mux.Handle("POST", pattern_Router_BuildRoute_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)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/routerrpc.Router/BuildRoute", runtime.WithHTTPPathPattern("/v2/router/route"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Router_BuildRoute_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)
|
||||
@@ -759,13 +780,16 @@ func RegisterRouterHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
|
||||
mux.Handle("POST", pattern_Router_UpdateChanStatus_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)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/routerrpc.Router/UpdateChanStatus", runtime.WithHTTPPathPattern("/v2/router/updatechanstatus"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Router_UpdateChanStatus_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)
|
||||
@@ -821,7 +845,7 @@ func RegisterRouterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/routerrpc.Router/SendPaymentV2", runtime.WithHTTPPathPattern("/v2/router/send"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@@ -841,7 +865,7 @@ func RegisterRouterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/routerrpc.Router/TrackPaymentV2", runtime.WithHTTPPathPattern("/v2/router/track/{payment_hash}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@@ -861,7 +885,7 @@ func RegisterRouterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/routerrpc.Router/EstimateRouteFee", runtime.WithHTTPPathPattern("/v2/router/route/estimatefee"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@@ -881,7 +905,7 @@ func RegisterRouterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/routerrpc.Router/SendToRouteV2", runtime.WithHTTPPathPattern("/v2/router/route/send"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@@ -901,7 +925,7 @@ func RegisterRouterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/routerrpc.Router/ResetMissionControl", runtime.WithHTTPPathPattern("/v2/router/mc/reset"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@@ -921,7 +945,7 @@ func RegisterRouterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/routerrpc.Router/QueryMissionControl", runtime.WithHTTPPathPattern("/v2/router/mc"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@@ -941,7 +965,7 @@ func RegisterRouterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/routerrpc.Router/XImportMissionControl", runtime.WithHTTPPathPattern("/v2/router/x/importhistory"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@@ -961,7 +985,7 @@ func RegisterRouterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/routerrpc.Router/GetMissionControlConfig", runtime.WithHTTPPathPattern("/v2/router/mccfg"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@@ -981,7 +1005,7 @@ func RegisterRouterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/routerrpc.Router/SetMissionControlConfig", runtime.WithHTTPPathPattern("/v2/router/mccfg"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@@ -1001,7 +1025,7 @@ func RegisterRouterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/routerrpc.Router/QueryProbability", runtime.WithHTTPPathPattern("/v2/router/mc/probability/{from_node}/{to_node}/{amt_msat}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@@ -1021,7 +1045,7 @@ func RegisterRouterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/routerrpc.Router/BuildRoute", runtime.WithHTTPPathPattern("/v2/router/route"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@@ -1041,7 +1065,7 @@ func RegisterRouterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/routerrpc.Router/SubscribeHtlcEvents", runtime.WithHTTPPathPattern("/v2/router/htlcevents"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@@ -1061,7 +1085,7 @@ func RegisterRouterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/routerrpc.Router/HtlcInterceptor", runtime.WithHTTPPathPattern("/v2/router/htlcinterceptor"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@@ -1081,7 +1105,7 @@ func RegisterRouterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/routerrpc.Router/UpdateChanStatus", runtime.WithHTTPPathPattern("/v2/router/updatechanstatus"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@@ -1101,33 +1125,33 @@ func RegisterRouterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_Router_SendPaymentV2_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "router", "send"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Router_SendPaymentV2_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "router", "send"}, ""))
|
||||
|
||||
pattern_Router_TrackPaymentV2_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v2", "router", "track", "payment_hash"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Router_TrackPaymentV2_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v2", "router", "track", "payment_hash"}, ""))
|
||||
|
||||
pattern_Router_EstimateRouteFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "router", "route", "estimatefee"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Router_EstimateRouteFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "router", "route", "estimatefee"}, ""))
|
||||
|
||||
pattern_Router_SendToRouteV2_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "router", "route", "send"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Router_SendToRouteV2_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "router", "route", "send"}, ""))
|
||||
|
||||
pattern_Router_ResetMissionControl_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "router", "mc", "reset"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Router_ResetMissionControl_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "router", "mc", "reset"}, ""))
|
||||
|
||||
pattern_Router_QueryMissionControl_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "router", "mc"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Router_QueryMissionControl_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "router", "mc"}, ""))
|
||||
|
||||
pattern_Router_XImportMissionControl_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "router", "x", "importhistory"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Router_XImportMissionControl_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "router", "x", "importhistory"}, ""))
|
||||
|
||||
pattern_Router_GetMissionControlConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "router", "mccfg"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Router_GetMissionControlConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "router", "mccfg"}, ""))
|
||||
|
||||
pattern_Router_SetMissionControlConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "router", "mccfg"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Router_SetMissionControlConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "router", "mccfg"}, ""))
|
||||
|
||||
pattern_Router_QueryProbability_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6}, []string{"v2", "router", "mc", "probability", "from_node", "to_node", "amt_msat"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Router_QueryProbability_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6}, []string{"v2", "router", "mc", "probability", "from_node", "to_node", "amt_msat"}, ""))
|
||||
|
||||
pattern_Router_BuildRoute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "router", "route"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Router_BuildRoute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "router", "route"}, ""))
|
||||
|
||||
pattern_Router_SubscribeHtlcEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "router", "htlcevents"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Router_SubscribeHtlcEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "router", "htlcevents"}, ""))
|
||||
|
||||
pattern_Router_HtlcInterceptor_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "router", "htlcinterceptor"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Router_HtlcInterceptor_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "router", "htlcinterceptor"}, ""))
|
||||
|
||||
pattern_Router_UpdateChanStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "router", "updatechanstatus"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Router_UpdateChanStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "router", "updatechanstatus"}, ""))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
"title": "routerrpc/router.proto",
|
||||
"version": "version not set"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "Router"
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -14,7 +19,7 @@
|
||||
"/v2/router/htlcevents": {
|
||||
"get": {
|
||||
"summary": "SubscribeHtlcEvents creates a uni-directional stream from the server to\nthe client which delivers a stream of htlc events.",
|
||||
"operationId": "SubscribeHtlcEvents",
|
||||
"operationId": "Router_SubscribeHtlcEvents",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.(streaming responses)",
|
||||
@@ -25,16 +30,16 @@
|
||||
"$ref": "#/definitions/routerrpcHtlcEvent"
|
||||
},
|
||||
"error": {
|
||||
"$ref": "#/definitions/runtimeStreamError"
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
},
|
||||
"title": "Stream result of routerrpcHtlcEvent"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -46,7 +51,7 @@
|
||||
"/v2/router/htlcinterceptor": {
|
||||
"post": {
|
||||
"summary": "*\nHtlcInterceptor dispatches a bi-directional streaming RPC in which\nForwarded HTLC requests are sent to the client and the client responds with\na boolean that tells LND if this htlc should be intercepted.\nIn case of interception, the htlc can be either settled, cancelled or\nresumed later by using the ResolveHoldForward endpoint.",
|
||||
"operationId": "HtlcInterceptor",
|
||||
"operationId": "Router_HtlcInterceptor",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.(streaming responses)",
|
||||
@@ -57,16 +62,16 @@
|
||||
"$ref": "#/definitions/routerrpcForwardHtlcInterceptRequest"
|
||||
},
|
||||
"error": {
|
||||
"$ref": "#/definitions/runtimeStreamError"
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
},
|
||||
"title": "Stream result of routerrpcForwardHtlcInterceptRequest"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -89,7 +94,7 @@
|
||||
"/v2/router/mc": {
|
||||
"get": {
|
||||
"summary": "QueryMissionControl exposes the internal mission control state to callers.\nIt is a development feature.",
|
||||
"operationId": "QueryMissionControl",
|
||||
"operationId": "Router_QueryMissionControl",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
@@ -98,9 +103,9 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -112,7 +117,7 @@
|
||||
"/v2/router/mc/probability/{from_node}/{to_node}/{amt_msat}": {
|
||||
"get": {
|
||||
"summary": "QueryProbability returns the current success probability estimate for a\ngiven node pair and amount.",
|
||||
"operationId": "QueryProbability",
|
||||
"operationId": "Router_QueryProbability",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
@@ -121,9 +126,9 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -161,7 +166,7 @@
|
||||
"/v2/router/mc/reset": {
|
||||
"post": {
|
||||
"summary": "ResetMissionControl clears all mission control state and starts with a clean\nslate.",
|
||||
"operationId": "ResetMissionControl",
|
||||
"operationId": "Router_ResetMissionControl",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
@@ -170,9 +175,9 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -194,7 +199,7 @@
|
||||
"/v2/router/mccfg": {
|
||||
"get": {
|
||||
"summary": "GetMissionControlConfig returns mission control's current config.",
|
||||
"operationId": "GetMissionControlConfig",
|
||||
"operationId": "Router_GetMissionControlConfig",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
@@ -203,9 +208,9 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -215,7 +220,7 @@
|
||||
},
|
||||
"post": {
|
||||
"summary": "SetMissionControlConfig will set mission control's config, if the config\nprovided is valid.",
|
||||
"operationId": "SetMissionControlConfig",
|
||||
"operationId": "Router_SetMissionControlConfig",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
@@ -224,9 +229,9 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -248,7 +253,7 @@
|
||||
"/v2/router/route": {
|
||||
"post": {
|
||||
"summary": "BuildRoute builds a fully specified route based on a list of hop public\nkeys. It retrieves the relevant channel policies from the graph in order to\ncalculate the correct fees and time locks.",
|
||||
"operationId": "BuildRoute",
|
||||
"operationId": "Router_BuildRoute",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
@@ -257,9 +262,9 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -281,7 +286,7 @@
|
||||
"/v2/router/route/estimatefee": {
|
||||
"post": {
|
||||
"summary": "EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it\nmay cost to send an HTLC to the target end destination.",
|
||||
"operationId": "EstimateRouteFee",
|
||||
"operationId": "Router_EstimateRouteFee",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
@@ -290,9 +295,9 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -314,7 +319,7 @@
|
||||
"/v2/router/route/send": {
|
||||
"post": {
|
||||
"summary": "SendToRouteV2 attempts to make a payment via the specified route. This\nmethod differs from SendPayment in that it allows users to specify a full\nroute manually. This can be used for things like rebalancing, and atomic\nswaps.",
|
||||
"operationId": "SendToRouteV2",
|
||||
"operationId": "Router_SendToRouteV2",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
@@ -323,9 +328,9 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -347,7 +352,7 @@
|
||||
"/v2/router/send": {
|
||||
"post": {
|
||||
"summary": "SendPaymentV2 attempts to route a payment described by the passed\nPaymentRequest to the final destination. The call returns a stream of\npayment updates.",
|
||||
"operationId": "SendPaymentV2",
|
||||
"operationId": "Router_SendPaymentV2",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.(streaming responses)",
|
||||
@@ -358,16 +363,16 @@
|
||||
"$ref": "#/definitions/lnrpcPayment"
|
||||
},
|
||||
"error": {
|
||||
"$ref": "#/definitions/runtimeStreamError"
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
},
|
||||
"title": "Stream result of lnrpcPayment"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -389,7 +394,7 @@
|
||||
"/v2/router/track/{payment_hash}": {
|
||||
"get": {
|
||||
"summary": "TrackPaymentV2 returns an update stream for the payment identified by the\npayment hash.",
|
||||
"operationId": "TrackPaymentV2",
|
||||
"operationId": "Router_TrackPaymentV2",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.(streaming responses)",
|
||||
@@ -400,16 +405,16 @@
|
||||
"$ref": "#/definitions/lnrpcPayment"
|
||||
},
|
||||
"error": {
|
||||
"$ref": "#/definitions/runtimeStreamError"
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
},
|
||||
"title": "Stream result of lnrpcPayment"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -427,8 +432,7 @@
|
||||
"description": "If set, only the final payment update is streamed back. Intermediate updates\nthat show which htlcs are still in flight are suppressed.",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
"type": "boolean"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
@@ -439,7 +443,7 @@
|
||||
"/v2/router/updatechanstatus": {
|
||||
"post": {
|
||||
"summary": "UpdateChanStatus attempts to manually set the state of a channel\n(enabled, disabled, or auto). A manual \"disable\" request will cause the\nchannel to stay disabled until a subsequent manual request of either\n\"enable\" or \"auto\".",
|
||||
"operationId": "UpdateChanStatus",
|
||||
"operationId": "Router_UpdateChanStatus",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
@@ -448,9 +452,9 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -472,7 +476,7 @@
|
||||
"/v2/router/x/importhistory": {
|
||||
"post": {
|
||||
"summary": "XImportMissionControl is an experimental API that imports the state provided\nto the internal mission control's state, using all results which are more\nrecent than our existing values. These values will only be imported\nin-memory, and will not be persisted across restarts.",
|
||||
"operationId": "XImportMissionControl",
|
||||
"operationId": "Router_XImportMissionControl",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
@@ -481,9 +485,9 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -798,7 +802,6 @@
|
||||
},
|
||||
"tlv_payload": {
|
||||
"type": "boolean",
|
||||
"format": "boolean",
|
||||
"description": "If set to true, then this hop will be encoded using the new variable length\nTLV format. Note that if any custom tlv_records below are specified, then\nthis field MUST be set to true for them to be encoded properly."
|
||||
},
|
||||
"mpp_record": {
|
||||
@@ -1597,7 +1600,6 @@
|
||||
},
|
||||
"allow_self_payment": {
|
||||
"type": "boolean",
|
||||
"format": "boolean",
|
||||
"description": "If set, circular payments to self are permitted."
|
||||
},
|
||||
"dest_features": {
|
||||
@@ -1614,7 +1616,6 @@
|
||||
},
|
||||
"no_inflight_updates": {
|
||||
"type": "boolean",
|
||||
"format": "boolean",
|
||||
"description": "If set, only the final payment update is streamed back. Intermediate updates\nthat show which htlcs are still in flight are suppressed."
|
||||
},
|
||||
"max_shard_size_msat": {
|
||||
@@ -1624,7 +1625,6 @@
|
||||
},
|
||||
"amp": {
|
||||
"type": "boolean",
|
||||
"format": "boolean",
|
||||
"description": "If set, an AMP-payment will be attempted."
|
||||
}
|
||||
}
|
||||
@@ -1708,12 +1708,9 @@
|
||||
"routerrpcXImportMissionControlResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"runtimeError": {
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
@@ -1728,31 +1725,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"runtimeStreamError": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"grpc_code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"http_code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"http_status": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,985 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
|
||||
package routerrpc
|
||||
|
||||
import (
|
||||
context "context"
|
||||
lnrpc "github.com/lightningnetwork/lnd/lnrpc"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// RouterClient is the client API for Router service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type RouterClient interface {
|
||||
//
|
||||
//SendPaymentV2 attempts to route a payment described by the passed
|
||||
//PaymentRequest to the final destination. The call returns a stream of
|
||||
//payment updates.
|
||||
SendPaymentV2(ctx context.Context, in *SendPaymentRequest, opts ...grpc.CallOption) (Router_SendPaymentV2Client, error)
|
||||
//
|
||||
//TrackPaymentV2 returns an update stream for the payment identified by the
|
||||
//payment hash.
|
||||
TrackPaymentV2(ctx context.Context, in *TrackPaymentRequest, opts ...grpc.CallOption) (Router_TrackPaymentV2Client, error)
|
||||
//
|
||||
//EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
|
||||
//may cost to send an HTLC to the target end destination.
|
||||
EstimateRouteFee(ctx context.Context, in *RouteFeeRequest, opts ...grpc.CallOption) (*RouteFeeResponse, error)
|
||||
// Deprecated: Do not use.
|
||||
//
|
||||
//Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via
|
||||
//the specified route. This method differs from SendPayment in that it
|
||||
//allows users to specify a full route manually. This can be used for
|
||||
//things like rebalancing, and atomic swaps. It differs from the newer
|
||||
//SendToRouteV2 in that it doesn't return the full HTLC information.
|
||||
SendToRoute(ctx context.Context, in *SendToRouteRequest, opts ...grpc.CallOption) (*SendToRouteResponse, error)
|
||||
//
|
||||
//SendToRouteV2 attempts to make a payment via the specified route. This
|
||||
//method differs from SendPayment in that it allows users to specify a full
|
||||
//route manually. This can be used for things like rebalancing, and atomic
|
||||
//swaps.
|
||||
SendToRouteV2(ctx context.Context, in *SendToRouteRequest, opts ...grpc.CallOption) (*lnrpc.HTLCAttempt, error)
|
||||
//
|
||||
//ResetMissionControl clears all mission control state and starts with a clean
|
||||
//slate.
|
||||
ResetMissionControl(ctx context.Context, in *ResetMissionControlRequest, opts ...grpc.CallOption) (*ResetMissionControlResponse, error)
|
||||
//
|
||||
//QueryMissionControl exposes the internal mission control state to callers.
|
||||
//It is a development feature.
|
||||
QueryMissionControl(ctx context.Context, in *QueryMissionControlRequest, opts ...grpc.CallOption) (*QueryMissionControlResponse, error)
|
||||
//
|
||||
//XImportMissionControl is an experimental API that imports the state provided
|
||||
//to the internal mission control's state, using all results which are more
|
||||
//recent than our existing values. These values will only be imported
|
||||
//in-memory, and will not be persisted across restarts.
|
||||
XImportMissionControl(ctx context.Context, in *XImportMissionControlRequest, opts ...grpc.CallOption) (*XImportMissionControlResponse, error)
|
||||
//
|
||||
//GetMissionControlConfig returns mission control's current config.
|
||||
GetMissionControlConfig(ctx context.Context, in *GetMissionControlConfigRequest, opts ...grpc.CallOption) (*GetMissionControlConfigResponse, error)
|
||||
//
|
||||
//SetMissionControlConfig will set mission control's config, if the config
|
||||
//provided is valid.
|
||||
SetMissionControlConfig(ctx context.Context, in *SetMissionControlConfigRequest, opts ...grpc.CallOption) (*SetMissionControlConfigResponse, error)
|
||||
//
|
||||
//QueryProbability returns the current success probability estimate for a
|
||||
//given node pair and amount.
|
||||
QueryProbability(ctx context.Context, in *QueryProbabilityRequest, opts ...grpc.CallOption) (*QueryProbabilityResponse, error)
|
||||
//
|
||||
//BuildRoute builds a fully specified route based on a list of hop public
|
||||
//keys. It retrieves the relevant channel policies from the graph in order to
|
||||
//calculate the correct fees and time locks.
|
||||
BuildRoute(ctx context.Context, in *BuildRouteRequest, opts ...grpc.CallOption) (*BuildRouteResponse, error)
|
||||
//
|
||||
//SubscribeHtlcEvents creates a uni-directional stream from the server to
|
||||
//the client which delivers a stream of htlc events.
|
||||
SubscribeHtlcEvents(ctx context.Context, in *SubscribeHtlcEventsRequest, opts ...grpc.CallOption) (Router_SubscribeHtlcEventsClient, error)
|
||||
// Deprecated: Do not use.
|
||||
//
|
||||
//Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
|
||||
//described by the passed PaymentRequest to the final destination. The call
|
||||
//returns a stream of payment status updates.
|
||||
SendPayment(ctx context.Context, in *SendPaymentRequest, opts ...grpc.CallOption) (Router_SendPaymentClient, error)
|
||||
// Deprecated: Do not use.
|
||||
//
|
||||
//Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
|
||||
//the payment identified by the payment hash.
|
||||
TrackPayment(ctx context.Context, in *TrackPaymentRequest, opts ...grpc.CallOption) (Router_TrackPaymentClient, error)
|
||||
//*
|
||||
//HtlcInterceptor dispatches a bi-directional streaming RPC in which
|
||||
//Forwarded HTLC requests are sent to the client and the client responds with
|
||||
//a boolean that tells LND if this htlc should be intercepted.
|
||||
//In case of interception, the htlc can be either settled, cancelled or
|
||||
//resumed later by using the ResolveHoldForward endpoint.
|
||||
HtlcInterceptor(ctx context.Context, opts ...grpc.CallOption) (Router_HtlcInterceptorClient, error)
|
||||
//
|
||||
//UpdateChanStatus attempts to manually set the state of a channel
|
||||
//(enabled, disabled, or auto). A manual "disable" request will cause the
|
||||
//channel to stay disabled until a subsequent manual request of either
|
||||
//"enable" or "auto".
|
||||
UpdateChanStatus(ctx context.Context, in *UpdateChanStatusRequest, opts ...grpc.CallOption) (*UpdateChanStatusResponse, error)
|
||||
}
|
||||
|
||||
type routerClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewRouterClient(cc grpc.ClientConnInterface) RouterClient {
|
||||
return &routerClient{cc}
|
||||
}
|
||||
|
||||
func (c *routerClient) SendPaymentV2(ctx context.Context, in *SendPaymentRequest, opts ...grpc.CallOption) (Router_SendPaymentV2Client, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Router_ServiceDesc.Streams[0], "/routerrpc.Router/SendPaymentV2", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &routerSendPaymentV2Client{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Router_SendPaymentV2Client interface {
|
||||
Recv() (*lnrpc.Payment, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type routerSendPaymentV2Client struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *routerSendPaymentV2Client) Recv() (*lnrpc.Payment, error) {
|
||||
m := new(lnrpc.Payment)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) TrackPaymentV2(ctx context.Context, in *TrackPaymentRequest, opts ...grpc.CallOption) (Router_TrackPaymentV2Client, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Router_ServiceDesc.Streams[1], "/routerrpc.Router/TrackPaymentV2", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &routerTrackPaymentV2Client{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Router_TrackPaymentV2Client interface {
|
||||
Recv() (*lnrpc.Payment, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type routerTrackPaymentV2Client struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *routerTrackPaymentV2Client) Recv() (*lnrpc.Payment, error) {
|
||||
m := new(lnrpc.Payment)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) EstimateRouteFee(ctx context.Context, in *RouteFeeRequest, opts ...grpc.CallOption) (*RouteFeeResponse, error) {
|
||||
out := new(RouteFeeResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/EstimateRouteFee", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (c *routerClient) SendToRoute(ctx context.Context, in *SendToRouteRequest, opts ...grpc.CallOption) (*SendToRouteResponse, error) {
|
||||
out := new(SendToRouteResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/SendToRoute", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) SendToRouteV2(ctx context.Context, in *SendToRouteRequest, opts ...grpc.CallOption) (*lnrpc.HTLCAttempt, error) {
|
||||
out := new(lnrpc.HTLCAttempt)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/SendToRouteV2", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) ResetMissionControl(ctx context.Context, in *ResetMissionControlRequest, opts ...grpc.CallOption) (*ResetMissionControlResponse, error) {
|
||||
out := new(ResetMissionControlResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/ResetMissionControl", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) QueryMissionControl(ctx context.Context, in *QueryMissionControlRequest, opts ...grpc.CallOption) (*QueryMissionControlResponse, error) {
|
||||
out := new(QueryMissionControlResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/QueryMissionControl", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) XImportMissionControl(ctx context.Context, in *XImportMissionControlRequest, opts ...grpc.CallOption) (*XImportMissionControlResponse, error) {
|
||||
out := new(XImportMissionControlResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/XImportMissionControl", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) GetMissionControlConfig(ctx context.Context, in *GetMissionControlConfigRequest, opts ...grpc.CallOption) (*GetMissionControlConfigResponse, error) {
|
||||
out := new(GetMissionControlConfigResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/GetMissionControlConfig", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) SetMissionControlConfig(ctx context.Context, in *SetMissionControlConfigRequest, opts ...grpc.CallOption) (*SetMissionControlConfigResponse, error) {
|
||||
out := new(SetMissionControlConfigResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/SetMissionControlConfig", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) QueryProbability(ctx context.Context, in *QueryProbabilityRequest, opts ...grpc.CallOption) (*QueryProbabilityResponse, error) {
|
||||
out := new(QueryProbabilityResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/QueryProbability", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) BuildRoute(ctx context.Context, in *BuildRouteRequest, opts ...grpc.CallOption) (*BuildRouteResponse, error) {
|
||||
out := new(BuildRouteResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/BuildRoute", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) SubscribeHtlcEvents(ctx context.Context, in *SubscribeHtlcEventsRequest, opts ...grpc.CallOption) (Router_SubscribeHtlcEventsClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Router_ServiceDesc.Streams[2], "/routerrpc.Router/SubscribeHtlcEvents", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &routerSubscribeHtlcEventsClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Router_SubscribeHtlcEventsClient interface {
|
||||
Recv() (*HtlcEvent, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type routerSubscribeHtlcEventsClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *routerSubscribeHtlcEventsClient) Recv() (*HtlcEvent, error) {
|
||||
m := new(HtlcEvent)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (c *routerClient) SendPayment(ctx context.Context, in *SendPaymentRequest, opts ...grpc.CallOption) (Router_SendPaymentClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Router_ServiceDesc.Streams[3], "/routerrpc.Router/SendPayment", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &routerSendPaymentClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Router_SendPaymentClient interface {
|
||||
Recv() (*PaymentStatus, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type routerSendPaymentClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *routerSendPaymentClient) Recv() (*PaymentStatus, error) {
|
||||
m := new(PaymentStatus)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (c *routerClient) TrackPayment(ctx context.Context, in *TrackPaymentRequest, opts ...grpc.CallOption) (Router_TrackPaymentClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Router_ServiceDesc.Streams[4], "/routerrpc.Router/TrackPayment", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &routerTrackPaymentClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Router_TrackPaymentClient interface {
|
||||
Recv() (*PaymentStatus, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type routerTrackPaymentClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *routerTrackPaymentClient) Recv() (*PaymentStatus, error) {
|
||||
m := new(PaymentStatus)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) HtlcInterceptor(ctx context.Context, opts ...grpc.CallOption) (Router_HtlcInterceptorClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Router_ServiceDesc.Streams[5], "/routerrpc.Router/HtlcInterceptor", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &routerHtlcInterceptorClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Router_HtlcInterceptorClient interface {
|
||||
Send(*ForwardHtlcInterceptResponse) error
|
||||
Recv() (*ForwardHtlcInterceptRequest, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type routerHtlcInterceptorClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *routerHtlcInterceptorClient) Send(m *ForwardHtlcInterceptResponse) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *routerHtlcInterceptorClient) Recv() (*ForwardHtlcInterceptRequest, error) {
|
||||
m := new(ForwardHtlcInterceptRequest)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) UpdateChanStatus(ctx context.Context, in *UpdateChanStatusRequest, opts ...grpc.CallOption) (*UpdateChanStatusResponse, error) {
|
||||
out := new(UpdateChanStatusResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/UpdateChanStatus", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RouterServer is the server API for Router service.
|
||||
// All implementations must embed UnimplementedRouterServer
|
||||
// for forward compatibility
|
||||
type RouterServer interface {
|
||||
//
|
||||
//SendPaymentV2 attempts to route a payment described by the passed
|
||||
//PaymentRequest to the final destination. The call returns a stream of
|
||||
//payment updates.
|
||||
SendPaymentV2(*SendPaymentRequest, Router_SendPaymentV2Server) error
|
||||
//
|
||||
//TrackPaymentV2 returns an update stream for the payment identified by the
|
||||
//payment hash.
|
||||
TrackPaymentV2(*TrackPaymentRequest, Router_TrackPaymentV2Server) error
|
||||
//
|
||||
//EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
|
||||
//may cost to send an HTLC to the target end destination.
|
||||
EstimateRouteFee(context.Context, *RouteFeeRequest) (*RouteFeeResponse, error)
|
||||
// Deprecated: Do not use.
|
||||
//
|
||||
//Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via
|
||||
//the specified route. This method differs from SendPayment in that it
|
||||
//allows users to specify a full route manually. This can be used for
|
||||
//things like rebalancing, and atomic swaps. It differs from the newer
|
||||
//SendToRouteV2 in that it doesn't return the full HTLC information.
|
||||
SendToRoute(context.Context, *SendToRouteRequest) (*SendToRouteResponse, error)
|
||||
//
|
||||
//SendToRouteV2 attempts to make a payment via the specified route. This
|
||||
//method differs from SendPayment in that it allows users to specify a full
|
||||
//route manually. This can be used for things like rebalancing, and atomic
|
||||
//swaps.
|
||||
SendToRouteV2(context.Context, *SendToRouteRequest) (*lnrpc.HTLCAttempt, error)
|
||||
//
|
||||
//ResetMissionControl clears all mission control state and starts with a clean
|
||||
//slate.
|
||||
ResetMissionControl(context.Context, *ResetMissionControlRequest) (*ResetMissionControlResponse, error)
|
||||
//
|
||||
//QueryMissionControl exposes the internal mission control state to callers.
|
||||
//It is a development feature.
|
||||
QueryMissionControl(context.Context, *QueryMissionControlRequest) (*QueryMissionControlResponse, error)
|
||||
//
|
||||
//XImportMissionControl is an experimental API that imports the state provided
|
||||
//to the internal mission control's state, using all results which are more
|
||||
//recent than our existing values. These values will only be imported
|
||||
//in-memory, and will not be persisted across restarts.
|
||||
XImportMissionControl(context.Context, *XImportMissionControlRequest) (*XImportMissionControlResponse, error)
|
||||
//
|
||||
//GetMissionControlConfig returns mission control's current config.
|
||||
GetMissionControlConfig(context.Context, *GetMissionControlConfigRequest) (*GetMissionControlConfigResponse, error)
|
||||
//
|
||||
//SetMissionControlConfig will set mission control's config, if the config
|
||||
//provided is valid.
|
||||
SetMissionControlConfig(context.Context, *SetMissionControlConfigRequest) (*SetMissionControlConfigResponse, error)
|
||||
//
|
||||
//QueryProbability returns the current success probability estimate for a
|
||||
//given node pair and amount.
|
||||
QueryProbability(context.Context, *QueryProbabilityRequest) (*QueryProbabilityResponse, error)
|
||||
//
|
||||
//BuildRoute builds a fully specified route based on a list of hop public
|
||||
//keys. It retrieves the relevant channel policies from the graph in order to
|
||||
//calculate the correct fees and time locks.
|
||||
BuildRoute(context.Context, *BuildRouteRequest) (*BuildRouteResponse, error)
|
||||
//
|
||||
//SubscribeHtlcEvents creates a uni-directional stream from the server to
|
||||
//the client which delivers a stream of htlc events.
|
||||
SubscribeHtlcEvents(*SubscribeHtlcEventsRequest, Router_SubscribeHtlcEventsServer) error
|
||||
// Deprecated: Do not use.
|
||||
//
|
||||
//Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
|
||||
//described by the passed PaymentRequest to the final destination. The call
|
||||
//returns a stream of payment status updates.
|
||||
SendPayment(*SendPaymentRequest, Router_SendPaymentServer) error
|
||||
// Deprecated: Do not use.
|
||||
//
|
||||
//Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
|
||||
//the payment identified by the payment hash.
|
||||
TrackPayment(*TrackPaymentRequest, Router_TrackPaymentServer) error
|
||||
//*
|
||||
//HtlcInterceptor dispatches a bi-directional streaming RPC in which
|
||||
//Forwarded HTLC requests are sent to the client and the client responds with
|
||||
//a boolean that tells LND if this htlc should be intercepted.
|
||||
//In case of interception, the htlc can be either settled, cancelled or
|
||||
//resumed later by using the ResolveHoldForward endpoint.
|
||||
HtlcInterceptor(Router_HtlcInterceptorServer) error
|
||||
//
|
||||
//UpdateChanStatus attempts to manually set the state of a channel
|
||||
//(enabled, disabled, or auto). A manual "disable" request will cause the
|
||||
//channel to stay disabled until a subsequent manual request of either
|
||||
//"enable" or "auto".
|
||||
UpdateChanStatus(context.Context, *UpdateChanStatusRequest) (*UpdateChanStatusResponse, error)
|
||||
mustEmbedUnimplementedRouterServer()
|
||||
}
|
||||
|
||||
// UnimplementedRouterServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedRouterServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedRouterServer) SendPaymentV2(*SendPaymentRequest, Router_SendPaymentV2Server) error {
|
||||
return status.Errorf(codes.Unimplemented, "method SendPaymentV2 not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) TrackPaymentV2(*TrackPaymentRequest, Router_TrackPaymentV2Server) error {
|
||||
return status.Errorf(codes.Unimplemented, "method TrackPaymentV2 not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) EstimateRouteFee(context.Context, *RouteFeeRequest) (*RouteFeeResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method EstimateRouteFee not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) SendToRoute(context.Context, *SendToRouteRequest) (*SendToRouteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SendToRoute not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) SendToRouteV2(context.Context, *SendToRouteRequest) (*lnrpc.HTLCAttempt, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SendToRouteV2 not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) ResetMissionControl(context.Context, *ResetMissionControlRequest) (*ResetMissionControlResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ResetMissionControl not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) QueryMissionControl(context.Context, *QueryMissionControlRequest) (*QueryMissionControlResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QueryMissionControl not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) XImportMissionControl(context.Context, *XImportMissionControlRequest) (*XImportMissionControlResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method XImportMissionControl not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) GetMissionControlConfig(context.Context, *GetMissionControlConfigRequest) (*GetMissionControlConfigResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetMissionControlConfig not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) SetMissionControlConfig(context.Context, *SetMissionControlConfigRequest) (*SetMissionControlConfigResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetMissionControlConfig not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) QueryProbability(context.Context, *QueryProbabilityRequest) (*QueryProbabilityResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QueryProbability not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) BuildRoute(context.Context, *BuildRouteRequest) (*BuildRouteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BuildRoute not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) SubscribeHtlcEvents(*SubscribeHtlcEventsRequest, Router_SubscribeHtlcEventsServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method SubscribeHtlcEvents not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) SendPayment(*SendPaymentRequest, Router_SendPaymentServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method SendPayment not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) TrackPayment(*TrackPaymentRequest, Router_TrackPaymentServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method TrackPayment not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) HtlcInterceptor(Router_HtlcInterceptorServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method HtlcInterceptor not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) UpdateChanStatus(context.Context, *UpdateChanStatusRequest) (*UpdateChanStatusResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateChanStatus not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) mustEmbedUnimplementedRouterServer() {}
|
||||
|
||||
// UnsafeRouterServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to RouterServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeRouterServer interface {
|
||||
mustEmbedUnimplementedRouterServer()
|
||||
}
|
||||
|
||||
func RegisterRouterServer(s grpc.ServiceRegistrar, srv RouterServer) {
|
||||
s.RegisterService(&Router_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Router_SendPaymentV2_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(SendPaymentRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(RouterServer).SendPaymentV2(m, &routerSendPaymentV2Server{stream})
|
||||
}
|
||||
|
||||
type Router_SendPaymentV2Server interface {
|
||||
Send(*lnrpc.Payment) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type routerSendPaymentV2Server struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *routerSendPaymentV2Server) Send(m *lnrpc.Payment) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _Router_TrackPaymentV2_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(TrackPaymentRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(RouterServer).TrackPaymentV2(m, &routerTrackPaymentV2Server{stream})
|
||||
}
|
||||
|
||||
type Router_TrackPaymentV2Server interface {
|
||||
Send(*lnrpc.Payment) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type routerTrackPaymentV2Server struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *routerTrackPaymentV2Server) Send(m *lnrpc.Payment) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _Router_EstimateRouteFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RouteFeeRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).EstimateRouteFee(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/EstimateRouteFee",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).EstimateRouteFee(ctx, req.(*RouteFeeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_SendToRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SendToRouteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).SendToRoute(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/SendToRoute",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).SendToRoute(ctx, req.(*SendToRouteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_SendToRouteV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SendToRouteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).SendToRouteV2(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/SendToRouteV2",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).SendToRouteV2(ctx, req.(*SendToRouteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_ResetMissionControl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ResetMissionControlRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).ResetMissionControl(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/ResetMissionControl",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).ResetMissionControl(ctx, req.(*ResetMissionControlRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_QueryMissionControl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryMissionControlRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).QueryMissionControl(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/QueryMissionControl",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).QueryMissionControl(ctx, req.(*QueryMissionControlRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_XImportMissionControl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(XImportMissionControlRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).XImportMissionControl(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/XImportMissionControl",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).XImportMissionControl(ctx, req.(*XImportMissionControlRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_GetMissionControlConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetMissionControlConfigRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).GetMissionControlConfig(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/GetMissionControlConfig",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).GetMissionControlConfig(ctx, req.(*GetMissionControlConfigRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_SetMissionControlConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SetMissionControlConfigRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).SetMissionControlConfig(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/SetMissionControlConfig",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).SetMissionControlConfig(ctx, req.(*SetMissionControlConfigRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_QueryProbability_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryProbabilityRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).QueryProbability(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/QueryProbability",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).QueryProbability(ctx, req.(*QueryProbabilityRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_BuildRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BuildRouteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).BuildRoute(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/BuildRoute",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).BuildRoute(ctx, req.(*BuildRouteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_SubscribeHtlcEvents_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(SubscribeHtlcEventsRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(RouterServer).SubscribeHtlcEvents(m, &routerSubscribeHtlcEventsServer{stream})
|
||||
}
|
||||
|
||||
type Router_SubscribeHtlcEventsServer interface {
|
||||
Send(*HtlcEvent) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type routerSubscribeHtlcEventsServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *routerSubscribeHtlcEventsServer) Send(m *HtlcEvent) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _Router_SendPayment_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(SendPaymentRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(RouterServer).SendPayment(m, &routerSendPaymentServer{stream})
|
||||
}
|
||||
|
||||
type Router_SendPaymentServer interface {
|
||||
Send(*PaymentStatus) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type routerSendPaymentServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *routerSendPaymentServer) Send(m *PaymentStatus) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _Router_TrackPayment_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(TrackPaymentRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(RouterServer).TrackPayment(m, &routerTrackPaymentServer{stream})
|
||||
}
|
||||
|
||||
type Router_TrackPaymentServer interface {
|
||||
Send(*PaymentStatus) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type routerTrackPaymentServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *routerTrackPaymentServer) Send(m *PaymentStatus) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _Router_HtlcInterceptor_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(RouterServer).HtlcInterceptor(&routerHtlcInterceptorServer{stream})
|
||||
}
|
||||
|
||||
type Router_HtlcInterceptorServer interface {
|
||||
Send(*ForwardHtlcInterceptRequest) error
|
||||
Recv() (*ForwardHtlcInterceptResponse, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type routerHtlcInterceptorServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *routerHtlcInterceptorServer) Send(m *ForwardHtlcInterceptRequest) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *routerHtlcInterceptorServer) Recv() (*ForwardHtlcInterceptResponse, error) {
|
||||
m := new(ForwardHtlcInterceptResponse)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func _Router_UpdateChanStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateChanStatusRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).UpdateChanStatus(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/UpdateChanStatus",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).UpdateChanStatus(ctx, req.(*UpdateChanStatusRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Router_ServiceDesc is the grpc.ServiceDesc for Router service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Router_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "routerrpc.Router",
|
||||
HandlerType: (*RouterServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "EstimateRouteFee",
|
||||
Handler: _Router_EstimateRouteFee_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SendToRoute",
|
||||
Handler: _Router_SendToRoute_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SendToRouteV2",
|
||||
Handler: _Router_SendToRouteV2_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ResetMissionControl",
|
||||
Handler: _Router_ResetMissionControl_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QueryMissionControl",
|
||||
Handler: _Router_QueryMissionControl_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "XImportMissionControl",
|
||||
Handler: _Router_XImportMissionControl_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetMissionControlConfig",
|
||||
Handler: _Router_GetMissionControlConfig_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetMissionControlConfig",
|
||||
Handler: _Router_SetMissionControlConfig_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QueryProbability",
|
||||
Handler: _Router_QueryProbability_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BuildRoute",
|
||||
Handler: _Router_BuildRoute_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateChanStatus",
|
||||
Handler: _Router_UpdateChanStatus_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "SendPaymentV2",
|
||||
Handler: _Router_SendPaymentV2_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "TrackPaymentV2",
|
||||
Handler: _Router_TrackPaymentV2_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "SubscribeHtlcEvents",
|
||||
Handler: _Router_SubscribeHtlcEvents_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "SendPayment",
|
||||
Handler: _Router_SendPayment_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "TrackPayment",
|
||||
Handler: _Router_TrackPayment_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "HtlcInterceptor",
|
||||
Handler: _Router_HtlcInterceptor_Handler,
|
||||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "routerrpc/router.proto",
|
||||
}
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/lnrpc"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
@@ -147,6 +147,11 @@ type Server struct {
|
||||
shutdown int32 // To be used atomically.
|
||||
forwardInterceptorActive int32 // To be used atomically.
|
||||
|
||||
// Required by the grpc-gateway/v2 library for forward compatibility.
|
||||
// Must be after the atomically used variables to not break struct
|
||||
// alignment.
|
||||
UnimplementedRouterServer
|
||||
|
||||
cfg *Config
|
||||
|
||||
quit chan struct{}
|
||||
|
||||
Reference in new issue
Block a user