routerrpc

package
v0.14.2-beta.rc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2022 License: MIT Imports: 45 Imported by: 0

Documentation

Overview

Package routerrpc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// DefaultMaxParts is the default number of splits we'll possibly use
	// for MPP when the user is attempting to send a payment.
	//
	// TODO(roasbeef): make this value dynamic based on expected number of
	// attempts for given amount
	DefaultMaxParts = 16
)
View Source
const Subsystem = "RRPC"

Subsystem defines the logging code for this subsystem.

Variables

View Source
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")
)
View Source
var (
	FailureDetail_name = map[int32]string{
		0:  "UNKNOWN",
		1:  "NO_DETAIL",
		2:  "ONION_DECODE",
		3:  "LINK_NOT_ELIGIBLE",
		4:  "ON_CHAIN_TIMEOUT",
		5:  "HTLC_EXCEEDS_MAX",
		6:  "INSUFFICIENT_BALANCE",
		7:  "INCOMPLETE_FORWARD",
		8:  "HTLC_ADD_FAILED",
		9:  "FORWARDS_DISABLED",
		10: "INVOICE_CANCELED",
		11: "INVOICE_UNDERPAID",
		12: "INVOICE_EXPIRY_TOO_SOON",
		13: "INVOICE_NOT_OPEN",
		14: "MPP_INVOICE_TIMEOUT",
		15: "ADDRESS_MISMATCH",
		16: "SET_TOTAL_MISMATCH",
		17: "SET_TOTAL_TOO_LOW",
		18: "SET_OVERPAID",
		19: "UNKNOWN_INVOICE",
		20: "INVALID_KEYSEND",
		21: "MPP_IN_PROGRESS",
		22: "CIRCULAR_ROUTE",
	}
	FailureDetail_value = map[string]int32{
		"UNKNOWN":                 0,
		"NO_DETAIL":               1,
		"ONION_DECODE":            2,
		"LINK_NOT_ELIGIBLE":       3,
		"ON_CHAIN_TIMEOUT":        4,
		"HTLC_EXCEEDS_MAX":        5,
		"INSUFFICIENT_BALANCE":    6,
		"INCOMPLETE_FORWARD":      7,
		"HTLC_ADD_FAILED":         8,
		"FORWARDS_DISABLED":       9,
		"INVOICE_CANCELED":        10,
		"INVOICE_UNDERPAID":       11,
		"INVOICE_EXPIRY_TOO_SOON": 12,
		"INVOICE_NOT_OPEN":        13,
		"MPP_INVOICE_TIMEOUT":     14,
		"ADDRESS_MISMATCH":        15,
		"SET_TOTAL_MISMATCH":      16,
		"SET_TOTAL_TOO_LOW":       17,
		"SET_OVERPAID":            18,
		"UNKNOWN_INVOICE":         19,
		"INVALID_KEYSEND":         20,
		"MPP_IN_PROGRESS":         21,
		"CIRCULAR_ROUTE":          22,
	}
)

Enum value maps for FailureDetail.

View Source
var (
	PaymentState_name = map[int32]string{
		0: "IN_FLIGHT",
		1: "SUCCEEDED",
		2: "FAILED_TIMEOUT",
		3: "FAILED_NO_ROUTE",
		4: "FAILED_ERROR",
		5: "FAILED_INCORRECT_PAYMENT_DETAILS",
		6: "FAILED_INSUFFICIENT_BALANCE",
	}
	PaymentState_value = map[string]int32{
		"IN_FLIGHT":                        0,
		"SUCCEEDED":                        1,
		"FAILED_TIMEOUT":                   2,
		"FAILED_NO_ROUTE":                  3,
		"FAILED_ERROR":                     4,
		"FAILED_INCORRECT_PAYMENT_DETAILS": 5,
		"FAILED_INSUFFICIENT_BALANCE":      6,
	}
)

Enum value maps for PaymentState.

View Source
var (
	ResolveHoldForwardAction_name = map[int32]string{
		0: "SETTLE",
		1: "FAIL",
		2: "RESUME",
	}
	ResolveHoldForwardAction_value = map[string]int32{
		"SETTLE": 0,
		"FAIL":   1,
		"RESUME": 2,
	}
)

Enum value maps for ResolveHoldForwardAction.

View Source
var (
	ChanStatusAction_name = map[int32]string{
		0: "ENABLE",
		1: "DISABLE",
		2: "AUTO",
	}
	ChanStatusAction_value = map[string]int32{
		"ENABLE":  0,
		"DISABLE": 1,
		"AUTO":    2,
	}
)

Enum value maps for ChanStatusAction.

View Source
var (
	HtlcEvent_EventType_name = map[int32]string{
		0: "UNKNOWN",
		1: "SEND",
		2: "RECEIVE",
		3: "FORWARD",
	}
	HtlcEvent_EventType_value = map[string]int32{
		"UNKNOWN": 0,
		"SEND":    1,
		"RECEIVE": 2,
		"FORWARD": 3,
	}
)

Enum value maps for HtlcEvent_EventType.

View Source
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"
)
View Source
var File_routerrpc_router_proto protoreflect.FileDescriptor
View Source
var Router_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "routerrpc.Router",
	HandlerType: (*RouterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "EstimateRouteFee",
			Handler:    _Router_EstimateRouteFee_Handler,
		},
		{
			MethodName: "SendToRoute",
			Handler:    _Router_SendToRoute_Handler,
		},
		{
			MethodName: "SendToRouteV2",
			Handler:    _Router_SendToRouteV2_Handler,
		},
		{
			MethodName: "ResetMissionControl",
			Handler:    _Router_ResetMissionControl_Handler,
		},
		{
			MethodName: "QueryMissionControl",
			Handler:    _Router_QueryMissionControl_Handler,
		},
		{
			MethodName: "XImportMissionControl",
			Handler:    _Router_XImportMissionControl_Handler,
		},
		{
			MethodName: "GetMissionControlConfig",
			Handler:    _Router_GetMissionControlConfig_Handler,
		},
		{
			MethodName: "SetMissionControlConfig",
			Handler:    _Router_SetMissionControlConfig_Handler,
		},
		{
			MethodName: "QueryProbability",
			Handler:    _Router_QueryProbability_Handler,
		},
		{
			MethodName: "BuildRoute",
			Handler:    _Router_BuildRoute_Handler,
		},
		{
			MethodName: "UpdateChanStatus",
			Handler:    _Router_UpdateChanStatus_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SendPaymentV2",
			Handler:       _Router_SendPaymentV2_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "TrackPaymentV2",
			Handler:       _Router_TrackPaymentV2_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "SubscribeHtlcEvents",
			Handler:       _Router_SubscribeHtlcEvents_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "SendPayment",
			Handler:       _Router_SendPayment_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "TrackPayment",
			Handler:       _Router_TrackPayment_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "HtlcInterceptor",
			Handler:       _Router_HtlcInterceptor_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "routerrpc/router.proto",
}

Router_ServiceDesc is the grpc.ServiceDesc for Router service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.

func MarshalTimeNano

func MarshalTimeNano(t time.Time) int64

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

func RegisterRouterHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterRouterHandler registers the http handlers for service Router to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterRouterHandlerClient

func RegisterRouterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RouterClient) error

RegisterRouterHandlerClient registers the http handlers for service Router to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RouterClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RouterClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "RouterClient" to call the correct interceptors.

func RegisterRouterHandlerFromEndpoint

func RegisterRouterHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterRouterHandlerFromEndpoint is same as RegisterRouterHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterRouterHandlerServer

func RegisterRouterHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RouterServer) error

RegisterRouterHandlerServer registers the http handlers for service Router to "mux". UnaryRPC :call RouterServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRouterHandlerFromEndpoint instead.

func RegisterRouterServer

func RegisterRouterServer(s grpc.ServiceRegistrar, srv RouterServer)

func UnmarshalAMP

func UnmarshalAMP(reqAMP *lnrpc.AMPRecord) (*record.AMP, error)

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

func UnmarshalMPP(reqMPP *lnrpc.MPPRecord) (*record.MPP, error)

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

func UnmarshallHopWithPubkey(rpcHop *lnrpc.Hop, pubkey route.Vertex) (*route.Hop,
	error)

UnmarshallHopWithPubkey unmarshalls an rpc hop for which the pubkey has already been extracted.

func UseLogger

func UseLogger(logger btclog.Logger)

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

func ValidateCLTVLimit(val, max uint32) (uint32, error)

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

func ValidatePayReqExpiry(payReq *zpay32.Invoice) error

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"`
	// contains filtered or unexported fields
}

func (*BuildRouteRequest) Descriptor deprecated

func (*BuildRouteRequest) Descriptor() ([]byte, []int)

Deprecated: Use BuildRouteRequest.ProtoReflect.Descriptor instead.

func (*BuildRouteRequest) GetAmtMsat

func (x *BuildRouteRequest) GetAmtMsat() int64

func (*BuildRouteRequest) GetFinalCltvDelta

func (x *BuildRouteRequest) GetFinalCltvDelta() int32

func (*BuildRouteRequest) GetHopPubkeys

func (x *BuildRouteRequest) GetHopPubkeys() [][]byte

func (*BuildRouteRequest) GetOutgoingChanId

func (x *BuildRouteRequest) GetOutgoingChanId() uint64

func (*BuildRouteRequest) GetPaymentAddr

func (x *BuildRouteRequest) GetPaymentAddr() []byte

func (*BuildRouteRequest) ProtoMessage

func (*BuildRouteRequest) ProtoMessage()

func (*BuildRouteRequest) ProtoReflect

func (x *BuildRouteRequest) ProtoReflect() protoreflect.Message

func (*BuildRouteRequest) Reset

func (x *BuildRouteRequest) Reset()

func (*BuildRouteRequest) String

func (x *BuildRouteRequest) String() string

type BuildRouteResponse

type BuildRouteResponse struct {

	//
	//Fully specified route that can be used to execute the payment.
	Route *lnrpc.Route `protobuf:"bytes,1,opt,name=route,proto3" json:"route,omitempty"`
	// contains filtered or unexported fields
}

func (*BuildRouteResponse) Descriptor deprecated

func (*BuildRouteResponse) Descriptor() ([]byte, []int)

Deprecated: Use BuildRouteResponse.ProtoReflect.Descriptor instead.

func (*BuildRouteResponse) GetRoute

func (x *BuildRouteResponse) GetRoute() *lnrpc.Route

func (*BuildRouteResponse) ProtoMessage

func (*BuildRouteResponse) ProtoMessage()

func (*BuildRouteResponse) ProtoReflect

func (x *BuildRouteResponse) ProtoReflect() protoreflect.Message

func (*BuildRouteResponse) Reset

func (x *BuildRouteResponse) Reset()

func (*BuildRouteResponse) String

func (x *BuildRouteResponse) String() string

type ChanStatusAction

type ChanStatusAction int32
const (
	ChanStatusAction_ENABLE  ChanStatusAction = 0
	ChanStatusAction_DISABLE ChanStatusAction = 1
	ChanStatusAction_AUTO    ChanStatusAction = 2
)

func (ChanStatusAction) Descriptor

func (ChanStatusAction) Enum

func (ChanStatusAction) EnumDescriptor deprecated

func (ChanStatusAction) EnumDescriptor() ([]byte, []int)

Deprecated: Use ChanStatusAction.Descriptor instead.

func (ChanStatusAction) Number

func (ChanStatusAction) String

func (x ChanStatusAction) String() string

func (ChanStatusAction) Type

type CircuitKey

type CircuitKey struct {

	/// The id of the channel that the is part of this circuit.
	ChanId uint64 `protobuf:"varint,1,opt,name=chan_id,json=chanId,proto3" json:"chan_id,omitempty"`
	/// The index of the incoming htlc in the incoming channel.
	HtlcId uint64 `protobuf:"varint,2,opt,name=htlc_id,json=htlcId,proto3" json:"htlc_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CircuitKey) Descriptor deprecated

func (*CircuitKey) Descriptor() ([]byte, []int)

Deprecated: Use CircuitKey.ProtoReflect.Descriptor instead.

func (*CircuitKey) GetChanId

func (x *CircuitKey) GetChanId() uint64

func (*CircuitKey) GetHtlcId

func (x *CircuitKey) GetHtlcId() uint64

func (*CircuitKey) ProtoMessage

func (*CircuitKey) ProtoMessage()

func (*CircuitKey) ProtoReflect

func (x *CircuitKey) ProtoReflect() protoreflect.Message

func (*CircuitKey) Reset

func (x *CircuitKey) Reset()

func (*CircuitKey) String

func (x *CircuitKey) String() string

type Config

type Config struct {
	RoutingConfig

	// RouterMacPath is the path for the router macaroon. If unspecified
	// then we assume that the macaroon will be found under the network
	// directory, named DefaultRouterMacFilename.
	RouterMacPath string `long:"routermacaroonpath" description:"Path to the router macaroon"`

	// NetworkDir is the main network directory wherein the router rpc
	// server will find the macaroon named DefaultRouterMacFilename.
	NetworkDir string

	// MacService is the main macaroon service that we'll use to handle
	// authentication for the Router rpc server.
	MacService *macaroons.Service

	// Router is the main channel router instance that backs this RPC
	// server.
	//
	// TODO(roasbeef): make into pkg lvl interface?
	//
	// TODO(roasbeef): assumes router handles saving payment state
	Router *routing.ChannelRouter

	// RouterBackend contains shared logic between this sub server and the
	// main rpc server.
	RouterBackend *RouterBackend
}

Config is the main configuration file for the router RPC server. It contains all the items required for the router RPC server to carry out its duties. The fields with struct tags are meant to be parsed as normal configuration options, while if able to be populated, the latter fields MUST also be specified.

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig defines the config defaults.

type FailureDetail

type FailureDetail int32
const (
	FailureDetail_UNKNOWN                 FailureDetail = 0
	FailureDetail_NO_DETAIL               FailureDetail = 1
	FailureDetail_ONION_DECODE            FailureDetail = 2
	FailureDetail_LINK_NOT_ELIGIBLE       FailureDetail = 3
	FailureDetail_ON_CHAIN_TIMEOUT        FailureDetail = 4
	FailureDetail_HTLC_EXCEEDS_MAX        FailureDetail = 5
	FailureDetail_INSUFFICIENT_BALANCE    FailureDetail = 6
	FailureDetail_INCOMPLETE_FORWARD      FailureDetail = 7
	FailureDetail_HTLC_ADD_FAILED         FailureDetail = 8
	FailureDetail_FORWARDS_DISABLED       FailureDetail = 9
	FailureDetail_INVOICE_CANCELED        FailureDetail = 10
	FailureDetail_INVOICE_UNDERPAID       FailureDetail = 11
	FailureDetail_INVOICE_EXPIRY_TOO_SOON FailureDetail = 12
	FailureDetail_INVOICE_NOT_OPEN        FailureDetail = 13
	FailureDetail_MPP_INVOICE_TIMEOUT     FailureDetail = 14
	FailureDetail_ADDRESS_MISMATCH        FailureDetail = 15
	FailureDetail_SET_TOTAL_MISMATCH      FailureDetail = 16
	FailureDetail_SET_TOTAL_TOO_LOW       FailureDetail = 17
	FailureDetail_SET_OVERPAID            FailureDetail = 18
	FailureDetail_UNKNOWN_INVOICE         FailureDetail = 19
	FailureDetail_INVALID_KEYSEND         FailureDetail = 20
	FailureDetail_MPP_IN_PROGRESS         FailureDetail = 21
	FailureDetail_CIRCULAR_ROUTE          FailureDetail = 22
)

func (FailureDetail) Descriptor

func (FailureDetail) Enum

func (x FailureDetail) Enum() *FailureDetail

func (FailureDetail) EnumDescriptor deprecated

func (FailureDetail) EnumDescriptor() ([]byte, []int)

Deprecated: Use FailureDetail.Descriptor instead.

func (FailureDetail) Number

func (FailureDetail) String

func (x FailureDetail) String() string

func (FailureDetail) Type

type ForwardEvent

type ForwardEvent struct {

	// Info contains details about the htlc that was forwarded.
	Info *HtlcInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	// contains filtered or unexported fields
}

func (*ForwardEvent) Descriptor deprecated

func (*ForwardEvent) Descriptor() ([]byte, []int)

Deprecated: Use ForwardEvent.ProtoReflect.Descriptor instead.

func (*ForwardEvent) GetInfo

func (x *ForwardEvent) GetInfo() *HtlcInfo

func (*ForwardEvent) ProtoMessage

func (*ForwardEvent) ProtoMessage()

func (*ForwardEvent) ProtoReflect

func (x *ForwardEvent) ProtoReflect() protoreflect.Message

func (*ForwardEvent) Reset

func (x *ForwardEvent) Reset()

func (*ForwardEvent) String

func (x *ForwardEvent) String() string

type ForwardFailEvent

type ForwardFailEvent struct {
	// contains filtered or unexported fields
}

func (*ForwardFailEvent) Descriptor deprecated

func (*ForwardFailEvent) Descriptor() ([]byte, []int)

Deprecated: Use ForwardFailEvent.ProtoReflect.Descriptor instead.

func (*ForwardFailEvent) ProtoMessage

func (*ForwardFailEvent) ProtoMessage()

func (*ForwardFailEvent) ProtoReflect

func (x *ForwardFailEvent) ProtoReflect() protoreflect.Message

func (*ForwardFailEvent) Reset

func (x *ForwardFailEvent) Reset()

func (*ForwardFailEvent) String

func (x *ForwardFailEvent) String() string

type ForwardHtlcInterceptRequest

type ForwardHtlcInterceptRequest struct {

	//
	//The key of this forwarded htlc. It defines the incoming channel id and
	//the index in this channel.
	IncomingCircuitKey *CircuitKey `protobuf:"bytes,1,opt,name=incoming_circuit_key,json=incomingCircuitKey,proto3" json:"incoming_circuit_key,omitempty"`
	// The incoming htlc amount.
	IncomingAmountMsat uint64 `protobuf:"varint,5,opt,name=incoming_amount_msat,json=incomingAmountMsat,proto3" json:"incoming_amount_msat,omitempty"`
	// The incoming htlc expiry.
	IncomingExpiry uint32 `protobuf:"varint,6,opt,name=incoming_expiry,json=incomingExpiry,proto3" json:"incoming_expiry,omitempty"`
	//
	//The htlc payment hash. This value is not guaranteed to be unique per
	//request.
	PaymentHash []byte `protobuf:"bytes,2,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
	// The requested outgoing channel id for this forwarded htlc. Because of
	// non-strict forwarding, this isn't necessarily the channel over which the
	// packet will be forwarded eventually. A different channel to the same peer
	// may be selected as well.
	OutgoingRequestedChanId uint64 `` /* 135-byte string literal not displayed */
	// The outgoing htlc amount.
	OutgoingAmountMsat uint64 `protobuf:"varint,3,opt,name=outgoing_amount_msat,json=outgoingAmountMsat,proto3" json:"outgoing_amount_msat,omitempty"`
	// The outgoing htlc expiry.
	OutgoingExpiry uint32 `protobuf:"varint,4,opt,name=outgoing_expiry,json=outgoingExpiry,proto3" json:"outgoing_expiry,omitempty"`
	// Any custom records that were present in the payload.
	CustomRecords map[uint64][]byte `` /* 189-byte string literal not displayed */
	// The onion blob for the next hop
	OnionBlob []byte `protobuf:"bytes,9,opt,name=onion_blob,json=onionBlob,proto3" json:"onion_blob,omitempty"`
	// contains filtered or unexported fields
}

func (*ForwardHtlcInterceptRequest) Descriptor deprecated

func (*ForwardHtlcInterceptRequest) Descriptor() ([]byte, []int)

Deprecated: Use ForwardHtlcInterceptRequest.ProtoReflect.Descriptor instead.

func (*ForwardHtlcInterceptRequest) GetCustomRecords

func (x *ForwardHtlcInterceptRequest) GetCustomRecords() map[uint64][]byte

func (*ForwardHtlcInterceptRequest) GetIncomingAmountMsat

func (x *ForwardHtlcInterceptRequest) GetIncomingAmountMsat() uint64

func (*ForwardHtlcInterceptRequest) GetIncomingCircuitKey

func (x *ForwardHtlcInterceptRequest) GetIncomingCircuitKey() *CircuitKey

func (*ForwardHtlcInterceptRequest) GetIncomingExpiry

func (x *ForwardHtlcInterceptRequest) GetIncomingExpiry() uint32

func (*ForwardHtlcInterceptRequest) GetOnionBlob

func (x *ForwardHtlcInterceptRequest) GetOnionBlob() []byte

func (*ForwardHtlcInterceptRequest) GetOutgoingAmountMsat

func (x *ForwardHtlcInterceptRequest) GetOutgoingAmountMsat() uint64

func (*ForwardHtlcInterceptRequest) GetOutgoingExpiry

func (x *ForwardHtlcInterceptRequest) GetOutgoingExpiry() uint32

func (*ForwardHtlcInterceptRequest) GetOutgoingRequestedChanId

func (x *ForwardHtlcInterceptRequest) GetOutgoingRequestedChanId() uint64

func (*ForwardHtlcInterceptRequest) GetPaymentHash

func (x *ForwardHtlcInterceptRequest) GetPaymentHash() []byte

func (*ForwardHtlcInterceptRequest) ProtoMessage

func (*ForwardHtlcInterceptRequest) ProtoMessage()

func (*ForwardHtlcInterceptRequest) ProtoReflect

func (*ForwardHtlcInterceptRequest) Reset

func (x *ForwardHtlcInterceptRequest) Reset()

func (*ForwardHtlcInterceptRequest) String

func (x *ForwardHtlcInterceptRequest) String() string

type ForwardHtlcInterceptResponse

type ForwardHtlcInterceptResponse struct {

	//*
	//The key of this forwarded htlc. It defines the incoming channel id and
	//the index in this channel.
	IncomingCircuitKey *CircuitKey `protobuf:"bytes,1,opt,name=incoming_circuit_key,json=incomingCircuitKey,proto3" json:"incoming_circuit_key,omitempty"`
	// The resolve action for this intercepted htlc.
	Action ResolveHoldForwardAction `protobuf:"varint,2,opt,name=action,proto3,enum=routerrpc.ResolveHoldForwardAction" json:"action,omitempty"`
	// The preimage in case the resolve action is Settle.
	Preimage []byte `protobuf:"bytes,3,opt,name=preimage,proto3" json:"preimage,omitempty"`
	// contains filtered or unexported fields
}

* ForwardHtlcInterceptResponse enables the caller to resolve a previously hold forward. The caller can choose either to: - `Resume`: Execute the default behavior (usually forward). - `Reject`: Fail the htlc backwards. - `Settle`: Settle this htlc with a given preimage.

func (*ForwardHtlcInterceptResponse) Descriptor deprecated

func (*ForwardHtlcInterceptResponse) Descriptor() ([]byte, []int)

Deprecated: Use ForwardHtlcInterceptResponse.ProtoReflect.Descriptor instead.

func (*ForwardHtlcInterceptResponse) GetAction

func (*ForwardHtlcInterceptResponse) GetIncomingCircuitKey

func (x *ForwardHtlcInterceptResponse) GetIncomingCircuitKey() *CircuitKey

func (*ForwardHtlcInterceptResponse) GetPreimage

func (x *ForwardHtlcInterceptResponse) GetPreimage() []byte

func (*ForwardHtlcInterceptResponse) ProtoMessage

func (*ForwardHtlcInterceptResponse) ProtoMessage()

func (*ForwardHtlcInterceptResponse) ProtoReflect

func (*ForwardHtlcInterceptResponse) Reset

func (x *ForwardHtlcInterceptResponse) Reset()

func (*ForwardHtlcInterceptResponse) String

type GetMissionControlConfigRequest

type GetMissionControlConfigRequest struct {
	// contains filtered or unexported fields
}

func (*GetMissionControlConfigRequest) Descriptor deprecated

func (*GetMissionControlConfigRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetMissionControlConfigRequest.ProtoReflect.Descriptor instead.

func (*GetMissionControlConfigRequest) ProtoMessage

func (*GetMissionControlConfigRequest) ProtoMessage()

func (*GetMissionControlConfigRequest) ProtoReflect

func (*GetMissionControlConfigRequest) Reset

func (x *GetMissionControlConfigRequest) Reset()

func (*GetMissionControlConfigRequest) String

type GetMissionControlConfigResponse

type GetMissionControlConfigResponse struct {

	//
	//Mission control's currently active config.
	Config *MissionControlConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

func (*GetMissionControlConfigResponse) Descriptor deprecated

func (*GetMissionControlConfigResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetMissionControlConfigResponse.ProtoReflect.Descriptor instead.

func (*GetMissionControlConfigResponse) GetConfig

func (*GetMissionControlConfigResponse) ProtoMessage

func (*GetMissionControlConfigResponse) ProtoMessage()

func (*GetMissionControlConfigResponse) ProtoReflect

func (*GetMissionControlConfigResponse) Reset

func (*GetMissionControlConfigResponse) String

type HtlcEvent

type HtlcEvent struct {

	//
	//The short channel id that the incoming htlc arrived at our node on. This
	//value is zero for sends.
	IncomingChannelId uint64 `protobuf:"varint,1,opt,name=incoming_channel_id,json=incomingChannelId,proto3" json:"incoming_channel_id,omitempty"`
	//
	//The short channel id that the outgoing htlc left our node on. This value
	//is zero for receives.
	OutgoingChannelId uint64 `protobuf:"varint,2,opt,name=outgoing_channel_id,json=outgoingChannelId,proto3" json:"outgoing_channel_id,omitempty"`
	//
	//Incoming id is the index of the incoming htlc in the incoming channel.
	//This value is zero for sends.
	IncomingHtlcId uint64 `protobuf:"varint,3,opt,name=incoming_htlc_id,json=incomingHtlcId,proto3" json:"incoming_htlc_id,omitempty"`
	//
	//Outgoing id is the index of the outgoing htlc in the outgoing channel.
	//This value is zero for receives.
	OutgoingHtlcId uint64 `protobuf:"varint,4,opt,name=outgoing_htlc_id,json=outgoingHtlcId,proto3" json:"outgoing_htlc_id,omitempty"`
	//
	//The time in unix nanoseconds that the event occurred.
	TimestampNs uint64 `protobuf:"varint,5,opt,name=timestamp_ns,json=timestampNs,proto3" json:"timestamp_ns,omitempty"`
	//
	//The event type indicates whether the htlc was part of a send, receive or
	//forward.
	EventType HtlcEvent_EventType `protobuf:"varint,6,opt,name=event_type,json=eventType,proto3,enum=routerrpc.HtlcEvent_EventType" json:"event_type,omitempty"`
	// Types that are assignable to Event:
	//	*HtlcEvent_ForwardEvent
	//	*HtlcEvent_ForwardFailEvent
	//	*HtlcEvent_SettleEvent
	//	*HtlcEvent_LinkFailEvent
	Event isHtlcEvent_Event `protobuf_oneof:"event"`
	// contains filtered or unexported fields
}

HtlcEvent contains the htlc event that was processed. These are served on a best-effort basis; events are not persisted, delivery is not guaranteed (in the event of a crash in the switch, forward events may be lost) and some events may be replayed upon restart. Events consumed from this package should be de-duplicated by the htlc's unique combination of incoming and outgoing channel id and htlc id. [EXPERIMENTAL]

func (*HtlcEvent) Descriptor deprecated

func (*HtlcEvent) Descriptor() ([]byte, []int)

Deprecated: Use HtlcEvent.ProtoReflect.Descriptor instead.

func (*HtlcEvent) GetEvent

func (m *HtlcEvent) GetEvent() isHtlcEvent_Event

func (*HtlcEvent) GetEventType

func (x *HtlcEvent) GetEventType() HtlcEvent_EventType

func (*HtlcEvent) GetForwardEvent

func (x *HtlcEvent) GetForwardEvent() *ForwardEvent

func (*HtlcEvent) GetForwardFailEvent

func (x *HtlcEvent) GetForwardFailEvent() *ForwardFailEvent

func (*HtlcEvent) GetIncomingChannelId

func (x *HtlcEvent) GetIncomingChannelId() uint64

func (*HtlcEvent) GetIncomingHtlcId

func (x *HtlcEvent) GetIncomingHtlcId() uint64

func (*HtlcEvent) GetLinkFailEvent

func (x *HtlcEvent) GetLinkFailEvent() *LinkFailEvent

func (*HtlcEvent) GetOutgoingChannelId

func (x *HtlcEvent) GetOutgoingChannelId() uint64

func (*HtlcEvent) GetOutgoingHtlcId

func (x *HtlcEvent) GetOutgoingHtlcId() uint64

func (*HtlcEvent) GetSettleEvent

func (x *HtlcEvent) GetSettleEvent() *SettleEvent

func (*HtlcEvent) GetTimestampNs

func (x *HtlcEvent) GetTimestampNs() uint64

func (*HtlcEvent) ProtoMessage

func (*HtlcEvent) ProtoMessage()

func (*HtlcEvent) ProtoReflect

func (x *HtlcEvent) ProtoReflect() protoreflect.Message

func (*HtlcEvent) Reset

func (x *HtlcEvent) Reset()

func (*HtlcEvent) String

func (x *HtlcEvent) String() string

type HtlcEvent_EventType

type HtlcEvent_EventType int32
const (
	HtlcEvent_UNKNOWN HtlcEvent_EventType = 0
	HtlcEvent_SEND    HtlcEvent_EventType = 1
	HtlcEvent_RECEIVE HtlcEvent_EventType = 2
	HtlcEvent_FORWARD HtlcEvent_EventType = 3
)

func (HtlcEvent_EventType) Descriptor

func (HtlcEvent_EventType) Enum

func (HtlcEvent_EventType) EnumDescriptor deprecated

func (HtlcEvent_EventType) EnumDescriptor() ([]byte, []int)

Deprecated: Use HtlcEvent_EventType.Descriptor instead.

func (HtlcEvent_EventType) Number

func (HtlcEvent_EventType) String

func (x HtlcEvent_EventType) String() string

func (HtlcEvent_EventType) Type

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"`
	// contains filtered or unexported fields
}

func (*HtlcInfo) Descriptor deprecated

func (*HtlcInfo) Descriptor() ([]byte, []int)

Deprecated: Use HtlcInfo.ProtoReflect.Descriptor instead.

func (*HtlcInfo) GetIncomingAmtMsat

func (x *HtlcInfo) GetIncomingAmtMsat() uint64

func (*HtlcInfo) GetIncomingTimelock

func (x *HtlcInfo) GetIncomingTimelock() uint32

func (*HtlcInfo) GetOutgoingAmtMsat

func (x *HtlcInfo) GetOutgoingAmtMsat() uint64

func (*HtlcInfo) GetOutgoingTimelock

func (x *HtlcInfo) GetOutgoingTimelock() uint32

func (*HtlcInfo) ProtoMessage

func (*HtlcInfo) ProtoMessage()

func (*HtlcInfo) ProtoReflect

func (x *HtlcInfo) ProtoReflect() protoreflect.Message

func (*HtlcInfo) Reset

func (x *HtlcInfo) Reset()

func (*HtlcInfo) String

func (x *HtlcInfo) String() string

type LinkFailEvent

type LinkFailEvent struct {

	// Info contains details about the htlc that we failed.
	Info *HtlcInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	// FailureCode is the BOLT error code for the failure.
	WireFailure lnrpc.Failure_FailureCode `` /* 126-byte string literal not displayed */
	//
	//FailureDetail provides additional information about the reason for the
	//failure. This detail enriches the information provided by the wire message
	//and may be 'no detail' if the wire message requires no additional metadata.
	FailureDetail FailureDetail `` /* 130-byte string literal not displayed */
	// A string representation of the link failure.
	FailureString string `protobuf:"bytes,4,opt,name=failure_string,json=failureString,proto3" json:"failure_string,omitempty"`
	// contains filtered or unexported fields
}

func (*LinkFailEvent) Descriptor deprecated

func (*LinkFailEvent) Descriptor() ([]byte, []int)

Deprecated: Use LinkFailEvent.ProtoReflect.Descriptor instead.

func (*LinkFailEvent) GetFailureDetail

func (x *LinkFailEvent) GetFailureDetail() FailureDetail

func (*LinkFailEvent) GetFailureString

func (x *LinkFailEvent) GetFailureString() string

func (*LinkFailEvent) GetInfo

func (x *LinkFailEvent) GetInfo() *HtlcInfo

func (*LinkFailEvent) GetWireFailure

func (x *LinkFailEvent) GetWireFailure() lnrpc.Failure_FailureCode

func (*LinkFailEvent) ProtoMessage

func (*LinkFailEvent) ProtoMessage()

func (*LinkFailEvent) ProtoReflect

func (x *LinkFailEvent) ProtoReflect() protoreflect.Message

func (*LinkFailEvent) Reset

func (x *LinkFailEvent) Reset()

func (*LinkFailEvent) String

func (x *LinkFailEvent) String() string

type MissionControl

type MissionControl interface {
	// GetProbability is expected to return the success probability of a
	// payment from fromNode to toNode.
	GetProbability(fromNode, toNode route.Vertex,
		amt lnwire.MilliSatoshi) float64

	// ResetHistory resets the history of MissionControl returning it to a
	// state as if no payment attempts have been made.
	ResetHistory() error

	// GetHistorySnapshot takes a snapshot from the current mission control
	// state and actual probability estimates.
	GetHistorySnapshot() *routing.MissionControlSnapshot

	// ImportHistory imports the mission control snapshot to our internal
	// state. This import will only be applied in-memory, and will not be
	// persisted across restarts.
	ImportHistory(snapshot *routing.MissionControlSnapshot, force bool) error

	// GetPairHistorySnapshot returns the stored history for a given node
	// pair.
	GetPairHistorySnapshot(fromNode,
		toNode route.Vertex) routing.TimedPairResult

	// GetConfig gets mission control's current config.
	GetConfig() *routing.MissionControlConfig

	// SetConfig sets mission control's config to the values provided, if
	// they are valid.
	SetConfig(cfg *routing.MissionControlConfig) error
}

MissionControl defines the mission control dependencies of routerrpc.

type MissionControlConfig

type MissionControlConfig struct {

	//
	//The amount of time mission control will take to restore a penalized node
	//or channel back to 50% success probability, expressed in seconds. Setting
	//this value to a higher value will penalize failures for longer, making
	//mission control less likely to route through nodes and channels that we
	//have previously recorded failures for.
	HalfLifeSeconds uint64 `protobuf:"varint,1,opt,name=half_life_seconds,json=halfLifeSeconds,proto3" json:"half_life_seconds,omitempty"`
	//
	//The probability of success mission control should assign to hop in a route
	//where it has no other information available. Higher values will make mission
	//control more willing to try hops that we have no information about, lower
	//values will discourage trying these hops.
	HopProbability float32 `protobuf:"fixed32,2,opt,name=hop_probability,json=hopProbability,proto3" json:"hop_probability,omitempty"`
	//
	//The importance that mission control should place on historical results,
	//expressed as a value in [0;1]. Setting this value to 1 will ignore all
	//historical payments and just use the hop probability to assess the
	//probability of success for each hop. A zero value ignores hop probability
	//completely and relies entirely on historical results, unless none are
	//available.
	Weight float32 `protobuf:"fixed32,3,opt,name=weight,proto3" json:"weight,omitempty"`
	//
	//The maximum number of payment results that mission control will store.
	MaximumPaymentResults uint32 `` /* 127-byte string literal not displayed */
	//
	//The minimum time that must have passed since the previously recorded failure
	//before we raise the failure amount.
	MinimumFailureRelaxInterval uint64 `` /* 147-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*MissionControlConfig) Descriptor deprecated

func (*MissionControlConfig) Descriptor() ([]byte, []int)

Deprecated: Use MissionControlConfig.ProtoReflect.Descriptor instead.

func (*MissionControlConfig) GetHalfLifeSeconds

func (x *MissionControlConfig) GetHalfLifeSeconds() uint64

func (*MissionControlConfig) GetHopProbability

func (x *MissionControlConfig) GetHopProbability() float32

func (*MissionControlConfig) GetMaximumPaymentResults

func (x *MissionControlConfig) GetMaximumPaymentResults() uint32

func (*MissionControlConfig) GetMinimumFailureRelaxInterval

func (x *MissionControlConfig) GetMinimumFailureRelaxInterval() uint64

func (*MissionControlConfig) GetWeight

func (x *MissionControlConfig) GetWeight() float32

func (*MissionControlConfig) ProtoMessage

func (*MissionControlConfig) ProtoMessage()

func (*MissionControlConfig) ProtoReflect

func (x *MissionControlConfig) ProtoReflect() protoreflect.Message

func (*MissionControlConfig) Reset

func (x *MissionControlConfig) Reset()

func (*MissionControlConfig) String

func (x *MissionControlConfig) String() string

type PairData

type PairData struct {

	// Time of last failure.
	FailTime int64 `protobuf:"varint,1,opt,name=fail_time,json=failTime,proto3" json:"fail_time,omitempty"`
	//
	//Lowest amount that failed to forward rounded to whole sats. This may be
	//set to zero if the failure is independent of amount.
	FailAmtSat int64 `protobuf:"varint,2,opt,name=fail_amt_sat,json=failAmtSat,proto3" json:"fail_amt_sat,omitempty"`
	//
	//Lowest amount that failed to forward in millisats. This may be
	//set to zero if the failure is independent of amount.
	FailAmtMsat int64 `protobuf:"varint,4,opt,name=fail_amt_msat,json=failAmtMsat,proto3" json:"fail_amt_msat,omitempty"`
	// Time of last success.
	SuccessTime int64 `protobuf:"varint,5,opt,name=success_time,json=successTime,proto3" json:"success_time,omitempty"`
	// Highest amount that we could successfully forward rounded to whole sats.
	SuccessAmtSat int64 `protobuf:"varint,6,opt,name=success_amt_sat,json=successAmtSat,proto3" json:"success_amt_sat,omitempty"`
	// Highest amount that we could successfully forward in millisats.
	SuccessAmtMsat int64 `protobuf:"varint,7,opt,name=success_amt_msat,json=successAmtMsat,proto3" json:"success_amt_msat,omitempty"`
	// contains filtered or unexported fields
}

func (*PairData) Descriptor deprecated

func (*PairData) Descriptor() ([]byte, []int)

Deprecated: Use PairData.ProtoReflect.Descriptor instead.

func (*PairData) GetFailAmtMsat

func (x *PairData) GetFailAmtMsat() int64

func (*PairData) GetFailAmtSat

func (x *PairData) GetFailAmtSat() int64

func (*PairData) GetFailTime

func (x *PairData) GetFailTime() int64

func (*PairData) GetSuccessAmtMsat

func (x *PairData) GetSuccessAmtMsat() int64

func (*PairData) GetSuccessAmtSat

func (x *PairData) GetSuccessAmtSat() int64

func (*PairData) GetSuccessTime

func (x *PairData) GetSuccessTime() int64

func (*PairData) ProtoMessage

func (*PairData) ProtoMessage()

func (*PairData) ProtoReflect

func (x *PairData) ProtoReflect() protoreflect.Message

func (*PairData) Reset

func (x *PairData) Reset()

func (*PairData) String

func (x *PairData) String() string

type PairHistory

type PairHistory struct {

	// The source node pubkey of the pair.
	NodeFrom []byte `protobuf:"bytes,1,opt,name=node_from,json=nodeFrom,proto3" json:"node_from,omitempty"`
	// The destination node pubkey of the pair.
	NodeTo  []byte    `protobuf:"bytes,2,opt,name=node_to,json=nodeTo,proto3" json:"node_to,omitempty"`
	History *PairData `protobuf:"bytes,7,opt,name=history,proto3" json:"history,omitempty"`
	// contains filtered or unexported fields
}

PairHistory contains the mission control state for a particular node pair.

func (*PairHistory) Descriptor deprecated

func (*PairHistory) Descriptor() ([]byte, []int)

Deprecated: Use PairHistory.ProtoReflect.Descriptor instead.

func (*PairHistory) GetHistory

func (x *PairHistory) GetHistory() *PairData

func (*PairHistory) GetNodeFrom

func (x *PairHistory) GetNodeFrom() []byte

func (*PairHistory) GetNodeTo

func (x *PairHistory) GetNodeTo() []byte

func (*PairHistory) ProtoMessage

func (*PairHistory) ProtoMessage()

func (*PairHistory) ProtoReflect

func (x *PairHistory) ProtoReflect() protoreflect.Message

func (*PairHistory) Reset

func (x *PairHistory) Reset()

func (*PairHistory) String

func (x *PairHistory) String() string

type PaymentState

type PaymentState int32
const (
	//
	//Payment is still in flight.
	PaymentState_IN_FLIGHT PaymentState = 0
	//
	//Payment completed successfully.
	PaymentState_SUCCEEDED PaymentState = 1
	//
	//There are more routes to try, but the payment timeout was exceeded.
	PaymentState_FAILED_TIMEOUT PaymentState = 2
	//
	//All possible routes were tried and failed permanently. Or were no
	//routes to the destination at all.
	PaymentState_FAILED_NO_ROUTE PaymentState = 3
	//
	//A non-recoverable error has 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) Descriptor

func (PaymentState) Enum

func (x PaymentState) Enum() *PaymentState

func (PaymentState) EnumDescriptor deprecated

func (PaymentState) EnumDescriptor() ([]byte, []int)

Deprecated: Use PaymentState.Descriptor instead.

func (PaymentState) Number

func (PaymentState) String

func (x PaymentState) String() string

func (PaymentState) Type

type PaymentStatus

type PaymentStatus struct {

	// Current state the payment is in.
	State PaymentState `protobuf:"varint,1,opt,name=state,proto3,enum=routerrpc.PaymentState" json:"state,omitempty"`
	//
	//The pre-image of the payment when state is SUCCEEDED.
	Preimage []byte `protobuf:"bytes,2,opt,name=preimage,proto3" json:"preimage,omitempty"`
	//
	//The HTLCs made in attempt to settle the payment [EXPERIMENTAL].
	Htlcs []*lnrpc.HTLCAttempt `protobuf:"bytes,4,rep,name=htlcs,proto3" json:"htlcs,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentStatus) Descriptor deprecated

func (*PaymentStatus) Descriptor() ([]byte, []int)

Deprecated: Use PaymentStatus.ProtoReflect.Descriptor instead.

func (*PaymentStatus) GetHtlcs

func (x *PaymentStatus) GetHtlcs() []*lnrpc.HTLCAttempt

func (*PaymentStatus) GetPreimage

func (x *PaymentStatus) GetPreimage() []byte

func (*PaymentStatus) GetState

func (x *PaymentStatus) GetState() PaymentState

func (*PaymentStatus) ProtoMessage

func (*PaymentStatus) ProtoMessage()

func (*PaymentStatus) ProtoReflect

func (x *PaymentStatus) ProtoReflect() protoreflect.Message

func (*PaymentStatus) Reset

func (x *PaymentStatus) Reset()

func (*PaymentStatus) String

func (x *PaymentStatus) String() string

type QueryMissionControlRequest

type QueryMissionControlRequest struct {
	// contains filtered or unexported fields
}

func (*QueryMissionControlRequest) Descriptor deprecated

func (*QueryMissionControlRequest) Descriptor() ([]byte, []int)

Deprecated: Use QueryMissionControlRequest.ProtoReflect.Descriptor instead.

func (*QueryMissionControlRequest) ProtoMessage

func (*QueryMissionControlRequest) ProtoMessage()

func (*QueryMissionControlRequest) ProtoReflect

func (*QueryMissionControlRequest) Reset

func (x *QueryMissionControlRequest) Reset()

func (*QueryMissionControlRequest) String

func (x *QueryMissionControlRequest) String() string

type QueryMissionControlResponse

type QueryMissionControlResponse struct {

	// Node pair-level mission control state.
	Pairs []*PairHistory `protobuf:"bytes,2,rep,name=pairs,proto3" json:"pairs,omitempty"`
	// contains filtered or unexported fields
}

QueryMissionControlResponse contains mission control state.

func (*QueryMissionControlResponse) Descriptor deprecated

func (*QueryMissionControlResponse) Descriptor() ([]byte, []int)

Deprecated: Use QueryMissionControlResponse.ProtoReflect.Descriptor instead.

func (*QueryMissionControlResponse) GetPairs

func (x *QueryMissionControlResponse) GetPairs() []*PairHistory

func (*QueryMissionControlResponse) ProtoMessage

func (*QueryMissionControlResponse) ProtoMessage()

func (*QueryMissionControlResponse) ProtoReflect

func (*QueryMissionControlResponse) Reset

func (x *QueryMissionControlResponse) Reset()

func (*QueryMissionControlResponse) String

func (x *QueryMissionControlResponse) String() string

type QueryProbabilityRequest

type QueryProbabilityRequest struct {

	// The source node pubkey of the pair.
	FromNode []byte `protobuf:"bytes,1,opt,name=from_node,json=fromNode,proto3" json:"from_node,omitempty"`
	// The destination node pubkey of the pair.
	ToNode []byte `protobuf:"bytes,2,opt,name=to_node,json=toNode,proto3" json:"to_node,omitempty"`
	// The amount for which to calculate a probability.
	AmtMsat int64 `protobuf:"varint,3,opt,name=amt_msat,json=amtMsat,proto3" json:"amt_msat,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryProbabilityRequest) Descriptor deprecated

func (*QueryProbabilityRequest) Descriptor() ([]byte, []int)

Deprecated: Use QueryProbabilityRequest.ProtoReflect.Descriptor instead.

func (*QueryProbabilityRequest) GetAmtMsat

func (x *QueryProbabilityRequest) GetAmtMsat() int64

func (*QueryProbabilityRequest) GetFromNode

func (x *QueryProbabilityRequest) GetFromNode() []byte

func (*QueryProbabilityRequest) GetToNode

func (x *QueryProbabilityRequest) GetToNode() []byte

func (*QueryProbabilityRequest) ProtoMessage

func (*QueryProbabilityRequest) ProtoMessage()

func (*QueryProbabilityRequest) ProtoReflect

func (x *QueryProbabilityRequest) ProtoReflect() protoreflect.Message

func (*QueryProbabilityRequest) Reset

func (x *QueryProbabilityRequest) Reset()

func (*QueryProbabilityRequest) String

func (x *QueryProbabilityRequest) String() string

type QueryProbabilityResponse

type QueryProbabilityResponse struct {

	// The success probability for the requested pair.
	Probability float64 `protobuf:"fixed64,1,opt,name=probability,proto3" json:"probability,omitempty"`
	// The historical data for the requested pair.
	History *PairData `protobuf:"bytes,2,opt,name=history,proto3" json:"history,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryProbabilityResponse) Descriptor deprecated

func (*QueryProbabilityResponse) Descriptor() ([]byte, []int)

Deprecated: Use QueryProbabilityResponse.ProtoReflect.Descriptor instead.

func (*QueryProbabilityResponse) GetHistory

func (x *QueryProbabilityResponse) GetHistory() *PairData

func (*QueryProbabilityResponse) GetProbability

func (x *QueryProbabilityResponse) GetProbability() float64

func (*QueryProbabilityResponse) ProtoMessage

func (*QueryProbabilityResponse) ProtoMessage()

func (*QueryProbabilityResponse) ProtoReflect

func (x *QueryProbabilityResponse) ProtoReflect() protoreflect.Message

func (*QueryProbabilityResponse) Reset

func (x *QueryProbabilityResponse) Reset()

func (*QueryProbabilityResponse) String

func (x *QueryProbabilityResponse) String() string

type ResetMissionControlRequest

type ResetMissionControlRequest struct {
	// contains filtered or unexported fields
}

func (*ResetMissionControlRequest) Descriptor deprecated

func (*ResetMissionControlRequest) Descriptor() ([]byte, []int)

Deprecated: Use ResetMissionControlRequest.ProtoReflect.Descriptor instead.

func (*ResetMissionControlRequest) ProtoMessage

func (*ResetMissionControlRequest) ProtoMessage()

func (*ResetMissionControlRequest) ProtoReflect

func (*ResetMissionControlRequest) Reset

func (x *ResetMissionControlRequest) Reset()

func (*ResetMissionControlRequest) String

func (x *ResetMissionControlRequest) String() string

type ResetMissionControlResponse

type ResetMissionControlResponse struct {
	// contains filtered or unexported fields
}

func (*ResetMissionControlResponse) Descriptor deprecated

func (*ResetMissionControlResponse) Descriptor() ([]byte, []int)

Deprecated: Use ResetMissionControlResponse.ProtoReflect.Descriptor instead.

func (*ResetMissionControlResponse) ProtoMessage

func (*ResetMissionControlResponse) ProtoMessage()

func (*ResetMissionControlResponse) ProtoReflect

func (*ResetMissionControlResponse) Reset

func (x *ResetMissionControlResponse) Reset()

func (*ResetMissionControlResponse) String

func (x *ResetMissionControlResponse) String() string

type ResolveHoldForwardAction

type ResolveHoldForwardAction int32
const (
	ResolveHoldForwardAction_SETTLE ResolveHoldForwardAction = 0
	ResolveHoldForwardAction_FAIL   ResolveHoldForwardAction = 1
	ResolveHoldForwardAction_RESUME ResolveHoldForwardAction = 2
)

func (ResolveHoldForwardAction) Descriptor

func (ResolveHoldForwardAction) Enum

func (ResolveHoldForwardAction) EnumDescriptor deprecated

func (ResolveHoldForwardAction) EnumDescriptor() ([]byte, []int)

Deprecated: Use ResolveHoldForwardAction.Descriptor instead.

func (ResolveHoldForwardAction) Number

func (ResolveHoldForwardAction) String

func (x ResolveHoldForwardAction) String() string

func (ResolveHoldForwardAction) Type

type RouteFeeRequest

type RouteFeeRequest struct {

	//
	//The destination once wishes to obtain a routing fee quote to.
	Dest []byte `protobuf:"bytes,1,opt,name=dest,proto3" json:"dest,omitempty"`
	//
	//The amount one wishes to send to the target destination.
	AmtSat int64 `protobuf:"varint,2,opt,name=amt_sat,json=amtSat,proto3" json:"amt_sat,omitempty"`
	// contains filtered or unexported fields
}

func (*RouteFeeRequest) Descriptor deprecated

func (*RouteFeeRequest) Descriptor() ([]byte, []int)

Deprecated: Use RouteFeeRequest.ProtoReflect.Descriptor instead.

func (*RouteFeeRequest) GetAmtSat

func (x *RouteFeeRequest) GetAmtSat() int64

func (*RouteFeeRequest) GetDest

func (x *RouteFeeRequest) GetDest() []byte

func (*RouteFeeRequest) ProtoMessage

func (*RouteFeeRequest) ProtoMessage()

func (*RouteFeeRequest) ProtoReflect

func (x *RouteFeeRequest) ProtoReflect() protoreflect.Message

func (*RouteFeeRequest) Reset

func (x *RouteFeeRequest) Reset()

func (*RouteFeeRequest) String

func (x *RouteFeeRequest) String() string

type RouteFeeResponse

type RouteFeeResponse struct {

	//
	//A lower bound of the estimated fee to the target destination within the
	//network, expressed in milli-satoshis.
	RoutingFeeMsat int64 `protobuf:"varint,1,opt,name=routing_fee_msat,json=routingFeeMsat,proto3" json:"routing_fee_msat,omitempty"`
	//
	//An estimate of the worst case time delay that can occur. Note that callers
	//will still need to factor in the final CLTV delta of the last hop into this
	//value.
	TimeLockDelay int64 `protobuf:"varint,2,opt,name=time_lock_delay,json=timeLockDelay,proto3" json:"time_lock_delay,omitempty"`
	// contains filtered or unexported fields
}

func (*RouteFeeResponse) Descriptor deprecated

func (*RouteFeeResponse) Descriptor() ([]byte, []int)

Deprecated: Use RouteFeeResponse.ProtoReflect.Descriptor instead.

func (*RouteFeeResponse) GetRoutingFeeMsat

func (x *RouteFeeResponse) GetRoutingFeeMsat() int64

func (*RouteFeeResponse) GetTimeLockDelay

func (x *RouteFeeResponse) GetTimeLockDelay() int64

func (*RouteFeeResponse) ProtoMessage

func (*RouteFeeResponse) ProtoMessage()

func (*RouteFeeResponse) ProtoReflect

func (x *RouteFeeResponse) ProtoReflect() protoreflect.Message

func (*RouteFeeResponse) Reset

func (x *RouteFeeResponse) Reset()

func (*RouteFeeResponse) String

func (x *RouteFeeResponse) String() string

type RouterBackend

type RouterBackend struct {
	// SelfNode is the vertex of the node sending the payment.
	SelfNode route.Vertex

	// FetchChannelCapacity is a closure that we'll use the fetch the total
	// capacity of a channel to populate in responses.
	FetchChannelCapacity func(chanID uint64) (ltcutil.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.CachedEdgePolicy,
		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

	// SetChannelEnabled exposes the ability to manually enable a channel.
	SetChannelEnabled func(wire.OutPoint) error

	// SetChannelDisabled exposes the ability to manually disable a channel
	SetChannelDisabled func(wire.OutPoint) error

	// SetChannelAuto exposes the ability to restore automatic channel state
	// management after manually setting channel status.
	SetChannelAuto func(wire.OutPoint) error
}

RouterBackend contains the backend implementation of the router rpc sub server calls.

func (*RouterBackend) MarshalHTLCAttempt

func (r *RouterBackend) MarshalHTLCAttempt(
	htlc channeldb.HTLCAttempt) (*lnrpc.HTLCAttempt, error)

MarshalHTLCAttempt constructs an RPC HTLCAttempt from the db representation.

func (*RouterBackend) MarshallPayment

func (r *RouterBackend) MarshallPayment(payment *channeldb.MPPayment) (
	*lnrpc.Payment, error)

MarshallPayment marshall a payment to its rpc representation.

func (*RouterBackend) MarshallRoute

func (r *RouterBackend) MarshallRoute(route *route.Route) (*lnrpc.Route, error)

MarshallRoute marshalls an internal route to an rpc route struct.

func (*RouterBackend) QueryRoutes

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

func (r *RouterBackend) UnmarshallRoute(rpcroute *lnrpc.Route) (
	*route.Route, error)

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: Do not use.
	//
	//Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via
	//the specified route. This method differs from SendPayment in that it
	//allows users to specify a full route manually. This can be used for
	//things like rebalancing, and atomic swaps. It differs from the newer
	//SendToRouteV2 in that it doesn't return the full HTLC information.
	SendToRoute(ctx context.Context, in *SendToRouteRequest, opts ...grpc.CallOption) (*SendToRouteResponse, error)
	//
	//SendToRouteV2 attempts to make a payment via the specified route. This
	//method differs from SendPayment in that it allows users to specify a full
	//route manually. This can be used for things like rebalancing, and atomic
	//swaps.
	SendToRouteV2(ctx context.Context, in *SendToRouteRequest, opts ...grpc.CallOption) (*lnrpc.HTLCAttempt, error)
	//
	//ResetMissionControl clears all mission control state and starts with a clean
	//slate.
	ResetMissionControl(ctx context.Context, in *ResetMissionControlRequest, opts ...grpc.CallOption) (*ResetMissionControlResponse, error)
	//
	//QueryMissionControl exposes the internal mission control state to callers.
	//It is a development feature.
	QueryMissionControl(ctx context.Context, in *QueryMissionControlRequest, opts ...grpc.CallOption) (*QueryMissionControlResponse, error)
	//
	//XImportMissionControl is an experimental API that imports the state provided
	//to the internal mission control's state, using all results which are more
	//recent than our existing values. These values will only be imported
	//in-memory, and will not be persisted across restarts.
	XImportMissionControl(ctx context.Context, in *XImportMissionControlRequest, opts ...grpc.CallOption) (*XImportMissionControlResponse, error)
	//
	//GetMissionControlConfig returns mission control's current config.
	GetMissionControlConfig(ctx context.Context, in *GetMissionControlConfigRequest, opts ...grpc.CallOption) (*GetMissionControlConfigResponse, error)
	//
	//SetMissionControlConfig will set mission control's config, if the config
	//provided is valid.
	SetMissionControlConfig(ctx context.Context, in *SetMissionControlConfigRequest, opts ...grpc.CallOption) (*SetMissionControlConfigResponse, error)
	//
	//QueryProbability returns the current success probability estimate for a
	//given node pair and amount.
	QueryProbability(ctx context.Context, in *QueryProbabilityRequest, opts ...grpc.CallOption) (*QueryProbabilityResponse, error)
	//
	//BuildRoute builds a fully specified route based on a list of hop public
	//keys. It retrieves the relevant channel policies from the graph in order to
	//calculate the correct fees and time locks.
	BuildRoute(ctx context.Context, in *BuildRouteRequest, opts ...grpc.CallOption) (*BuildRouteResponse, error)
	//
	//SubscribeHtlcEvents creates a uni-directional stream from the server to
	//the client which delivers a stream of htlc events.
	SubscribeHtlcEvents(ctx context.Context, in *SubscribeHtlcEventsRequest, opts ...grpc.CallOption) (Router_SubscribeHtlcEventsClient, error)
	// Deprecated: Do not use.
	//
	//Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
	//described by the passed PaymentRequest to the final destination. The call
	//returns a stream of payment status updates.
	SendPayment(ctx context.Context, in *SendPaymentRequest, opts ...grpc.CallOption) (Router_SendPaymentClient, error)
	// Deprecated: Do not use.
	//
	//Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
	//the payment identified by the payment hash.
	TrackPayment(ctx context.Context, in *TrackPaymentRequest, opts ...grpc.CallOption) (Router_TrackPaymentClient, error)
	//*
	//HtlcInterceptor dispatches a bi-directional streaming RPC in which
	//Forwarded HTLC requests are sent to the client and the client responds with
	//a boolean that tells LND if this htlc should be intercepted.
	//In case of interception, the htlc can be either settled, cancelled or
	//resumed later by using the ResolveHoldForward endpoint.
	HtlcInterceptor(ctx context.Context, opts ...grpc.CallOption) (Router_HtlcInterceptorClient, error)
	//
	//UpdateChanStatus attempts to manually set the state of a channel
	//(enabled, disabled, or auto). A manual "disable" request will cause the
	//channel to stay disabled until a subsequent manual request of either
	//"enable" or "auto".
	UpdateChanStatus(ctx context.Context, in *UpdateChanStatusRequest, opts ...grpc.CallOption) (*UpdateChanStatusResponse, error)
}

RouterClient is the client API for Router service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewRouterClient

func NewRouterClient(cc grpc.ClientConnInterface) RouterClient

type RouterServer

type RouterServer interface {
	//
	//SendPaymentV2 attempts to route a payment described by the passed
	//PaymentRequest to the final destination. The call returns a stream of
	//payment updates.
	SendPaymentV2(*SendPaymentRequest, Router_SendPaymentV2Server) error
	//
	//TrackPaymentV2 returns an update stream for the payment identified by the
	//payment hash.
	TrackPaymentV2(*TrackPaymentRequest, Router_TrackPaymentV2Server) error
	//
	//EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
	//may cost to send an HTLC to the target end destination.
	EstimateRouteFee(context.Context, *RouteFeeRequest) (*RouteFeeResponse, error)
	// Deprecated: Do not use.
	//
	//Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via
	//the specified route. This method differs from SendPayment in that it
	//allows users to specify a full route manually. This can be used for
	//things like rebalancing, and atomic swaps. It differs from the newer
	//SendToRouteV2 in that it doesn't return the full HTLC information.
	SendToRoute(context.Context, *SendToRouteRequest) (*SendToRouteResponse, error)
	//
	//SendToRouteV2 attempts to make a payment via the specified route. This
	//method differs from SendPayment in that it allows users to specify a full
	//route manually. This can be used for things like rebalancing, and atomic
	//swaps.
	SendToRouteV2(context.Context, *SendToRouteRequest) (*lnrpc.HTLCAttempt, error)
	//
	//ResetMissionControl clears all mission control state and starts with a clean
	//slate.
	ResetMissionControl(context.Context, *ResetMissionControlRequest) (*ResetMissionControlResponse, error)
	//
	//QueryMissionControl exposes the internal mission control state to callers.
	//It is a development feature.
	QueryMissionControl(context.Context, *QueryMissionControlRequest) (*QueryMissionControlResponse, error)
	//
	//XImportMissionControl is an experimental API that imports the state provided
	//to the internal mission control's state, using all results which are more
	//recent than our existing values. These values will only be imported
	//in-memory, and will not be persisted across restarts.
	XImportMissionControl(context.Context, *XImportMissionControlRequest) (*XImportMissionControlResponse, error)
	//
	//GetMissionControlConfig returns mission control's current config.
	GetMissionControlConfig(context.Context, *GetMissionControlConfigRequest) (*GetMissionControlConfigResponse, error)
	//
	//SetMissionControlConfig will set mission control's config, if the config
	//provided is valid.
	SetMissionControlConfig(context.Context, *SetMissionControlConfigRequest) (*SetMissionControlConfigResponse, error)
	//
	//QueryProbability returns the current success probability estimate for a
	//given node pair and amount.
	QueryProbability(context.Context, *QueryProbabilityRequest) (*QueryProbabilityResponse, error)
	//
	//BuildRoute builds a fully specified route based on a list of hop public
	//keys. It retrieves the relevant channel policies from the graph in order to
	//calculate the correct fees and time locks.
	BuildRoute(context.Context, *BuildRouteRequest) (*BuildRouteResponse, error)
	//
	//SubscribeHtlcEvents creates a uni-directional stream from the server to
	//the client which delivers a stream of htlc events.
	SubscribeHtlcEvents(*SubscribeHtlcEventsRequest, Router_SubscribeHtlcEventsServer) error
	// Deprecated: Do not use.
	//
	//Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
	//described by the passed PaymentRequest to the final destination. The call
	//returns a stream of payment status updates.
	SendPayment(*SendPaymentRequest, Router_SendPaymentServer) error
	// Deprecated: Do not use.
	//
	//Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
	//the payment identified by the payment hash.
	TrackPayment(*TrackPaymentRequest, Router_TrackPaymentServer) error
	//*
	//HtlcInterceptor dispatches a bi-directional streaming RPC in which
	//Forwarded HTLC requests are sent to the client and the client responds with
	//a boolean that tells LND if this htlc should be intercepted.
	//In case of interception, the htlc can be either settled, cancelled or
	//resumed later by using the ResolveHoldForward endpoint.
	HtlcInterceptor(Router_HtlcInterceptorServer) error
	//
	//UpdateChanStatus attempts to manually set the state of a channel
	//(enabled, disabled, or auto). A manual "disable" request will cause the
	//channel to stay disabled until a subsequent manual request of either
	//"enable" or "auto".
	UpdateChanStatus(context.Context, *UpdateChanStatusRequest) (*UpdateChanStatusResponse, error)
	// contains filtered or unexported methods
}

RouterServer is the server API for Router service. All implementations must embed UnimplementedRouterServer for forward compatibility

type Router_HtlcInterceptorClient

type Router_HtlcInterceptorClient interface {
	Send(*ForwardHtlcInterceptResponse) error
	Recv() (*ForwardHtlcInterceptRequest, error)
	grpc.ClientStream
}

type Router_HtlcInterceptorServer

type Router_HtlcInterceptorServer interface {
	Send(*ForwardHtlcInterceptRequest) error
	Recv() (*ForwardHtlcInterceptResponse, error)
	grpc.ServerStream
}

type Router_SendPaymentClient

type Router_SendPaymentClient interface {
	Recv() (*PaymentStatus, error)
	grpc.ClientStream
}

type Router_SendPaymentServer

type Router_SendPaymentServer interface {
	Send(*PaymentStatus) error
	grpc.ServerStream
}

type Router_SendPaymentV2Client

type Router_SendPaymentV2Client interface {
	Recv() (*lnrpc.Payment, error)
	grpc.ClientStream
}

type Router_SendPaymentV2Server

type Router_SendPaymentV2Server interface {
	Send(*lnrpc.Payment) error
	grpc.ServerStream
}

type Router_SubscribeHtlcEventsClient

type Router_SubscribeHtlcEventsClient interface {
	Recv() (*HtlcEvent, error)
	grpc.ClientStream
}

type Router_SubscribeHtlcEventsServer

type Router_SubscribeHtlcEventsServer interface {
	Send(*HtlcEvent) error
	grpc.ServerStream
}

type Router_TrackPaymentClient

type Router_TrackPaymentClient interface {
	Recv() (*PaymentStatus, error)
	grpc.ClientStream
}

type Router_TrackPaymentServer

type Router_TrackPaymentServer interface {
	Send(*PaymentStatus) error
	grpc.ServerStream
}

type Router_TrackPaymentV2Client

type Router_TrackPaymentV2Client interface {
	Recv() (*lnrpc.Payment, error)
	grpc.ClientStream
}

type Router_TrackPaymentV2Server

type Router_TrackPaymentV2Server interface {
	Send(*lnrpc.Payment) error
	grpc.ServerStream
}

type 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 ltcutil.Amount `long:"attemptcost" description:"The fixed (virtual) cost in sats of a failed payment attempt"`

	// AttemptCostPPM is the proportional virtual cost in path finding of a
	// failed payment attempt. It is used to trade off potentially better
	// routes against their probability of succeeding. This parameter is
	// expressed in parts per million of the total payment amount.
	AttemptCostPPM int64 `` /* 162-byte string literal not displayed */

	// MaxMcHistory defines the maximum number of payment results that
	// are held on disk by mission control.
	MaxMcHistory int `long:"maxmchistory" description:"the maximum number of payment results that are held on disk by mission control"`

	// McFlushInterval defines the timer interval to use to flush mission
	// control state to the DB.
	McFlushInterval time.Duration `long:"mcflushinterval" description:"the timer interval to use to flush mission control state to the DB"`
}

RoutingConfig contains the configurable parameters that control routing.

func GetRoutingConfig

func GetRoutingConfig(cfg *Config) *RoutingConfig

GetRoutingConfig returns the routing config based on this sub server config.

type SendPaymentRequest

type SendPaymentRequest struct {

	// The identity pubkey of the payment recipient
	Dest []byte `protobuf:"bytes,1,opt,name=dest,proto3" json:"dest,omitempty"`
	//
	//Number of satoshis to send.
	//
	//The fields amt and amt_msat are mutually exclusive.
	Amt int64 `protobuf:"varint,2,opt,name=amt,proto3" json:"amt,omitempty"`
	//
	//Number of millisatoshis to send.
	//
	//The fields amt and amt_msat are mutually exclusive.
	AmtMsat int64 `protobuf:"varint,12,opt,name=amt_msat,json=amtMsat,proto3" json:"amt_msat,omitempty"`
	// The hash to use within the payment's HTLC
	PaymentHash []byte `protobuf:"bytes,3,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
	//
	//The CLTV delta from the current height that should be used to set the
	//timelock for the final hop.
	FinalCltvDelta int32 `protobuf:"varint,4,opt,name=final_cltv_delta,json=finalCltvDelta,proto3" json:"final_cltv_delta,omitempty"`
	// An optional payment addr to be included within the last hop of the route.
	PaymentAddr []byte `protobuf:"bytes,20,opt,name=payment_addr,json=paymentAddr,proto3" json:"payment_addr,omitempty"`
	//
	//A bare-bones invoice for a payment within the Lightning Network.  With the
	//details of the invoice, the sender has all the data necessary to send a
	//payment to the recipient. The amount in the payment request may be zero. In
	//that case it is required to set the amt field as well. If no payment request
	//is specified, the following fields are required: dest, amt and payment_hash.
	PaymentRequest string `protobuf:"bytes,5,opt,name=payment_request,json=paymentRequest,proto3" json:"payment_request,omitempty"`
	//
	//An upper limit on the amount of time we should spend when attempting to
	//fulfill the payment. This is expressed in seconds. If we cannot make a
	//successful payment within this time frame, an error will be returned.
	//This field must be non-zero.
	TimeoutSeconds int32 `protobuf:"varint,6,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"`
	//
	//The maximum number of satoshis that will be paid as a fee of the payment.
	//If this field is left to the default value of 0, only zero-fee routes will
	//be considered. This usually means single hop routes connecting directly to
	//the destination. To send the payment without a fee limit, use max int here.
	//
	//The fields fee_limit_sat and fee_limit_msat are mutually exclusive.
	FeeLimitSat int64 `protobuf:"varint,7,opt,name=fee_limit_sat,json=feeLimitSat,proto3" json:"fee_limit_sat,omitempty"`
	//
	//The maximum number of millisatoshis that will be paid as a fee of the
	//payment. If this field is left to the default value of 0, only zero-fee
	//routes will be considered. This usually means single hop routes connecting
	//directly to the destination. To send the payment without a fee limit, use
	//max int here.
	//
	//The fields fee_limit_sat and fee_limit_msat are mutually exclusive.
	FeeLimitMsat int64 `protobuf:"varint,13,opt,name=fee_limit_msat,json=feeLimitMsat,proto3" json:"fee_limit_msat,omitempty"`
	//
	//Deprecated, use outgoing_chan_ids. The channel id of the channel that must
	//be taken to the first hop. If zero, any channel may be used (unless
	//outgoing_chan_ids are set).
	//
	// Deprecated: Do not use.
	OutgoingChanId uint64 `protobuf:"varint,8,opt,name=outgoing_chan_id,json=outgoingChanId,proto3" json:"outgoing_chan_id,omitempty"`
	//
	//The channel ids of the channels are allowed for the first hop. If empty,
	//any channel may be used.
	OutgoingChanIds []uint64 `protobuf:"varint,19,rep,packed,name=outgoing_chan_ids,json=outgoingChanIds,proto3" json:"outgoing_chan_ids,omitempty"`
	//
	//The pubkey of the last hop of the route. If empty, any hop may be used.
	LastHopPubkey []byte `protobuf:"bytes,14,opt,name=last_hop_pubkey,json=lastHopPubkey,proto3" json:"last_hop_pubkey,omitempty"`
	//
	//An optional maximum total time lock for the route. This should not exceed
	//lnd's `--max-cltv-expiry` setting. If zero, then the value of
	//`--max-cltv-expiry` is enforced.
	CltvLimit int32 `protobuf:"varint,9,opt,name=cltv_limit,json=cltvLimit,proto3" json:"cltv_limit,omitempty"`
	//
	//Optional route hints to reach the destination through private channels.
	RouteHints []*lnrpc.RouteHint `protobuf:"bytes,10,rep,name=route_hints,json=routeHints,proto3" json:"route_hints,omitempty"`
	//
	//An optional field that can be used to pass an arbitrary set of TLV records
	//to a peer which understands the new records. This can be used to pass
	//application specific data during the payment attempt. Record types are
	//required to be in the custom range >= 65536. When using REST, the values
	//must be encoded as base64.
	DestCustomRecords map[uint64][]byte `` /* 204-byte string literal not displayed */
	// If set, circular payments to self are permitted.
	AllowSelfPayment bool `protobuf:"varint,15,opt,name=allow_self_payment,json=allowSelfPayment,proto3" json:"allow_self_payment,omitempty"`
	//
	//Features assumed to be supported by the final node. All transitive feature
	//dependencies must also be set properly. For a given feature bit pair, either
	//optional or remote may be set, but not both. If this field is nil or empty,
	//the router will try to load destination features from the graph as a
	//fallback.
	DestFeatures []lnrpc.FeatureBit `` /* 128-byte string literal not displayed */
	//
	//The maximum number of partial payments that may be use to complete the full
	//amount.
	MaxParts uint32 `protobuf:"varint,17,opt,name=max_parts,json=maxParts,proto3" json:"max_parts,omitempty"`
	//
	//If set, only the final payment update is streamed back. Intermediate updates
	//that show which htlcs are still in flight are suppressed.
	NoInflightUpdates bool `protobuf:"varint,18,opt,name=no_inflight_updates,json=noInflightUpdates,proto3" json:"no_inflight_updates,omitempty"`
	//
	//The largest payment split that should be attempted when making a payment if
	//splitting is necessary. Setting this value will effectively cause lnd to
	//split more aggressively, vs only when it thinks it needs to. Note that this
	//value is in milli-satoshis.
	MaxShardSizeMsat uint64 `protobuf:"varint,21,opt,name=max_shard_size_msat,json=maxShardSizeMsat,proto3" json:"max_shard_size_msat,omitempty"`
	//
	//If set, an AMP-payment will be attempted.
	Amp bool `protobuf:"varint,22,opt,name=amp,proto3" json:"amp,omitempty"`
	// contains filtered or unexported fields
}

func (*SendPaymentRequest) Descriptor deprecated

func (*SendPaymentRequest) Descriptor() ([]byte, []int)

Deprecated: Use SendPaymentRequest.ProtoReflect.Descriptor instead.

func (*SendPaymentRequest) GetAllowSelfPayment

func (x *SendPaymentRequest) GetAllowSelfPayment() bool

func (*SendPaymentRequest) GetAmp

func (x *SendPaymentRequest) GetAmp() bool

func (*SendPaymentRequest) GetAmt

func (x *SendPaymentRequest) GetAmt() int64

func (*SendPaymentRequest) GetAmtMsat

func (x *SendPaymentRequest) GetAmtMsat() int64

func (*SendPaymentRequest) GetCltvLimit

func (x *SendPaymentRequest) GetCltvLimit() int32

func (*SendPaymentRequest) GetDest

func (x *SendPaymentRequest) GetDest() []byte

func (*SendPaymentRequest) GetDestCustomRecords

func (x *SendPaymentRequest) GetDestCustomRecords() map[uint64][]byte

func (*SendPaymentRequest) GetDestFeatures

func (x *SendPaymentRequest) GetDestFeatures() []lnrpc.FeatureBit

func (*SendPaymentRequest) GetFeeLimitMsat

func (x *SendPaymentRequest) GetFeeLimitMsat() int64

func (*SendPaymentRequest) GetFeeLimitSat

func (x *SendPaymentRequest) GetFeeLimitSat() int64

func (*SendPaymentRequest) GetFinalCltvDelta

func (x *SendPaymentRequest) GetFinalCltvDelta() int32

func (*SendPaymentRequest) GetLastHopPubkey

func (x *SendPaymentRequest) GetLastHopPubkey() []byte

func (*SendPaymentRequest) GetMaxParts

func (x *SendPaymentRequest) GetMaxParts() uint32

func (*SendPaymentRequest) GetMaxShardSizeMsat

func (x *SendPaymentRequest) GetMaxShardSizeMsat() uint64

func (*SendPaymentRequest) GetNoInflightUpdates

func (x *SendPaymentRequest) GetNoInflightUpdates() bool

func (*SendPaymentRequest) GetOutgoingChanId deprecated

func (x *SendPaymentRequest) GetOutgoingChanId() uint64

Deprecated: Do not use.

func (*SendPaymentRequest) GetOutgoingChanIds

func (x *SendPaymentRequest) GetOutgoingChanIds() []uint64

func (*SendPaymentRequest) GetPaymentAddr

func (x *SendPaymentRequest) GetPaymentAddr() []byte

func (*SendPaymentRequest) GetPaymentHash

func (x *SendPaymentRequest) GetPaymentHash() []byte

func (*SendPaymentRequest) GetPaymentRequest

func (x *SendPaymentRequest) GetPaymentRequest() string

func (*SendPaymentRequest) GetRouteHints

func (x *SendPaymentRequest) GetRouteHints() []*lnrpc.RouteHint

func (*SendPaymentRequest) GetTimeoutSeconds

func (x *SendPaymentRequest) GetTimeoutSeconds() int32

func (*SendPaymentRequest) ProtoMessage

func (*SendPaymentRequest) ProtoMessage()

func (*SendPaymentRequest) ProtoReflect

func (x *SendPaymentRequest) ProtoReflect() protoreflect.Message

func (*SendPaymentRequest) Reset

func (x *SendPaymentRequest) Reset()

func (*SendPaymentRequest) String

func (x *SendPaymentRequest) String() string

type SendToRouteRequest

type SendToRouteRequest struct {

	// The payment hash to use for the HTLC.
	PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
	// Route that should be used to attempt to complete the payment.
	Route *lnrpc.Route `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"`
	// contains filtered or unexported fields
}

func (*SendToRouteRequest) Descriptor deprecated

func (*SendToRouteRequest) Descriptor() ([]byte, []int)

Deprecated: Use SendToRouteRequest.ProtoReflect.Descriptor instead.

func (*SendToRouteRequest) GetPaymentHash

func (x *SendToRouteRequest) GetPaymentHash() []byte

func (*SendToRouteRequest) GetRoute

func (x *SendToRouteRequest) GetRoute() *lnrpc.Route

func (*SendToRouteRequest) ProtoMessage

func (*SendToRouteRequest) ProtoMessage()

func (*SendToRouteRequest) ProtoReflect

func (x *SendToRouteRequest) ProtoReflect() protoreflect.Message

func (*SendToRouteRequest) Reset

func (x *SendToRouteRequest) Reset()

func (*SendToRouteRequest) String

func (x *SendToRouteRequest) String() string

type SendToRouteResponse

type SendToRouteResponse struct {

	// The preimage obtained by making the payment.
	Preimage []byte `protobuf:"bytes,1,opt,name=preimage,proto3" json:"preimage,omitempty"`
	// The failure message in case the payment failed.
	Failure *lnrpc.Failure `protobuf:"bytes,2,opt,name=failure,proto3" json:"failure,omitempty"`
	// contains filtered or unexported fields
}

func (*SendToRouteResponse) Descriptor deprecated

func (*SendToRouteResponse) Descriptor() ([]byte, []int)

Deprecated: Use SendToRouteResponse.ProtoReflect.Descriptor instead.

func (*SendToRouteResponse) GetFailure

func (x *SendToRouteResponse) GetFailure() *lnrpc.Failure

func (*SendToRouteResponse) GetPreimage

func (x *SendToRouteResponse) GetPreimage() []byte

func (*SendToRouteResponse) ProtoMessage

func (*SendToRouteResponse) ProtoMessage()

func (*SendToRouteResponse) ProtoReflect

func (x *SendToRouteResponse) ProtoReflect() protoreflect.Message

func (*SendToRouteResponse) Reset

func (x *SendToRouteResponse) Reset()

func (*SendToRouteResponse) String

func (x *SendToRouteResponse) String() string

type Server

type Server struct {

	// Required by the grpc-gateway/v2 library for forward compatibility.
	// Must be after the atomically used variables to not break struct
	// alignment.
	UnimplementedRouterServer
	// contains filtered or unexported fields
}

Server is a stand alone sub RPC server which exposes functionality that allows clients to route arbitrary payment through the Lightning Network.

func New

func New(cfg *Config) (*Server, lnrpc.MacaroonPerms, error)

New creates a new instance of the RouterServer given a configuration struct that contains all external dependencies. If the target macaroon exists, and we're unable to create it, then an error will be returned. We also return the set of permissions that we require as a server. At the time of writing of this documentation, this is the same macaroon as as the admin macaroon.

func (*Server) BuildRoute

func (s *Server) BuildRoute(ctx context.Context,
	req *BuildRouteRequest) (*BuildRouteResponse, error)

BuildRoute builds a route from a list of hop addresses.

func (*Server) EstimateRouteFee

func (s *Server) EstimateRouteFee(ctx context.Context,
	req *RouteFeeRequest) (*RouteFeeResponse, error)

EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it may cost to send an HTLC to the target end destination.

func (*Server) GetMissionControlConfig

GetMissionControlConfig returns our current mission control config.

func (*Server) HtlcInterceptor

func (s *Server) HtlcInterceptor(stream Router_HtlcInterceptorServer) error

HtlcInterceptor is a bidirectional stream for streaming interception requests to the caller. Upon connection it does the following: 1. Check if there is already a live stream, if yes it rejects the request. 2. 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

func (s *Server) Name() string

Name returns a unique string representation of the sub-server. This can be used to identify the sub-server and also de-duplicate them.

NOTE: This is part of the lnrpc.SubServer interface.

func (*Server) QueryMissionControl

func (s *Server) QueryMissionControl(ctx context.Context,
	req *QueryMissionControlRequest) (*QueryMissionControlResponse, error)

QueryMissionControl exposes the internal mission control state to callers. It is a development feature.

func (*Server) QueryProbability

func (s *Server) QueryProbability(ctx context.Context,
	req *QueryProbabilityRequest) (*QueryProbabilityResponse, error)

QueryProbability returns the current success probability estimate for a given node pair and amount.

func (*Server) ResetMissionControl

func (s *Server) ResetMissionControl(ctx context.Context,
	req *ResetMissionControlRequest) (*ResetMissionControlResponse, error)

ResetMissionControl clears all mission control state and starts with a clean slate.

func (*Server) SendPayment

func (s *Server) SendPayment(request *SendPaymentRequest,
	stream Router_SendPaymentServer) error

SendPayment attempts to route a payment described by the passed PaymentRequest to the final destination. If we are unable to route the payment, or cannot find a route that satisfies the constraints in the PaymentRequest, then an error will be returned. Otherwise, the payment pre-image, along with the final route will be returned.

func (*Server) SendPaymentV2

func (s *Server) SendPaymentV2(req *SendPaymentRequest,
	stream Router_SendPaymentV2Server) error

SendPaymentV2 attempts to route a payment described by the passed PaymentRequest to the final destination. If we are unable to route the payment, or cannot find a route that satisfies the constraints in the PaymentRequest, then an error will be returned. Otherwise, the payment pre-image, along with the final route will be returned.

func (*Server) SendToRoute

func (s *Server) SendToRoute(ctx context.Context,
	req *SendToRouteRequest) (*SendToRouteResponse, error)

SendToRoute sends a payment through a predefined route. The response of this call contains structured error information.

func (*Server) SendToRouteV2

func (s *Server) SendToRouteV2(ctx context.Context,
	req *SendToRouteRequest) (*lnrpc.HTLCAttempt, error)

SendToRouteV2 sends a payment through a predefined route. The response of this call contains structured error information.

func (*Server) SetMissionControlConfig

SetMissionControlConfig returns our current mission control config.

func (*Server) Start

func (s *Server) Start() error

Start launches any helper goroutines required for the rpcServer to function.

NOTE: This is part of the lnrpc.SubServer interface.

func (*Server) Stop

func (s *Server) Stop() error

Stop signals any active goroutines for a graceful closure.

NOTE: This is part of the lnrpc.SubServer interface.

func (*Server) SubscribeHtlcEvents

func (s *Server) SubscribeHtlcEvents(req *SubscribeHtlcEventsRequest,
	stream Router_SubscribeHtlcEventsServer) error

SubscribeHtlcEvents creates a uni-directional stream from the server to the client which delivers a stream of htlc events.

func (*Server) TrackPayment

func (s *Server) TrackPayment(request *TrackPaymentRequest,
	stream Router_TrackPaymentServer) error

TrackPayment returns a stream of payment state updates. The stream is closed when the payment completes.

func (*Server) TrackPaymentV2

func (s *Server) TrackPaymentV2(request *TrackPaymentRequest,
	stream Router_TrackPaymentV2Server) error

TrackPaymentV2 returns a stream of payment state updates. The stream is closed when the payment completes.

func (*Server) UpdateChanStatus

func (s *Server) UpdateChanStatus(ctx context.Context,
	req *UpdateChanStatusRequest) (*UpdateChanStatusResponse, error)

UpdateChanStatus allows channel state to be set manually.

func (*Server) XImportMissionControl

XImportMissionControl imports the state provided to our internal mission control. Only entries that are fresher than our existing state will be used.

type ServerShell

type ServerShell struct {
	RouterServer
}

ServerShell a is shell struct holding a reference to the actual sub-server. It is used to register the gRPC sub-server with the root server before we have the necessary dependencies to populate the actual sub-server.

func (*ServerShell) CreateSubServer

func (r *ServerShell) CreateSubServer(configRegistry lnrpc.SubServerConfigDispatcher) (
	lnrpc.SubServer, lnrpc.MacaroonPerms, error)

CreateSubServer populates the subserver's dependencies using the passed SubServerConfigDispatcher. This method should fully initialize the sub-server instance, making it ready for action. It returns the macaroon permissions that the sub-server wishes to pass on to the root server for all methods routed towards it.

NOTE: This is part of the lnrpc.GrpcHandler interface.

func (*ServerShell) RegisterWithRestServer

func (r *ServerShell) RegisterWithRestServer(ctx context.Context,
	mux *runtime.ServeMux, dest string, opts []grpc.DialOption) error

RegisterWithRestServer will be called by the root REST mux to direct a sub RPC server to register itself with the main REST mux server. Until this is called, each sub-server won't be able to have requests routed towards it.

NOTE: This is part of the lnrpc.GrpcHandler interface.

func (*ServerShell) RegisterWithRootServer

func (r *ServerShell) RegisterWithRootServer(grpcServer *grpc.Server) error

RegisterWithRootServer will be called by the root gRPC server to direct a sub RPC server to register itself with the main gRPC root server. Until this is called, each sub-server won't be able to have requests routed towards it.

NOTE: This is part of the lnrpc.GrpcHandler interface.

type SetMissionControlConfigRequest

type SetMissionControlConfigRequest struct {

	//
	//The config to set for mission control. Note that all values *must* be set,
	//because the full config will be applied.
	Config *MissionControlConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

func (*SetMissionControlConfigRequest) Descriptor deprecated

func (*SetMissionControlConfigRequest) Descriptor() ([]byte, []int)

Deprecated: Use SetMissionControlConfigRequest.ProtoReflect.Descriptor instead.

func (*SetMissionControlConfigRequest) GetConfig

func (*SetMissionControlConfigRequest) ProtoMessage

func (*SetMissionControlConfigRequest) ProtoMessage()

func (*SetMissionControlConfigRequest) ProtoReflect

func (*SetMissionControlConfigRequest) Reset

func (x *SetMissionControlConfigRequest) Reset()

func (*SetMissionControlConfigRequest) String

type SetMissionControlConfigResponse

type SetMissionControlConfigResponse struct {
	// contains filtered or unexported fields
}

func (*SetMissionControlConfigResponse) Descriptor deprecated

func (*SetMissionControlConfigResponse) Descriptor() ([]byte, []int)

Deprecated: Use SetMissionControlConfigResponse.ProtoReflect.Descriptor instead.

func (*SetMissionControlConfigResponse) ProtoMessage

func (*SetMissionControlConfigResponse) ProtoMessage()

func (*SetMissionControlConfigResponse) ProtoReflect

func (*SetMissionControlConfigResponse) Reset

func (*SetMissionControlConfigResponse) String

type SettleEvent

type SettleEvent struct {

	// The revealed preimage.
	Preimage []byte `protobuf:"bytes,1,opt,name=preimage,proto3" json:"preimage,omitempty"`
	// contains filtered or unexported fields
}

func (*SettleEvent) Descriptor deprecated

func (*SettleEvent) Descriptor() ([]byte, []int)

Deprecated: Use SettleEvent.ProtoReflect.Descriptor instead.

func (*SettleEvent) GetPreimage

func (x *SettleEvent) GetPreimage() []byte

func (*SettleEvent) ProtoMessage

func (*SettleEvent) ProtoMessage()

func (*SettleEvent) ProtoReflect

func (x *SettleEvent) ProtoReflect() protoreflect.Message

func (*SettleEvent) Reset

func (x *SettleEvent) Reset()

func (*SettleEvent) String

func (x *SettleEvent) String() string

type SubscribeHtlcEventsRequest

type SubscribeHtlcEventsRequest struct {
	// contains filtered or unexported fields
}

func (*SubscribeHtlcEventsRequest) Descriptor deprecated

func (*SubscribeHtlcEventsRequest) Descriptor() ([]byte, []int)

Deprecated: Use SubscribeHtlcEventsRequest.ProtoReflect.Descriptor instead.

func (*SubscribeHtlcEventsRequest) ProtoMessage

func (*SubscribeHtlcEventsRequest) ProtoMessage()

func (*SubscribeHtlcEventsRequest) ProtoReflect

func (*SubscribeHtlcEventsRequest) Reset

func (x *SubscribeHtlcEventsRequest) Reset()

func (*SubscribeHtlcEventsRequest) String

func (x *SubscribeHtlcEventsRequest) String() string

type TrackPaymentRequest

type TrackPaymentRequest struct {

	// The hash of the payment to look up.
	PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
	//
	//If set, only the final payment update is streamed back. Intermediate updates
	//that show which htlcs are still in flight are suppressed.
	NoInflightUpdates bool `protobuf:"varint,2,opt,name=no_inflight_updates,json=noInflightUpdates,proto3" json:"no_inflight_updates,omitempty"`
	// contains filtered or unexported fields
}

func (*TrackPaymentRequest) Descriptor deprecated

func (*TrackPaymentRequest) Descriptor() ([]byte, []int)

Deprecated: Use TrackPaymentRequest.ProtoReflect.Descriptor instead.

func (*TrackPaymentRequest) GetNoInflightUpdates

func (x *TrackPaymentRequest) GetNoInflightUpdates() bool

func (*TrackPaymentRequest) GetPaymentHash

func (x *TrackPaymentRequest) GetPaymentHash() []byte

func (*TrackPaymentRequest) ProtoMessage

func (*TrackPaymentRequest) ProtoMessage()

func (*TrackPaymentRequest) ProtoReflect

func (x *TrackPaymentRequest) ProtoReflect() protoreflect.Message

func (*TrackPaymentRequest) Reset

func (x *TrackPaymentRequest) Reset()

func (*TrackPaymentRequest) String

func (x *TrackPaymentRequest) String() string

type UnimplementedRouterServer

type UnimplementedRouterServer struct {
}

UnimplementedRouterServer must be embedded to have forward compatible implementations.

func (UnimplementedRouterServer) BuildRoute

func (UnimplementedRouterServer) EstimateRouteFee

func (UnimplementedRouterServer) HtlcInterceptor

func (UnimplementedRouterServer) QueryProbability

func (UnimplementedRouterServer) SendPayment

func (UnimplementedRouterServer) SendPaymentV2

func (UnimplementedRouterServer) SendToRoute

func (UnimplementedRouterServer) SendToRouteV2

func (UnimplementedRouterServer) TrackPayment

func (UnimplementedRouterServer) TrackPaymentV2

func (UnimplementedRouterServer) UpdateChanStatus

type UnsafeRouterServer

type UnsafeRouterServer interface {
	// contains filtered or unexported methods
}

UnsafeRouterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RouterServer will result in compilation errors.

type UpdateChanStatusRequest

type UpdateChanStatusRequest struct {
	ChanPoint *lnrpc.ChannelPoint `protobuf:"bytes,1,opt,name=chan_point,json=chanPoint,proto3" json:"chan_point,omitempty"`
	Action    ChanStatusAction    `protobuf:"varint,2,opt,name=action,proto3,enum=routerrpc.ChanStatusAction" json:"action,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateChanStatusRequest) Descriptor deprecated

func (*UpdateChanStatusRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateChanStatusRequest.ProtoReflect.Descriptor instead.

func (*UpdateChanStatusRequest) GetAction

func (*UpdateChanStatusRequest) GetChanPoint

func (x *UpdateChanStatusRequest) GetChanPoint() *lnrpc.ChannelPoint

func (*UpdateChanStatusRequest) ProtoMessage

func (*UpdateChanStatusRequest) ProtoMessage()

func (*UpdateChanStatusRequest) ProtoReflect

func (x *UpdateChanStatusRequest) ProtoReflect() protoreflect.Message

func (*UpdateChanStatusRequest) Reset

func (x *UpdateChanStatusRequest) Reset()

func (*UpdateChanStatusRequest) String

func (x *UpdateChanStatusRequest) String() string

type UpdateChanStatusResponse

type UpdateChanStatusResponse struct {
	// contains filtered or unexported fields
}

func (*UpdateChanStatusResponse) Descriptor deprecated

func (*UpdateChanStatusResponse) Descriptor() ([]byte, []int)

Deprecated: Use UpdateChanStatusResponse.ProtoReflect.Descriptor instead.

func (*UpdateChanStatusResponse) ProtoMessage

func (*UpdateChanStatusResponse) ProtoMessage()

func (*UpdateChanStatusResponse) ProtoReflect

func (x *UpdateChanStatusResponse) ProtoReflect() protoreflect.Message

func (*UpdateChanStatusResponse) Reset

func (x *UpdateChanStatusResponse) Reset()

func (*UpdateChanStatusResponse) String

func (x *UpdateChanStatusResponse) String() string

type XImportMissionControlRequest

type XImportMissionControlRequest struct {

	// Node pair-level mission control state to be imported.
	Pairs []*PairHistory `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs,omitempty"`
	// Whether to force override MC pair history. Note that even with force
	// override the failure pair is imported before the success pair and both
	// still clamp existing failure/success amounts.
	Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"`
	// contains filtered or unexported fields
}

func (*XImportMissionControlRequest) Descriptor deprecated

func (*XImportMissionControlRequest) Descriptor() ([]byte, []int)

Deprecated: Use XImportMissionControlRequest.ProtoReflect.Descriptor instead.

func (*XImportMissionControlRequest) GetForce

func (x *XImportMissionControlRequest) GetForce() bool

func (*XImportMissionControlRequest) GetPairs

func (x *XImportMissionControlRequest) GetPairs() []*PairHistory

func (*XImportMissionControlRequest) ProtoMessage

func (*XImportMissionControlRequest) ProtoMessage()

func (*XImportMissionControlRequest) ProtoReflect

func (*XImportMissionControlRequest) Reset

func (x *XImportMissionControlRequest) Reset()

func (*XImportMissionControlRequest) String

type XImportMissionControlResponse

type XImportMissionControlResponse struct {
	// contains filtered or unexported fields
}

func (*XImportMissionControlResponse) Descriptor deprecated

func (*XImportMissionControlResponse) Descriptor() ([]byte, []int)

Deprecated: Use XImportMissionControlResponse.ProtoReflect.Descriptor instead.

func (*XImportMissionControlResponse) ProtoMessage

func (*XImportMissionControlResponse) ProtoMessage()

func (*XImportMissionControlResponse) ProtoReflect

func (*XImportMissionControlResponse) Reset

func (x *XImportMissionControlResponse) Reset()

func (*XImportMissionControlResponse) String

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL