frdrpc

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 23 Imported by: 3

README

frdrpc

This package implements faraday's RPC client and server.

Generate protobuf definitions

  1. Follow the installation steps provided in lnd's installation instructions.

  2. Run gen_protos.sh to generate new protobuf definitions.

Documentation

Overview

Package frdrpc contains the proto files and generated code for faraday's grpc server which serves requests for close recommendations.

Package frdrpc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	Granularity_name = map[int32]string{
		0: "UNKNOWN_GRANULARITY",
		1: "MINUTE",
		2: "FIVE_MINUTES",
		3: "FIFTEEN_MINUTES",
		4: "THIRTY_MINUTES",
		5: "HOUR",
		6: "SIX_HOURS",
		7: "TWELVE_HOURS",
		8: "DAY",
	}
	Granularity_value = map[string]int32{
		"UNKNOWN_GRANULARITY": 0,
		"MINUTE":              1,
		"FIVE_MINUTES":        2,
		"FIFTEEN_MINUTES":     3,
		"THIRTY_MINUTES":      4,
		"HOUR":                5,
		"SIX_HOURS":           6,
		"TWELVE_HOURS":        7,
		"DAY":                 8,
	}
)

Enum value maps for Granularity.

View Source
var (
	FiatBackend_name = map[int32]string{
		0: "UNKNOWN_FIATBACKEND",
		1: "COINCAP",
		2: "COINDESK",
		3: "CUSTOM",
		4: "COINGECKO",
		5: "BITFINEX",
	}
	FiatBackend_value = map[string]int32{
		"UNKNOWN_FIATBACKEND": 0,
		"COINCAP":             1,
		"COINDESK":            2,
		"CUSTOM":              3,
		"COINGECKO":           4,
		"BITFINEX":            5,
	}
)

Enum value maps for FiatBackend.

View Source
var (
	EntryType_name = map[int32]string{
		0:  "UNKNOWN",
		1:  "LOCAL_CHANNEL_OPEN",
		2:  "REMOTE_CHANNEL_OPEN",
		3:  "CHANNEL_OPEN_FEE",
		4:  "CHANNEL_CLOSE",
		5:  "RECEIPT",
		6:  "PAYMENT",
		7:  "FEE",
		8:  "CIRCULAR_RECEIPT",
		9:  "FORWARD",
		10: "FORWARD_FEE",
		11: "CIRCULAR_PAYMENT",
		12: "CIRCULAR_FEE",
		13: "SWEEP",
		14: "SWEEP_FEE",
		15: "CHANNEL_CLOSE_FEE",
	}
	EntryType_value = map[string]int32{
		"UNKNOWN":             0,
		"LOCAL_CHANNEL_OPEN":  1,
		"REMOTE_CHANNEL_OPEN": 2,
		"CHANNEL_OPEN_FEE":    3,
		"CHANNEL_CLOSE":       4,
		"RECEIPT":             5,
		"PAYMENT":             6,
		"FEE":                 7,
		"CIRCULAR_RECEIPT":    8,
		"FORWARD":             9,
		"FORWARD_FEE":         10,
		"CIRCULAR_PAYMENT":    11,
		"CIRCULAR_FEE":        12,
		"SWEEP":               13,
		"SWEEP_FEE":           14,
		"CHANNEL_CLOSE_FEE":   15,
	}
)

Enum value maps for EntryType.

View Source
var (
	ChannelEventType_name = map[int32]string{
		0: "CHAN_EVENT_UNKNOWN",
		1: "CHAN_EVENT_ONLINE",
		2: "CHAN_EVENT_OFFLINE",
		3: "CHAN_EVENT_UPDATE",
	}
	ChannelEventType_value = map[string]int32{
		"CHAN_EVENT_UNKNOWN": 0,
		"CHAN_EVENT_ONLINE":  1,
		"CHAN_EVENT_OFFLINE": 2,
		"CHAN_EVENT_UPDATE":  3,
	}
)

Enum value maps for ChannelEventType.

View Source
var (
	CloseRecommendationRequest_Metric_name = map[int32]string{
		0: "UNKNOWN",
		1: "UPTIME",
		2: "REVENUE",
		3: "INCOMING_VOLUME",
		4: "OUTGOING_VOLUME",
		5: "TOTAL_VOLUME",
	}
	CloseRecommendationRequest_Metric_value = map[string]int32{
		"UNKNOWN":         0,
		"UPTIME":          1,
		"REVENUE":         2,
		"INCOMING_VOLUME": 3,
		"OUTGOING_VOLUME": 4,
		"TOTAL_VOLUME":    5,
	}
)

Enum value maps for CloseRecommendationRequest_Metric.

View Source
var FaradayServer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "frdrpc.FaradayServer",
	HandlerType: (*FaradayServerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "OutlierRecommendations",
			Handler:    _FaradayServer_OutlierRecommendations_Handler,
		},
		{
			MethodName: "ThresholdRecommendations",
			Handler:    _FaradayServer_ThresholdRecommendations_Handler,
		},
		{
			MethodName: "RevenueReport",
			Handler:    _FaradayServer_RevenueReport_Handler,
		},
		{
			MethodName: "ChannelInsights",
			Handler:    _FaradayServer_ChannelInsights_Handler,
		},
		{
			MethodName: "ExchangeRate",
			Handler:    _FaradayServer_ExchangeRate_Handler,
		},
		{
			MethodName: "NodeAudit",
			Handler:    _FaradayServer_NodeAudit_Handler,
		},
		{
			MethodName: "CloseReport",
			Handler:    _FaradayServer_CloseReport_Handler,
		},
		{
			MethodName: "GetChannelEvents",
			Handler:    _FaradayServer_GetChannelEvents_Handler,
		},
		{
			MethodName: "ForwardingAbility",
			Handler:    _FaradayServer_ForwardingAbility_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "faraday.proto",
}

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

View Source
var File_faraday_proto protoreflect.FileDescriptor

Functions

func DecodeForwardingAbility added in v1.0.2

func DecodeForwardingAbility(resp *ForwardingAbilityResponse) (
	map[string]map[string]ForwardingAbility, error)

DecodeForwardingAbility reconstructs the nested map of peer forwarding abilities from a sparse packed gRPC response. Forwarded pairs come back with their exact facts; up-but-idle pairs flagged in the bitmask come back at full window uptime with no forwards, and therefore no volume and no fees. It validates packed indices and the bitmask length against the decoded peer list to prevent out-of-bounds errors.

func MinQualifyingUptime added in v1.0.2

func MinQualifyingUptime(threshold float64, windowSeconds int64) uint64

MinQualifyingUptime converts an uptime fraction threshold into the smallest whole-second uptime that clears it over the given window. It is the single source of truth shared by the encoder (to bucket pairs) and the server (to apply the node-down guard), so the two cannot drift. A pair clears the threshold when EffectiveUptimeS >= the returned value, matching the "at least the threshold fraction" contract. The result is floored at one second so a pair with zero uptime is never treated as up. A non-positive window admits nothing.

func RegisterFaradayServerHandler

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

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

func RegisterFaradayServerHandlerClient

func RegisterFaradayServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FaradayServerClient) error

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

func RegisterFaradayServerHandlerFromEndpoint

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

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

func RegisterFaradayServerHandlerServer

func RegisterFaradayServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FaradayServerServer) error

RegisterFaradayServerHandlerServer registers the http handlers for service FaradayServer to "mux". UnaryRPC :call FaradayServerServer 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 RegisterFaradayServerHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.

func RegisterFaradayServerJSONCallbacks

func RegisterFaradayServerJSONCallbacks(registry map[string]func(ctx context.Context,
	conn *grpc.ClientConn, reqJSON string, callback func(string, error)))

func RegisterFaradayServerServer

func RegisterFaradayServerServer(s grpc.ServiceRegistrar, srv FaradayServerServer)

Types

type BitcoinPrice

type BitcoinPrice struct {

	// The price of 1 BTC, expressed in USD.
	Price string `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"`
	// The timestamp for this price price provided.
	PriceTimestamp uint64 `protobuf:"varint,2,opt,name=price_timestamp,json=priceTimestamp,proto3" json:"price_timestamp,omitempty"`
	// The currency that the price is denoted in.
	Currency string `protobuf:"bytes,3,opt,name=currency,proto3" json:"currency,omitempty"`
	// contains filtered or unexported fields
}

func (*BitcoinPrice) Descriptor deprecated

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

Deprecated: Use BitcoinPrice.ProtoReflect.Descriptor instead.

func (*BitcoinPrice) GetCurrency

func (x *BitcoinPrice) GetCurrency() string

func (*BitcoinPrice) GetPrice

func (x *BitcoinPrice) GetPrice() string

func (*BitcoinPrice) GetPriceTimestamp

func (x *BitcoinPrice) GetPriceTimestamp() uint64

func (*BitcoinPrice) ProtoMessage

func (*BitcoinPrice) ProtoMessage()

func (*BitcoinPrice) ProtoReflect

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

func (*BitcoinPrice) Reset

func (x *BitcoinPrice) Reset()

func (*BitcoinPrice) String

func (x *BitcoinPrice) String() string

type ChannelEvent added in v1.0.2

type ChannelEvent struct {

	// The timestamp of the event, as Unix seconds.
	Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// The type of the event.
	EventType ChannelEventType `protobuf:"varint,2,opt,name=event_type,json=eventType,proto3,enum=frdrpc.ChannelEventType" json:"event_type,omitempty"`
	// The channel's local balance at the time of the event in sat.
	LocalBalance uint64 `protobuf:"varint,3,opt,name=local_balance,json=localBalance,proto3" json:"local_balance,omitempty"`
	// The channel's remote balance at the time of the event in sat.
	RemoteBalance uint64 `protobuf:"varint,4,opt,name=remote_balance,json=remoteBalance,proto3" json:"remote_balance,omitempty"`
	// Server-assigned monotonic identity. Echo this back as the next
	// request's last_id when paginating.
	Id int64 `protobuf:"varint,5,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*ChannelEvent) Descriptor deprecated added in v1.0.2

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

Deprecated: Use ChannelEvent.ProtoReflect.Descriptor instead.

func (*ChannelEvent) GetEventType added in v1.0.2

func (x *ChannelEvent) GetEventType() ChannelEventType

func (*ChannelEvent) GetId added in v1.0.2

func (x *ChannelEvent) GetId() int64

func (*ChannelEvent) GetLocalBalance added in v1.0.2

func (x *ChannelEvent) GetLocalBalance() uint64

func (*ChannelEvent) GetRemoteBalance added in v1.0.2

func (x *ChannelEvent) GetRemoteBalance() uint64

func (*ChannelEvent) GetTimestamp added in v1.0.2

func (x *ChannelEvent) GetTimestamp() int64

func (*ChannelEvent) ProtoMessage added in v1.0.2

func (*ChannelEvent) ProtoMessage()

func (*ChannelEvent) ProtoReflect added in v1.0.2

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

func (*ChannelEvent) Reset added in v1.0.2

func (x *ChannelEvent) Reset()

func (*ChannelEvent) String added in v1.0.2

func (x *ChannelEvent) String() string

type ChannelEventType added in v1.0.2

type ChannelEventType int32
const (
	// An unknown event type.
	ChannelEventType_CHAN_EVENT_UNKNOWN ChannelEventType = 0
	// An online event.
	ChannelEventType_CHAN_EVENT_ONLINE ChannelEventType = 1
	// An offline event.
	ChannelEventType_CHAN_EVENT_OFFLINE ChannelEventType = 2
	// A channel balance update event.
	ChannelEventType_CHAN_EVENT_UPDATE ChannelEventType = 3
)

func (ChannelEventType) Descriptor added in v1.0.2

func (ChannelEventType) Enum added in v1.0.2

func (ChannelEventType) EnumDescriptor deprecated added in v1.0.2

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

Deprecated: Use ChannelEventType.Descriptor instead.

func (ChannelEventType) Number added in v1.0.2

func (ChannelEventType) String added in v1.0.2

func (x ChannelEventType) String() string

func (ChannelEventType) Type added in v1.0.2

type ChannelEventsRequest added in v1.0.2

type ChannelEventsRequest struct {

	// The channel point of the channel to get events for, formatted txid:outpoint.
	ChanPoint string `protobuf:"bytes,1,opt,name=chan_point,json=chanPoint,proto3" json:"chan_point,omitempty"`
	// Lower time bound, inclusive, as Unix seconds. Independent filter — does
	// not need to advance between paginated calls. Zero means no lower bound.
	StartTime int64 `protobuf:"varint,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// Upper time bound, exclusive, as Unix seconds. Must be greater than or
	// equal to start_time. Zero means "use the server's current time".
	EndTime int64 `protobuf:"varint,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	// The maximum number of events to return. If zero, the server default is
	// used. The server enforces a hard cap; values above the cap are clamped.
	MaxEvents uint32 `protobuf:"varint,4,opt,name=max_events,json=maxEvents,proto3" json:"max_events,omitempty"`
	// Pagination cursor: id of the last event from the previous response.
	// Pass zero on the first call; for subsequent calls pass the response's
	// last_id to resume past already-returned events.
	LastId int64 `protobuf:"varint,5,opt,name=last_id,json=lastId,proto3" json:"last_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ChannelEventsRequest) Descriptor deprecated added in v1.0.2

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

Deprecated: Use ChannelEventsRequest.ProtoReflect.Descriptor instead.

func (*ChannelEventsRequest) GetChanPoint added in v1.0.2

func (x *ChannelEventsRequest) GetChanPoint() string

func (*ChannelEventsRequest) GetEndTime added in v1.0.2

func (x *ChannelEventsRequest) GetEndTime() int64

func (*ChannelEventsRequest) GetLastId added in v1.0.2

func (x *ChannelEventsRequest) GetLastId() int64

func (*ChannelEventsRequest) GetMaxEvents added in v1.0.2

func (x *ChannelEventsRequest) GetMaxEvents() uint32

func (*ChannelEventsRequest) GetStartTime added in v1.0.2

func (x *ChannelEventsRequest) GetStartTime() int64

func (*ChannelEventsRequest) ProtoMessage added in v1.0.2

func (*ChannelEventsRequest) ProtoMessage()

func (*ChannelEventsRequest) ProtoReflect added in v1.0.2

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

func (*ChannelEventsRequest) Reset added in v1.0.2

func (x *ChannelEventsRequest) Reset()

func (*ChannelEventsRequest) String added in v1.0.2

func (x *ChannelEventsRequest) String() string

type ChannelEventsResponse added in v1.0.2

type ChannelEventsResponse struct {

	// The list of channel events.
	Events []*ChannelEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
	// Id of the last event returned, suitable as the next request's last_id.
	// Zero when events is empty.
	LastId int64 `protobuf:"varint,2,opt,name=last_id,json=lastId,proto3" json:"last_id,omitempty"`
	// True when the page filled to the requested limit and more events may be
	// available; callers should keep paginating until this is false.
	HasMore bool `protobuf:"varint,3,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"`
	// contains filtered or unexported fields
}

func (*ChannelEventsResponse) Descriptor deprecated added in v1.0.2

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

Deprecated: Use ChannelEventsResponse.ProtoReflect.Descriptor instead.

func (*ChannelEventsResponse) GetEvents added in v1.0.2

func (x *ChannelEventsResponse) GetEvents() []*ChannelEvent

func (*ChannelEventsResponse) GetHasMore added in v1.0.2

func (x *ChannelEventsResponse) GetHasMore() bool

func (*ChannelEventsResponse) GetLastId added in v1.0.2

func (x *ChannelEventsResponse) GetLastId() int64

func (*ChannelEventsResponse) ProtoMessage added in v1.0.2

func (*ChannelEventsResponse) ProtoMessage()

func (*ChannelEventsResponse) ProtoReflect added in v1.0.2

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

func (*ChannelEventsResponse) Reset added in v1.0.2

func (x *ChannelEventsResponse) Reset()

func (*ChannelEventsResponse) String added in v1.0.2

func (x *ChannelEventsResponse) String() string

type ChannelInsight

type ChannelInsight struct {

	// The outpoint of the channel's funding transaction.
	ChanPoint string `protobuf:"bytes,1,opt,name=chan_point,json=chanPoint,proto3" json:"chan_point,omitempty"`
	// The amount of time in seconds that we have monitored the channel peer's
	// uptime for.
	MonitoredSeconds uint64 `protobuf:"varint,2,opt,name=monitored_seconds,json=monitoredSeconds,proto3" json:"monitored_seconds,omitempty"`
	// The amount of time in seconds that the channel peer has been online over
	// the period it has been monitored for.
	UptimeSeconds uint64 `protobuf:"varint,3,opt,name=uptime_seconds,json=uptimeSeconds,proto3" json:"uptime_seconds,omitempty"`
	// The volume, in millisatoshis, that has been forwarded with this channel as
	// the incoming channel.
	VolumeIncomingMsat int64 `protobuf:"varint,4,opt,name=volume_incoming_msat,json=volumeIncomingMsat,proto3" json:"volume_incoming_msat,omitempty"`
	// The volume, in millisatoshis, that has been forwarded with this channel as
	// the outgoing channel.
	VolumeOutgoingMsat int64 `protobuf:"varint,5,opt,name=volume_outgoing_msat,json=volumeOutgoingMsat,proto3" json:"volume_outgoing_msat,omitempty"`
	// The total fees earned by this channel for its participation in forwards,
	// expressed in millisatoshis. Note that we attribute fees evenly across
	// incoming and outgoing channels.
	FeesEarnedMsat int64 `protobuf:"varint,6,opt,name=fees_earned_msat,json=feesEarnedMsat,proto3" json:"fees_earned_msat,omitempty"`
	// The number of confirmations the funding transaction has.
	Confirmations uint32 `protobuf:"varint,7,opt,name=confirmations,proto3" json:"confirmations,omitempty"`
	// True if the channel is private.
	Private bool `protobuf:"varint,8,opt,name=private,proto3" json:"private,omitempty"`
	// contains filtered or unexported fields
}

func (*ChannelInsight) Descriptor deprecated

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

Deprecated: Use ChannelInsight.ProtoReflect.Descriptor instead.

func (*ChannelInsight) GetChanPoint

func (x *ChannelInsight) GetChanPoint() string

func (*ChannelInsight) GetConfirmations

func (x *ChannelInsight) GetConfirmations() uint32

func (*ChannelInsight) GetFeesEarnedMsat

func (x *ChannelInsight) GetFeesEarnedMsat() int64

func (*ChannelInsight) GetMonitoredSeconds

func (x *ChannelInsight) GetMonitoredSeconds() uint64

func (*ChannelInsight) GetPrivate

func (x *ChannelInsight) GetPrivate() bool

func (*ChannelInsight) GetUptimeSeconds

func (x *ChannelInsight) GetUptimeSeconds() uint64

func (*ChannelInsight) GetVolumeIncomingMsat

func (x *ChannelInsight) GetVolumeIncomingMsat() int64

func (*ChannelInsight) GetVolumeOutgoingMsat

func (x *ChannelInsight) GetVolumeOutgoingMsat() int64

func (*ChannelInsight) ProtoMessage

func (*ChannelInsight) ProtoMessage()

func (*ChannelInsight) ProtoReflect

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

func (*ChannelInsight) Reset

func (x *ChannelInsight) Reset()

func (*ChannelInsight) String

func (x *ChannelInsight) String() string

type ChannelInsightsRequest

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

func (*ChannelInsightsRequest) Descriptor deprecated

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

Deprecated: Use ChannelInsightsRequest.ProtoReflect.Descriptor instead.

func (*ChannelInsightsRequest) ProtoMessage

func (*ChannelInsightsRequest) ProtoMessage()

func (*ChannelInsightsRequest) ProtoReflect

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

func (*ChannelInsightsRequest) Reset

func (x *ChannelInsightsRequest) Reset()

func (*ChannelInsightsRequest) String

func (x *ChannelInsightsRequest) String() string

type ChannelInsightsResponse

type ChannelInsightsResponse struct {

	// Insights for the set of currently open channels.
	ChannelInsights []*ChannelInsight `protobuf:"bytes,1,rep,name=channel_insights,json=channelInsights,proto3" json:"channel_insights,omitempty"`
	// contains filtered or unexported fields
}

func (*ChannelInsightsResponse) Descriptor deprecated

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

Deprecated: Use ChannelInsightsResponse.ProtoReflect.Descriptor instead.

func (*ChannelInsightsResponse) GetChannelInsights

func (x *ChannelInsightsResponse) GetChannelInsights() []*ChannelInsight

func (*ChannelInsightsResponse) ProtoMessage

func (*ChannelInsightsResponse) ProtoMessage()

func (*ChannelInsightsResponse) ProtoReflect

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

func (*ChannelInsightsResponse) Reset

func (x *ChannelInsightsResponse) Reset()

func (*ChannelInsightsResponse) String

func (x *ChannelInsightsResponse) String() string

type CloseRecommendationRequest

type CloseRecommendationRequest struct {

	// The minimum amount of time in seconds that a channel should have been
	// monitored by lnd to be eligible for close. This value is in place to
	// protect against closing of newer channels.
	MinimumMonitored int64 `protobuf:"varint,1,opt,name=minimum_monitored,json=minimumMonitored,proto3" json:"minimum_monitored,omitempty"`
	// The data point base close recommendations on. Available options are:
	// Uptime: ratio of channel peer's uptime to the period they have been
	// monitored to.
	// Revenue: the revenue that the channel has produced per block that its
	// funding transaction has been confirmed for.
	Metric CloseRecommendationRequest_Metric `protobuf:"varint,2,opt,name=metric,proto3,enum=frdrpc.CloseRecommendationRequest_Metric" json:"metric,omitempty"`
	// contains filtered or unexported fields
}

func (*CloseRecommendationRequest) Descriptor deprecated

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

Deprecated: Use CloseRecommendationRequest.ProtoReflect.Descriptor instead.

func (*CloseRecommendationRequest) GetMetric

func (*CloseRecommendationRequest) GetMinimumMonitored

func (x *CloseRecommendationRequest) GetMinimumMonitored() int64

func (*CloseRecommendationRequest) ProtoMessage

func (*CloseRecommendationRequest) ProtoMessage()

func (*CloseRecommendationRequest) ProtoReflect

func (*CloseRecommendationRequest) Reset

func (x *CloseRecommendationRequest) Reset()

func (*CloseRecommendationRequest) String

func (x *CloseRecommendationRequest) String() string

type CloseRecommendationRequest_Metric

type CloseRecommendationRequest_Metric int32
const (
	CloseRecommendationRequest_UNKNOWN         CloseRecommendationRequest_Metric = 0
	CloseRecommendationRequest_UPTIME          CloseRecommendationRequest_Metric = 1
	CloseRecommendationRequest_REVENUE         CloseRecommendationRequest_Metric = 2
	CloseRecommendationRequest_INCOMING_VOLUME CloseRecommendationRequest_Metric = 3
	CloseRecommendationRequest_OUTGOING_VOLUME CloseRecommendationRequest_Metric = 4
	CloseRecommendationRequest_TOTAL_VOLUME    CloseRecommendationRequest_Metric = 5
)

func (CloseRecommendationRequest_Metric) Descriptor

func (CloseRecommendationRequest_Metric) Enum

func (CloseRecommendationRequest_Metric) EnumDescriptor deprecated

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

Deprecated: Use CloseRecommendationRequest_Metric.Descriptor instead.

func (CloseRecommendationRequest_Metric) Number

func (CloseRecommendationRequest_Metric) String

func (CloseRecommendationRequest_Metric) Type

type CloseRecommendationsResponse

type CloseRecommendationsResponse struct {

	// The total number of channels, before filtering out channels that are
	// not eligible for close recommendations.
	TotalChannels int32 `protobuf:"varint,1,opt,name=total_channels,json=totalChannels,proto3" json:"total_channels,omitempty"`
	// The number of channels that were considered for close recommendations.
	ConsideredChannels int32 `protobuf:"varint,2,opt,name=considered_channels,json=consideredChannels,proto3" json:"considered_channels,omitempty"`
	// A set of channel close recommendations. The absence of a channel in this
	// set implies that it was not considered for close because it did not meet
	// the criteria for close recommendations (it is private, or has not been
	// monitored for long enough).
	Recommendations []*Recommendation `protobuf:"bytes,3,rep,name=recommendations,proto3" json:"recommendations,omitempty"`
	// contains filtered or unexported fields
}

func (*CloseRecommendationsResponse) Descriptor deprecated

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

Deprecated: Use CloseRecommendationsResponse.ProtoReflect.Descriptor instead.

func (*CloseRecommendationsResponse) GetConsideredChannels

func (x *CloseRecommendationsResponse) GetConsideredChannels() int32

func (*CloseRecommendationsResponse) GetRecommendations

func (x *CloseRecommendationsResponse) GetRecommendations() []*Recommendation

func (*CloseRecommendationsResponse) GetTotalChannels

func (x *CloseRecommendationsResponse) GetTotalChannels() int32

func (*CloseRecommendationsResponse) ProtoMessage

func (*CloseRecommendationsResponse) ProtoMessage()

func (*CloseRecommendationsResponse) ProtoReflect

func (*CloseRecommendationsResponse) Reset

func (x *CloseRecommendationsResponse) Reset()

func (*CloseRecommendationsResponse) String

type CloseReportRequest

type CloseReportRequest struct {

	// The funding outpoint of the channel the report should be created for,
	// formatted txid:outpoint.
	ChannelPoint string `protobuf:"bytes,1,opt,name=channel_point,json=channelPoint,proto3" json:"channel_point,omitempty"`
	// contains filtered or unexported fields
}

func (*CloseReportRequest) Descriptor deprecated

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

Deprecated: Use CloseReportRequest.ProtoReflect.Descriptor instead.

func (*CloseReportRequest) GetChannelPoint

func (x *CloseReportRequest) GetChannelPoint() string

func (*CloseReportRequest) ProtoMessage

func (*CloseReportRequest) ProtoMessage()

func (*CloseReportRequest) ProtoReflect

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

func (*CloseReportRequest) Reset

func (x *CloseReportRequest) Reset()

func (*CloseReportRequest) String

func (x *CloseReportRequest) String() string

type CloseReportResponse

type CloseReportResponse struct {

	// The funding outpoint of the channel.
	ChannelPoint string `protobuf:"bytes,1,opt,name=channel_point,json=channelPoint,proto3" json:"channel_point,omitempty"`
	// True if we opened the channel, false if the remote peer did.
	ChannelInitiator bool `protobuf:"varint,2,opt,name=channel_initiator,json=channelInitiator,proto3" json:"channel_initiator,omitempty"`
	// The type of close that resolved this channel.
	CloseType string `protobuf:"bytes,3,opt,name=close_type,json=closeType,proto3" json:"close_type,omitempty"`
	// The transaction id of the close transaction that confirmed on chain.
	CloseTxid string `protobuf:"bytes,4,opt,name=close_txid,json=closeTxid,proto3" json:"close_txid,omitempty"`
	// The fee we paid on chain to open this channel in satoshis, note that this
	// field will be zero if the remote party paid.
	OpenFee string `protobuf:"bytes,5,opt,name=open_fee,json=openFee,proto3" json:"open_fee,omitempty"`
	// The fee we paid on chain for the close transaction in staoshis, note that
	// this field will be zero if the remote party paid.
	CloseFee string `protobuf:"bytes,6,opt,name=close_fee,json=closeFee,proto3" json:"close_fee,omitempty"`
	// contains filtered or unexported fields
}

func (*CloseReportResponse) Descriptor deprecated

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

Deprecated: Use CloseReportResponse.ProtoReflect.Descriptor instead.

func (*CloseReportResponse) GetChannelInitiator

func (x *CloseReportResponse) GetChannelInitiator() bool

func (*CloseReportResponse) GetChannelPoint

func (x *CloseReportResponse) GetChannelPoint() string

func (*CloseReportResponse) GetCloseFee

func (x *CloseReportResponse) GetCloseFee() string

func (*CloseReportResponse) GetCloseTxid

func (x *CloseReportResponse) GetCloseTxid() string

func (*CloseReportResponse) GetCloseType

func (x *CloseReportResponse) GetCloseType() string

func (*CloseReportResponse) GetOpenFee

func (x *CloseReportResponse) GetOpenFee() string

func (*CloseReportResponse) ProtoMessage

func (*CloseReportResponse) ProtoMessage()

func (*CloseReportResponse) ProtoReflect

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

func (*CloseReportResponse) Reset

func (x *CloseReportResponse) Reset()

func (*CloseReportResponse) String

func (x *CloseReportResponse) String() string

type CustomCategory

type CustomCategory struct {

	// The name for the custom category which will contain all transactions that
	// are labelled with a string matching one of the regexes provided in
	// label identifiers.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Set to true to apply this category to on chain transactions. Can be set in
	// conjunction with off_chain to apply the category to all transactions.
	OnChain bool `protobuf:"varint,2,opt,name=on_chain,json=onChain,proto3" json:"on_chain,omitempty"`
	// Set to true to apply this category to off chain transactions. Can be set in
	// conjunction with on_chain to apply the category to all transactions.
	OffChain bool `protobuf:"varint,3,opt,name=off_chain,json=offChain,proto3" json:"off_chain,omitempty"`
	// A set of regular expressions which identify transactions by their label as
	// belonging in this custom category. If a label matches any single regex in
	// the set, it is considered to be in the category. These expressions will be
	// matched against various labels that are present in lnd: on chain
	// transactions will be matched against their label field, off chain receipts
	// will be matched against their memo. At present, there is no way to match
	// forwards or off chain payments. These expressions must be unique across
	// custom categories, otherwise faraday will not be able to identify which
	// custom category a transaction belongs in.
	LabelPatterns []string `protobuf:"bytes,5,rep,name=label_patterns,json=labelPatterns,proto3" json:"label_patterns,omitempty"`
	// contains filtered or unexported fields
}

func (*CustomCategory) Descriptor deprecated

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

Deprecated: Use CustomCategory.ProtoReflect.Descriptor instead.

func (*CustomCategory) GetLabelPatterns

func (x *CustomCategory) GetLabelPatterns() []string

func (*CustomCategory) GetName

func (x *CustomCategory) GetName() string

func (*CustomCategory) GetOffChain

func (x *CustomCategory) GetOffChain() bool

func (*CustomCategory) GetOnChain

func (x *CustomCategory) GetOnChain() bool

func (*CustomCategory) ProtoMessage

func (*CustomCategory) ProtoMessage()

func (*CustomCategory) ProtoReflect

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

func (*CustomCategory) Reset

func (x *CustomCategory) Reset()

func (*CustomCategory) String

func (x *CustomCategory) String() string

type EntryType

type EntryType int32
const (
	EntryType_UNKNOWN EntryType = 0
	// A channel opening transaction for a channel opened by our node.
	EntryType_LOCAL_CHANNEL_OPEN EntryType = 1
	// A channel opening transaction for a channel opened by a remote node.
	EntryType_REMOTE_CHANNEL_OPEN EntryType = 2
	// The on chain fee paid to open a channel.
	EntryType_CHANNEL_OPEN_FEE EntryType = 3
	// A channel closing transaction.
	EntryType_CHANNEL_CLOSE EntryType = 4
	// Receipt of funds. On chain this reflects receives, off chain settlement
	// of invoices.
	EntryType_RECEIPT EntryType = 5
	// Payment of funds. On chain this reflects sends, off chain settlement
	// of our payments.
	EntryType_PAYMENT EntryType = 6
	// Payment of fees.
	EntryType_FEE EntryType = 7
	// Receipt of a payment to ourselves.
	EntryType_CIRCULAR_RECEIPT EntryType = 8
	// A forward through our node.
	EntryType_FORWARD EntryType = 9
	// Fees earned from forwarding.
	EntryType_FORWARD_FEE EntryType = 10
	// Sending of a payment to ourselves.
	EntryType_CIRCULAR_PAYMENT EntryType = 11
	// The fees paid to send an off chain payment to ourselves.
	EntryType_CIRCULAR_FEE EntryType = 12
	// A transaction that sweeps funds back into our wallet's control.
	EntryType_SWEEP EntryType = 13
	// The amount of fees paid for a sweep transaction.
	EntryType_SWEEP_FEE EntryType = 14
	// The fees paid to close a channel.
	EntryType_CHANNEL_CLOSE_FEE EntryType = 15
)

func (EntryType) Descriptor

func (EntryType) Descriptor() protoreflect.EnumDescriptor

func (EntryType) Enum

func (x EntryType) Enum() *EntryType

func (EntryType) EnumDescriptor deprecated

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

Deprecated: Use EntryType.Descriptor instead.

func (EntryType) Number

func (x EntryType) Number() protoreflect.EnumNumber

func (EntryType) String

func (x EntryType) String() string

func (EntryType) Type

type ExchangeRate

type ExchangeRate struct {

	// timestamp is the timestamp of the original request made.
	Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// Price is the bitcoin price approximation for the timestamp queried. Note
	// that this value has its own timestamp because we are not guaranteed to get
	// price points for the exact timestamp that was queried.
	BtcPrice *BitcoinPrice `protobuf:"bytes,2,opt,name=btc_price,json=btcPrice,proto3" json:"btc_price,omitempty"`
	// contains filtered or unexported fields
}

func (*ExchangeRate) Descriptor deprecated

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

Deprecated: Use ExchangeRate.ProtoReflect.Descriptor instead.

func (*ExchangeRate) GetBtcPrice

func (x *ExchangeRate) GetBtcPrice() *BitcoinPrice

func (*ExchangeRate) GetTimestamp

func (x *ExchangeRate) GetTimestamp() uint64

func (*ExchangeRate) ProtoMessage

func (*ExchangeRate) ProtoMessage()

func (*ExchangeRate) ProtoReflect

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

func (*ExchangeRate) Reset

func (x *ExchangeRate) Reset()

func (*ExchangeRate) String

func (x *ExchangeRate) String() string

type ExchangeRateRequest

type ExchangeRateRequest struct {

	// A set of timestamps for which we want the bitcoin price.
	Timestamps []uint64 `protobuf:"varint,3,rep,packed,name=timestamps,proto3" json:"timestamps,omitempty"`
	// The level of granularity at which we want the bitcoin price to be quoted.
	Granularity Granularity `protobuf:"varint,4,opt,name=granularity,proto3,enum=frdrpc.Granularity" json:"granularity,omitempty"`
	// The api to be used for fiat related queries.
	FiatBackend FiatBackend `protobuf:"varint,5,opt,name=fiat_backend,json=fiatBackend,proto3,enum=frdrpc.FiatBackend" json:"fiat_backend,omitempty"`
	// Custom price points to use if the CUSTOM FiatBackend option is set.
	CustomPrices []*BitcoinPrice `protobuf:"bytes,8,rep,name=custom_prices,json=customPrices,proto3" json:"custom_prices,omitempty"`
	// contains filtered or unexported fields
}

func (*ExchangeRateRequest) Descriptor deprecated

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

Deprecated: Use ExchangeRateRequest.ProtoReflect.Descriptor instead.

func (*ExchangeRateRequest) GetCustomPrices

func (x *ExchangeRateRequest) GetCustomPrices() []*BitcoinPrice

func (*ExchangeRateRequest) GetFiatBackend

func (x *ExchangeRateRequest) GetFiatBackend() FiatBackend

func (*ExchangeRateRequest) GetGranularity

func (x *ExchangeRateRequest) GetGranularity() Granularity

func (*ExchangeRateRequest) GetTimestamps

func (x *ExchangeRateRequest) GetTimestamps() []uint64

func (*ExchangeRateRequest) ProtoMessage

func (*ExchangeRateRequest) ProtoMessage()

func (*ExchangeRateRequest) ProtoReflect

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

func (*ExchangeRateRequest) Reset

func (x *ExchangeRateRequest) Reset()

func (*ExchangeRateRequest) String

func (x *ExchangeRateRequest) String() string

type ExchangeRateResponse

type ExchangeRateResponse struct {

	// Rates contains a set of exchange rates for the set of timestamps
	Rates []*ExchangeRate `protobuf:"bytes,2,rep,name=rates,proto3" json:"rates,omitempty"`
	// contains filtered or unexported fields
}

func (*ExchangeRateResponse) Descriptor deprecated

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

Deprecated: Use ExchangeRateResponse.ProtoReflect.Descriptor instead.

func (*ExchangeRateResponse) GetRates

func (x *ExchangeRateResponse) GetRates() []*ExchangeRate

func (*ExchangeRateResponse) ProtoMessage

func (*ExchangeRateResponse) ProtoMessage()

func (*ExchangeRateResponse) ProtoReflect

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

func (*ExchangeRateResponse) Reset

func (x *ExchangeRateResponse) Reset()

func (*ExchangeRateResponse) String

func (x *ExchangeRateResponse) String() string

type FaradayServerClient

type FaradayServerClient interface {
	// * frcli: `outliers`
	// Get close recommendations for currently open channels based on whether it is
	// an outlier.
	//
	// Example request:
	// http://localhost:8466/v1/faraday/outliers/REVENUE?rec_request.minimum_monitored=123
	OutlierRecommendations(ctx context.Context, in *OutlierRecommendationsRequest, opts ...grpc.CallOption) (*CloseRecommendationsResponse, error)
	// * frcli: `threshold`
	// Get close recommendations for currently open channels based whether they are
	// below a set threshold.
	//
	// Example request:
	// http://localhost:8466/v1/faraday/threshold/UPTIME?rec_request.minimum_monitored=123
	ThresholdRecommendations(ctx context.Context, in *ThresholdRecommendationsRequest, opts ...grpc.CallOption) (*CloseRecommendationsResponse, error)
	// * frcli: `revenue`
	// Get a pairwise revenue report for a channel.
	//
	// Example request:
	// http://localhost:8466/v1/faraday/revenue
	RevenueReport(ctx context.Context, in *RevenueReportRequest, opts ...grpc.CallOption) (*RevenueReportResponse, error)
	// * frcli: `insights`
	// List currently open channel with routing and uptime information.
	//
	// Example request:
	// http://localhost:8466/v1/faraday/insights
	ChannelInsights(ctx context.Context, in *ChannelInsightsRequest, opts ...grpc.CallOption) (*ChannelInsightsResponse, error)
	// * frcli:
	// Get fiat prices for btc.
	//
	// Example request:
	// http://localhost:8466/v1/faraday/exchangerate
	ExchangeRate(ctx context.Context, in *ExchangeRateRequest, opts ...grpc.CallOption) (*ExchangeRateResponse, error)
	// *
	// Get a report of your node's activity over a period.
	//
	// Example request:
	// http://localhost:8466/v1/faraday/nodeaudit
	NodeAudit(ctx context.Context, in *NodeAuditRequest, opts ...grpc.CallOption) (*NodeAuditResponse, error)
	// *
	// Get a channel close report for a specific channel.
	//
	// Example request:
	// http://localhost:8466/v1/faraday/closereport
	CloseReport(ctx context.Context, in *CloseReportRequest, opts ...grpc.CallOption) (*CloseReportResponse, error)
	// *
	// Get a list of channel events that occurred for a given channel.
	GetChannelEvents(ctx context.Context, in *ChannelEventsRequest, opts ...grpc.CallOption) (*ChannelEventsResponse, error)
	// *
	// Get forwarding ability analysis of peer pairs.
	ForwardingAbility(ctx context.Context, in *ForwardingAbilityRequest, opts ...grpc.CallOption) (*ForwardingAbilityResponse, error)
}

FaradayServerClient is the client API for FaradayServer service.

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

type FaradayServerServer

type FaradayServerServer interface {
	// * frcli: `outliers`
	// Get close recommendations for currently open channels based on whether it is
	// an outlier.
	//
	// Example request:
	// http://localhost:8466/v1/faraday/outliers/REVENUE?rec_request.minimum_monitored=123
	OutlierRecommendations(context.Context, *OutlierRecommendationsRequest) (*CloseRecommendationsResponse, error)
	// * frcli: `threshold`
	// Get close recommendations for currently open channels based whether they are
	// below a set threshold.
	//
	// Example request:
	// http://localhost:8466/v1/faraday/threshold/UPTIME?rec_request.minimum_monitored=123
	ThresholdRecommendations(context.Context, *ThresholdRecommendationsRequest) (*CloseRecommendationsResponse, error)
	// * frcli: `revenue`
	// Get a pairwise revenue report for a channel.
	//
	// Example request:
	// http://localhost:8466/v1/faraday/revenue
	RevenueReport(context.Context, *RevenueReportRequest) (*RevenueReportResponse, error)
	// * frcli: `insights`
	// List currently open channel with routing and uptime information.
	//
	// Example request:
	// http://localhost:8466/v1/faraday/insights
	ChannelInsights(context.Context, *ChannelInsightsRequest) (*ChannelInsightsResponse, error)
	// * frcli:
	// Get fiat prices for btc.
	//
	// Example request:
	// http://localhost:8466/v1/faraday/exchangerate
	ExchangeRate(context.Context, *ExchangeRateRequest) (*ExchangeRateResponse, error)
	// *
	// Get a report of your node's activity over a period.
	//
	// Example request:
	// http://localhost:8466/v1/faraday/nodeaudit
	NodeAudit(context.Context, *NodeAuditRequest) (*NodeAuditResponse, error)
	// *
	// Get a channel close report for a specific channel.
	//
	// Example request:
	// http://localhost:8466/v1/faraday/closereport
	CloseReport(context.Context, *CloseReportRequest) (*CloseReportResponse, error)
	// *
	// Get a list of channel events that occurred for a given channel.
	GetChannelEvents(context.Context, *ChannelEventsRequest) (*ChannelEventsResponse, error)
	// *
	// Get forwarding ability analysis of peer pairs.
	ForwardingAbility(context.Context, *ForwardingAbilityRequest) (*ForwardingAbilityResponse, error)
	// contains filtered or unexported methods
}

FaradayServerServer is the server API for FaradayServer service. All implementations must embed UnimplementedFaradayServerServer for forward compatibility

type FiatBackend

type FiatBackend int32

FiatBackend is the API endpoint to be used for any fiat related queries.

const (
	FiatBackend_UNKNOWN_FIATBACKEND FiatBackend = 0
	// Use the CoinCap API for fiat price information.
	// This API is reached through the following URL:
	// https://api.coincap.io/v2/assets/bitcoin/history
	FiatBackend_COINCAP FiatBackend = 1
	// Use the CoinDesk API for fiat price information.
	// This API is reached through the following URL:
	// https://api.coindesk.com/v1/bpi/historical/close.json
	FiatBackend_COINDESK FiatBackend = 2
	// Use custom price data provided in a CSV file for fiat price information.
	FiatBackend_CUSTOM FiatBackend = 3
	// Use the CoinGecko API for fiat price information.
	// This API is reached through the following URL:
	// https://api.coingecko.com/api/v3/coins/bitcoin/market_chart
	FiatBackend_COINGECKO FiatBackend = 4
	// Use the Bitfinex API for fiat price information.
	// This API is reached through the following URL:
	// https://api-pub.bitfinex.com/v2/candles/trade:1h:tBTCUSD/hist
	FiatBackend_BITFINEX FiatBackend = 5
)

func (FiatBackend) Descriptor

func (FiatBackend) Enum

func (x FiatBackend) Enum() *FiatBackend

func (FiatBackend) EnumDescriptor deprecated

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

Deprecated: Use FiatBackend.Descriptor instead.

func (FiatBackend) Number

func (x FiatBackend) Number() protoreflect.EnumNumber

func (FiatBackend) String

func (x FiatBackend) String() string

func (FiatBackend) Type

type ForwardingAbility added in v1.0.2

type ForwardingAbility struct {
	// EffectiveUptimeS is the seconds the pair held at least the requested
	// liquidity floor of directional forwardable liquidity over the window.
	// The value is whole seconds: sub-second uptime floors to zero, so a
	// pair that forwarded volume over a fleeting qualifying window can
	// report a zero uptime alongside a non-zero ForwardedMsat.
	EffectiveUptimeS uint64

	// ForwardedMsat is the total successfully forwarded amount over the
	// window, in millisatoshis.
	ForwardedMsat int64

	// FeeMsat is the total fee earned on the pair's forwards over the
	// window, in millisatoshis. A single forward routinely earns less than
	// one satoshi, so a satoshi granular sum would floor a low-fee pair's
	// earnings to zero.
	FeeMsat int64

	// Forwards is how many successful forwards the pair carried. It decides
	// whether the pair forwarded at all, since the fee total can be zero
	// for one that did under a zero-fee policy.
	Forwards int64
}

ForwardingAbility is a client-facing mirror of the raw forwarding facts for one direction of a peer pair over the analysis window. Derived rates and categories are left to the consumer.

type ForwardingAbilityEntry added in v1.0.2

type ForwardingAbilityEntry struct {

	// The indices of the incoming and outgoing peers packed into a single
	// 32-bit integer: packed_idx = (in << 16) | out. This caps the peer set at
	// 65535 peers per direction.
	PackedIdx uint32 `protobuf:"varint,1,opt,name=packed_idx,json=packedIdx,proto3" json:"packed_idx,omitempty"`
	// Seconds the peer pair held at least the requested liquidity floor of
	// directional forwardable liquidity over the window.
	EffectiveUptimeS uint64 `protobuf:"varint,2,opt,name=effective_uptime_s,json=effectiveUptimeS,proto3" json:"effective_uptime_s,omitempty"`
	// Total successfully forwarded amount over the window, in millisatoshis.
	ForwardedMsat int64 `protobuf:"varint,3,opt,name=forwarded_msat,json=forwardedMsat,proto3" json:"forwarded_msat,omitempty"`
	// Total fees earned on the pair's forwards over the window, in
	// millisatoshis. Fees are reported at millisatoshi granularity because a
	// single forward routinely earns less than one satoshi, and a satoshi
	// granular sum would floor a low-fee pair's earnings to zero.
	FeeMsat int64 `protobuf:"varint,4,opt,name=fee_msat,json=feeMsat,proto3" json:"fee_msat,omitempty"`
	// The number of successful forwards the pair carried over the window. It
	// decides whether the pair forwarded at all, since the fee total can be
	// zero for one that did under a zero-fee policy. With forwarded_msat it
	// also gives the mean forward size.
	Forwards int64 `protobuf:"varint,5,opt,name=forwards,proto3" json:"forwards,omitempty"`
	// contains filtered or unexported fields
}

func (*ForwardingAbilityEntry) Descriptor deprecated added in v1.0.2

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

Deprecated: Use ForwardingAbilityEntry.ProtoReflect.Descriptor instead.

func (*ForwardingAbilityEntry) GetEffectiveUptimeS added in v1.0.2

func (x *ForwardingAbilityEntry) GetEffectiveUptimeS() uint64

func (*ForwardingAbilityEntry) GetFeeMsat added in v1.0.2

func (x *ForwardingAbilityEntry) GetFeeMsat() int64

func (*ForwardingAbilityEntry) GetForwardedMsat added in v1.0.2

func (x *ForwardingAbilityEntry) GetForwardedMsat() int64

func (*ForwardingAbilityEntry) GetForwards added in v1.0.2

func (x *ForwardingAbilityEntry) GetForwards() int64

func (*ForwardingAbilityEntry) GetPackedIdx added in v1.0.2

func (x *ForwardingAbilityEntry) GetPackedIdx() uint32

func (*ForwardingAbilityEntry) ProtoMessage added in v1.0.2

func (*ForwardingAbilityEntry) ProtoMessage()

func (*ForwardingAbilityEntry) ProtoReflect added in v1.0.2

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

func (*ForwardingAbilityEntry) Reset added in v1.0.2

func (x *ForwardingAbilityEntry) Reset()

func (*ForwardingAbilityEntry) String added in v1.0.2

func (x *ForwardingAbilityEntry) String() string

type ForwardingAbilityRequest added in v1.0.2

type ForwardingAbilityRequest struct {

	// The start time of the query range as unix seconds. A value of 0 means
	// the earliest available data.
	StartTime uint64 `protobuf:"varint,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// The end time of the query range as unix seconds. A value of 0 means the
	// server's current time.
	EndTime uint64 `protobuf:"varint,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	// The minimum directional liquidity in satoshis for a peer pair to count as
	// economically forwardable. A value of 0 selects the server default. Hold
	// this constant across calls for comparable series.
	LiquidityFloorSat uint64 `protobuf:"varint,3,opt,name=liquidity_floor_sat,json=liquidityFloorSat,proto3" json:"liquidity_floor_sat,omitempty"`
	// The uptime fraction in [0, 1] at or above which a peer pair that did not
	// forward is reported compactly as a single bit in up_but_idle_bitmask
	// rather than as a full entry. A value of 0 selects the server default.
	// Pairs below this threshold that also did not forward are omitted
	// entirely. If no pair meets the threshold the server returns a
	// FailedPrecondition error, since that indicates the node itself was down
	// for the window and the data carries no signal.
	UptimeThreshold float64 `protobuf:"fixed64,4,opt,name=uptime_threshold,json=uptimeThreshold,proto3" json:"uptime_threshold,omitempty"`
	// contains filtered or unexported fields
}

func (*ForwardingAbilityRequest) Descriptor deprecated added in v1.0.2

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

Deprecated: Use ForwardingAbilityRequest.ProtoReflect.Descriptor instead.

func (*ForwardingAbilityRequest) GetEndTime added in v1.0.2

func (x *ForwardingAbilityRequest) GetEndTime() uint64

func (*ForwardingAbilityRequest) GetLiquidityFloorSat added in v1.0.2

func (x *ForwardingAbilityRequest) GetLiquidityFloorSat() uint64

func (*ForwardingAbilityRequest) GetStartTime added in v1.0.2

func (x *ForwardingAbilityRequest) GetStartTime() uint64

func (*ForwardingAbilityRequest) GetUptimeThreshold added in v1.0.2

func (x *ForwardingAbilityRequest) GetUptimeThreshold() float64

func (*ForwardingAbilityRequest) ProtoMessage added in v1.0.2

func (*ForwardingAbilityRequest) ProtoMessage()

func (*ForwardingAbilityRequest) ProtoReflect added in v1.0.2

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

func (*ForwardingAbilityRequest) Reset added in v1.0.2

func (x *ForwardingAbilityRequest) Reset()

func (*ForwardingAbilityRequest) String added in v1.0.2

func (x *ForwardingAbilityRequest) String() string

type ForwardingAbilityResponse added in v1.0.2

type ForwardingAbilityResponse struct {

	// Sorted list of unique compressed 33-byte public keys of the peers.
	Peers [][]byte `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"`
	// Sparse list of forwarding ability entries. An entry is present only for a
	// pair that carried at least one forward, with its exact facts. Pairs that
	// carried none are never listed here; they are either flagged in
	// up_but_idle_bitmask or absent. Entries take precedence over the bitmask
	// for the same pair.
	Entries []*ForwardingAbilityEntry `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries,omitempty"`
	// The start of the window the metrics cover, as unix seconds.
	StartTime int64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// The end of the window the metrics cover, as unix seconds.
	EndTime int64 `protobuf:"varint,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	// A packed bitmask over the n*n ordered peer pairs, where n is the length
	// of peers. The bit at index in*n+out is set when that pair held at least
	// the uptime_threshold fraction of effective uptime over the window but
	// carried no forward: the dense "up but idle" population. A pair with an
	// entry is never flagged here. A pair that is neither listed in entries nor
	// flagged here had sub-threshold uptime and no forwards: treat it as zero.
	UpButIdleBitmask []byte `protobuf:"bytes,5,opt,name=up_but_idle_bitmask,json=upButIdleBitmask,proto3" json:"up_but_idle_bitmask,omitempty"`
	// The uptime fraction in [0, 1] used to populate up_but_idle_bitmask,
	// echoed back so consumers know the threshold the server applied.
	UptimeThreshold float64 `protobuf:"fixed64,6,opt,name=uptime_threshold,json=uptimeThreshold,proto3" json:"uptime_threshold,omitempty"`
	// contains filtered or unexported fields
}

func EncodeForwardingAbility added in v1.0.2

func EncodeForwardingAbility(abilities map[string]map[string]ForwardingAbility,
	startTime, endTime int64,
	uptimeThreshold float64) (*ForwardingAbilityResponse, error)

EncodeForwardingAbility serializes a nested map of peer forwarding abilities into a memory-efficient sparse gRPC response over [startTime, endTime]. To optimize payload size it tiers each pair: pairs that carried at least one forward keep a full entry, pairs that were up at least uptimeThreshold of the window but carried none collapse to a single bit in the up-but-idle bitmask, and pairs below the threshold that carried none are omitted entirely. Public keys are deduplicated and peer pairs packed into 32-bit indices.

func (*ForwardingAbilityResponse) Descriptor deprecated added in v1.0.2

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

Deprecated: Use ForwardingAbilityResponse.ProtoReflect.Descriptor instead.

func (*ForwardingAbilityResponse) GetEndTime added in v1.0.2

func (x *ForwardingAbilityResponse) GetEndTime() int64

func (*ForwardingAbilityResponse) GetEntries added in v1.0.2

func (*ForwardingAbilityResponse) GetPeers added in v1.0.2

func (x *ForwardingAbilityResponse) GetPeers() [][]byte

func (*ForwardingAbilityResponse) GetStartTime added in v1.0.2

func (x *ForwardingAbilityResponse) GetStartTime() int64

func (*ForwardingAbilityResponse) GetUpButIdleBitmask added in v1.0.2

func (x *ForwardingAbilityResponse) GetUpButIdleBitmask() []byte

func (*ForwardingAbilityResponse) GetUptimeThreshold added in v1.0.2

func (x *ForwardingAbilityResponse) GetUptimeThreshold() float64

func (*ForwardingAbilityResponse) ProtoMessage added in v1.0.2

func (*ForwardingAbilityResponse) ProtoMessage()

func (*ForwardingAbilityResponse) ProtoReflect added in v1.0.2

func (*ForwardingAbilityResponse) Reset added in v1.0.2

func (x *ForwardingAbilityResponse) Reset()

func (*ForwardingAbilityResponse) String added in v1.0.2

func (x *ForwardingAbilityResponse) String() string

type Granularity

type Granularity int32

Granularity describes the aggregation level at which the Bitcoin price should be queried. Note that setting lower levels of granularity may require more queries to the fiat backend.

const (
	Granularity_UNKNOWN_GRANULARITY Granularity = 0
	Granularity_MINUTE              Granularity = 1
	Granularity_FIVE_MINUTES        Granularity = 2
	Granularity_FIFTEEN_MINUTES     Granularity = 3
	Granularity_THIRTY_MINUTES      Granularity = 4
	Granularity_HOUR                Granularity = 5
	Granularity_SIX_HOURS           Granularity = 6
	Granularity_TWELVE_HOURS        Granularity = 7
	Granularity_DAY                 Granularity = 8
)

func (Granularity) Descriptor

func (Granularity) Enum

func (x Granularity) Enum() *Granularity

func (Granularity) EnumDescriptor deprecated

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

Deprecated: Use Granularity.Descriptor instead.

func (Granularity) Number

func (x Granularity) Number() protoreflect.EnumNumber

func (Granularity) String

func (x Granularity) String() string

func (Granularity) Type

type NodeAuditRequest

type NodeAuditRequest struct {

	// The unix time from which to produce the report, inclusive.
	StartTime uint64 `protobuf:"varint,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// The unix time until which to produce the report, exclusive.
	EndTime uint64 `protobuf:"varint,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	// Set to generate a report without conversion to fiat. If set, fiat values
	// will display as 0.
	DisableFiat bool `protobuf:"varint,4,opt,name=disable_fiat,json=disableFiat,proto3" json:"disable_fiat,omitempty"`
	// The level of granularity at which we wish to produce fiat prices.
	Granularity Granularity `protobuf:"varint,5,opt,name=granularity,proto3,enum=frdrpc.Granularity" json:"granularity,omitempty"`
	// An optional set of custom categories which can be used to identify bespoke
	// categories in the report. Each category must have a unique name, and may not
	// have common identifier regexes. Transactions that are matched to these
	// categories report the category name in the CustomCategory field.
	CustomCategories []*CustomCategory `protobuf:"bytes,6,rep,name=custom_categories,json=customCategories,proto3" json:"custom_categories,omitempty"`
	// The api to be used for fiat related queries.
	FiatBackend FiatBackend `protobuf:"varint,7,opt,name=fiat_backend,json=fiatBackend,proto3,enum=frdrpc.FiatBackend" json:"fiat_backend,omitempty"`
	// Custom price points to use if the CUSTOM FiatBackend option is set.
	CustomPrices []*BitcoinPrice `protobuf:"bytes,8,rep,name=custom_prices,json=customPrices,proto3" json:"custom_prices,omitempty"`
	// contains filtered or unexported fields
}

func (*NodeAuditRequest) Descriptor deprecated

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

Deprecated: Use NodeAuditRequest.ProtoReflect.Descriptor instead.

func (*NodeAuditRequest) GetCustomCategories

func (x *NodeAuditRequest) GetCustomCategories() []*CustomCategory

func (*NodeAuditRequest) GetCustomPrices

func (x *NodeAuditRequest) GetCustomPrices() []*BitcoinPrice

func (*NodeAuditRequest) GetDisableFiat

func (x *NodeAuditRequest) GetDisableFiat() bool

func (*NodeAuditRequest) GetEndTime

func (x *NodeAuditRequest) GetEndTime() uint64

func (*NodeAuditRequest) GetFiatBackend

func (x *NodeAuditRequest) GetFiatBackend() FiatBackend

func (*NodeAuditRequest) GetGranularity

func (x *NodeAuditRequest) GetGranularity() Granularity

func (*NodeAuditRequest) GetStartTime

func (x *NodeAuditRequest) GetStartTime() uint64

func (*NodeAuditRequest) ProtoMessage

func (*NodeAuditRequest) ProtoMessage()

func (*NodeAuditRequest) ProtoReflect

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

func (*NodeAuditRequest) Reset

func (x *NodeAuditRequest) Reset()

func (*NodeAuditRequest) String

func (x *NodeAuditRequest) String() string

type NodeAuditResponse

type NodeAuditResponse struct {

	// On chain reports for the period queried.
	Reports []*ReportEntry `protobuf:"bytes,1,rep,name=reports,proto3" json:"reports,omitempty"`
	// contains filtered or unexported fields
}

func (*NodeAuditResponse) Descriptor deprecated

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

Deprecated: Use NodeAuditResponse.ProtoReflect.Descriptor instead.

func (*NodeAuditResponse) GetReports

func (x *NodeAuditResponse) GetReports() []*ReportEntry

func (*NodeAuditResponse) ProtoMessage

func (*NodeAuditResponse) ProtoMessage()

func (*NodeAuditResponse) ProtoReflect

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

func (*NodeAuditResponse) Reset

func (x *NodeAuditResponse) Reset()

func (*NodeAuditResponse) String

func (x *NodeAuditResponse) String() string

type OutlierRecommendationsRequest

type OutlierRecommendationsRequest struct {

	// The parameters that are common to all close recommendations.
	RecRequest *CloseRecommendationRequest `protobuf:"bytes,1,opt,name=rec_request,json=recRequest,proto3" json:"rec_request,omitempty"`
	// The number of inter-quartile ranges a value needs to be beneath the lower
	// quartile/ above the upper quartile to be considered a lower/upper outlier.
	// Lower values will be more aggressive in recommending channel closes, and
	// upper values will be more conservative. Recommended values are 1.5 for
	// aggressive recommendations and 3 for conservative recommendations.
	OutlierMultiplier float32 `protobuf:"fixed32,2,opt,name=outlier_multiplier,json=outlierMultiplier,proto3" json:"outlier_multiplier,omitempty"`
	// contains filtered or unexported fields
}

func (*OutlierRecommendationsRequest) Descriptor deprecated

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

Deprecated: Use OutlierRecommendationsRequest.ProtoReflect.Descriptor instead.

func (*OutlierRecommendationsRequest) GetOutlierMultiplier

func (x *OutlierRecommendationsRequest) GetOutlierMultiplier() float32

func (*OutlierRecommendationsRequest) GetRecRequest

func (*OutlierRecommendationsRequest) ProtoMessage

func (*OutlierRecommendationsRequest) ProtoMessage()

func (*OutlierRecommendationsRequest) ProtoReflect

func (*OutlierRecommendationsRequest) Reset

func (x *OutlierRecommendationsRequest) Reset()

func (*OutlierRecommendationsRequest) String

type PairReport

type PairReport struct {

	// Amount outgoing msat is the amount in millisatoshis that arrived
	// on the pair channel to be forwarded onwards by our channel.
	AmountOutgoingMsat int64 `protobuf:"varint,1,opt,name=amount_outgoing_msat,json=amountOutgoingMsat,proto3" json:"amount_outgoing_msat,omitempty"`
	// Fees outgoing is the amount of fees in millisatoshis that we
	// attribute to the channel for its role as the outgoing channel in
	// forwards.
	FeesOutgoingMsat int64 `protobuf:"varint,2,opt,name=fees_outgoing_msat,json=feesOutgoingMsat,proto3" json:"fees_outgoing_msat,omitempty"`
	// Amount incoming msat is the amount in millisatoshis that arrived
	// on our channel to be forwarded onwards by the pair channel.
	AmountIncomingMsat int64 `protobuf:"varint,3,opt,name=amount_incoming_msat,json=amountIncomingMsat,proto3" json:"amount_incoming_msat,omitempty"`
	// Fees incoming is the amount of fees in millisatoshis that we
	// attribute to the channel for its role as the incoming channel in
	// forwards.
	FeesIncomingMsat int64 `protobuf:"varint,4,opt,name=fees_incoming_msat,json=feesIncomingMsat,proto3" json:"fees_incoming_msat,omitempty"`
	// contains filtered or unexported fields
}

func (*PairReport) Descriptor deprecated

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

Deprecated: Use PairReport.ProtoReflect.Descriptor instead.

func (*PairReport) GetAmountIncomingMsat

func (x *PairReport) GetAmountIncomingMsat() int64

func (*PairReport) GetAmountOutgoingMsat

func (x *PairReport) GetAmountOutgoingMsat() int64

func (*PairReport) GetFeesIncomingMsat

func (x *PairReport) GetFeesIncomingMsat() int64

func (*PairReport) GetFeesOutgoingMsat

func (x *PairReport) GetFeesOutgoingMsat() int64

func (*PairReport) ProtoMessage

func (*PairReport) ProtoMessage()

func (*PairReport) ProtoReflect

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

func (*PairReport) Reset

func (x *PairReport) Reset()

func (*PairReport) String

func (x *PairReport) String() string

type Recommendation

type Recommendation struct {

	// The channel point [funding txid: outpoint] of the channel being considered
	// for close.
	ChanPoint string `protobuf:"bytes,1,opt,name=chan_point,json=chanPoint,proto3" json:"chan_point,omitempty"`
	// The value of the metric that close recommendations were based on.
	Value float32 `protobuf:"fixed32,2,opt,name=value,proto3" json:"value,omitempty"`
	// A boolean indicating whether we recommend closing the channel.
	RecommendClose bool `protobuf:"varint,3,opt,name=recommend_close,json=recommendClose,proto3" json:"recommend_close,omitempty"`
	// contains filtered or unexported fields
}

func (*Recommendation) Descriptor deprecated

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

Deprecated: Use Recommendation.ProtoReflect.Descriptor instead.

func (*Recommendation) GetChanPoint

func (x *Recommendation) GetChanPoint() string

func (*Recommendation) GetRecommendClose

func (x *Recommendation) GetRecommendClose() bool

func (*Recommendation) GetValue

func (x *Recommendation) GetValue() float32

func (*Recommendation) ProtoMessage

func (*Recommendation) ProtoMessage()

func (*Recommendation) ProtoReflect

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

func (*Recommendation) Reset

func (x *Recommendation) Reset()

func (*Recommendation) String

func (x *Recommendation) String() string

type ReportEntry

type ReportEntry struct {

	// The unix timestamp of the event.
	Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// Whether the entry occurred on chain or off chain.
	OnChain bool `protobuf:"varint,2,opt,name=on_chain,json=onChain,proto3" json:"on_chain,omitempty"`
	// The amount of the entry, expressed in millisatoshis.
	Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
	// Whether the entry is a credit or a debit.
	Credit bool `protobuf:"varint,4,opt,name=credit,proto3" json:"credit,omitempty"`
	// The asset affected by the entry.
	Asset string `protobuf:"bytes,5,opt,name=asset,proto3" json:"asset,omitempty"`
	// The kind of activity that this entry represents.
	Type EntryType `protobuf:"varint,6,opt,name=type,proto3,enum=frdrpc.EntryType" json:"type,omitempty"`
	// This field will be populated for entry type custom, and represents the name
	// of a custom category that the report was produced with.
	CustomCategory string `protobuf:"bytes,12,opt,name=custom_category,json=customCategory,proto3" json:"custom_category,omitempty"`
	// The transaction id of the entry.
	Txid string `protobuf:"bytes,7,opt,name=txid,proto3" json:"txid,omitempty"`
	// The fiat amount of the entry's amount in the currency specified in the
	// btc_price field.
	Fiat string `protobuf:"bytes,8,opt,name=fiat,proto3" json:"fiat,omitempty"`
	// A unique identifier for the entry, if available.
	Reference string `protobuf:"bytes,9,opt,name=reference,proto3" json:"reference,omitempty"`
	// An additional note for the entry, providing additional context.
	Note string `protobuf:"bytes,10,opt,name=note,proto3" json:"note,omitempty"`
	// The bitcoin price and timestamp used to calculate our fiat value.
	BtcPrice *BitcoinPrice `protobuf:"bytes,11,opt,name=btc_price,json=btcPrice,proto3" json:"btc_price,omitempty"`
	// contains filtered or unexported fields
}

func (*ReportEntry) Descriptor deprecated

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

Deprecated: Use ReportEntry.ProtoReflect.Descriptor instead.

func (*ReportEntry) GetAmount

func (x *ReportEntry) GetAmount() uint64

func (*ReportEntry) GetAsset

func (x *ReportEntry) GetAsset() string

func (*ReportEntry) GetBtcPrice

func (x *ReportEntry) GetBtcPrice() *BitcoinPrice

func (*ReportEntry) GetCredit

func (x *ReportEntry) GetCredit() bool

func (*ReportEntry) GetCustomCategory

func (x *ReportEntry) GetCustomCategory() string

func (*ReportEntry) GetFiat

func (x *ReportEntry) GetFiat() string

func (*ReportEntry) GetNote

func (x *ReportEntry) GetNote() string

func (*ReportEntry) GetOnChain

func (x *ReportEntry) GetOnChain() bool

func (*ReportEntry) GetReference

func (x *ReportEntry) GetReference() string

func (*ReportEntry) GetTimestamp

func (x *ReportEntry) GetTimestamp() uint64

func (*ReportEntry) GetTxid

func (x *ReportEntry) GetTxid() string

func (*ReportEntry) GetType

func (x *ReportEntry) GetType() EntryType

func (*ReportEntry) ProtoMessage

func (*ReportEntry) ProtoMessage()

func (*ReportEntry) ProtoReflect

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

func (*ReportEntry) Reset

func (x *ReportEntry) Reset()

func (*ReportEntry) String

func (x *ReportEntry) String() string

type RevenueReport

type RevenueReport struct {

	// Target channel is the channel that the report is generated for; incoming
	// fields in the report mean that this channel was the incoming channel,
	// and the pair as the outgoing, outgoing fields mean that this channel was
	// the outgoing channel and the peer was the incoming channel.
	TargetChannel string `protobuf:"bytes,1,opt,name=target_channel,json=targetChannel,proto3" json:"target_channel,omitempty"`
	// Pair reports maps the channel point of a peer that we generated revenue
	// with to a report detailing the revenue.
	PairReports map[string]*PairReport `` /* 182-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*RevenueReport) Descriptor deprecated

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

Deprecated: Use RevenueReport.ProtoReflect.Descriptor instead.

func (*RevenueReport) GetPairReports

func (x *RevenueReport) GetPairReports() map[string]*PairReport

func (*RevenueReport) GetTargetChannel

func (x *RevenueReport) GetTargetChannel() string

func (*RevenueReport) ProtoMessage

func (*RevenueReport) ProtoMessage()

func (*RevenueReport) ProtoReflect

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

func (*RevenueReport) Reset

func (x *RevenueReport) Reset()

func (*RevenueReport) String

func (x *RevenueReport) String() string

type RevenueReportRequest

type RevenueReportRequest struct {

	// The funding transaction outpoints for the channels to generate a revenue
	// report for. If this is empty, it will be generated for all open and closed
	// channels. Channel funding points should be expressed with the format
	// fundingTxID:outpoint.
	ChanPoints []string `protobuf:"bytes,1,rep,name=chan_points,json=chanPoints,proto3" json:"chan_points,omitempty"`
	// Start time is beginning of the range over which the report will be
	// generated, expressed as unix epoch offset in seconds.
	StartTime uint64 `protobuf:"varint,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// End time is end of the range over which the report will be
	// generated, expressed as unix epoch offset in seconds.
	EndTime uint64 `protobuf:"varint,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	// contains filtered or unexported fields
}

func (*RevenueReportRequest) Descriptor deprecated

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

Deprecated: Use RevenueReportRequest.ProtoReflect.Descriptor instead.

func (*RevenueReportRequest) GetChanPoints

func (x *RevenueReportRequest) GetChanPoints() []string

func (*RevenueReportRequest) GetEndTime

func (x *RevenueReportRequest) GetEndTime() uint64

func (*RevenueReportRequest) GetStartTime

func (x *RevenueReportRequest) GetStartTime() uint64

func (*RevenueReportRequest) ProtoMessage

func (*RevenueReportRequest) ProtoMessage()

func (*RevenueReportRequest) ProtoReflect

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

func (*RevenueReportRequest) Reset

func (x *RevenueReportRequest) Reset()

func (*RevenueReportRequest) String

func (x *RevenueReportRequest) String() string

type RevenueReportResponse

type RevenueReportResponse struct {

	// Reports is a set of pairwise revenue report generated for the channel(s)
	// over the period specified.
	Reports []*RevenueReport `protobuf:"bytes,1,rep,name=reports,proto3" json:"reports,omitempty"`
	// contains filtered or unexported fields
}

func (*RevenueReportResponse) Descriptor deprecated

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

Deprecated: Use RevenueReportResponse.ProtoReflect.Descriptor instead.

func (*RevenueReportResponse) GetReports

func (x *RevenueReportResponse) GetReports() []*RevenueReport

func (*RevenueReportResponse) ProtoMessage

func (*RevenueReportResponse) ProtoMessage()

func (*RevenueReportResponse) ProtoReflect

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

func (*RevenueReportResponse) Reset

func (x *RevenueReportResponse) Reset()

func (*RevenueReportResponse) String

func (x *RevenueReportResponse) String() string

type ThresholdRecommendationsRequest

type ThresholdRecommendationsRequest struct {

	// The parameters that are common to all close recommendations.
	RecRequest *CloseRecommendationRequest `protobuf:"bytes,1,opt,name=rec_request,json=recRequest,proto3" json:"rec_request,omitempty"`
	// The threshold that recommendations will be calculated based on.
	// For uptime: ratio of uptime to observed lifetime beneath which channels
	// will be recommended for closure.
	//
	// For revenue: revenue per block that capital has been committed to the
	// channel beneath which channels will be recommended for closure. This
	// value is provided per block so that channels that have been open for
	// different periods of time can be compared.
	//
	// For incoming volume: The incoming volume per block that capital has
	// been committed to the channel beneath which channels will be recommended
	// for closure. This value is provided per block so that channels that have
	// been open for different periods of time can be compared.
	//
	// For outgoing volume: The outgoing volume per block that capital has been
	// committed to the channel beneath which channels will be recommended for
	// closure. This value is provided per block so that channels that have been
	// open for different periods of time can be compared.
	//
	// For total volume: The total volume per block that capital has been
	// committed to the channel beneath which channels will be recommended for
	// closure. This value is provided per block so that channels that have been
	// open for different periods of time can be compared.
	ThresholdValue float32 `protobuf:"fixed32,2,opt,name=threshold_value,json=thresholdValue,proto3" json:"threshold_value,omitempty"`
	// contains filtered or unexported fields
}

func (*ThresholdRecommendationsRequest) Descriptor deprecated

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

Deprecated: Use ThresholdRecommendationsRequest.ProtoReflect.Descriptor instead.

func (*ThresholdRecommendationsRequest) GetRecRequest

func (*ThresholdRecommendationsRequest) GetThresholdValue

func (x *ThresholdRecommendationsRequest) GetThresholdValue() float32

func (*ThresholdRecommendationsRequest) ProtoMessage

func (*ThresholdRecommendationsRequest) ProtoMessage()

func (*ThresholdRecommendationsRequest) ProtoReflect

func (*ThresholdRecommendationsRequest) Reset

func (*ThresholdRecommendationsRequest) String

type UnimplementedFaradayServerServer

type UnimplementedFaradayServerServer struct {
}

UnimplementedFaradayServerServer must be embedded to have forward compatible implementations.

func (UnimplementedFaradayServerServer) ChannelInsights

func (UnimplementedFaradayServerServer) CloseReport

func (UnimplementedFaradayServerServer) ExchangeRate

func (UnimplementedFaradayServerServer) ForwardingAbility added in v1.0.2

func (UnimplementedFaradayServerServer) GetChannelEvents added in v1.0.2

func (UnimplementedFaradayServerServer) NodeAudit

func (UnimplementedFaradayServerServer) RevenueReport

type UnsafeFaradayServerServer

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

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

Jump to

Keyboard shortcuts

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