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 RegisterRouterServer(s *grpc.Server, srv RouterServer)
- 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 BuildRouteRequest
- func (*BuildRouteRequest) Descriptor() ([]byte, []int)
- func (m *BuildRouteRequest) GetAmtMsat() int64
- func (m *BuildRouteRequest) GetFinalCltvDelta() int32
- func (m *BuildRouteRequest) GetHopPubkeys() [][]byte
- func (m *BuildRouteRequest) GetOutgoingChanId() uint64
- func (m *BuildRouteRequest) GetPaymentAddr() []byte
- func (*BuildRouteRequest) ProtoMessage()
- func (m *BuildRouteRequest) Reset()
- func (m *BuildRouteRequest) String() string
- func (m *BuildRouteRequest) XXX_DiscardUnknown()
- func (m *BuildRouteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BuildRouteRequest) XXX_Merge(src proto.Message)
- func (m *BuildRouteRequest) XXX_Size() int
- func (m *BuildRouteRequest) XXX_Unmarshal(b []byte) error
- type BuildRouteResponse
- func (*BuildRouteResponse) Descriptor() ([]byte, []int)
- func (m *BuildRouteResponse) GetRoute() *lnrpc.Route
- func (*BuildRouteResponse) ProtoMessage()
- func (m *BuildRouteResponse) Reset()
- func (m *BuildRouteResponse) String() string
- func (m *BuildRouteResponse) XXX_DiscardUnknown()
- func (m *BuildRouteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BuildRouteResponse) XXX_Merge(src proto.Message)
- func (m *BuildRouteResponse) XXX_Size() int
- func (m *BuildRouteResponse) XXX_Unmarshal(b []byte) error
- type CircuitKey
- func (*CircuitKey) Descriptor() ([]byte, []int)
- func (m *CircuitKey) GetChanId() uint64
- func (m *CircuitKey) GetHtlcId() uint64
- func (*CircuitKey) ProtoMessage()
- func (m *CircuitKey) Reset()
- func (m *CircuitKey) String() string
- func (m *CircuitKey) XXX_DiscardUnknown()
- func (m *CircuitKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CircuitKey) XXX_Merge(src proto.Message)
- func (m *CircuitKey) XXX_Size() int
- func (m *CircuitKey) XXX_Unmarshal(b []byte) error
- type Config
- type FailureDetail
- type ForwardEvent
- func (*ForwardEvent) Descriptor() ([]byte, []int)
- func (m *ForwardEvent) GetInfo() *HtlcInfo
- func (*ForwardEvent) ProtoMessage()
- func (m *ForwardEvent) Reset()
- func (m *ForwardEvent) String() string
- func (m *ForwardEvent) XXX_DiscardUnknown()
- func (m *ForwardEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ForwardEvent) XXX_Merge(src proto.Message)
- func (m *ForwardEvent) XXX_Size() int
- func (m *ForwardEvent) XXX_Unmarshal(b []byte) error
- type ForwardFailEvent
- func (*ForwardFailEvent) Descriptor() ([]byte, []int)
- func (*ForwardFailEvent) ProtoMessage()
- func (m *ForwardFailEvent) Reset()
- func (m *ForwardFailEvent) String() string
- func (m *ForwardFailEvent) XXX_DiscardUnknown()
- func (m *ForwardFailEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ForwardFailEvent) XXX_Merge(src proto.Message)
- func (m *ForwardFailEvent) XXX_Size() int
- func (m *ForwardFailEvent) XXX_Unmarshal(b []byte) error
- type ForwardHtlcInterceptRequest
- func (*ForwardHtlcInterceptRequest) Descriptor() ([]byte, []int)
- func (m *ForwardHtlcInterceptRequest) GetCustomRecords() map[uint64][]byte
- func (m *ForwardHtlcInterceptRequest) GetIncomingAmountMsat() uint64
- func (m *ForwardHtlcInterceptRequest) GetIncomingCircuitKey() *CircuitKey
- func (m *ForwardHtlcInterceptRequest) GetIncomingExpiry() uint32
- func (m *ForwardHtlcInterceptRequest) GetOnionBlob() []byte
- func (m *ForwardHtlcInterceptRequest) GetOutgoingAmountMsat() uint64
- func (m *ForwardHtlcInterceptRequest) GetOutgoingExpiry() uint32
- func (m *ForwardHtlcInterceptRequest) GetOutgoingRequestedChanId() uint64
- func (m *ForwardHtlcInterceptRequest) GetPaymentHash() []byte
- func (*ForwardHtlcInterceptRequest) ProtoMessage()
- func (m *ForwardHtlcInterceptRequest) Reset()
- func (m *ForwardHtlcInterceptRequest) String() string
- func (m *ForwardHtlcInterceptRequest) XXX_DiscardUnknown()
- func (m *ForwardHtlcInterceptRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ForwardHtlcInterceptRequest) XXX_Merge(src proto.Message)
- func (m *ForwardHtlcInterceptRequest) XXX_Size() int
- func (m *ForwardHtlcInterceptRequest) XXX_Unmarshal(b []byte) error
- type ForwardHtlcInterceptResponse
- func (*ForwardHtlcInterceptResponse) Descriptor() ([]byte, []int)
- func (m *ForwardHtlcInterceptResponse) GetAction() ResolveHoldForwardAction
- func (m *ForwardHtlcInterceptResponse) GetIncomingCircuitKey() *CircuitKey
- func (m *ForwardHtlcInterceptResponse) GetPreimage() []byte
- func (*ForwardHtlcInterceptResponse) ProtoMessage()
- func (m *ForwardHtlcInterceptResponse) Reset()
- func (m *ForwardHtlcInterceptResponse) String() string
- func (m *ForwardHtlcInterceptResponse) XXX_DiscardUnknown()
- func (m *ForwardHtlcInterceptResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ForwardHtlcInterceptResponse) XXX_Merge(src proto.Message)
- func (m *ForwardHtlcInterceptResponse) XXX_Size() int
- func (m *ForwardHtlcInterceptResponse) XXX_Unmarshal(b []byte) error
- type HtlcEvent
- func (*HtlcEvent) Descriptor() ([]byte, []int)
- func (m *HtlcEvent) GetEvent() isHtlcEvent_Event
- func (m *HtlcEvent) GetEventType() HtlcEvent_EventType
- func (m *HtlcEvent) GetForwardEvent() *ForwardEvent
- func (m *HtlcEvent) GetForwardFailEvent() *ForwardFailEvent
- func (m *HtlcEvent) GetIncomingChannelId() uint64
- func (m *HtlcEvent) GetIncomingHtlcId() uint64
- func (m *HtlcEvent) GetLinkFailEvent() *LinkFailEvent
- func (m *HtlcEvent) GetOutgoingChannelId() uint64
- func (m *HtlcEvent) GetOutgoingHtlcId() uint64
- func (m *HtlcEvent) GetSettleEvent() *SettleEvent
- func (m *HtlcEvent) GetTimestampNs() uint64
- func (*HtlcEvent) ProtoMessage()
- func (m *HtlcEvent) Reset()
- func (m *HtlcEvent) String() string
- func (m *HtlcEvent) XXX_DiscardUnknown()
- func (m *HtlcEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HtlcEvent) XXX_Merge(src proto.Message)
- func (*HtlcEvent) XXX_OneofWrappers() []interface{}
- func (m *HtlcEvent) XXX_Size() int
- func (m *HtlcEvent) XXX_Unmarshal(b []byte) error
- type HtlcEvent_EventType
- type HtlcEvent_ForwardEvent
- type HtlcEvent_ForwardFailEvent
- type HtlcEvent_LinkFailEvent
- type HtlcEvent_SettleEvent
- type HtlcInfo
- func (*HtlcInfo) Descriptor() ([]byte, []int)
- func (m *HtlcInfo) GetIncomingAmtMsat() uint64
- func (m *HtlcInfo) GetIncomingTimelock() uint32
- func (m *HtlcInfo) GetOutgoingAmtMsat() uint64
- func (m *HtlcInfo) GetOutgoingTimelock() uint32
- func (*HtlcInfo) ProtoMessage()
- func (m *HtlcInfo) Reset()
- func (m *HtlcInfo) String() string
- func (m *HtlcInfo) XXX_DiscardUnknown()
- func (m *HtlcInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HtlcInfo) XXX_Merge(src proto.Message)
- func (m *HtlcInfo) XXX_Size() int
- func (m *HtlcInfo) XXX_Unmarshal(b []byte) error
- type LinkFailEvent
- func (*LinkFailEvent) Descriptor() ([]byte, []int)
- func (m *LinkFailEvent) GetFailureDetail() FailureDetail
- func (m *LinkFailEvent) GetFailureString() string
- func (m *LinkFailEvent) GetInfo() *HtlcInfo
- func (m *LinkFailEvent) GetWireFailure() lnrpc.Failure_FailureCode
- func (*LinkFailEvent) ProtoMessage()
- func (m *LinkFailEvent) Reset()
- func (m *LinkFailEvent) String() string
- func (m *LinkFailEvent) XXX_DiscardUnknown()
- func (m *LinkFailEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LinkFailEvent) XXX_Merge(src proto.Message)
- func (m *LinkFailEvent) XXX_Size() int
- func (m *LinkFailEvent) XXX_Unmarshal(b []byte) error
- type MissionControl
- type PairData
- func (*PairData) Descriptor() ([]byte, []int)
- func (m *PairData) GetFailAmtMsat() int64
- func (m *PairData) GetFailAmtSat() int64
- func (m *PairData) GetFailTime() int64
- func (m *PairData) GetSuccessAmtMsat() int64
- func (m *PairData) GetSuccessAmtSat() int64
- func (m *PairData) GetSuccessTime() int64
- func (*PairData) ProtoMessage()
- func (m *PairData) Reset()
- func (m *PairData) String() string
- func (m *PairData) XXX_DiscardUnknown()
- func (m *PairData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PairData) XXX_Merge(src proto.Message)
- func (m *PairData) XXX_Size() int
- func (m *PairData) XXX_Unmarshal(b []byte) error
- type PairHistory
- func (*PairHistory) Descriptor() ([]byte, []int)
- func (m *PairHistory) GetHistory() *PairData
- func (m *PairHistory) GetNodeFrom() []byte
- func (m *PairHistory) GetNodeTo() []byte
- func (*PairHistory) ProtoMessage()
- func (m *PairHistory) Reset()
- func (m *PairHistory) String() string
- func (m *PairHistory) XXX_DiscardUnknown()
- func (m *PairHistory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PairHistory) XXX_Merge(src proto.Message)
- func (m *PairHistory) XXX_Size() int
- func (m *PairHistory) XXX_Unmarshal(b []byte) error
- type PaymentState
- type PaymentStatus
- func (*PaymentStatus) Descriptor() ([]byte, []int)
- func (m *PaymentStatus) GetHtlcs() []*lnrpc.HTLCAttempt
- func (m *PaymentStatus) GetPreimage() []byte
- func (m *PaymentStatus) GetState() PaymentState
- func (*PaymentStatus) ProtoMessage()
- func (m *PaymentStatus) Reset()
- func (m *PaymentStatus) String() string
- func (m *PaymentStatus) XXX_DiscardUnknown()
- func (m *PaymentStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PaymentStatus) XXX_Merge(src proto.Message)
- func (m *PaymentStatus) XXX_Size() int
- func (m *PaymentStatus) XXX_Unmarshal(b []byte) error
- type QueryMissionControlRequest
- func (*QueryMissionControlRequest) Descriptor() ([]byte, []int)
- func (*QueryMissionControlRequest) ProtoMessage()
- func (m *QueryMissionControlRequest) Reset()
- func (m *QueryMissionControlRequest) String() string
- func (m *QueryMissionControlRequest) XXX_DiscardUnknown()
- func (m *QueryMissionControlRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryMissionControlRequest) XXX_Merge(src proto.Message)
- func (m *QueryMissionControlRequest) XXX_Size() int
- func (m *QueryMissionControlRequest) XXX_Unmarshal(b []byte) error
- type QueryMissionControlResponse
- func (*QueryMissionControlResponse) Descriptor() ([]byte, []int)
- func (m *QueryMissionControlResponse) GetPairs() []*PairHistory
- func (*QueryMissionControlResponse) ProtoMessage()
- func (m *QueryMissionControlResponse) Reset()
- func (m *QueryMissionControlResponse) String() string
- func (m *QueryMissionControlResponse) XXX_DiscardUnknown()
- func (m *QueryMissionControlResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryMissionControlResponse) XXX_Merge(src proto.Message)
- func (m *QueryMissionControlResponse) XXX_Size() int
- func (m *QueryMissionControlResponse) XXX_Unmarshal(b []byte) error
- type QueryProbabilityRequest
- func (*QueryProbabilityRequest) Descriptor() ([]byte, []int)
- func (m *QueryProbabilityRequest) GetAmtMsat() int64
- func (m *QueryProbabilityRequest) GetFromNode() []byte
- func (m *QueryProbabilityRequest) GetToNode() []byte
- func (*QueryProbabilityRequest) ProtoMessage()
- func (m *QueryProbabilityRequest) Reset()
- func (m *QueryProbabilityRequest) String() string
- func (m *QueryProbabilityRequest) XXX_DiscardUnknown()
- func (m *QueryProbabilityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryProbabilityRequest) XXX_Merge(src proto.Message)
- func (m *QueryProbabilityRequest) XXX_Size() int
- func (m *QueryProbabilityRequest) XXX_Unmarshal(b []byte) error
- type QueryProbabilityResponse
- func (*QueryProbabilityResponse) Descriptor() ([]byte, []int)
- func (m *QueryProbabilityResponse) GetHistory() *PairData
- func (m *QueryProbabilityResponse) GetProbability() float64
- func (*QueryProbabilityResponse) ProtoMessage()
- func (m *QueryProbabilityResponse) Reset()
- func (m *QueryProbabilityResponse) String() string
- func (m *QueryProbabilityResponse) XXX_DiscardUnknown()
- func (m *QueryProbabilityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryProbabilityResponse) XXX_Merge(src proto.Message)
- func (m *QueryProbabilityResponse) XXX_Size() int
- func (m *QueryProbabilityResponse) XXX_Unmarshal(b []byte) error
- type ResetMissionControlRequest
- func (*ResetMissionControlRequest) Descriptor() ([]byte, []int)
- func (*ResetMissionControlRequest) ProtoMessage()
- func (m *ResetMissionControlRequest) Reset()
- func (m *ResetMissionControlRequest) String() string
- func (m *ResetMissionControlRequest) XXX_DiscardUnknown()
- func (m *ResetMissionControlRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ResetMissionControlRequest) XXX_Merge(src proto.Message)
- func (m *ResetMissionControlRequest) XXX_Size() int
- func (m *ResetMissionControlRequest) XXX_Unmarshal(b []byte) error
- type ResetMissionControlResponse
- func (*ResetMissionControlResponse) Descriptor() ([]byte, []int)
- func (*ResetMissionControlResponse) ProtoMessage()
- func (m *ResetMissionControlResponse) Reset()
- func (m *ResetMissionControlResponse) String() string
- func (m *ResetMissionControlResponse) XXX_DiscardUnknown()
- func (m *ResetMissionControlResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ResetMissionControlResponse) XXX_Merge(src proto.Message)
- func (m *ResetMissionControlResponse) XXX_Size() int
- func (m *ResetMissionControlResponse) XXX_Unmarshal(b []byte) error
- type ResolveHoldForwardAction
- type RouteFeeRequest
- func (*RouteFeeRequest) Descriptor() ([]byte, []int)
- func (m *RouteFeeRequest) GetAmtSat() int64
- func (m *RouteFeeRequest) GetDest() []byte
- func (*RouteFeeRequest) ProtoMessage()
- func (m *RouteFeeRequest) Reset()
- func (m *RouteFeeRequest) String() string
- func (m *RouteFeeRequest) XXX_DiscardUnknown()
- func (m *RouteFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RouteFeeRequest) XXX_Merge(src proto.Message)
- func (m *RouteFeeRequest) XXX_Size() int
- func (m *RouteFeeRequest) XXX_Unmarshal(b []byte) error
- type RouteFeeResponse
- func (*RouteFeeResponse) Descriptor() ([]byte, []int)
- func (m *RouteFeeResponse) GetRoutingFeeMsat() int64
- func (m *RouteFeeResponse) GetTimeLockDelay() int64
- func (*RouteFeeResponse) ProtoMessage()
- func (m *RouteFeeResponse) Reset()
- func (m *RouteFeeResponse) String() string
- func (m *RouteFeeResponse) XXX_DiscardUnknown()
- func (m *RouteFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RouteFeeResponse) XXX_Merge(src proto.Message)
- func (m *RouteFeeResponse) XXX_Size() int
- func (m *RouteFeeResponse) XXX_Unmarshal(b []byte) error
- 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 RoutingConfig
- type SendPaymentRequest
- func (*SendPaymentRequest) Descriptor() ([]byte, []int)
- func (m *SendPaymentRequest) GetAllowSelfPayment() bool
- func (m *SendPaymentRequest) GetAmt() int64
- func (m *SendPaymentRequest) GetAmtMsat() int64
- func (m *SendPaymentRequest) GetCltvLimit() int32
- func (m *SendPaymentRequest) GetDest() []byte
- func (m *SendPaymentRequest) GetDestCustomRecords() map[uint64][]byte
- func (m *SendPaymentRequest) GetDestFeatures() []lnrpc.FeatureBit
- func (m *SendPaymentRequest) GetFeeLimitMsat() int64
- func (m *SendPaymentRequest) GetFeeLimitSat() int64
- func (m *SendPaymentRequest) GetFinalCltvDelta() int32
- func (m *SendPaymentRequest) GetLastHopPubkey() []byte
- func (m *SendPaymentRequest) GetMaxParts() uint32
- func (m *SendPaymentRequest) GetMaxShardSizeMsat() uint64
- func (m *SendPaymentRequest) GetNoInflightUpdates() bool
- func (m *SendPaymentRequest) GetOutgoingChanId() uint64deprecated
- func (m *SendPaymentRequest) GetOutgoingChanIds() []uint64
- func (m *SendPaymentRequest) GetPaymentAddr() []byte
- func (m *SendPaymentRequest) GetPaymentHash() []byte
- func (m *SendPaymentRequest) GetPaymentRequest() string
- func (m *SendPaymentRequest) GetRouteHints() []*lnrpc.RouteHint
- func (m *SendPaymentRequest) GetTimeoutSeconds() int32
- func (*SendPaymentRequest) ProtoMessage()
- func (m *SendPaymentRequest) Reset()
- func (m *SendPaymentRequest) String() string
- func (m *SendPaymentRequest) XXX_DiscardUnknown()
- func (m *SendPaymentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SendPaymentRequest) XXX_Merge(src proto.Message)
- func (m *SendPaymentRequest) XXX_Size() int
- func (m *SendPaymentRequest) XXX_Unmarshal(b []byte) error
- type SendToRouteRequest
- func (*SendToRouteRequest) Descriptor() ([]byte, []int)
- func (m *SendToRouteRequest) GetPaymentHash() []byte
- func (m *SendToRouteRequest) GetRoute() *lnrpc.Route
- func (*SendToRouteRequest) ProtoMessage()
- func (m *SendToRouteRequest) Reset()
- func (m *SendToRouteRequest) String() string
- func (m *SendToRouteRequest) XXX_DiscardUnknown()
- func (m *SendToRouteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SendToRouteRequest) XXX_Merge(src proto.Message)
- func (m *SendToRouteRequest) XXX_Size() int
- func (m *SendToRouteRequest) XXX_Unmarshal(b []byte) error
- type SendToRouteResponse
- func (*SendToRouteResponse) Descriptor() ([]byte, []int)
- func (m *SendToRouteResponse) GetFailure() *lnrpc.Failure
- func (m *SendToRouteResponse) GetPreimage() []byte
- func (*SendToRouteResponse) ProtoMessage()
- func (m *SendToRouteResponse) Reset()
- func (m *SendToRouteResponse) String() string
- func (m *SendToRouteResponse) XXX_DiscardUnknown()
- func (m *SendToRouteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SendToRouteResponse) XXX_Merge(src proto.Message)
- func (m *SendToRouteResponse) XXX_Size() int
- func (m *SendToRouteResponse) XXX_Unmarshal(b []byte) error
- 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) 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) RegisterWithRestServer(ctx context.Context, mux *runtime.ServeMux, dest string, ...) error
- func (s *Server) RegisterWithRootServer(grpcServer *grpc.Server) 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) 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
- type SettleEvent
- func (*SettleEvent) Descriptor() ([]byte, []int)
- func (*SettleEvent) ProtoMessage()
- func (m *SettleEvent) Reset()
- func (m *SettleEvent) String() string
- func (m *SettleEvent) XXX_DiscardUnknown()
- func (m *SettleEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SettleEvent) XXX_Merge(src proto.Message)
- func (m *SettleEvent) XXX_Size() int
- func (m *SettleEvent) XXX_Unmarshal(b []byte) error
- type SubscribeHtlcEventsRequest
- func (*SubscribeHtlcEventsRequest) Descriptor() ([]byte, []int)
- func (*SubscribeHtlcEventsRequest) ProtoMessage()
- func (m *SubscribeHtlcEventsRequest) Reset()
- func (m *SubscribeHtlcEventsRequest) String() string
- func (m *SubscribeHtlcEventsRequest) XXX_DiscardUnknown()
- func (m *SubscribeHtlcEventsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SubscribeHtlcEventsRequest) XXX_Merge(src proto.Message)
- func (m *SubscribeHtlcEventsRequest) XXX_Size() int
- func (m *SubscribeHtlcEventsRequest) XXX_Unmarshal(b []byte) error
- type TrackPaymentRequest
- func (*TrackPaymentRequest) Descriptor() ([]byte, []int)
- func (m *TrackPaymentRequest) GetNoInflightUpdates() bool
- func (m *TrackPaymentRequest) GetPaymentHash() []byte
- func (*TrackPaymentRequest) ProtoMessage()
- func (m *TrackPaymentRequest) Reset()
- func (m *TrackPaymentRequest) String() string
- func (m *TrackPaymentRequest) XXX_DiscardUnknown()
- func (m *TrackPaymentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TrackPaymentRequest) XXX_Merge(src proto.Message)
- func (m *TrackPaymentRequest) XXX_Size() int
- func (m *TrackPaymentRequest) XXX_Unmarshal(b []byte) error
- type UnimplementedRouterServer
- func (*UnimplementedRouterServer) BuildRoute(ctx context.Context, req *BuildRouteRequest) (*BuildRouteResponse, error)
- func (*UnimplementedRouterServer) EstimateRouteFee(ctx context.Context, req *RouteFeeRequest) (*RouteFeeResponse, error)
- func (*UnimplementedRouterServer) HtlcInterceptor(srv Router_HtlcInterceptorServer) error
- func (*UnimplementedRouterServer) QueryMissionControl(ctx context.Context, req *QueryMissionControlRequest) (*QueryMissionControlResponse, error)
- func (*UnimplementedRouterServer) QueryProbability(ctx context.Context, req *QueryProbabilityRequest) (*QueryProbabilityResponse, error)
- func (*UnimplementedRouterServer) ResetMissionControl(ctx context.Context, req *ResetMissionControlRequest) (*ResetMissionControlResponse, error)
- func (*UnimplementedRouterServer) SendPayment(req *SendPaymentRequest, srv Router_SendPaymentServer) error
- func (*UnimplementedRouterServer) SendPaymentV2(req *SendPaymentRequest, srv Router_SendPaymentV2Server) error
- func (*UnimplementedRouterServer) SendToRoute(ctx context.Context, req *SendToRouteRequest) (*SendToRouteResponse, error)
- func (*UnimplementedRouterServer) SendToRouteV2(ctx context.Context, req *SendToRouteRequest) (*lnrpc.HTLCAttempt, error)
- func (*UnimplementedRouterServer) SubscribeHtlcEvents(req *SubscribeHtlcEventsRequest, srv Router_SubscribeHtlcEventsServer) error
- func (*UnimplementedRouterServer) TrackPayment(req *TrackPaymentRequest, srv Router_TrackPaymentServer) error
- func (*UnimplementedRouterServer) TrackPaymentV2(req *TrackPaymentRequest, srv Router_TrackPaymentV2Server) error
Constants ¶
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 ( // 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 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",
}
var 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,
}
var HtlcEvent_EventType_name = map[int32]string{
0: "UNKNOWN",
1: "SEND",
2: "RECEIVE",
3: "FORWARD",
}
var HtlcEvent_EventType_value = map[string]int32{
"UNKNOWN": 0,
"SEND": 1,
"RECEIVE": 2,
"FORWARD": 3,
}
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",
}
var 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,
}
var ResolveHoldForwardAction_name = map[int32]string{
0: "SETTLE",
1: "FAIL",
2: "RESUME",
}
var ResolveHoldForwardAction_value = map[string]int32{
"SETTLE": 0,
"FAIL": 1,
"RESUME": 2,
}
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.
func RegisterRouterServer ¶
func RegisterRouterServer(s *grpc.Server, 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 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BuildRouteRequest) Descriptor ¶
func (*BuildRouteRequest) Descriptor() ([]byte, []int)
func (*BuildRouteRequest) GetAmtMsat ¶
func (m *BuildRouteRequest) GetAmtMsat() int64
func (*BuildRouteRequest) GetFinalCltvDelta ¶
func (m *BuildRouteRequest) GetFinalCltvDelta() int32
func (*BuildRouteRequest) GetHopPubkeys ¶
func (m *BuildRouteRequest) GetHopPubkeys() [][]byte
func (*BuildRouteRequest) GetOutgoingChanId ¶
func (m *BuildRouteRequest) GetOutgoingChanId() uint64
func (*BuildRouteRequest) GetPaymentAddr ¶
func (m *BuildRouteRequest) GetPaymentAddr() []byte
func (*BuildRouteRequest) ProtoMessage ¶
func (*BuildRouteRequest) ProtoMessage()
func (*BuildRouteRequest) Reset ¶
func (m *BuildRouteRequest) Reset()
func (*BuildRouteRequest) String ¶
func (m *BuildRouteRequest) String() string
func (*BuildRouteRequest) XXX_DiscardUnknown ¶
func (m *BuildRouteRequest) XXX_DiscardUnknown()
func (*BuildRouteRequest) XXX_Marshal ¶
func (m *BuildRouteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BuildRouteRequest) XXX_Merge ¶
func (m *BuildRouteRequest) XXX_Merge(src proto.Message)
func (*BuildRouteRequest) XXX_Size ¶
func (m *BuildRouteRequest) XXX_Size() int
func (*BuildRouteRequest) XXX_Unmarshal ¶
func (m *BuildRouteRequest) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BuildRouteResponse) Descriptor ¶
func (*BuildRouteResponse) Descriptor() ([]byte, []int)
func (*BuildRouteResponse) GetRoute ¶
func (m *BuildRouteResponse) GetRoute() *lnrpc.Route
func (*BuildRouteResponse) ProtoMessage ¶
func (*BuildRouteResponse) ProtoMessage()
func (*BuildRouteResponse) Reset ¶
func (m *BuildRouteResponse) Reset()
func (*BuildRouteResponse) String ¶
func (m *BuildRouteResponse) String() string
func (*BuildRouteResponse) XXX_DiscardUnknown ¶
func (m *BuildRouteResponse) XXX_DiscardUnknown()
func (*BuildRouteResponse) XXX_Marshal ¶
func (m *BuildRouteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BuildRouteResponse) XXX_Merge ¶
func (m *BuildRouteResponse) XXX_Merge(src proto.Message)
func (*BuildRouteResponse) XXX_Size ¶
func (m *BuildRouteResponse) XXX_Size() int
func (*BuildRouteResponse) XXX_Unmarshal ¶
func (m *BuildRouteResponse) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CircuitKey) Descriptor ¶
func (*CircuitKey) Descriptor() ([]byte, []int)
func (*CircuitKey) GetChanId ¶
func (m *CircuitKey) GetChanId() uint64
func (*CircuitKey) GetHtlcId ¶
func (m *CircuitKey) GetHtlcId() uint64
func (*CircuitKey) ProtoMessage ¶
func (*CircuitKey) ProtoMessage()
func (*CircuitKey) Reset ¶
func (m *CircuitKey) Reset()
func (*CircuitKey) String ¶
func (m *CircuitKey) String() string
func (*CircuitKey) XXX_DiscardUnknown ¶
func (m *CircuitKey) XXX_DiscardUnknown()
func (*CircuitKey) XXX_Marshal ¶
func (m *CircuitKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CircuitKey) XXX_Merge ¶
func (m *CircuitKey) XXX_Merge(src proto.Message)
func (*CircuitKey) XXX_Size ¶
func (m *CircuitKey) XXX_Size() int
func (*CircuitKey) XXX_Unmarshal ¶
func (m *CircuitKey) XXX_Unmarshal(b []byte) error
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) EnumDescriptor ¶
func (FailureDetail) EnumDescriptor() ([]byte, []int)
func (FailureDetail) String ¶
func (x FailureDetail) 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ForwardEvent) Descriptor ¶
func (*ForwardEvent) Descriptor() ([]byte, []int)
func (*ForwardEvent) GetInfo ¶
func (m *ForwardEvent) GetInfo() *HtlcInfo
func (*ForwardEvent) ProtoMessage ¶
func (*ForwardEvent) ProtoMessage()
func (*ForwardEvent) Reset ¶
func (m *ForwardEvent) Reset()
func (*ForwardEvent) String ¶
func (m *ForwardEvent) String() string
func (*ForwardEvent) XXX_DiscardUnknown ¶
func (m *ForwardEvent) XXX_DiscardUnknown()
func (*ForwardEvent) XXX_Marshal ¶
func (m *ForwardEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ForwardEvent) XXX_Merge ¶
func (m *ForwardEvent) XXX_Merge(src proto.Message)
func (*ForwardEvent) XXX_Size ¶
func (m *ForwardEvent) XXX_Size() int
func (*ForwardEvent) XXX_Unmarshal ¶
func (m *ForwardEvent) XXX_Unmarshal(b []byte) error
type ForwardFailEvent ¶
type ForwardFailEvent struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ForwardFailEvent) Descriptor ¶
func (*ForwardFailEvent) Descriptor() ([]byte, []int)
func (*ForwardFailEvent) ProtoMessage ¶
func (*ForwardFailEvent) ProtoMessage()
func (*ForwardFailEvent) Reset ¶
func (m *ForwardFailEvent) Reset()
func (*ForwardFailEvent) String ¶
func (m *ForwardFailEvent) String() string
func (*ForwardFailEvent) XXX_DiscardUnknown ¶
func (m *ForwardFailEvent) XXX_DiscardUnknown()
func (*ForwardFailEvent) XXX_Marshal ¶
func (m *ForwardFailEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ForwardFailEvent) XXX_Merge ¶
func (m *ForwardFailEvent) XXX_Merge(src proto.Message)
func (*ForwardFailEvent) XXX_Size ¶
func (m *ForwardFailEvent) XXX_Size() int
func (*ForwardFailEvent) XXX_Unmarshal ¶
func (m *ForwardFailEvent) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ForwardHtlcInterceptRequest) Descriptor ¶
func (*ForwardHtlcInterceptRequest) Descriptor() ([]byte, []int)
func (*ForwardHtlcInterceptRequest) GetCustomRecords ¶
func (m *ForwardHtlcInterceptRequest) GetCustomRecords() map[uint64][]byte
func (*ForwardHtlcInterceptRequest) GetIncomingAmountMsat ¶
func (m *ForwardHtlcInterceptRequest) GetIncomingAmountMsat() uint64
func (*ForwardHtlcInterceptRequest) GetIncomingCircuitKey ¶
func (m *ForwardHtlcInterceptRequest) GetIncomingCircuitKey() *CircuitKey
func (*ForwardHtlcInterceptRequest) GetIncomingExpiry ¶
func (m *ForwardHtlcInterceptRequest) GetIncomingExpiry() uint32
func (*ForwardHtlcInterceptRequest) GetOnionBlob ¶
func (m *ForwardHtlcInterceptRequest) GetOnionBlob() []byte
func (*ForwardHtlcInterceptRequest) GetOutgoingAmountMsat ¶
func (m *ForwardHtlcInterceptRequest) GetOutgoingAmountMsat() uint64
func (*ForwardHtlcInterceptRequest) GetOutgoingExpiry ¶
func (m *ForwardHtlcInterceptRequest) GetOutgoingExpiry() uint32
func (*ForwardHtlcInterceptRequest) GetOutgoingRequestedChanId ¶
func (m *ForwardHtlcInterceptRequest) GetOutgoingRequestedChanId() uint64
func (*ForwardHtlcInterceptRequest) GetPaymentHash ¶
func (m *ForwardHtlcInterceptRequest) GetPaymentHash() []byte
func (*ForwardHtlcInterceptRequest) ProtoMessage ¶
func (*ForwardHtlcInterceptRequest) ProtoMessage()
func (*ForwardHtlcInterceptRequest) Reset ¶
func (m *ForwardHtlcInterceptRequest) Reset()
func (*ForwardHtlcInterceptRequest) String ¶
func (m *ForwardHtlcInterceptRequest) String() string
func (*ForwardHtlcInterceptRequest) XXX_DiscardUnknown ¶
func (m *ForwardHtlcInterceptRequest) XXX_DiscardUnknown()
func (*ForwardHtlcInterceptRequest) XXX_Marshal ¶
func (m *ForwardHtlcInterceptRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ForwardHtlcInterceptRequest) XXX_Merge ¶
func (m *ForwardHtlcInterceptRequest) XXX_Merge(src proto.Message)
func (*ForwardHtlcInterceptRequest) XXX_Size ¶
func (m *ForwardHtlcInterceptRequest) XXX_Size() int
func (*ForwardHtlcInterceptRequest) XXX_Unmarshal ¶
func (m *ForwardHtlcInterceptRequest) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
* 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 ¶
func (*ForwardHtlcInterceptResponse) Descriptor() ([]byte, []int)
func (*ForwardHtlcInterceptResponse) GetAction ¶
func (m *ForwardHtlcInterceptResponse) GetAction() ResolveHoldForwardAction
func (*ForwardHtlcInterceptResponse) GetIncomingCircuitKey ¶
func (m *ForwardHtlcInterceptResponse) GetIncomingCircuitKey() *CircuitKey
func (*ForwardHtlcInterceptResponse) GetPreimage ¶
func (m *ForwardHtlcInterceptResponse) GetPreimage() []byte
func (*ForwardHtlcInterceptResponse) ProtoMessage ¶
func (*ForwardHtlcInterceptResponse) ProtoMessage()
func (*ForwardHtlcInterceptResponse) Reset ¶
func (m *ForwardHtlcInterceptResponse) Reset()
func (*ForwardHtlcInterceptResponse) String ¶
func (m *ForwardHtlcInterceptResponse) String() string
func (*ForwardHtlcInterceptResponse) XXX_DiscardUnknown ¶
func (m *ForwardHtlcInterceptResponse) XXX_DiscardUnknown()
func (*ForwardHtlcInterceptResponse) XXX_Marshal ¶
func (m *ForwardHtlcInterceptResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ForwardHtlcInterceptResponse) XXX_Merge ¶
func (m *ForwardHtlcInterceptResponse) XXX_Merge(src proto.Message)
func (*ForwardHtlcInterceptResponse) XXX_Size ¶
func (m *ForwardHtlcInterceptResponse) XXX_Size() int
func (*ForwardHtlcInterceptResponse) XXX_Unmarshal ¶
func (m *ForwardHtlcInterceptResponse) XXX_Unmarshal(b []byte) error
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 valid to be assigned to Event: // *HtlcEvent_ForwardEvent // *HtlcEvent_ForwardFailEvent // *HtlcEvent_SettleEvent // *HtlcEvent_LinkFailEvent Event isHtlcEvent_Event `protobuf_oneof:"event"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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 ¶
func (*HtlcEvent) GetEventType ¶
func (m *HtlcEvent) GetEventType() HtlcEvent_EventType
func (*HtlcEvent) GetForwardEvent ¶
func (m *HtlcEvent) GetForwardEvent() *ForwardEvent
func (*HtlcEvent) GetForwardFailEvent ¶
func (m *HtlcEvent) GetForwardFailEvent() *ForwardFailEvent
func (*HtlcEvent) GetIncomingChannelId ¶
func (*HtlcEvent) GetIncomingHtlcId ¶
func (*HtlcEvent) GetLinkFailEvent ¶
func (m *HtlcEvent) GetLinkFailEvent() *LinkFailEvent
func (*HtlcEvent) GetOutgoingChannelId ¶
func (*HtlcEvent) GetOutgoingHtlcId ¶
func (*HtlcEvent) GetSettleEvent ¶
func (m *HtlcEvent) GetSettleEvent() *SettleEvent
func (*HtlcEvent) GetTimestampNs ¶
func (*HtlcEvent) ProtoMessage ¶
func (*HtlcEvent) ProtoMessage()
func (*HtlcEvent) XXX_DiscardUnknown ¶
func (m *HtlcEvent) XXX_DiscardUnknown()
func (*HtlcEvent) XXX_Marshal ¶
func (*HtlcEvent) XXX_OneofWrappers ¶
func (*HtlcEvent) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*HtlcEvent) XXX_Unmarshal ¶
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) EnumDescriptor ¶
func (HtlcEvent_EventType) EnumDescriptor() ([]byte, []int)
func (HtlcEvent_EventType) String ¶
func (x HtlcEvent_EventType) String() string
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 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HtlcInfo) Descriptor ¶
func (*HtlcInfo) GetIncomingAmtMsat ¶
func (*HtlcInfo) GetIncomingTimelock ¶
func (*HtlcInfo) GetOutgoingAmtMsat ¶
func (*HtlcInfo) GetOutgoingTimelock ¶
func (*HtlcInfo) ProtoMessage ¶
func (*HtlcInfo) ProtoMessage()
func (*HtlcInfo) XXX_DiscardUnknown ¶
func (m *HtlcInfo) XXX_DiscardUnknown()
func (*HtlcInfo) XXX_Marshal ¶
func (*HtlcInfo) XXX_Unmarshal ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LinkFailEvent) Descriptor ¶
func (*LinkFailEvent) Descriptor() ([]byte, []int)
func (*LinkFailEvent) GetFailureDetail ¶
func (m *LinkFailEvent) GetFailureDetail() FailureDetail
func (*LinkFailEvent) GetFailureString ¶
func (m *LinkFailEvent) GetFailureString() string
func (*LinkFailEvent) GetInfo ¶
func (m *LinkFailEvent) GetInfo() *HtlcInfo
func (*LinkFailEvent) GetWireFailure ¶
func (m *LinkFailEvent) GetWireFailure() lnrpc.Failure_FailureCode
func (*LinkFailEvent) ProtoMessage ¶
func (*LinkFailEvent) ProtoMessage()
func (*LinkFailEvent) Reset ¶
func (m *LinkFailEvent) Reset()
func (*LinkFailEvent) String ¶
func (m *LinkFailEvent) String() string
func (*LinkFailEvent) XXX_DiscardUnknown ¶
func (m *LinkFailEvent) XXX_DiscardUnknown()
func (*LinkFailEvent) XXX_Marshal ¶
func (m *LinkFailEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LinkFailEvent) XXX_Merge ¶
func (m *LinkFailEvent) XXX_Merge(src proto.Message)
func (*LinkFailEvent) XXX_Size ¶
func (m *LinkFailEvent) XXX_Size() int
func (*LinkFailEvent) XXX_Unmarshal ¶
func (m *LinkFailEvent) XXX_Unmarshal(b []byte) error
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) 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 // GetPairHistorySnapshot returns the stored history for a given node // pair. GetPairHistorySnapshot(fromNode, toNode route.Vertex) routing.TimedPairResult }
MissionControl defines the mission control dependencies of routerrpc.
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PairData) Descriptor ¶
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) XXX_DiscardUnknown ¶
func (m *PairData) XXX_DiscardUnknown()
func (*PairData) XXX_Marshal ¶
func (*PairData) XXX_Unmarshal ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
PairHistory contains the mission control state for a particular node pair.
func (*PairHistory) Descriptor ¶
func (*PairHistory) Descriptor() ([]byte, []int)
func (*PairHistory) GetHistory ¶
func (m *PairHistory) GetHistory() *PairData
func (*PairHistory) GetNodeFrom ¶
func (m *PairHistory) GetNodeFrom() []byte
func (*PairHistory) GetNodeTo ¶
func (m *PairHistory) GetNodeTo() []byte
func (*PairHistory) ProtoMessage ¶
func (*PairHistory) ProtoMessage()
func (*PairHistory) Reset ¶
func (m *PairHistory) Reset()
func (*PairHistory) String ¶
func (m *PairHistory) String() string
func (*PairHistory) XXX_DiscardUnknown ¶
func (m *PairHistory) XXX_DiscardUnknown()
func (*PairHistory) XXX_Marshal ¶
func (m *PairHistory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PairHistory) XXX_Merge ¶
func (m *PairHistory) XXX_Merge(src proto.Message)
func (*PairHistory) XXX_Size ¶
func (m *PairHistory) XXX_Size() int
func (*PairHistory) XXX_Unmarshal ¶
func (m *PairHistory) XXX_Unmarshal(b []byte) error
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 occured. 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) EnumDescriptor ¶
func (PaymentState) EnumDescriptor() ([]byte, []int)
func (PaymentState) String ¶
func (x PaymentState) String() string
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PaymentStatus) Descriptor ¶
func (*PaymentStatus) Descriptor() ([]byte, []int)
func (*PaymentStatus) GetHtlcs ¶
func (m *PaymentStatus) GetHtlcs() []*lnrpc.HTLCAttempt
func (*PaymentStatus) GetPreimage ¶
func (m *PaymentStatus) GetPreimage() []byte
func (*PaymentStatus) GetState ¶
func (m *PaymentStatus) GetState() PaymentState
func (*PaymentStatus) ProtoMessage ¶
func (*PaymentStatus) ProtoMessage()
func (*PaymentStatus) Reset ¶
func (m *PaymentStatus) Reset()
func (*PaymentStatus) String ¶
func (m *PaymentStatus) String() string
func (*PaymentStatus) XXX_DiscardUnknown ¶
func (m *PaymentStatus) XXX_DiscardUnknown()
func (*PaymentStatus) XXX_Marshal ¶
func (m *PaymentStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PaymentStatus) XXX_Merge ¶
func (m *PaymentStatus) XXX_Merge(src proto.Message)
func (*PaymentStatus) XXX_Size ¶
func (m *PaymentStatus) XXX_Size() int
func (*PaymentStatus) XXX_Unmarshal ¶
func (m *PaymentStatus) XXX_Unmarshal(b []byte) error
type QueryMissionControlRequest ¶
type QueryMissionControlRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*QueryMissionControlRequest) Descriptor ¶
func (*QueryMissionControlRequest) Descriptor() ([]byte, []int)
func (*QueryMissionControlRequest) ProtoMessage ¶
func (*QueryMissionControlRequest) ProtoMessage()
func (*QueryMissionControlRequest) Reset ¶
func (m *QueryMissionControlRequest) Reset()
func (*QueryMissionControlRequest) String ¶
func (m *QueryMissionControlRequest) String() string
func (*QueryMissionControlRequest) XXX_DiscardUnknown ¶
func (m *QueryMissionControlRequest) XXX_DiscardUnknown()
func (*QueryMissionControlRequest) XXX_Marshal ¶
func (m *QueryMissionControlRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryMissionControlRequest) XXX_Merge ¶
func (m *QueryMissionControlRequest) XXX_Merge(src proto.Message)
func (*QueryMissionControlRequest) XXX_Size ¶
func (m *QueryMissionControlRequest) XXX_Size() int
func (*QueryMissionControlRequest) XXX_Unmarshal ¶
func (m *QueryMissionControlRequest) XXX_Unmarshal(b []byte) error
type QueryMissionControlResponse ¶
type QueryMissionControlResponse struct { // Node pair-level mission control state. Pairs []*PairHistory `protobuf:"bytes,2,rep,name=pairs,proto3" json:"pairs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
QueryMissionControlResponse contains mission control state.
func (*QueryMissionControlResponse) Descriptor ¶
func (*QueryMissionControlResponse) Descriptor() ([]byte, []int)
func (*QueryMissionControlResponse) GetPairs ¶
func (m *QueryMissionControlResponse) GetPairs() []*PairHistory
func (*QueryMissionControlResponse) ProtoMessage ¶
func (*QueryMissionControlResponse) ProtoMessage()
func (*QueryMissionControlResponse) Reset ¶
func (m *QueryMissionControlResponse) Reset()
func (*QueryMissionControlResponse) String ¶
func (m *QueryMissionControlResponse) String() string
func (*QueryMissionControlResponse) XXX_DiscardUnknown ¶
func (m *QueryMissionControlResponse) XXX_DiscardUnknown()
func (*QueryMissionControlResponse) XXX_Marshal ¶
func (m *QueryMissionControlResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryMissionControlResponse) XXX_Merge ¶
func (m *QueryMissionControlResponse) XXX_Merge(src proto.Message)
func (*QueryMissionControlResponse) XXX_Size ¶
func (m *QueryMissionControlResponse) XXX_Size() int
func (*QueryMissionControlResponse) XXX_Unmarshal ¶
func (m *QueryMissionControlResponse) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*QueryProbabilityRequest) Descriptor ¶
func (*QueryProbabilityRequest) Descriptor() ([]byte, []int)
func (*QueryProbabilityRequest) GetAmtMsat ¶
func (m *QueryProbabilityRequest) GetAmtMsat() int64
func (*QueryProbabilityRequest) GetFromNode ¶
func (m *QueryProbabilityRequest) GetFromNode() []byte
func (*QueryProbabilityRequest) GetToNode ¶
func (m *QueryProbabilityRequest) GetToNode() []byte
func (*QueryProbabilityRequest) ProtoMessage ¶
func (*QueryProbabilityRequest) ProtoMessage()
func (*QueryProbabilityRequest) Reset ¶
func (m *QueryProbabilityRequest) Reset()
func (*QueryProbabilityRequest) String ¶
func (m *QueryProbabilityRequest) String() string
func (*QueryProbabilityRequest) XXX_DiscardUnknown ¶
func (m *QueryProbabilityRequest) XXX_DiscardUnknown()
func (*QueryProbabilityRequest) XXX_Marshal ¶
func (m *QueryProbabilityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryProbabilityRequest) XXX_Merge ¶
func (m *QueryProbabilityRequest) XXX_Merge(src proto.Message)
func (*QueryProbabilityRequest) XXX_Size ¶
func (m *QueryProbabilityRequest) XXX_Size() int
func (*QueryProbabilityRequest) XXX_Unmarshal ¶
func (m *QueryProbabilityRequest) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*QueryProbabilityResponse) Descriptor ¶
func (*QueryProbabilityResponse) Descriptor() ([]byte, []int)
func (*QueryProbabilityResponse) GetHistory ¶
func (m *QueryProbabilityResponse) GetHistory() *PairData
func (*QueryProbabilityResponse) GetProbability ¶
func (m *QueryProbabilityResponse) GetProbability() float64
func (*QueryProbabilityResponse) ProtoMessage ¶
func (*QueryProbabilityResponse) ProtoMessage()
func (*QueryProbabilityResponse) Reset ¶
func (m *QueryProbabilityResponse) Reset()
func (*QueryProbabilityResponse) String ¶
func (m *QueryProbabilityResponse) String() string
func (*QueryProbabilityResponse) XXX_DiscardUnknown ¶
func (m *QueryProbabilityResponse) XXX_DiscardUnknown()
func (*QueryProbabilityResponse) XXX_Marshal ¶
func (m *QueryProbabilityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryProbabilityResponse) XXX_Merge ¶
func (m *QueryProbabilityResponse) XXX_Merge(src proto.Message)
func (*QueryProbabilityResponse) XXX_Size ¶
func (m *QueryProbabilityResponse) XXX_Size() int
func (*QueryProbabilityResponse) XXX_Unmarshal ¶
func (m *QueryProbabilityResponse) XXX_Unmarshal(b []byte) error
type ResetMissionControlRequest ¶
type ResetMissionControlRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ResetMissionControlRequest) Descriptor ¶
func (*ResetMissionControlRequest) Descriptor() ([]byte, []int)
func (*ResetMissionControlRequest) ProtoMessage ¶
func (*ResetMissionControlRequest) ProtoMessage()
func (*ResetMissionControlRequest) Reset ¶
func (m *ResetMissionControlRequest) Reset()
func (*ResetMissionControlRequest) String ¶
func (m *ResetMissionControlRequest) String() string
func (*ResetMissionControlRequest) XXX_DiscardUnknown ¶
func (m *ResetMissionControlRequest) XXX_DiscardUnknown()
func (*ResetMissionControlRequest) XXX_Marshal ¶
func (m *ResetMissionControlRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ResetMissionControlRequest) XXX_Merge ¶
func (m *ResetMissionControlRequest) XXX_Merge(src proto.Message)
func (*ResetMissionControlRequest) XXX_Size ¶
func (m *ResetMissionControlRequest) XXX_Size() int
func (*ResetMissionControlRequest) XXX_Unmarshal ¶
func (m *ResetMissionControlRequest) XXX_Unmarshal(b []byte) error
type ResetMissionControlResponse ¶
type ResetMissionControlResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ResetMissionControlResponse) Descriptor ¶
func (*ResetMissionControlResponse) Descriptor() ([]byte, []int)
func (*ResetMissionControlResponse) ProtoMessage ¶
func (*ResetMissionControlResponse) ProtoMessage()
func (*ResetMissionControlResponse) Reset ¶
func (m *ResetMissionControlResponse) Reset()
func (*ResetMissionControlResponse) String ¶
func (m *ResetMissionControlResponse) String() string
func (*ResetMissionControlResponse) XXX_DiscardUnknown ¶
func (m *ResetMissionControlResponse) XXX_DiscardUnknown()
func (*ResetMissionControlResponse) XXX_Marshal ¶
func (m *ResetMissionControlResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ResetMissionControlResponse) XXX_Merge ¶
func (m *ResetMissionControlResponse) XXX_Merge(src proto.Message)
func (*ResetMissionControlResponse) XXX_Size ¶
func (m *ResetMissionControlResponse) XXX_Size() int
func (*ResetMissionControlResponse) XXX_Unmarshal ¶
func (m *ResetMissionControlResponse) XXX_Unmarshal(b []byte) error
type ResolveHoldForwardAction ¶
type ResolveHoldForwardAction int32
const ( ResolveHoldForwardAction_SETTLE ResolveHoldForwardAction = 0 ResolveHoldForwardAction_FAIL ResolveHoldForwardAction = 1 ResolveHoldForwardAction_RESUME ResolveHoldForwardAction = 2 )
func (ResolveHoldForwardAction) EnumDescriptor ¶
func (ResolveHoldForwardAction) EnumDescriptor() ([]byte, []int)
func (ResolveHoldForwardAction) String ¶
func (x ResolveHoldForwardAction) String() string
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RouteFeeRequest) Descriptor ¶
func (*RouteFeeRequest) Descriptor() ([]byte, []int)
func (*RouteFeeRequest) GetAmtSat ¶
func (m *RouteFeeRequest) GetAmtSat() int64
func (*RouteFeeRequest) GetDest ¶
func (m *RouteFeeRequest) GetDest() []byte
func (*RouteFeeRequest) ProtoMessage ¶
func (*RouteFeeRequest) ProtoMessage()
func (*RouteFeeRequest) Reset ¶
func (m *RouteFeeRequest) Reset()
func (*RouteFeeRequest) String ¶
func (m *RouteFeeRequest) String() string
func (*RouteFeeRequest) XXX_DiscardUnknown ¶
func (m *RouteFeeRequest) XXX_DiscardUnknown()
func (*RouteFeeRequest) XXX_Marshal ¶
func (m *RouteFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RouteFeeRequest) XXX_Merge ¶
func (m *RouteFeeRequest) XXX_Merge(src proto.Message)
func (*RouteFeeRequest) XXX_Size ¶
func (m *RouteFeeRequest) XXX_Size() int
func (*RouteFeeRequest) XXX_Unmarshal ¶
func (m *RouteFeeRequest) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RouteFeeResponse) Descriptor ¶
func (*RouteFeeResponse) Descriptor() ([]byte, []int)
func (*RouteFeeResponse) GetRoutingFeeMsat ¶
func (m *RouteFeeResponse) GetRoutingFeeMsat() int64
func (*RouteFeeResponse) GetTimeLockDelay ¶
func (m *RouteFeeResponse) GetTimeLockDelay() int64
func (*RouteFeeResponse) ProtoMessage ¶
func (*RouteFeeResponse) ProtoMessage()
func (*RouteFeeResponse) Reset ¶
func (m *RouteFeeResponse) Reset()
func (*RouteFeeResponse) String ¶
func (m *RouteFeeResponse) String() string
func (*RouteFeeResponse) XXX_DiscardUnknown ¶
func (m *RouteFeeResponse) XXX_DiscardUnknown()
func (*RouteFeeResponse) XXX_Marshal ¶
func (m *RouteFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RouteFeeResponse) XXX_Merge ¶
func (m *RouteFeeResponse) XXX_Merge(src proto.Message)
func (*RouteFeeResponse) XXX_Size ¶
func (m *RouteFeeResponse) XXX_Size() int
func (*RouteFeeResponse) XXX_Unmarshal ¶
func (m *RouteFeeResponse) XXX_Unmarshal(b []byte) error
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) // 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, restrictions *routing.RestrictParams, destCustomRecords record.CustomSet, routeHints map[route.Vertex][]*channeldb.ChannelEdgePolicy, finalExpiry uint16) (*route.Route, 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 }
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 retuned 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) // //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, 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) // //QueryProbability returns the current success probability estimate for a //given node pair and amount. QueryProbability(ctx context.Context, in *QueryProbabilityRequest, opts ...grpc.CallOption) (*QueryProbabilityResponse, error) // //BuildRoute builds a fully specified route based on a list of hop public //keys. It retrieves the relevant channel policies from the graph in order to //calculate the correct fees and time locks. BuildRoute(ctx context.Context, in *BuildRouteRequest, opts ...grpc.CallOption) (*BuildRouteResponse, error) // //SubscribeHtlcEvents creates a uni-directional stream from the server to //the client which delivers a stream of htlc events. SubscribeHtlcEvents(ctx context.Context, in *SubscribeHtlcEventsRequest, opts ...grpc.CallOption) (Router_SubscribeHtlcEventsClient, error) // //Deprecated, 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, 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) }
RouterClient is the client API for Router service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRouterClient ¶
func NewRouterClient(cc *grpc.ClientConn) 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 // //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, 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) // //QueryProbability returns the current success probability estimate for a //given node pair and amount. QueryProbability(context.Context, *QueryProbabilityRequest) (*QueryProbabilityResponse, error) // //BuildRoute builds a fully specified route based on a list of hop public //keys. It retrieves the relevant channel policies from the graph in order to //calculate the correct fees and time locks. BuildRoute(context.Context, *BuildRouteRequest) (*BuildRouteResponse, error) // //SubscribeHtlcEvents creates a uni-directional stream from the server to //the client which delivers a stream of htlc events. SubscribeHtlcEvents(*SubscribeHtlcEventsRequest, Router_SubscribeHtlcEventsServer) error // //Deprecated, 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, 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 }
RouterServer is the server API for Router service.
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 RoutingConfig ¶
type RoutingConfig struct { // 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"` // AprioriHopProbability is the assumed success probability of a hop in // a route when no other information is available. AprioriHopProbability float64 `long:"apriorihopprob" description:"Assumed success probability of a hop in a route when no other information is available."` // AprioriWeight 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. AprioriWeight float64 `` /* 132-byte string literal not displayed */ // 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"` // 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"` }
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). OutgoingChanId uint64 `protobuf:"varint,8,opt,name=outgoing_chan_id,json=outgoingChanId,proto3" json:"outgoing_chan_id,omitempty"` // Deprecated: Do not use. // //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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SendPaymentRequest) Descriptor ¶
func (*SendPaymentRequest) Descriptor() ([]byte, []int)
func (*SendPaymentRequest) GetAllowSelfPayment ¶
func (m *SendPaymentRequest) GetAllowSelfPayment() bool
func (*SendPaymentRequest) GetAmt ¶
func (m *SendPaymentRequest) GetAmt() int64
func (*SendPaymentRequest) GetAmtMsat ¶
func (m *SendPaymentRequest) GetAmtMsat() int64
func (*SendPaymentRequest) GetCltvLimit ¶
func (m *SendPaymentRequest) GetCltvLimit() int32
func (*SendPaymentRequest) GetDest ¶
func (m *SendPaymentRequest) GetDest() []byte
func (*SendPaymentRequest) GetDestCustomRecords ¶
func (m *SendPaymentRequest) GetDestCustomRecords() map[uint64][]byte
func (*SendPaymentRequest) GetDestFeatures ¶
func (m *SendPaymentRequest) GetDestFeatures() []lnrpc.FeatureBit
func (*SendPaymentRequest) GetFeeLimitMsat ¶
func (m *SendPaymentRequest) GetFeeLimitMsat() int64
func (*SendPaymentRequest) GetFeeLimitSat ¶
func (m *SendPaymentRequest) GetFeeLimitSat() int64
func (*SendPaymentRequest) GetFinalCltvDelta ¶
func (m *SendPaymentRequest) GetFinalCltvDelta() int32
func (*SendPaymentRequest) GetLastHopPubkey ¶
func (m *SendPaymentRequest) GetLastHopPubkey() []byte
func (*SendPaymentRequest) GetMaxParts ¶
func (m *SendPaymentRequest) GetMaxParts() uint32
func (*SendPaymentRequest) GetMaxShardSizeMsat ¶
func (m *SendPaymentRequest) GetMaxShardSizeMsat() uint64
func (*SendPaymentRequest) GetNoInflightUpdates ¶
func (m *SendPaymentRequest) GetNoInflightUpdates() bool
func (*SendPaymentRequest) GetOutgoingChanId
deprecated
func (m *SendPaymentRequest) GetOutgoingChanId() uint64
Deprecated: Do not use.
func (*SendPaymentRequest) GetOutgoingChanIds ¶
func (m *SendPaymentRequest) GetOutgoingChanIds() []uint64
func (*SendPaymentRequest) GetPaymentAddr ¶
func (m *SendPaymentRequest) GetPaymentAddr() []byte
func (*SendPaymentRequest) GetPaymentHash ¶
func (m *SendPaymentRequest) GetPaymentHash() []byte
func (*SendPaymentRequest) GetPaymentRequest ¶
func (m *SendPaymentRequest) GetPaymentRequest() string
func (*SendPaymentRequest) GetRouteHints ¶
func (m *SendPaymentRequest) GetRouteHints() []*lnrpc.RouteHint
func (*SendPaymentRequest) GetTimeoutSeconds ¶
func (m *SendPaymentRequest) GetTimeoutSeconds() int32
func (*SendPaymentRequest) ProtoMessage ¶
func (*SendPaymentRequest) ProtoMessage()
func (*SendPaymentRequest) Reset ¶
func (m *SendPaymentRequest) Reset()
func (*SendPaymentRequest) String ¶
func (m *SendPaymentRequest) String() string
func (*SendPaymentRequest) XXX_DiscardUnknown ¶
func (m *SendPaymentRequest) XXX_DiscardUnknown()
func (*SendPaymentRequest) XXX_Marshal ¶
func (m *SendPaymentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SendPaymentRequest) XXX_Merge ¶
func (m *SendPaymentRequest) XXX_Merge(src proto.Message)
func (*SendPaymentRequest) XXX_Size ¶
func (m *SendPaymentRequest) XXX_Size() int
func (*SendPaymentRequest) XXX_Unmarshal ¶
func (m *SendPaymentRequest) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SendToRouteRequest) Descriptor ¶
func (*SendToRouteRequest) Descriptor() ([]byte, []int)
func (*SendToRouteRequest) GetPaymentHash ¶
func (m *SendToRouteRequest) GetPaymentHash() []byte
func (*SendToRouteRequest) GetRoute ¶
func (m *SendToRouteRequest) GetRoute() *lnrpc.Route
func (*SendToRouteRequest) ProtoMessage ¶
func (*SendToRouteRequest) ProtoMessage()
func (*SendToRouteRequest) Reset ¶
func (m *SendToRouteRequest) Reset()
func (*SendToRouteRequest) String ¶
func (m *SendToRouteRequest) String() string
func (*SendToRouteRequest) XXX_DiscardUnknown ¶
func (m *SendToRouteRequest) XXX_DiscardUnknown()
func (*SendToRouteRequest) XXX_Marshal ¶
func (m *SendToRouteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SendToRouteRequest) XXX_Merge ¶
func (m *SendToRouteRequest) XXX_Merge(src proto.Message)
func (*SendToRouteRequest) XXX_Size ¶
func (m *SendToRouteRequest) XXX_Size() int
func (*SendToRouteRequest) XXX_Unmarshal ¶
func (m *SendToRouteRequest) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SendToRouteResponse) Descriptor ¶
func (*SendToRouteResponse) Descriptor() ([]byte, []int)
func (*SendToRouteResponse) GetFailure ¶
func (m *SendToRouteResponse) GetFailure() *lnrpc.Failure
func (*SendToRouteResponse) GetPreimage ¶
func (m *SendToRouteResponse) GetPreimage() []byte
func (*SendToRouteResponse) ProtoMessage ¶
func (*SendToRouteResponse) ProtoMessage()
func (*SendToRouteResponse) Reset ¶
func (m *SendToRouteResponse) Reset()
func (*SendToRouteResponse) String ¶
func (m *SendToRouteResponse) String() string
func (*SendToRouteResponse) XXX_DiscardUnknown ¶
func (m *SendToRouteResponse) XXX_DiscardUnknown()
func (*SendToRouteResponse) XXX_Marshal ¶
func (m *SendToRouteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SendToRouteResponse) XXX_Merge ¶
func (m *SendToRouteResponse) XXX_Merge(src proto.Message)
func (*SendToRouteResponse) XXX_Size ¶
func (m *SendToRouteResponse) XXX_Size() int
func (*SendToRouteResponse) XXX_Unmarshal ¶
func (m *SendToRouteResponse) XXX_Unmarshal(b []byte) error
type Server ¶
type Server struct {
// 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) 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. Regsitered 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) RegisterWithRestServer ¶
func (s *Server) 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.SubServer interface.
func (*Server) RegisterWithRootServer ¶
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.SubServer interface.
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) 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.
type SettleEvent ¶
type SettleEvent struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SettleEvent) Descriptor ¶
func (*SettleEvent) Descriptor() ([]byte, []int)
func (*SettleEvent) ProtoMessage ¶
func (*SettleEvent) ProtoMessage()
func (*SettleEvent) Reset ¶
func (m *SettleEvent) Reset()
func (*SettleEvent) String ¶
func (m *SettleEvent) String() string
func (*SettleEvent) XXX_DiscardUnknown ¶
func (m *SettleEvent) XXX_DiscardUnknown()
func (*SettleEvent) XXX_Marshal ¶
func (m *SettleEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SettleEvent) XXX_Merge ¶
func (m *SettleEvent) XXX_Merge(src proto.Message)
func (*SettleEvent) XXX_Size ¶
func (m *SettleEvent) XXX_Size() int
func (*SettleEvent) XXX_Unmarshal ¶
func (m *SettleEvent) XXX_Unmarshal(b []byte) error
type SubscribeHtlcEventsRequest ¶
type SubscribeHtlcEventsRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SubscribeHtlcEventsRequest) Descriptor ¶
func (*SubscribeHtlcEventsRequest) Descriptor() ([]byte, []int)
func (*SubscribeHtlcEventsRequest) ProtoMessage ¶
func (*SubscribeHtlcEventsRequest) ProtoMessage()
func (*SubscribeHtlcEventsRequest) Reset ¶
func (m *SubscribeHtlcEventsRequest) Reset()
func (*SubscribeHtlcEventsRequest) String ¶
func (m *SubscribeHtlcEventsRequest) String() string
func (*SubscribeHtlcEventsRequest) XXX_DiscardUnknown ¶
func (m *SubscribeHtlcEventsRequest) XXX_DiscardUnknown()
func (*SubscribeHtlcEventsRequest) XXX_Marshal ¶
func (m *SubscribeHtlcEventsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SubscribeHtlcEventsRequest) XXX_Merge ¶
func (m *SubscribeHtlcEventsRequest) XXX_Merge(src proto.Message)
func (*SubscribeHtlcEventsRequest) XXX_Size ¶
func (m *SubscribeHtlcEventsRequest) XXX_Size() int
func (*SubscribeHtlcEventsRequest) XXX_Unmarshal ¶
func (m *SubscribeHtlcEventsRequest) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TrackPaymentRequest) Descriptor ¶
func (*TrackPaymentRequest) Descriptor() ([]byte, []int)
func (*TrackPaymentRequest) GetNoInflightUpdates ¶
func (m *TrackPaymentRequest) GetNoInflightUpdates() bool
func (*TrackPaymentRequest) GetPaymentHash ¶
func (m *TrackPaymentRequest) GetPaymentHash() []byte
func (*TrackPaymentRequest) ProtoMessage ¶
func (*TrackPaymentRequest) ProtoMessage()
func (*TrackPaymentRequest) Reset ¶
func (m *TrackPaymentRequest) Reset()
func (*TrackPaymentRequest) String ¶
func (m *TrackPaymentRequest) String() string
func (*TrackPaymentRequest) XXX_DiscardUnknown ¶
func (m *TrackPaymentRequest) XXX_DiscardUnknown()
func (*TrackPaymentRequest) XXX_Marshal ¶
func (m *TrackPaymentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TrackPaymentRequest) XXX_Merge ¶
func (m *TrackPaymentRequest) XXX_Merge(src proto.Message)
func (*TrackPaymentRequest) XXX_Size ¶
func (m *TrackPaymentRequest) XXX_Size() int
func (*TrackPaymentRequest) XXX_Unmarshal ¶
func (m *TrackPaymentRequest) XXX_Unmarshal(b []byte) error
type UnimplementedRouterServer ¶
type UnimplementedRouterServer struct { }
UnimplementedRouterServer can be embedded to have forward compatible implementations.
func (*UnimplementedRouterServer) BuildRoute ¶
func (*UnimplementedRouterServer) BuildRoute(ctx context.Context, req *BuildRouteRequest) (*BuildRouteResponse, error)
func (*UnimplementedRouterServer) EstimateRouteFee ¶
func (*UnimplementedRouterServer) EstimateRouteFee(ctx context.Context, req *RouteFeeRequest) (*RouteFeeResponse, error)
func (*UnimplementedRouterServer) HtlcInterceptor ¶
func (*UnimplementedRouterServer) HtlcInterceptor(srv Router_HtlcInterceptorServer) error
func (*UnimplementedRouterServer) QueryMissionControl ¶
func (*UnimplementedRouterServer) QueryMissionControl(ctx context.Context, req *QueryMissionControlRequest) (*QueryMissionControlResponse, error)
func (*UnimplementedRouterServer) QueryProbability ¶
func (*UnimplementedRouterServer) QueryProbability(ctx context.Context, req *QueryProbabilityRequest) (*QueryProbabilityResponse, error)
func (*UnimplementedRouterServer) ResetMissionControl ¶
func (*UnimplementedRouterServer) ResetMissionControl(ctx context.Context, req *ResetMissionControlRequest) (*ResetMissionControlResponse, error)
func (*UnimplementedRouterServer) SendPayment ¶
func (*UnimplementedRouterServer) SendPayment(req *SendPaymentRequest, srv Router_SendPaymentServer) error
func (*UnimplementedRouterServer) SendPaymentV2 ¶
func (*UnimplementedRouterServer) SendPaymentV2(req *SendPaymentRequest, srv Router_SendPaymentV2Server) error
func (*UnimplementedRouterServer) SendToRoute ¶
func (*UnimplementedRouterServer) SendToRoute(ctx context.Context, req *SendToRouteRequest) (*SendToRouteResponse, error)
func (*UnimplementedRouterServer) SendToRouteV2 ¶
func (*UnimplementedRouterServer) SendToRouteV2(ctx context.Context, req *SendToRouteRequest) (*lnrpc.HTLCAttempt, error)
func (*UnimplementedRouterServer) SubscribeHtlcEvents ¶
func (*UnimplementedRouterServer) SubscribeHtlcEvents(req *SubscribeHtlcEventsRequest, srv Router_SubscribeHtlcEventsServer) error
func (*UnimplementedRouterServer) TrackPayment ¶
func (*UnimplementedRouterServer) TrackPayment(req *TrackPaymentRequest, srv Router_TrackPaymentServer) error
func (*UnimplementedRouterServer) TrackPaymentV2 ¶
func (*UnimplementedRouterServer) TrackPaymentV2(req *TrackPaymentRequest, srv Router_TrackPaymentV2Server) error