From 6c015f028aa36cf57d0950db06bc75fc28e64425 Mon Sep 17 00:00:00 2001 From: "Eng. Juan Combetto" Date: Tue, 15 Aug 2023 17:32:32 +0900 Subject: [PATCH] feat(dao): OwnersByCollection --- api/marketplace/v1/marketplace.proto | 9 + go/pkg/marketplace/marketplace_service.go | 31 ++ go/pkg/marketplacepb/marketplace.pb.go | 349 ++++++++++++------ go/pkg/marketplacepb/marketplace_grpc.pb.go | 36 ++ packages/api/marketplace/v1/marketplace.ts | 144 ++++++++ .../Organizations/OrganizationsScreen.tsx | 30 ++ 6 files changed, 493 insertions(+), 106 deletions(-) diff --git a/api/marketplace/v1/marketplace.proto b/api/marketplace/v1/marketplace.proto index a69637e5e0..1cde3c597b 100644 --- a/api/marketplace/v1/marketplace.proto +++ b/api/marketplace/v1/marketplace.proto @@ -17,6 +17,7 @@ service MarketplaceService { rpc DAppsGroups(DAppsGroupsRequest) returns (DAppsGroupsResponse); rpc SearchNames(SearchNamesRequest) returns (SearchNamesResponse); rpc SearchCollections(SearchCollectionsRequest) returns (SearchCollectionsResponse); + rpc OwnersByCollection(OwnersByCollectionRequest) returns (OwnersByCollectionResponse); } enum Sort { @@ -310,3 +311,11 @@ message SearchCollectionsRequest { message SearchCollectionsResponse { repeated Collection collections = 1; } + +message OwnersByCollectionRequest { + string collection_id = 1; +} + +message OwnersByCollectionResponse { + repeated string owners = 1; +} diff --git a/go/pkg/marketplace/marketplace_service.go b/go/pkg/marketplace/marketplace_service.go index f11ae78d01..80193f50e4 100644 --- a/go/pkg/marketplace/marketplace_service.go +++ b/go/pkg/marketplace/marketplace_service.go @@ -1056,3 +1056,34 @@ func (s *MarkteplaceService) SearchCollections(ctx context.Context, req *marketp } return &marketplacepb.SearchCollectionsResponse{Collections: pbCollections}, nil } + +func (s *MarkteplaceService) OwnersByCollection(ctx context.Context, req *marketplacepb.OwnersByCollectionRequest) (*marketplacepb.OwnersByCollectionResponse, error) { + + collectionId := req.CollectionId + + type Owners struct { + Owner string + } + var owners []Owners + + _ = s.conf.IndexerDB.Raw(` + select nfts.id, max(a.time) atime, COALESCE(m.buyer_id, t.buyer_id, tn.receiver) as owner + from nfts + join activities a on nfts.id = a.nft_id + left join mints m on a.id = m.activity_id + left join trades t on a.id = t.activity_id + left join transfer_nfts tn on a.id = tn.activity_id + where collection_id = ? and a.kind in ('mint', 'trade','transfer-nft') and a.kind != 'burn' + group by nfts.id, m.buyer_id, t.buyer_id, tn.receiver + order by atime desc`, collectionId).Scan( + &owners, + ).Error + + var out []string + for _, owner := range owners { + out = append(out, owner.Owner) + } + + return &marketplacepb.OwnersByCollectionResponse{Owners: out}, nil + +} diff --git a/go/pkg/marketplacepb/marketplace.pb.go b/go/pkg/marketplacepb/marketplace.pb.go index f3efba368c..5cb0f899cb 100644 --- a/go/pkg/marketplacepb/marketplace.pb.go +++ b/go/pkg/marketplacepb/marketplace.pb.go @@ -2917,6 +2917,100 @@ func (x *SearchCollectionsResponse) GetCollections() []*Collection { return nil } +type OwnersByCollectionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"` +} + +func (x *OwnersByCollectionRequest) Reset() { + *x = OwnersByCollectionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_marketplace_v1_marketplace_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OwnersByCollectionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OwnersByCollectionRequest) ProtoMessage() {} + +func (x *OwnersByCollectionRequest) ProtoReflect() protoreflect.Message { + mi := &file_marketplace_v1_marketplace_proto_msgTypes[41] + 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 OwnersByCollectionRequest.ProtoReflect.Descriptor instead. +func (*OwnersByCollectionRequest) Descriptor() ([]byte, []int) { + return file_marketplace_v1_marketplace_proto_rawDescGZIP(), []int{41} +} + +func (x *OwnersByCollectionRequest) GetCollectionId() string { + if x != nil { + return x.CollectionId + } + return "" +} + +type OwnersByCollectionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Owners []string `protobuf:"bytes,1,rep,name=owners,proto3" json:"owners,omitempty"` +} + +func (x *OwnersByCollectionResponse) Reset() { + *x = OwnersByCollectionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_marketplace_v1_marketplace_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OwnersByCollectionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OwnersByCollectionResponse) ProtoMessage() {} + +func (x *OwnersByCollectionResponse) ProtoReflect() protoreflect.Message { + mi := &file_marketplace_v1_marketplace_proto_msgTypes[42] + 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 OwnersByCollectionResponse.ProtoReflect.Descriptor instead. +func (*OwnersByCollectionResponse) Descriptor() ([]byte, []int) { + return file_marketplace_v1_marketplace_proto_rawDescGZIP(), []int{42} +} + +func (x *OwnersByCollectionResponse) GetOwners() []string { + if x != nil { + return x.Owners + } + return nil +} + var File_marketplace_v1_marketplace_proto protoreflect.FileDescriptor var file_marketplace_v1_marketplace_proto_rawDesc = []byte{ @@ -3257,101 +3351,116 @@ var file_marketplace_v1_marketplace_proto_rawDesc = []byte{ 0x0b, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, - 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x7c, 0x0a, 0x04, 0x53, - 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x4f, 0x52, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x4f, 0x52, - 0x54, 0x5f, 0x50, 0x52, 0x49, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x4f, 0x52, - 0x54, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x4f, - 0x52, 0x54, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x41, 0x50, 0x10, 0x03, 0x12, - 0x13, 0x0a, 0x0f, 0x53, 0x4f, 0x52, 0x54, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x5f, - 0x41, 0x54, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x4f, 0x52, 0x54, 0x5f, 0x56, 0x4f, 0x4c, - 0x55, 0x4d, 0x45, 0x5f, 0x55, 0x53, 0x44, 0x10, 0x05, 0x2a, 0x6c, 0x0a, 0x0d, 0x53, 0x6f, 0x72, - 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x4f, - 0x52, 0x54, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x4f, - 0x52, 0x54, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x53, 0x43, - 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x4f, 0x52, 0x54, - 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x53, 0x43, 0x45, - 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x2a, 0x55, 0x0a, 0x09, 0x4d, 0x69, 0x6e, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x4d, 0x49, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x16, 0x0a, 0x12, 0x4d, 0x49, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, - 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x49, 0x4e, 0x54, - 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x45, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02, 0x32, 0x84, - 0x09, 0x0a, 0x12, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, - 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, - 0x62, 0x0a, 0x0f, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x61, 0x72, + 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x40, 0x0a, 0x19, 0x4f, + 0x77, 0x6e, 0x65, 0x72, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x34, 0x0a, + 0x1a, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x73, 0x2a, 0x7c, 0x0a, 0x04, 0x53, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x10, 0x53, + 0x4f, 0x52, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x4f, 0x52, 0x54, 0x5f, 0x50, 0x52, 0x49, 0x43, 0x45, 0x10, + 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x4f, 0x52, 0x54, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, + 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x4f, 0x52, 0x54, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, + 0x54, 0x5f, 0x43, 0x41, 0x50, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x4f, 0x52, 0x54, 0x5f, + 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x41, 0x54, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, + 0x53, 0x4f, 0x52, 0x54, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x55, 0x53, 0x44, 0x10, + 0x05, 0x2a, 0x6c, 0x0a, 0x0d, 0x53, 0x6f, 0x72, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x4f, 0x52, 0x54, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x4f, 0x52, 0x54, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, + 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x4f, 0x52, 0x54, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x2a, + 0x55, 0x0a, 0x09, 0x4d, 0x69, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x16, + 0x4d, 0x49, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x4d, 0x49, 0x4e, 0x54, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, + 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x49, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x45, + 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02, 0x32, 0xf1, 0x09, 0x0a, 0x12, 0x4d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, + 0x0b, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x22, 0x2e, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x62, 0x0a, 0x0f, 0x43, 0x6f, 0x6c, 0x6c, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x04, 0x4e, 0x46, 0x54, 0x73, 0x12, 0x1b, 0x2e, 0x6d, 0x61, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x04, 0x4e, + 0x46, 0x54, 0x73, 0x12, 0x1b, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x46, 0x54, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1c, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x4e, 0x46, 0x54, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, + 0x12, 0x7c, 0x0a, 0x17, 0x4e, 0x46, 0x54, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x46, 0x54, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x46, 0x54, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x7c, 0x0a, 0x17, 0x4e, 0x46, 0x54, 0x43, - 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x46, 0x54, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x46, 0x54, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x49, 0x0a, 0x06, 0x51, 0x75, 0x65, 0x73, 0x74, 0x73, - 0x12, 0x1d, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1e, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, - 0x01, 0x12, 0x4f, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x2e, - 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, - 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x30, 0x01, 0x12, 0x62, 0x0a, 0x0f, 0x4e, 0x46, 0x54, 0x50, 0x72, 0x69, 0x63, 0x65, 0x48, 0x69, - 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x26, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, - 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x46, 0x54, 0x50, 0x72, 0x69, 0x63, 0x65, 0x48, - 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x46, 0x54, + 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x49, + 0x0a, 0x06, 0x51, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x1d, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x4f, 0x0a, 0x08, 0x41, 0x63, 0x74, + 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, + 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x62, 0x0a, 0x0f, 0x4e, 0x46, + 0x54, 0x50, 0x72, 0x69, 0x63, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x26, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x46, 0x54, 0x50, 0x72, 0x69, 0x63, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x07, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x72, - 0x73, 0x12, 0x1e, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x41, 0x0a, 0x04, 0x4e, 0x65, 0x77, 0x73, 0x12, 0x1b, 0x2e, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x77, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x77, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x05, 0x44, 0x41, 0x70, 0x70, 0x73, 0x12, 0x1c, - 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x44, 0x41, 0x70, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x41, - 0x70, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0b, 0x44, - 0x41, 0x70, 0x70, 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x41, 0x70, 0x70, - 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, - 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x44, 0x41, 0x70, 0x70, 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0b, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x46, 0x54, 0x50, 0x72, 0x69, 0x63, 0x65, 0x48, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, + 0x0a, 0x07, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x2e, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6e, 0x6e, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6e, 0x6e, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x04, 0x4e, 0x65, + 0x77, 0x73, 0x12, 0x1b, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1c, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x4e, 0x65, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, + 0x05, 0x44, 0x41, 0x70, 0x70, 0x73, 0x12, 0x1c, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, + 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x41, 0x70, 0x70, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, + 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x41, 0x70, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0b, 0x44, 0x41, 0x70, 0x70, 0x73, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x41, 0x70, 0x70, 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, - 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x11, 0x53, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x28, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6d, 0x61, 0x72, + 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x41, 0x70, 0x70, 0x73, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0b, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x11, 0x5a, 0x0f, 0x2e, 0x2f, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, + 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x11, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x6f, 0x6c, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, + 0x12, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6c, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, + 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x11, 0x5a, 0x0f, 0x2e, 0x2f, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3367,7 +3476,7 @@ func file_marketplace_v1_marketplace_proto_rawDescGZIP() []byte { } var file_marketplace_v1_marketplace_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_marketplace_v1_marketplace_proto_msgTypes = make([]protoimpl.MessageInfo, 41) +var file_marketplace_v1_marketplace_proto_msgTypes = make([]protoimpl.MessageInfo, 43) var file_marketplace_v1_marketplace_proto_goTypes = []interface{}{ (Sort)(0), // 0: marketplace.v1.Sort (SortDirection)(0), // 1: marketplace.v1.SortDirection @@ -3413,6 +3522,8 @@ var file_marketplace_v1_marketplace_proto_goTypes = []interface{}{ (*SearchNamesResponse)(nil), // 41: marketplace.v1.SearchNamesResponse (*SearchCollectionsRequest)(nil), // 42: marketplace.v1.SearchCollectionsRequest (*SearchCollectionsResponse)(nil), // 43: marketplace.v1.SearchCollectionsResponse + (*OwnersByCollectionRequest)(nil), // 44: marketplace.v1.OwnersByCollectionRequest + (*OwnersByCollectionResponse)(nil), // 45: marketplace.v1.OwnersByCollectionResponse } var file_marketplace_v1_marketplace_proto_depIdxs = []int32{ 3, // 0: marketplace.v1.NFT.attributes:type_name -> marketplace.v1.Attribute @@ -3451,21 +3562,23 @@ var file_marketplace_v1_marketplace_proto_depIdxs = []int32{ 38, // 33: marketplace.v1.MarketplaceService.DAppsGroups:input_type -> marketplace.v1.DAppsGroupsRequest 40, // 34: marketplace.v1.MarketplaceService.SearchNames:input_type -> marketplace.v1.SearchNamesRequest 42, // 35: marketplace.v1.MarketplaceService.SearchCollections:input_type -> marketplace.v1.SearchCollectionsRequest - 18, // 36: marketplace.v1.MarketplaceService.Collections:output_type -> marketplace.v1.CollectionsResponse - 17, // 37: marketplace.v1.MarketplaceService.CollectionStats:output_type -> marketplace.v1.CollectionStatsResponse - 20, // 38: marketplace.v1.MarketplaceService.NFTs:output_type -> marketplace.v1.NFTsResponse - 10, // 39: marketplace.v1.MarketplaceService.NFTCollectionAttributes:output_type -> marketplace.v1.NFTCollectionAttributesResponse - 22, // 40: marketplace.v1.MarketplaceService.Quests:output_type -> marketplace.v1.QuestsResponse - 24, // 41: marketplace.v1.MarketplaceService.Activity:output_type -> marketplace.v1.ActivityResponse - 26, // 42: marketplace.v1.MarketplaceService.NFTPriceHistory:output_type -> marketplace.v1.NFTPriceHistoryResponse - 33, // 43: marketplace.v1.MarketplaceService.Banners:output_type -> marketplace.v1.BannersResponse - 35, // 44: marketplace.v1.MarketplaceService.News:output_type -> marketplace.v1.NewsResponse - 37, // 45: marketplace.v1.MarketplaceService.DApps:output_type -> marketplace.v1.DAppsResponse - 39, // 46: marketplace.v1.MarketplaceService.DAppsGroups:output_type -> marketplace.v1.DAppsGroupsResponse - 41, // 47: marketplace.v1.MarketplaceService.SearchNames:output_type -> marketplace.v1.SearchNamesResponse - 43, // 48: marketplace.v1.MarketplaceService.SearchCollections:output_type -> marketplace.v1.SearchCollectionsResponse - 36, // [36:49] is the sub-list for method output_type - 23, // [23:36] is the sub-list for method input_type + 44, // 36: marketplace.v1.MarketplaceService.OwnersByCollection:input_type -> marketplace.v1.OwnersByCollectionRequest + 18, // 37: marketplace.v1.MarketplaceService.Collections:output_type -> marketplace.v1.CollectionsResponse + 17, // 38: marketplace.v1.MarketplaceService.CollectionStats:output_type -> marketplace.v1.CollectionStatsResponse + 20, // 39: marketplace.v1.MarketplaceService.NFTs:output_type -> marketplace.v1.NFTsResponse + 10, // 40: marketplace.v1.MarketplaceService.NFTCollectionAttributes:output_type -> marketplace.v1.NFTCollectionAttributesResponse + 22, // 41: marketplace.v1.MarketplaceService.Quests:output_type -> marketplace.v1.QuestsResponse + 24, // 42: marketplace.v1.MarketplaceService.Activity:output_type -> marketplace.v1.ActivityResponse + 26, // 43: marketplace.v1.MarketplaceService.NFTPriceHistory:output_type -> marketplace.v1.NFTPriceHistoryResponse + 33, // 44: marketplace.v1.MarketplaceService.Banners:output_type -> marketplace.v1.BannersResponse + 35, // 45: marketplace.v1.MarketplaceService.News:output_type -> marketplace.v1.NewsResponse + 37, // 46: marketplace.v1.MarketplaceService.DApps:output_type -> marketplace.v1.DAppsResponse + 39, // 47: marketplace.v1.MarketplaceService.DAppsGroups:output_type -> marketplace.v1.DAppsGroupsResponse + 41, // 48: marketplace.v1.MarketplaceService.SearchNames:output_type -> marketplace.v1.SearchNamesResponse + 43, // 49: marketplace.v1.MarketplaceService.SearchCollections:output_type -> marketplace.v1.SearchCollectionsResponse + 45, // 50: marketplace.v1.MarketplaceService.OwnersByCollection:output_type -> marketplace.v1.OwnersByCollectionResponse + 37, // [37:51] is the sub-list for method output_type + 23, // [23:37] is the sub-list for method input_type 23, // [23:23] is the sub-list for extension type_name 23, // [23:23] is the sub-list for extension extendee 0, // [0:23] is the sub-list for field type_name @@ -3969,6 +4082,30 @@ func file_marketplace_v1_marketplace_proto_init() { return nil } } + file_marketplace_v1_marketplace_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OwnersByCollectionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_marketplace_v1_marketplace_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OwnersByCollectionResponse); 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{ @@ -3976,7 +4113,7 @@ func file_marketplace_v1_marketplace_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_marketplace_v1_marketplace_proto_rawDesc, NumEnums: 3, - NumMessages: 41, + NumMessages: 43, NumExtensions: 0, NumServices: 1, }, diff --git a/go/pkg/marketplacepb/marketplace_grpc.pb.go b/go/pkg/marketplacepb/marketplace_grpc.pb.go index c0714eed41..6445d2ccc5 100644 --- a/go/pkg/marketplacepb/marketplace_grpc.pb.go +++ b/go/pkg/marketplacepb/marketplace_grpc.pb.go @@ -35,6 +35,7 @@ type MarketplaceServiceClient interface { DAppsGroups(ctx context.Context, in *DAppsGroupsRequest, opts ...grpc.CallOption) (*DAppsGroupsResponse, error) SearchNames(ctx context.Context, in *SearchNamesRequest, opts ...grpc.CallOption) (*SearchNamesResponse, error) SearchCollections(ctx context.Context, in *SearchCollectionsRequest, opts ...grpc.CallOption) (*SearchCollectionsResponse, error) + OwnersByCollection(ctx context.Context, in *OwnersByCollectionRequest, opts ...grpc.CallOption) (*OwnersByCollectionResponse, error) } type marketplaceServiceClient struct { @@ -277,6 +278,15 @@ func (c *marketplaceServiceClient) SearchCollections(ctx context.Context, in *Se return out, nil } +func (c *marketplaceServiceClient) OwnersByCollection(ctx context.Context, in *OwnersByCollectionRequest, opts ...grpc.CallOption) (*OwnersByCollectionResponse, error) { + out := new(OwnersByCollectionResponse) + err := c.cc.Invoke(ctx, "/marketplace.v1.MarketplaceService/OwnersByCollection", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MarketplaceServiceServer is the server API for MarketplaceService service. // All implementations must embed UnimplementedMarketplaceServiceServer // for forward compatibility @@ -294,6 +304,7 @@ type MarketplaceServiceServer interface { DAppsGroups(context.Context, *DAppsGroupsRequest) (*DAppsGroupsResponse, error) SearchNames(context.Context, *SearchNamesRequest) (*SearchNamesResponse, error) SearchCollections(context.Context, *SearchCollectionsRequest) (*SearchCollectionsResponse, error) + OwnersByCollection(context.Context, *OwnersByCollectionRequest) (*OwnersByCollectionResponse, error) mustEmbedUnimplementedMarketplaceServiceServer() } @@ -340,6 +351,9 @@ func (UnimplementedMarketplaceServiceServer) SearchNames(context.Context, *Searc func (UnimplementedMarketplaceServiceServer) SearchCollections(context.Context, *SearchCollectionsRequest) (*SearchCollectionsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SearchCollections not implemented") } +func (UnimplementedMarketplaceServiceServer) OwnersByCollection(context.Context, *OwnersByCollectionRequest) (*OwnersByCollectionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OwnersByCollection not implemented") +} func (UnimplementedMarketplaceServiceServer) mustEmbedUnimplementedMarketplaceServiceServer() {} // UnsafeMarketplaceServiceServer may be embedded to opt out of forward compatibility for this service. @@ -602,6 +616,24 @@ func _MarketplaceService_SearchCollections_Handler(srv interface{}, ctx context. return interceptor(ctx, in, info, handler) } +func _MarketplaceService_OwnersByCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OwnersByCollectionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MarketplaceServiceServer).OwnersByCollection(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/marketplace.v1.MarketplaceService/OwnersByCollection", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MarketplaceServiceServer).OwnersByCollection(ctx, req.(*OwnersByCollectionRequest)) + } + return interceptor(ctx, in, info, handler) +} + // MarketplaceService_ServiceDesc is the grpc.ServiceDesc for MarketplaceService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -641,6 +673,10 @@ var MarketplaceService_ServiceDesc = grpc.ServiceDesc{ MethodName: "SearchCollections", Handler: _MarketplaceService_SearchCollections_Handler, }, + { + MethodName: "OwnersByCollection", + Handler: _MarketplaceService_OwnersByCollection_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/packages/api/marketplace/v1/marketplace.ts b/packages/api/marketplace/v1/marketplace.ts index 893a7e3811..dfdf34f482 100644 --- a/packages/api/marketplace/v1/marketplace.ts +++ b/packages/api/marketplace/v1/marketplace.ts @@ -409,6 +409,14 @@ export interface SearchCollectionsResponse { collections: Collection[]; } +export interface OwnersByCollectionRequest { + collectionId: string; +} + +export interface OwnersByCollectionResponse { + owners: string[]; +} + function createBaseAttribute(): Attribute { return { traitType: "", value: "" }; } @@ -3438,6 +3446,104 @@ export const SearchCollectionsResponse = { }, }; +function createBaseOwnersByCollectionRequest(): OwnersByCollectionRequest { + return { collectionId: "" }; +} + +export const OwnersByCollectionRequest = { + encode(message: OwnersByCollectionRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.collectionId !== "") { + writer.uint32(10).string(message.collectionId); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): OwnersByCollectionRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseOwnersByCollectionRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.collectionId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): OwnersByCollectionRequest { + return { collectionId: isSet(object.collectionId) ? String(object.collectionId) : "" }; + }, + + toJSON(message: OwnersByCollectionRequest): unknown { + const obj: any = {}; + message.collectionId !== undefined && (obj.collectionId = message.collectionId); + return obj; + }, + + fromPartial, I>>(object: I): OwnersByCollectionRequest { + const message = createBaseOwnersByCollectionRequest(); + message.collectionId = object.collectionId ?? ""; + return message; + }, +}; + +function createBaseOwnersByCollectionResponse(): OwnersByCollectionResponse { + return { owners: [] }; +} + +export const OwnersByCollectionResponse = { + encode(message: OwnersByCollectionResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.owners) { + writer.uint32(10).string(v!); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): OwnersByCollectionResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseOwnersByCollectionResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.owners.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): OwnersByCollectionResponse { + return { owners: Array.isArray(object?.owners) ? object.owners.map((e: any) => String(e)) : [] }; + }, + + toJSON(message: OwnersByCollectionResponse): unknown { + const obj: any = {}; + if (message.owners) { + obj.owners = message.owners.map((e) => e); + } else { + obj.owners = []; + } + return obj; + }, + + fromPartial, I>>(object: I): OwnersByCollectionResponse { + const message = createBaseOwnersByCollectionResponse(); + message.owners = object.owners?.map((e) => e) || []; + return message; + }, +}; + export interface MarketplaceService { Collections(request: DeepPartial, metadata?: grpc.Metadata): Observable; CollectionStats( @@ -3464,6 +3570,10 @@ export interface MarketplaceService { request: DeepPartial, metadata?: grpc.Metadata, ): Promise; + OwnersByCollection( + request: DeepPartial, + metadata?: grpc.Metadata, + ): Promise; } export class MarketplaceServiceClientImpl implements MarketplaceService { @@ -3484,6 +3594,7 @@ export class MarketplaceServiceClientImpl implements MarketplaceService { this.DAppsGroups = this.DAppsGroups.bind(this); this.SearchNames = this.SearchNames.bind(this); this.SearchCollections = this.SearchCollections.bind(this); + this.OwnersByCollection = this.OwnersByCollection.bind(this); } Collections(request: DeepPartial, metadata?: grpc.Metadata): Observable { @@ -3557,6 +3668,17 @@ export class MarketplaceServiceClientImpl implements MarketplaceService { metadata, ); } + + OwnersByCollection( + request: DeepPartial, + metadata?: grpc.Metadata, + ): Promise { + return this.rpc.unary( + MarketplaceServiceOwnersByCollectionDesc, + OwnersByCollectionRequest.fromPartial(request), + metadata, + ); + } } export const MarketplaceServiceDesc = { serviceName: "marketplace.v1.MarketplaceService" }; @@ -3847,6 +3969,28 @@ export const MarketplaceServiceSearchCollectionsDesc: UnaryMethodDefinitionish = } as any, }; +export const MarketplaceServiceOwnersByCollectionDesc: UnaryMethodDefinitionish = { + methodName: "OwnersByCollection", + service: MarketplaceServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return OwnersByCollectionRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...OwnersByCollectionResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; + interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; diff --git a/packages/screens/Organizations/OrganizationsScreen.tsx b/packages/screens/Organizations/OrganizationsScreen.tsx index 8f70d028d3..108e452cb5 100644 --- a/packages/screens/Organizations/OrganizationsScreen.tsx +++ b/packages/screens/Organizations/OrganizationsScreen.tsx @@ -1,3 +1,4 @@ +import { useQuery } from "@tanstack/react-query"; import React from "react"; import { ScrollView, View } from "react-native"; @@ -10,6 +11,7 @@ import { SpacerColumn } from "../../components/spacer"; import { useForceNetworkSelection } from "../../hooks/useForceNetworkSelection"; import { useSelectedNetworkId } from "../../hooks/useSelectedNetwork"; import { NetworkFeature } from "../../networks"; +import { getMarketplaceClient } from "../../utils/backend"; import { ScreenFC, useAppNavigation } from "../../utils/navigation"; import { fontSemibold28 } from "../../utils/style/fonts"; import { layout } from "../../utils/style/layout"; @@ -21,6 +23,34 @@ export const OrganizationsScreen: ScreenFC<"Organizations"> = ({ const navigation = useAppNavigation(); const networkId = useSelectedNetworkId(); + // Example: delete me + + const collectionId = + "testori-tori163ecgwxteef30jycmvrhherumyspqvc0fnq6xuuh7npjdvc48nqqp8j0ke"; + + const { data: owners = [] } = useQuery( + ["OwnersByCollection", networkId, collectionId], + async () => { + if (!networkId || !collectionId) { + return []; + } + const client = getMarketplaceClient(networkId); + if (!client) { + return []; + } + const reply = await client.OwnersByCollection({ + collectionId, + }); + return reply.owners; + }, + { + staleTime: Infinity, + } + ); + + console.log(owners); + + // END Example: delete me return ( DAO List}