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
- Variables
- func RegisterFaradayServerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterFaradayServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FaradayServerClient) error
- func RegisterFaradayServerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterFaradayServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FaradayServerServer) error
- func RegisterFaradayServerServer(s *grpc.Server, srv FaradayServerServer)
- func UseLogger(logger btclog.Logger)
- type BitcoinPrice
- func (*BitcoinPrice) Descriptor() ([]byte, []int)
- func (m *BitcoinPrice) GetPrice() string
- func (m *BitcoinPrice) GetPriceTimestamp() uint64
- func (*BitcoinPrice) ProtoMessage()
- func (m *BitcoinPrice) Reset()
- func (m *BitcoinPrice) String() string
- func (m *BitcoinPrice) XXX_DiscardUnknown()
- func (m *BitcoinPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BitcoinPrice) XXX_Merge(src proto.Message)
- func (m *BitcoinPrice) XXX_Size() int
- func (m *BitcoinPrice) XXX_Unmarshal(b []byte) error
- type ChannelInsight
- func (*ChannelInsight) Descriptor() ([]byte, []int)
- func (m *ChannelInsight) GetChanPoint() string
- func (m *ChannelInsight) GetConfirmations() uint32
- func (m *ChannelInsight) GetFeesEarnedMsat() int64
- func (m *ChannelInsight) GetMonitoredSeconds() uint64
- func (m *ChannelInsight) GetPrivate() bool
- func (m *ChannelInsight) GetUptimeSeconds() uint64
- func (m *ChannelInsight) GetVolumeIncomingMsat() int64
- func (m *ChannelInsight) GetVolumeOutgoingMsat() int64
- func (*ChannelInsight) ProtoMessage()
- func (m *ChannelInsight) Reset()
- func (m *ChannelInsight) String() string
- func (m *ChannelInsight) XXX_DiscardUnknown()
- func (m *ChannelInsight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ChannelInsight) XXX_Merge(src proto.Message)
- func (m *ChannelInsight) XXX_Size() int
- func (m *ChannelInsight) XXX_Unmarshal(b []byte) error
- type ChannelInsightsRequest
- func (*ChannelInsightsRequest) Descriptor() ([]byte, []int)
- func (*ChannelInsightsRequest) ProtoMessage()
- func (m *ChannelInsightsRequest) Reset()
- func (m *ChannelInsightsRequest) String() string
- func (m *ChannelInsightsRequest) XXX_DiscardUnknown()
- func (m *ChannelInsightsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ChannelInsightsRequest) XXX_Merge(src proto.Message)
- func (m *ChannelInsightsRequest) XXX_Size() int
- func (m *ChannelInsightsRequest) XXX_Unmarshal(b []byte) error
- type ChannelInsightsResponse
- func (*ChannelInsightsResponse) Descriptor() ([]byte, []int)
- func (m *ChannelInsightsResponse) GetChannelInsights() []*ChannelInsight
- func (*ChannelInsightsResponse) ProtoMessage()
- func (m *ChannelInsightsResponse) Reset()
- func (m *ChannelInsightsResponse) String() string
- func (m *ChannelInsightsResponse) XXX_DiscardUnknown()
- func (m *ChannelInsightsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ChannelInsightsResponse) XXX_Merge(src proto.Message)
- func (m *ChannelInsightsResponse) XXX_Size() int
- func (m *ChannelInsightsResponse) XXX_Unmarshal(b []byte) error
- type CloseRecommendationRequest
- func (*CloseRecommendationRequest) Descriptor() ([]byte, []int)
- func (m *CloseRecommendationRequest) GetMetric() CloseRecommendationRequest_Metric
- func (m *CloseRecommendationRequest) GetMinimumMonitored() int64
- func (*CloseRecommendationRequest) ProtoMessage()
- func (m *CloseRecommendationRequest) Reset()
- func (m *CloseRecommendationRequest) String() string
- func (m *CloseRecommendationRequest) XXX_DiscardUnknown()
- func (m *CloseRecommendationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CloseRecommendationRequest) XXX_Merge(src proto.Message)
- func (m *CloseRecommendationRequest) XXX_Size() int
- func (m *CloseRecommendationRequest) XXX_Unmarshal(b []byte) error
- type CloseRecommendationRequest_Metric
- type CloseRecommendationsResponse
- func (*CloseRecommendationsResponse) Descriptor() ([]byte, []int)
- func (m *CloseRecommendationsResponse) GetConsideredChannels() int32
- func (m *CloseRecommendationsResponse) GetRecommendations() []*Recommendation
- func (m *CloseRecommendationsResponse) GetTotalChannels() int32
- func (*CloseRecommendationsResponse) ProtoMessage()
- func (m *CloseRecommendationsResponse) Reset()
- func (m *CloseRecommendationsResponse) String() string
- func (m *CloseRecommendationsResponse) XXX_DiscardUnknown()
- func (m *CloseRecommendationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CloseRecommendationsResponse) XXX_Merge(src proto.Message)
- func (m *CloseRecommendationsResponse) XXX_Size() int
- func (m *CloseRecommendationsResponse) XXX_Unmarshal(b []byte) error
- type CloseReportRequest
- func (*CloseReportRequest) Descriptor() ([]byte, []int)
- func (m *CloseReportRequest) GetChannelPoint() string
- func (*CloseReportRequest) ProtoMessage()
- func (m *CloseReportRequest) Reset()
- func (m *CloseReportRequest) String() string
- func (m *CloseReportRequest) XXX_DiscardUnknown()
- func (m *CloseReportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CloseReportRequest) XXX_Merge(src proto.Message)
- func (m *CloseReportRequest) XXX_Size() int
- func (m *CloseReportRequest) XXX_Unmarshal(b []byte) error
- type CloseReportResponse
- func (*CloseReportResponse) Descriptor() ([]byte, []int)
- func (m *CloseReportResponse) GetChannelInitiator() bool
- func (m *CloseReportResponse) GetChannelPoint() string
- func (m *CloseReportResponse) GetCloseFee() string
- func (m *CloseReportResponse) GetCloseTxid() string
- func (m *CloseReportResponse) GetCloseType() string
- func (m *CloseReportResponse) GetOpenFee() string
- func (*CloseReportResponse) ProtoMessage()
- func (m *CloseReportResponse) Reset()
- func (m *CloseReportResponse) String() string
- func (m *CloseReportResponse) XXX_DiscardUnknown()
- func (m *CloseReportResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CloseReportResponse) XXX_Merge(src proto.Message)
- func (m *CloseReportResponse) XXX_Size() int
- func (m *CloseReportResponse) XXX_Unmarshal(b []byte) error
- type Config
- type EntryType
- type ExchangeRate
- func (*ExchangeRate) Descriptor() ([]byte, []int)
- func (m *ExchangeRate) GetBtcPrice() *BitcoinPrice
- func (m *ExchangeRate) GetTimestamp() uint64
- func (*ExchangeRate) ProtoMessage()
- func (m *ExchangeRate) Reset()
- func (m *ExchangeRate) String() string
- func (m *ExchangeRate) XXX_DiscardUnknown()
- func (m *ExchangeRate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ExchangeRate) XXX_Merge(src proto.Message)
- func (m *ExchangeRate) XXX_Size() int
- func (m *ExchangeRate) XXX_Unmarshal(b []byte) error
- type ExchangeRateRequest
- func (*ExchangeRateRequest) Descriptor() ([]byte, []int)
- func (m *ExchangeRateRequest) GetGranularity() Granularity
- func (m *ExchangeRateRequest) GetTimestamps() []uint64
- func (*ExchangeRateRequest) ProtoMessage()
- func (m *ExchangeRateRequest) Reset()
- func (m *ExchangeRateRequest) String() string
- func (m *ExchangeRateRequest) XXX_DiscardUnknown()
- func (m *ExchangeRateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ExchangeRateRequest) XXX_Merge(src proto.Message)
- func (m *ExchangeRateRequest) XXX_Size() int
- func (m *ExchangeRateRequest) XXX_Unmarshal(b []byte) error
- type ExchangeRateResponse
- func (*ExchangeRateResponse) Descriptor() ([]byte, []int)
- func (m *ExchangeRateResponse) GetRates() []*ExchangeRate
- func (*ExchangeRateResponse) ProtoMessage()
- func (m *ExchangeRateResponse) Reset()
- func (m *ExchangeRateResponse) String() string
- func (m *ExchangeRateResponse) XXX_DiscardUnknown()
- func (m *ExchangeRateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ExchangeRateResponse) XXX_Merge(src proto.Message)
- func (m *ExchangeRateResponse) XXX_Size() int
- func (m *ExchangeRateResponse) XXX_Unmarshal(b []byte) error
- type FaradayServerClient
- type FaradayServerServer
- type Granularity
- type NodeAuditRequest
- func (*NodeAuditRequest) Descriptor() ([]byte, []int)
- func (m *NodeAuditRequest) GetDisableFiat() bool
- func (m *NodeAuditRequest) GetEndTime() uint64
- func (m *NodeAuditRequest) GetGranularity() Granularity
- func (m *NodeAuditRequest) GetStartTime() uint64
- func (*NodeAuditRequest) ProtoMessage()
- func (m *NodeAuditRequest) Reset()
- func (m *NodeAuditRequest) String() string
- func (m *NodeAuditRequest) XXX_DiscardUnknown()
- func (m *NodeAuditRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NodeAuditRequest) XXX_Merge(src proto.Message)
- func (m *NodeAuditRequest) XXX_Size() int
- func (m *NodeAuditRequest) XXX_Unmarshal(b []byte) error
- type NodeAuditResponse
- func (*NodeAuditResponse) Descriptor() ([]byte, []int)
- func (m *NodeAuditResponse) GetReports() []*ReportEntry
- func (*NodeAuditResponse) ProtoMessage()
- func (m *NodeAuditResponse) Reset()
- func (m *NodeAuditResponse) String() string
- func (m *NodeAuditResponse) XXX_DiscardUnknown()
- func (m *NodeAuditResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NodeAuditResponse) XXX_Merge(src proto.Message)
- func (m *NodeAuditResponse) XXX_Size() int
- func (m *NodeAuditResponse) XXX_Unmarshal(b []byte) error
- type OutlierRecommendationsRequest
- func (*OutlierRecommendationsRequest) Descriptor() ([]byte, []int)
- func (m *OutlierRecommendationsRequest) GetOutlierMultiplier() float32
- func (m *OutlierRecommendationsRequest) GetRecRequest() *CloseRecommendationRequest
- func (*OutlierRecommendationsRequest) ProtoMessage()
- func (m *OutlierRecommendationsRequest) Reset()
- func (m *OutlierRecommendationsRequest) String() string
- func (m *OutlierRecommendationsRequest) XXX_DiscardUnknown()
- func (m *OutlierRecommendationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *OutlierRecommendationsRequest) XXX_Merge(src proto.Message)
- func (m *OutlierRecommendationsRequest) XXX_Size() int
- func (m *OutlierRecommendationsRequest) XXX_Unmarshal(b []byte) error
- type PairReport
- func (*PairReport) Descriptor() ([]byte, []int)
- func (m *PairReport) GetAmountIncomingMsat() int64
- func (m *PairReport) GetAmountOutgoingMsat() int64
- func (m *PairReport) GetFeesIncomingMsat() int64
- func (m *PairReport) GetFeesOutgoingMsat() int64
- func (*PairReport) ProtoMessage()
- func (m *PairReport) Reset()
- func (m *PairReport) String() string
- func (m *PairReport) XXX_DiscardUnknown()
- func (m *PairReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PairReport) XXX_Merge(src proto.Message)
- func (m *PairReport) XXX_Size() int
- func (m *PairReport) XXX_Unmarshal(b []byte) error
- type RPCServer
- func (s *RPCServer) ChannelInsights(ctx context.Context, _ *ChannelInsightsRequest) (*ChannelInsightsResponse, error)
- func (s *RPCServer) CloseReport(ctx context.Context, req *CloseReportRequest) (*CloseReportResponse, error)
- func (s *RPCServer) ExchangeRate(ctx context.Context, req *ExchangeRateRequest) (*ExchangeRateResponse, error)
- func (s *RPCServer) NodeAudit(ctx context.Context, req *NodeAuditRequest) (*NodeAuditResponse, error)
- func (s *RPCServer) OutlierRecommendations(ctx context.Context, req *OutlierRecommendationsRequest) (*CloseRecommendationsResponse, error)
- func (s *RPCServer) RevenueReport(ctx context.Context, req *RevenueReportRequest) (*RevenueReportResponse, error)
- func (s *RPCServer) Start() error
- func (s *RPCServer) StartAsSubserver(lndClient lndclient.LndServices) error
- func (s *RPCServer) Stop() error
- func (s *RPCServer) ThresholdRecommendations(ctx context.Context, req *ThresholdRecommendationsRequest) (*CloseRecommendationsResponse, error)
- func (s *RPCServer) ValidateMacaroon(ctx context.Context, requiredPermissions []bakery.Op, fullMethod string) error
- type Recommendation
- func (*Recommendation) Descriptor() ([]byte, []int)
- func (m *Recommendation) GetChanPoint() string
- func (m *Recommendation) GetRecommendClose() bool
- func (m *Recommendation) GetValue() float32
- func (*Recommendation) ProtoMessage()
- func (m *Recommendation) Reset()
- func (m *Recommendation) String() string
- func (m *Recommendation) XXX_DiscardUnknown()
- func (m *Recommendation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Recommendation) XXX_Merge(src proto.Message)
- func (m *Recommendation) XXX_Size() int
- func (m *Recommendation) XXX_Unmarshal(b []byte) error
- type ReportEntry
- func (*ReportEntry) Descriptor() ([]byte, []int)
- func (m *ReportEntry) GetAmount() uint64
- func (m *ReportEntry) GetAsset() string
- func (m *ReportEntry) GetBtcPrice() *BitcoinPrice
- func (m *ReportEntry) GetCredit() bool
- func (m *ReportEntry) GetFiat() string
- func (m *ReportEntry) GetNote() string
- func (m *ReportEntry) GetOnChain() bool
- func (m *ReportEntry) GetReference() string
- func (m *ReportEntry) GetTimestamp() uint64
- func (m *ReportEntry) GetTxid() string
- func (m *ReportEntry) GetType() EntryType
- func (*ReportEntry) ProtoMessage()
- func (m *ReportEntry) Reset()
- func (m *ReportEntry) String() string
- func (m *ReportEntry) XXX_DiscardUnknown()
- func (m *ReportEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ReportEntry) XXX_Merge(src proto.Message)
- func (m *ReportEntry) XXX_Size() int
- func (m *ReportEntry) XXX_Unmarshal(b []byte) error
- type RevenueReport
- func (*RevenueReport) Descriptor() ([]byte, []int)
- func (m *RevenueReport) GetPairReports() map[string]*PairReport
- func (m *RevenueReport) GetTargetChannel() string
- func (*RevenueReport) ProtoMessage()
- func (m *RevenueReport) Reset()
- func (m *RevenueReport) String() string
- func (m *RevenueReport) XXX_DiscardUnknown()
- func (m *RevenueReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RevenueReport) XXX_Merge(src proto.Message)
- func (m *RevenueReport) XXX_Size() int
- func (m *RevenueReport) XXX_Unmarshal(b []byte) error
- type RevenueReportRequest
- func (*RevenueReportRequest) Descriptor() ([]byte, []int)
- func (m *RevenueReportRequest) GetChanPoints() []string
- func (m *RevenueReportRequest) GetEndTime() uint64
- func (m *RevenueReportRequest) GetStartTime() uint64
- func (*RevenueReportRequest) ProtoMessage()
- func (m *RevenueReportRequest) Reset()
- func (m *RevenueReportRequest) String() string
- func (m *RevenueReportRequest) XXX_DiscardUnknown()
- func (m *RevenueReportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RevenueReportRequest) XXX_Merge(src proto.Message)
- func (m *RevenueReportRequest) XXX_Size() int
- func (m *RevenueReportRequest) XXX_Unmarshal(b []byte) error
- type RevenueReportResponse
- func (*RevenueReportResponse) Descriptor() ([]byte, []int)
- func (m *RevenueReportResponse) GetReports() []*RevenueReport
- func (*RevenueReportResponse) ProtoMessage()
- func (m *RevenueReportResponse) Reset()
- func (m *RevenueReportResponse) String() string
- func (m *RevenueReportResponse) XXX_DiscardUnknown()
- func (m *RevenueReportResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RevenueReportResponse) XXX_Merge(src proto.Message)
- func (m *RevenueReportResponse) XXX_Size() int
- func (m *RevenueReportResponse) XXX_Unmarshal(b []byte) error
- type ThresholdRecommendationsRequest
- func (*ThresholdRecommendationsRequest) Descriptor() ([]byte, []int)
- func (m *ThresholdRecommendationsRequest) GetRecRequest() *CloseRecommendationRequest
- func (m *ThresholdRecommendationsRequest) GetThresholdValue() float32
- func (*ThresholdRecommendationsRequest) ProtoMessage()
- func (m *ThresholdRecommendationsRequest) Reset()
- func (m *ThresholdRecommendationsRequest) String() string
- func (m *ThresholdRecommendationsRequest) XXX_DiscardUnknown()
- func (m *ThresholdRecommendationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ThresholdRecommendationsRequest) XXX_Merge(src proto.Message)
- func (m *ThresholdRecommendationsRequest) XXX_Size() int
- func (m *ThresholdRecommendationsRequest) XXX_Unmarshal(b []byte) error
- type UnimplementedFaradayServerServer
- func (*UnimplementedFaradayServerServer) ChannelInsights(ctx context.Context, req *ChannelInsightsRequest) (*ChannelInsightsResponse, error)
- func (*UnimplementedFaradayServerServer) CloseReport(ctx context.Context, req *CloseReportRequest) (*CloseReportResponse, error)
- func (*UnimplementedFaradayServerServer) ExchangeRate(ctx context.Context, req *ExchangeRateRequest) (*ExchangeRateResponse, error)
- func (*UnimplementedFaradayServerServer) NodeAudit(ctx context.Context, req *NodeAuditRequest) (*NodeAuditResponse, error)
- func (*UnimplementedFaradayServerServer) OutlierRecommendations(ctx context.Context, req *OutlierRecommendationsRequest) (*CloseRecommendationsResponse, error)
- func (*UnimplementedFaradayServerServer) RevenueReport(ctx context.Context, req *RevenueReportRequest) (*RevenueReportResponse, error)
- func (*UnimplementedFaradayServerServer) ThresholdRecommendations(ctx context.Context, req *ThresholdRecommendationsRequest) (*CloseRecommendationsResponse, error)
Constants ¶
const Subsystem = "FRPC"
Subsystem defines the logging code for this subsystem.
Variables ¶
var CloseRecommendationRequest_Metric_name = map[int32]string{
0: "UNKNOWN",
1: "UPTIME",
2: "REVENUE",
3: "INCOMING_VOLUME",
4: "OUTGOING_VOLUME",
5: "TOTAL_VOLUME",
}
var CloseRecommendationRequest_Metric_value = map[string]int32{
"UNKNOWN": 0,
"UPTIME": 1,
"REVENUE": 2,
"INCOMING_VOLUME": 3,
"OUTGOING_VOLUME": 4,
"TOTAL_VOLUME": 5,
}
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",
}
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,
"SWEEP": 13,
"SWEEP_FEE": 14,
"CHANNEL_CLOSE_FEE": 15,
}
var ( // ErrBitcoinNodeRequired is required when an endpoint which requires // a bitcoin node backend is hit and we are not connected to one. ErrBitcoinNodeRequired = errors.New("bitcoin node required") )
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",
}
var 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,
}
var ( // RequiredPermissions is a map of all faraday RPC methods and their // required macaroon permissions to access faraday. RequiredPermissions = map[string][]bakery.Op{ "/frdrpc.FaradayServer/OutlierRecommendations": {{ Entity: "recommendation", Action: "read", }}, "/frdrpc.FaradayServer/ThresholdRecommendations": {{ Entity: "recommendation", Action: "read", }}, "/frdrpc.FaradayServer/RevenueReport": {{ Entity: "report", Action: "read", }}, "/frdrpc.FaradayServer/ChannelInsights": {{ Entity: "insights", Action: "read", }}, "/frdrpc.FaradayServer/ExchangeRate": {{ Entity: "rates", Action: "read", }}, "/frdrpc.FaradayServer/NodeAudit": {{ Entity: "audit", Action: "read", }}, "/frdrpc.FaradayServer/CloseReport": {{ Entity: "report", Action: "read", }}, } )
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.
func RegisterFaradayServerServer ¶
func RegisterFaradayServerServer(s *grpc.Server, 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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*BitcoinPrice) Descriptor ¶
func (*BitcoinPrice) Descriptor() ([]byte, []int)
func (*BitcoinPrice) GetPrice ¶
func (m *BitcoinPrice) GetPrice() string
func (*BitcoinPrice) GetPriceTimestamp ¶
func (m *BitcoinPrice) GetPriceTimestamp() uint64
func (*BitcoinPrice) ProtoMessage ¶
func (*BitcoinPrice) ProtoMessage()
func (*BitcoinPrice) Reset ¶
func (m *BitcoinPrice) Reset()
func (*BitcoinPrice) String ¶
func (m *BitcoinPrice) String() string
func (*BitcoinPrice) XXX_DiscardUnknown ¶
func (m *BitcoinPrice) XXX_DiscardUnknown()
func (*BitcoinPrice) XXX_Marshal ¶
func (m *BitcoinPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BitcoinPrice) XXX_Merge ¶
func (m *BitcoinPrice) XXX_Merge(src proto.Message)
func (*BitcoinPrice) XXX_Size ¶
func (m *BitcoinPrice) XXX_Size() int
func (*BitcoinPrice) XXX_Unmarshal ¶
func (m *BitcoinPrice) XXX_Unmarshal(b []byte) error
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 (m *CloseRecommendationRequest) GetMetric() CloseRecommendationRequest_Metric
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 ¶
func (x CloseRecommendationRequest_Metric) String() 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 (m *CloseRecommendationsResponse) String() 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 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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*CloseReportRequest) Descriptor ¶
func (*CloseReportRequest) Descriptor() ([]byte, []int)
func (*CloseReportRequest) GetChannelPoint ¶
func (m *CloseReportRequest) GetChannelPoint() string
func (*CloseReportRequest) ProtoMessage ¶
func (*CloseReportRequest) ProtoMessage()
func (*CloseReportRequest) Reset ¶
func (m *CloseReportRequest) Reset()
func (*CloseReportRequest) String ¶
func (m *CloseReportRequest) String() string
func (*CloseReportRequest) XXX_DiscardUnknown ¶
func (m *CloseReportRequest) XXX_DiscardUnknown()
func (*CloseReportRequest) XXX_Marshal ¶
func (m *CloseReportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CloseReportRequest) XXX_Merge ¶
func (m *CloseReportRequest) XXX_Merge(src proto.Message)
func (*CloseReportRequest) XXX_Size ¶
func (m *CloseReportRequest) XXX_Size() int
func (*CloseReportRequest) XXX_Unmarshal ¶
func (m *CloseReportRequest) XXX_Unmarshal(b []byte) error
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*CloseReportResponse) Descriptor ¶
func (*CloseReportResponse) Descriptor() ([]byte, []int)
func (*CloseReportResponse) GetChannelInitiator ¶
func (m *CloseReportResponse) GetChannelInitiator() bool
func (*CloseReportResponse) GetChannelPoint ¶
func (m *CloseReportResponse) GetChannelPoint() string
func (*CloseReportResponse) GetCloseFee ¶
func (m *CloseReportResponse) GetCloseFee() string
func (*CloseReportResponse) GetCloseTxid ¶
func (m *CloseReportResponse) GetCloseTxid() string
func (*CloseReportResponse) GetCloseType ¶
func (m *CloseReportResponse) GetCloseType() string
func (*CloseReportResponse) GetOpenFee ¶
func (m *CloseReportResponse) GetOpenFee() string
func (*CloseReportResponse) ProtoMessage ¶
func (*CloseReportResponse) ProtoMessage()
func (*CloseReportResponse) Reset ¶
func (m *CloseReportResponse) Reset()
func (*CloseReportResponse) String ¶
func (m *CloseReportResponse) String() string
func (*CloseReportResponse) XXX_DiscardUnknown ¶
func (m *CloseReportResponse) XXX_DiscardUnknown()
func (*CloseReportResponse) XXX_Marshal ¶
func (m *CloseReportResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CloseReportResponse) XXX_Merge ¶
func (m *CloseReportResponse) XXX_Merge(src proto.Message)
func (*CloseReportResponse) XXX_Size ¶
func (m *CloseReportResponse) XXX_Size() int
func (*CloseReportResponse) XXX_Unmarshal ¶
func (m *CloseReportResponse) XXX_Unmarshal(b []byte) error
type Config ¶
type Config struct {
// Lnd is a client which can be used to query lnd.
Lnd lndclient.LndServices
// 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
// BitcoinClient is set if the client opted to connect to a bitcoin
// backend, if not, it will be nil.
BitcoinClient chain.BitcoinClient
// TLSServerConfig is the configuration to serve a secure connection
// over TLS.
TLSServerConfig *tls.Config
// RestClientConfig is the client configuration to connect to a TLS
// server started with the TLS config above. This is used for the REST
// proxy that connects internally to the gRPC server and therefore is a
// TLS client.
RestClientConfig *credentials.TransportCredentials
// FaradayDir is the main directory faraday uses. The macaroon database
// will be created there.
FaradayDir string
// MacaroonPath is the full path to the default faraday macaroon file
// that is created automatically. This path normally is within
// FaradayDir unless otherwise specified by the user.
MacaroonPath 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 // 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) EnumDescriptor ¶
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*ExchangeRate) Descriptor ¶
func (*ExchangeRate) Descriptor() ([]byte, []int)
func (*ExchangeRate) GetBtcPrice ¶
func (m *ExchangeRate) GetBtcPrice() *BitcoinPrice
func (*ExchangeRate) GetTimestamp ¶
func (m *ExchangeRate) GetTimestamp() uint64
func (*ExchangeRate) ProtoMessage ¶
func (*ExchangeRate) ProtoMessage()
func (*ExchangeRate) Reset ¶
func (m *ExchangeRate) Reset()
func (*ExchangeRate) String ¶
func (m *ExchangeRate) String() string
func (*ExchangeRate) XXX_DiscardUnknown ¶
func (m *ExchangeRate) XXX_DiscardUnknown()
func (*ExchangeRate) XXX_Marshal ¶
func (m *ExchangeRate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ExchangeRate) XXX_Merge ¶
func (m *ExchangeRate) XXX_Merge(src proto.Message)
func (*ExchangeRate) XXX_Size ¶
func (m *ExchangeRate) XXX_Size() int
func (*ExchangeRate) XXX_Unmarshal ¶
func (m *ExchangeRate) XXX_Unmarshal(b []byte) error
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*ExchangeRateRequest) Descriptor ¶
func (*ExchangeRateRequest) Descriptor() ([]byte, []int)
func (*ExchangeRateRequest) GetGranularity ¶
func (m *ExchangeRateRequest) GetGranularity() Granularity
func (*ExchangeRateRequest) GetTimestamps ¶
func (m *ExchangeRateRequest) GetTimestamps() []uint64
func (*ExchangeRateRequest) ProtoMessage ¶
func (*ExchangeRateRequest) ProtoMessage()
func (*ExchangeRateRequest) Reset ¶
func (m *ExchangeRateRequest) Reset()
func (*ExchangeRateRequest) String ¶
func (m *ExchangeRateRequest) String() string
func (*ExchangeRateRequest) XXX_DiscardUnknown ¶
func (m *ExchangeRateRequest) XXX_DiscardUnknown()
func (*ExchangeRateRequest) XXX_Marshal ¶
func (m *ExchangeRateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ExchangeRateRequest) XXX_Merge ¶
func (m *ExchangeRateRequest) XXX_Merge(src proto.Message)
func (*ExchangeRateRequest) XXX_Size ¶
func (m *ExchangeRateRequest) XXX_Size() int
func (*ExchangeRateRequest) XXX_Unmarshal ¶
func (m *ExchangeRateRequest) XXX_Unmarshal(b []byte) error
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*ExchangeRateResponse) Descriptor ¶
func (*ExchangeRateResponse) Descriptor() ([]byte, []int)
func (*ExchangeRateResponse) GetRates ¶
func (m *ExchangeRateResponse) GetRates() []*ExchangeRate
func (*ExchangeRateResponse) ProtoMessage ¶
func (*ExchangeRateResponse) ProtoMessage()
func (*ExchangeRateResponse) Reset ¶
func (m *ExchangeRateResponse) Reset()
func (*ExchangeRateResponse) String ¶
func (m *ExchangeRateResponse) String() string
func (*ExchangeRateResponse) XXX_DiscardUnknown ¶
func (m *ExchangeRateResponse) XXX_DiscardUnknown()
func (*ExchangeRateResponse) XXX_Marshal ¶
func (m *ExchangeRateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ExchangeRateResponse) XXX_Merge ¶
func (m *ExchangeRateResponse) XXX_Merge(src proto.Message)
func (*ExchangeRateResponse) XXX_Size ¶
func (m *ExchangeRateResponse) XXX_Size() int
func (*ExchangeRateResponse) XXX_Unmarshal ¶
func (m *ExchangeRateResponse) XXX_Unmarshal(b []byte) error
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://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/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)
}
FaradayServerServer is the server API for FaradayServer service.
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) EnumDescriptor ¶
func (Granularity) EnumDescriptor() ([]byte, []int)
func (Granularity) String ¶
func (x Granularity) String() string
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*NodeAuditRequest) Descriptor ¶
func (*NodeAuditRequest) Descriptor() ([]byte, []int)
func (*NodeAuditRequest) GetDisableFiat ¶
func (m *NodeAuditRequest) GetDisableFiat() bool
func (*NodeAuditRequest) GetEndTime ¶
func (m *NodeAuditRequest) GetEndTime() uint64
func (*NodeAuditRequest) GetGranularity ¶
func (m *NodeAuditRequest) GetGranularity() Granularity
func (*NodeAuditRequest) GetStartTime ¶
func (m *NodeAuditRequest) GetStartTime() uint64
func (*NodeAuditRequest) ProtoMessage ¶
func (*NodeAuditRequest) ProtoMessage()
func (*NodeAuditRequest) Reset ¶
func (m *NodeAuditRequest) Reset()
func (*NodeAuditRequest) String ¶
func (m *NodeAuditRequest) String() string
func (*NodeAuditRequest) XXX_DiscardUnknown ¶
func (m *NodeAuditRequest) XXX_DiscardUnknown()
func (*NodeAuditRequest) XXX_Marshal ¶
func (m *NodeAuditRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*NodeAuditRequest) XXX_Merge ¶
func (m *NodeAuditRequest) XXX_Merge(src proto.Message)
func (*NodeAuditRequest) XXX_Size ¶
func (m *NodeAuditRequest) XXX_Size() int
func (*NodeAuditRequest) XXX_Unmarshal ¶
func (m *NodeAuditRequest) XXX_Unmarshal(b []byte) error
type NodeAuditResponse ¶
type NodeAuditResponse 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 (*NodeAuditResponse) Descriptor ¶
func (*NodeAuditResponse) Descriptor() ([]byte, []int)
func (*NodeAuditResponse) GetReports ¶
func (m *NodeAuditResponse) GetReports() []*ReportEntry
func (*NodeAuditResponse) ProtoMessage ¶
func (*NodeAuditResponse) ProtoMessage()
func (*NodeAuditResponse) Reset ¶
func (m *NodeAuditResponse) Reset()
func (*NodeAuditResponse) String ¶
func (m *NodeAuditResponse) String() string
func (*NodeAuditResponse) XXX_DiscardUnknown ¶
func (m *NodeAuditResponse) XXX_DiscardUnknown()
func (*NodeAuditResponse) XXX_Marshal ¶
func (m *NodeAuditResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*NodeAuditResponse) XXX_Merge ¶
func (m *NodeAuditResponse) XXX_Merge(src proto.Message)
func (*NodeAuditResponse) XXX_Size ¶
func (m *NodeAuditResponse) XXX_Size() int
func (*NodeAuditResponse) XXX_Unmarshal ¶
func (m *NodeAuditResponse) 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 (m *OutlierRecommendationsRequest) GetRecRequest() *CloseRecommendationRequest
func (*OutlierRecommendationsRequest) ProtoMessage ¶
func (*OutlierRecommendationsRequest) ProtoMessage()
func (*OutlierRecommendationsRequest) Reset ¶
func (m *OutlierRecommendationsRequest) Reset()
func (*OutlierRecommendationsRequest) String ¶
func (m *OutlierRecommendationsRequest) String() 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 ¶
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 ¶
func (s *RPCServer) ChannelInsights(ctx context.Context, _ *ChannelInsightsRequest) (*ChannelInsightsResponse, error)
ChannelInsights returns the channel insights for our currently open set of channels.
func (*RPCServer) CloseReport ¶
func (s *RPCServer) CloseReport(ctx context.Context, req *CloseReportRequest) (*CloseReportResponse, error)
CloseReport returns a close report for the channel provided. Note that this endpoint requires connection to an external bitcoind node.
func (*RPCServer) ExchangeRate ¶
func (s *RPCServer) ExchangeRate(ctx context.Context, req *ExchangeRateRequest) (*ExchangeRateResponse, error)
FiatEstimate provides a fiat estimate for a set of timestamped bitcoin prices.
func (*RPCServer) NodeAudit ¶
func (s *RPCServer) NodeAudit(ctx context.Context, req *NodeAuditRequest) (*NodeAuditResponse, error)
NodeAudit returns an on chain report for the period requested.
func (*RPCServer) OutlierRecommendations ¶
func (s *RPCServer) OutlierRecommendations(ctx context.Context, req *OutlierRecommendationsRequest) (*CloseRecommendationsResponse, error)
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) StartAsSubserver ¶
func (s *RPCServer) StartAsSubserver(lndClient lndclient.LndServices) 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) ThresholdRecommendations ¶
func (s *RPCServer) ThresholdRecommendations(ctx context.Context, req *ThresholdRecommendationsRequest) (*CloseRecommendationsResponse, error)
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.
func (*RPCServer) ValidateMacaroon ¶
func (s *RPCServer) ValidateMacaroon(ctx context.Context, requiredPermissions []bakery.Op, fullMethod string) error
ValidateMacaroon extracts the macaroon from the context's gRPC metadata, checks its signature, makes sure all specified permissions for the called method are contained within and finally ensures all caveat conditions are met. A non-nil error is returned if any of the checks fail. This method is needed to enable faraday running as an external subserver in the same process as lnd but still validate its own macaroons.
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"`
// The bitcoin price and timestamp used to calcualte our fiat value.
BtcPrice *BitcoinPrice `protobuf:"bytes,11,opt,name=btc_price,json=btcPrice,proto3" json:"btc_price,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) GetBtcPrice ¶
func (m *ReportEntry) GetBtcPrice() *BitcoinPrice
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 (m *ThresholdRecommendationsRequest) GetRecRequest() *CloseRecommendationRequest
func (*ThresholdRecommendationsRequest) GetThresholdValue ¶
func (m *ThresholdRecommendationsRequest) GetThresholdValue() float32
func (*ThresholdRecommendationsRequest) ProtoMessage ¶
func (*ThresholdRecommendationsRequest) ProtoMessage()
func (*ThresholdRecommendationsRequest) Reset ¶
func (m *ThresholdRecommendationsRequest) Reset()
func (*ThresholdRecommendationsRequest) String ¶
func (m *ThresholdRecommendationsRequest) String() 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
type UnimplementedFaradayServerServer ¶
type UnimplementedFaradayServerServer struct {
}
UnimplementedFaradayServerServer can be embedded to have forward compatible implementations.
func (*UnimplementedFaradayServerServer) ChannelInsights ¶
func (*UnimplementedFaradayServerServer) ChannelInsights(ctx context.Context, req *ChannelInsightsRequest) (*ChannelInsightsResponse, error)
func (*UnimplementedFaradayServerServer) CloseReport ¶
func (*UnimplementedFaradayServerServer) CloseReport(ctx context.Context, req *CloseReportRequest) (*CloseReportResponse, error)
func (*UnimplementedFaradayServerServer) ExchangeRate ¶
func (*UnimplementedFaradayServerServer) ExchangeRate(ctx context.Context, req *ExchangeRateRequest) (*ExchangeRateResponse, error)
func (*UnimplementedFaradayServerServer) NodeAudit ¶
func (*UnimplementedFaradayServerServer) NodeAudit(ctx context.Context, req *NodeAuditRequest) (*NodeAuditResponse, error)
func (*UnimplementedFaradayServerServer) OutlierRecommendations ¶
func (*UnimplementedFaradayServerServer) OutlierRecommendations(ctx context.Context, req *OutlierRecommendationsRequest) (*CloseRecommendationsResponse, error)
func (*UnimplementedFaradayServerServer) RevenueReport ¶
func (*UnimplementedFaradayServerServer) RevenueReport(ctx context.Context, req *RevenueReportRequest) (*RevenueReportResponse, error)
func (*UnimplementedFaradayServerServer) ThresholdRecommendations ¶
func (*UnimplementedFaradayServerServer) ThresholdRecommendations(ctx context.Context, req *ThresholdRecommendationsRequest) (*CloseRecommendationsResponse, error)