frdrpc: add GetChannelEvents

Adds the GetChannelEvents RPC to the proto and regenerates the gRPC,
gateway, swagger, and JSON stubs. The request carries a chan_point,
inclusive start_time and exclusive end_time bounds, a max_events cap,
and a last_id keyset cursor; the response echoes last_id and a has_more
flag so callers can drive pagination without server-side state.
This commit is contained in:
bitromortac 2026-05-06 12:04:37 +02:00
parent c1ada7a4a3
commit 9e10faa805
9 changed files with 873 additions and 140 deletions

View file

@ -267,6 +267,62 @@ func (EntryType) EnumDescriptor() ([]byte, []int) {
return file_faraday_proto_rawDescGZIP(), []int{2}
}
type ChannelEventType int32
const (
// An unknown event type.
ChannelEventType_CHAN_EVENT_UNKNOWN ChannelEventType = 0
// An online event.
ChannelEventType_CHAN_EVENT_ONLINE ChannelEventType = 1
// An offline event.
ChannelEventType_CHAN_EVENT_OFFLINE ChannelEventType = 2
// A channel balance update event.
ChannelEventType_CHAN_EVENT_UPDATE ChannelEventType = 3
)
// Enum value maps for ChannelEventType.
var (
ChannelEventType_name = map[int32]string{
0: "CHAN_EVENT_UNKNOWN",
1: "CHAN_EVENT_ONLINE",
2: "CHAN_EVENT_OFFLINE",
3: "CHAN_EVENT_UPDATE",
}
ChannelEventType_value = map[string]int32{
"CHAN_EVENT_UNKNOWN": 0,
"CHAN_EVENT_ONLINE": 1,
"CHAN_EVENT_OFFLINE": 2,
"CHAN_EVENT_UPDATE": 3,
}
)
func (x ChannelEventType) Enum() *ChannelEventType {
p := new(ChannelEventType)
*p = x
return p
}
func (x ChannelEventType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ChannelEventType) Descriptor() protoreflect.EnumDescriptor {
return file_faraday_proto_enumTypes[3].Descriptor()
}
func (ChannelEventType) Type() protoreflect.EnumType {
return &file_faraday_proto_enumTypes[3]
}
func (x ChannelEventType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ChannelEventType.Descriptor instead.
func (ChannelEventType) EnumDescriptor() ([]byte, []int) {
return file_faraday_proto_rawDescGZIP(), []int{3}
}
type CloseRecommendationRequest_Metric int32
const (
@ -309,11 +365,11 @@ func (x CloseRecommendationRequest_Metric) String() string {
}
func (CloseRecommendationRequest_Metric) Descriptor() protoreflect.EnumDescriptor {
return file_faraday_proto_enumTypes[3].Descriptor()
return file_faraday_proto_enumTypes[4].Descriptor()
}
func (CloseRecommendationRequest_Metric) Type() protoreflect.EnumType {
return &file_faraday_proto_enumTypes[3]
return &file_faraday_proto_enumTypes[4]
}
func (x CloseRecommendationRequest_Metric) Number() protoreflect.EnumNumber {
@ -1912,6 +1968,248 @@ func (x *CloseReportResponse) GetCloseFee() string {
return ""
}
type ChannelEventsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The channel point of the channel to get events for, formatted txid:outpoint.
ChanPoint string `protobuf:"bytes,1,opt,name=chan_point,json=chanPoint,proto3" json:"chan_point,omitempty"`
// Lower time bound, inclusive, as Unix seconds. Independent filter — does
// not need to advance between paginated calls. Zero means no lower bound.
StartTime int64 `protobuf:"varint,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
// Upper time bound, exclusive, as Unix seconds. Must be greater than or
// equal to start_time. Zero means "use the server's current time".
EndTime int64 `protobuf:"varint,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
// The maximum number of events to return. If zero, the server default is
// used. The server enforces a hard cap; values above the cap are clamped.
MaxEvents uint32 `protobuf:"varint,4,opt,name=max_events,json=maxEvents,proto3" json:"max_events,omitempty"`
// Pagination cursor: id of the last event from the previous response.
// Pass zero on the first call; for subsequent calls pass the response's
// last_id to resume past already-returned events.
LastId int64 `protobuf:"varint,5,opt,name=last_id,json=lastId,proto3" json:"last_id,omitempty"`
}
func (x *ChannelEventsRequest) Reset() {
*x = ChannelEventsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_faraday_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelEventsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelEventsRequest) ProtoMessage() {}
func (x *ChannelEventsRequest) ProtoReflect() protoreflect.Message {
mi := &file_faraday_proto_msgTypes[22]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelEventsRequest.ProtoReflect.Descriptor instead.
func (*ChannelEventsRequest) Descriptor() ([]byte, []int) {
return file_faraday_proto_rawDescGZIP(), []int{22}
}
func (x *ChannelEventsRequest) GetChanPoint() string {
if x != nil {
return x.ChanPoint
}
return ""
}
func (x *ChannelEventsRequest) GetStartTime() int64 {
if x != nil {
return x.StartTime
}
return 0
}
func (x *ChannelEventsRequest) GetEndTime() int64 {
if x != nil {
return x.EndTime
}
return 0
}
func (x *ChannelEventsRequest) GetMaxEvents() uint32 {
if x != nil {
return x.MaxEvents
}
return 0
}
func (x *ChannelEventsRequest) GetLastId() int64 {
if x != nil {
return x.LastId
}
return 0
}
type ChannelEventsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The list of channel events.
Events []*ChannelEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
// Id of the last event returned, suitable as the next request's last_id.
// Zero when events is empty.
LastId int64 `protobuf:"varint,2,opt,name=last_id,json=lastId,proto3" json:"last_id,omitempty"`
// True when the page filled to the requested limit and more events may be
// available; callers should keep paginating until this is false.
HasMore bool `protobuf:"varint,3,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"`
}
func (x *ChannelEventsResponse) Reset() {
*x = ChannelEventsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_faraday_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelEventsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelEventsResponse) ProtoMessage() {}
func (x *ChannelEventsResponse) ProtoReflect() protoreflect.Message {
mi := &file_faraday_proto_msgTypes[23]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelEventsResponse.ProtoReflect.Descriptor instead.
func (*ChannelEventsResponse) Descriptor() ([]byte, []int) {
return file_faraday_proto_rawDescGZIP(), []int{23}
}
func (x *ChannelEventsResponse) GetEvents() []*ChannelEvent {
if x != nil {
return x.Events
}
return nil
}
func (x *ChannelEventsResponse) GetLastId() int64 {
if x != nil {
return x.LastId
}
return 0
}
func (x *ChannelEventsResponse) GetHasMore() bool {
if x != nil {
return x.HasMore
}
return false
}
type ChannelEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The timestamp of the event, as Unix seconds.
Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// The type of the event.
EventType ChannelEventType `protobuf:"varint,2,opt,name=event_type,json=eventType,proto3,enum=frdrpc.ChannelEventType" json:"event_type,omitempty"`
// The channel's local balance at the time of the event in sat.
LocalBalance uint64 `protobuf:"varint,3,opt,name=local_balance,json=localBalance,proto3" json:"local_balance,omitempty"`
// The channel's remote balance at the time of the event in sat.
RemoteBalance uint64 `protobuf:"varint,4,opt,name=remote_balance,json=remoteBalance,proto3" json:"remote_balance,omitempty"`
// Server-assigned monotonic identity. Echo this back as the next
// request's last_id when paginating.
Id int64 `protobuf:"varint,5,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *ChannelEvent) Reset() {
*x = ChannelEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_faraday_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelEvent) ProtoMessage() {}
func (x *ChannelEvent) ProtoReflect() protoreflect.Message {
mi := &file_faraday_proto_msgTypes[24]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelEvent.ProtoReflect.Descriptor instead.
func (*ChannelEvent) Descriptor() ([]byte, []int) {
return file_faraday_proto_rawDescGZIP(), []int{24}
}
func (x *ChannelEvent) GetTimestamp() int64 {
if x != nil {
return x.Timestamp
}
return 0
}
func (x *ChannelEvent) GetEventType() ChannelEventType {
if x != nil {
return x.EventType
}
return ChannelEventType_CHAN_EVENT_UNKNOWN
}
func (x *ChannelEvent) GetLocalBalance() uint64 {
if x != nil {
return x.LocalBalance
}
return 0
}
func (x *ChannelEvent) GetRemoteBalance() uint64 {
if x != nil {
return x.RemoteBalance
}
return 0
}
func (x *ChannelEvent) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
var File_faraday_proto protoreflect.FileDescriptor
var file_faraday_proto_rawDesc = []byte{
@ -2144,83 +2442,125 @@ var file_faraday_proto_rawDesc = []byte{
0x6e, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x65,
0x6e, 0x46, 0x65, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x66, 0x65,
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x46, 0x65,
0x65, 0x2a, 0xa1, 0x01, 0x0a, 0x0b, 0x47, 0x72, 0x61, 0x6e, 0x75, 0x6c, 0x61, 0x72, 0x69, 0x74,
0x79, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x47, 0x52, 0x41,
0x4e, 0x55, 0x4c, 0x41, 0x52, 0x49, 0x54, 0x59, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x49,
0x4e, 0x55, 0x54, 0x45, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x49, 0x56, 0x45, 0x5f, 0x4d,
0x49, 0x4e, 0x55, 0x54, 0x45, 0x53, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x49, 0x46, 0x54,
0x45, 0x45, 0x4e, 0x5f, 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x53, 0x10, 0x03, 0x12, 0x12, 0x0a,
0x0e, 0x54, 0x48, 0x49, 0x52, 0x54, 0x59, 0x5f, 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x53, 0x10,
0x04, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x55, 0x52, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x53,
0x49, 0x58, 0x5f, 0x48, 0x4f, 0x55, 0x52, 0x53, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x57,
0x45, 0x4c, 0x56, 0x45, 0x5f, 0x48, 0x4f, 0x55, 0x52, 0x53, 0x10, 0x07, 0x12, 0x07, 0x0a, 0x03,
0x44, 0x41, 0x59, 0x10, 0x08, 0x2a, 0x6a, 0x0a, 0x0b, 0x46, 0x69, 0x61, 0x74, 0x42, 0x61, 0x63,
0x6b, 0x65, 0x6e, 0x64, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f,
0x46, 0x49, 0x41, 0x54, 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a,
0x07, 0x43, 0x4f, 0x49, 0x4e, 0x43, 0x41, 0x50, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x4f,
0x49, 0x4e, 0x44, 0x45, 0x53, 0x4b, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x55, 0x53, 0x54,
0x4f, 0x4d, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x49, 0x4e, 0x47, 0x45, 0x43, 0x4b,
0x4f, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x49, 0x54, 0x46, 0x49, 0x4e, 0x45, 0x58, 0x10,
0x05, 0x2a, 0xa2, 0x02, 0x0a, 0x09, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12,
0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12,
0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x4f, 0x50,
0x45, 0x4e, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x43,
0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x10, 0x02, 0x12, 0x14, 0x0a,
0x10, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x5f, 0x46, 0x45,
0x45, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x43,
0x4c, 0x4f, 0x53, 0x45, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x43, 0x45, 0x49, 0x50,
0x54, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x06,
0x12, 0x07, 0x0a, 0x03, 0x46, 0x45, 0x45, 0x10, 0x07, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x49, 0x52,
0x43, 0x55, 0x4c, 0x41, 0x52, 0x5f, 0x52, 0x45, 0x43, 0x45, 0x49, 0x50, 0x54, 0x10, 0x08, 0x12,
0x0b, 0x0a, 0x07, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x10, 0x09, 0x12, 0x0f, 0x0a, 0x0b,
0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x0a, 0x12, 0x14, 0x0a,
0x10, 0x43, 0x49, 0x52, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x5f, 0x50, 0x41, 0x59, 0x4d, 0x45, 0x4e,
0x54, 0x10, 0x0b, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x49, 0x52, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x5f,
0x46, 0x45, 0x45, 0x10, 0x0c, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x57, 0x45, 0x45, 0x50, 0x10, 0x0d,
0x12, 0x0d, 0x0a, 0x09, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x0e, 0x12,
0x15, 0x0a, 0x11, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45,
0x5f, 0x46, 0x45, 0x45, 0x10, 0x0f, 0x32, 0xd8, 0x04, 0x0a, 0x0d, 0x46, 0x61, 0x72, 0x61, 0x64,
0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x65, 0x0a, 0x16, 0x4f, 0x75, 0x74, 0x6c,
0x69, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x12, 0x25, 0x2e, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x6c,
0x69, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x66, 0x72, 0x64, 0x72,
0x70, 0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x69, 0x0a, 0x18, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x52, 0x65, 0x63, 0x6f,
0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x2e, 0x66, 0x72,
0x64, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x52, 0x65,
0x65, 0x22, 0xa7, 0x01, 0x0a, 0x14, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x76, 0x65,
0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68,
0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x63, 0x68, 0x61, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61,
0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73,
0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f,
0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54,
0x69, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74,
0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x45, 0x76, 0x65, 0x6e,
0x74, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20,
0x01, 0x28, 0x03, 0x52, 0x06, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x64, 0x22, 0x79, 0x0a, 0x15, 0x43,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e,
0x74, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20,
0x01, 0x28, 0x03, 0x52, 0x06, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x68,
0x61, 0x73, 0x5f, 0x6d, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68,
0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, 0x22, 0xc1, 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x61, 0x6e, 0x6e,
0x65, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73,
0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x37, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74,
0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x66, 0x72, 0x64, 0x72,
0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54,
0x79, 0x70, 0x65, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23,
0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18,
0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x42, 0x61, 0x6c, 0x61,
0x6e, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x62, 0x61,
0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x72, 0x65, 0x6d,
0x6f, 0x74, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x2a, 0xa1, 0x01, 0x0a, 0x0b, 0x47,
0x72, 0x61, 0x6e, 0x75, 0x6c, 0x61, 0x72, 0x69, 0x74, 0x79, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x4e,
0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x47, 0x52, 0x41, 0x4e, 0x55, 0x4c, 0x41, 0x52, 0x49, 0x54,
0x59, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x10, 0x01, 0x12,
0x10, 0x0a, 0x0c, 0x46, 0x49, 0x56, 0x45, 0x5f, 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x53, 0x10,
0x02, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x49, 0x46, 0x54, 0x45, 0x45, 0x4e, 0x5f, 0x4d, 0x49, 0x4e,
0x55, 0x54, 0x45, 0x53, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x48, 0x49, 0x52, 0x54, 0x59,
0x5f, 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x53, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f,
0x55, 0x52, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x49, 0x58, 0x5f, 0x48, 0x4f, 0x55, 0x52,
0x53, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x57, 0x45, 0x4c, 0x56, 0x45, 0x5f, 0x48, 0x4f,
0x55, 0x52, 0x53, 0x10, 0x07, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x41, 0x59, 0x10, 0x08, 0x2a, 0x6a,
0x0a, 0x0b, 0x46, 0x69, 0x61, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x12, 0x17, 0x0a,
0x13, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x46, 0x49, 0x41, 0x54, 0x42, 0x41, 0x43,
0x4b, 0x45, 0x4e, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x49, 0x4e, 0x43, 0x41,
0x50, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x4f, 0x49, 0x4e, 0x44, 0x45, 0x53, 0x4b, 0x10,
0x02, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x10, 0x03, 0x12, 0x0d, 0x0a,
0x09, 0x43, 0x4f, 0x49, 0x4e, 0x47, 0x45, 0x43, 0x4b, 0x4f, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08,
0x42, 0x49, 0x54, 0x46, 0x49, 0x4e, 0x45, 0x58, 0x10, 0x05, 0x2a, 0xa2, 0x02, 0x0a, 0x09, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e,
0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x43,
0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x17, 0x0a,
0x13, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f,
0x4f, 0x50, 0x45, 0x4e, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45,
0x4c, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d,
0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x10, 0x04, 0x12,
0x0b, 0x0a, 0x07, 0x52, 0x45, 0x43, 0x45, 0x49, 0x50, 0x54, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07,
0x50, 0x41, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x06, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x45, 0x45,
0x10, 0x07, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x49, 0x52, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x5f, 0x52,
0x45, 0x43, 0x45, 0x49, 0x50, 0x54, 0x10, 0x08, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x4f, 0x52, 0x57,
0x41, 0x52, 0x44, 0x10, 0x09, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44,
0x5f, 0x46, 0x45, 0x45, 0x10, 0x0a, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x49, 0x52, 0x43, 0x55, 0x4c,
0x41, 0x52, 0x5f, 0x50, 0x41, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x0b, 0x12, 0x10, 0x0a, 0x0c,
0x43, 0x49, 0x52, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x0c, 0x12, 0x09,
0x0a, 0x05, 0x53, 0x57, 0x45, 0x45, 0x50, 0x10, 0x0d, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x57, 0x45,
0x45, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x0e, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x48, 0x41, 0x4e,
0x4e, 0x45, 0x4c, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x0f, 0x2a,
0x70, 0x0a, 0x10, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54,
0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x48, 0x41, 0x4e, 0x5f, 0x45, 0x56, 0x45, 0x4e,
0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x43,
0x48, 0x41, 0x4e, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x49, 0x4e, 0x45,
0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x48, 0x41, 0x4e, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54,
0x5f, 0x4f, 0x46, 0x46, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x48,
0x41, 0x4e, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10,
0x03, 0x32, 0xa9, 0x05, 0x0a, 0x0d, 0x46, 0x61, 0x72, 0x61, 0x64, 0x61, 0x79, 0x53, 0x65, 0x72,
0x76, 0x65, 0x72, 0x12, 0x65, 0x0a, 0x16, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x52, 0x65,
0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x2e,
0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x52, 0x65,
0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c,
0x6f, 0x73, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0d, 0x52, 0x65,
0x76, 0x65, 0x6e, 0x75, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1c, 0x2e, 0x66, 0x72,
0x64, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x76, 0x65, 0x6e, 0x75, 0x65, 0x52, 0x65, 0x70, 0x6f,
0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x66, 0x72, 0x64, 0x72,
0x70, 0x63, 0x2e, 0x52, 0x65, 0x76, 0x65, 0x6e, 0x75, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e,
0x6e, 0x65, 0x6c, 0x49, 0x6e, 0x73, 0x69, 0x67, 0x68, 0x74, 0x73, 0x12, 0x1e, 0x2e, 0x66, 0x72,
0x64, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x6e, 0x73, 0x69,
0x67, 0x68, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x66, 0x72,
0x64, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x6e, 0x73, 0x69,
0x67, 0x68, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c,
0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x66,
0x72, 0x64, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61,
0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x66, 0x72, 0x64, 0x72,
0x70, 0x63, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x41,
0x75, 0x64, 0x69, 0x74, 0x12, 0x18, 0x2e, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x6f,
0x64, 0x65, 0x41, 0x75, 0x64, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19,
0x2e, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x75, 0x64, 0x69,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x6c, 0x6f,
0x73, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x2e, 0x66, 0x72, 0x64, 0x72, 0x70,
0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c,
0x6f, 0x73, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x66, 0x61,
0x72, 0x61, 0x64, 0x61, 0x79, 0x2f, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x18, 0x54, 0x68,
0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x2e, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x2e,
0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65,
0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x24, 0x2e, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65,
0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0d, 0x52, 0x65, 0x76, 0x65, 0x6e, 0x75, 0x65,
0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1c, 0x2e, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x2e,
0x52, 0x65, 0x76, 0x65, 0x6e, 0x75, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,
0x76, 0x65, 0x6e, 0x75, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x6e,
0x73, 0x69, 0x67, 0x68, 0x74, 0x73, 0x12, 0x1e, 0x2e, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x2e,
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x6e, 0x73, 0x69, 0x67, 0x68, 0x74, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x2e,
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x6e, 0x73, 0x69, 0x67, 0x68, 0x74, 0x73, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x45, 0x78, 0x63, 0x68, 0x61,
0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63,
0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78,
0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x75, 0x64, 0x69, 0x74, 0x12,
0x18, 0x2e, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x75, 0x64,
0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x66, 0x72, 0x64, 0x72,
0x70, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x75, 0x64, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x70,
0x6f, 0x72, 0x74, 0x12, 0x1a, 0x2e, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x6f,
0x73, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x1b, 0x2e, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65,
0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x10,
0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73,
0x12, 0x1c, 0x2e, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65,
0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d,
0x2e, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x45,
0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x29, 0x5a,
0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68,
0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x66, 0x61, 0x72, 0x61, 0x64, 0x61,
0x79, 0x2f, 0x66, 0x72, 0x64, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -2235,77 +2575,85 @@ func file_faraday_proto_rawDescGZIP() []byte {
return file_faraday_proto_rawDescData
}
var file_faraday_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
var file_faraday_proto_msgTypes = make([]protoimpl.MessageInfo, 23)
var file_faraday_proto_enumTypes = make([]protoimpl.EnumInfo, 5)
var file_faraday_proto_msgTypes = make([]protoimpl.MessageInfo, 26)
var file_faraday_proto_goTypes = []any{
(Granularity)(0), // 0: frdrpc.Granularity
(FiatBackend)(0), // 1: frdrpc.FiatBackend
(EntryType)(0), // 2: frdrpc.EntryType
(CloseRecommendationRequest_Metric)(0), // 3: frdrpc.CloseRecommendationRequest.Metric
(*CloseRecommendationRequest)(nil), // 4: frdrpc.CloseRecommendationRequest
(*OutlierRecommendationsRequest)(nil), // 5: frdrpc.OutlierRecommendationsRequest
(*ThresholdRecommendationsRequest)(nil), // 6: frdrpc.ThresholdRecommendationsRequest
(*CloseRecommendationsResponse)(nil), // 7: frdrpc.CloseRecommendationsResponse
(*Recommendation)(nil), // 8: frdrpc.Recommendation
(*RevenueReportRequest)(nil), // 9: frdrpc.RevenueReportRequest
(*RevenueReportResponse)(nil), // 10: frdrpc.RevenueReportResponse
(*RevenueReport)(nil), // 11: frdrpc.RevenueReport
(*PairReport)(nil), // 12: frdrpc.PairReport
(*ChannelInsightsRequest)(nil), // 13: frdrpc.ChannelInsightsRequest
(*ChannelInsightsResponse)(nil), // 14: frdrpc.ChannelInsightsResponse
(*ChannelInsight)(nil), // 15: frdrpc.ChannelInsight
(*ExchangeRateRequest)(nil), // 16: frdrpc.ExchangeRateRequest
(*ExchangeRateResponse)(nil), // 17: frdrpc.ExchangeRateResponse
(*BitcoinPrice)(nil), // 18: frdrpc.BitcoinPrice
(*ExchangeRate)(nil), // 19: frdrpc.ExchangeRate
(*NodeAuditRequest)(nil), // 20: frdrpc.NodeAuditRequest
(*CustomCategory)(nil), // 21: frdrpc.CustomCategory
(*ReportEntry)(nil), // 22: frdrpc.ReportEntry
(*NodeAuditResponse)(nil), // 23: frdrpc.NodeAuditResponse
(*CloseReportRequest)(nil), // 24: frdrpc.CloseReportRequest
(*CloseReportResponse)(nil), // 25: frdrpc.CloseReportResponse
nil, // 26: frdrpc.RevenueReport.PairReportsEntry
(ChannelEventType)(0), // 3: frdrpc.ChannelEventType
(CloseRecommendationRequest_Metric)(0), // 4: frdrpc.CloseRecommendationRequest.Metric
(*CloseRecommendationRequest)(nil), // 5: frdrpc.CloseRecommendationRequest
(*OutlierRecommendationsRequest)(nil), // 6: frdrpc.OutlierRecommendationsRequest
(*ThresholdRecommendationsRequest)(nil), // 7: frdrpc.ThresholdRecommendationsRequest
(*CloseRecommendationsResponse)(nil), // 8: frdrpc.CloseRecommendationsResponse
(*Recommendation)(nil), // 9: frdrpc.Recommendation
(*RevenueReportRequest)(nil), // 10: frdrpc.RevenueReportRequest
(*RevenueReportResponse)(nil), // 11: frdrpc.RevenueReportResponse
(*RevenueReport)(nil), // 12: frdrpc.RevenueReport
(*PairReport)(nil), // 13: frdrpc.PairReport
(*ChannelInsightsRequest)(nil), // 14: frdrpc.ChannelInsightsRequest
(*ChannelInsightsResponse)(nil), // 15: frdrpc.ChannelInsightsResponse
(*ChannelInsight)(nil), // 16: frdrpc.ChannelInsight
(*ExchangeRateRequest)(nil), // 17: frdrpc.ExchangeRateRequest
(*ExchangeRateResponse)(nil), // 18: frdrpc.ExchangeRateResponse
(*BitcoinPrice)(nil), // 19: frdrpc.BitcoinPrice
(*ExchangeRate)(nil), // 20: frdrpc.ExchangeRate
(*NodeAuditRequest)(nil), // 21: frdrpc.NodeAuditRequest
(*CustomCategory)(nil), // 22: frdrpc.CustomCategory
(*ReportEntry)(nil), // 23: frdrpc.ReportEntry
(*NodeAuditResponse)(nil), // 24: frdrpc.NodeAuditResponse
(*CloseReportRequest)(nil), // 25: frdrpc.CloseReportRequest
(*CloseReportResponse)(nil), // 26: frdrpc.CloseReportResponse
(*ChannelEventsRequest)(nil), // 27: frdrpc.ChannelEventsRequest
(*ChannelEventsResponse)(nil), // 28: frdrpc.ChannelEventsResponse
(*ChannelEvent)(nil), // 29: frdrpc.ChannelEvent
nil, // 30: frdrpc.RevenueReport.PairReportsEntry
}
var file_faraday_proto_depIdxs = []int32{
3, // 0: frdrpc.CloseRecommendationRequest.metric:type_name -> frdrpc.CloseRecommendationRequest.Metric
4, // 1: frdrpc.OutlierRecommendationsRequest.rec_request:type_name -> frdrpc.CloseRecommendationRequest
4, // 2: frdrpc.ThresholdRecommendationsRequest.rec_request:type_name -> frdrpc.CloseRecommendationRequest
8, // 3: frdrpc.CloseRecommendationsResponse.recommendations:type_name -> frdrpc.Recommendation
11, // 4: frdrpc.RevenueReportResponse.reports:type_name -> frdrpc.RevenueReport
26, // 5: frdrpc.RevenueReport.pair_reports:type_name -> frdrpc.RevenueReport.PairReportsEntry
15, // 6: frdrpc.ChannelInsightsResponse.channel_insights:type_name -> frdrpc.ChannelInsight
4, // 0: frdrpc.CloseRecommendationRequest.metric:type_name -> frdrpc.CloseRecommendationRequest.Metric
5, // 1: frdrpc.OutlierRecommendationsRequest.rec_request:type_name -> frdrpc.CloseRecommendationRequest
5, // 2: frdrpc.ThresholdRecommendationsRequest.rec_request:type_name -> frdrpc.CloseRecommendationRequest
9, // 3: frdrpc.CloseRecommendationsResponse.recommendations:type_name -> frdrpc.Recommendation
12, // 4: frdrpc.RevenueReportResponse.reports:type_name -> frdrpc.RevenueReport
30, // 5: frdrpc.RevenueReport.pair_reports:type_name -> frdrpc.RevenueReport.PairReportsEntry
16, // 6: frdrpc.ChannelInsightsResponse.channel_insights:type_name -> frdrpc.ChannelInsight
0, // 7: frdrpc.ExchangeRateRequest.granularity:type_name -> frdrpc.Granularity
1, // 8: frdrpc.ExchangeRateRequest.fiat_backend:type_name -> frdrpc.FiatBackend
18, // 9: frdrpc.ExchangeRateRequest.custom_prices:type_name -> frdrpc.BitcoinPrice
19, // 10: frdrpc.ExchangeRateResponse.rates:type_name -> frdrpc.ExchangeRate
18, // 11: frdrpc.ExchangeRate.btc_price:type_name -> frdrpc.BitcoinPrice
19, // 9: frdrpc.ExchangeRateRequest.custom_prices:type_name -> frdrpc.BitcoinPrice
20, // 10: frdrpc.ExchangeRateResponse.rates:type_name -> frdrpc.ExchangeRate
19, // 11: frdrpc.ExchangeRate.btc_price:type_name -> frdrpc.BitcoinPrice
0, // 12: frdrpc.NodeAuditRequest.granularity:type_name -> frdrpc.Granularity
21, // 13: frdrpc.NodeAuditRequest.custom_categories:type_name -> frdrpc.CustomCategory
22, // 13: frdrpc.NodeAuditRequest.custom_categories:type_name -> frdrpc.CustomCategory
1, // 14: frdrpc.NodeAuditRequest.fiat_backend:type_name -> frdrpc.FiatBackend
18, // 15: frdrpc.NodeAuditRequest.custom_prices:type_name -> frdrpc.BitcoinPrice
19, // 15: frdrpc.NodeAuditRequest.custom_prices:type_name -> frdrpc.BitcoinPrice
2, // 16: frdrpc.ReportEntry.type:type_name -> frdrpc.EntryType
18, // 17: frdrpc.ReportEntry.btc_price:type_name -> frdrpc.BitcoinPrice
22, // 18: frdrpc.NodeAuditResponse.reports:type_name -> frdrpc.ReportEntry
12, // 19: frdrpc.RevenueReport.PairReportsEntry.value:type_name -> frdrpc.PairReport
5, // 20: frdrpc.FaradayServer.OutlierRecommendations:input_type -> frdrpc.OutlierRecommendationsRequest
6, // 21: frdrpc.FaradayServer.ThresholdRecommendations:input_type -> frdrpc.ThresholdRecommendationsRequest
9, // 22: frdrpc.FaradayServer.RevenueReport:input_type -> frdrpc.RevenueReportRequest
13, // 23: frdrpc.FaradayServer.ChannelInsights:input_type -> frdrpc.ChannelInsightsRequest
16, // 24: frdrpc.FaradayServer.ExchangeRate:input_type -> frdrpc.ExchangeRateRequest
20, // 25: frdrpc.FaradayServer.NodeAudit:input_type -> frdrpc.NodeAuditRequest
24, // 26: frdrpc.FaradayServer.CloseReport:input_type -> frdrpc.CloseReportRequest
7, // 27: frdrpc.FaradayServer.OutlierRecommendations:output_type -> frdrpc.CloseRecommendationsResponse
7, // 28: frdrpc.FaradayServer.ThresholdRecommendations:output_type -> frdrpc.CloseRecommendationsResponse
10, // 29: frdrpc.FaradayServer.RevenueReport:output_type -> frdrpc.RevenueReportResponse
14, // 30: frdrpc.FaradayServer.ChannelInsights:output_type -> frdrpc.ChannelInsightsResponse
17, // 31: frdrpc.FaradayServer.ExchangeRate:output_type -> frdrpc.ExchangeRateResponse
23, // 32: frdrpc.FaradayServer.NodeAudit:output_type -> frdrpc.NodeAuditResponse
25, // 33: frdrpc.FaradayServer.CloseReport:output_type -> frdrpc.CloseReportResponse
27, // [27:34] is the sub-list for method output_type
20, // [20:27] is the sub-list for method input_type
20, // [20:20] is the sub-list for extension type_name
20, // [20:20] is the sub-list for extension extendee
0, // [0:20] is the sub-list for field type_name
19, // 17: frdrpc.ReportEntry.btc_price:type_name -> frdrpc.BitcoinPrice
23, // 18: frdrpc.NodeAuditResponse.reports:type_name -> frdrpc.ReportEntry
29, // 19: frdrpc.ChannelEventsResponse.events:type_name -> frdrpc.ChannelEvent
3, // 20: frdrpc.ChannelEvent.event_type:type_name -> frdrpc.ChannelEventType
13, // 21: frdrpc.RevenueReport.PairReportsEntry.value:type_name -> frdrpc.PairReport
6, // 22: frdrpc.FaradayServer.OutlierRecommendations:input_type -> frdrpc.OutlierRecommendationsRequest
7, // 23: frdrpc.FaradayServer.ThresholdRecommendations:input_type -> frdrpc.ThresholdRecommendationsRequest
10, // 24: frdrpc.FaradayServer.RevenueReport:input_type -> frdrpc.RevenueReportRequest
14, // 25: frdrpc.FaradayServer.ChannelInsights:input_type -> frdrpc.ChannelInsightsRequest
17, // 26: frdrpc.FaradayServer.ExchangeRate:input_type -> frdrpc.ExchangeRateRequest
21, // 27: frdrpc.FaradayServer.NodeAudit:input_type -> frdrpc.NodeAuditRequest
25, // 28: frdrpc.FaradayServer.CloseReport:input_type -> frdrpc.CloseReportRequest
27, // 29: frdrpc.FaradayServer.GetChannelEvents:input_type -> frdrpc.ChannelEventsRequest
8, // 30: frdrpc.FaradayServer.OutlierRecommendations:output_type -> frdrpc.CloseRecommendationsResponse
8, // 31: frdrpc.FaradayServer.ThresholdRecommendations:output_type -> frdrpc.CloseRecommendationsResponse
11, // 32: frdrpc.FaradayServer.RevenueReport:output_type -> frdrpc.RevenueReportResponse
15, // 33: frdrpc.FaradayServer.ChannelInsights:output_type -> frdrpc.ChannelInsightsResponse
18, // 34: frdrpc.FaradayServer.ExchangeRate:output_type -> frdrpc.ExchangeRateResponse
24, // 35: frdrpc.FaradayServer.NodeAudit:output_type -> frdrpc.NodeAuditResponse
26, // 36: frdrpc.FaradayServer.CloseReport:output_type -> frdrpc.CloseReportResponse
28, // 37: frdrpc.FaradayServer.GetChannelEvents:output_type -> frdrpc.ChannelEventsResponse
30, // [30:38] is the sub-list for method output_type
22, // [22:30] is the sub-list for method input_type
22, // [22:22] is the sub-list for extension type_name
22, // [22:22] is the sub-list for extension extendee
0, // [0:22] is the sub-list for field type_name
}
func init() { file_faraday_proto_init() }
@ -2578,14 +2926,50 @@ func file_faraday_proto_init() {
return nil
}
}
file_faraday_proto_msgTypes[22].Exporter = func(v any, i int) any {
switch v := v.(*ChannelEventsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_faraday_proto_msgTypes[23].Exporter = func(v any, i int) any {
switch v := v.(*ChannelEventsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_faraday_proto_msgTypes[24].Exporter = func(v any, i int) any {
switch v := v.(*ChannelEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_faraday_proto_rawDesc,
NumEnums: 4,
NumMessages: 23,
NumEnums: 5,
NumMessages: 26,
NumExtensions: 0,
NumServices: 1,
},

View file

@ -595,6 +595,32 @@ func local_request_FaradayServer_CloseReport_0(ctx context.Context, marshaler ru
}
func request_FaradayServer_GetChannelEvents_0(ctx context.Context, marshaler runtime.Marshaler, client FaradayServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ChannelEventsRequest
var metadata runtime.ServerMetadata
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.GetChannelEvents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_FaradayServer_GetChannelEvents_0(ctx context.Context, marshaler runtime.Marshaler, server FaradayServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ChannelEventsRequest
var metadata runtime.ServerMetadata
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.GetChannelEvents(ctx, &protoReq)
return msg, metadata, err
}
// 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.
@ -902,6 +928,31 @@ func RegisterFaradayServerHandlerServer(ctx context.Context, mux *runtime.ServeM
})
mux.Handle("POST", pattern_FaradayServer_GetChannelEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/frdrpc.FaradayServer/GetChannelEvents", runtime.WithHTTPPathPattern("/v1/faraday/getchannelevents"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_FaradayServer_GetChannelEvents_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_FaradayServer_GetChannelEvents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@ -1207,6 +1258,28 @@ func RegisterFaradayServerHandlerClient(ctx context.Context, mux *runtime.ServeM
})
mux.Handle("POST", pattern_FaradayServer_GetChannelEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/frdrpc.FaradayServer/GetChannelEvents", runtime.WithHTTPPathPattern("/v1/faraday/getchannelevents"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_FaradayServer_GetChannelEvents_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_FaradayServer_GetChannelEvents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@ -1234,6 +1307,8 @@ var (
pattern_FaradayServer_NodeAudit_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "faraday", "nodeaudit"}, ""))
pattern_FaradayServer_CloseReport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "faraday", "closereport"}, ""))
pattern_FaradayServer_GetChannelEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "faraday", "getchannelevents"}, ""))
)
var (
@ -1260,4 +1335,6 @@ var (
forward_FaradayServer_NodeAudit_1 = runtime.ForwardResponseMessage
forward_FaradayServer_CloseReport_0 = runtime.ForwardResponseMessage
forward_FaradayServer_GetChannelEvents_0 = runtime.ForwardResponseMessage
)

View file

@ -65,6 +65,11 @@ service FaradayServer {
http://localhost:8466/v1/faraday/closereport
*/
rpc CloseReport (CloseReportRequest) returns (CloseReportResponse);
/**
Get a list of channel events that occurred for a given channel.
*/
rpc GetChannelEvents (ChannelEventsRequest) returns (ChannelEventsResponse);
}
message CloseRecommendationRequest {
@ -596,3 +601,77 @@ message CloseReportResponse {
*/
string close_fee = 6;
}
message ChannelEventsRequest {
/*
The channel point of the channel to get events for, formatted txid:outpoint.
*/
string chan_point = 1;
/*
Lower time bound, inclusive, as Unix seconds. Independent filter does
not need to advance between paginated calls. Zero means no lower bound.
*/
int64 start_time = 2;
/*
Upper time bound, exclusive, as Unix seconds. Must be greater than or
equal to start_time. Zero means "use the server's current time".
*/
int64 end_time = 3;
/*
The maximum number of events to return. If zero, the server default is
used. The server enforces a hard cap; values above the cap are clamped.
*/
uint32 max_events = 4;
/*
Pagination cursor: id of the last event from the previous response.
Pass zero on the first call; for subsequent calls pass the response's
last_id to resume past already-returned events.
*/
int64 last_id = 5;
}
enum ChannelEventType {
// An unknown event type.
CHAN_EVENT_UNKNOWN = 0;
// An online event.
CHAN_EVENT_ONLINE = 1;
// An offline event.
CHAN_EVENT_OFFLINE = 2;
// A channel balance update event.
CHAN_EVENT_UPDATE = 3;
}
message ChannelEventsResponse {
// The list of channel events.
repeated ChannelEvent events = 1;
// Id of the last event returned, suitable as the next request's last_id.
// Zero when events is empty.
int64 last_id = 2;
// True when the page filled to the requested limit and more events may be
// available; callers should keep paginating until this is false.
bool has_more = 3;
}
message ChannelEvent {
// The timestamp of the event, as Unix seconds.
int64 timestamp = 1;
// The type of the event.
ChannelEventType event_type = 2;
// The channel's local balance at the time of the event in sat.
uint64 local_balance = 3;
// The channel's remote balance at the time of the event in sat.
uint64 remote_balance = 4;
// Server-assigned monotonic identity. Echo this back as the next
// request's last_id when paginating.
int64 id = 5;
}

View file

@ -154,6 +154,39 @@
]
}
},
"/v1/faraday/getchannelevents": {
"post": {
"summary": "*\nGet a list of channel events that occurred for a given channel.",
"operationId": "FaradayServer_GetChannelEvents",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/frdrpcChannelEventsResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/frdrpcChannelEventsRequest"
}
}
],
"tags": [
"FaradayServer"
]
}
},
"/v1/faraday/insights": {
"get": {
"summary": "* frcli: `insights`\nList currently open channel with routing and uptime information.",
@ -663,6 +696,97 @@
}
}
},
"frdrpcChannelEvent": {
"type": "object",
"properties": {
"timestamp": {
"type": "string",
"format": "int64",
"description": "The timestamp of the event, as Unix seconds."
},
"event_type": {
"$ref": "#/definitions/frdrpcChannelEventType",
"description": "The type of the event."
},
"local_balance": {
"type": "string",
"format": "uint64",
"description": "The channel's local balance at the time of the event in sat."
},
"remote_balance": {
"type": "string",
"format": "uint64",
"description": "The channel's remote balance at the time of the event in sat."
},
"id": {
"type": "string",
"format": "int64",
"description": "Server-assigned monotonic identity. Echo this back as the next\nrequest's last_id when paginating."
}
}
},
"frdrpcChannelEventType": {
"type": "string",
"enum": [
"CHAN_EVENT_UNKNOWN",
"CHAN_EVENT_ONLINE",
"CHAN_EVENT_OFFLINE",
"CHAN_EVENT_UPDATE"
],
"default": "CHAN_EVENT_UNKNOWN",
"description": " - CHAN_EVENT_UNKNOWN: An unknown event type.\n - CHAN_EVENT_ONLINE: An online event.\n - CHAN_EVENT_OFFLINE: An offline event.\n - CHAN_EVENT_UPDATE: A channel balance update event."
},
"frdrpcChannelEventsRequest": {
"type": "object",
"properties": {
"chan_point": {
"type": "string",
"description": "The channel point of the channel to get events for, formatted txid:outpoint."
},
"start_time": {
"type": "string",
"format": "int64",
"description": "Lower time bound, inclusive, as Unix seconds. Independent filter — does\nnot need to advance between paginated calls. Zero means no lower bound."
},
"end_time": {
"type": "string",
"format": "int64",
"description": "Upper time bound, exclusive, as Unix seconds. Must be greater than or\nequal to start_time. Zero means \"use the server's current time\"."
},
"max_events": {
"type": "integer",
"format": "int64",
"description": "The maximum number of events to return. If zero, the server default is\nused. The server enforces a hard cap; values above the cap are clamped."
},
"last_id": {
"type": "string",
"format": "int64",
"description": "Pagination cursor: id of the last event from the previous response.\nPass zero on the first call; for subsequent calls pass the response's\nlast_id to resume past already-returned events."
}
}
},
"frdrpcChannelEventsResponse": {
"type": "object",
"properties": {
"events": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/frdrpcChannelEvent"
},
"description": "The list of channel events."
},
"last_id": {
"type": "string",
"format": "int64",
"description": "Id of the last event returned, suitable as the next request's last_id.\nZero when events is empty."
},
"has_more": {
"type": "boolean",
"description": "True when the page filled to the requested limit and more events may be\navailable; callers should keep paginating until this is false."
}
}
},
"frdrpcChannelInsight": {
"type": "object",
"properties": {

View file

@ -33,3 +33,6 @@ http:
body: "*"
- selector: frdrpc.FaradayServer.CloseReport
get: "/v1/faraday/closereport"
- selector: frdrpc.FaradayServer.GetChannelEvents
post: "/v1/faraday/getchannelevents"
body: "*"

View file

@ -62,6 +62,9 @@ type FaradayServerClient interface {
// Example request:
// http://localhost:8466/v1/faraday/closereport
CloseReport(ctx context.Context, in *CloseReportRequest, opts ...grpc.CallOption) (*CloseReportResponse, error)
// *
// Get a list of channel events that occurred for a given channel.
GetChannelEvents(ctx context.Context, in *ChannelEventsRequest, opts ...grpc.CallOption) (*ChannelEventsResponse, error)
}
type faradayServerClient struct {
@ -135,6 +138,15 @@ func (c *faradayServerClient) CloseReport(ctx context.Context, in *CloseReportRe
return out, nil
}
func (c *faradayServerClient) GetChannelEvents(ctx context.Context, in *ChannelEventsRequest, opts ...grpc.CallOption) (*ChannelEventsResponse, error) {
out := new(ChannelEventsResponse)
err := c.cc.Invoke(ctx, "/frdrpc.FaradayServer/GetChannelEvents", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FaradayServerServer is the server API for FaradayServer service.
// All implementations must embed UnimplementedFaradayServerServer
// for forward compatibility
@ -183,6 +195,9 @@ type FaradayServerServer interface {
// Example request:
// http://localhost:8466/v1/faraday/closereport
CloseReport(context.Context, *CloseReportRequest) (*CloseReportResponse, error)
// *
// Get a list of channel events that occurred for a given channel.
GetChannelEvents(context.Context, *ChannelEventsRequest) (*ChannelEventsResponse, error)
mustEmbedUnimplementedFaradayServerServer()
}
@ -211,6 +226,9 @@ func (UnimplementedFaradayServerServer) NodeAudit(context.Context, *NodeAuditReq
func (UnimplementedFaradayServerServer) CloseReport(context.Context, *CloseReportRequest) (*CloseReportResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CloseReport not implemented")
}
func (UnimplementedFaradayServerServer) GetChannelEvents(context.Context, *ChannelEventsRequest) (*ChannelEventsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetChannelEvents not implemented")
}
func (UnimplementedFaradayServerServer) mustEmbedUnimplementedFaradayServerServer() {}
// UnsafeFaradayServerServer may be embedded to opt out of forward compatibility for this service.
@ -350,6 +368,24 @@ func _FaradayServer_CloseReport_Handler(srv interface{}, ctx context.Context, de
return interceptor(ctx, in, info, handler)
}
func _FaradayServer_GetChannelEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ChannelEventsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FaradayServerServer).GetChannelEvents(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/frdrpc.FaradayServer/GetChannelEvents",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FaradayServerServer).GetChannelEvents(ctx, req.(*ChannelEventsRequest))
}
return interceptor(ctx, in, info, handler)
}
// FaradayServer_ServiceDesc is the grpc.ServiceDesc for FaradayServer service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@ -385,6 +421,10 @@ var FaradayServer_ServiceDesc = grpc.ServiceDesc{
MethodName: "CloseReport",
Handler: _FaradayServer_CloseReport_Handler,
},
{
MethodName: "GetChannelEvents",
Handler: _FaradayServer_GetChannelEvents_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "faraday.proto",

View file

@ -195,4 +195,29 @@ func RegisterFaradayServerJSONCallbacks(registry map[string]func(ctx context.Con
}
callback(string(respBytes), nil)
}
registry["frdrpc.FaradayServer.GetChannelEvents"] = func(ctx context.Context,
conn *grpc.ClientConn, reqJSON string, callback func(string, error)) {
req := &ChannelEventsRequest{}
err := marshaler.Unmarshal([]byte(reqJSON), req)
if err != nil {
callback("", err)
return
}
client := NewFaradayServerClient(conn)
resp, err := client.GetChannelEvents(ctx, req)
if err != nil {
callback("", err)
return
}
respBytes, err := marshaler.Marshal(resp)
if err != nil {
callback("", err)
return
}
callback(string(respBytes), nil)
}
}

3
go.mod
View file

@ -191,4 +191,7 @@ replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-d
// We are using a fork of the migration library.
replace github.com/golang-migrate/migrate/v4 => github.com/lightninglabs/migrate/v4 v4.18.2-9023d66a-fork-pr-2.0.20251211093704-71c1eef09789
// We need to replace frdrpc locally until we have this PR merged.
replace github.com/lightninglabs/faraday/frdrpc => ./frdrpc
go 1.25.5

2
go.sum
View file

@ -340,8 +340,6 @@ github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/lightninglabs/faraday/frdrpc v1.0.1 h1:3YlP9UwT0bmT468oAdn4dxwsaJBI4QDBDSsAzq+LnGA=
github.com/lightninglabs/faraday/frdrpc v1.0.1/go.mod h1:ot1R/RGzk61d3qCrZPL36jI5ziGmKbvvE7UQKsJKuvk=
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf h1:HZKvJUHlcXI/f/O0Avg7t8sqkPo78HFzjmeYFl6DPnc=
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf/go.mod h1:vxmQPeIQxPf6Jf9rM8R+B4rKBqLA2AjttNxkFBL2Plk=
github.com/lightninglabs/lndclient v1.0.1-0.20260224134629-de7b65bb4c60 h1:ycLVFR0tUZ8oWg/qI5ShWhzEk8lvCjHVCjx0x6E/yUc=