Documentation ¶
Overview ¶
Package routerrpc is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func DisableLog()
- func MarshalTimeNano(t time.Time) int64
- func RegisterRouterHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterRouterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RouterClient) error
- func RegisterRouterHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterRouterHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RouterServer) error
- func RegisterRouterJSONCallbacks(...)
- func RegisterRouterServer(s grpc.ServiceRegistrar, srv RouterServer)
- func UnmarshalAMP(reqAMP *lnrpc.AMPRecord) (*record.AMP, error)
- func UnmarshalFeatures(rpcFeatures []lnrpc.FeatureBit) (*lnwire.FeatureVector, error)
- func UnmarshalMPP(reqMPP *lnrpc.MPPRecord) (*record.MPP, error)
- func UnmarshallHopWithPubkey(rpcHop *lnrpc.Hop, pubkey route.Vertex) (*route.Hop, error)
- func UseLogger(logger btclog.Logger)
- func ValidateCLTVLimit(val, max uint32) (uint32, error)
- func ValidatePayReqExpiry(payReq *zpay32.Invoice) error
- type AprioriConfig
- type AprioriParameters
- func (*AprioriParameters) Descriptor() ([]byte, []int)deprecated
- func (x *AprioriParameters) GetCapacityFraction() float64
- func (x *AprioriParameters) GetHalfLifeSeconds() uint64
- func (x *AprioriParameters) GetHopProbability() float64
- func (x *AprioriParameters) GetWeight() float64
- func (*AprioriParameters) ProtoMessage()
- func (x *AprioriParameters) ProtoReflect() protoreflect.Message
- func (x *AprioriParameters) Reset()
- func (x *AprioriParameters) String() string
- type BimodalConfig
- type BimodalParameters
- func (*BimodalParameters) Descriptor() ([]byte, []int)deprecated
- func (x *BimodalParameters) GetDecayTime() uint64
- func (x *BimodalParameters) GetNodeWeight() float64
- func (x *BimodalParameters) GetScaleMsat() uint64
- func (*BimodalParameters) ProtoMessage()
- func (x *BimodalParameters) ProtoReflect() protoreflect.Message
- func (x *BimodalParameters) Reset()
- func (x *BimodalParameters) String() string
- type BuildRouteRequest
- func (*BuildRouteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BuildRouteRequest) GetAmtMsat() int64
- func (x *BuildRouteRequest) GetFinalCltvDelta() int32
- func (x *BuildRouteRequest) GetHopPubkeys() [][]byte
- func (x *BuildRouteRequest) GetOutgoingChanId() uint64
- func (x *BuildRouteRequest) GetPaymentAddr() []byte
- func (*BuildRouteRequest) ProtoMessage()
- func (x *BuildRouteRequest) ProtoReflect() protoreflect.Message
- func (x *BuildRouteRequest) Reset()
- func (x *BuildRouteRequest) String() string
- type BuildRouteResponse
- func (*BuildRouteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BuildRouteResponse) GetRoute() *lnrpc.Route
- func (*BuildRouteResponse) ProtoMessage()
- func (x *BuildRouteResponse) ProtoReflect() protoreflect.Message
- func (x *BuildRouteResponse) Reset()
- func (x *BuildRouteResponse) String() string
- type ChanStatusAction
- func (ChanStatusAction) Descriptor() protoreflect.EnumDescriptor
- func (x ChanStatusAction) Enum() *ChanStatusAction
- func (ChanStatusAction) EnumDescriptor() ([]byte, []int)deprecated
- func (x ChanStatusAction) Number() protoreflect.EnumNumber
- func (x ChanStatusAction) String() string
- func (ChanStatusAction) Type() protoreflect.EnumType
- type CircuitKey
- type Config
- type FailureDetail
- func (FailureDetail) Descriptor() protoreflect.EnumDescriptor
- func (x FailureDetail) Enum() *FailureDetail
- func (FailureDetail) EnumDescriptor() ([]byte, []int)deprecated
- func (x FailureDetail) Number() protoreflect.EnumNumber
- func (x FailureDetail) String() string
- func (FailureDetail) Type() protoreflect.EnumType
- type FinalHtlcEvent
- func (*FinalHtlcEvent) Descriptor() ([]byte, []int)deprecated
- func (x *FinalHtlcEvent) GetOffchain() bool
- func (x *FinalHtlcEvent) GetSettled() bool
- func (*FinalHtlcEvent) ProtoMessage()
- func (x *FinalHtlcEvent) ProtoReflect() protoreflect.Message
- func (x *FinalHtlcEvent) Reset()
- func (x *FinalHtlcEvent) String() string
- type ForwardEvent
- type ForwardFailEvent
- type ForwardHtlcInterceptRequest
- func (*ForwardHtlcInterceptRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ForwardHtlcInterceptRequest) GetAutoFailHeight() int32
- func (x *ForwardHtlcInterceptRequest) GetCustomRecords() map[uint64][]byte
- func (x *ForwardHtlcInterceptRequest) GetIncomingAmountMsat() uint64
- func (x *ForwardHtlcInterceptRequest) GetIncomingCircuitKey() *CircuitKey
- func (x *ForwardHtlcInterceptRequest) GetIncomingExpiry() uint32
- func (x *ForwardHtlcInterceptRequest) GetOnionBlob() []byte
- func (x *ForwardHtlcInterceptRequest) GetOutgoingAmountMsat() uint64
- func (x *ForwardHtlcInterceptRequest) GetOutgoingExpiry() uint32
- func (x *ForwardHtlcInterceptRequest) GetOutgoingRequestedChanId() uint64
- func (x *ForwardHtlcInterceptRequest) GetPaymentHash() []byte
- func (*ForwardHtlcInterceptRequest) ProtoMessage()
- func (x *ForwardHtlcInterceptRequest) ProtoReflect() protoreflect.Message
- func (x *ForwardHtlcInterceptRequest) Reset()
- func (x *ForwardHtlcInterceptRequest) String() string
- type ForwardHtlcInterceptResponse
- func (*ForwardHtlcInterceptResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ForwardHtlcInterceptResponse) GetAction() ResolveHoldForwardAction
- func (x *ForwardHtlcInterceptResponse) GetFailureCode() lnrpc.Failure_FailureCode
- func (x *ForwardHtlcInterceptResponse) GetFailureMessage() []byte
- func (x *ForwardHtlcInterceptResponse) GetIncomingCircuitKey() *CircuitKey
- func (x *ForwardHtlcInterceptResponse) GetPreimage() []byte
- func (*ForwardHtlcInterceptResponse) ProtoMessage()
- func (x *ForwardHtlcInterceptResponse) ProtoReflect() protoreflect.Message
- func (x *ForwardHtlcInterceptResponse) Reset()
- func (x *ForwardHtlcInterceptResponse) String() string
- type GetMissionControlConfigRequest
- func (*GetMissionControlConfigRequest) Descriptor() ([]byte, []int)deprecated
- func (*GetMissionControlConfigRequest) ProtoMessage()
- func (x *GetMissionControlConfigRequest) ProtoReflect() protoreflect.Message
- func (x *GetMissionControlConfigRequest) Reset()
- func (x *GetMissionControlConfigRequest) String() string
- type GetMissionControlConfigResponse
- func (*GetMissionControlConfigResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetMissionControlConfigResponse) GetConfig() *MissionControlConfig
- func (*GetMissionControlConfigResponse) ProtoMessage()
- func (x *GetMissionControlConfigResponse) ProtoReflect() protoreflect.Message
- func (x *GetMissionControlConfigResponse) Reset()
- func (x *GetMissionControlConfigResponse) String() string
- type HtlcEvent
- func (*HtlcEvent) Descriptor() ([]byte, []int)deprecated
- func (m *HtlcEvent) GetEvent() isHtlcEvent_Event
- func (x *HtlcEvent) GetEventType() HtlcEvent_EventType
- func (x *HtlcEvent) GetFinalHtlcEvent() *FinalHtlcEvent
- func (x *HtlcEvent) GetForwardEvent() *ForwardEvent
- func (x *HtlcEvent) GetForwardFailEvent() *ForwardFailEvent
- func (x *HtlcEvent) GetIncomingChannelId() uint64
- func (x *HtlcEvent) GetIncomingHtlcId() uint64
- func (x *HtlcEvent) GetLinkFailEvent() *LinkFailEvent
- func (x *HtlcEvent) GetOutgoingChannelId() uint64
- func (x *HtlcEvent) GetOutgoingHtlcId() uint64
- func (x *HtlcEvent) GetSettleEvent() *SettleEvent
- func (x *HtlcEvent) GetSubscribedEvent() *SubscribedEvent
- func (x *HtlcEvent) GetTimestampNs() uint64
- func (*HtlcEvent) ProtoMessage()
- func (x *HtlcEvent) ProtoReflect() protoreflect.Message
- func (x *HtlcEvent) Reset()
- func (x *HtlcEvent) String() string
- type HtlcEvent_EventType
- func (HtlcEvent_EventType) Descriptor() protoreflect.EnumDescriptor
- func (x HtlcEvent_EventType) Enum() *HtlcEvent_EventType
- func (HtlcEvent_EventType) EnumDescriptor() ([]byte, []int)deprecated
- func (x HtlcEvent_EventType) Number() protoreflect.EnumNumber
- func (x HtlcEvent_EventType) String() string
- func (HtlcEvent_EventType) Type() protoreflect.EnumType
- type HtlcEvent_FinalHtlcEvent
- type HtlcEvent_ForwardEvent
- type HtlcEvent_ForwardFailEvent
- type HtlcEvent_LinkFailEvent
- type HtlcEvent_SettleEvent
- type HtlcEvent_SubscribedEvent
- type HtlcInfo
- func (*HtlcInfo) Descriptor() ([]byte, []int)deprecated
- func (x *HtlcInfo) GetIncomingAmtMsat() uint64
- func (x *HtlcInfo) GetIncomingTimelock() uint32
- func (x *HtlcInfo) GetOutgoingAmtMsat() uint64
- func (x *HtlcInfo) GetOutgoingTimelock() uint32
- func (*HtlcInfo) ProtoMessage()
- func (x *HtlcInfo) ProtoReflect() protoreflect.Message
- func (x *HtlcInfo) Reset()
- func (x *HtlcInfo) String() string
- type LinkFailEvent
- func (*LinkFailEvent) Descriptor() ([]byte, []int)deprecated
- func (x *LinkFailEvent) GetFailureDetail() FailureDetail
- func (x *LinkFailEvent) GetFailureString() string
- func (x *LinkFailEvent) GetInfo() *HtlcInfo
- func (x *LinkFailEvent) GetWireFailure() lnrpc.Failure_FailureCode
- func (*LinkFailEvent) ProtoMessage()
- func (x *LinkFailEvent) ProtoReflect() protoreflect.Message
- func (x *LinkFailEvent) Reset()
- func (x *LinkFailEvent) String() string
- type MissionControl
- type MissionControlConfig
- func (*MissionControlConfig) Descriptor() ([]byte, []int)deprecated
- func (x *MissionControlConfig) GetApriori() *AprioriParameters
- func (x *MissionControlConfig) GetBimodal() *BimodalParameters
- func (m *MissionControlConfig) GetEstimatorConfig() isMissionControlConfig_EstimatorConfig
- func (x *MissionControlConfig) GetHalfLifeSeconds() uint64deprecated
- func (x *MissionControlConfig) GetHopProbability() float32deprecated
- func (x *MissionControlConfig) GetMaximumPaymentResults() uint32
- func (x *MissionControlConfig) GetMinimumFailureRelaxInterval() uint64
- func (x *MissionControlConfig) GetModel() MissionControlConfig_ProbabilityModel
- func (x *MissionControlConfig) GetWeight() float32deprecated
- func (*MissionControlConfig) ProtoMessage()
- func (x *MissionControlConfig) ProtoReflect() protoreflect.Message
- func (x *MissionControlConfig) Reset()
- func (x *MissionControlConfig) String() string
- type MissionControlConfig_Apriori
- type MissionControlConfig_Bimodal
- type MissionControlConfig_ProbabilityModel
- func (MissionControlConfig_ProbabilityModel) Descriptor() protoreflect.EnumDescriptor
- func (x MissionControlConfig_ProbabilityModel) Enum() *MissionControlConfig_ProbabilityModel
- func (MissionControlConfig_ProbabilityModel) EnumDescriptor() ([]byte, []int)deprecated
- func (x MissionControlConfig_ProbabilityModel) Number() protoreflect.EnumNumber
- func (x MissionControlConfig_ProbabilityModel) String() string
- func (MissionControlConfig_ProbabilityModel) Type() protoreflect.EnumType
- type PairData
- func (*PairData) Descriptor() ([]byte, []int)deprecated
- func (x *PairData) GetFailAmtMsat() int64
- func (x *PairData) GetFailAmtSat() int64
- func (x *PairData) GetFailTime() int64
- func (x *PairData) GetSuccessAmtMsat() int64
- func (x *PairData) GetSuccessAmtSat() int64
- func (x *PairData) GetSuccessTime() int64
- func (*PairData) ProtoMessage()
- func (x *PairData) ProtoReflect() protoreflect.Message
- func (x *PairData) Reset()
- func (x *PairData) String() string
- type PairHistory
- func (*PairHistory) Descriptor() ([]byte, []int)deprecated
- func (x *PairHistory) GetHistory() *PairData
- func (x *PairHistory) GetNodeFrom() []byte
- func (x *PairHistory) GetNodeTo() []byte
- func (*PairHistory) ProtoMessage()
- func (x *PairHistory) ProtoReflect() protoreflect.Message
- func (x *PairHistory) Reset()
- func (x *PairHistory) String() string
- type PaymentState
- func (PaymentState) Descriptor() protoreflect.EnumDescriptor
- func (x PaymentState) Enum() *PaymentState
- func (PaymentState) EnumDescriptor() ([]byte, []int)deprecated
- func (x PaymentState) Number() protoreflect.EnumNumber
- func (x PaymentState) String() string
- func (PaymentState) Type() protoreflect.EnumType
- type PaymentStatus
- func (*PaymentStatus) Descriptor() ([]byte, []int)deprecated
- func (x *PaymentStatus) GetHtlcs() []*lnrpc.HTLCAttempt
- func (x *PaymentStatus) GetPreimage() []byte
- func (x *PaymentStatus) GetState() PaymentState
- func (*PaymentStatus) ProtoMessage()
- func (x *PaymentStatus) ProtoReflect() protoreflect.Message
- func (x *PaymentStatus) Reset()
- func (x *PaymentStatus) String() string
- type QueryMissionControlRequest
- type QueryMissionControlResponse
- func (*QueryMissionControlResponse) Descriptor() ([]byte, []int)deprecated
- func (x *QueryMissionControlResponse) GetPairs() []*PairHistory
- func (*QueryMissionControlResponse) ProtoMessage()
- func (x *QueryMissionControlResponse) ProtoReflect() protoreflect.Message
- func (x *QueryMissionControlResponse) Reset()
- func (x *QueryMissionControlResponse) String() string
- type QueryProbabilityRequest
- func (*QueryProbabilityRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryProbabilityRequest) GetAmtMsat() int64
- func (x *QueryProbabilityRequest) GetFromNode() []byte
- func (x *QueryProbabilityRequest) GetToNode() []byte
- func (*QueryProbabilityRequest) ProtoMessage()
- func (x *QueryProbabilityRequest) ProtoReflect() protoreflect.Message
- func (x *QueryProbabilityRequest) Reset()
- func (x *QueryProbabilityRequest) String() string
- type QueryProbabilityResponse
- func (*QueryProbabilityResponse) Descriptor() ([]byte, []int)deprecated
- func (x *QueryProbabilityResponse) GetHistory() *PairData
- func (x *QueryProbabilityResponse) GetProbability() float64
- func (*QueryProbabilityResponse) ProtoMessage()
- func (x *QueryProbabilityResponse) ProtoReflect() protoreflect.Message
- func (x *QueryProbabilityResponse) Reset()
- func (x *QueryProbabilityResponse) String() string
- type ResetMissionControlRequest
- type ResetMissionControlResponse
- type ResolveHoldForwardAction
- func (ResolveHoldForwardAction) Descriptor() protoreflect.EnumDescriptor
- func (x ResolveHoldForwardAction) Enum() *ResolveHoldForwardAction
- func (ResolveHoldForwardAction) EnumDescriptor() ([]byte, []int)deprecated
- func (x ResolveHoldForwardAction) Number() protoreflect.EnumNumber
- func (x ResolveHoldForwardAction) String() string
- func (ResolveHoldForwardAction) Type() protoreflect.EnumType
- type RouteFeeRequest
- func (*RouteFeeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RouteFeeRequest) GetAmtSat() int64
- func (x *RouteFeeRequest) GetDest() []byte
- func (*RouteFeeRequest) ProtoMessage()
- func (x *RouteFeeRequest) ProtoReflect() protoreflect.Message
- func (x *RouteFeeRequest) Reset()
- func (x *RouteFeeRequest) String() string
- type RouteFeeResponse
- func (*RouteFeeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RouteFeeResponse) GetRoutingFeeMsat() int64
- func (x *RouteFeeResponse) GetTimeLockDelay() int64
- func (*RouteFeeResponse) ProtoMessage()
- func (x *RouteFeeResponse) ProtoReflect() protoreflect.Message
- func (x *RouteFeeResponse) Reset()
- func (x *RouteFeeResponse) String() string
- type RouterBackend
- func (r *RouterBackend) MarshalHTLCAttempt(htlc channeldb.HTLCAttempt) (*lnrpc.HTLCAttempt, error)
- func (r *RouterBackend) MarshallPayment(payment *channeldb.MPPayment) (*lnrpc.Payment, error)
- func (r *RouterBackend) MarshallRoute(route *route.Route) (*lnrpc.Route, error)
- func (r *RouterBackend) QueryRoutes(ctx context.Context, in *lnrpc.QueryRoutesRequest) (*lnrpc.QueryRoutesResponse, error)
- func (r *RouterBackend) UnmarshallHop(rpcHop *lnrpc.Hop, prevNodePubKey [33]byte) (*route.Hop, error)
- func (r *RouterBackend) UnmarshallRoute(rpcroute *lnrpc.Route) (*route.Route, error)
- type RouterClient
- type RouterServer
- type Router_HtlcInterceptorClient
- type Router_HtlcInterceptorServer
- type Router_SendPaymentClient
- type Router_SendPaymentServer
- type Router_SendPaymentV2Client
- type Router_SendPaymentV2Server
- type Router_SubscribeHtlcEventsClient
- type Router_SubscribeHtlcEventsServer
- type Router_TrackPaymentClient
- type Router_TrackPaymentServer
- type Router_TrackPaymentV2Client
- type Router_TrackPaymentV2Server
- type Router_TrackPaymentsClient
- type Router_TrackPaymentsServer
- type RoutingConfig
- type SendPaymentRequest
- func (*SendPaymentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendPaymentRequest) GetAllowSelfPayment() bool
- func (x *SendPaymentRequest) GetAmp() bool
- func (x *SendPaymentRequest) GetAmt() int64
- func (x *SendPaymentRequest) GetAmtMsat() int64
- func (x *SendPaymentRequest) GetCltvLimit() int32
- func (x *SendPaymentRequest) GetDest() []byte
- func (x *SendPaymentRequest) GetDestCustomRecords() map[uint64][]byte
- func (x *SendPaymentRequest) GetDestFeatures() []lnrpc.FeatureBit
- func (x *SendPaymentRequest) GetFeeLimitMsat() int64
- func (x *SendPaymentRequest) GetFeeLimitSat() int64
- func (x *SendPaymentRequest) GetFinalCltvDelta() int32
- func (x *SendPaymentRequest) GetLastHopPubkey() []byte
- func (x *SendPaymentRequest) GetMaxParts() uint32
- func (x *SendPaymentRequest) GetMaxShardSizeMsat() uint64
- func (x *SendPaymentRequest) GetNoInflightUpdates() bool
- func (x *SendPaymentRequest) GetOutgoingChanId() uint64deprecated
- func (x *SendPaymentRequest) GetOutgoingChanIds() []uint64
- func (x *SendPaymentRequest) GetPaymentAddr() []byte
- func (x *SendPaymentRequest) GetPaymentHash() []byte
- func (x *SendPaymentRequest) GetPaymentRequest() string
- func (x *SendPaymentRequest) GetRouteHints() []*lnrpc.RouteHint
- func (x *SendPaymentRequest) GetTimePref() float64
- func (x *SendPaymentRequest) GetTimeoutSeconds() int32
- func (*SendPaymentRequest) ProtoMessage()
- func (x *SendPaymentRequest) ProtoReflect() protoreflect.Message
- func (x *SendPaymentRequest) Reset()
- func (x *SendPaymentRequest) String() string
- type SendToRouteRequest
- func (*SendToRouteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendToRouteRequest) GetPaymentHash() []byte
- func (x *SendToRouteRequest) GetRoute() *lnrpc.Route
- func (x *SendToRouteRequest) GetSkipTempErr() bool
- func (*SendToRouteRequest) ProtoMessage()
- func (x *SendToRouteRequest) ProtoReflect() protoreflect.Message
- func (x *SendToRouteRequest) Reset()
- func (x *SendToRouteRequest) String() string
- type SendToRouteResponse
- func (*SendToRouteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SendToRouteResponse) GetFailure() *lnrpc.Failure
- func (x *SendToRouteResponse) GetPreimage() []byte
- func (*SendToRouteResponse) ProtoMessage()
- func (x *SendToRouteResponse) ProtoReflect() protoreflect.Message
- func (x *SendToRouteResponse) Reset()
- func (x *SendToRouteResponse) String() string
- type Server
- func (s *Server) BuildRoute(ctx context.Context, req *BuildRouteRequest) (*BuildRouteResponse, error)
- func (s *Server) EstimateRouteFee(ctx context.Context, req *RouteFeeRequest) (*RouteFeeResponse, error)
- func (s *Server) GetMissionControlConfig(ctx context.Context, req *GetMissionControlConfigRequest) (*GetMissionControlConfigResponse, error)
- func (s *Server) HtlcInterceptor(stream Router_HtlcInterceptorServer) error
- func (s *Server) Name() string
- func (s *Server) QueryMissionControl(ctx context.Context, req *QueryMissionControlRequest) (*QueryMissionControlResponse, error)
- func (s *Server) QueryProbability(ctx context.Context, req *QueryProbabilityRequest) (*QueryProbabilityResponse, error)
- func (s *Server) ResetMissionControl(ctx context.Context, req *ResetMissionControlRequest) (*ResetMissionControlResponse, error)
- func (s *Server) SendPayment(request *SendPaymentRequest, stream Router_SendPaymentServer) error
- func (s *Server) SendPaymentV2(req *SendPaymentRequest, stream Router_SendPaymentV2Server) error
- func (s *Server) SendToRoute(ctx context.Context, req *SendToRouteRequest) (*SendToRouteResponse, error)
- func (s *Server) SendToRouteV2(ctx context.Context, req *SendToRouteRequest) (*lnrpc.HTLCAttempt, error)
- func (s *Server) SetMissionControlConfig(ctx context.Context, req *SetMissionControlConfigRequest) (*SetMissionControlConfigResponse, error)
- func (s *Server) Start() error
- func (s *Server) Stop() error
- func (s *Server) SubscribeHtlcEvents(req *SubscribeHtlcEventsRequest, stream Router_SubscribeHtlcEventsServer) error
- func (s *Server) TrackPayment(request *TrackPaymentRequest, stream Router_TrackPaymentServer) error
- func (s *Server) TrackPaymentV2(request *TrackPaymentRequest, stream Router_TrackPaymentV2Server) error
- func (s *Server) TrackPayments(request *TrackPaymentsRequest, stream Router_TrackPaymentsServer) error
- func (s *Server) UpdateChanStatus(ctx context.Context, req *UpdateChanStatusRequest) (*UpdateChanStatusResponse, error)
- func (s *Server) XImportMissionControl(ctx context.Context, req *XImportMissionControlRequest) (*XImportMissionControlResponse, error)
- type ServerShell
- func (r *ServerShell) CreateSubServer(configRegistry lnrpc.SubServerConfigDispatcher) (lnrpc.SubServer, lnrpc.MacaroonPerms, error)
- func (r *ServerShell) RegisterWithRestServer(ctx context.Context, mux *runtime.ServeMux, dest string, ...) error
- func (r *ServerShell) RegisterWithRootServer(grpcServer *grpc.Server) error
- type SetMissionControlConfigRequest
- func (*SetMissionControlConfigRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetMissionControlConfigRequest) GetConfig() *MissionControlConfig
- func (*SetMissionControlConfigRequest) ProtoMessage()
- func (x *SetMissionControlConfigRequest) ProtoReflect() protoreflect.Message
- func (x *SetMissionControlConfigRequest) Reset()
- func (x *SetMissionControlConfigRequest) String() string
- type SetMissionControlConfigResponse
- func (*SetMissionControlConfigResponse) Descriptor() ([]byte, []int)deprecated
- func (*SetMissionControlConfigResponse) ProtoMessage()
- func (x *SetMissionControlConfigResponse) ProtoReflect() protoreflect.Message
- func (x *SetMissionControlConfigResponse) Reset()
- func (x *SetMissionControlConfigResponse) String() string
- type SettleEvent
- type SubscribeHtlcEventsRequest
- type SubscribedEvent
- type TrackPaymentRequest
- func (*TrackPaymentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TrackPaymentRequest) GetNoInflightUpdates() bool
- func (x *TrackPaymentRequest) GetPaymentHash() []byte
- func (*TrackPaymentRequest) ProtoMessage()
- func (x *TrackPaymentRequest) ProtoReflect() protoreflect.Message
- func (x *TrackPaymentRequest) Reset()
- func (x *TrackPaymentRequest) String() string
- type TrackPaymentsRequest
- func (*TrackPaymentsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TrackPaymentsRequest) GetNoInflightUpdates() bool
- func (*TrackPaymentsRequest) ProtoMessage()
- func (x *TrackPaymentsRequest) ProtoReflect() protoreflect.Message
- func (x *TrackPaymentsRequest) Reset()
- func (x *TrackPaymentsRequest) String() string
- type UnimplementedRouterServer
- func (UnimplementedRouterServer) BuildRoute(context.Context, *BuildRouteRequest) (*BuildRouteResponse, error)
- func (UnimplementedRouterServer) EstimateRouteFee(context.Context, *RouteFeeRequest) (*RouteFeeResponse, error)
- func (UnimplementedRouterServer) GetMissionControlConfig(context.Context, *GetMissionControlConfigRequest) (*GetMissionControlConfigResponse, error)
- func (UnimplementedRouterServer) HtlcInterceptor(Router_HtlcInterceptorServer) error
- func (UnimplementedRouterServer) QueryMissionControl(context.Context, *QueryMissionControlRequest) (*QueryMissionControlResponse, error)
- func (UnimplementedRouterServer) QueryProbability(context.Context, *QueryProbabilityRequest) (*QueryProbabilityResponse, error)
- func (UnimplementedRouterServer) ResetMissionControl(context.Context, *ResetMissionControlRequest) (*ResetMissionControlResponse, error)
- func (UnimplementedRouterServer) SendPayment(*SendPaymentRequest, Router_SendPaymentServer) error
- func (UnimplementedRouterServer) SendPaymentV2(*SendPaymentRequest, Router_SendPaymentV2Server) error
- func (UnimplementedRouterServer) SendToRoute(context.Context, *SendToRouteRequest) (*SendToRouteResponse, error)
- func (UnimplementedRouterServer) SendToRouteV2(context.Context, *SendToRouteRequest) (*lnrpc.HTLCAttempt, error)
- func (UnimplementedRouterServer) SetMissionControlConfig(context.Context, *SetMissionControlConfigRequest) (*SetMissionControlConfigResponse, error)
- func (UnimplementedRouterServer) SubscribeHtlcEvents(*SubscribeHtlcEventsRequest, Router_SubscribeHtlcEventsServer) error
- func (UnimplementedRouterServer) TrackPayment(*TrackPaymentRequest, Router_TrackPaymentServer) error
- func (UnimplementedRouterServer) TrackPaymentV2(*TrackPaymentRequest, Router_TrackPaymentV2Server) error
- func (UnimplementedRouterServer) TrackPayments(*TrackPaymentsRequest, Router_TrackPaymentsServer) error
- func (UnimplementedRouterServer) UpdateChanStatus(context.Context, *UpdateChanStatusRequest) (*UpdateChanStatusResponse, error)
- func (UnimplementedRouterServer) XImportMissionControl(context.Context, *XImportMissionControlRequest) (*XImportMissionControlResponse, error)
- type UnsafeRouterServer
- type UpdateChanStatusRequest
- func (*UpdateChanStatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateChanStatusRequest) GetAction() ChanStatusAction
- func (x *UpdateChanStatusRequest) GetChanPoint() *lnrpc.ChannelPoint
- func (*UpdateChanStatusRequest) ProtoMessage()
- func (x *UpdateChanStatusRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateChanStatusRequest) Reset()
- func (x *UpdateChanStatusRequest) String() string
- type UpdateChanStatusResponse
- type XImportMissionControlRequest
- func (*XImportMissionControlRequest) Descriptor() ([]byte, []int)deprecated
- func (x *XImportMissionControlRequest) GetForce() bool
- func (x *XImportMissionControlRequest) GetPairs() []*PairHistory
- func (*XImportMissionControlRequest) ProtoMessage()
- func (x *XImportMissionControlRequest) ProtoReflect() protoreflect.Message
- func (x *XImportMissionControlRequest) Reset()
- func (x *XImportMissionControlRequest) String() string
- type XImportMissionControlResponse
- func (*XImportMissionControlResponse) Descriptor() ([]byte, []int)deprecated
- func (*XImportMissionControlResponse) ProtoMessage()
- func (x *XImportMissionControlResponse) ProtoReflect() protoreflect.Message
- func (x *XImportMissionControlResponse) Reset()
- func (x *XImportMissionControlResponse) String() string
Constants ¶
const ( // DefaultMaxParts is the default number of splits we'll possibly use // for MPP when the user is attempting to send a payment. // // TODO(roasbeef): make this value dynamic based on expected number of // attempts for given amount. DefaultMaxParts = 16 )
const Subsystem = "RRPC"
Subsystem defines the logging code for this subsystem.
Variables ¶
var ( // ErrFwdNotExists is an error returned when the caller tries to resolve // a forward that doesn't exist anymore. ErrFwdNotExists = errors.New("forward does not exist") // ErrMissingPreimage is an error returned when the caller tries to settle // a forward and doesn't provide a preimage. ErrMissingPreimage = errors.New("missing preimage") )
var ( FailureDetail_name = map[int32]string{ 0: "UNKNOWN", 1: "NO_DETAIL", 2: "ONION_DECODE", 3: "LINK_NOT_ELIGIBLE", 4: "ON_CHAIN_TIMEOUT", 5: "HTLC_EXCEEDS_MAX", 6: "INSUFFICIENT_BALANCE", 7: "INCOMPLETE_FORWARD", 8: "HTLC_ADD_FAILED", 9: "FORWARDS_DISABLED", 10: "INVOICE_CANCELED", 11: "INVOICE_UNDERPAID", 12: "INVOICE_EXPIRY_TOO_SOON", 13: "INVOICE_NOT_OPEN", 14: "MPP_INVOICE_TIMEOUT", 15: "ADDRESS_MISMATCH", 16: "SET_TOTAL_MISMATCH", 17: "SET_TOTAL_TOO_LOW", 18: "SET_OVERPAID", 19: "UNKNOWN_INVOICE", 20: "INVALID_KEYSEND", 21: "MPP_IN_PROGRESS", 22: "CIRCULAR_ROUTE", } FailureDetail_value = map[string]int32{ "UNKNOWN": 0, "NO_DETAIL": 1, "ONION_DECODE": 2, "LINK_NOT_ELIGIBLE": 3, "ON_CHAIN_TIMEOUT": 4, "HTLC_EXCEEDS_MAX": 5, "INSUFFICIENT_BALANCE": 6, "INCOMPLETE_FORWARD": 7, "HTLC_ADD_FAILED": 8, "FORWARDS_DISABLED": 9, "INVOICE_CANCELED": 10, "INVOICE_UNDERPAID": 11, "INVOICE_EXPIRY_TOO_SOON": 12, "INVOICE_NOT_OPEN": 13, "MPP_INVOICE_TIMEOUT": 14, "ADDRESS_MISMATCH": 15, "SET_TOTAL_MISMATCH": 16, "SET_TOTAL_TOO_LOW": 17, "SET_OVERPAID": 18, "UNKNOWN_INVOICE": 19, "INVALID_KEYSEND": 20, "MPP_IN_PROGRESS": 21, "CIRCULAR_ROUTE": 22, } )
Enum value maps for FailureDetail.
var ( PaymentState_name = map[int32]string{ 0: "IN_FLIGHT", 1: "SUCCEEDED", 2: "FAILED_TIMEOUT", 3: "FAILED_NO_ROUTE", 4: "FAILED_ERROR", 5: "FAILED_INCORRECT_PAYMENT_DETAILS", 6: "FAILED_INSUFFICIENT_BALANCE", } PaymentState_value = map[string]int32{ "IN_FLIGHT": 0, "SUCCEEDED": 1, "FAILED_TIMEOUT": 2, "FAILED_NO_ROUTE": 3, "FAILED_ERROR": 4, "FAILED_INCORRECT_PAYMENT_DETAILS": 5, "FAILED_INSUFFICIENT_BALANCE": 6, } )
Enum value maps for PaymentState.
var ( ResolveHoldForwardAction_name = map[int32]string{ 0: "SETTLE", 1: "FAIL", 2: "RESUME", } ResolveHoldForwardAction_value = map[string]int32{ "SETTLE": 0, "FAIL": 1, "RESUME": 2, } )
Enum value maps for ResolveHoldForwardAction.
var ( ChanStatusAction_name = map[int32]string{ 0: "ENABLE", 1: "DISABLE", 2: "AUTO", } ChanStatusAction_value = map[string]int32{ "ENABLE": 0, "DISABLE": 1, "AUTO": 2, } )
Enum value maps for ChanStatusAction.
var ( MissionControlConfig_ProbabilityModel_name = map[int32]string{ 0: "APRIORI", 1: "BIMODAL", } MissionControlConfig_ProbabilityModel_value = map[string]int32{ "APRIORI": 0, "BIMODAL": 1, } )
Enum value maps for MissionControlConfig_ProbabilityModel.
var ( HtlcEvent_EventType_name = map[int32]string{ 0: "UNKNOWN", 1: "SEND", 2: "RECEIVE", 3: "FORWARD", } HtlcEvent_EventType_value = map[string]int32{ "UNKNOWN": 0, "SEND": 1, "RECEIVE": 2, "FORWARD": 3, } )
Enum value maps for HtlcEvent_EventType.
var ( // ErrInterceptorAlreadyExists is an error returned when the a new stream // is opened and there is already one active interceptor. // The user must disconnect prior to open another stream. ErrInterceptorAlreadyExists = errors.New("interceptor already exists") // DefaultRouterMacFilename is the default name of the router macaroon // that we expect to find via a file handle within the main // configuration file in this package. DefaultRouterMacFilename = "router.macaroon" )
var File_routerrpc_router_proto protoreflect.FileDescriptor
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: "TrackPayments", Handler: _Router_TrackPayments_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", }
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)
Functions ¶
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.
func MarshalTimeNano ¶
MarshalTimeNano converts a time.Time into its nanosecond representation. If the time is zero, this method simply returns 0, since calling UnixNano() on a zero-valued time is undefined.
func RegisterRouterHandler ¶
RegisterRouterHandler registers the http handlers for service Router to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterRouterHandlerClient ¶
func RegisterRouterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RouterClient) error
RegisterRouterHandlerClient registers the http handlers for service Router to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RouterClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RouterClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "RouterClient" to call the correct interceptors.
func RegisterRouterHandlerFromEndpoint ¶
func RegisterRouterHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterRouterHandlerFromEndpoint is same as RegisterRouterHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterRouterHandlerServer ¶
func RegisterRouterHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RouterServer) error
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 RegisterRouterServer ¶
func RegisterRouterServer(s grpc.ServiceRegistrar, srv RouterServer)
func UnmarshalFeatures ¶
func UnmarshalFeatures( rpcFeatures []lnrpc.FeatureBit) (*lnwire.FeatureVector, error)
UnmarshalFeatures converts a list of uint32's into a valid feature vector. This method checks that feature bit pairs aren't assigned toegether, and validates transitive dependencies.
func UnmarshalMPP ¶
UnmarshalMPP accepts the mpp_total_amt_msat and mpp_payment_addr fields from an RPC request and converts into an record.MPP object. An error is returned if the payment address is not 0 or 32 bytes. If the total amount and payment address are zero-value, the return value will be nil signaling there is no MPP record to attach to this hop. Otherwise, a non-nil reocrd will be contained combining the provided values.
func UnmarshallHopWithPubkey ¶
UnmarshallHopWithPubkey unmarshalls an rpc hop for which the pubkey has already been extracted.
func UseLogger ¶
UseLogger uses a specified Logger to output package logging info. This should be used in preference to SetLogWriter if the caller is also using btclog.
func ValidateCLTVLimit ¶
ValidateCLTVLimit returns a valid CLTV limit given a value and a maximum. If the value exceeds the maximum, then an error is returned. If the value is 0, then the maximum is used.
func ValidatePayReqExpiry ¶
ValidatePayReqExpiry checks if the passed payment request has expired. In the case it has expired, an error will be returned.
Types ¶
type AprioriConfig ¶
type AprioriConfig struct { // HopProbability is the assumed success probability of a hop in a route // when no other information is available. HopProbability float64 `long:"hopprob" description:"Assumed success probability of a hop in a route when no other information is available."` // Weight is a value in the range [0, 1] that defines to what extent // historical results should be extrapolated to untried connections. // Setting it to one will completely ignore historical results and // always assume the configured a priori probability for untried // connections. A value of zero will ignore the a priori probability // completely and only base the probability on historical results, // unless there are none available. Weight float64 `long:"weight" description:"Weight of the a priori probability in success probability estimation. Valid values are in [0, 1]."` // PenaltyHalfLife defines after how much time a penalized node or // channel is back at 50% probability. PenaltyHalfLife time.Duration `long:"penaltyhalflife" description:"Defines the duration after which a penalized node or channel is back at 50% probability"` // CapacityFraction defines the fraction of channels' capacities that is considered liquid. CapacityFraction float64 `` /* 140-byte string literal not displayed */ }
AprioriConfig defines parameters for the apriori probability.
type AprioriParameters ¶
type AprioriParameters struct { // The amount of time mission control will take to restore a penalized node // or channel back to 50% success probability, expressed in seconds. Setting // this value to a higher value will penalize failures for longer, making // mission control less likely to route through nodes and channels that we // have previously recorded failures for. HalfLifeSeconds uint64 `protobuf:"varint,1,opt,name=half_life_seconds,json=halfLifeSeconds,proto3" json:"half_life_seconds,omitempty"` // The probability of success mission control should assign to hop in a route // where it has no other information available. Higher values will make mission // control more willing to try hops that we have no information about, lower // values will discourage trying these hops. HopProbability float64 `protobuf:"fixed64,2,opt,name=hop_probability,json=hopProbability,proto3" json:"hop_probability,omitempty"` // The importance that mission control should place on historical results, // expressed as a value in [0;1]. Setting this value to 1 will ignore all // historical payments and just use the hop probability to assess the // probability of success for each hop. A zero value ignores hop probability // completely and relies entirely on historical results, unless none are // available. Weight float64 `protobuf:"fixed64,3,opt,name=weight,proto3" json:"weight,omitempty"` // The fraction of a channel's capacity that we consider to have liquidity. For // amounts that come close to or exceed the fraction, an additional penalty is // applied. A value of 1.0 disables the capacity factor. Allowed values are in // [0.75, 1.0]. CapacityFraction float64 `protobuf:"fixed64,4,opt,name=capacity_fraction,json=capacityFraction,proto3" json:"capacity_fraction,omitempty"` // contains filtered or unexported fields }
func (*AprioriParameters) Descriptor
deprecated
func (*AprioriParameters) Descriptor() ([]byte, []int)
Deprecated: Use AprioriParameters.ProtoReflect.Descriptor instead.
func (*AprioriParameters) GetCapacityFraction ¶
func (x *AprioriParameters) GetCapacityFraction() float64
func (*AprioriParameters) GetHalfLifeSeconds ¶
func (x *AprioriParameters) GetHalfLifeSeconds() uint64
func (*AprioriParameters) GetHopProbability ¶
func (x *AprioriParameters) GetHopProbability() float64
func (*AprioriParameters) GetWeight ¶
func (x *AprioriParameters) GetWeight() float64
func (*AprioriParameters) ProtoMessage ¶
func (*AprioriParameters) ProtoMessage()
func (*AprioriParameters) ProtoReflect ¶
func (x *AprioriParameters) ProtoReflect() protoreflect.Message
func (*AprioriParameters) Reset ¶
func (x *AprioriParameters) Reset()
func (*AprioriParameters) String ¶
func (x *AprioriParameters) String() string
type BimodalConfig ¶
type BimodalConfig struct { // Scale describes the scale over which channels still have some // liquidity left on both channel ends. A value of 0 means that we // assume perfectly unbalanced channels, a very high value means // randomly balanced channels. Scale int64 `long:"scale" description:"Defines the unbalancedness assumed for the network, the amount defined in msat."` // NodeWeight defines how strongly non-routed channels should be taken // into account for probability estimation. Valid values are in [0,1]. NodeWeight float64 `` /* 157-byte string literal not displayed */ // DecayTime is the scale for the exponential information decay over // time for previous successes or failures. DecayTime time.Duration `` /* 126-byte string literal not displayed */ }
BimodalConfig defines parameters for the bimodal probability.
type BimodalParameters ¶
type BimodalParameters struct { // NodeWeight defines how strongly other previous forwardings on channels of a // router should be taken into account when computing a channel's probability // to route. The allowed values are in the range [0, 1], where a value of 0 // means that only direct information about a channel is taken into account. NodeWeight float64 `protobuf:"fixed64,1,opt,name=node_weight,json=nodeWeight,proto3" json:"node_weight,omitempty"` // ScaleMsat describes the scale over which channels statistically have some // liquidity left. The value determines how quickly the bimodal distribution // drops off from the edges of a channel. A larger value (compared to typical // channel capacities) means that the drop off is slow and that channel // balances are distributed more uniformly. A small value leads to the // assumption of very unbalanced channels. ScaleMsat uint64 `protobuf:"varint,2,opt,name=scale_msat,json=scaleMsat,proto3" json:"scale_msat,omitempty"` // DecayTime describes the information decay of knowledge about previous // successes and failures in channels. The smaller the decay time, the quicker // we forget about past forwardings. DecayTime uint64 `protobuf:"varint,3,opt,name=decay_time,json=decayTime,proto3" json:"decay_time,omitempty"` // contains filtered or unexported fields }
func (*BimodalParameters) Descriptor
deprecated
func (*BimodalParameters) Descriptor() ([]byte, []int)
Deprecated: Use BimodalParameters.ProtoReflect.Descriptor instead.
func (*BimodalParameters) GetDecayTime ¶
func (x *BimodalParameters) GetDecayTime() uint64
func (*BimodalParameters) GetNodeWeight ¶
func (x *BimodalParameters) GetNodeWeight() float64
func (*BimodalParameters) GetScaleMsat ¶
func (x *BimodalParameters) GetScaleMsat() uint64
func (*BimodalParameters) ProtoMessage ¶
func (*BimodalParameters) ProtoMessage()
func (*BimodalParameters) ProtoReflect ¶
func (x *BimodalParameters) ProtoReflect() protoreflect.Message
func (*BimodalParameters) Reset ¶
func (x *BimodalParameters) Reset()
func (*BimodalParameters) String ¶
func (x *BimodalParameters) String() string
type BuildRouteRequest ¶
type BuildRouteRequest struct { // The amount to send expressed in msat. If set to zero, the minimum routable // amount is used. AmtMsat int64 `protobuf:"varint,1,opt,name=amt_msat,json=amtMsat,proto3" json:"amt_msat,omitempty"` // CLTV delta from the current height that should be used for the timelock // of the final hop FinalCltvDelta int32 `protobuf:"varint,2,opt,name=final_cltv_delta,json=finalCltvDelta,proto3" json:"final_cltv_delta,omitempty"` // The channel id of the channel that must be taken to the first hop. If zero, // any channel may be used. OutgoingChanId uint64 `protobuf:"varint,3,opt,name=outgoing_chan_id,json=outgoingChanId,proto3" json:"outgoing_chan_id,omitempty"` // A list of hops that defines the route. This does not include the source hop // pubkey. HopPubkeys [][]byte `protobuf:"bytes,4,rep,name=hop_pubkeys,json=hopPubkeys,proto3" json:"hop_pubkeys,omitempty"` // An optional payment addr to be included within the last hop of the route. PaymentAddr []byte `protobuf:"bytes,5,opt,name=payment_addr,json=paymentAddr,proto3" json:"payment_addr,omitempty"` // contains filtered or unexported fields }
func (*BuildRouteRequest) Descriptor
deprecated
func (*BuildRouteRequest) Descriptor() ([]byte, []int)
Deprecated: Use BuildRouteRequest.ProtoReflect.Descriptor instead.
func (*BuildRouteRequest) GetAmtMsat ¶
func (x *BuildRouteRequest) GetAmtMsat() int64
func (*BuildRouteRequest) GetFinalCltvDelta ¶
func (x *BuildRouteRequest) GetFinalCltvDelta() int32
func (*BuildRouteRequest) GetHopPubkeys ¶
func (x *BuildRouteRequest) GetHopPubkeys() [][]byte
func (*BuildRouteRequest) GetOutgoingChanId ¶
func (x *BuildRouteRequest) GetOutgoingChanId() uint64
func (*BuildRouteRequest) GetPaymentAddr ¶
func (x *BuildRouteRequest) GetPaymentAddr() []byte
func (*BuildRouteRequest) ProtoMessage ¶
func (*BuildRouteRequest) ProtoMessage()
func (*BuildRouteRequest) ProtoReflect ¶
func (x *BuildRouteRequest) ProtoReflect() protoreflect.Message
func (*BuildRouteRequest) Reset ¶
func (x *BuildRouteRequest) Reset()
func (*BuildRouteRequest) String ¶
func (x *BuildRouteRequest) String() string
type BuildRouteResponse ¶
type BuildRouteResponse struct { // Fully specified route that can be used to execute the payment. Route *lnrpc.Route `protobuf:"bytes,1,opt,name=route,proto3" json:"route,omitempty"` // contains filtered or unexported fields }
func (*BuildRouteResponse) Descriptor
deprecated
func (*BuildRouteResponse) Descriptor() ([]byte, []int)
Deprecated: Use BuildRouteResponse.ProtoReflect.Descriptor instead.
func (*BuildRouteResponse) GetRoute ¶
func (x *BuildRouteResponse) GetRoute() *lnrpc.Route
func (*BuildRouteResponse) ProtoMessage ¶
func (*BuildRouteResponse) ProtoMessage()
func (*BuildRouteResponse) ProtoReflect ¶
func (x *BuildRouteResponse) ProtoReflect() protoreflect.Message
func (*BuildRouteResponse) Reset ¶
func (x *BuildRouteResponse) Reset()
func (*BuildRouteResponse) String ¶
func (x *BuildRouteResponse) String() string
type ChanStatusAction ¶
type ChanStatusAction int32
const ( ChanStatusAction_ENABLE ChanStatusAction = 0 ChanStatusAction_DISABLE ChanStatusAction = 1 ChanStatusAction_AUTO ChanStatusAction = 2 )
func (ChanStatusAction) Descriptor ¶
func (ChanStatusAction) Descriptor() protoreflect.EnumDescriptor
func (ChanStatusAction) Enum ¶
func (x ChanStatusAction) Enum() *ChanStatusAction
func (ChanStatusAction) EnumDescriptor
deprecated
func (ChanStatusAction) EnumDescriptor() ([]byte, []int)
Deprecated: Use ChanStatusAction.Descriptor instead.
func (ChanStatusAction) Number ¶
func (x ChanStatusAction) Number() protoreflect.EnumNumber
func (ChanStatusAction) String ¶
func (x ChanStatusAction) String() string
func (ChanStatusAction) Type ¶
func (ChanStatusAction) Type() protoreflect.EnumType
type CircuitKey ¶
type CircuitKey struct { // / The id of the channel that the is part of this circuit. ChanId uint64 `protobuf:"varint,1,opt,name=chan_id,json=chanId,proto3" json:"chan_id,omitempty"` // / The index of the incoming htlc in the incoming channel. HtlcId uint64 `protobuf:"varint,2,opt,name=htlc_id,json=htlcId,proto3" json:"htlc_id,omitempty"` // contains filtered or unexported fields }
func (*CircuitKey) Descriptor
deprecated
func (*CircuitKey) Descriptor() ([]byte, []int)
Deprecated: Use CircuitKey.ProtoReflect.Descriptor instead.
func (*CircuitKey) GetChanId ¶
func (x *CircuitKey) GetChanId() uint64
func (*CircuitKey) GetHtlcId ¶
func (x *CircuitKey) GetHtlcId() uint64
func (*CircuitKey) ProtoMessage ¶
func (*CircuitKey) ProtoMessage()
func (*CircuitKey) ProtoReflect ¶
func (x *CircuitKey) ProtoReflect() protoreflect.Message
func (*CircuitKey) Reset ¶
func (x *CircuitKey) Reset()
func (*CircuitKey) String ¶
func (x *CircuitKey) String() string
type Config ¶
type Config struct { RoutingConfig // RouterMacPath is the path for the router macaroon. If unspecified // then we assume that the macaroon will be found under the network // directory, named DefaultRouterMacFilename. RouterMacPath string `long:"routermacaroonpath" description:"Path to the router macaroon"` // NetworkDir is the main network directory wherein the router rpc // server will find the macaroon named DefaultRouterMacFilename. NetworkDir string // MacService is the main macaroon service that we'll use to handle // authentication for the Router rpc server. MacService *macaroons.Service // Router is the main channel router instance that backs this RPC // server. // // TODO(roasbeef): make into pkg lvl interface? // // TODO(roasbeef): assumes router handles saving payment state Router *routing.ChannelRouter // RouterBackend contains shared logic between this sub server and the // main rpc server. RouterBackend *RouterBackend }
Config is the main configuration file for the router RPC server. It contains all the items required for the router RPC server to carry out its duties. The fields with struct tags are meant to be parsed as normal configuration options, while if able to be populated, the latter fields MUST also be specified.
type FailureDetail ¶
type FailureDetail int32
const ( FailureDetail_UNKNOWN FailureDetail = 0 FailureDetail_NO_DETAIL FailureDetail = 1 FailureDetail_ONION_DECODE FailureDetail = 2 FailureDetail_LINK_NOT_ELIGIBLE FailureDetail = 3 FailureDetail_ON_CHAIN_TIMEOUT FailureDetail = 4 FailureDetail_HTLC_EXCEEDS_MAX FailureDetail = 5 FailureDetail_INSUFFICIENT_BALANCE FailureDetail = 6 FailureDetail_INCOMPLETE_FORWARD FailureDetail = 7 FailureDetail_HTLC_ADD_FAILED FailureDetail = 8 FailureDetail_FORWARDS_DISABLED FailureDetail = 9 FailureDetail_INVOICE_CANCELED FailureDetail = 10 FailureDetail_INVOICE_UNDERPAID FailureDetail = 11 FailureDetail_INVOICE_EXPIRY_TOO_SOON FailureDetail = 12 FailureDetail_INVOICE_NOT_OPEN FailureDetail = 13 FailureDetail_MPP_INVOICE_TIMEOUT FailureDetail = 14 FailureDetail_ADDRESS_MISMATCH FailureDetail = 15 FailureDetail_SET_TOTAL_MISMATCH FailureDetail = 16 FailureDetail_SET_TOTAL_TOO_LOW FailureDetail = 17 FailureDetail_SET_OVERPAID FailureDetail = 18 FailureDetail_UNKNOWN_INVOICE FailureDetail = 19 FailureDetail_INVALID_KEYSEND FailureDetail = 20 FailureDetail_MPP_IN_PROGRESS FailureDetail = 21 FailureDetail_CIRCULAR_ROUTE FailureDetail = 22 )
func (FailureDetail) Descriptor ¶
func (FailureDetail) Descriptor() protoreflect.EnumDescriptor
func (FailureDetail) Enum ¶
func (x FailureDetail) Enum() *FailureDetail
func (FailureDetail) EnumDescriptor
deprecated
func (FailureDetail) EnumDescriptor() ([]byte, []int)
Deprecated: Use FailureDetail.Descriptor instead.
func (FailureDetail) Number ¶
func (x FailureDetail) Number() protoreflect.EnumNumber
func (FailureDetail) String ¶
func (x FailureDetail) String() string
func (FailureDetail) Type ¶
func (FailureDetail) Type() protoreflect.EnumType
type FinalHtlcEvent ¶
type FinalHtlcEvent struct { Settled bool `protobuf:"varint,1,opt,name=settled,proto3" json:"settled,omitempty"` Offchain bool `protobuf:"varint,2,opt,name=offchain,proto3" json:"offchain,omitempty"` // contains filtered or unexported fields }
func (*FinalHtlcEvent) Descriptor
deprecated
func (*FinalHtlcEvent) Descriptor() ([]byte, []int)
Deprecated: Use FinalHtlcEvent.ProtoReflect.Descriptor instead.
func (*FinalHtlcEvent) GetOffchain ¶
func (x *FinalHtlcEvent) GetOffchain() bool
func (*FinalHtlcEvent) GetSettled ¶
func (x *FinalHtlcEvent) GetSettled() bool
func (*FinalHtlcEvent) ProtoMessage ¶
func (*FinalHtlcEvent) ProtoMessage()
func (*FinalHtlcEvent) ProtoReflect ¶
func (x *FinalHtlcEvent) ProtoReflect() protoreflect.Message
func (*FinalHtlcEvent) Reset ¶
func (x *FinalHtlcEvent) Reset()
func (*FinalHtlcEvent) String ¶
func (x *FinalHtlcEvent) String() string
type ForwardEvent ¶
type ForwardEvent struct { // Info contains details about the htlc that was forwarded. Info *HtlcInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` // contains filtered or unexported fields }
func (*ForwardEvent) Descriptor
deprecated
func (*ForwardEvent) Descriptor() ([]byte, []int)
Deprecated: Use ForwardEvent.ProtoReflect.Descriptor instead.
func (*ForwardEvent) GetInfo ¶
func (x *ForwardEvent) GetInfo() *HtlcInfo
func (*ForwardEvent) ProtoMessage ¶
func (*ForwardEvent) ProtoMessage()
func (*ForwardEvent) ProtoReflect ¶
func (x *ForwardEvent) ProtoReflect() protoreflect.Message
func (*ForwardEvent) Reset ¶
func (x *ForwardEvent) Reset()
func (*ForwardEvent) String ¶
func (x *ForwardEvent) String() string
type ForwardFailEvent ¶
type ForwardFailEvent struct {
// contains filtered or unexported fields
}
func (*ForwardFailEvent) Descriptor
deprecated
func (*ForwardFailEvent) Descriptor() ([]byte, []int)
Deprecated: Use ForwardFailEvent.ProtoReflect.Descriptor instead.
func (*ForwardFailEvent) ProtoMessage ¶
func (*ForwardFailEvent) ProtoMessage()
func (*ForwardFailEvent) ProtoReflect ¶
func (x *ForwardFailEvent) ProtoReflect() protoreflect.Message
func (*ForwardFailEvent) Reset ¶
func (x *ForwardFailEvent) Reset()
func (*ForwardFailEvent) String ¶
func (x *ForwardFailEvent) String() string
type ForwardHtlcInterceptRequest ¶
type ForwardHtlcInterceptRequest struct { // The key of this forwarded htlc. It defines the incoming channel id and // the index in this channel. IncomingCircuitKey *CircuitKey `protobuf:"bytes,1,opt,name=incoming_circuit_key,json=incomingCircuitKey,proto3" json:"incoming_circuit_key,omitempty"` // The incoming htlc amount. IncomingAmountMsat uint64 `protobuf:"varint,5,opt,name=incoming_amount_msat,json=incomingAmountMsat,proto3" json:"incoming_amount_msat,omitempty"` // The incoming htlc expiry. IncomingExpiry uint32 `protobuf:"varint,6,opt,name=incoming_expiry,json=incomingExpiry,proto3" json:"incoming_expiry,omitempty"` // The htlc payment hash. This value is not guaranteed to be unique per // request. PaymentHash []byte `protobuf:"bytes,2,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"` // The requested outgoing channel id for this forwarded htlc. Because of // non-strict forwarding, this isn't necessarily the channel over which the // packet will be forwarded eventually. A different channel to the same peer // may be selected as well. OutgoingRequestedChanId uint64 `` /* 135-byte string literal not displayed */ // The outgoing htlc amount. OutgoingAmountMsat uint64 `protobuf:"varint,3,opt,name=outgoing_amount_msat,json=outgoingAmountMsat,proto3" json:"outgoing_amount_msat,omitempty"` // The outgoing htlc expiry. OutgoingExpiry uint32 `protobuf:"varint,4,opt,name=outgoing_expiry,json=outgoingExpiry,proto3" json:"outgoing_expiry,omitempty"` // Any custom records that were present in the payload. CustomRecords map[uint64][]byte `` /* 189-byte string literal not displayed */ // The onion blob for the next hop OnionBlob []byte `protobuf:"bytes,9,opt,name=onion_blob,json=onionBlob,proto3" json:"onion_blob,omitempty"` // The block height at which this htlc will be auto-failed to prevent the // channel from force-closing. AutoFailHeight int32 `protobuf:"varint,10,opt,name=auto_fail_height,json=autoFailHeight,proto3" json:"auto_fail_height,omitempty"` // contains filtered or unexported fields }
func (*ForwardHtlcInterceptRequest) Descriptor
deprecated
func (*ForwardHtlcInterceptRequest) Descriptor() ([]byte, []int)
Deprecated: Use ForwardHtlcInterceptRequest.ProtoReflect.Descriptor instead.
func (*ForwardHtlcInterceptRequest) GetAutoFailHeight ¶
func (x *ForwardHtlcInterceptRequest) GetAutoFailHeight() int32
func (*ForwardHtlcInterceptRequest) GetCustomRecords ¶
func (x *ForwardHtlcInterceptRequest) GetCustomRecords() map[uint64][]byte
func (*ForwardHtlcInterceptRequest) GetIncomingAmountMsat ¶
func (x *ForwardHtlcInterceptRequest) GetIncomingAmountMsat() uint64
func (*ForwardHtlcInterceptRequest) GetIncomingCircuitKey ¶
func (x *ForwardHtlcInterceptRequest) GetIncomingCircuitKey() *CircuitKey
func (*ForwardHtlcInterceptRequest) GetIncomingExpiry ¶
func (x *ForwardHtlcInterceptRequest) GetIncomingExpiry() uint32
func (*ForwardHtlcInterceptRequest) GetOnionBlob ¶
func (x *ForwardHtlcInterceptRequest) GetOnionBlob() []byte
func (*ForwardHtlcInterceptRequest) GetOutgoingAmountMsat ¶
func (x *ForwardHtlcInterceptRequest) GetOutgoingAmountMsat() uint64
func (*ForwardHtlcInterceptRequest) GetOutgoingExpiry ¶
func (x *ForwardHtlcInterceptRequest) GetOutgoingExpiry() uint32
func (*ForwardHtlcInterceptRequest) GetOutgoingRequestedChanId ¶
func (x *ForwardHtlcInterceptRequest) GetOutgoingRequestedChanId() uint64
func (*ForwardHtlcInterceptRequest) GetPaymentHash ¶
func (x *ForwardHtlcInterceptRequest) GetPaymentHash() []byte
func (*ForwardHtlcInterceptRequest) ProtoMessage ¶
func (*ForwardHtlcInterceptRequest) ProtoMessage()
func (*ForwardHtlcInterceptRequest) ProtoReflect ¶
func (x *ForwardHtlcInterceptRequest) ProtoReflect() protoreflect.Message
func (*ForwardHtlcInterceptRequest) Reset ¶
func (x *ForwardHtlcInterceptRequest) Reset()
func (*ForwardHtlcInterceptRequest) String ¶
func (x *ForwardHtlcInterceptRequest) String() string
type ForwardHtlcInterceptResponse ¶
type ForwardHtlcInterceptResponse struct { // * // The key of this forwarded htlc. It defines the incoming channel id and // the index in this channel. IncomingCircuitKey *CircuitKey `protobuf:"bytes,1,opt,name=incoming_circuit_key,json=incomingCircuitKey,proto3" json:"incoming_circuit_key,omitempty"` // The resolve action for this intercepted htlc. Action ResolveHoldForwardAction `protobuf:"varint,2,opt,name=action,proto3,enum=routerrpc.ResolveHoldForwardAction" json:"action,omitempty"` // The preimage in case the resolve action is Settle. Preimage []byte `protobuf:"bytes,3,opt,name=preimage,proto3" json:"preimage,omitempty"` // Encrypted failure message in case the resolve action is Fail. // // If failure_message is specified, the failure_code field must be set // to zero. FailureMessage []byte `protobuf:"bytes,4,opt,name=failure_message,json=failureMessage,proto3" json:"failure_message,omitempty"` // Return the specified failure code in case the resolve action is Fail. The // message data fields are populated automatically. // // If a non-zero failure_code is specified, failure_message must not be set. // // For backwards-compatibility reasons, TEMPORARY_CHANNEL_FAILURE is the // default value for this field. FailureCode lnrpc.Failure_FailureCode `` /* 126-byte string literal not displayed */ // contains filtered or unexported fields }
* ForwardHtlcInterceptResponse enables the caller to resolve a previously hold forward. The caller can choose either to: - `Resume`: Execute the default behavior (usually forward). - `Reject`: Fail the htlc backwards. - `Settle`: Settle this htlc with a given preimage.
func (*ForwardHtlcInterceptResponse) Descriptor
deprecated
func (*ForwardHtlcInterceptResponse) Descriptor() ([]byte, []int)
Deprecated: Use ForwardHtlcInterceptResponse.ProtoReflect.Descriptor instead.
func (*ForwardHtlcInterceptResponse) GetAction ¶
func (x *ForwardHtlcInterceptResponse) GetAction() ResolveHoldForwardAction
func (*ForwardHtlcInterceptResponse) GetFailureCode ¶
func (x *ForwardHtlcInterceptResponse) GetFailureCode() lnrpc.Failure_FailureCode
func (*ForwardHtlcInterceptResponse) GetFailureMessage ¶
func (x *ForwardHtlcInterceptResponse) GetFailureMessage() []byte
func (*ForwardHtlcInterceptResponse) GetIncomingCircuitKey ¶
func (x *ForwardHtlcInterceptResponse) GetIncomingCircuitKey() *CircuitKey
func (*ForwardHtlcInterceptResponse) GetPreimage ¶
func (x *ForwardHtlcInterceptResponse) GetPreimage() []byte
func (*ForwardHtlcInterceptResponse) ProtoMessage ¶
func (*ForwardHtlcInterceptResponse) ProtoMessage()
func (*ForwardHtlcInterceptResponse) ProtoReflect ¶
func (x *ForwardHtlcInterceptResponse) ProtoReflect() protoreflect.Message
func (*ForwardHtlcInterceptResponse) Reset ¶
func (x *ForwardHtlcInterceptResponse) Reset()
func (*ForwardHtlcInterceptResponse) String ¶
func (x *ForwardHtlcInterceptResponse) String() string
type GetMissionControlConfigRequest ¶
type GetMissionControlConfigRequest struct {
// contains filtered or unexported fields
}
func (*GetMissionControlConfigRequest) Descriptor
deprecated
func (*GetMissionControlConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetMissionControlConfigRequest.ProtoReflect.Descriptor instead.
func (*GetMissionControlConfigRequest) ProtoMessage ¶
func (*GetMissionControlConfigRequest) ProtoMessage()
func (*GetMissionControlConfigRequest) ProtoReflect ¶
func (x *GetMissionControlConfigRequest) ProtoReflect() protoreflect.Message
func (*GetMissionControlConfigRequest) Reset ¶
func (x *GetMissionControlConfigRequest) Reset()
func (*GetMissionControlConfigRequest) String ¶
func (x *GetMissionControlConfigRequest) String() string
type GetMissionControlConfigResponse ¶
type GetMissionControlConfigResponse struct { // Mission control's currently active config. Config *MissionControlConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` // contains filtered or unexported fields }
func (*GetMissionControlConfigResponse) Descriptor
deprecated
func (*GetMissionControlConfigResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetMissionControlConfigResponse.ProtoReflect.Descriptor instead.
func (*GetMissionControlConfigResponse) GetConfig ¶
func (x *GetMissionControlConfigResponse) GetConfig() *MissionControlConfig
func (*GetMissionControlConfigResponse) ProtoMessage ¶
func (*GetMissionControlConfigResponse) ProtoMessage()
func (*GetMissionControlConfigResponse) ProtoReflect ¶
func (x *GetMissionControlConfigResponse) ProtoReflect() protoreflect.Message
func (*GetMissionControlConfigResponse) Reset ¶
func (x *GetMissionControlConfigResponse) Reset()
func (*GetMissionControlConfigResponse) String ¶
func (x *GetMissionControlConfigResponse) String() string
type HtlcEvent ¶
type HtlcEvent struct { // The short channel id that the incoming htlc arrived at our node on. This // value is zero for sends. IncomingChannelId uint64 `protobuf:"varint,1,opt,name=incoming_channel_id,json=incomingChannelId,proto3" json:"incoming_channel_id,omitempty"` // The short channel id that the outgoing htlc left our node on. This value // is zero for receives. OutgoingChannelId uint64 `protobuf:"varint,2,opt,name=outgoing_channel_id,json=outgoingChannelId,proto3" json:"outgoing_channel_id,omitempty"` // Incoming id is the index of the incoming htlc in the incoming channel. // This value is zero for sends. IncomingHtlcId uint64 `protobuf:"varint,3,opt,name=incoming_htlc_id,json=incomingHtlcId,proto3" json:"incoming_htlc_id,omitempty"` // Outgoing id is the index of the outgoing htlc in the outgoing channel. // This value is zero for receives. OutgoingHtlcId uint64 `protobuf:"varint,4,opt,name=outgoing_htlc_id,json=outgoingHtlcId,proto3" json:"outgoing_htlc_id,omitempty"` // The time in unix nanoseconds that the event occurred. TimestampNs uint64 `protobuf:"varint,5,opt,name=timestamp_ns,json=timestampNs,proto3" json:"timestamp_ns,omitempty"` // The event type indicates whether the htlc was part of a send, receive or // forward. EventType HtlcEvent_EventType `protobuf:"varint,6,opt,name=event_type,json=eventType,proto3,enum=routerrpc.HtlcEvent_EventType" json:"event_type,omitempty"` // Types that are assignable to Event: // // *HtlcEvent_ForwardEvent // *HtlcEvent_ForwardFailEvent // *HtlcEvent_SettleEvent // *HtlcEvent_LinkFailEvent // *HtlcEvent_SubscribedEvent // *HtlcEvent_FinalHtlcEvent Event isHtlcEvent_Event `protobuf_oneof:"event"` // contains filtered or unexported fields }
HtlcEvent contains the htlc event that was processed. These are served on a best-effort basis; events are not persisted, delivery is not guaranteed (in the event of a crash in the switch, forward events may be lost) and some events may be replayed upon restart. Events consumed from this package should be de-duplicated by the htlc's unique combination of incoming and outgoing channel id and htlc id. [EXPERIMENTAL]
func (*HtlcEvent) Descriptor
deprecated
func (*HtlcEvent) GetEventType ¶
func (x *HtlcEvent) GetEventType() HtlcEvent_EventType
func (*HtlcEvent) GetFinalHtlcEvent ¶
func (x *HtlcEvent) GetFinalHtlcEvent() *FinalHtlcEvent
func (*HtlcEvent) GetForwardEvent ¶
func (x *HtlcEvent) GetForwardEvent() *ForwardEvent
func (*HtlcEvent) GetForwardFailEvent ¶
func (x *HtlcEvent) GetForwardFailEvent() *ForwardFailEvent
func (*HtlcEvent) GetIncomingChannelId ¶
func (*HtlcEvent) GetIncomingHtlcId ¶
func (*HtlcEvent) GetLinkFailEvent ¶
func (x *HtlcEvent) GetLinkFailEvent() *LinkFailEvent
func (*HtlcEvent) GetOutgoingChannelId ¶
func (*HtlcEvent) GetOutgoingHtlcId ¶
func (*HtlcEvent) GetSettleEvent ¶
func (x *HtlcEvent) GetSettleEvent() *SettleEvent
func (*HtlcEvent) GetSubscribedEvent ¶
func (x *HtlcEvent) GetSubscribedEvent() *SubscribedEvent
func (*HtlcEvent) GetTimestampNs ¶
func (*HtlcEvent) ProtoMessage ¶
func (*HtlcEvent) ProtoMessage()
func (*HtlcEvent) ProtoReflect ¶
func (x *HtlcEvent) ProtoReflect() protoreflect.Message
type HtlcEvent_EventType ¶
type HtlcEvent_EventType int32
const ( HtlcEvent_UNKNOWN HtlcEvent_EventType = 0 HtlcEvent_SEND HtlcEvent_EventType = 1 HtlcEvent_RECEIVE HtlcEvent_EventType = 2 HtlcEvent_FORWARD HtlcEvent_EventType = 3 )
func (HtlcEvent_EventType) Descriptor ¶
func (HtlcEvent_EventType) Descriptor() protoreflect.EnumDescriptor
func (HtlcEvent_EventType) Enum ¶
func (x HtlcEvent_EventType) Enum() *HtlcEvent_EventType
func (HtlcEvent_EventType) EnumDescriptor
deprecated
func (HtlcEvent_EventType) EnumDescriptor() ([]byte, []int)
Deprecated: Use HtlcEvent_EventType.Descriptor instead.
func (HtlcEvent_EventType) Number ¶
func (x HtlcEvent_EventType) Number() protoreflect.EnumNumber
func (HtlcEvent_EventType) String ¶
func (x HtlcEvent_EventType) String() string
func (HtlcEvent_EventType) Type ¶
func (HtlcEvent_EventType) Type() protoreflect.EnumType
type HtlcEvent_FinalHtlcEvent ¶
type HtlcEvent_FinalHtlcEvent struct {
FinalHtlcEvent *FinalHtlcEvent `protobuf:"bytes,12,opt,name=final_htlc_event,json=finalHtlcEvent,proto3,oneof"`
}
type HtlcEvent_ForwardEvent ¶
type HtlcEvent_ForwardEvent struct {
ForwardEvent *ForwardEvent `protobuf:"bytes,7,opt,name=forward_event,json=forwardEvent,proto3,oneof"`
}
type HtlcEvent_ForwardFailEvent ¶
type HtlcEvent_ForwardFailEvent struct {
ForwardFailEvent *ForwardFailEvent `protobuf:"bytes,8,opt,name=forward_fail_event,json=forwardFailEvent,proto3,oneof"`
}
type HtlcEvent_LinkFailEvent ¶
type HtlcEvent_LinkFailEvent struct {
LinkFailEvent *LinkFailEvent `protobuf:"bytes,10,opt,name=link_fail_event,json=linkFailEvent,proto3,oneof"`
}
type HtlcEvent_SettleEvent ¶
type HtlcEvent_SettleEvent struct {
SettleEvent *SettleEvent `protobuf:"bytes,9,opt,name=settle_event,json=settleEvent,proto3,oneof"`
}
type HtlcEvent_SubscribedEvent ¶
type HtlcEvent_SubscribedEvent struct {
SubscribedEvent *SubscribedEvent `protobuf:"bytes,11,opt,name=subscribed_event,json=subscribedEvent,proto3,oneof"`
}
type HtlcInfo ¶
type HtlcInfo struct { // The timelock on the incoming htlc. IncomingTimelock uint32 `protobuf:"varint,1,opt,name=incoming_timelock,json=incomingTimelock,proto3" json:"incoming_timelock,omitempty"` // The timelock on the outgoing htlc. OutgoingTimelock uint32 `protobuf:"varint,2,opt,name=outgoing_timelock,json=outgoingTimelock,proto3" json:"outgoing_timelock,omitempty"` // The amount of the incoming htlc. IncomingAmtMsat uint64 `protobuf:"varint,3,opt,name=incoming_amt_msat,json=incomingAmtMsat,proto3" json:"incoming_amt_msat,omitempty"` // The amount of the outgoing htlc. OutgoingAmtMsat uint64 `protobuf:"varint,4,opt,name=outgoing_amt_msat,json=outgoingAmtMsat,proto3" json:"outgoing_amt_msat,omitempty"` // contains filtered or unexported fields }
func (*HtlcInfo) Descriptor
deprecated
func (*HtlcInfo) GetIncomingAmtMsat ¶
func (*HtlcInfo) GetIncomingTimelock ¶
func (*HtlcInfo) GetOutgoingAmtMsat ¶
func (*HtlcInfo) GetOutgoingTimelock ¶
func (*HtlcInfo) ProtoMessage ¶
func (*HtlcInfo) ProtoMessage()
func (*HtlcInfo) ProtoReflect ¶
func (x *HtlcInfo) ProtoReflect() protoreflect.Message
type LinkFailEvent ¶
type LinkFailEvent struct { // Info contains details about the htlc that we failed. Info *HtlcInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` // FailureCode is the BOLT error code for the failure. WireFailure lnrpc.Failure_FailureCode `` /* 126-byte string literal not displayed */ // FailureDetail provides additional information about the reason for the // failure. This detail enriches the information provided by the wire message // and may be 'no detail' if the wire message requires no additional metadata. FailureDetail FailureDetail `` /* 130-byte string literal not displayed */ // A string representation of the link failure. FailureString string `protobuf:"bytes,4,opt,name=failure_string,json=failureString,proto3" json:"failure_string,omitempty"` // contains filtered or unexported fields }
func (*LinkFailEvent) Descriptor
deprecated
func (*LinkFailEvent) Descriptor() ([]byte, []int)
Deprecated: Use LinkFailEvent.ProtoReflect.Descriptor instead.
func (*LinkFailEvent) GetFailureDetail ¶
func (x *LinkFailEvent) GetFailureDetail() FailureDetail
func (*LinkFailEvent) GetFailureString ¶
func (x *LinkFailEvent) GetFailureString() string
func (*LinkFailEvent) GetInfo ¶
func (x *LinkFailEvent) GetInfo() *HtlcInfo
func (*LinkFailEvent) GetWireFailure ¶
func (x *LinkFailEvent) GetWireFailure() lnrpc.Failure_FailureCode
func (*LinkFailEvent) ProtoMessage ¶
func (*LinkFailEvent) ProtoMessage()
func (*LinkFailEvent) ProtoReflect ¶
func (x *LinkFailEvent) ProtoReflect() protoreflect.Message
func (*LinkFailEvent) Reset ¶
func (x *LinkFailEvent) Reset()
func (*LinkFailEvent) String ¶
func (x *LinkFailEvent) String() string
type MissionControl ¶
type MissionControl interface { // GetProbability is expected to return the success probability of a // payment from fromNode to toNode. GetProbability(fromNode, toNode route.Vertex, amt lnwire.MilliSatoshi, capacity btcutil.Amount) float64 // ResetHistory resets the history of MissionControl returning it to a // state as if no payment attempts have been made. ResetHistory() error // GetHistorySnapshot takes a snapshot from the current mission control // state and actual probability estimates. GetHistorySnapshot() *routing.MissionControlSnapshot // ImportHistory imports the mission control snapshot to our internal // state. This import will only be applied in-memory, and will not be // persisted across restarts. ImportHistory(snapshot *routing.MissionControlSnapshot, force bool) error // GetPairHistorySnapshot returns the stored history for a given node // pair. GetPairHistorySnapshot(fromNode, toNode route.Vertex) routing.TimedPairResult // GetConfig gets mission control's current config. GetConfig() *routing.MissionControlConfig // SetConfig sets mission control's config to the values provided, if // they are valid. SetConfig(cfg *routing.MissionControlConfig) error }
MissionControl defines the mission control dependencies of routerrpc.
type MissionControlConfig ¶
type MissionControlConfig struct { // Deprecated, use AprioriParameters. The amount of time mission control will // take to restore a penalized node or channel back to 50% success probability, // expressed in seconds. Setting this value to a higher value will penalize // failures for longer, making mission control less likely to route through // nodes and channels that we have previously recorded failures for. // // Deprecated: Do not use. HalfLifeSeconds uint64 `protobuf:"varint,1,opt,name=half_life_seconds,json=halfLifeSeconds,proto3" json:"half_life_seconds,omitempty"` // Deprecated, use AprioriParameters. The probability of success mission // control should assign to hop in a route where it has no other information // available. Higher values will make mission control more willing to try hops // that we have no information about, lower values will discourage trying these // hops. // // Deprecated: Do not use. HopProbability float32 `protobuf:"fixed32,2,opt,name=hop_probability,json=hopProbability,proto3" json:"hop_probability,omitempty"` // Deprecated, use AprioriParameters. The importance that mission control // should place on historical results, expressed as a value in [0;1]. Setting // this value to 1 will ignore all historical payments and just use the hop // probability to assess the probability of success for each hop. A zero value // ignores hop probability completely and relies entirely on historical // results, unless none are available. // // Deprecated: Do not use. Weight float32 `protobuf:"fixed32,3,opt,name=weight,proto3" json:"weight,omitempty"` // The maximum number of payment results that mission control will store. MaximumPaymentResults uint32 `` /* 127-byte string literal not displayed */ // The minimum time that must have passed since the previously recorded failure // before we raise the failure amount. MinimumFailureRelaxInterval uint64 `` /* 147-byte string literal not displayed */ // ProbabilityModel defines which probability estimator should be used in // pathfinding. Model MissionControlConfig_ProbabilityModel `protobuf:"varint,6,opt,name=Model,proto3,enum=routerrpc.MissionControlConfig_ProbabilityModel" json:"Model,omitempty"` // EstimatorConfig is populated dependent on the estimator type. // // Types that are assignable to EstimatorConfig: // // *MissionControlConfig_Apriori // *MissionControlConfig_Bimodal EstimatorConfig isMissionControlConfig_EstimatorConfig `protobuf_oneof:"EstimatorConfig"` // contains filtered or unexported fields }
func (*MissionControlConfig) Descriptor
deprecated
func (*MissionControlConfig) Descriptor() ([]byte, []int)
Deprecated: Use MissionControlConfig.ProtoReflect.Descriptor instead.
func (*MissionControlConfig) GetApriori ¶
func (x *MissionControlConfig) GetApriori() *AprioriParameters
func (*MissionControlConfig) GetBimodal ¶
func (x *MissionControlConfig) GetBimodal() *BimodalParameters
func (*MissionControlConfig) GetEstimatorConfig ¶
func (m *MissionControlConfig) GetEstimatorConfig() isMissionControlConfig_EstimatorConfig
func (*MissionControlConfig) GetHalfLifeSeconds
deprecated
func (x *MissionControlConfig) GetHalfLifeSeconds() uint64
Deprecated: Do not use.
func (*MissionControlConfig) GetHopProbability
deprecated
func (x *MissionControlConfig) GetHopProbability() float32
Deprecated: Do not use.
func (*MissionControlConfig) GetMaximumPaymentResults ¶
func (x *MissionControlConfig) GetMaximumPaymentResults() uint32
func (*MissionControlConfig) GetMinimumFailureRelaxInterval ¶
func (x *MissionControlConfig) GetMinimumFailureRelaxInterval() uint64
func (*MissionControlConfig) GetModel ¶
func (x *MissionControlConfig) GetModel() MissionControlConfig_ProbabilityModel
func (*MissionControlConfig) GetWeight
deprecated
func (x *MissionControlConfig) GetWeight() float32
Deprecated: Do not use.
func (*MissionControlConfig) ProtoMessage ¶
func (*MissionControlConfig) ProtoMessage()
func (*MissionControlConfig) ProtoReflect ¶
func (x *MissionControlConfig) ProtoReflect() protoreflect.Message
func (*MissionControlConfig) Reset ¶
func (x *MissionControlConfig) Reset()
func (*MissionControlConfig) String ¶
func (x *MissionControlConfig) String() string
type MissionControlConfig_Apriori ¶
type MissionControlConfig_Apriori struct {
Apriori *AprioriParameters `protobuf:"bytes,7,opt,name=apriori,proto3,oneof"`
}
type MissionControlConfig_Bimodal ¶
type MissionControlConfig_Bimodal struct {
Bimodal *BimodalParameters `protobuf:"bytes,8,opt,name=bimodal,proto3,oneof"`
}
type MissionControlConfig_ProbabilityModel ¶
type MissionControlConfig_ProbabilityModel int32
const ( MissionControlConfig_APRIORI MissionControlConfig_ProbabilityModel = 0 MissionControlConfig_BIMODAL MissionControlConfig_ProbabilityModel = 1 )
func (MissionControlConfig_ProbabilityModel) Descriptor ¶
func (MissionControlConfig_ProbabilityModel) Descriptor() protoreflect.EnumDescriptor
func (MissionControlConfig_ProbabilityModel) EnumDescriptor
deprecated
func (MissionControlConfig_ProbabilityModel) EnumDescriptor() ([]byte, []int)
Deprecated: Use MissionControlConfig_ProbabilityModel.Descriptor instead.
func (MissionControlConfig_ProbabilityModel) Number ¶
func (x MissionControlConfig_ProbabilityModel) Number() protoreflect.EnumNumber
func (MissionControlConfig_ProbabilityModel) String ¶
func (x MissionControlConfig_ProbabilityModel) String() string
func (MissionControlConfig_ProbabilityModel) Type ¶
func (MissionControlConfig_ProbabilityModel) Type() protoreflect.EnumType
type PairData ¶
type PairData struct { // Time of last failure. FailTime int64 `protobuf:"varint,1,opt,name=fail_time,json=failTime,proto3" json:"fail_time,omitempty"` // Lowest amount that failed to forward rounded to whole sats. This may be // set to zero if the failure is independent of amount. FailAmtSat int64 `protobuf:"varint,2,opt,name=fail_amt_sat,json=failAmtSat,proto3" json:"fail_amt_sat,omitempty"` // Lowest amount that failed to forward in millisats. This may be // set to zero if the failure is independent of amount. FailAmtMsat int64 `protobuf:"varint,4,opt,name=fail_amt_msat,json=failAmtMsat,proto3" json:"fail_amt_msat,omitempty"` // Time of last success. SuccessTime int64 `protobuf:"varint,5,opt,name=success_time,json=successTime,proto3" json:"success_time,omitempty"` // Highest amount that we could successfully forward rounded to whole sats. SuccessAmtSat int64 `protobuf:"varint,6,opt,name=success_amt_sat,json=successAmtSat,proto3" json:"success_amt_sat,omitempty"` // Highest amount that we could successfully forward in millisats. SuccessAmtMsat int64 `protobuf:"varint,7,opt,name=success_amt_msat,json=successAmtMsat,proto3" json:"success_amt_msat,omitempty"` // contains filtered or unexported fields }
func (*PairData) Descriptor
deprecated
func (*PairData) GetFailAmtMsat ¶
func (*PairData) GetFailAmtSat ¶
func (*PairData) GetFailTime ¶
func (*PairData) GetSuccessAmtMsat ¶
func (*PairData) GetSuccessAmtSat ¶
func (*PairData) GetSuccessTime ¶
func (*PairData) ProtoMessage ¶
func (*PairData) ProtoMessage()
func (*PairData) ProtoReflect ¶
func (x *PairData) ProtoReflect() protoreflect.Message
type PairHistory ¶
type PairHistory struct { // The source node pubkey of the pair. NodeFrom []byte `protobuf:"bytes,1,opt,name=node_from,json=nodeFrom,proto3" json:"node_from,omitempty"` // The destination node pubkey of the pair. NodeTo []byte `protobuf:"bytes,2,opt,name=node_to,json=nodeTo,proto3" json:"node_to,omitempty"` History *PairData `protobuf:"bytes,7,opt,name=history,proto3" json:"history,omitempty"` // contains filtered or unexported fields }
PairHistory contains the mission control state for a particular node pair.
func (*PairHistory) Descriptor
deprecated
func (*PairHistory) Descriptor() ([]byte, []int)
Deprecated: Use PairHistory.ProtoReflect.Descriptor instead.
func (*PairHistory) GetHistory ¶
func (x *PairHistory) GetHistory() *PairData
func (*PairHistory) GetNodeFrom ¶
func (x *PairHistory) GetNodeFrom() []byte
func (*PairHistory) GetNodeTo ¶
func (x *PairHistory) GetNodeTo() []byte
func (*PairHistory) ProtoMessage ¶
func (*PairHistory) ProtoMessage()
func (*PairHistory) ProtoReflect ¶
func (x *PairHistory) ProtoReflect() protoreflect.Message
func (*PairHistory) Reset ¶
func (x *PairHistory) Reset()
func (*PairHistory) String ¶
func (x *PairHistory) String() string
type PaymentState ¶
type PaymentState int32
const ( // Payment is still in flight. PaymentState_IN_FLIGHT PaymentState = 0 // Payment completed successfully. PaymentState_SUCCEEDED PaymentState = 1 // There are more routes to try, but the payment timeout was exceeded. PaymentState_FAILED_TIMEOUT PaymentState = 2 // All possible routes were tried and failed permanently. Or were no // routes to the destination at all. PaymentState_FAILED_NO_ROUTE PaymentState = 3 // A non-recoverable error has occurred. PaymentState_FAILED_ERROR PaymentState = 4 // Payment details incorrect (unknown hash, invalid amt or // invalid final cltv delta) PaymentState_FAILED_INCORRECT_PAYMENT_DETAILS PaymentState = 5 // Insufficient local balance. PaymentState_FAILED_INSUFFICIENT_BALANCE PaymentState = 6 )
func (PaymentState) Descriptor ¶
func (PaymentState) Descriptor() protoreflect.EnumDescriptor
func (PaymentState) Enum ¶
func (x PaymentState) Enum() *PaymentState
func (PaymentState) EnumDescriptor
deprecated
func (PaymentState) EnumDescriptor() ([]byte, []int)
Deprecated: Use PaymentState.Descriptor instead.
func (PaymentState) Number ¶
func (x PaymentState) Number() protoreflect.EnumNumber
func (PaymentState) String ¶
func (x PaymentState) String() string
func (PaymentState) Type ¶
func (PaymentState) Type() protoreflect.EnumType
type PaymentStatus ¶
type PaymentStatus struct { // Current state the payment is in. State PaymentState `protobuf:"varint,1,opt,name=state,proto3,enum=routerrpc.PaymentState" json:"state,omitempty"` // The pre-image of the payment when state is SUCCEEDED. Preimage []byte `protobuf:"bytes,2,opt,name=preimage,proto3" json:"preimage,omitempty"` // The HTLCs made in attempt to settle the payment [EXPERIMENTAL]. Htlcs []*lnrpc.HTLCAttempt `protobuf:"bytes,4,rep,name=htlcs,proto3" json:"htlcs,omitempty"` // contains filtered or unexported fields }
func (*PaymentStatus) Descriptor
deprecated
func (*PaymentStatus) Descriptor() ([]byte, []int)
Deprecated: Use PaymentStatus.ProtoReflect.Descriptor instead.
func (*PaymentStatus) GetHtlcs ¶
func (x *PaymentStatus) GetHtlcs() []*lnrpc.HTLCAttempt
func (*PaymentStatus) GetPreimage ¶
func (x *PaymentStatus) GetPreimage() []byte
func (*PaymentStatus) GetState ¶
func (x *PaymentStatus) GetState() PaymentState
func (*PaymentStatus) ProtoMessage ¶
func (*PaymentStatus) ProtoMessage()
func (*PaymentStatus) ProtoReflect ¶
func (x *PaymentStatus) ProtoReflect() protoreflect.Message
func (*PaymentStatus) Reset ¶
func (x *PaymentStatus) Reset()
func (*PaymentStatus) String ¶
func (x *PaymentStatus) String() string
type QueryMissionControlRequest ¶
type QueryMissionControlRequest struct {
// contains filtered or unexported fields
}
func (*QueryMissionControlRequest) Descriptor
deprecated
func (*QueryMissionControlRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryMissionControlRequest.ProtoReflect.Descriptor instead.
func (*QueryMissionControlRequest) ProtoMessage ¶
func (*QueryMissionControlRequest) ProtoMessage()
func (*QueryMissionControlRequest) ProtoReflect ¶
func (x *QueryMissionControlRequest) ProtoReflect() protoreflect.Message
func (*QueryMissionControlRequest) Reset ¶
func (x *QueryMissionControlRequest) Reset()
func (*QueryMissionControlRequest) String ¶
func (x *QueryMissionControlRequest) String() string
type QueryMissionControlResponse ¶
type QueryMissionControlResponse struct { // Node pair-level mission control state. Pairs []*PairHistory `protobuf:"bytes,2,rep,name=pairs,proto3" json:"pairs,omitempty"` // contains filtered or unexported fields }
QueryMissionControlResponse contains mission control state.
func (*QueryMissionControlResponse) Descriptor
deprecated
func (*QueryMissionControlResponse) Descriptor() ([]byte, []int)
Deprecated: Use QueryMissionControlResponse.ProtoReflect.Descriptor instead.
func (*QueryMissionControlResponse) GetPairs ¶
func (x *QueryMissionControlResponse) GetPairs() []*PairHistory
func (*QueryMissionControlResponse) ProtoMessage ¶
func (*QueryMissionControlResponse) ProtoMessage()
func (*QueryMissionControlResponse) ProtoReflect ¶
func (x *QueryMissionControlResponse) ProtoReflect() protoreflect.Message
func (*QueryMissionControlResponse) Reset ¶
func (x *QueryMissionControlResponse) Reset()
func (*QueryMissionControlResponse) String ¶
func (x *QueryMissionControlResponse) String() string
type QueryProbabilityRequest ¶
type QueryProbabilityRequest struct { // The source node pubkey of the pair. FromNode []byte `protobuf:"bytes,1,opt,name=from_node,json=fromNode,proto3" json:"from_node,omitempty"` // The destination node pubkey of the pair. ToNode []byte `protobuf:"bytes,2,opt,name=to_node,json=toNode,proto3" json:"to_node,omitempty"` // The amount for which to calculate a probability. AmtMsat int64 `protobuf:"varint,3,opt,name=amt_msat,json=amtMsat,proto3" json:"amt_msat,omitempty"` // contains filtered or unexported fields }
func (*QueryProbabilityRequest) Descriptor
deprecated
func (*QueryProbabilityRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryProbabilityRequest.ProtoReflect.Descriptor instead.
func (*QueryProbabilityRequest) GetAmtMsat ¶
func (x *QueryProbabilityRequest) GetAmtMsat() int64
func (*QueryProbabilityRequest) GetFromNode ¶
func (x *QueryProbabilityRequest) GetFromNode() []byte
func (*QueryProbabilityRequest) GetToNode ¶
func (x *QueryProbabilityRequest) GetToNode() []byte
func (*QueryProbabilityRequest) ProtoMessage ¶
func (*QueryProbabilityRequest) ProtoMessage()
func (*QueryProbabilityRequest) ProtoReflect ¶
func (x *QueryProbabilityRequest) ProtoReflect() protoreflect.Message
func (*QueryProbabilityRequest) Reset ¶
func (x *QueryProbabilityRequest) Reset()
func (*QueryProbabilityRequest) String ¶
func (x *QueryProbabilityRequest) String() string
type QueryProbabilityResponse ¶
type QueryProbabilityResponse struct { // The success probability for the requested pair. Probability float64 `protobuf:"fixed64,1,opt,name=probability,proto3" json:"probability,omitempty"` // The historical data for the requested pair. History *PairData `protobuf:"bytes,2,opt,name=history,proto3" json:"history,omitempty"` // contains filtered or unexported fields }
func (*QueryProbabilityResponse) Descriptor
deprecated
func (*QueryProbabilityResponse) Descriptor() ([]byte, []int)
Deprecated: Use QueryProbabilityResponse.ProtoReflect.Descriptor instead.
func (*QueryProbabilityResponse) GetHistory ¶
func (x *QueryProbabilityResponse) GetHistory() *PairData
func (*QueryProbabilityResponse) GetProbability ¶
func (x *QueryProbabilityResponse) GetProbability() float64
func (*QueryProbabilityResponse) ProtoMessage ¶
func (*QueryProbabilityResponse) ProtoMessage()
func (*QueryProbabilityResponse) ProtoReflect ¶
func (x *QueryProbabilityResponse) ProtoReflect() protoreflect.Message
func (*QueryProbabilityResponse) Reset ¶
func (x *QueryProbabilityResponse) Reset()
func (*QueryProbabilityResponse) String ¶
func (x *QueryProbabilityResponse) String() string
type ResetMissionControlRequest ¶
type ResetMissionControlRequest struct {
// contains filtered or unexported fields
}
func (*ResetMissionControlRequest) Descriptor
deprecated
func (*ResetMissionControlRequest) Descriptor() ([]byte, []int)
Deprecated: Use ResetMissionControlRequest.ProtoReflect.Descriptor instead.
func (*ResetMissionControlRequest) ProtoMessage ¶
func (*ResetMissionControlRequest) ProtoMessage()
func (*ResetMissionControlRequest) ProtoReflect ¶
func (x *ResetMissionControlRequest) ProtoReflect() protoreflect.Message
func (*ResetMissionControlRequest) Reset ¶
func (x *ResetMissionControlRequest) Reset()
func (*ResetMissionControlRequest) String ¶
func (x *ResetMissionControlRequest) String() string
type ResetMissionControlResponse ¶
type ResetMissionControlResponse struct {
// contains filtered or unexported fields
}
func (*ResetMissionControlResponse) Descriptor
deprecated
func (*ResetMissionControlResponse) Descriptor() ([]byte, []int)
Deprecated: Use ResetMissionControlResponse.ProtoReflect.Descriptor instead.
func (*ResetMissionControlResponse) ProtoMessage ¶
func (*ResetMissionControlResponse) ProtoMessage()
func (*ResetMissionControlResponse) ProtoReflect ¶
func (x *ResetMissionControlResponse) ProtoReflect() protoreflect.Message
func (*ResetMissionControlResponse) Reset ¶
func (x *ResetMissionControlResponse) Reset()
func (*ResetMissionControlResponse) String ¶
func (x *ResetMissionControlResponse) String() string
type ResolveHoldForwardAction ¶
type ResolveHoldForwardAction int32
const ( ResolveHoldForwardAction_SETTLE ResolveHoldForwardAction = 0 ResolveHoldForwardAction_FAIL ResolveHoldForwardAction = 1 ResolveHoldForwardAction_RESUME ResolveHoldForwardAction = 2 )
func (ResolveHoldForwardAction) Descriptor ¶
func (ResolveHoldForwardAction) Descriptor() protoreflect.EnumDescriptor
func (ResolveHoldForwardAction) Enum ¶
func (x ResolveHoldForwardAction) Enum() *ResolveHoldForwardAction
func (ResolveHoldForwardAction) EnumDescriptor
deprecated
func (ResolveHoldForwardAction) EnumDescriptor() ([]byte, []int)
Deprecated: Use ResolveHoldForwardAction.Descriptor instead.
func (ResolveHoldForwardAction) Number ¶
func (x ResolveHoldForwardAction) Number() protoreflect.EnumNumber
func (ResolveHoldForwardAction) String ¶
func (x ResolveHoldForwardAction) String() string
func (ResolveHoldForwardAction) Type ¶
func (ResolveHoldForwardAction) Type() protoreflect.EnumType
type RouteFeeRequest ¶
type RouteFeeRequest struct { // The destination once wishes to obtain a routing fee quote to. Dest []byte `protobuf:"bytes,1,opt,name=dest,proto3" json:"dest,omitempty"` // The amount one wishes to send to the target destination. AmtSat int64 `protobuf:"varint,2,opt,name=amt_sat,json=amtSat,proto3" json:"amt_sat,omitempty"` // contains filtered or unexported fields }
func (*RouteFeeRequest) Descriptor
deprecated
func (*RouteFeeRequest) Descriptor() ([]byte, []int)
Deprecated: Use RouteFeeRequest.ProtoReflect.Descriptor instead.
func (*RouteFeeRequest) GetAmtSat ¶
func (x *RouteFeeRequest) GetAmtSat() int64
func (*RouteFeeRequest) GetDest ¶
func (x *RouteFeeRequest) GetDest() []byte
func (*RouteFeeRequest) ProtoMessage ¶
func (*RouteFeeRequest) ProtoMessage()
func (*RouteFeeRequest) ProtoReflect ¶
func (x *RouteFeeRequest) ProtoReflect() protoreflect.Message
func (*RouteFeeRequest) Reset ¶
func (x *RouteFeeRequest) Reset()
func (*RouteFeeRequest) String ¶
func (x *RouteFeeRequest) String() string
type RouteFeeResponse ¶
type RouteFeeResponse struct { // A lower bound of the estimated fee to the target destination within the // network, expressed in milli-satoshis. RoutingFeeMsat int64 `protobuf:"varint,1,opt,name=routing_fee_msat,json=routingFeeMsat,proto3" json:"routing_fee_msat,omitempty"` // An estimate of the worst case time delay that can occur. Note that callers // will still need to factor in the final CLTV delta of the last hop into this // value. TimeLockDelay int64 `protobuf:"varint,2,opt,name=time_lock_delay,json=timeLockDelay,proto3" json:"time_lock_delay,omitempty"` // contains filtered or unexported fields }
func (*RouteFeeResponse) Descriptor
deprecated
func (*RouteFeeResponse) Descriptor() ([]byte, []int)
Deprecated: Use RouteFeeResponse.ProtoReflect.Descriptor instead.
func (*RouteFeeResponse) GetRoutingFeeMsat ¶
func (x *RouteFeeResponse) GetRoutingFeeMsat() int64
func (*RouteFeeResponse) GetTimeLockDelay ¶
func (x *RouteFeeResponse) GetTimeLockDelay() int64
func (*RouteFeeResponse) ProtoMessage ¶
func (*RouteFeeResponse) ProtoMessage()
func (*RouteFeeResponse) ProtoReflect ¶
func (x *RouteFeeResponse) ProtoReflect() protoreflect.Message
func (*RouteFeeResponse) Reset ¶
func (x *RouteFeeResponse) Reset()
func (*RouteFeeResponse) String ¶
func (x *RouteFeeResponse) String() string
type RouterBackend ¶
type RouterBackend struct { // SelfNode is the vertex of the node sending the payment. SelfNode route.Vertex // FetchChannelCapacity is a closure that we'll use the fetch the total // capacity of a channel to populate in responses. FetchChannelCapacity func(chanID uint64) (btcutil.Amount, error) // FetchAmountPairCapacity determines the maximal channel capacity // between two nodes given a certain amount. FetchAmountPairCapacity func(nodeFrom, nodeTo route.Vertex, amount lnwire.MilliSatoshi) (btcutil.Amount, error) // FetchChannelEndpoints returns the pubkeys of both endpoints of the // given channel id. FetchChannelEndpoints func(chanID uint64) (route.Vertex, route.Vertex, error) // FindRoutes is a closure that abstracts away how we locate/query for // routes. FindRoute func(source, target route.Vertex, amt lnwire.MilliSatoshi, timePref float64, restrictions *routing.RestrictParams, destCustomRecords record.CustomSet, routeHints map[route.Vertex][]*channeldb.CachedEdgePolicy, finalExpiry uint16) (*route.Route, float64, error) MissionControl MissionControl // ActiveNetParams are the network parameters of the primary network // that the route is operating on. This is necessary so we can ensure // that we receive payment requests that send to destinations on our // network. ActiveNetParams *chaincfg.Params // Tower is the ControlTower instance that is used to track pending // payments. Tower routing.ControlTower // MaxTotalTimelock is the maximum total time lock a route is allowed to // have. MaxTotalTimelock uint32 // DefaultFinalCltvDelta is the default value used as final cltv delta // when an RPC caller doesn't specify a value. DefaultFinalCltvDelta uint16 // SubscribeHtlcEvents returns a subscription client for the node's // htlc events. SubscribeHtlcEvents func() (*subscribe.Client, error) // InterceptableForwarder exposes the ability to intercept forward events // by letting the router register a ForwardInterceptor. InterceptableForwarder htlcswitch.InterceptableHtlcForwarder // SetChannelEnabled exposes the ability to manually enable a channel. SetChannelEnabled func(wire.OutPoint) error // SetChannelDisabled exposes the ability to manually disable a channel SetChannelDisabled func(wire.OutPoint) error // SetChannelAuto exposes the ability to restore automatic channel state // management after manually setting channel status. SetChannelAuto func(wire.OutPoint) error }
RouterBackend contains the backend implementation of the router rpc sub server calls.
func (*RouterBackend) MarshalHTLCAttempt ¶
func (r *RouterBackend) MarshalHTLCAttempt( htlc channeldb.HTLCAttempt) (*lnrpc.HTLCAttempt, error)
MarshalHTLCAttempt constructs an RPC HTLCAttempt from the db representation.
func (*RouterBackend) MarshallPayment ¶
MarshallPayment marshall a payment to its rpc representation.
func (*RouterBackend) MarshallRoute ¶
MarshallRoute marshalls an internal route to an rpc route struct.
func (*RouterBackend) QueryRoutes ¶
func (r *RouterBackend) QueryRoutes(ctx context.Context, in *lnrpc.QueryRoutesRequest) (*lnrpc.QueryRoutesResponse, error)
QueryRoutes attempts to query the daemons' Channel Router for a possible route to a target destination capable of carrying a specific amount of satoshis within the route's flow. The returned route contains the full details required to craft and send an HTLC, also including the necessary information that should be present within the Sphinx packet encapsulated within the HTLC.
TODO(roasbeef): should return a slice of routes in reality * create separate PR to send based on well formatted route
func (*RouterBackend) UnmarshallHop ¶
func (r *RouterBackend) UnmarshallHop(rpcHop *lnrpc.Hop, prevNodePubKey [33]byte) (*route.Hop, error)
UnmarshallHop unmarshalls an rpc hop that may or may not contain a node pubkey.
func (*RouterBackend) UnmarshallRoute ¶
UnmarshallRoute unmarshalls an rpc route. For hops that don't specify a pubkey, the channel graph is queried.
type RouterClient ¶
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) // TrackPayments returns an update stream for every payment that is not in a // terminal state. Note that if payments are in-flight while starting a new // subscription, the start of the payment stream could produce out-of-order // and/or duplicate events. In order to get updates for every in-flight // payment attempt make sure to subscribe to this method before initiating any // payments. TrackPayments(ctx context.Context, in *TrackPaymentsRequest, opts ...grpc.CallOption) (Router_TrackPaymentsClient, 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) // Deprecated. QueryProbability returns the current success probability // estimate for a given node pair and amount. The call returns a zero success // probability if no channel is available or if the amount violates min/max // HTLC constraints. 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) }
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.
func NewRouterClient ¶
func NewRouterClient(cc grpc.ClientConnInterface) RouterClient
type RouterServer ¶
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 // TrackPayments returns an update stream for every payment that is not in a // terminal state. Note that if payments are in-flight while starting a new // subscription, the start of the payment stream could produce out-of-order // and/or duplicate events. In order to get updates for every in-flight // payment attempt make sure to subscribe to this method before initiating any // payments. TrackPayments(*TrackPaymentsRequest, Router_TrackPaymentsServer) 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) // Deprecated. QueryProbability returns the current success probability // estimate for a given node pair and amount. The call returns a zero success // probability if no channel is available or if the amount violates min/max // HTLC constraints. 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) // contains filtered or unexported methods }
RouterServer is the server API for Router service. All implementations must embed UnimplementedRouterServer for forward compatibility
type Router_HtlcInterceptorClient ¶
type Router_HtlcInterceptorClient interface { Send(*ForwardHtlcInterceptResponse) error Recv() (*ForwardHtlcInterceptRequest, error) grpc.ClientStream }
type Router_HtlcInterceptorServer ¶
type Router_HtlcInterceptorServer interface { Send(*ForwardHtlcInterceptRequest) error Recv() (*ForwardHtlcInterceptResponse, error) grpc.ServerStream }
type Router_SendPaymentClient ¶
type Router_SendPaymentClient interface { Recv() (*PaymentStatus, error) grpc.ClientStream }
type Router_SendPaymentServer ¶
type Router_SendPaymentServer interface { Send(*PaymentStatus) error grpc.ServerStream }
type Router_SendPaymentV2Client ¶
type Router_SendPaymentV2Client interface { Recv() (*lnrpc.Payment, error) grpc.ClientStream }
type Router_SendPaymentV2Server ¶
type Router_SendPaymentV2Server interface { Send(*lnrpc.Payment) error grpc.ServerStream }
type Router_SubscribeHtlcEventsClient ¶
type Router_SubscribeHtlcEventsClient interface { Recv() (*HtlcEvent, error) grpc.ClientStream }
type Router_SubscribeHtlcEventsServer ¶
type Router_SubscribeHtlcEventsServer interface { Send(*HtlcEvent) error grpc.ServerStream }
type Router_TrackPaymentClient ¶
type Router_TrackPaymentClient interface { Recv() (*PaymentStatus, error) grpc.ClientStream }
type Router_TrackPaymentServer ¶
type Router_TrackPaymentServer interface { Send(*PaymentStatus) error grpc.ServerStream }
type Router_TrackPaymentV2Client ¶
type Router_TrackPaymentV2Client interface { Recv() (*lnrpc.Payment, error) grpc.ClientStream }
type Router_TrackPaymentV2Server ¶
type Router_TrackPaymentV2Server interface { Send(*lnrpc.Payment) error grpc.ServerStream }
type Router_TrackPaymentsClient ¶
type Router_TrackPaymentsClient interface { Recv() (*lnrpc.Payment, error) grpc.ClientStream }
type Router_TrackPaymentsServer ¶
type Router_TrackPaymentsServer interface { Send(*lnrpc.Payment) error grpc.ServerStream }
type RoutingConfig ¶
type RoutingConfig struct { // ProbabilityEstimatorType sets the estimator to use. ProbabilityEstimatorType string `long:"estimator" choice:"apriori" choice:"bimodal" description:"Probability estimator used for pathfinding." ` // MinRouteProbability is the minimum required route success probability // to attempt the payment. MinRouteProbability float64 `long:"minrtprob" description:"Minimum required route success probability to attempt the payment"` // AttemptCost is the fixed virtual cost in path finding of a failed // payment attempt. It is used to trade off potentially better routes // against their probability of succeeding. AttemptCost btcutil.Amount `long:"attemptcost" description:"The fixed (virtual) cost in sats of a failed payment attempt"` // AttemptCostPPM is the proportional virtual cost in path finding of a // failed payment attempt. It is used to trade off potentially better // routes against their probability of succeeding. This parameter is // expressed in parts per million of the total payment amount. AttemptCostPPM int64 `` /* 162-byte string literal not displayed */ // MaxMcHistory defines the maximum number of payment results that // are held on disk by mission control. MaxMcHistory int `long:"maxmchistory" description:"the maximum number of payment results that are held on disk by mission control"` // McFlushInterval defines the timer interval to use to flush mission // control state to the DB. McFlushInterval time.Duration `long:"mcflushinterval" description:"the timer interval to use to flush mission control state to the DB"` // AprioriConfig defines parameters for the apriori probability. AprioriConfig *AprioriConfig `group:"apriori" namespace:"apriori" description:"configuration for the apriori pathfinding probability estimator"` // BimodalConfig defines parameters for the bimodal probability. BimodalConfig *BimodalConfig `group:"bimodal" namespace:"bimodal" description:"configuration for the bimodal pathfinding probability estimator"` }
RoutingConfig contains the configurable parameters that control routing.
func GetRoutingConfig ¶
func GetRoutingConfig(cfg *Config) *RoutingConfig
GetRoutingConfig returns the routing config based on this sub server config.
type SendPaymentRequest ¶
type SendPaymentRequest struct { // The identity pubkey of the payment recipient Dest []byte `protobuf:"bytes,1,opt,name=dest,proto3" json:"dest,omitempty"` // Number of satoshis to send. // // The fields amt and amt_msat are mutually exclusive. Amt int64 `protobuf:"varint,2,opt,name=amt,proto3" json:"amt,omitempty"` // Number of millisatoshis to send. // // The fields amt and amt_msat are mutually exclusive. AmtMsat int64 `protobuf:"varint,12,opt,name=amt_msat,json=amtMsat,proto3" json:"amt_msat,omitempty"` // The hash to use within the payment's HTLC PaymentHash []byte `protobuf:"bytes,3,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"` // The CLTV delta from the current height that should be used to set the // timelock for the final hop. FinalCltvDelta int32 `protobuf:"varint,4,opt,name=final_cltv_delta,json=finalCltvDelta,proto3" json:"final_cltv_delta,omitempty"` // An optional payment addr to be included within the last hop of the route. PaymentAddr []byte `protobuf:"bytes,20,opt,name=payment_addr,json=paymentAddr,proto3" json:"payment_addr,omitempty"` // A bare-bones invoice for a payment within the Lightning Network. With the // details of the invoice, the sender has all the data necessary to send a // payment to the recipient. The amount in the payment request may be zero. In // that case it is required to set the amt field as well. If no payment request // is specified, the following fields are required: dest, amt and payment_hash. PaymentRequest string `protobuf:"bytes,5,opt,name=payment_request,json=paymentRequest,proto3" json:"payment_request,omitempty"` // An upper limit on the amount of time we should spend when attempting to // fulfill the payment. This is expressed in seconds. If we cannot make a // successful payment within this time frame, an error will be returned. // This field must be non-zero. TimeoutSeconds int32 `protobuf:"varint,6,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"` // The maximum number of satoshis that will be paid as a fee of the payment. // If this field is left to the default value of 0, only zero-fee routes will // be considered. This usually means single hop routes connecting directly to // the destination. To send the payment without a fee limit, use max int here. // // The fields fee_limit_sat and fee_limit_msat are mutually exclusive. FeeLimitSat int64 `protobuf:"varint,7,opt,name=fee_limit_sat,json=feeLimitSat,proto3" json:"fee_limit_sat,omitempty"` // The maximum number of millisatoshis that will be paid as a fee of the // payment. If this field is left to the default value of 0, only zero-fee // routes will be considered. This usually means single hop routes connecting // directly to the destination. To send the payment without a fee limit, use // max int here. // // The fields fee_limit_sat and fee_limit_msat are mutually exclusive. FeeLimitMsat int64 `protobuf:"varint,13,opt,name=fee_limit_msat,json=feeLimitMsat,proto3" json:"fee_limit_msat,omitempty"` // Deprecated, use outgoing_chan_ids. The channel id of the channel that must // be taken to the first hop. If zero, any channel may be used (unless // outgoing_chan_ids are set). // // Deprecated: Do not use. OutgoingChanId uint64 `protobuf:"varint,8,opt,name=outgoing_chan_id,json=outgoingChanId,proto3" json:"outgoing_chan_id,omitempty"` // The channel ids of the channels are allowed for the first hop. If empty, // any channel may be used. OutgoingChanIds []uint64 `protobuf:"varint,19,rep,packed,name=outgoing_chan_ids,json=outgoingChanIds,proto3" json:"outgoing_chan_ids,omitempty"` // The pubkey of the last hop of the route. If empty, any hop may be used. LastHopPubkey []byte `protobuf:"bytes,14,opt,name=last_hop_pubkey,json=lastHopPubkey,proto3" json:"last_hop_pubkey,omitempty"` // An optional maximum total time lock for the route. This should not exceed // lnd's `--max-cltv-expiry` setting. If zero, then the value of // `--max-cltv-expiry` is enforced. CltvLimit int32 `protobuf:"varint,9,opt,name=cltv_limit,json=cltvLimit,proto3" json:"cltv_limit,omitempty"` // Optional route hints to reach the destination through private channels. RouteHints []*lnrpc.RouteHint `protobuf:"bytes,10,rep,name=route_hints,json=routeHints,proto3" json:"route_hints,omitempty"` // An optional field that can be used to pass an arbitrary set of TLV records // to a peer which understands the new records. This can be used to pass // application specific data during the payment attempt. Record types are // required to be in the custom range >= 65536. When using REST, the values // must be encoded as base64. DestCustomRecords map[uint64][]byte `` /* 204-byte string literal not displayed */ // If set, circular payments to self are permitted. AllowSelfPayment bool `protobuf:"varint,15,opt,name=allow_self_payment,json=allowSelfPayment,proto3" json:"allow_self_payment,omitempty"` // Features assumed to be supported by the final node. All transitive feature // dependencies must also be set properly. For a given feature bit pair, either // optional or remote may be set, but not both. If this field is nil or empty, // the router will try to load destination features from the graph as a // fallback. DestFeatures []lnrpc.FeatureBit `` /* 128-byte string literal not displayed */ // The maximum number of partial payments that may be use to complete the full // amount. MaxParts uint32 `protobuf:"varint,17,opt,name=max_parts,json=maxParts,proto3" json:"max_parts,omitempty"` // If set, only the final payment update is streamed back. Intermediate updates // that show which htlcs are still in flight are suppressed. NoInflightUpdates bool `protobuf:"varint,18,opt,name=no_inflight_updates,json=noInflightUpdates,proto3" json:"no_inflight_updates,omitempty"` // The largest payment split that should be attempted when making a payment if // splitting is necessary. Setting this value will effectively cause lnd to // split more aggressively, vs only when it thinks it needs to. Note that this // value is in milli-satoshis. MaxShardSizeMsat uint64 `protobuf:"varint,21,opt,name=max_shard_size_msat,json=maxShardSizeMsat,proto3" json:"max_shard_size_msat,omitempty"` // If set, an AMP-payment will be attempted. Amp bool `protobuf:"varint,22,opt,name=amp,proto3" json:"amp,omitempty"` // The time preference for this payment. Set to -1 to optimize for fees // only, to 1 to optimize for reliability only or a value inbetween for a mix. TimePref float64 `protobuf:"fixed64,23,opt,name=time_pref,json=timePref,proto3" json:"time_pref,omitempty"` // contains filtered or unexported fields }
func (*SendPaymentRequest) Descriptor
deprecated
func (*SendPaymentRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendPaymentRequest.ProtoReflect.Descriptor instead.
func (*SendPaymentRequest) GetAllowSelfPayment ¶
func (x *SendPaymentRequest) GetAllowSelfPayment() bool
func (*SendPaymentRequest) GetAmp ¶
func (x *SendPaymentRequest) GetAmp() bool
func (*SendPaymentRequest) GetAmt ¶
func (x *SendPaymentRequest) GetAmt() int64
func (*SendPaymentRequest) GetAmtMsat ¶
func (x *SendPaymentRequest) GetAmtMsat() int64
func (*SendPaymentRequest) GetCltvLimit ¶
func (x *SendPaymentRequest) GetCltvLimit() int32
func (*SendPaymentRequest) GetDest ¶
func (x *SendPaymentRequest) GetDest() []byte
func (*SendPaymentRequest) GetDestCustomRecords ¶
func (x *SendPaymentRequest) GetDestCustomRecords() map[uint64][]byte
func (*SendPaymentRequest) GetDestFeatures ¶
func (x *SendPaymentRequest) GetDestFeatures() []lnrpc.FeatureBit
func (*SendPaymentRequest) GetFeeLimitMsat ¶
func (x *SendPaymentRequest) GetFeeLimitMsat() int64
func (*SendPaymentRequest) GetFeeLimitSat ¶
func (x *SendPaymentRequest) GetFeeLimitSat() int64
func (*SendPaymentRequest) GetFinalCltvDelta ¶
func (x *SendPaymentRequest) GetFinalCltvDelta() int32
func (*SendPaymentRequest) GetLastHopPubkey ¶
func (x *SendPaymentRequest) GetLastHopPubkey() []byte
func (*SendPaymentRequest) GetMaxParts ¶
func (x *SendPaymentRequest) GetMaxParts() uint32
func (*SendPaymentRequest) GetMaxShardSizeMsat ¶
func (x *SendPaymentRequest) GetMaxShardSizeMsat() uint64
func (*SendPaymentRequest) GetNoInflightUpdates ¶
func (x *SendPaymentRequest) GetNoInflightUpdates() bool
func (*SendPaymentRequest) GetOutgoingChanId
deprecated
func (x *SendPaymentRequest) GetOutgoingChanId() uint64
Deprecated: Do not use.
func (*SendPaymentRequest) GetOutgoingChanIds ¶
func (x *SendPaymentRequest) GetOutgoingChanIds() []uint64
func (*SendPaymentRequest) GetPaymentAddr ¶
func (x *SendPaymentRequest) GetPaymentAddr() []byte
func (*SendPaymentRequest) GetPaymentHash ¶
func (x *SendPaymentRequest) GetPaymentHash() []byte
func (*SendPaymentRequest) GetPaymentRequest ¶
func (x *SendPaymentRequest) GetPaymentRequest() string
func (*SendPaymentRequest) GetRouteHints ¶
func (x *SendPaymentRequest) GetRouteHints() []*lnrpc.RouteHint
func (*SendPaymentRequest) GetTimePref ¶
func (x *SendPaymentRequest) GetTimePref() float64
func (*SendPaymentRequest) GetTimeoutSeconds ¶
func (x *SendPaymentRequest) GetTimeoutSeconds() int32
func (*SendPaymentRequest) ProtoMessage ¶
func (*SendPaymentRequest) ProtoMessage()
func (*SendPaymentRequest) ProtoReflect ¶
func (x *SendPaymentRequest) ProtoReflect() protoreflect.Message
func (*SendPaymentRequest) Reset ¶
func (x *SendPaymentRequest) Reset()
func (*SendPaymentRequest) String ¶
func (x *SendPaymentRequest) String() string
type SendToRouteRequest ¶
type SendToRouteRequest struct { // The payment hash to use for the HTLC. PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"` // Route that should be used to attempt to complete the payment. Route *lnrpc.Route `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` // Whether the payment should be marked as failed when a temporary error is // returned from the given route. Set it to true so the payment won't be // failed unless a terminal error is occurred, such as payment timeout, no // routes, incorrect payment details, or insufficient funds. SkipTempErr bool `protobuf:"varint,3,opt,name=skip_temp_err,json=skipTempErr,proto3" json:"skip_temp_err,omitempty"` // contains filtered or unexported fields }
func (*SendToRouteRequest) Descriptor
deprecated
func (*SendToRouteRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendToRouteRequest.ProtoReflect.Descriptor instead.
func (*SendToRouteRequest) GetPaymentHash ¶
func (x *SendToRouteRequest) GetPaymentHash() []byte
func (*SendToRouteRequest) GetRoute ¶
func (x *SendToRouteRequest) GetRoute() *lnrpc.Route
func (*SendToRouteRequest) GetSkipTempErr ¶
func (x *SendToRouteRequest) GetSkipTempErr() bool
func (*SendToRouteRequest) ProtoMessage ¶
func (*SendToRouteRequest) ProtoMessage()
func (*SendToRouteRequest) ProtoReflect ¶
func (x *SendToRouteRequest) ProtoReflect() protoreflect.Message
func (*SendToRouteRequest) Reset ¶
func (x *SendToRouteRequest) Reset()
func (*SendToRouteRequest) String ¶
func (x *SendToRouteRequest) String() string
type SendToRouteResponse ¶
type SendToRouteResponse struct { // The preimage obtained by making the payment. Preimage []byte `protobuf:"bytes,1,opt,name=preimage,proto3" json:"preimage,omitempty"` // The failure message in case the payment failed. Failure *lnrpc.Failure `protobuf:"bytes,2,opt,name=failure,proto3" json:"failure,omitempty"` // contains filtered or unexported fields }
func (*SendToRouteResponse) Descriptor
deprecated
func (*SendToRouteResponse) Descriptor() ([]byte, []int)
Deprecated: Use SendToRouteResponse.ProtoReflect.Descriptor instead.
func (*SendToRouteResponse) GetFailure ¶
func (x *SendToRouteResponse) GetFailure() *lnrpc.Failure
func (*SendToRouteResponse) GetPreimage ¶
func (x *SendToRouteResponse) GetPreimage() []byte
func (*SendToRouteResponse) ProtoMessage ¶
func (*SendToRouteResponse) ProtoMessage()
func (*SendToRouteResponse) ProtoReflect ¶
func (x *SendToRouteResponse) ProtoReflect() protoreflect.Message
func (*SendToRouteResponse) Reset ¶
func (x *SendToRouteResponse) Reset()
func (*SendToRouteResponse) String ¶
func (x *SendToRouteResponse) String() string
type Server ¶
type Server struct { // Required by the grpc-gateway/v2 library for forward compatibility. // Must be after the atomically used variables to not break struct // alignment. UnimplementedRouterServer // contains filtered or unexported fields }
Server is a stand alone sub RPC server which exposes functionality that allows clients to route arbitrary payment through the Lightning Network.
func New ¶
func New(cfg *Config) (*Server, lnrpc.MacaroonPerms, error)
New creates a new instance of the RouterServer given a configuration struct that contains all external dependencies. If the target macaroon exists, and we're unable to create it, then an error will be returned. We also return the set of permissions that we require as a server. At the time of writing of this documentation, this is the same macaroon as as the admin macaroon.
func (*Server) BuildRoute ¶
func (s *Server) BuildRoute(ctx context.Context, req *BuildRouteRequest) (*BuildRouteResponse, error)
BuildRoute builds a route from a list of hop addresses.
func (*Server) EstimateRouteFee ¶
func (s *Server) EstimateRouteFee(ctx context.Context, req *RouteFeeRequest) (*RouteFeeResponse, 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.
func (*Server) GetMissionControlConfig ¶
func (s *Server) GetMissionControlConfig(ctx context.Context, req *GetMissionControlConfigRequest) (*GetMissionControlConfigResponse, error)
GetMissionControlConfig returns our current mission control config.
func (*Server) HtlcInterceptor ¶
func (s *Server) HtlcInterceptor(stream Router_HtlcInterceptorServer) error
HtlcInterceptor is a bidirectional stream for streaming interception requests to the caller. Upon connection it does the following: 1. Check if there is already a live stream, if yes it rejects the request. 2. Registered a ForwardInterceptor 3. Delivers to the caller every √√ and detect his answer. It uses a local implementation of holdForwardsStore to keep all the hold forwards and find them when manual resolution is later needed.
func (*Server) Name ¶
Name returns a unique string representation of the sub-server. This can be used to identify the sub-server and also de-duplicate them.
NOTE: This is part of the lnrpc.SubServer interface.
func (*Server) QueryMissionControl ¶
func (s *Server) QueryMissionControl(ctx context.Context, req *QueryMissionControlRequest) (*QueryMissionControlResponse, error)
QueryMissionControl exposes the internal mission control state to callers. It is a development feature.
func (*Server) QueryProbability ¶
func (s *Server) QueryProbability(ctx context.Context, req *QueryProbabilityRequest) (*QueryProbabilityResponse, error)
QueryProbability returns the current success probability estimate for a given node pair and amount.
func (*Server) ResetMissionControl ¶
func (s *Server) ResetMissionControl(ctx context.Context, req *ResetMissionControlRequest) (*ResetMissionControlResponse, error)
ResetMissionControl clears all mission control state and starts with a clean slate.
func (*Server) SendPayment ¶
func (s *Server) SendPayment(request *SendPaymentRequest, stream Router_SendPaymentServer) error
SendPayment attempts to route a payment described by the passed PaymentRequest to the final destination. If we are unable to route the payment, or cannot find a route that satisfies the constraints in the PaymentRequest, then an error will be returned. Otherwise, the payment pre-image, along with the final route will be returned.
func (*Server) SendPaymentV2 ¶
func (s *Server) SendPaymentV2(req *SendPaymentRequest, stream Router_SendPaymentV2Server) error
SendPaymentV2 attempts to route a payment described by the passed PaymentRequest to the final destination. If we are unable to route the payment, or cannot find a route that satisfies the constraints in the PaymentRequest, then an error will be returned. Otherwise, the payment pre-image, along with the final route will be returned.
func (*Server) SendToRoute ¶
func (s *Server) SendToRoute(ctx context.Context, req *SendToRouteRequest) (*SendToRouteResponse, error)
SendToRoute sends a payment through a predefined route. The response of this call contains structured error information.
func (*Server) SendToRouteV2 ¶
func (s *Server) SendToRouteV2(ctx context.Context, req *SendToRouteRequest) (*lnrpc.HTLCAttempt, error)
SendToRouteV2 sends a payment through a predefined route. The response of this call contains structured error information.
func (*Server) SetMissionControlConfig ¶
func (s *Server) SetMissionControlConfig(ctx context.Context, req *SetMissionControlConfigRequest) (*SetMissionControlConfigResponse, error)
SetMissionControlConfig sets parameters in the mission control config.
func (*Server) Start ¶
Start launches any helper goroutines required for the rpcServer to function.
NOTE: This is part of the lnrpc.SubServer interface.
func (*Server) Stop ¶
Stop signals any active goroutines for a graceful closure.
NOTE: This is part of the lnrpc.SubServer interface.
func (*Server) SubscribeHtlcEvents ¶
func (s *Server) SubscribeHtlcEvents(req *SubscribeHtlcEventsRequest, stream Router_SubscribeHtlcEventsServer) error
SubscribeHtlcEvents creates a uni-directional stream from the server to the client which delivers a stream of htlc events.
func (*Server) TrackPayment ¶
func (s *Server) TrackPayment(request *TrackPaymentRequest, stream Router_TrackPaymentServer) error
TrackPayment returns a stream of payment state updates. The stream is closed when the payment completes.
func (*Server) TrackPaymentV2 ¶
func (s *Server) TrackPaymentV2(request *TrackPaymentRequest, stream Router_TrackPaymentV2Server) error
TrackPaymentV2 returns a stream of payment state updates. The stream is closed when the payment completes.
func (*Server) TrackPayments ¶
func (s *Server) TrackPayments(request *TrackPaymentsRequest, stream Router_TrackPaymentsServer) error
TrackPayments returns a stream of payment state updates.
func (*Server) UpdateChanStatus ¶
func (s *Server) UpdateChanStatus(ctx context.Context, req *UpdateChanStatusRequest) (*UpdateChanStatusResponse, error)
UpdateChanStatus allows channel state to be set manually.
func (*Server) XImportMissionControl ¶
func (s *Server) XImportMissionControl(ctx context.Context, req *XImportMissionControlRequest) (*XImportMissionControlResponse, error)
XImportMissionControl imports the state provided to our internal mission control. Only entries that are fresher than our existing state will be used.
type ServerShell ¶
type ServerShell struct {
RouterServer
}
ServerShell a is shell struct holding a reference to the actual sub-server. It is used to register the gRPC sub-server with the root server before we have the necessary dependencies to populate the actual sub-server.
func (*ServerShell) CreateSubServer ¶
func (r *ServerShell) CreateSubServer(configRegistry lnrpc.SubServerConfigDispatcher) ( lnrpc.SubServer, lnrpc.MacaroonPerms, error)
CreateSubServer populates the subserver's dependencies using the passed SubServerConfigDispatcher. This method should fully initialize the sub-server instance, making it ready for action. It returns the macaroon permissions that the sub-server wishes to pass on to the root server for all methods routed towards it.
NOTE: This is part of the lnrpc.GrpcHandler interface.
func (*ServerShell) RegisterWithRestServer ¶
func (r *ServerShell) RegisterWithRestServer(ctx context.Context, mux *runtime.ServeMux, dest string, opts []grpc.DialOption) error
RegisterWithRestServer will be called by the root REST mux to direct a sub RPC server to register itself with the main REST mux server. Until this is called, each sub-server won't be able to have requests routed towards it.
NOTE: This is part of the lnrpc.GrpcHandler interface.
func (*ServerShell) RegisterWithRootServer ¶
func (r *ServerShell) RegisterWithRootServer(grpcServer *grpc.Server) error
RegisterWithRootServer will be called by the root gRPC server to direct a sub RPC server to register itself with the main gRPC root server. Until this is called, each sub-server won't be able to have requests routed towards it.
NOTE: This is part of the lnrpc.GrpcHandler interface.
type SetMissionControlConfigRequest ¶
type SetMissionControlConfigRequest struct { // The config to set for mission control. Note that all values *must* be set, // because the full config will be applied. Config *MissionControlConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` // contains filtered or unexported fields }
func (*SetMissionControlConfigRequest) Descriptor
deprecated
func (*SetMissionControlConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetMissionControlConfigRequest.ProtoReflect.Descriptor instead.
func (*SetMissionControlConfigRequest) GetConfig ¶
func (x *SetMissionControlConfigRequest) GetConfig() *MissionControlConfig
func (*SetMissionControlConfigRequest) ProtoMessage ¶
func (*SetMissionControlConfigRequest) ProtoMessage()
func (*SetMissionControlConfigRequest) ProtoReflect ¶
func (x *SetMissionControlConfigRequest) ProtoReflect() protoreflect.Message
func (*SetMissionControlConfigRequest) Reset ¶
func (x *SetMissionControlConfigRequest) Reset()
func (*SetMissionControlConfigRequest) String ¶
func (x *SetMissionControlConfigRequest) String() string
type SetMissionControlConfigResponse ¶
type SetMissionControlConfigResponse struct {
// contains filtered or unexported fields
}
func (*SetMissionControlConfigResponse) Descriptor
deprecated
func (*SetMissionControlConfigResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetMissionControlConfigResponse.ProtoReflect.Descriptor instead.
func (*SetMissionControlConfigResponse) ProtoMessage ¶
func (*SetMissionControlConfigResponse) ProtoMessage()
func (*SetMissionControlConfigResponse) ProtoReflect ¶
func (x *SetMissionControlConfigResponse) ProtoReflect() protoreflect.Message
func (*SetMissionControlConfigResponse) Reset ¶
func (x *SetMissionControlConfigResponse) Reset()
func (*SetMissionControlConfigResponse) String ¶
func (x *SetMissionControlConfigResponse) String() string
type SettleEvent ¶
type SettleEvent struct { // The revealed preimage. Preimage []byte `protobuf:"bytes,1,opt,name=preimage,proto3" json:"preimage,omitempty"` // contains filtered or unexported fields }
func (*SettleEvent) Descriptor
deprecated
func (*SettleEvent) Descriptor() ([]byte, []int)
Deprecated: Use SettleEvent.ProtoReflect.Descriptor instead.
func (*SettleEvent) GetPreimage ¶
func (x *SettleEvent) GetPreimage() []byte
func (*SettleEvent) ProtoMessage ¶
func (*SettleEvent) ProtoMessage()
func (*SettleEvent) ProtoReflect ¶
func (x *SettleEvent) ProtoReflect() protoreflect.Message
func (*SettleEvent) Reset ¶
func (x *SettleEvent) Reset()
func (*SettleEvent) String ¶
func (x *SettleEvent) String() string
type SubscribeHtlcEventsRequest ¶
type SubscribeHtlcEventsRequest struct {
// contains filtered or unexported fields
}
func (*SubscribeHtlcEventsRequest) Descriptor
deprecated
func (*SubscribeHtlcEventsRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeHtlcEventsRequest.ProtoReflect.Descriptor instead.
func (*SubscribeHtlcEventsRequest) ProtoMessage ¶
func (*SubscribeHtlcEventsRequest) ProtoMessage()
func (*SubscribeHtlcEventsRequest) ProtoReflect ¶
func (x *SubscribeHtlcEventsRequest) ProtoReflect() protoreflect.Message
func (*SubscribeHtlcEventsRequest) Reset ¶
func (x *SubscribeHtlcEventsRequest) Reset()
func (*SubscribeHtlcEventsRequest) String ¶
func (x *SubscribeHtlcEventsRequest) String() string
type SubscribedEvent ¶
type SubscribedEvent struct {
// contains filtered or unexported fields
}
func (*SubscribedEvent) Descriptor
deprecated
func (*SubscribedEvent) Descriptor() ([]byte, []int)
Deprecated: Use SubscribedEvent.ProtoReflect.Descriptor instead.
func (*SubscribedEvent) ProtoMessage ¶
func (*SubscribedEvent) ProtoMessage()
func (*SubscribedEvent) ProtoReflect ¶
func (x *SubscribedEvent) ProtoReflect() protoreflect.Message
func (*SubscribedEvent) Reset ¶
func (x *SubscribedEvent) Reset()
func (*SubscribedEvent) String ¶
func (x *SubscribedEvent) String() string
type TrackPaymentRequest ¶
type TrackPaymentRequest struct { // The hash of the payment to look up. PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"` // If set, only the final payment update is streamed back. Intermediate updates // that show which htlcs are still in flight are suppressed. NoInflightUpdates bool `protobuf:"varint,2,opt,name=no_inflight_updates,json=noInflightUpdates,proto3" json:"no_inflight_updates,omitempty"` // contains filtered or unexported fields }
func (*TrackPaymentRequest) Descriptor
deprecated
func (*TrackPaymentRequest) Descriptor() ([]byte, []int)
Deprecated: Use TrackPaymentRequest.ProtoReflect.Descriptor instead.
func (*TrackPaymentRequest) GetNoInflightUpdates ¶
func (x *TrackPaymentRequest) GetNoInflightUpdates() bool
func (*TrackPaymentRequest) GetPaymentHash ¶
func (x *TrackPaymentRequest) GetPaymentHash() []byte
func (*TrackPaymentRequest) ProtoMessage ¶
func (*TrackPaymentRequest) ProtoMessage()
func (*TrackPaymentRequest) ProtoReflect ¶
func (x *TrackPaymentRequest) ProtoReflect() protoreflect.Message
func (*TrackPaymentRequest) Reset ¶
func (x *TrackPaymentRequest) Reset()
func (*TrackPaymentRequest) String ¶
func (x *TrackPaymentRequest) String() string
type TrackPaymentsRequest ¶
type TrackPaymentsRequest struct { // If set, only the final payment updates are streamed back. Intermediate // updates that show which htlcs are still in flight are suppressed. NoInflightUpdates bool `protobuf:"varint,1,opt,name=no_inflight_updates,json=noInflightUpdates,proto3" json:"no_inflight_updates,omitempty"` // contains filtered or unexported fields }
func (*TrackPaymentsRequest) Descriptor
deprecated
func (*TrackPaymentsRequest) Descriptor() ([]byte, []int)
Deprecated: Use TrackPaymentsRequest.ProtoReflect.Descriptor instead.
func (*TrackPaymentsRequest) GetNoInflightUpdates ¶
func (x *TrackPaymentsRequest) GetNoInflightUpdates() bool
func (*TrackPaymentsRequest) ProtoMessage ¶
func (*TrackPaymentsRequest) ProtoMessage()
func (*TrackPaymentsRequest) ProtoReflect ¶
func (x *TrackPaymentsRequest) ProtoReflect() protoreflect.Message
func (*TrackPaymentsRequest) Reset ¶
func (x *TrackPaymentsRequest) Reset()
func (*TrackPaymentsRequest) String ¶
func (x *TrackPaymentsRequest) String() string
type UnimplementedRouterServer ¶
type UnimplementedRouterServer struct { }
UnimplementedRouterServer must be embedded to have forward compatible implementations.
func (UnimplementedRouterServer) BuildRoute ¶
func (UnimplementedRouterServer) BuildRoute(context.Context, *BuildRouteRequest) (*BuildRouteResponse, error)
func (UnimplementedRouterServer) EstimateRouteFee ¶
func (UnimplementedRouterServer) EstimateRouteFee(context.Context, *RouteFeeRequest) (*RouteFeeResponse, error)
func (UnimplementedRouterServer) GetMissionControlConfig ¶
func (UnimplementedRouterServer) GetMissionControlConfig(context.Context, *GetMissionControlConfigRequest) (*GetMissionControlConfigResponse, error)
func (UnimplementedRouterServer) HtlcInterceptor ¶
func (UnimplementedRouterServer) HtlcInterceptor(Router_HtlcInterceptorServer) error
func (UnimplementedRouterServer) QueryMissionControl ¶
func (UnimplementedRouterServer) QueryMissionControl(context.Context, *QueryMissionControlRequest) (*QueryMissionControlResponse, error)
func (UnimplementedRouterServer) QueryProbability ¶
func (UnimplementedRouterServer) QueryProbability(context.Context, *QueryProbabilityRequest) (*QueryProbabilityResponse, error)
func (UnimplementedRouterServer) ResetMissionControl ¶
func (UnimplementedRouterServer) ResetMissionControl(context.Context, *ResetMissionControlRequest) (*ResetMissionControlResponse, error)
func (UnimplementedRouterServer) SendPayment ¶
func (UnimplementedRouterServer) SendPayment(*SendPaymentRequest, Router_SendPaymentServer) error
func (UnimplementedRouterServer) SendPaymentV2 ¶
func (UnimplementedRouterServer) SendPaymentV2(*SendPaymentRequest, Router_SendPaymentV2Server) error
func (UnimplementedRouterServer) SendToRoute ¶
func (UnimplementedRouterServer) SendToRoute(context.Context, *SendToRouteRequest) (*SendToRouteResponse, error)
func (UnimplementedRouterServer) SendToRouteV2 ¶
func (UnimplementedRouterServer) SendToRouteV2(context.Context, *SendToRouteRequest) (*lnrpc.HTLCAttempt, error)
func (UnimplementedRouterServer) SetMissionControlConfig ¶
func (UnimplementedRouterServer) SetMissionControlConfig(context.Context, *SetMissionControlConfigRequest) (*SetMissionControlConfigResponse, error)
func (UnimplementedRouterServer) SubscribeHtlcEvents ¶
func (UnimplementedRouterServer) SubscribeHtlcEvents(*SubscribeHtlcEventsRequest, Router_SubscribeHtlcEventsServer) error
func (UnimplementedRouterServer) TrackPayment ¶
func (UnimplementedRouterServer) TrackPayment(*TrackPaymentRequest, Router_TrackPaymentServer) error
func (UnimplementedRouterServer) TrackPaymentV2 ¶
func (UnimplementedRouterServer) TrackPaymentV2(*TrackPaymentRequest, Router_TrackPaymentV2Server) error
func (UnimplementedRouterServer) TrackPayments ¶
func (UnimplementedRouterServer) TrackPayments(*TrackPaymentsRequest, Router_TrackPaymentsServer) error
func (UnimplementedRouterServer) UpdateChanStatus ¶
func (UnimplementedRouterServer) UpdateChanStatus(context.Context, *UpdateChanStatusRequest) (*UpdateChanStatusResponse, error)
func (UnimplementedRouterServer) XImportMissionControl ¶
func (UnimplementedRouterServer) XImportMissionControl(context.Context, *XImportMissionControlRequest) (*XImportMissionControlResponse, error)
type UnsafeRouterServer ¶
type UnsafeRouterServer interface {
// contains filtered or unexported methods
}
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 UpdateChanStatusRequest ¶
type UpdateChanStatusRequest struct { ChanPoint *lnrpc.ChannelPoint `protobuf:"bytes,1,opt,name=chan_point,json=chanPoint,proto3" json:"chan_point,omitempty"` Action ChanStatusAction `protobuf:"varint,2,opt,name=action,proto3,enum=routerrpc.ChanStatusAction" json:"action,omitempty"` // contains filtered or unexported fields }
func (*UpdateChanStatusRequest) Descriptor
deprecated
func (*UpdateChanStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateChanStatusRequest.ProtoReflect.Descriptor instead.
func (*UpdateChanStatusRequest) GetAction ¶
func (x *UpdateChanStatusRequest) GetAction() ChanStatusAction
func (*UpdateChanStatusRequest) GetChanPoint ¶
func (x *UpdateChanStatusRequest) GetChanPoint() *lnrpc.ChannelPoint
func (*UpdateChanStatusRequest) ProtoMessage ¶
func (*UpdateChanStatusRequest) ProtoMessage()
func (*UpdateChanStatusRequest) ProtoReflect ¶
func (x *UpdateChanStatusRequest) ProtoReflect() protoreflect.Message
func (*UpdateChanStatusRequest) Reset ¶
func (x *UpdateChanStatusRequest) Reset()
func (*UpdateChanStatusRequest) String ¶
func (x *UpdateChanStatusRequest) String() string
type UpdateChanStatusResponse ¶
type UpdateChanStatusResponse struct {
// contains filtered or unexported fields
}
func (*UpdateChanStatusResponse) Descriptor
deprecated
func (*UpdateChanStatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateChanStatusResponse.ProtoReflect.Descriptor instead.
func (*UpdateChanStatusResponse) ProtoMessage ¶
func (*UpdateChanStatusResponse) ProtoMessage()
func (*UpdateChanStatusResponse) ProtoReflect ¶
func (x *UpdateChanStatusResponse) ProtoReflect() protoreflect.Message
func (*UpdateChanStatusResponse) Reset ¶
func (x *UpdateChanStatusResponse) Reset()
func (*UpdateChanStatusResponse) String ¶
func (x *UpdateChanStatusResponse) String() string
type XImportMissionControlRequest ¶
type XImportMissionControlRequest struct { // Node pair-level mission control state to be imported. Pairs []*PairHistory `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs,omitempty"` // Whether to force override MC pair history. Note that even with force // override the failure pair is imported before the success pair and both // still clamp existing failure/success amounts. Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` // contains filtered or unexported fields }
func (*XImportMissionControlRequest) Descriptor
deprecated
func (*XImportMissionControlRequest) Descriptor() ([]byte, []int)
Deprecated: Use XImportMissionControlRequest.ProtoReflect.Descriptor instead.
func (*XImportMissionControlRequest) GetForce ¶
func (x *XImportMissionControlRequest) GetForce() bool
func (*XImportMissionControlRequest) GetPairs ¶
func (x *XImportMissionControlRequest) GetPairs() []*PairHistory
func (*XImportMissionControlRequest) ProtoMessage ¶
func (*XImportMissionControlRequest) ProtoMessage()
func (*XImportMissionControlRequest) ProtoReflect ¶
func (x *XImportMissionControlRequest) ProtoReflect() protoreflect.Message
func (*XImportMissionControlRequest) Reset ¶
func (x *XImportMissionControlRequest) Reset()
func (*XImportMissionControlRequest) String ¶
func (x *XImportMissionControlRequest) String() string
type XImportMissionControlResponse ¶
type XImportMissionControlResponse struct {
// contains filtered or unexported fields
}
func (*XImportMissionControlResponse) Descriptor
deprecated
func (*XImportMissionControlResponse) Descriptor() ([]byte, []int)
Deprecated: Use XImportMissionControlResponse.ProtoReflect.Descriptor instead.
func (*XImportMissionControlResponse) ProtoMessage ¶
func (*XImportMissionControlResponse) ProtoMessage()
func (*XImportMissionControlResponse) ProtoReflect ¶
func (x *XImportMissionControlResponse) ProtoReflect() protoreflect.Message
func (*XImportMissionControlResponse) Reset ¶
func (x *XImportMissionControlResponse) Reset()
func (*XImportMissionControlResponse) String ¶
func (x *XImportMissionControlResponse) String() string