diff --git a/internal/delegate/filters.go b/internal/delegate/filters.go index ef64e99..a9d5261 100644 --- a/internal/delegate/filters.go +++ b/internal/delegate/filters.go @@ -22,12 +22,26 @@ func (f DelegatorFilter) Apply(db *gorm.DB) *gorm.DB { return db.Where("lower(address_from) = lower(?)", f.Address) } -// DelegationFilter Whom delegate voting power -type DelegationFilter struct { +// DaoFilter Who delegate voting power +type DaoFilter struct { + ID string +} + +func (f DaoFilter) Apply(db *gorm.DB) *gorm.DB { + var ( + dummy = Summary{} + _ = dummy.DaoID + ) + + return db.Where("dao_id = ?", f.ID) +} + +// DelegateFilter Whom delegate voting power +type DelegateFilter struct { Address string } -func (f DelegationFilter) Apply(db *gorm.DB) *gorm.DB { +func (f DelegateFilter) Apply(db *gorm.DB) *gorm.DB { var ( dummy = Summary{} _ = dummy.AddressTo @@ -35,3 +49,26 @@ func (f DelegationFilter) Apply(db *gorm.DB) *gorm.DB { return db.Where("lower(address_to) = lower(?)", f.Address) } + +type PageFilter struct { + Offset int + Limit int +} + +func (f PageFilter) Apply(db *gorm.DB) *gorm.DB { + return db.Offset(f.Offset).Limit(f.Limit) +} + +type OrderByAddressToFilter struct { +} + +func (f OrderByAddressToFilter) Apply(db *gorm.DB) *gorm.DB { + return db.Order("address_to") +} + +type OrderByAddressFromFilter struct { +} + +func (f OrderByAddressFromFilter) Apply(db *gorm.DB) *gorm.DB { + return db.Order("address_from") +} diff --git a/internal/delegate/models.go b/internal/delegate/models.go index 8698025..ca954c0 100644 --- a/internal/delegate/models.go +++ b/internal/delegate/models.go @@ -88,6 +88,9 @@ type Summary struct { LastBlockTimestamp int ExpiresAt int64 CreatedAt time.Time + + // virtual property + MaxCnt int `gorm:"-"` } func (Summary) TableName() string { diff --git a/internal/delegate/repo.go b/internal/delegate/repo.go index 96e29ec..53db157 100644 --- a/internal/delegate/repo.go +++ b/internal/delegate/repo.go @@ -168,7 +168,105 @@ func (r *Repo) FindDelegatorsByVotes(votes []Vote) ([]summaryByVote, error) { return result, nil } -func (r *Repo) GetByFilters(filters []Filter) ([]Summary, error) { +// fixme: check it +func (r *Repo) GetTopDelegatorsByAddress(address string, limit int) ([]Summary, error) { + rows, err := r.db. + Raw(` + SELECT + dao_id, + address_from, + weight, + expires_at, + max_cnt + FROM (SELECT + dao_id, + address_from, + weight, + expires_at, + ROW_NUMBER() OVER (PARTITION BY dao_id) row_number, + count(*) over (partition by dao_id) max_cnt + FROM delegates_summary + WHERE lower(address_to) = lower(?) ) dataset + WHERE dataset.row_number <= ? + `, + address, + limit, + ). + Rows() + if err != nil { + return nil, fmt.Errorf("raw exec: %w", err) + } + + result := make([]Summary, 0, limit*10) + defer rows.Close() + for rows.Next() { + si := Summary{AddressTo: address} + if err = rows.Scan( + &si.DaoID, + &si.AddressFrom, + &si.Weight, + &si.ExpiresAt, + &si.MaxCnt, + ); err != nil { + return nil, fmt.Errorf("scan: %w", err) + } + + result = append(result, si) + } + + return result, nil +} + +// fixme: check it +func (r *Repo) GetTopDelegatesByAddress(address string, limit int) ([]Summary, error) { + rows, err := r.db. + Raw(` + SELECT + dao_id, + address_to, + weight, + expires_at, + max_cnt + FROM (SELECT + dao_id, + address_to, + weight, + expires_at, + ROW_NUMBER() OVER (PARTITION BY dao_id) row_number, + count(*) over (partition by dao_id) max_cnt + FROM delegates_summary + WHERE lower(address_from) = lower(?) ) dataset + WHERE dataset.row_number <= ? + `, + address, + limit, + ). + Rows() + if err != nil { + return nil, fmt.Errorf("raw exec: %w", err) + } + + result := make([]Summary, 0, limit*10) + defer rows.Close() + for rows.Next() { + si := Summary{AddressFrom: address} + if err = rows.Scan( + &si.DaoID, + &si.AddressTo, + &si.Weight, + &si.ExpiresAt, + &si.MaxCnt, + ); err != nil { + return nil, fmt.Errorf("scan: %w", err) + } + + result = append(result, si) + } + + return result, nil +} + +func (r *Repo) GetByFilters(filters ...Filter) ([]Summary, error) { db := r.db.Model(&Summary{}) for _, f := range filters { db = f.Apply(db) @@ -182,7 +280,7 @@ func (r *Repo) GetByFilters(filters []Filter) ([]Summary, error) { return list, nil } -func (r *Repo) GetCnt(filters []Filter) (int64, error) { +func (r *Repo) GetCnt(filters ...Filter) (int64, error) { db := r.db.Model(&Summary{}) for _, f := range filters { db = f.Apply(db) diff --git a/internal/delegate/server.go b/internal/delegate/server.go index ad8b817..1815cd5 100644 --- a/internal/delegate/server.go +++ b/internal/delegate/server.go @@ -134,19 +134,19 @@ func (s *Server) GetDelegateProfile(ctx context.Context, req *storagepb.GetDeleg }, nil } -func (s *Server) GetAllDelegations(ctx context.Context, req *storagepb.GetAllDelegationsRequest) (*storagepb.GetAllDelegationsResponse, error) { +func (s *Server) GetTopDelegates(ctx context.Context, req *storagepb.GetTopDelegatesRequest) (*storagepb.GetTopDelegatesResponse, error) { if req.GetAddress() == "" { return nil, status.Error(codes.InvalidArgument, "invalid address") } // delegations [dao_id: [summary, ...]] - delegations, err := s.sp.getAllDelegations(ctx, req.GetAddress()) + delegations, err := s.sp.getTopDelegates(ctx, req.GetAddress()) if err != nil { return nil, status.Error(codes.Internal, "failed to get delegations") } if len(delegations) == 0 { - return &storagepb.GetAllDelegationsResponse{}, nil + return &storagepb.GetTopDelegatesResponse{}, nil } daoIDs := slices.Collect(maps.Keys(delegations)) @@ -168,8 +168,8 @@ func (s *Server) GetAllDelegations(ctx context.Context, req *storagepb.GetAllDel return nil, status.Error(codes.Internal, "failed to resolve ens names") } - response := &storagepb.GetAllDelegationsResponse{ - Delegations: make([]*storagepb.DelegationSummary, 0, len(delegations)), + response := &storagepb.GetTopDelegatesResponse{ + List: make([]*storagepb.DelegatesSummary, 0, len(delegations)), } delegationsCnt := 0 @@ -181,6 +181,7 @@ func (s *Server) GetAllDelegations(ctx context.Context, req *storagepb.GetAllDel } delegationsCnt += len(list) + var delegatesInDao int32 = 0 dl := make([]*storagepb.DelegationDetails, 0, len(list)) for _, d := range list { var expires *timestamppb.Timestamp @@ -195,31 +196,35 @@ func (s *Server) GetAllDelegations(ctx context.Context, req *storagepb.GetAllDel Expiration: expires, }) } + if len(list) > 0 { + delegatesInDao += int32(list[0].MaxCnt) + } - response.Delegations = append(response.Delegations, &storagepb.DelegationSummary{ - Dao: dao.ConvertDaoToAPI(&di), - Delegations: dl, + response.List = append(response.List, &storagepb.DelegatesSummary{ + Dao: dao.ConvertDaoToAPI(&di), + Delegates: dl, + TotalCount: delegatesInDao, }) } - response.TotalDelegationsCount = int32(delegationsCnt) + response.TotalDelegatesCount = int32(delegationsCnt) return response, nil } -func (s *Server) GetAllDelegators(ctx context.Context, req *storagepb.GetAllDelegatorsRequest) (*storagepb.GetAllDelegatorsResponse, error) { +func (s *Server) GetTopDelegators(ctx context.Context, req *storagepb.GetTopDelegatorsRequest) (*storagepb.GetTopDelegatorsResponse, error) { if req.GetAddress() == "" { return nil, status.Error(codes.InvalidArgument, "invalid address") } // delegators [dao_id: [summary, ...]] - delegators, err := s.sp.getAllDelegators(ctx, req.GetAddress()) + delegators, err := s.sp.getTopDelegators(ctx, req.GetAddress()) if err != nil { return nil, status.Error(codes.Internal, "failed to get delegators") } if len(delegators) == 0 { - return &storagepb.GetAllDelegatorsResponse{}, nil + return &storagepb.GetTopDelegatorsResponse{}, nil } daoIDs := slices.Collect(maps.Keys(delegators)) @@ -241,8 +246,8 @@ func (s *Server) GetAllDelegators(ctx context.Context, req *storagepb.GetAllDele return nil, status.Error(codes.Internal, "failed to resolve ens names") } - response := &storagepb.GetAllDelegatorsResponse{ - Delegators: make([]*storagepb.DelegatorSummary, 0, len(delegators)), + response := &storagepb.GetTopDelegatorsResponse{ + List: make([]*storagepb.DelegatorSummary, 0, len(delegators)), } delegatorsCnt := 0 @@ -254,6 +259,7 @@ func (s *Server) GetAllDelegators(ctx context.Context, req *storagepb.GetAllDele } delegatorsCnt += len(list) + var delegatorsInDao int32 = 0 dl := make([]*storagepb.DelegationDetails, 0, len(list)) for _, d := range list { var expires *timestamppb.Timestamp @@ -268,10 +274,14 @@ func (s *Server) GetAllDelegators(ctx context.Context, req *storagepb.GetAllDele Expiration: expires, }) } + if len(list) > 0 { + delegatorsInDao = int32(list[0].MaxCnt) + } - response.Delegators = append(response.Delegators, &storagepb.DelegatorSummary{ + response.List = append(response.List, &storagepb.DelegatorSummary{ Dao: dao.ConvertDaoToAPI(&di), Delegators: dl, + TotalCount: delegatorsInDao, }) } @@ -280,7 +290,7 @@ func (s *Server) GetAllDelegators(ctx context.Context, req *storagepb.GetAllDele return response, nil } -func (s *Server) GetDelegatesSummary(ctx context.Context, req *storagepb.GetDelegatesSummaryRequest) (*storagepb.GetDelegatesSummaryResponse, error) { +func (s *Server) GetDelegationSummary(ctx context.Context, req *storagepb.GetDelegationSummaryRequest) (*storagepb.GetDelegationSummaryResponse, error) { if req.GetAddress() == "" { return nil, status.Error(codes.InvalidArgument, "invalid address") } @@ -290,13 +300,135 @@ func (s *Server) GetDelegatesSummary(ctx context.Context, req *storagepb.GetDele return nil, status.Error(codes.Internal, "failed to get delegators") } - delegationsCnt, err := s.sp.getDelegationsCnt(ctx, req.GetAddress()) + delegationsCnt, err := s.sp.getDelegatesCnt(ctx, req.GetAddress()) if err != nil { return nil, status.Error(codes.Internal, "failed to get delegators") } - return &storagepb.GetDelegatesSummaryResponse{ - TotalDelegatorsCount: delegatorsCnt, - TotalDelegationsCount: delegationsCnt, + return &storagepb.GetDelegationSummaryResponse{ + TotalDelegatorsCount: delegatorsCnt, + TotalDelegatesCount: delegationsCnt, + }, nil +} + +func (s *Server) GetDelegatesByDao(_ context.Context, req *storagepb.GetDelegatesByDaoRequest) (*storagepb.GetDelegatesByDaoResponse, error) { + if req.GetAddress() == "" { + return nil, status.Error(codes.InvalidArgument, "invalid address") + } + + filters := []Filter{ + DelegatorFilter{Address: req.GetAddress()}, + DaoFilter{ID: req.GetDaoId()}, + } + + cnt, err := s.sp.GetCntByFilters(filters...) + if err != nil { + return nil, status.Error(codes.Internal, "failed to get cnt by filters") + } + + if cnt == 0 { + return &storagepb.GetDelegatesByDaoResponse{}, nil + } + + filters = append(filters, + PageFilter{ + Limit: int(req.GetLimit()), + Offset: int(req.GetOffset()), + }, + OrderByAddressToFilter{}, + ) + list, err := s.sp.GetByFilters(filters...) + if err != nil { + return nil, status.Error(codes.Internal, "failed to get list by filters") + } + + addresses := make([]string, 0, len(list)) + for _, d := range list { + addresses = append(addresses, d.AddressTo) + } + ensNames, err := s.sp.resolveAddressesName(addresses) + if err != nil { + return nil, status.Error(codes.Internal, "failed to resolve ens names") + } + + converted := make([]*storagepb.DelegationDetails, 0, len(list)) + for _, d := range list { + var expires *timestamppb.Timestamp + if d.ExpiresAt != 0 { + expires = timestamppb.New(time.Unix(d.ExpiresAt, 0)) + } + + converted = append(converted, &storagepb.DelegationDetails{ + Address: d.AddressTo, + EnsName: ensNames[d.AddressTo], + PercentOfDelegators: int32(d.Weight), + Expiration: expires, + }) + } + + return &storagepb.GetDelegatesByDaoResponse{ + Delegates: converted, + TotalCount: int32(cnt), + }, nil +} + +func (s *Server) GetDelegatorsByDao(_ context.Context, req *storagepb.GetDelegatorsByDaoRequest) (*storagepb.GetDelegatorsByDaoResponse, error) { + if req.GetAddress() == "" { + return nil, status.Error(codes.InvalidArgument, "invalid address") + } + + filters := []Filter{ + DelegateFilter{Address: req.GetAddress()}, + DaoFilter{ID: req.GetDaoId()}, + } + + cnt, err := s.sp.GetCntByFilters(filters...) + if err != nil { + return nil, status.Error(codes.Internal, "failed to get cnt by filters") + } + + if cnt == 0 { + return &storagepb.GetDelegatorsByDaoResponse{}, nil + } + + filters = append(filters, + PageFilter{ + Limit: int(req.GetLimit()), + Offset: int(req.GetOffset()), + }, + OrderByAddressToFilter{}, + ) + list, err := s.sp.GetByFilters(filters...) + if err != nil { + return nil, status.Error(codes.Internal, "failed to get list by filters") + } + + addresses := make([]string, 0, len(list)) + for _, d := range list { + addresses = append(addresses, d.AddressFrom) + } + ensNames, err := s.sp.resolveAddressesName(addresses) + if err != nil { + return nil, status.Error(codes.Internal, "failed to resolve ens names") + } + + converted := make([]*storagepb.DelegationDetails, 0, len(list)) + for _, d := range list { + var expires *timestamppb.Timestamp + if d.ExpiresAt != 0 { + expires = timestamppb.New(time.Unix(d.ExpiresAt, 0)) + } + + converted = append(converted, &storagepb.DelegationDetails{ + Address: d.AddressFrom, + EnsName: ensNames[d.AddressFrom], + PercentOfDelegators: int32(d.Weight), + Expiration: expires, + }) + } + + return &storagepb.GetDelegatorsByDaoResponse{ + Delegators: converted, + TotalCount: int32(cnt), }, nil } diff --git a/internal/delegate/service.go b/internal/delegate/service.go index 30cee0b..a8d5443 100644 --- a/internal/delegate/service.go +++ b/internal/delegate/service.go @@ -408,17 +408,18 @@ func (s *Service) handleVotesCreated(ctx context.Context, batch []Vote) error { return nil } -// getAllDelegations returns list of delegations grouped by dao -func (s *Service) getAllDelegations(_ context.Context, address string) (map[string][]Summary, error) { - list, err := s.repo.GetByFilters([]Filter{DelegatorFilter{Address: address}}) +// getTopDelegates returns list of delegations grouped by dao +func (s *Service) getTopDelegates(_ context.Context, address string) (map[string][]Summary, error) { + limitPerDao := 5 + list, err := s.repo.GetTopDelegatesByAddress(address, limitPerDao) if err != nil { - return nil, fmt.Errorf("repo.GetByFilters: %w", err) + return nil, fmt.Errorf("repo.GetTopDelegatesByAddress: %w", err) } result := make(map[string][]Summary, len(list)) for _, info := range list { if _, ok := result[info.DaoID]; !ok { - result[info.DaoID] = make([]Summary, 0, len(list)) + result[info.DaoID] = make([]Summary, 0, limitPerDao) } result[info.DaoID] = append(result[info.DaoID], info) @@ -427,17 +428,18 @@ func (s *Service) getAllDelegations(_ context.Context, address string) (map[stri return result, nil } -// getAllDelegators returns list of delegators grouped by dao -func (s *Service) getAllDelegators(_ context.Context, address string) (map[string][]Summary, error) { - list, err := s.repo.GetByFilters([]Filter{DelegationFilter{Address: address}}) +// getTopDelegators returns list of first 5 delegators grouped by dao +func (s *Service) getTopDelegators(_ context.Context, address string) (map[string][]Summary, error) { + limitPerDao := 5 + list, err := s.repo.GetTopDelegatorsByAddress(address, limitPerDao) if err != nil { - return nil, fmt.Errorf("repo.GetByFilters: %w", err) + return nil, fmt.Errorf("repo.GetTopDelegatorsByAddress: %w", err) } result := make(map[string][]Summary, len(list)) for _, info := range list { if _, ok := result[info.DaoID]; !ok { - result[info.DaoID] = make([]Summary, 0, len(list)) + result[info.DaoID] = make([]Summary, 0, limitPerDao) } result[info.DaoID] = append(result[info.DaoID], info) @@ -446,9 +448,9 @@ func (s *Service) getAllDelegators(_ context.Context, address string) (map[strin return result, nil } -// getAllDelegators returns count of delegators based on address +// getDelegatorsCnt returns count of delegators based on address func (s *Service) getDelegatorsCnt(_ context.Context, address string) (int32, error) { - cnt, err := s.repo.GetCnt([]Filter{DelegationFilter{Address: address}}) + cnt, err := s.repo.GetCnt(DelegateFilter{Address: address}) if err != nil { return 0, fmt.Errorf("repo.GetByFilters: %w", err) } @@ -456,12 +458,20 @@ func (s *Service) getDelegatorsCnt(_ context.Context, address string) (int32, er return int32(cnt), nil } -// getAllDelegators returns count of delegations based on address -func (s *Service) getDelegationsCnt(_ context.Context, address string) (int32, error) { - cnt, err := s.repo.GetCnt([]Filter{DelegatorFilter{Address: address}}) +// getDelegatesCnt returns count of delegations based on address +func (s *Service) getDelegatesCnt(_ context.Context, address string) (int32, error) { + cnt, err := s.repo.GetCnt(DelegatorFilter{Address: address}) if err != nil { return 0, fmt.Errorf("repo.GetByFilters: %w", err) } return int32(cnt), nil } + +func (s *Service) GetByFilters(filters ...Filter) ([]Summary, error) { + return s.repo.GetByFilters(filters...) +} + +func (s *Service) GetCntByFilters(filters ...Filter) (int64, error) { + return s.repo.GetCnt(filters...) +} diff --git a/internal/ensresolver/service.go b/internal/ensresolver/service.go index b3eee9f..d9c393c 100644 --- a/internal/ensresolver/service.go +++ b/internal/ensresolver/service.go @@ -141,6 +141,10 @@ func (s *Service) AddRequests(list []string) { } func (s *Service) GetByAddresses(addresses []string) ([]EnsName, error) { + if len(addresses) == 0 { + return nil, nil + } + return s.repo.GetByAddresses(addresses) } diff --git a/protocol/storagepb/base.pb.go b/protocol/storagepb/base.pb.go index 8201fff..72bc998 100644 --- a/protocol/storagepb/base.pb.go +++ b/protocol/storagepb/base.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.1 -// protoc v5.28.2 +// protoc v5.28.3 // source: storagepb/base.proto package storagepb diff --git a/protocol/storagepb/dao.pb.go b/protocol/storagepb/dao.pb.go index d0fdc44..80feb10 100644 --- a/protocol/storagepb/dao.pb.go +++ b/protocol/storagepb/dao.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.1 -// protoc v5.28.2 +// protoc v5.28.3 // source: storagepb/dao.proto package storagepb diff --git a/protocol/storagepb/dao_grpc.pb.go b/protocol/storagepb/dao_grpc.pb.go index 14801d5..8c16505 100644 --- a/protocol/storagepb/dao_grpc.pb.go +++ b/protocol/storagepb/dao_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.28.2 +// - protoc v5.28.3 // source: storagepb/dao.proto package storagepb diff --git a/protocol/storagepb/delegate.pb.go b/protocol/storagepb/delegate.pb.go index 04a3c0c..1c84c50 100644 --- a/protocol/storagepb/delegate.pb.go +++ b/protocol/storagepb/delegate.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.1 -// protoc v5.28.2 +// protoc v5.28.3 // source: storagepb/delegate.proto package storagepb @@ -491,7 +491,7 @@ func (x *ProfileDelegateItem) GetDelegatedPower() float64 { return 0 } -type GetAllDelegationsRequest struct { +type GetTopDelegatesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -500,20 +500,20 @@ type GetAllDelegationsRequest struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` } -func (x *GetAllDelegationsRequest) Reset() { - *x = GetAllDelegationsRequest{} +func (x *GetTopDelegatesRequest) Reset() { + *x = GetTopDelegatesRequest{} mi := &file_storagepb_delegate_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetAllDelegationsRequest) String() string { +func (x *GetTopDelegatesRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetAllDelegationsRequest) ProtoMessage() {} +func (*GetTopDelegatesRequest) ProtoMessage() {} -func (x *GetAllDelegationsRequest) ProtoReflect() protoreflect.Message { +func (x *GetTopDelegatesRequest) ProtoReflect() protoreflect.Message { mi := &file_storagepb_delegate_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -525,12 +525,12 @@ func (x *GetAllDelegationsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetAllDelegationsRequest.ProtoReflect.Descriptor instead. -func (*GetAllDelegationsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetTopDelegatesRequest.ProtoReflect.Descriptor instead. +func (*GetTopDelegatesRequest) Descriptor() ([]byte, []int) { return file_storagepb_delegate_proto_rawDescGZIP(), []int{6} } -func (x *GetAllDelegationsRequest) GetAddress() string { +func (x *GetTopDelegatesRequest) GetAddress() string { if x != nil { return x.Address } @@ -610,31 +610,33 @@ func (x *DelegationDetails) GetExpiration() *timestamppb.Timestamp { return nil } -type DelegationSummary struct { +type DelegatesSummary struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Dao details Dao *DaoInfo `protobuf:"bytes,1,opt,name=dao,proto3" json:"dao,omitempty"` - // List of delegations - Delegations []*DelegationDetails `protobuf:"bytes,2,rep,name=delegations,proto3" json:"delegations,omitempty"` + // List of delegates + Delegates []*DelegationDetails `protobuf:"bytes,2,rep,name=delegates,proto3" json:"delegates,omitempty"` + // number of delegations in this DAO + TotalCount int32 `protobuf:"varint,3,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` } -func (x *DelegationSummary) Reset() { - *x = DelegationSummary{} +func (x *DelegatesSummary) Reset() { + *x = DelegatesSummary{} mi := &file_storagepb_delegate_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *DelegationSummary) String() string { +func (x *DelegatesSummary) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DelegationSummary) ProtoMessage() {} +func (*DelegatesSummary) ProtoMessage() {} -func (x *DelegationSummary) ProtoReflect() protoreflect.Message { +func (x *DelegatesSummary) ProtoReflect() protoreflect.Message { mi := &file_storagepb_delegate_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -646,50 +648,57 @@ func (x *DelegationSummary) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DelegationSummary.ProtoReflect.Descriptor instead. -func (*DelegationSummary) Descriptor() ([]byte, []int) { +// Deprecated: Use DelegatesSummary.ProtoReflect.Descriptor instead. +func (*DelegatesSummary) Descriptor() ([]byte, []int) { return file_storagepb_delegate_proto_rawDescGZIP(), []int{8} } -func (x *DelegationSummary) GetDao() *DaoInfo { +func (x *DelegatesSummary) GetDao() *DaoInfo { if x != nil { return x.Dao } return nil } -func (x *DelegationSummary) GetDelegations() []*DelegationDetails { +func (x *DelegatesSummary) GetDelegates() []*DelegationDetails { if x != nil { - return x.Delegations + return x.Delegates } return nil } -type GetAllDelegationsResponse struct { +func (x *DelegatesSummary) GetTotalCount() int32 { + if x != nil { + return x.TotalCount + } + return 0 +} + +type GetTopDelegatesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // The number of total delegations in our DB - TotalDelegationsCount int32 `protobuf:"varint,1,opt,name=total_delegations_count,json=totalDelegationsCount,proto3" json:"total_delegations_count,omitempty"` - // List of delegations grouped by dao and sorted by popularity index - Delegations []*DelegationSummary `protobuf:"bytes,2,rep,name=delegations,proto3" json:"delegations,omitempty"` + TotalDelegatesCount int32 `protobuf:"varint,1,opt,name=total_delegates_count,json=totalDelegatesCount,proto3" json:"total_delegates_count,omitempty"` + // List of delegates grouped by dao and sorted by popularity index + List []*DelegatesSummary `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"` } -func (x *GetAllDelegationsResponse) Reset() { - *x = GetAllDelegationsResponse{} +func (x *GetTopDelegatesResponse) Reset() { + *x = GetTopDelegatesResponse{} mi := &file_storagepb_delegate_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetAllDelegationsResponse) String() string { +func (x *GetTopDelegatesResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetAllDelegationsResponse) ProtoMessage() {} +func (*GetTopDelegatesResponse) ProtoMessage() {} -func (x *GetAllDelegationsResponse) ProtoReflect() protoreflect.Message { +func (x *GetTopDelegatesResponse) ProtoReflect() protoreflect.Message { mi := &file_storagepb_delegate_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -701,26 +710,26 @@ func (x *GetAllDelegationsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetAllDelegationsResponse.ProtoReflect.Descriptor instead. -func (*GetAllDelegationsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetTopDelegatesResponse.ProtoReflect.Descriptor instead. +func (*GetTopDelegatesResponse) Descriptor() ([]byte, []int) { return file_storagepb_delegate_proto_rawDescGZIP(), []int{9} } -func (x *GetAllDelegationsResponse) GetTotalDelegationsCount() int32 { +func (x *GetTopDelegatesResponse) GetTotalDelegatesCount() int32 { if x != nil { - return x.TotalDelegationsCount + return x.TotalDelegatesCount } return 0 } -func (x *GetAllDelegationsResponse) GetDelegations() []*DelegationSummary { +func (x *GetTopDelegatesResponse) GetList() []*DelegatesSummary { if x != nil { - return x.Delegations + return x.List } return nil } -type GetAllDelegatorsRequest struct { +type GetTopDelegatorsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -729,20 +738,20 @@ type GetAllDelegatorsRequest struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` } -func (x *GetAllDelegatorsRequest) Reset() { - *x = GetAllDelegatorsRequest{} +func (x *GetTopDelegatorsRequest) Reset() { + *x = GetTopDelegatorsRequest{} mi := &file_storagepb_delegate_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetAllDelegatorsRequest) String() string { +func (x *GetTopDelegatorsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetAllDelegatorsRequest) ProtoMessage() {} +func (*GetTopDelegatorsRequest) ProtoMessage() {} -func (x *GetAllDelegatorsRequest) ProtoReflect() protoreflect.Message { +func (x *GetTopDelegatorsRequest) ProtoReflect() protoreflect.Message { mi := &file_storagepb_delegate_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -754,12 +763,12 @@ func (x *GetAllDelegatorsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetAllDelegatorsRequest.ProtoReflect.Descriptor instead. -func (*GetAllDelegatorsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetTopDelegatorsRequest.ProtoReflect.Descriptor instead. +func (*GetTopDelegatorsRequest) Descriptor() ([]byte, []int) { return file_storagepb_delegate_proto_rawDescGZIP(), []int{10} } -func (x *GetAllDelegatorsRequest) GetAddress() string { +func (x *GetTopDelegatorsRequest) GetAddress() string { if x != nil { return x.Address } @@ -775,6 +784,8 @@ type DelegatorSummary struct { Dao *DaoInfo `protobuf:"bytes,1,opt,name=dao,proto3" json:"dao,omitempty"` // List of delegators Delegators []*DelegationDetails `protobuf:"bytes,2,rep,name=delegators,proto3" json:"delegators,omitempty"` + // number of delegators in this DAO + TotalCount int32 `protobuf:"varint,3,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` } func (x *DelegatorSummary) Reset() { @@ -821,7 +832,14 @@ func (x *DelegatorSummary) GetDelegators() []*DelegationDetails { return nil } -type GetAllDelegatorsResponse struct { +func (x *DelegatorSummary) GetTotalCount() int32 { + if x != nil { + return x.TotalCount + } + return 0 +} + +type GetTopDelegatorsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -829,23 +847,23 @@ type GetAllDelegatorsResponse struct { // The number of total delegators in our DB TotalDelegatorsCount int32 `protobuf:"varint,1,opt,name=total_delegators_count,json=totalDelegatorsCount,proto3" json:"total_delegators_count,omitempty"` // List of delegators grouped by dao and sorted by popularity index - Delegators []*DelegatorSummary `protobuf:"bytes,2,rep,name=delegators,proto3" json:"delegators,omitempty"` + List []*DelegatorSummary `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"` } -func (x *GetAllDelegatorsResponse) Reset() { - *x = GetAllDelegatorsResponse{} +func (x *GetTopDelegatorsResponse) Reset() { + *x = GetTopDelegatorsResponse{} mi := &file_storagepb_delegate_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetAllDelegatorsResponse) String() string { +func (x *GetTopDelegatorsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetAllDelegatorsResponse) ProtoMessage() {} +func (*GetTopDelegatorsResponse) ProtoMessage() {} -func (x *GetAllDelegatorsResponse) ProtoReflect() protoreflect.Message { +func (x *GetTopDelegatorsResponse) ProtoReflect() protoreflect.Message { mi := &file_storagepb_delegate_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -857,26 +875,26 @@ func (x *GetAllDelegatorsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetAllDelegatorsResponse.ProtoReflect.Descriptor instead. -func (*GetAllDelegatorsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetTopDelegatorsResponse.ProtoReflect.Descriptor instead. +func (*GetTopDelegatorsResponse) Descriptor() ([]byte, []int) { return file_storagepb_delegate_proto_rawDescGZIP(), []int{12} } -func (x *GetAllDelegatorsResponse) GetTotalDelegatorsCount() int32 { +func (x *GetTopDelegatorsResponse) GetTotalDelegatorsCount() int32 { if x != nil { return x.TotalDelegatorsCount } return 0 } -func (x *GetAllDelegatorsResponse) GetDelegators() []*DelegatorSummary { +func (x *GetTopDelegatorsResponse) GetList() []*DelegatorSummary { if x != nil { - return x.Delegators + return x.List } return nil } -type GetDelegatesSummaryRequest struct { +type GetDelegationSummaryRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -885,20 +903,20 @@ type GetDelegatesSummaryRequest struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` } -func (x *GetDelegatesSummaryRequest) Reset() { - *x = GetDelegatesSummaryRequest{} +func (x *GetDelegationSummaryRequest) Reset() { + *x = GetDelegationSummaryRequest{} mi := &file_storagepb_delegate_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetDelegatesSummaryRequest) String() string { +func (x *GetDelegationSummaryRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetDelegatesSummaryRequest) ProtoMessage() {} +func (*GetDelegationSummaryRequest) ProtoMessage() {} -func (x *GetDelegatesSummaryRequest) ProtoReflect() protoreflect.Message { +func (x *GetDelegationSummaryRequest) ProtoReflect() protoreflect.Message { mi := &file_storagepb_delegate_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -910,43 +928,43 @@ func (x *GetDelegatesSummaryRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetDelegatesSummaryRequest.ProtoReflect.Descriptor instead. -func (*GetDelegatesSummaryRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetDelegationSummaryRequest.ProtoReflect.Descriptor instead. +func (*GetDelegationSummaryRequest) Descriptor() ([]byte, []int) { return file_storagepb_delegate_proto_rawDescGZIP(), []int{13} } -func (x *GetDelegatesSummaryRequest) GetAddress() string { +func (x *GetDelegationSummaryRequest) GetAddress() string { if x != nil { return x.Address } return "" } -type GetDelegatesSummaryResponse struct { +type GetDelegationSummaryResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // The number of total delegators in our DB TotalDelegatorsCount int32 `protobuf:"varint,1,opt,name=total_delegators_count,json=totalDelegatorsCount,proto3" json:"total_delegators_count,omitempty"` - // The number of total delegations in our DB - TotalDelegationsCount int32 `protobuf:"varint,2,opt,name=total_delegations_count,json=totalDelegationsCount,proto3" json:"total_delegations_count,omitempty"` + // The number of total delegates in our DB + TotalDelegatesCount int32 `protobuf:"varint,2,opt,name=total_delegates_count,json=totalDelegatesCount,proto3" json:"total_delegates_count,omitempty"` } -func (x *GetDelegatesSummaryResponse) Reset() { - *x = GetDelegatesSummaryResponse{} +func (x *GetDelegationSummaryResponse) Reset() { + *x = GetDelegationSummaryResponse{} mi := &file_storagepb_delegate_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetDelegatesSummaryResponse) String() string { +func (x *GetDelegationSummaryResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetDelegatesSummaryResponse) ProtoMessage() {} +func (*GetDelegationSummaryResponse) ProtoMessage() {} -func (x *GetDelegatesSummaryResponse) ProtoReflect() protoreflect.Message { +func (x *GetDelegationSummaryResponse) ProtoReflect() protoreflect.Message { mi := &file_storagepb_delegate_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -958,21 +976,271 @@ func (x *GetDelegatesSummaryResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetDelegatesSummaryResponse.ProtoReflect.Descriptor instead. -func (*GetDelegatesSummaryResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetDelegationSummaryResponse.ProtoReflect.Descriptor instead. +func (*GetDelegationSummaryResponse) Descriptor() ([]byte, []int) { return file_storagepb_delegate_proto_rawDescGZIP(), []int{14} } -func (x *GetDelegatesSummaryResponse) GetTotalDelegatorsCount() int32 { +func (x *GetDelegationSummaryResponse) GetTotalDelegatorsCount() int32 { if x != nil { return x.TotalDelegatorsCount } return 0 } -func (x *GetDelegatesSummaryResponse) GetTotalDelegationsCount() int32 { +func (x *GetDelegationSummaryResponse) GetTotalDelegatesCount() int32 { + if x != nil { + return x.TotalDelegatesCount + } + return 0 +} + +type GetDelegatesByDaoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DaoId string `protobuf:"bytes,1,opt,name=dao_id,json=daoId,proto3" json:"dao_id,omitempty"` + // The account address that initiates the delegation + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + Limit uint32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` + Offset *uint32 `protobuf:"varint,4,opt,name=offset,proto3,oneof" json:"offset,omitempty"` +} + +func (x *GetDelegatesByDaoRequest) Reset() { + *x = GetDelegatesByDaoRequest{} + mi := &file_storagepb_delegate_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetDelegatesByDaoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDelegatesByDaoRequest) ProtoMessage() {} + +func (x *GetDelegatesByDaoRequest) ProtoReflect() protoreflect.Message { + mi := &file_storagepb_delegate_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 GetDelegatesByDaoRequest.ProtoReflect.Descriptor instead. +func (*GetDelegatesByDaoRequest) Descriptor() ([]byte, []int) { + return file_storagepb_delegate_proto_rawDescGZIP(), []int{15} +} + +func (x *GetDelegatesByDaoRequest) GetDaoId() string { + if x != nil { + return x.DaoId + } + return "" +} + +func (x *GetDelegatesByDaoRequest) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *GetDelegatesByDaoRequest) GetLimit() uint32 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *GetDelegatesByDaoRequest) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +type GetDelegatesByDaoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of delegates + Delegates []*DelegationDetails `protobuf:"bytes,1,rep,name=delegates,proto3" json:"delegates,omitempty"` + // number of delegations in this DAO + TotalCount int32 `protobuf:"varint,2,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` +} + +func (x *GetDelegatesByDaoResponse) Reset() { + *x = GetDelegatesByDaoResponse{} + mi := &file_storagepb_delegate_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetDelegatesByDaoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDelegatesByDaoResponse) ProtoMessage() {} + +func (x *GetDelegatesByDaoResponse) ProtoReflect() protoreflect.Message { + mi := &file_storagepb_delegate_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 GetDelegatesByDaoResponse.ProtoReflect.Descriptor instead. +func (*GetDelegatesByDaoResponse) Descriptor() ([]byte, []int) { + return file_storagepb_delegate_proto_rawDescGZIP(), []int{16} +} + +func (x *GetDelegatesByDaoResponse) GetDelegates() []*DelegationDetails { + if x != nil { + return x.Delegates + } + return nil +} + +func (x *GetDelegatesByDaoResponse) GetTotalCount() int32 { + if x != nil { + return x.TotalCount + } + return 0 +} + +type GetDelegatorsByDaoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DaoId string `protobuf:"bytes,1,opt,name=dao_id,json=daoId,proto3" json:"dao_id,omitempty"` + // The account address that initiates the delegation + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + Limit uint32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` + Offset *uint32 `protobuf:"varint,4,opt,name=offset,proto3,oneof" json:"offset,omitempty"` +} + +func (x *GetDelegatorsByDaoRequest) Reset() { + *x = GetDelegatorsByDaoRequest{} + mi := &file_storagepb_delegate_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetDelegatorsByDaoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDelegatorsByDaoRequest) ProtoMessage() {} + +func (x *GetDelegatorsByDaoRequest) ProtoReflect() protoreflect.Message { + mi := &file_storagepb_delegate_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 GetDelegatorsByDaoRequest.ProtoReflect.Descriptor instead. +func (*GetDelegatorsByDaoRequest) Descriptor() ([]byte, []int) { + return file_storagepb_delegate_proto_rawDescGZIP(), []int{17} +} + +func (x *GetDelegatorsByDaoRequest) GetDaoId() string { + if x != nil { + return x.DaoId + } + return "" +} + +func (x *GetDelegatorsByDaoRequest) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *GetDelegatorsByDaoRequest) GetLimit() uint32 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *GetDelegatorsByDaoRequest) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +type GetDelegatorsByDaoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of delegators + Delegators []*DelegationDetails `protobuf:"bytes,1,rep,name=delegators,proto3" json:"delegators,omitempty"` + // number of delegators in this DAO + TotalCount int32 `protobuf:"varint,2,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` +} + +func (x *GetDelegatorsByDaoResponse) Reset() { + *x = GetDelegatorsByDaoResponse{} + mi := &file_storagepb_delegate_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetDelegatorsByDaoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDelegatorsByDaoResponse) ProtoMessage() {} + +func (x *GetDelegatorsByDaoResponse) ProtoReflect() protoreflect.Message { + mi := &file_storagepb_delegate_proto_msgTypes[18] if x != nil { - return x.TotalDelegationsCount + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDelegatorsByDaoResponse.ProtoReflect.Descriptor instead. +func (*GetDelegatorsByDaoResponse) Descriptor() ([]byte, []int) { + return file_storagepb_delegate_proto_rawDescGZIP(), []int{18} +} + +func (x *GetDelegatorsByDaoResponse) GetDelegators() []*DelegationDetails { + if x != nil { + return x.Delegators + } + return nil +} + +func (x *GetDelegatorsByDaoResponse) GetTotalCount() int32 { + if x != nil { + return x.TotalCount } return 0 } @@ -1065,103 +1333,150 @@ var file_storagepb_delegate_proto_rawDesc = []byte{ 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0e, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x34, 0x0a, - 0x18, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x22, 0xb8, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x32, - 0x0a, 0x15, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x70, - 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x12, 0x3a, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x79, - 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x6d, 0x6d, - 0x61, 0x72, 0x79, 0x12, 0x24, 0x0a, 0x03, 0x64, 0x61, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x6f, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x64, 0x61, 0x6f, 0x12, 0x3e, 0x0a, 0x0b, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0b, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x19, 0x47, 0x65, - 0x74, 0x41, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x3e, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x6d, 0x6d, 0x61, - 0x72, 0x79, 0x52, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0x33, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x22, 0x76, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x24, 0x0a, 0x03, 0x64, 0x61, 0x6f, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, - 0x62, 0x2e, 0x44, 0x61, 0x6f, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x64, 0x61, 0x6f, 0x12, 0x3c, - 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, - 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x22, 0x8d, 0x01, 0x0a, - 0x18, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x3b, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, - 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x22, 0x36, 0x0a, 0x1a, - 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x53, 0x75, 0x6d, 0x6d, - 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x22, 0x8b, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x17, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x32, 0xe1, 0x03, 0x0a, 0x08, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, - 0x4f, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x12, - 0x1e, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1f, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x61, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x24, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x22, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x44, 0x65, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x32, 0x0a, + 0x16, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x22, 0xb8, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x15, + 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x70, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, + 0x12, 0x3a, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x95, 0x01, 0x0a, + 0x10, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x79, 0x12, 0x24, 0x0a, 0x03, 0x64, 0x61, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x6f, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x03, 0x64, 0x61, 0x6f, 0x12, 0x3a, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x7e, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x70, 0x44, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x04, + 0x6c, 0x69, 0x73, 0x74, 0x22, 0x33, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x70, 0x44, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x97, 0x01, 0x0a, 0x10, 0x44, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x24, + 0x0a, 0x03, 0x64, 0x61, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x6f, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x03, 0x64, 0x61, 0x6f, 0x12, 0x3c, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0x81, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x64, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, - 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x25, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, - 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, - 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x3b, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x34, 0x0a, 0x16, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x79, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x37, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x22, 0x88, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x34, 0x0a, 0x16, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x89, 0x01, 0x0a, 0x18, + 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x42, 0x79, 0x44, 0x61, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x64, 0x61, 0x6f, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x61, 0x6f, 0x49, 0x64, 0x12, + 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, + 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x00, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x78, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x42, 0x79, 0x44, 0x61, 0x6f, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, + 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x8a, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x42, 0x79, 0x44, 0x61, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x15, 0x0a, 0x06, 0x64, 0x61, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x64, 0x61, 0x6f, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x7b, + 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x42, + 0x79, 0x44, 0x61, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x0a, + 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0a, + 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xa1, 0x05, 0x0a, 0x08, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x4f, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x44, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x12, 0x47, 0x65, 0x74, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, + 0x24, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x44, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, + 0x62, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0f, + 0x47, 0x65, 0x74, 0x54, 0x6f, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x12, + 0x21, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x54, + 0x6f, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x47, + 0x65, 0x74, 0x54, 0x6f, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x70, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x22, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x70, 0x44, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, + 0x70, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x26, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, + 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x11, + 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x42, 0x79, 0x44, 0x61, + 0x6f, 0x12, 0x23, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x47, 0x65, + 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x42, 0x79, 0x44, 0x61, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x42, + 0x79, 0x44, 0x61, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x42, 0x79, 0x44, + 0x61, 0x6f, 0x12, 0x24, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x2e, 0x47, + 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x42, 0x79, 0x44, 0x61, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x73, 0x42, 0x79, 0x44, 0x61, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0x0d, 0x5a, 0x0b, 0x2e, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1176,52 +1491,62 @@ func file_storagepb_delegate_proto_rawDescGZIP() []byte { return file_storagepb_delegate_proto_rawDescData } -var file_storagepb_delegate_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_storagepb_delegate_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_storagepb_delegate_proto_goTypes = []any{ - (*GetDelegatesRequest)(nil), // 0: storagepb.GetDelegatesRequest - (*GetDelegatesResponse)(nil), // 1: storagepb.GetDelegatesResponse - (*DelegateEntry)(nil), // 2: storagepb.DelegateEntry - (*GetDelegateProfileRequest)(nil), // 3: storagepb.GetDelegateProfileRequest - (*GetDelegateProfileResponse)(nil), // 4: storagepb.GetDelegateProfileResponse - (*ProfileDelegateItem)(nil), // 5: storagepb.ProfileDelegateItem - (*GetAllDelegationsRequest)(nil), // 6: storagepb.GetAllDelegationsRequest - (*DelegationDetails)(nil), // 7: storagepb.DelegationDetails - (*DelegationSummary)(nil), // 8: storagepb.DelegationSummary - (*GetAllDelegationsResponse)(nil), // 9: storagepb.GetAllDelegationsResponse - (*GetAllDelegatorsRequest)(nil), // 10: storagepb.GetAllDelegatorsRequest - (*DelegatorSummary)(nil), // 11: storagepb.DelegatorSummary - (*GetAllDelegatorsResponse)(nil), // 12: storagepb.GetAllDelegatorsResponse - (*GetDelegatesSummaryRequest)(nil), // 13: storagepb.GetDelegatesSummaryRequest - (*GetDelegatesSummaryResponse)(nil), // 14: storagepb.GetDelegatesSummaryResponse - (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp - (*DaoInfo)(nil), // 16: storagepb.DaoInfo + (*GetDelegatesRequest)(nil), // 0: storagepb.GetDelegatesRequest + (*GetDelegatesResponse)(nil), // 1: storagepb.GetDelegatesResponse + (*DelegateEntry)(nil), // 2: storagepb.DelegateEntry + (*GetDelegateProfileRequest)(nil), // 3: storagepb.GetDelegateProfileRequest + (*GetDelegateProfileResponse)(nil), // 4: storagepb.GetDelegateProfileResponse + (*ProfileDelegateItem)(nil), // 5: storagepb.ProfileDelegateItem + (*GetTopDelegatesRequest)(nil), // 6: storagepb.GetTopDelegatesRequest + (*DelegationDetails)(nil), // 7: storagepb.DelegationDetails + (*DelegatesSummary)(nil), // 8: storagepb.DelegatesSummary + (*GetTopDelegatesResponse)(nil), // 9: storagepb.GetTopDelegatesResponse + (*GetTopDelegatorsRequest)(nil), // 10: storagepb.GetTopDelegatorsRequest + (*DelegatorSummary)(nil), // 11: storagepb.DelegatorSummary + (*GetTopDelegatorsResponse)(nil), // 12: storagepb.GetTopDelegatorsResponse + (*GetDelegationSummaryRequest)(nil), // 13: storagepb.GetDelegationSummaryRequest + (*GetDelegationSummaryResponse)(nil), // 14: storagepb.GetDelegationSummaryResponse + (*GetDelegatesByDaoRequest)(nil), // 15: storagepb.GetDelegatesByDaoRequest + (*GetDelegatesByDaoResponse)(nil), // 16: storagepb.GetDelegatesByDaoResponse + (*GetDelegatorsByDaoRequest)(nil), // 17: storagepb.GetDelegatorsByDaoRequest + (*GetDelegatorsByDaoResponse)(nil), // 18: storagepb.GetDelegatorsByDaoResponse + (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp + (*DaoInfo)(nil), // 20: storagepb.DaoInfo } var file_storagepb_delegate_proto_depIdxs = []int32{ 2, // 0: storagepb.GetDelegatesResponse.delegates:type_name -> storagepb.DelegateEntry 5, // 1: storagepb.GetDelegateProfileResponse.delegates:type_name -> storagepb.ProfileDelegateItem - 15, // 2: storagepb.GetDelegateProfileResponse.expiration:type_name -> google.protobuf.Timestamp - 15, // 3: storagepb.DelegationDetails.expiration:type_name -> google.protobuf.Timestamp - 16, // 4: storagepb.DelegationSummary.dao:type_name -> storagepb.DaoInfo - 7, // 5: storagepb.DelegationSummary.delegations:type_name -> storagepb.DelegationDetails - 8, // 6: storagepb.GetAllDelegationsResponse.delegations:type_name -> storagepb.DelegationSummary - 16, // 7: storagepb.DelegatorSummary.dao:type_name -> storagepb.DaoInfo + 19, // 2: storagepb.GetDelegateProfileResponse.expiration:type_name -> google.protobuf.Timestamp + 19, // 3: storagepb.DelegationDetails.expiration:type_name -> google.protobuf.Timestamp + 20, // 4: storagepb.DelegatesSummary.dao:type_name -> storagepb.DaoInfo + 7, // 5: storagepb.DelegatesSummary.delegates:type_name -> storagepb.DelegationDetails + 8, // 6: storagepb.GetTopDelegatesResponse.list:type_name -> storagepb.DelegatesSummary + 20, // 7: storagepb.DelegatorSummary.dao:type_name -> storagepb.DaoInfo 7, // 8: storagepb.DelegatorSummary.delegators:type_name -> storagepb.DelegationDetails - 11, // 9: storagepb.GetAllDelegatorsResponse.delegators:type_name -> storagepb.DelegatorSummary - 0, // 10: storagepb.Delegate.GetDelegates:input_type -> storagepb.GetDelegatesRequest - 3, // 11: storagepb.Delegate.GetDelegateProfile:input_type -> storagepb.GetDelegateProfileRequest - 6, // 12: storagepb.Delegate.GetAllDelegations:input_type -> storagepb.GetAllDelegationsRequest - 10, // 13: storagepb.Delegate.GetAllDelegators:input_type -> storagepb.GetAllDelegatorsRequest - 13, // 14: storagepb.Delegate.GetDelegatesSummary:input_type -> storagepb.GetDelegatesSummaryRequest - 1, // 15: storagepb.Delegate.GetDelegates:output_type -> storagepb.GetDelegatesResponse - 4, // 16: storagepb.Delegate.GetDelegateProfile:output_type -> storagepb.GetDelegateProfileResponse - 9, // 17: storagepb.Delegate.GetAllDelegations:output_type -> storagepb.GetAllDelegationsResponse - 12, // 18: storagepb.Delegate.GetAllDelegators:output_type -> storagepb.GetAllDelegatorsResponse - 14, // 19: storagepb.Delegate.GetDelegatesSummary:output_type -> storagepb.GetDelegatesSummaryResponse - 15, // [15:20] is the sub-list for method output_type - 10, // [10:15] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 11, // 9: storagepb.GetTopDelegatorsResponse.list:type_name -> storagepb.DelegatorSummary + 7, // 10: storagepb.GetDelegatesByDaoResponse.delegates:type_name -> storagepb.DelegationDetails + 7, // 11: storagepb.GetDelegatorsByDaoResponse.delegators:type_name -> storagepb.DelegationDetails + 0, // 12: storagepb.Delegate.GetDelegates:input_type -> storagepb.GetDelegatesRequest + 3, // 13: storagepb.Delegate.GetDelegateProfile:input_type -> storagepb.GetDelegateProfileRequest + 6, // 14: storagepb.Delegate.GetTopDelegates:input_type -> storagepb.GetTopDelegatesRequest + 10, // 15: storagepb.Delegate.GetTopDelegators:input_type -> storagepb.GetTopDelegatorsRequest + 13, // 16: storagepb.Delegate.GetDelegationSummary:input_type -> storagepb.GetDelegationSummaryRequest + 15, // 17: storagepb.Delegate.GetDelegatesByDao:input_type -> storagepb.GetDelegatesByDaoRequest + 17, // 18: storagepb.Delegate.GetDelegatorsByDao:input_type -> storagepb.GetDelegatorsByDaoRequest + 1, // 19: storagepb.Delegate.GetDelegates:output_type -> storagepb.GetDelegatesResponse + 4, // 20: storagepb.Delegate.GetDelegateProfile:output_type -> storagepb.GetDelegateProfileResponse + 9, // 21: storagepb.Delegate.GetTopDelegates:output_type -> storagepb.GetTopDelegatesResponse + 12, // 22: storagepb.Delegate.GetTopDelegators:output_type -> storagepb.GetTopDelegatorsResponse + 14, // 23: storagepb.Delegate.GetDelegationSummary:output_type -> storagepb.GetDelegationSummaryResponse + 16, // 24: storagepb.Delegate.GetDelegatesByDao:output_type -> storagepb.GetDelegatesByDaoResponse + 18, // 25: storagepb.Delegate.GetDelegatorsByDao:output_type -> storagepb.GetDelegatorsByDaoResponse + 19, // [19:26] is the sub-list for method output_type + 12, // [12:19] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_storagepb_delegate_proto_init() } @@ -1231,13 +1556,15 @@ func file_storagepb_delegate_proto_init() { } file_storagepb_dao_proto_init() file_storagepb_delegate_proto_msgTypes[0].OneofWrappers = []any{} + file_storagepb_delegate_proto_msgTypes[15].OneofWrappers = []any{} + file_storagepb_delegate_proto_msgTypes[17].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_storagepb_delegate_proto_rawDesc, NumEnums: 0, - NumMessages: 15, + NumMessages: 19, NumExtensions: 0, NumServices: 1, }, diff --git a/protocol/storagepb/delegate.proto b/protocol/storagepb/delegate.proto index aa0d516..0b77c23 100644 --- a/protocol/storagepb/delegate.proto +++ b/protocol/storagepb/delegate.proto @@ -12,12 +12,16 @@ service Delegate { rpc GetDelegates(GetDelegatesRequest) returns (GetDelegatesResponse); rpc GetDelegateProfile(GetDelegateProfileRequest) returns (GetDelegateProfileResponse); - // GetAllDelegations returns list of delegations based on internal data grouped by dao - rpc GetAllDelegations(GetAllDelegationsRequest) returns (GetAllDelegationsResponse); - // GetAllDelegators returns list of delegators based on internal data grouped by dao - rpc GetAllDelegators(GetAllDelegatorsRequest) returns (GetAllDelegatorsResponse); + // GetTopDelegates returns list of first 5 addresses of delegations based on internal data grouped by dao + rpc GetTopDelegates(GetTopDelegatesRequest) returns (GetTopDelegatesResponse); + // GetTopDelegators returns list of first 5 addresses of delegators based on internal data grouped by dao + rpc GetTopDelegators(GetTopDelegatorsRequest) returns (GetTopDelegatorsResponse); // GetDelegatesSummary returns count of delegators and delegations - rpc GetDelegatesSummary(GetDelegatesSummaryRequest) returns (GetDelegatesSummaryResponse); + rpc GetDelegationSummary(GetDelegationSummaryRequest) returns (GetDelegationSummaryResponse); + // GetDelegatesByDao returns list of delegations based on internal data filtered by params + rpc GetDelegatesByDao(GetDelegatesByDaoRequest) returns (GetDelegatesByDaoResponse); + // GetDelegatorsByDao returns list of delegations based on internal data filtered by params + rpc GetDelegatorsByDao(GetDelegatorsByDaoRequest) returns (GetDelegatorsByDaoResponse); } message GetDelegatesRequest { @@ -69,7 +73,7 @@ message ProfileDelegateItem { double delegated_power = 4; } -message GetAllDelegationsRequest { +message GetTopDelegatesRequest { // The account address that initiates the delegation string address = 1; } @@ -85,21 +89,23 @@ message DelegationDetails { google.protobuf.Timestamp expiration = 4; } -message DelegationSummary { +message DelegatesSummary { // Dao details DaoInfo dao = 1; - // List of delegations - repeated DelegationDetails delegations = 2; + // List of delegates + repeated DelegationDetails delegates = 2; + // number of delegations in this DAO + int32 total_count = 3; } -message GetAllDelegationsResponse { +message GetTopDelegatesResponse { // The number of total delegations in our DB - int32 total_delegations_count = 1; - // List of delegations grouped by dao and sorted by popularity index - repeated DelegationSummary delegations = 2; + int32 total_delegates_count = 1; + // List of delegates grouped by dao and sorted by popularity index + repeated DelegatesSummary list = 2; } -message GetAllDelegatorsRequest { +message GetTopDelegatorsRequest { // The account address that initiates the delegation string address = 1; } @@ -109,23 +115,55 @@ message DelegatorSummary { DaoInfo dao = 1; // List of delegators repeated DelegationDetails delegators = 2; + // number of delegators in this DAO + int32 total_count = 3; } -message GetAllDelegatorsResponse { +message GetTopDelegatorsResponse { // The number of total delegators in our DB int32 total_delegators_count = 1; // List of delegators grouped by dao and sorted by popularity index - repeated DelegatorSummary delegators = 2; + repeated DelegatorSummary list = 2; } -message GetDelegatesSummaryRequest { +message GetDelegationSummaryRequest { // The account address that initiates the delegation string address = 1; } -message GetDelegatesSummaryResponse { +message GetDelegationSummaryResponse { // The number of total delegators in our DB int32 total_delegators_count = 1; - // The number of total delegations in our DB - int32 total_delegations_count = 2; + // The number of total delegates in our DB + int32 total_delegates_count = 2; +} + +message GetDelegatesByDaoRequest { + string dao_id = 1; + // The account address that initiates the delegation + string address = 2; + uint32 limit = 3; + optional uint32 offset = 4; +} + +message GetDelegatesByDaoResponse { + // List of delegates + repeated DelegationDetails delegates = 1; + // number of delegations in this DAO + int32 total_count = 2; +} + +message GetDelegatorsByDaoRequest { + string dao_id = 1; + // The account address that initiates the delegation + string address = 2; + uint32 limit = 3; + optional uint32 offset = 4; +} + +message GetDelegatorsByDaoResponse { + // List of delegators + repeated DelegationDetails delegators = 1; + // number of delegators in this DAO + int32 total_count = 2; } diff --git a/protocol/storagepb/delegate_grpc.pb.go b/protocol/storagepb/delegate_grpc.pb.go index 4f3fdef..dc3edd2 100644 --- a/protocol/storagepb/delegate_grpc.pb.go +++ b/protocol/storagepb/delegate_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.28.2 +// - protoc v5.28.3 // source: storagepb/delegate.proto package storagepb @@ -19,11 +19,13 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - Delegate_GetDelegates_FullMethodName = "/storagepb.Delegate/GetDelegates" - Delegate_GetDelegateProfile_FullMethodName = "/storagepb.Delegate/GetDelegateProfile" - Delegate_GetAllDelegations_FullMethodName = "/storagepb.Delegate/GetAllDelegations" - Delegate_GetAllDelegators_FullMethodName = "/storagepb.Delegate/GetAllDelegators" - Delegate_GetDelegatesSummary_FullMethodName = "/storagepb.Delegate/GetDelegatesSummary" + Delegate_GetDelegates_FullMethodName = "/storagepb.Delegate/GetDelegates" + Delegate_GetDelegateProfile_FullMethodName = "/storagepb.Delegate/GetDelegateProfile" + Delegate_GetTopDelegates_FullMethodName = "/storagepb.Delegate/GetTopDelegates" + Delegate_GetTopDelegators_FullMethodName = "/storagepb.Delegate/GetTopDelegators" + Delegate_GetDelegationSummary_FullMethodName = "/storagepb.Delegate/GetDelegationSummary" + Delegate_GetDelegatesByDao_FullMethodName = "/storagepb.Delegate/GetDelegatesByDao" + Delegate_GetDelegatorsByDao_FullMethodName = "/storagepb.Delegate/GetDelegatorsByDao" ) // DelegateClient is the client API for Delegate service. @@ -33,12 +35,16 @@ type DelegateClient interface { // GetDelegates returns list of delegates get from Snapshot GetDelegates(ctx context.Context, in *GetDelegatesRequest, opts ...grpc.CallOption) (*GetDelegatesResponse, error) GetDelegateProfile(ctx context.Context, in *GetDelegateProfileRequest, opts ...grpc.CallOption) (*GetDelegateProfileResponse, error) - // GetAllDelegations returns list of delegations based on internal data grouped by dao - GetAllDelegations(ctx context.Context, in *GetAllDelegationsRequest, opts ...grpc.CallOption) (*GetAllDelegationsResponse, error) - // GetAllDelegators returns list of delegators based on internal data grouped by dao - GetAllDelegators(ctx context.Context, in *GetAllDelegatorsRequest, opts ...grpc.CallOption) (*GetAllDelegatorsResponse, error) + // GetTopDelegates returns list of first 5 addresses of delegations based on internal data grouped by dao + GetTopDelegates(ctx context.Context, in *GetTopDelegatesRequest, opts ...grpc.CallOption) (*GetTopDelegatesResponse, error) + // GetTopDelegators returns list of first 5 addresses of delegators based on internal data grouped by dao + GetTopDelegators(ctx context.Context, in *GetTopDelegatorsRequest, opts ...grpc.CallOption) (*GetTopDelegatorsResponse, error) // GetDelegatesSummary returns count of delegators and delegations - GetDelegatesSummary(ctx context.Context, in *GetDelegatesSummaryRequest, opts ...grpc.CallOption) (*GetDelegatesSummaryResponse, error) + GetDelegationSummary(ctx context.Context, in *GetDelegationSummaryRequest, opts ...grpc.CallOption) (*GetDelegationSummaryResponse, error) + // GetDelegatesByDao returns list of delegations based on internal data filtered by params + GetDelegatesByDao(ctx context.Context, in *GetDelegatesByDaoRequest, opts ...grpc.CallOption) (*GetDelegatesByDaoResponse, error) + // GetDelegatorsByDao returns list of delegations based on internal data filtered by params + GetDelegatorsByDao(ctx context.Context, in *GetDelegatorsByDaoRequest, opts ...grpc.CallOption) (*GetDelegatorsByDaoResponse, error) } type delegateClient struct { @@ -69,30 +75,50 @@ func (c *delegateClient) GetDelegateProfile(ctx context.Context, in *GetDelegate return out, nil } -func (c *delegateClient) GetAllDelegations(ctx context.Context, in *GetAllDelegationsRequest, opts ...grpc.CallOption) (*GetAllDelegationsResponse, error) { +func (c *delegateClient) GetTopDelegates(ctx context.Context, in *GetTopDelegatesRequest, opts ...grpc.CallOption) (*GetTopDelegatesResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetAllDelegationsResponse) - err := c.cc.Invoke(ctx, Delegate_GetAllDelegations_FullMethodName, in, out, cOpts...) + out := new(GetTopDelegatesResponse) + err := c.cc.Invoke(ctx, Delegate_GetTopDelegates_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *delegateClient) GetAllDelegators(ctx context.Context, in *GetAllDelegatorsRequest, opts ...grpc.CallOption) (*GetAllDelegatorsResponse, error) { +func (c *delegateClient) GetTopDelegators(ctx context.Context, in *GetTopDelegatorsRequest, opts ...grpc.CallOption) (*GetTopDelegatorsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetAllDelegatorsResponse) - err := c.cc.Invoke(ctx, Delegate_GetAllDelegators_FullMethodName, in, out, cOpts...) + out := new(GetTopDelegatorsResponse) + err := c.cc.Invoke(ctx, Delegate_GetTopDelegators_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *delegateClient) GetDelegatesSummary(ctx context.Context, in *GetDelegatesSummaryRequest, opts ...grpc.CallOption) (*GetDelegatesSummaryResponse, error) { +func (c *delegateClient) GetDelegationSummary(ctx context.Context, in *GetDelegationSummaryRequest, opts ...grpc.CallOption) (*GetDelegationSummaryResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetDelegatesSummaryResponse) - err := c.cc.Invoke(ctx, Delegate_GetDelegatesSummary_FullMethodName, in, out, cOpts...) + out := new(GetDelegationSummaryResponse) + err := c.cc.Invoke(ctx, Delegate_GetDelegationSummary_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *delegateClient) GetDelegatesByDao(ctx context.Context, in *GetDelegatesByDaoRequest, opts ...grpc.CallOption) (*GetDelegatesByDaoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetDelegatesByDaoResponse) + err := c.cc.Invoke(ctx, Delegate_GetDelegatesByDao_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *delegateClient) GetDelegatorsByDao(ctx context.Context, in *GetDelegatorsByDaoRequest, opts ...grpc.CallOption) (*GetDelegatorsByDaoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetDelegatorsByDaoResponse) + err := c.cc.Invoke(ctx, Delegate_GetDelegatorsByDao_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -106,12 +132,16 @@ type DelegateServer interface { // GetDelegates returns list of delegates get from Snapshot GetDelegates(context.Context, *GetDelegatesRequest) (*GetDelegatesResponse, error) GetDelegateProfile(context.Context, *GetDelegateProfileRequest) (*GetDelegateProfileResponse, error) - // GetAllDelegations returns list of delegations based on internal data grouped by dao - GetAllDelegations(context.Context, *GetAllDelegationsRequest) (*GetAllDelegationsResponse, error) - // GetAllDelegators returns list of delegators based on internal data grouped by dao - GetAllDelegators(context.Context, *GetAllDelegatorsRequest) (*GetAllDelegatorsResponse, error) + // GetTopDelegates returns list of first 5 addresses of delegations based on internal data grouped by dao + GetTopDelegates(context.Context, *GetTopDelegatesRequest) (*GetTopDelegatesResponse, error) + // GetTopDelegators returns list of first 5 addresses of delegators based on internal data grouped by dao + GetTopDelegators(context.Context, *GetTopDelegatorsRequest) (*GetTopDelegatorsResponse, error) // GetDelegatesSummary returns count of delegators and delegations - GetDelegatesSummary(context.Context, *GetDelegatesSummaryRequest) (*GetDelegatesSummaryResponse, error) + GetDelegationSummary(context.Context, *GetDelegationSummaryRequest) (*GetDelegationSummaryResponse, error) + // GetDelegatesByDao returns list of delegations based on internal data filtered by params + GetDelegatesByDao(context.Context, *GetDelegatesByDaoRequest) (*GetDelegatesByDaoResponse, error) + // GetDelegatorsByDao returns list of delegations based on internal data filtered by params + GetDelegatorsByDao(context.Context, *GetDelegatorsByDaoRequest) (*GetDelegatorsByDaoResponse, error) mustEmbedUnimplementedDelegateServer() } @@ -128,14 +158,20 @@ func (UnimplementedDelegateServer) GetDelegates(context.Context, *GetDelegatesRe func (UnimplementedDelegateServer) GetDelegateProfile(context.Context, *GetDelegateProfileRequest) (*GetDelegateProfileResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetDelegateProfile not implemented") } -func (UnimplementedDelegateServer) GetAllDelegations(context.Context, *GetAllDelegationsRequest) (*GetAllDelegationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAllDelegations not implemented") +func (UnimplementedDelegateServer) GetTopDelegates(context.Context, *GetTopDelegatesRequest) (*GetTopDelegatesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTopDelegates not implemented") +} +func (UnimplementedDelegateServer) GetTopDelegators(context.Context, *GetTopDelegatorsRequest) (*GetTopDelegatorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTopDelegators not implemented") } -func (UnimplementedDelegateServer) GetAllDelegators(context.Context, *GetAllDelegatorsRequest) (*GetAllDelegatorsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAllDelegators not implemented") +func (UnimplementedDelegateServer) GetDelegationSummary(context.Context, *GetDelegationSummaryRequest) (*GetDelegationSummaryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDelegationSummary not implemented") } -func (UnimplementedDelegateServer) GetDelegatesSummary(context.Context, *GetDelegatesSummaryRequest) (*GetDelegatesSummaryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDelegatesSummary not implemented") +func (UnimplementedDelegateServer) GetDelegatesByDao(context.Context, *GetDelegatesByDaoRequest) (*GetDelegatesByDaoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDelegatesByDao not implemented") +} +func (UnimplementedDelegateServer) GetDelegatorsByDao(context.Context, *GetDelegatorsByDaoRequest) (*GetDelegatorsByDaoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDelegatorsByDao not implemented") } func (UnimplementedDelegateServer) mustEmbedUnimplementedDelegateServer() {} func (UnimplementedDelegateServer) testEmbeddedByValue() {} @@ -194,56 +230,92 @@ func _Delegate_GetDelegateProfile_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -func _Delegate_GetAllDelegations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAllDelegationsRequest) +func _Delegate_GetTopDelegates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTopDelegatesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DelegateServer).GetTopDelegates(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Delegate_GetTopDelegates_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DelegateServer).GetTopDelegates(ctx, req.(*GetTopDelegatesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Delegate_GetTopDelegators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTopDelegatorsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(DelegateServer).GetAllDelegations(ctx, in) + return srv.(DelegateServer).GetTopDelegators(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Delegate_GetAllDelegations_FullMethodName, + FullMethod: Delegate_GetTopDelegators_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DelegateServer).GetAllDelegations(ctx, req.(*GetAllDelegationsRequest)) + return srv.(DelegateServer).GetTopDelegators(ctx, req.(*GetTopDelegatorsRequest)) } return interceptor(ctx, in, info, handler) } -func _Delegate_GetAllDelegators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAllDelegatorsRequest) +func _Delegate_GetDelegationSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDelegationSummaryRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(DelegateServer).GetAllDelegators(ctx, in) + return srv.(DelegateServer).GetDelegationSummary(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Delegate_GetAllDelegators_FullMethodName, + FullMethod: Delegate_GetDelegationSummary_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DelegateServer).GetAllDelegators(ctx, req.(*GetAllDelegatorsRequest)) + return srv.(DelegateServer).GetDelegationSummary(ctx, req.(*GetDelegationSummaryRequest)) } return interceptor(ctx, in, info, handler) } -func _Delegate_GetDelegatesSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetDelegatesSummaryRequest) +func _Delegate_GetDelegatesByDao_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDelegatesByDaoRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(DelegateServer).GetDelegatesSummary(ctx, in) + return srv.(DelegateServer).GetDelegatesByDao(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Delegate_GetDelegatesSummary_FullMethodName, + FullMethod: Delegate_GetDelegatesByDao_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DelegateServer).GetDelegatesSummary(ctx, req.(*GetDelegatesSummaryRequest)) + return srv.(DelegateServer).GetDelegatesByDao(ctx, req.(*GetDelegatesByDaoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Delegate_GetDelegatorsByDao_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDelegatorsByDaoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DelegateServer).GetDelegatorsByDao(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Delegate_GetDelegatorsByDao_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DelegateServer).GetDelegatorsByDao(ctx, req.(*GetDelegatorsByDaoRequest)) } return interceptor(ctx, in, info, handler) } @@ -264,16 +336,24 @@ var Delegate_ServiceDesc = grpc.ServiceDesc{ Handler: _Delegate_GetDelegateProfile_Handler, }, { - MethodName: "GetAllDelegations", - Handler: _Delegate_GetAllDelegations_Handler, + MethodName: "GetTopDelegates", + Handler: _Delegate_GetTopDelegates_Handler, + }, + { + MethodName: "GetTopDelegators", + Handler: _Delegate_GetTopDelegators_Handler, + }, + { + MethodName: "GetDelegationSummary", + Handler: _Delegate_GetDelegationSummary_Handler, }, { - MethodName: "GetAllDelegators", - Handler: _Delegate_GetAllDelegators_Handler, + MethodName: "GetDelegatesByDao", + Handler: _Delegate_GetDelegatesByDao_Handler, }, { - MethodName: "GetDelegatesSummary", - Handler: _Delegate_GetDelegatesSummary_Handler, + MethodName: "GetDelegatorsByDao", + Handler: _Delegate_GetDelegatorsByDao_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/protocol/storagepb/ens.pb.go b/protocol/storagepb/ens.pb.go index 5caa652..0d998a4 100644 --- a/protocol/storagepb/ens.pb.go +++ b/protocol/storagepb/ens.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.1 -// protoc v5.28.2 +// protoc v5.28.3 // source: storagepb/ens.proto package storagepb diff --git a/protocol/storagepb/ens_grpc.pb.go b/protocol/storagepb/ens_grpc.pb.go index b3bd4ca..2387ed9 100644 --- a/protocol/storagepb/ens_grpc.pb.go +++ b/protocol/storagepb/ens_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.28.2 +// - protoc v5.28.3 // source: storagepb/ens.proto package storagepb diff --git a/protocol/storagepb/proposal.pb.go b/protocol/storagepb/proposal.pb.go index 74e8c44..2bc33cc 100644 --- a/protocol/storagepb/proposal.pb.go +++ b/protocol/storagepb/proposal.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.1 -// protoc v5.28.2 +// protoc v5.28.3 // source: storagepb/proposal.proto package storagepb diff --git a/protocol/storagepb/proposal_grpc.pb.go b/protocol/storagepb/proposal_grpc.pb.go index d6ca495..c0f2278 100644 --- a/protocol/storagepb/proposal_grpc.pb.go +++ b/protocol/storagepb/proposal_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.28.2 +// - protoc v5.28.3 // source: storagepb/proposal.proto package storagepb diff --git a/protocol/storagepb/stats.pb.go b/protocol/storagepb/stats.pb.go index ad8dc35..47f0e11 100644 --- a/protocol/storagepb/stats.pb.go +++ b/protocol/storagepb/stats.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.1 -// protoc v5.28.2 +// protoc v5.28.3 // source: storagepb/stats.proto package storagepb diff --git a/protocol/storagepb/stats_grpc.pb.go b/protocol/storagepb/stats_grpc.pb.go index c743612..b530230 100644 --- a/protocol/storagepb/stats_grpc.pb.go +++ b/protocol/storagepb/stats_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.28.2 +// - protoc v5.28.3 // source: storagepb/stats.proto package storagepb diff --git a/protocol/storagepb/vote.pb.go b/protocol/storagepb/vote.pb.go index 2c470d3..f312f3b 100644 --- a/protocol/storagepb/vote.pb.go +++ b/protocol/storagepb/vote.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.1 -// protoc v5.28.2 +// protoc v5.28.3 // source: storagepb/vote.proto package storagepb diff --git a/protocol/storagepb/vote_grpc.pb.go b/protocol/storagepb/vote_grpc.pb.go index 3b0e1d7..822da76 100644 --- a/protocol/storagepb/vote_grpc.pb.go +++ b/protocol/storagepb/vote_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.28.2 +// - protoc v5.28.3 // source: storagepb/vote.proto package storagepb