frdrpc

package
v0.2.13-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 16 Imported by: 4

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",
	}
	FiatBackend_value = map[string]int32{
		"UNKNOWN_FIATBACKEND": 0,
		"COINCAP":             1,
		"COINDESK":            2,
		"CUSTOM":              3,
		"COINGECKO":           4,
	}
)

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 (
	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,
		},
	},
	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 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.

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.

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 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)
}

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)
	// 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
)

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 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) 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