frdrpc

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: MIT Imports: 29 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 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

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

The Faraday server interface is implemented by the RPCServer struct. To keep this file readable, each function implemented by the interface has a file named after the function call which contains rpc parsing code for the request and response. If the call requires extensive additional logic, and unexported function with the same name should be created in this file as well.

Index

Constants

View Source
const Subsystem = "FRPC"

Subsystem defines the logging code for this subsystem.

Variables

View Source
var CloseRecommendationRequest_Metric_name = map[int32]string{
	0: "UNKNOWN",
	1: "UPTIME",
	2: "REVENUE",
	3: "INCOMING_VOLUME",
	4: "OUTGOING_VOLUME",
	5: "TOTAL_VOLUME",
}
View Source
var CloseRecommendationRequest_Metric_value = map[string]int32{
	"UNKNOWN":         0,
	"UPTIME":          1,
	"REVENUE":         2,
	"INCOMING_VOLUME": 3,
	"OUTGOING_VOLUME": 4,
	"TOTAL_VOLUME":    5,
}
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",
}
View Source
var 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,
}
View Source
var FiatEstimateRequest_Granularity_name = map[int32]string{
	0: "UNKNOWN",
	1: "MINUTE",
	2: "FIVE_MINUTES",
	3: "FIFTEEN_MINUTES",
	4: "THIRTY_MINUTES",
	5: "HOUR",
	6: "SIX_HOURS",
	7: "TWELVE_HOURS",
	8: "DAY",
}
View Source
var FiatEstimateRequest_Granularity_value = map[string]int32{
	"UNKNOWN":         0,
	"MINUTE":          1,
	"FIVE_MINUTES":    2,
	"FIFTEEN_MINUTES": 3,
	"THIRTY_MINUTES":  4,
	"HOUR":            5,
	"SIX_HOURS":       6,
	"TWELVE_HOURS":    7,
	"DAY":             8,
}

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 RegisterFaradayServerServer

func RegisterFaradayServerServer(s *grpc.Server, srv FaradayServerServer)

func UseLogger

func UseLogger(logger btclog.Logger)

UseLogger uses a specified Logger to output package logging info. This should be used in preference to SetLogWriter if the caller is also using btclog.

Types

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ChannelInsight) Descriptor

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

func (*ChannelInsight) GetChanPoint

func (m *ChannelInsight) GetChanPoint() string

func (*ChannelInsight) GetConfirmations

func (m *ChannelInsight) GetConfirmations() uint32

func (*ChannelInsight) GetFeesEarnedMsat

func (m *ChannelInsight) GetFeesEarnedMsat() int64

func (*ChannelInsight) GetMonitoredSeconds

func (m *ChannelInsight) GetMonitoredSeconds() uint64

func (*ChannelInsight) GetPrivate

func (m *ChannelInsight) GetPrivate() bool

func (*ChannelInsight) GetUptimeSeconds

func (m *ChannelInsight) GetUptimeSeconds() uint64

func (*ChannelInsight) GetVolumeIncomingMsat

func (m *ChannelInsight) GetVolumeIncomingMsat() int64

func (*ChannelInsight) GetVolumeOutgoingMsat

func (m *ChannelInsight) GetVolumeOutgoingMsat() int64

func (*ChannelInsight) ProtoMessage

func (*ChannelInsight) ProtoMessage()

func (*ChannelInsight) Reset

func (m *ChannelInsight) Reset()

func (*ChannelInsight) String

func (m *ChannelInsight) String() string

func (*ChannelInsight) XXX_DiscardUnknown

func (m *ChannelInsight) XXX_DiscardUnknown()

func (*ChannelInsight) XXX_Marshal

func (m *ChannelInsight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChannelInsight) XXX_Merge

func (m *ChannelInsight) XXX_Merge(src proto.Message)

func (*ChannelInsight) XXX_Size

func (m *ChannelInsight) XXX_Size() int

func (*ChannelInsight) XXX_Unmarshal

func (m *ChannelInsight) XXX_Unmarshal(b []byte) error

type ChannelInsightsRequest

type ChannelInsightsRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ChannelInsightsRequest) Descriptor

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

func (*ChannelInsightsRequest) ProtoMessage

func (*ChannelInsightsRequest) ProtoMessage()

func (*ChannelInsightsRequest) Reset

func (m *ChannelInsightsRequest) Reset()

func (*ChannelInsightsRequest) String

func (m *ChannelInsightsRequest) String() string

func (*ChannelInsightsRequest) XXX_DiscardUnknown

func (m *ChannelInsightsRequest) XXX_DiscardUnknown()

func (*ChannelInsightsRequest) XXX_Marshal

func (m *ChannelInsightsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChannelInsightsRequest) XXX_Merge

func (m *ChannelInsightsRequest) XXX_Merge(src proto.Message)

func (*ChannelInsightsRequest) XXX_Size

func (m *ChannelInsightsRequest) XXX_Size() int

func (*ChannelInsightsRequest) XXX_Unmarshal

func (m *ChannelInsightsRequest) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*ChannelInsightsResponse) Descriptor

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

func (*ChannelInsightsResponse) GetChannelInsights

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

func (*ChannelInsightsResponse) ProtoMessage

func (*ChannelInsightsResponse) ProtoMessage()

func (*ChannelInsightsResponse) Reset

func (m *ChannelInsightsResponse) Reset()

func (*ChannelInsightsResponse) String

func (m *ChannelInsightsResponse) String() string

func (*ChannelInsightsResponse) XXX_DiscardUnknown

func (m *ChannelInsightsResponse) XXX_DiscardUnknown()

func (*ChannelInsightsResponse) XXX_Marshal

func (m *ChannelInsightsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChannelInsightsResponse) XXX_Merge

func (m *ChannelInsightsResponse) XXX_Merge(src proto.Message)

func (*ChannelInsightsResponse) XXX_Size

func (m *ChannelInsightsResponse) XXX_Size() int

func (*ChannelInsightsResponse) XXX_Unmarshal

func (m *ChannelInsightsResponse) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{}                          `json:"-"`
	XXX_unrecognized     []byte                            `json:"-"`
	XXX_sizecache        int32                             `json:"-"`
}

func (*CloseRecommendationRequest) Descriptor

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

func (*CloseRecommendationRequest) GetMetric

func (*CloseRecommendationRequest) GetMinimumMonitored

func (m *CloseRecommendationRequest) GetMinimumMonitored() int64

func (*CloseRecommendationRequest) ProtoMessage

func (*CloseRecommendationRequest) ProtoMessage()

func (*CloseRecommendationRequest) Reset

func (m *CloseRecommendationRequest) Reset()

func (*CloseRecommendationRequest) String

func (m *CloseRecommendationRequest) String() string

func (*CloseRecommendationRequest) XXX_DiscardUnknown

func (m *CloseRecommendationRequest) XXX_DiscardUnknown()

func (*CloseRecommendationRequest) XXX_Marshal

func (m *CloseRecommendationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CloseRecommendationRequest) XXX_Merge

func (m *CloseRecommendationRequest) XXX_Merge(src proto.Message)

func (*CloseRecommendationRequest) XXX_Size

func (m *CloseRecommendationRequest) XXX_Size() int

func (*CloseRecommendationRequest) XXX_Unmarshal

func (m *CloseRecommendationRequest) XXX_Unmarshal(b []byte) error

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

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

func (CloseRecommendationRequest_Metric) String

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"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*CloseRecommendationsResponse) Descriptor

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

func (*CloseRecommendationsResponse) GetConsideredChannels

func (m *CloseRecommendationsResponse) GetConsideredChannels() int32

func (*CloseRecommendationsResponse) GetRecommendations

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

func (*CloseRecommendationsResponse) GetTotalChannels

func (m *CloseRecommendationsResponse) GetTotalChannels() int32

func (*CloseRecommendationsResponse) ProtoMessage

func (*CloseRecommendationsResponse) ProtoMessage()

func (*CloseRecommendationsResponse) Reset

func (m *CloseRecommendationsResponse) Reset()

func (*CloseRecommendationsResponse) String

func (*CloseRecommendationsResponse) XXX_DiscardUnknown

func (m *CloseRecommendationsResponse) XXX_DiscardUnknown()

func (*CloseRecommendationsResponse) XXX_Marshal

func (m *CloseRecommendationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CloseRecommendationsResponse) XXX_Merge

func (m *CloseRecommendationsResponse) XXX_Merge(src proto.Message)

func (*CloseRecommendationsResponse) XXX_Size

func (m *CloseRecommendationsResponse) XXX_Size() int

func (*CloseRecommendationsResponse) XXX_Unmarshal

func (m *CloseRecommendationsResponse) XXX_Unmarshal(b []byte) error

type Config

type Config struct {
	// LightningClient is a client which can be used to query lnd.
	LightningClient lnrpc.LightningClient

	// RPCListen is the address:port that the gRPC server should listen on.
	RPCListen string

	// RESTListen is the address:port that the REST server should listen on.
	RESTListen string

	// CORSOrigin specifies the CORS header that should be set on REST
	// responses. No header is added if the value is empty.
	CORSOrigin string
}

Config provides closures and settings required to run the rpc server.

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
)

func (EntryType) EnumDescriptor

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

func (EntryType) String

func (x EntryType) 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/fiat
	FiatEstimate(ctx context.Context, in *FiatEstimateRequest, opts ...grpc.CallOption) (*FiatEstimateResponse, error)
	//*
	//Get a report of your node's activity over a period.
	//
	//Example request:
	//http://localhost:8466/v1/faraday/nodereport
	NodeReport(ctx context.Context, in *NodeReportRequest, opts ...grpc.CallOption) (*NodeReportResponse, error)
}

FaradayServerClient is the client API for FaradayServer service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewFaradayServerClient

func NewFaradayServerClient(cc *grpc.ClientConn) FaradayServerClient

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/fiat
	FiatEstimate(context.Context, *FiatEstimateRequest) (*FiatEstimateResponse, error)
	//*
	//Get a report of your node's activity over a period.
	//
	//Example request:
	//http://localhost:8466/v1/faraday/nodereport
	NodeReport(context.Context, *NodeReportRequest) (*NodeReportResponse, error)
}

FaradayServerServer is the server API for FaradayServer service.

type FiatEstimateRequest

type FiatEstimateRequest struct {
	Requests             []*FiatEstimateRequest_PriceRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"`
	Granularity          FiatEstimateRequest_Granularity     `protobuf:"varint,2,opt,name=granularity,proto3,enum=frdrpc.FiatEstimateRequest_Granularity" json:"granularity,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                            `json:"-"`
	XXX_unrecognized     []byte                              `json:"-"`
	XXX_sizecache        int32                               `json:"-"`
}

func (*FiatEstimateRequest) Descriptor

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

func (*FiatEstimateRequest) GetGranularity

func (*FiatEstimateRequest) GetRequests

func (*FiatEstimateRequest) ProtoMessage

func (*FiatEstimateRequest) ProtoMessage()

func (*FiatEstimateRequest) Reset

func (m *FiatEstimateRequest) Reset()

func (*FiatEstimateRequest) String

func (m *FiatEstimateRequest) String() string

func (*FiatEstimateRequest) XXX_DiscardUnknown

func (m *FiatEstimateRequest) XXX_DiscardUnknown()

func (*FiatEstimateRequest) XXX_Marshal

func (m *FiatEstimateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FiatEstimateRequest) XXX_Merge

func (m *FiatEstimateRequest) XXX_Merge(src proto.Message)

func (*FiatEstimateRequest) XXX_Size

func (m *FiatEstimateRequest) XXX_Size() int

func (*FiatEstimateRequest) XXX_Unmarshal

func (m *FiatEstimateRequest) XXX_Unmarshal(b []byte) error

type FiatEstimateRequest_Granularity

type FiatEstimateRequest_Granularity int32

Granularity describes the aggregation level at which the Bitcoin price is provided.

const (
	FiatEstimateRequest_UNKNOWN         FiatEstimateRequest_Granularity = 0
	FiatEstimateRequest_MINUTE          FiatEstimateRequest_Granularity = 1
	FiatEstimateRequest_FIVE_MINUTES    FiatEstimateRequest_Granularity = 2
	FiatEstimateRequest_FIFTEEN_MINUTES FiatEstimateRequest_Granularity = 3
	FiatEstimateRequest_THIRTY_MINUTES  FiatEstimateRequest_Granularity = 4
	FiatEstimateRequest_HOUR            FiatEstimateRequest_Granularity = 5
	FiatEstimateRequest_SIX_HOURS       FiatEstimateRequest_Granularity = 6
	FiatEstimateRequest_TWELVE_HOURS    FiatEstimateRequest_Granularity = 7
	FiatEstimateRequest_DAY             FiatEstimateRequest_Granularity = 8
)

func (FiatEstimateRequest_Granularity) EnumDescriptor

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

func (FiatEstimateRequest_Granularity) String

type FiatEstimateRequest_PriceRequest

type FiatEstimateRequest_PriceRequest struct {
	// id is a unique identifier for the request.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The amount to be converted to fiat in millisatoshis.
	AmountMsat uint64 `protobuf:"varint,2,opt,name=amount_msat,json=amountMsat,proto3" json:"amount_msat,omitempty"`
	// The unix timestamp at which the price should be quoted.
	Timestamp            int64    `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*FiatEstimateRequest_PriceRequest) Descriptor

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

func (*FiatEstimateRequest_PriceRequest) GetAmountMsat

func (m *FiatEstimateRequest_PriceRequest) GetAmountMsat() uint64

func (*FiatEstimateRequest_PriceRequest) GetId

func (*FiatEstimateRequest_PriceRequest) GetTimestamp

func (m *FiatEstimateRequest_PriceRequest) GetTimestamp() int64

func (*FiatEstimateRequest_PriceRequest) ProtoMessage

func (*FiatEstimateRequest_PriceRequest) ProtoMessage()

func (*FiatEstimateRequest_PriceRequest) Reset

func (*FiatEstimateRequest_PriceRequest) String

func (*FiatEstimateRequest_PriceRequest) XXX_DiscardUnknown

func (m *FiatEstimateRequest_PriceRequest) XXX_DiscardUnknown()

func (*FiatEstimateRequest_PriceRequest) XXX_Marshal

func (m *FiatEstimateRequest_PriceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FiatEstimateRequest_PriceRequest) XXX_Merge

func (*FiatEstimateRequest_PriceRequest) XXX_Size

func (m *FiatEstimateRequest_PriceRequest) XXX_Size() int

func (*FiatEstimateRequest_PriceRequest) XXX_Unmarshal

func (m *FiatEstimateRequest_PriceRequest) XXX_Unmarshal(b []byte) error

type FiatEstimateResponse

type FiatEstimateResponse struct {
	FiatValues           map[string]string `` /* 179-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*FiatEstimateResponse) Descriptor

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

func (*FiatEstimateResponse) GetFiatValues

func (m *FiatEstimateResponse) GetFiatValues() map[string]string

func (*FiatEstimateResponse) ProtoMessage

func (*FiatEstimateResponse) ProtoMessage()

func (*FiatEstimateResponse) Reset

func (m *FiatEstimateResponse) Reset()

func (*FiatEstimateResponse) String

func (m *FiatEstimateResponse) String() string

func (*FiatEstimateResponse) XXX_DiscardUnknown

func (m *FiatEstimateResponse) XXX_DiscardUnknown()

func (*FiatEstimateResponse) XXX_Marshal

func (m *FiatEstimateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FiatEstimateResponse) XXX_Merge

func (m *FiatEstimateResponse) XXX_Merge(src proto.Message)

func (*FiatEstimateResponse) XXX_Size

func (m *FiatEstimateResponse) XXX_Size() int

func (*FiatEstimateResponse) XXX_Unmarshal

func (m *FiatEstimateResponse) XXX_Unmarshal(b []byte) error

type NodeReportRequest

type NodeReportRequest 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"`
	// The level of aggregation for fiat estimates.
	Granularity          FiatEstimateRequest_Granularity `protobuf:"varint,3,opt,name=granularity,proto3,enum=frdrpc.FiatEstimateRequest_Granularity" json:"granularity,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                        `json:"-"`
	XXX_unrecognized     []byte                          `json:"-"`
	XXX_sizecache        int32                           `json:"-"`
}

func (*NodeReportRequest) Descriptor

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

func (*NodeReportRequest) GetEndTime

func (m *NodeReportRequest) GetEndTime() uint64

func (*NodeReportRequest) GetGranularity

func (*NodeReportRequest) GetStartTime

func (m *NodeReportRequest) GetStartTime() uint64

func (*NodeReportRequest) ProtoMessage

func (*NodeReportRequest) ProtoMessage()

func (*NodeReportRequest) Reset

func (m *NodeReportRequest) Reset()

func (*NodeReportRequest) String

func (m *NodeReportRequest) String() string

func (*NodeReportRequest) XXX_DiscardUnknown

func (m *NodeReportRequest) XXX_DiscardUnknown()

func (*NodeReportRequest) XXX_Marshal

func (m *NodeReportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NodeReportRequest) XXX_Merge

func (m *NodeReportRequest) XXX_Merge(src proto.Message)

func (*NodeReportRequest) XXX_Size

func (m *NodeReportRequest) XXX_Size() int

func (*NodeReportRequest) XXX_Unmarshal

func (m *NodeReportRequest) XXX_Unmarshal(b []byte) error

type NodeReportResponse

type NodeReportResponse struct {
	// On chain reports for the period queried.
	Reports              []*ReportEntry `protobuf:"bytes,1,rep,name=reports,proto3" json:"reports,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*NodeReportResponse) Descriptor

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

func (*NodeReportResponse) GetReports

func (m *NodeReportResponse) GetReports() []*ReportEntry

func (*NodeReportResponse) ProtoMessage

func (*NodeReportResponse) ProtoMessage()

func (*NodeReportResponse) Reset

func (m *NodeReportResponse) Reset()

func (*NodeReportResponse) String

func (m *NodeReportResponse) String() string

func (*NodeReportResponse) XXX_DiscardUnknown

func (m *NodeReportResponse) XXX_DiscardUnknown()

func (*NodeReportResponse) XXX_Marshal

func (m *NodeReportResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NodeReportResponse) XXX_Merge

func (m *NodeReportResponse) XXX_Merge(src proto.Message)

func (*NodeReportResponse) XXX_Size

func (m *NodeReportResponse) XXX_Size() int

func (*NodeReportResponse) XXX_Unmarshal

func (m *NodeReportResponse) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*OutlierRecommendationsRequest) Descriptor

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

func (*OutlierRecommendationsRequest) GetOutlierMultiplier

func (m *OutlierRecommendationsRequest) GetOutlierMultiplier() float32

func (*OutlierRecommendationsRequest) GetRecRequest

func (*OutlierRecommendationsRequest) ProtoMessage

func (*OutlierRecommendationsRequest) ProtoMessage()

func (*OutlierRecommendationsRequest) Reset

func (m *OutlierRecommendationsRequest) Reset()

func (*OutlierRecommendationsRequest) String

func (*OutlierRecommendationsRequest) XXX_DiscardUnknown

func (m *OutlierRecommendationsRequest) XXX_DiscardUnknown()

func (*OutlierRecommendationsRequest) XXX_Marshal

func (m *OutlierRecommendationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OutlierRecommendationsRequest) XXX_Merge

func (m *OutlierRecommendationsRequest) XXX_Merge(src proto.Message)

func (*OutlierRecommendationsRequest) XXX_Size

func (m *OutlierRecommendationsRequest) XXX_Size() int

func (*OutlierRecommendationsRequest) XXX_Unmarshal

func (m *OutlierRecommendationsRequest) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PairReport) Descriptor

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

func (*PairReport) GetAmountIncomingMsat

func (m *PairReport) GetAmountIncomingMsat() int64

func (*PairReport) GetAmountOutgoingMsat

func (m *PairReport) GetAmountOutgoingMsat() int64

func (*PairReport) GetFeesIncomingMsat

func (m *PairReport) GetFeesIncomingMsat() int64

func (*PairReport) GetFeesOutgoingMsat

func (m *PairReport) GetFeesOutgoingMsat() int64

func (*PairReport) ProtoMessage

func (*PairReport) ProtoMessage()

func (*PairReport) Reset

func (m *PairReport) Reset()

func (*PairReport) String

func (m *PairReport) String() string

func (*PairReport) XXX_DiscardUnknown

func (m *PairReport) XXX_DiscardUnknown()

func (*PairReport) XXX_Marshal

func (m *PairReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PairReport) XXX_Merge

func (m *PairReport) XXX_Merge(src proto.Message)

func (*PairReport) XXX_Size

func (m *PairReport) XXX_Size() int

func (*PairReport) XXX_Unmarshal

func (m *PairReport) XXX_Unmarshal(b []byte) error

type RPCServer

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

RPCServer implements the faraday service, serving requests over grpc.

func NewRPCServer

func NewRPCServer(cfg *Config) *RPCServer

NewRPCServer returns a server which will listen for rpc requests on the rpc listen address provided. Note that the server returned is not running, and should be started using Start().

func (*RPCServer) ChannelInsights

ChannelInsights returns the channel insights for our currently open set of channels.

func (*RPCServer) FiatEstimate

func (s *RPCServer) FiatEstimate(ctx context.Context,
	req *FiatEstimateRequest) (*FiatEstimateResponse, error)

FiatEstimate provides a fiat estimate for a set of timestamped bitcoin prices.

func (*RPCServer) NodeReport

func (s *RPCServer) NodeReport(ctx context.Context,
	req *NodeReportRequest) (*NodeReportResponse, error)

NodeReport returns an on chain report for the period requested.

func (*RPCServer) OutlierRecommendations

OutlierRecommendations provides a set of close recommendations for the current set of open channels based on whether they are outliers.

func (*RPCServer) RevenueReport

func (s *RPCServer) RevenueReport(ctx context.Context,
	req *RevenueReportRequest) (*RevenueReportResponse, error)

RevenueReport returns a pairwise revenue report for a channel over the period requested.

func (*RPCServer) Start

func (s *RPCServer) Start() error

Start starts the listener and server.

func (*RPCServer) StartAsSubserver

func (s *RPCServer) StartAsSubserver(lndClient lnrpc.LightningClient) error

StartAsSubserver is an alternative to Start where the RPC server does not create its own gRPC server but registers to an existing one. The same goes for REST (if enabled), instead of creating an own mux and HTTP server, we register to an existing one.

func (*RPCServer) Stop

func (s *RPCServer) Stop() error

Stop stops the grpc listener and server.

func (*RPCServer) ThresholdRecommendations

ThresholdRecommendations provides a set of close recommendations for the current set of open channels based on whether they are above or below a given threshold.

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Recommendation) Descriptor

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

func (*Recommendation) GetChanPoint

func (m *Recommendation) GetChanPoint() string

func (*Recommendation) GetRecommendClose

func (m *Recommendation) GetRecommendClose() bool

func (*Recommendation) GetValue

func (m *Recommendation) GetValue() float32

func (*Recommendation) ProtoMessage

func (*Recommendation) ProtoMessage()

func (*Recommendation) Reset

func (m *Recommendation) Reset()

func (*Recommendation) String

func (m *Recommendation) String() string

func (*Recommendation) XXX_DiscardUnknown

func (m *Recommendation) XXX_DiscardUnknown()

func (*Recommendation) XXX_Marshal

func (m *Recommendation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Recommendation) XXX_Merge

func (m *Recommendation) XXX_Merge(src proto.Message)

func (*Recommendation) XXX_Size

func (m *Recommendation) XXX_Size() int

func (*Recommendation) XXX_Unmarshal

func (m *Recommendation) XXX_Unmarshal(b []byte) error

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"`
	// 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 USD.
	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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReportEntry) Descriptor

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

func (*ReportEntry) GetAmount

func (m *ReportEntry) GetAmount() uint64

func (*ReportEntry) GetAsset

func (m *ReportEntry) GetAsset() string

func (*ReportEntry) GetCredit

func (m *ReportEntry) GetCredit() bool

func (*ReportEntry) GetFiat

func (m *ReportEntry) GetFiat() string

func (*ReportEntry) GetNote

func (m *ReportEntry) GetNote() string

func (*ReportEntry) GetOnChain

func (m *ReportEntry) GetOnChain() bool

func (*ReportEntry) GetReference

func (m *ReportEntry) GetReference() string

func (*ReportEntry) GetTimestamp

func (m *ReportEntry) GetTimestamp() uint64

func (*ReportEntry) GetTxid

func (m *ReportEntry) GetTxid() string

func (*ReportEntry) GetType

func (m *ReportEntry) GetType() EntryType

func (*ReportEntry) ProtoMessage

func (*ReportEntry) ProtoMessage()

func (*ReportEntry) Reset

func (m *ReportEntry) Reset()

func (*ReportEntry) String

func (m *ReportEntry) String() string

func (*ReportEntry) XXX_DiscardUnknown

func (m *ReportEntry) XXX_DiscardUnknown()

func (*ReportEntry) XXX_Marshal

func (m *ReportEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReportEntry) XXX_Merge

func (m *ReportEntry) XXX_Merge(src proto.Message)

func (*ReportEntry) XXX_Size

func (m *ReportEntry) XXX_Size() int

func (*ReportEntry) XXX_Unmarshal

func (m *ReportEntry) XXX_Unmarshal(b []byte) error

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 */
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

func (*RevenueReport) Descriptor

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

func (*RevenueReport) GetPairReports

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

func (*RevenueReport) GetTargetChannel

func (m *RevenueReport) GetTargetChannel() string

func (*RevenueReport) ProtoMessage

func (*RevenueReport) ProtoMessage()

func (*RevenueReport) Reset

func (m *RevenueReport) Reset()

func (*RevenueReport) String

func (m *RevenueReport) String() string

func (*RevenueReport) XXX_DiscardUnknown

func (m *RevenueReport) XXX_DiscardUnknown()

func (*RevenueReport) XXX_Marshal

func (m *RevenueReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RevenueReport) XXX_Merge

func (m *RevenueReport) XXX_Merge(src proto.Message)

func (*RevenueReport) XXX_Size

func (m *RevenueReport) XXX_Size() int

func (*RevenueReport) XXX_Unmarshal

func (m *RevenueReport) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RevenueReportRequest) Descriptor

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

func (*RevenueReportRequest) GetChanPoints

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

func (*RevenueReportRequest) GetEndTime

func (m *RevenueReportRequest) GetEndTime() uint64

func (*RevenueReportRequest) GetStartTime

func (m *RevenueReportRequest) GetStartTime() uint64

func (*RevenueReportRequest) ProtoMessage

func (*RevenueReportRequest) ProtoMessage()

func (*RevenueReportRequest) Reset

func (m *RevenueReportRequest) Reset()

func (*RevenueReportRequest) String

func (m *RevenueReportRequest) String() string

func (*RevenueReportRequest) XXX_DiscardUnknown

func (m *RevenueReportRequest) XXX_DiscardUnknown()

func (*RevenueReportRequest) XXX_Marshal

func (m *RevenueReportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RevenueReportRequest) XXX_Merge

func (m *RevenueReportRequest) XXX_Merge(src proto.Message)

func (*RevenueReportRequest) XXX_Size

func (m *RevenueReportRequest) XXX_Size() int

func (*RevenueReportRequest) XXX_Unmarshal

func (m *RevenueReportRequest) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (*RevenueReportResponse) Descriptor

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

func (*RevenueReportResponse) GetReports

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

func (*RevenueReportResponse) ProtoMessage

func (*RevenueReportResponse) ProtoMessage()

func (*RevenueReportResponse) Reset

func (m *RevenueReportResponse) Reset()

func (*RevenueReportResponse) String

func (m *RevenueReportResponse) String() string

func (*RevenueReportResponse) XXX_DiscardUnknown

func (m *RevenueReportResponse) XXX_DiscardUnknown()

func (*RevenueReportResponse) XXX_Marshal

func (m *RevenueReportResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RevenueReportResponse) XXX_Merge

func (m *RevenueReportResponse) XXX_Merge(src proto.Message)

func (*RevenueReportResponse) XXX_Size

func (m *RevenueReportResponse) XXX_Size() int

func (*RevenueReportResponse) XXX_Unmarshal

func (m *RevenueReportResponse) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ThresholdRecommendationsRequest) Descriptor

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

func (*ThresholdRecommendationsRequest) GetRecRequest

func (*ThresholdRecommendationsRequest) GetThresholdValue

func (m *ThresholdRecommendationsRequest) GetThresholdValue() float32

func (*ThresholdRecommendationsRequest) ProtoMessage

func (*ThresholdRecommendationsRequest) ProtoMessage()

func (*ThresholdRecommendationsRequest) Reset

func (*ThresholdRecommendationsRequest) String

func (*ThresholdRecommendationsRequest) XXX_DiscardUnknown

func (m *ThresholdRecommendationsRequest) XXX_DiscardUnknown()

func (*ThresholdRecommendationsRequest) XXX_Marshal

func (m *ThresholdRecommendationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ThresholdRecommendationsRequest) XXX_Merge

func (m *ThresholdRecommendationsRequest) XXX_Merge(src proto.Message)

func (*ThresholdRecommendationsRequest) XXX_Size

func (m *ThresholdRecommendationsRequest) XXX_Size() int

func (*ThresholdRecommendationsRequest) XXX_Unmarshal

func (m *ThresholdRecommendationsRequest) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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