From 452d44085a1b18ecca63e8bba9d332322fcec175 Mon Sep 17 00:00:00 2001 From: bndw Date: Fri, 13 Feb 2026 17:35:32 -0800 Subject: chore: add generated gRPC code (protoc-gen-go v1.36.11) --- api/nostr/v1/nostr.pb.go | 1416 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1416 insertions(+) create mode 100644 api/nostr/v1/nostr.pb.go (limited to 'api/nostr/v1/nostr.pb.go') diff --git a/api/nostr/v1/nostr.pb.go b/api/nostr/v1/nostr.pb.go new file mode 100644 index 0000000..04aa0fe --- /dev/null +++ b/api/nostr/v1/nostr.pb.go @@ -0,0 +1,1416 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: nostr/v1/nostr.proto + +package nostrv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Core Nostr event as defined in NIP-01 +type Event struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Pubkey string `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + CreatedAt int64 `protobuf:"varint,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + Kind int32 `protobuf:"varint,4,opt,name=kind,proto3" json:"kind,omitempty"` + Tags []*Tag `protobuf:"bytes,5,rep,name=tags,proto3" json:"tags,omitempty"` + Content string `protobuf:"bytes,6,opt,name=content,proto3" json:"content,omitempty"` + Sig string `protobuf:"bytes,7,opt,name=sig,proto3" json:"sig,omitempty"` + // Optional: only populated if client requests verification + // Contains exact canonical JSON bytes that were signed + CanonicalJson []byte `protobuf:"bytes,8,opt,name=canonical_json,json=canonicalJson,proto3,oneof" json:"canonical_json,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Event) Reset() { + *x = Event{} + mi := &file_nostr_v1_nostr_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Event) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Event) ProtoMessage() {} + +func (x *Event) ProtoReflect() protoreflect.Message { + mi := &file_nostr_v1_nostr_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Event.ProtoReflect.Descriptor instead. +func (*Event) Descriptor() ([]byte, []int) { + return file_nostr_v1_nostr_proto_rawDescGZIP(), []int{0} +} + +func (x *Event) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Event) GetPubkey() string { + if x != nil { + return x.Pubkey + } + return "" +} + +func (x *Event) GetCreatedAt() int64 { + if x != nil { + return x.CreatedAt + } + return 0 +} + +func (x *Event) GetKind() int32 { + if x != nil { + return x.Kind + } + return 0 +} + +func (x *Event) GetTags() []*Tag { + if x != nil { + return x.Tags + } + return nil +} + +func (x *Event) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *Event) GetSig() string { + if x != nil { + return x.Sig + } + return "" +} + +func (x *Event) GetCanonicalJson() []byte { + if x != nil { + return x.CanonicalJson + } + return nil +} + +// Tag is an array of strings (e.g., ["e", "event_id", "relay_url"]) +type Tag struct { + state protoimpl.MessageState `protogen:"open.v1"` + Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Tag) Reset() { + *x = Tag{} + mi := &file_nostr_v1_nostr_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Tag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tag) ProtoMessage() {} + +func (x *Tag) ProtoReflect() protoreflect.Message { + mi := &file_nostr_v1_nostr_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Tag.ProtoReflect.Descriptor instead. +func (*Tag) Descriptor() ([]byte, []int) { + return file_nostr_v1_nostr_proto_rawDescGZIP(), []int{1} +} + +func (x *Tag) GetValues() []string { + if x != nil { + return x.Values + } + return nil +} + +// Nostr filter for querying events (REQ) +type Filter struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` + Authors []string `protobuf:"bytes,2,rep,name=authors,proto3" json:"authors,omitempty"` // pubkeys + Kinds []int32 `protobuf:"varint,3,rep,packed,name=kinds,proto3" json:"kinds,omitempty"` + ETags []string `protobuf:"bytes,4,rep,name=e_tags,json=eTags,proto3" json:"e_tags,omitempty"` // #e tag values + PTags []string `protobuf:"bytes,5,rep,name=p_tags,json=pTags,proto3" json:"p_tags,omitempty"` // #p tag values + Since *int64 `protobuf:"varint,6,opt,name=since,proto3,oneof" json:"since,omitempty"` + Until *int64 `protobuf:"varint,7,opt,name=until,proto3,oneof" json:"until,omitempty"` + Limit *int32 `protobuf:"varint,8,opt,name=limit,proto3,oneof" json:"limit,omitempty"` + // Extension: support for arbitrary tag filters + TagFilters map[string]*TagFilter `protobuf:"bytes,9,rep,name=tag_filters,json=tagFilters,proto3" json:"tag_filters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Filter) Reset() { + *x = Filter{} + mi := &file_nostr_v1_nostr_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Filter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Filter) ProtoMessage() {} + +func (x *Filter) ProtoReflect() protoreflect.Message { + mi := &file_nostr_v1_nostr_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Filter.ProtoReflect.Descriptor instead. +func (*Filter) Descriptor() ([]byte, []int) { + return file_nostr_v1_nostr_proto_rawDescGZIP(), []int{2} +} + +func (x *Filter) GetIds() []string { + if x != nil { + return x.Ids + } + return nil +} + +func (x *Filter) GetAuthors() []string { + if x != nil { + return x.Authors + } + return nil +} + +func (x *Filter) GetKinds() []int32 { + if x != nil { + return x.Kinds + } + return nil +} + +func (x *Filter) GetETags() []string { + if x != nil { + return x.ETags + } + return nil +} + +func (x *Filter) GetPTags() []string { + if x != nil { + return x.PTags + } + return nil +} + +func (x *Filter) GetSince() int64 { + if x != nil && x.Since != nil { + return *x.Since + } + return 0 +} + +func (x *Filter) GetUntil() int64 { + if x != nil && x.Until != nil { + return *x.Until + } + return 0 +} + +func (x *Filter) GetLimit() int32 { + if x != nil && x.Limit != nil { + return *x.Limit + } + return 0 +} + +func (x *Filter) GetTagFilters() map[string]*TagFilter { + if x != nil { + return x.TagFilters + } + return nil +} + +// Filter for arbitrary tags +type TagFilter struct { + state protoimpl.MessageState `protogen:"open.v1"` + Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TagFilter) Reset() { + *x = TagFilter{} + mi := &file_nostr_v1_nostr_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TagFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TagFilter) ProtoMessage() {} + +func (x *TagFilter) ProtoReflect() protoreflect.Message { + mi := &file_nostr_v1_nostr_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TagFilter.ProtoReflect.Descriptor instead. +func (*TagFilter) Descriptor() ([]byte, []int) { + return file_nostr_v1_nostr_proto_rawDescGZIP(), []int{3} +} + +func (x *TagFilter) GetValues() []string { + if x != nil { + return x.Values + } + return nil +} + +// Request to publish a single event +type PublishEventRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublishEventRequest) Reset() { + *x = PublishEventRequest{} + mi := &file_nostr_v1_nostr_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublishEventRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublishEventRequest) ProtoMessage() {} + +func (x *PublishEventRequest) ProtoReflect() protoreflect.Message { + mi := &file_nostr_v1_nostr_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublishEventRequest.ProtoReflect.Descriptor instead. +func (*PublishEventRequest) Descriptor() ([]byte, []int) { + return file_nostr_v1_nostr_proto_rawDescGZIP(), []int{4} +} + +func (x *PublishEventRequest) GetEvent() *Event { + if x != nil { + return x.Event + } + return nil +} + +// Response after publishing an event +type PublishEventResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Accepted bool `protobuf:"varint,1,opt,name=accepted,proto3" json:"accepted,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // Error message or "duplicate" or "success" + // Always include canonical JSON so client can verify + // what the relay stored + CanonicalJson []byte `protobuf:"bytes,3,opt,name=canonical_json,json=canonicalJson,proto3" json:"canonical_json,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublishEventResponse) Reset() { + *x = PublishEventResponse{} + mi := &file_nostr_v1_nostr_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublishEventResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublishEventResponse) ProtoMessage() {} + +func (x *PublishEventResponse) ProtoReflect() protoreflect.Message { + mi := &file_nostr_v1_nostr_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublishEventResponse.ProtoReflect.Descriptor instead. +func (*PublishEventResponse) Descriptor() ([]byte, []int) { + return file_nostr_v1_nostr_proto_rawDescGZIP(), []int{5} +} + +func (x *PublishEventResponse) GetAccepted() bool { + if x != nil { + return x.Accepted + } + return false +} + +func (x *PublishEventResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *PublishEventResponse) GetCanonicalJson() []byte { + if x != nil { + return x.CanonicalJson + } + return nil +} + +// Request to subscribe to events matching filters +type SubscribeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Filters []*Filter `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"` + // If true, include canonical_json in streamed Event messages + // Allows client-side signature verification + // Default: false (most clients trust the relay) + IncludeCanonicalJson bool `protobuf:"varint,2,opt,name=include_canonical_json,json=includeCanonicalJson,proto3" json:"include_canonical_json,omitempty"` + // Optional client-provided subscription ID for tracking + SubscriptionId string `protobuf:"bytes,3,opt,name=subscription_id,json=subscriptionId,proto3" json:"subscription_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SubscribeRequest) Reset() { + *x = SubscribeRequest{} + mi := &file_nostr_v1_nostr_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SubscribeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubscribeRequest) ProtoMessage() {} + +func (x *SubscribeRequest) ProtoReflect() protoreflect.Message { + mi := &file_nostr_v1_nostr_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead. +func (*SubscribeRequest) Descriptor() ([]byte, []int) { + return file_nostr_v1_nostr_proto_rawDescGZIP(), []int{6} +} + +func (x *SubscribeRequest) GetFilters() []*Filter { + if x != nil { + return x.Filters + } + return nil +} + +func (x *SubscribeRequest) GetIncludeCanonicalJson() bool { + if x != nil { + return x.IncludeCanonicalJson + } + return false +} + +func (x *SubscribeRequest) GetSubscriptionId() string { + if x != nil { + return x.SubscriptionId + } + return "" +} + +// Request to unsubscribe from an active subscription +type UnsubscribeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SubscriptionId string `protobuf:"bytes,1,opt,name=subscription_id,json=subscriptionId,proto3" json:"subscription_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnsubscribeRequest) Reset() { + *x = UnsubscribeRequest{} + mi := &file_nostr_v1_nostr_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnsubscribeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnsubscribeRequest) ProtoMessage() {} + +func (x *UnsubscribeRequest) ProtoReflect() protoreflect.Message { + mi := &file_nostr_v1_nostr_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnsubscribeRequest.ProtoReflect.Descriptor instead. +func (*UnsubscribeRequest) Descriptor() ([]byte, []int) { + return file_nostr_v1_nostr_proto_rawDescGZIP(), []int{7} +} + +func (x *UnsubscribeRequest) GetSubscriptionId() string { + if x != nil { + return x.SubscriptionId + } + return "" +} + +// Batch publish request +type PublishBatchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublishBatchRequest) Reset() { + *x = PublishBatchRequest{} + mi := &file_nostr_v1_nostr_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublishBatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublishBatchRequest) ProtoMessage() {} + +func (x *PublishBatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_nostr_v1_nostr_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublishBatchRequest.ProtoReflect.Descriptor instead. +func (*PublishBatchRequest) Descriptor() ([]byte, []int) { + return file_nostr_v1_nostr_proto_rawDescGZIP(), []int{8} +} + +func (x *PublishBatchRequest) GetEvents() []*Event { + if x != nil { + return x.Events + } + return nil +} + +// Batch publish response +type PublishBatchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Results []*PublishEventResponse `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublishBatchResponse) Reset() { + *x = PublishBatchResponse{} + mi := &file_nostr_v1_nostr_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublishBatchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublishBatchResponse) ProtoMessage() {} + +func (x *PublishBatchResponse) ProtoReflect() protoreflect.Message { + mi := &file_nostr_v1_nostr_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublishBatchResponse.ProtoReflect.Descriptor instead. +func (*PublishBatchResponse) Descriptor() ([]byte, []int) { + return file_nostr_v1_nostr_proto_rawDescGZIP(), []int{9} +} + +func (x *PublishBatchResponse) GetResults() []*PublishEventResponse { + if x != nil { + return x.Results + } + return nil +} + +// Paginated query request +type QueryRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Filters []*Filter `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"` + IncludeCanonicalJson bool `protobuf:"varint,2,opt,name=include_canonical_json,json=includeCanonicalJson,proto3" json:"include_canonical_json,omitempty"` + // Pagination + Cursor string `protobuf:"bytes,3,opt,name=cursor,proto3" json:"cursor,omitempty"` // Opaque cursor from previous response + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // Default: 100 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *QueryRequest) Reset() { + *x = QueryRequest{} + mi := &file_nostr_v1_nostr_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *QueryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryRequest) ProtoMessage() {} + +func (x *QueryRequest) ProtoReflect() protoreflect.Message { + mi := &file_nostr_v1_nostr_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead. +func (*QueryRequest) Descriptor() ([]byte, []int) { + return file_nostr_v1_nostr_proto_rawDescGZIP(), []int{10} +} + +func (x *QueryRequest) GetFilters() []*Filter { + if x != nil { + return x.Filters + } + return nil +} + +func (x *QueryRequest) GetIncludeCanonicalJson() bool { + if x != nil { + return x.IncludeCanonicalJson + } + return false +} + +func (x *QueryRequest) GetCursor() string { + if x != nil { + return x.Cursor + } + return "" +} + +func (x *QueryRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +// Paginated query response +type QueryResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` + NextCursor string `protobuf:"bytes,2,opt,name=next_cursor,json=nextCursor,proto3" json:"next_cursor,omitempty"` // Empty if no more results + TotalCount int32 `protobuf:"varint,3,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` // Optional: total matching events + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *QueryResponse) Reset() { + *x = QueryResponse{} + mi := &file_nostr_v1_nostr_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *QueryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryResponse) ProtoMessage() {} + +func (x *QueryResponse) ProtoReflect() protoreflect.Message { + mi := &file_nostr_v1_nostr_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead. +func (*QueryResponse) Descriptor() ([]byte, []int) { + return file_nostr_v1_nostr_proto_rawDescGZIP(), []int{11} +} + +func (x *QueryResponse) GetEvents() []*Event { + if x != nil { + return x.Events + } + return nil +} + +func (x *QueryResponse) GetNextCursor() string { + if x != nil { + return x.NextCursor + } + return "" +} + +func (x *QueryResponse) GetTotalCount() int32 { + if x != nil { + return x.TotalCount + } + return 0 +} + +// Event count request (NIP-45) +type CountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Filters []*Filter `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CountRequest) Reset() { + *x = CountRequest{} + mi := &file_nostr_v1_nostr_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CountRequest) ProtoMessage() {} + +func (x *CountRequest) ProtoReflect() protoreflect.Message { + mi := &file_nostr_v1_nostr_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CountRequest.ProtoReflect.Descriptor instead. +func (*CountRequest) Descriptor() ([]byte, []int) { + return file_nostr_v1_nostr_proto_rawDescGZIP(), []int{12} +} + +func (x *CountRequest) GetFilters() []*Filter { + if x != nil { + return x.Filters + } + return nil +} + +// Event count response +type CountResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CountResponse) Reset() { + *x = CountResponse{} + mi := &file_nostr_v1_nostr_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CountResponse) ProtoMessage() {} + +func (x *CountResponse) ProtoReflect() protoreflect.Message { + mi := &file_nostr_v1_nostr_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CountResponse.ProtoReflect.Descriptor instead. +func (*CountResponse) Descriptor() ([]byte, []int) { + return file_nostr_v1_nostr_proto_rawDescGZIP(), []int{13} +} + +func (x *CountResponse) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +// Empty message +type Empty struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Empty) Reset() { + *x = Empty{} + mi := &file_nostr_v1_nostr_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Empty) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Empty) ProtoMessage() {} + +func (x *Empty) ProtoReflect() protoreflect.Message { + mi := &file_nostr_v1_nostr_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Empty.ProtoReflect.Descriptor instead. +func (*Empty) Descriptor() ([]byte, []int) { + return file_nostr_v1_nostr_proto_rawDescGZIP(), []int{14} +} + +// Relay statistics +type RelayStats struct { + state protoimpl.MessageState `protogen:"open.v1"` + TotalEvents int64 `protobuf:"varint,1,opt,name=total_events,json=totalEvents,proto3" json:"total_events,omitempty"` + TotalSubscriptions int64 `protobuf:"varint,2,opt,name=total_subscriptions,json=totalSubscriptions,proto3" json:"total_subscriptions,omitempty"` + ConnectedClients int64 `protobuf:"varint,3,opt,name=connected_clients,json=connectedClients,proto3" json:"connected_clients,omitempty"` + EventsPerSecond int64 `protobuf:"varint,4,opt,name=events_per_second,json=eventsPerSecond,proto3" json:"events_per_second,omitempty"` + UptimeSeconds int64 `protobuf:"varint,5,opt,name=uptime_seconds,json=uptimeSeconds,proto3" json:"uptime_seconds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RelayStats) Reset() { + *x = RelayStats{} + mi := &file_nostr_v1_nostr_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RelayStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RelayStats) ProtoMessage() {} + +func (x *RelayStats) ProtoReflect() protoreflect.Message { + mi := &file_nostr_v1_nostr_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RelayStats.ProtoReflect.Descriptor instead. +func (*RelayStats) Descriptor() ([]byte, []int) { + return file_nostr_v1_nostr_proto_rawDescGZIP(), []int{15} +} + +func (x *RelayStats) GetTotalEvents() int64 { + if x != nil { + return x.TotalEvents + } + return 0 +} + +func (x *RelayStats) GetTotalSubscriptions() int64 { + if x != nil { + return x.TotalSubscriptions + } + return 0 +} + +func (x *RelayStats) GetConnectedClients() int64 { + if x != nil { + return x.ConnectedClients + } + return 0 +} + +func (x *RelayStats) GetEventsPerSecond() int64 { + if x != nil { + return x.EventsPerSecond + } + return 0 +} + +func (x *RelayStats) GetUptimeSeconds() int64 { + if x != nil { + return x.UptimeSeconds + } + return 0 +} + +// List of active connections +type ConnectionList struct { + state protoimpl.MessageState `protogen:"open.v1"` + Connections []*Connection `protobuf:"bytes,1,rep,name=connections,proto3" json:"connections,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConnectionList) Reset() { + *x = ConnectionList{} + mi := &file_nostr_v1_nostr_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConnectionList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConnectionList) ProtoMessage() {} + +func (x *ConnectionList) ProtoReflect() protoreflect.Message { + mi := &file_nostr_v1_nostr_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConnectionList.ProtoReflect.Descriptor instead. +func (*ConnectionList) Descriptor() ([]byte, []int) { + return file_nostr_v1_nostr_proto_rawDescGZIP(), []int{16} +} + +func (x *ConnectionList) GetConnections() []*Connection { + if x != nil { + return x.Connections + } + return nil +} + +// Single connection info +type Connection struct { + state protoimpl.MessageState `protogen:"open.v1"` + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + Protocol string `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"` // "websocket" or "grpc" + ConnectedAt int64 `protobuf:"varint,3,opt,name=connected_at,json=connectedAt,proto3" json:"connected_at,omitempty"` + ActiveSubscriptions int32 `protobuf:"varint,4,opt,name=active_subscriptions,json=activeSubscriptions,proto3" json:"active_subscriptions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Connection) Reset() { + *x = Connection{} + mi := &file_nostr_v1_nostr_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Connection) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Connection) ProtoMessage() {} + +func (x *Connection) ProtoReflect() protoreflect.Message { + mi := &file_nostr_v1_nostr_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Connection.ProtoReflect.Descriptor instead. +func (*Connection) Descriptor() ([]byte, []int) { + return file_nostr_v1_nostr_proto_rawDescGZIP(), []int{17} +} + +func (x *Connection) GetClientId() string { + if x != nil { + return x.ClientId + } + return "" +} + +func (x *Connection) GetProtocol() string { + if x != nil { + return x.Protocol + } + return "" +} + +func (x *Connection) GetConnectedAt() int64 { + if x != nil { + return x.ConnectedAt + } + return 0 +} + +func (x *Connection) GetActiveSubscriptions() int32 { + if x != nil { + return x.ActiveSubscriptions + } + return 0 +} + +// Request to ban a public key +type BanRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Pubkey string `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + Until int64 `protobuf:"varint,2,opt,name=until,proto3" json:"until,omitempty"` // Unix timestamp, 0 for permanent + Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BanRequest) Reset() { + *x = BanRequest{} + mi := &file_nostr_v1_nostr_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BanRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BanRequest) ProtoMessage() {} + +func (x *BanRequest) ProtoReflect() protoreflect.Message { + mi := &file_nostr_v1_nostr_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BanRequest.ProtoReflect.Descriptor instead. +func (*BanRequest) Descriptor() ([]byte, []int) { + return file_nostr_v1_nostr_proto_rawDescGZIP(), []int{18} +} + +func (x *BanRequest) GetPubkey() string { + if x != nil { + return x.Pubkey + } + return "" +} + +func (x *BanRequest) GetUntil() int64 { + if x != nil { + return x.Until + } + return 0 +} + +func (x *BanRequest) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +// Storage statistics +type StorageStats struct { + state protoimpl.MessageState `protogen:"open.v1"` + TotalBytes int64 `protobuf:"varint,1,opt,name=total_bytes,json=totalBytes,proto3" json:"total_bytes,omitempty"` + TotalEvents int64 `protobuf:"varint,2,opt,name=total_events,json=totalEvents,proto3" json:"total_events,omitempty"` + DbSizeBytes int64 `protobuf:"varint,3,opt,name=db_size_bytes,json=dbSizeBytes,proto3" json:"db_size_bytes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StorageStats) Reset() { + *x = StorageStats{} + mi := &file_nostr_v1_nostr_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StorageStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageStats) ProtoMessage() {} + +func (x *StorageStats) ProtoReflect() protoreflect.Message { + mi := &file_nostr_v1_nostr_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StorageStats.ProtoReflect.Descriptor instead. +func (*StorageStats) Descriptor() ([]byte, []int) { + return file_nostr_v1_nostr_proto_rawDescGZIP(), []int{19} +} + +func (x *StorageStats) GetTotalBytes() int64 { + if x != nil { + return x.TotalBytes + } + return 0 +} + +func (x *StorageStats) GetTotalEvents() int64 { + if x != nil { + return x.TotalEvents + } + return 0 +} + +func (x *StorageStats) GetDbSizeBytes() int64 { + if x != nil { + return x.DbSizeBytes + } + return 0 +} + +var File_nostr_v1_nostr_proto protoreflect.FileDescriptor + +const file_nostr_v1_nostr_proto_rawDesc = "" + + "\n" + + "\x14nostr/v1/nostr.proto\x12\bnostr.v1\"\xf0\x01\n" + + "\x05Event\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + + "\x06pubkey\x18\x02 \x01(\tR\x06pubkey\x12\x1d\n" + + "\n" + + "created_at\x18\x03 \x01(\x03R\tcreatedAt\x12\x12\n" + + "\x04kind\x18\x04 \x01(\x05R\x04kind\x12!\n" + + "\x04tags\x18\x05 \x03(\v2\r.nostr.v1.TagR\x04tags\x12\x18\n" + + "\acontent\x18\x06 \x01(\tR\acontent\x12\x10\n" + + "\x03sig\x18\a \x01(\tR\x03sig\x12*\n" + + "\x0ecanonical_json\x18\b \x01(\fH\x00R\rcanonicalJson\x88\x01\x01B\x11\n" + + "\x0f_canonical_json\"\x1d\n" + + "\x03Tag\x12\x16\n" + + "\x06values\x18\x01 \x03(\tR\x06values\"\xfe\x02\n" + + "\x06Filter\x12\x10\n" + + "\x03ids\x18\x01 \x03(\tR\x03ids\x12\x18\n" + + "\aauthors\x18\x02 \x03(\tR\aauthors\x12\x14\n" + + "\x05kinds\x18\x03 \x03(\x05R\x05kinds\x12\x15\n" + + "\x06e_tags\x18\x04 \x03(\tR\x05eTags\x12\x15\n" + + "\x06p_tags\x18\x05 \x03(\tR\x05pTags\x12\x19\n" + + "\x05since\x18\x06 \x01(\x03H\x00R\x05since\x88\x01\x01\x12\x19\n" + + "\x05until\x18\a \x01(\x03H\x01R\x05until\x88\x01\x01\x12\x19\n" + + "\x05limit\x18\b \x01(\x05H\x02R\x05limit\x88\x01\x01\x12A\n" + + "\vtag_filters\x18\t \x03(\v2 .nostr.v1.Filter.TagFiltersEntryR\n" + + "tagFilters\x1aR\n" + + "\x0fTagFiltersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12)\n" + + "\x05value\x18\x02 \x01(\v2\x13.nostr.v1.TagFilterR\x05value:\x028\x01B\b\n" + + "\x06_sinceB\b\n" + + "\x06_untilB\b\n" + + "\x06_limit\"#\n" + + "\tTagFilter\x12\x16\n" + + "\x06values\x18\x01 \x03(\tR\x06values\"<\n" + + "\x13PublishEventRequest\x12%\n" + + "\x05event\x18\x01 \x01(\v2\x0f.nostr.v1.EventR\x05event\"s\n" + + "\x14PublishEventResponse\x12\x1a\n" + + "\baccepted\x18\x01 \x01(\bR\baccepted\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage\x12%\n" + + "\x0ecanonical_json\x18\x03 \x01(\fR\rcanonicalJson\"\x9d\x01\n" + + "\x10SubscribeRequest\x12*\n" + + "\afilters\x18\x01 \x03(\v2\x10.nostr.v1.FilterR\afilters\x124\n" + + "\x16include_canonical_json\x18\x02 \x01(\bR\x14includeCanonicalJson\x12'\n" + + "\x0fsubscription_id\x18\x03 \x01(\tR\x0esubscriptionId\"=\n" + + "\x12UnsubscribeRequest\x12'\n" + + "\x0fsubscription_id\x18\x01 \x01(\tR\x0esubscriptionId\">\n" + + "\x13PublishBatchRequest\x12'\n" + + "\x06events\x18\x01 \x03(\v2\x0f.nostr.v1.EventR\x06events\"P\n" + + "\x14PublishBatchResponse\x128\n" + + "\aresults\x18\x01 \x03(\v2\x1e.nostr.v1.PublishEventResponseR\aresults\"\xa5\x01\n" + + "\fQueryRequest\x12*\n" + + "\afilters\x18\x01 \x03(\v2\x10.nostr.v1.FilterR\afilters\x124\n" + + "\x16include_canonical_json\x18\x02 \x01(\bR\x14includeCanonicalJson\x12\x16\n" + + "\x06cursor\x18\x03 \x01(\tR\x06cursor\x12\x1b\n" + + "\tpage_size\x18\x04 \x01(\x05R\bpageSize\"z\n" + + "\rQueryResponse\x12'\n" + + "\x06events\x18\x01 \x03(\v2\x0f.nostr.v1.EventR\x06events\x12\x1f\n" + + "\vnext_cursor\x18\x02 \x01(\tR\n" + + "nextCursor\x12\x1f\n" + + "\vtotal_count\x18\x03 \x01(\x05R\n" + + "totalCount\":\n" + + "\fCountRequest\x12*\n" + + "\afilters\x18\x01 \x03(\v2\x10.nostr.v1.FilterR\afilters\"%\n" + + "\rCountResponse\x12\x14\n" + + "\x05count\x18\x01 \x01(\x03R\x05count\"\a\n" + + "\x05Empty\"\xe0\x01\n" + + "\n" + + "RelayStats\x12!\n" + + "\ftotal_events\x18\x01 \x01(\x03R\vtotalEvents\x12/\n" + + "\x13total_subscriptions\x18\x02 \x01(\x03R\x12totalSubscriptions\x12+\n" + + "\x11connected_clients\x18\x03 \x01(\x03R\x10connectedClients\x12*\n" + + "\x11events_per_second\x18\x04 \x01(\x03R\x0feventsPerSecond\x12%\n" + + "\x0euptime_seconds\x18\x05 \x01(\x03R\ruptimeSeconds\"H\n" + + "\x0eConnectionList\x126\n" + + "\vconnections\x18\x01 \x03(\v2\x14.nostr.v1.ConnectionR\vconnections\"\x9b\x01\n" + + "\n" + + "Connection\x12\x1b\n" + + "\tclient_id\x18\x01 \x01(\tR\bclientId\x12\x1a\n" + + "\bprotocol\x18\x02 \x01(\tR\bprotocol\x12!\n" + + "\fconnected_at\x18\x03 \x01(\x03R\vconnectedAt\x121\n" + + "\x14active_subscriptions\x18\x04 \x01(\x05R\x13activeSubscriptions\"R\n" + + "\n" + + "BanRequest\x12\x16\n" + + "\x06pubkey\x18\x01 \x01(\tR\x06pubkey\x12\x14\n" + + "\x05until\x18\x02 \x01(\x03R\x05until\x12\x16\n" + + "\x06reason\x18\x03 \x01(\tR\x06reason\"v\n" + + "\fStorageStats\x12\x1f\n" + + "\vtotal_bytes\x18\x01 \x01(\x03R\n" + + "totalBytes\x12!\n" + + "\ftotal_events\x18\x02 \x01(\x03R\vtotalEvents\x12\"\n" + + "\rdb_size_bytes\x18\x03 \x01(\x03R\vdbSizeBytes2\xa4\x03\n" + + "\n" + + "NostrRelay\x12M\n" + + "\fPublishEvent\x12\x1d.nostr.v1.PublishEventRequest\x1a\x1e.nostr.v1.PublishEventResponse\x12:\n" + + "\tSubscribe\x12\x1a.nostr.v1.SubscribeRequest\x1a\x0f.nostr.v1.Event0\x01\x12<\n" + + "\vUnsubscribe\x12\x1c.nostr.v1.UnsubscribeRequest\x1a\x0f.nostr.v1.Empty\x12M\n" + + "\fPublishBatch\x12\x1d.nostr.v1.PublishBatchRequest\x1a\x1e.nostr.v1.PublishBatchResponse\x12>\n" + + "\vQueryEvents\x12\x16.nostr.v1.QueryRequest\x1a\x17.nostr.v1.QueryResponse\x12>\n" + + "\vCountEvents\x12\x16.nostr.v1.CountRequest\x1a\x17.nostr.v1.CountResponse2\xee\x01\n" + + "\n" + + "RelayAdmin\x121\n" + + "\bGetStats\x12\x0f.nostr.v1.Empty\x1a\x14.nostr.v1.RelayStats\x12;\n" + + "\x0eGetConnections\x12\x0f.nostr.v1.Empty\x1a\x18.nostr.v1.ConnectionList\x125\n" + + "\fBanPublicKey\x12\x14.nostr.v1.BanRequest\x1a\x0f.nostr.v1.Empty\x129\n" + + "\x0eGetStorageInfo\x12\x0f.nostr.v1.Empty\x1a\x16.nostr.v1.StorageStatsB\x89\x01\n" + + "\fcom.nostr.v1B\n" + + "NostrProtoP\x01Z,northwest.io/nostr-grpc/api/nostr/v1;nostrv1\xa2\x02\x03NXX\xaa\x02\bNostr.V1\xca\x02\bNostr\\V1\xe2\x02\x14Nostr\\V1\\GPBMetadata\xea\x02\tNostr::V1b\x06proto3" + +var ( + file_nostr_v1_nostr_proto_rawDescOnce sync.Once + file_nostr_v1_nostr_proto_rawDescData []byte +) + +func file_nostr_v1_nostr_proto_rawDescGZIP() []byte { + file_nostr_v1_nostr_proto_rawDescOnce.Do(func() { + file_nostr_v1_nostr_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_nostr_v1_nostr_proto_rawDesc), len(file_nostr_v1_nostr_proto_rawDesc))) + }) + return file_nostr_v1_nostr_proto_rawDescData +} + +var file_nostr_v1_nostr_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_nostr_v1_nostr_proto_goTypes = []any{ + (*Event)(nil), // 0: nostr.v1.Event + (*Tag)(nil), // 1: nostr.v1.Tag + (*Filter)(nil), // 2: nostr.v1.Filter + (*TagFilter)(nil), // 3: nostr.v1.TagFilter + (*PublishEventRequest)(nil), // 4: nostr.v1.PublishEventRequest + (*PublishEventResponse)(nil), // 5: nostr.v1.PublishEventResponse + (*SubscribeRequest)(nil), // 6: nostr.v1.SubscribeRequest + (*UnsubscribeRequest)(nil), // 7: nostr.v1.UnsubscribeRequest + (*PublishBatchRequest)(nil), // 8: nostr.v1.PublishBatchRequest + (*PublishBatchResponse)(nil), // 9: nostr.v1.PublishBatchResponse + (*QueryRequest)(nil), // 10: nostr.v1.QueryRequest + (*QueryResponse)(nil), // 11: nostr.v1.QueryResponse + (*CountRequest)(nil), // 12: nostr.v1.CountRequest + (*CountResponse)(nil), // 13: nostr.v1.CountResponse + (*Empty)(nil), // 14: nostr.v1.Empty + (*RelayStats)(nil), // 15: nostr.v1.RelayStats + (*ConnectionList)(nil), // 16: nostr.v1.ConnectionList + (*Connection)(nil), // 17: nostr.v1.Connection + (*BanRequest)(nil), // 18: nostr.v1.BanRequest + (*StorageStats)(nil), // 19: nostr.v1.StorageStats + nil, // 20: nostr.v1.Filter.TagFiltersEntry +} +var file_nostr_v1_nostr_proto_depIdxs = []int32{ + 1, // 0: nostr.v1.Event.tags:type_name -> nostr.v1.Tag + 20, // 1: nostr.v1.Filter.tag_filters:type_name -> nostr.v1.Filter.TagFiltersEntry + 0, // 2: nostr.v1.PublishEventRequest.event:type_name -> nostr.v1.Event + 2, // 3: nostr.v1.SubscribeRequest.filters:type_name -> nostr.v1.Filter + 0, // 4: nostr.v1.PublishBatchRequest.events:type_name -> nostr.v1.Event + 5, // 5: nostr.v1.PublishBatchResponse.results:type_name -> nostr.v1.PublishEventResponse + 2, // 6: nostr.v1.QueryRequest.filters:type_name -> nostr.v1.Filter + 0, // 7: nostr.v1.QueryResponse.events:type_name -> nostr.v1.Event + 2, // 8: nostr.v1.CountRequest.filters:type_name -> nostr.v1.Filter + 17, // 9: nostr.v1.ConnectionList.connections:type_name -> nostr.v1.Connection + 3, // 10: nostr.v1.Filter.TagFiltersEntry.value:type_name -> nostr.v1.TagFilter + 4, // 11: nostr.v1.NostrRelay.PublishEvent:input_type -> nostr.v1.PublishEventRequest + 6, // 12: nostr.v1.NostrRelay.Subscribe:input_type -> nostr.v1.SubscribeRequest + 7, // 13: nostr.v1.NostrRelay.Unsubscribe:input_type -> nostr.v1.UnsubscribeRequest + 8, // 14: nostr.v1.NostrRelay.PublishBatch:input_type -> nostr.v1.PublishBatchRequest + 10, // 15: nostr.v1.NostrRelay.QueryEvents:input_type -> nostr.v1.QueryRequest + 12, // 16: nostr.v1.NostrRelay.CountEvents:input_type -> nostr.v1.CountRequest + 14, // 17: nostr.v1.RelayAdmin.GetStats:input_type -> nostr.v1.Empty + 14, // 18: nostr.v1.RelayAdmin.GetConnections:input_type -> nostr.v1.Empty + 18, // 19: nostr.v1.RelayAdmin.BanPublicKey:input_type -> nostr.v1.BanRequest + 14, // 20: nostr.v1.RelayAdmin.GetStorageInfo:input_type -> nostr.v1.Empty + 5, // 21: nostr.v1.NostrRelay.PublishEvent:output_type -> nostr.v1.PublishEventResponse + 0, // 22: nostr.v1.NostrRelay.Subscribe:output_type -> nostr.v1.Event + 14, // 23: nostr.v1.NostrRelay.Unsubscribe:output_type -> nostr.v1.Empty + 9, // 24: nostr.v1.NostrRelay.PublishBatch:output_type -> nostr.v1.PublishBatchResponse + 11, // 25: nostr.v1.NostrRelay.QueryEvents:output_type -> nostr.v1.QueryResponse + 13, // 26: nostr.v1.NostrRelay.CountEvents:output_type -> nostr.v1.CountResponse + 15, // 27: nostr.v1.RelayAdmin.GetStats:output_type -> nostr.v1.RelayStats + 16, // 28: nostr.v1.RelayAdmin.GetConnections:output_type -> nostr.v1.ConnectionList + 14, // 29: nostr.v1.RelayAdmin.BanPublicKey:output_type -> nostr.v1.Empty + 19, // 30: nostr.v1.RelayAdmin.GetStorageInfo:output_type -> nostr.v1.StorageStats + 21, // [21:31] is the sub-list for method output_type + 11, // [11:21] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_nostr_v1_nostr_proto_init() } +func file_nostr_v1_nostr_proto_init() { + if File_nostr_v1_nostr_proto != nil { + return + } + file_nostr_v1_nostr_proto_msgTypes[0].OneofWrappers = []any{} + file_nostr_v1_nostr_proto_msgTypes[2].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_nostr_v1_nostr_proto_rawDesc), len(file_nostr_v1_nostr_proto_rawDesc)), + NumEnums: 0, + NumMessages: 21, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_nostr_v1_nostr_proto_goTypes, + DependencyIndexes: file_nostr_v1_nostr_proto_depIdxs, + MessageInfos: file_nostr_v1_nostr_proto_msgTypes, + }.Build() + File_nostr_v1_nostr_proto = out.File + file_nostr_v1_nostr_proto_goTypes = nil + file_nostr_v1_nostr_proto_depIdxs = nil +} -- cgit v1.2.3