Versions in this module Expand all Collapse all v1 v1.10.3 Dec 16, 2024 v1.10.2 Dec 15, 2024 Changes in this version + const ClientService_Process_FullMethodName + const IP + const Port + var ClientService_ServiceDesc = grpc.ServiceDesc + var File_message_proto protoreflect.FileDescriptor + var LotteryRequest_Type_name = map[int32]string + var LotteryRequest_Type_value = map[string]int32 + var MessageType_name = map[int32]string + var MessageType_value = map[string]int32 + var ServiceType_name = map[int32]string + var ServiceType_value = map[string]int32 + func RegisterClientServiceServer(s grpc.ServiceRegistrar, srv ClientServiceServer) + type Client struct + func NewClient(ip string) *Client + func (client *Client) Close() error + func (client *Client) Process(message *Message) (*Response, error) + type ClientServiceClient interface + Process func(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Response, error) + func NewClientServiceClient(cc grpc.ClientConnInterface) ClientServiceClient + type ClientServiceServer interface + Process func(context.Context, *Message) (*Response, error) + type ConsensusRequest struct + Block []byte + BlockHash []byte + BlockNum uint64 + Payload []byte + SenderPubkey []byte + SenderPubkeyBitmap []byte + ShardId uint32 + ViewId uint64 + func (*ConsensusRequest) Descriptor() ([]byte, []int) + func (*ConsensusRequest) ProtoMessage() + func (x *ConsensusRequest) GetBlock() []byte + func (x *ConsensusRequest) GetBlockHash() []byte + func (x *ConsensusRequest) GetBlockNum() uint64 + func (x *ConsensusRequest) GetPayload() []byte + func (x *ConsensusRequest) GetSenderPubkey() []byte + func (x *ConsensusRequest) GetSenderPubkeyBitmap() []byte + func (x *ConsensusRequest) GetShardId() uint32 + func (x *ConsensusRequest) GetViewId() uint64 + func (x *ConsensusRequest) ProtoReflect() protoreflect.Message + func (x *ConsensusRequest) Reset() + func (x *ConsensusRequest) String() string + type DrandRequest struct + BlockHash []byte + Payload []byte + SenderPubkey []byte + ShardId uint32 + func (*DrandRequest) Descriptor() ([]byte, []int) + func (*DrandRequest) ProtoMessage() + func (x *DrandRequest) GetBlockHash() []byte + func (x *DrandRequest) GetPayload() []byte + func (x *DrandRequest) GetSenderPubkey() []byte + func (x *DrandRequest) GetShardId() uint32 + func (x *DrandRequest) ProtoReflect() protoreflect.Message + func (x *DrandRequest) Reset() + func (x *DrandRequest) String() string + type LotteryRequest struct + Amount int64 + PrivateKey string + Type LotteryRequest_Type + func (*LotteryRequest) Descriptor() ([]byte, []int) + func (*LotteryRequest) ProtoMessage() + func (x *LotteryRequest) GetAmount() int64 + func (x *LotteryRequest) GetPrivateKey() string + func (x *LotteryRequest) GetType() LotteryRequest_Type + func (x *LotteryRequest) ProtoReflect() protoreflect.Message + func (x *LotteryRequest) Reset() + func (x *LotteryRequest) String() string + type LotteryRequest_Type int32 + const LotteryRequest_ENTER + const LotteryRequest_PICK_WINNER + const LotteryRequest_RESULT + func (LotteryRequest_Type) Descriptor() protoreflect.EnumDescriptor + func (LotteryRequest_Type) EnumDescriptor() ([]byte, []int) + func (LotteryRequest_Type) Type() protoreflect.EnumType + func (x LotteryRequest_Type) Enum() *LotteryRequest_Type + func (x LotteryRequest_Type) Number() protoreflect.EnumNumber + func (x LotteryRequest_Type) String() string + type LotteryResponse struct + Balances []string + Players []string + func (*LotteryResponse) Descriptor() ([]byte, []int) + func (*LotteryResponse) ProtoMessage() + func (x *LotteryResponse) GetBalances() []string + func (x *LotteryResponse) GetPlayers() []string + func (x *LotteryResponse) ProtoReflect() protoreflect.Message + func (x *LotteryResponse) Reset() + func (x *LotteryResponse) String() string + type Message struct + Request isMessage_Request + ServiceType ServiceType + Signature []byte + Type MessageType + func (*Message) Descriptor() ([]byte, []int) + func (*Message) ProtoMessage() + func (m *Message) GetRequest() isMessage_Request + func (x *Message) GetConsensus() *ConsensusRequest + func (x *Message) GetDrand() *DrandRequest + func (x *Message) GetLotteryRequest() *LotteryRequest + func (x *Message) GetServiceType() ServiceType + func (x *Message) GetSignature() []byte + func (x *Message) GetStaking() *StakingRequest + func (x *Message) GetType() MessageType + func (x *Message) GetViewchange() *ViewChangeRequest + func (x *Message) ProtoReflect() protoreflect.Message + func (x *Message) Reset() + func (x *Message) String() string + type MessageType int32 + const MessageType_ANNOUNCE + const MessageType_COMMIT + const MessageType_COMMITTED + const MessageType_DRAND_COMMIT + const MessageType_DRAND_INIT + const MessageType_LOTTERY_REQUEST + const MessageType_NEWNODE_BEACON_STAKING + const MessageType_NEWVIEW + const MessageType_PREPARE + const MessageType_PREPARED + const MessageType_VIEWCHANGE + func (MessageType) Descriptor() protoreflect.EnumDescriptor + func (MessageType) EnumDescriptor() ([]byte, []int) + func (MessageType) Type() protoreflect.EnumType + func (x MessageType) Enum() *MessageType + func (x MessageType) Number() protoreflect.EnumNumber + func (x MessageType) String() string + type Message_Consensus struct + Consensus *ConsensusRequest + type Message_Drand struct + Drand *DrandRequest + type Message_LotteryRequest struct + LotteryRequest *LotteryRequest + type Message_Staking struct + Staking *StakingRequest + type Message_Viewchange struct + Viewchange *ViewChangeRequest + type Response struct + Response isResponse_Response + ServiceType ServiceType + Type MessageType + func (*Response) Descriptor() ([]byte, []int) + func (*Response) ProtoMessage() + func (m *Response) GetResponse() isResponse_Response + func (x *Response) GetLotteryResponse() *LotteryResponse + func (x *Response) GetServiceType() ServiceType + func (x *Response) GetType() MessageType + func (x *Response) ProtoReflect() protoreflect.Message + func (x *Response) Reset() + func (x *Response) String() string + type Response_LotteryResponse struct + LotteryResponse *LotteryResponse + type Server struct + CreateTransactionForEnterMethod func(int64, string) error + CreateTransactionForPickWinner func() error + GetResult func(string) ([]string, []*big.Int) + func NewServer(CreateTransactionForEnterMethod func(int64, string) error, ...) *Server + func (s *Server) Process(ctx context.Context, message *Message) (*Response, error) + func (s *Server) Start() (*grpc.Server, error) + func (s *Server) Stop() + type ServiceType int32 + const ServiceType_CLIENT_SUPPORT + const ServiceType_CONSENSUS + const ServiceType_DRAND + const ServiceType_STAKING + func (ServiceType) Descriptor() protoreflect.EnumDescriptor + func (ServiceType) EnumDescriptor() ([]byte, []int) + func (ServiceType) Type() protoreflect.EnumType + func (x ServiceType) Enum() *ServiceType + func (x ServiceType) Number() protoreflect.EnumNumber + func (x ServiceType) String() string + type StakingRequest struct + NodeId string + Transaction []byte + func (*StakingRequest) Descriptor() ([]byte, []int) + func (*StakingRequest) ProtoMessage() + func (x *StakingRequest) GetNodeId() string + func (x *StakingRequest) GetTransaction() []byte + func (x *StakingRequest) ProtoReflect() protoreflect.Message + func (x *StakingRequest) Reset() + func (x *StakingRequest) String() string + type UnimplementedClientServiceServer struct + func (UnimplementedClientServiceServer) Process(context.Context, *Message) (*Response, error) + type UnsafeClientServiceServer interface + type ViewChangeRequest struct + BlockNum uint64 + LeaderPubkey []byte + M2Aggsigs []byte + M2Bitmap []byte + M3Aggsigs []byte + M3Bitmap []byte + Payload []byte + PreparedBlock []byte + SenderPubkey []byte + ShardId uint32 + ViewId uint64 + ViewchangeSig []byte + ViewidSig []byte + func (*ViewChangeRequest) Descriptor() ([]byte, []int) + func (*ViewChangeRequest) ProtoMessage() + func (x *ViewChangeRequest) GetBlockNum() uint64 + func (x *ViewChangeRequest) GetLeaderPubkey() []byte + func (x *ViewChangeRequest) GetM2Aggsigs() []byte + func (x *ViewChangeRequest) GetM2Bitmap() []byte + func (x *ViewChangeRequest) GetM3Aggsigs() []byte + func (x *ViewChangeRequest) GetM3Bitmap() []byte + func (x *ViewChangeRequest) GetPayload() []byte + func (x *ViewChangeRequest) GetPreparedBlock() []byte + func (x *ViewChangeRequest) GetSenderPubkey() []byte + func (x *ViewChangeRequest) GetShardId() uint32 + func (x *ViewChangeRequest) GetViewId() uint64 + func (x *ViewChangeRequest) GetViewchangeSig() []byte + func (x *ViewChangeRequest) GetViewidSig() []byte + func (x *ViewChangeRequest) ProtoReflect() protoreflect.Message + func (x *ViewChangeRequest) Reset() + func (x *ViewChangeRequest) String() string