Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterValidatorStateServer(s grpc.ServiceRegistrar, srv ValidatorStateServer)
- type GetCurrentHeightResponse
- func (*GetCurrentHeightResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetCurrentHeightResponse) GetHeight() uint64
- func (*GetCurrentHeightResponse) ProtoMessage()
- func (x *GetCurrentHeightResponse) ProtoReflect() protoreflect.Message
- func (x *GetCurrentHeightResponse) Reset()
- func (x *GetCurrentHeightResponse) String() string
- type GetMinimumHeightResponse
- func (*GetMinimumHeightResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetMinimumHeightResponse) GetHeight() uint64
- func (*GetMinimumHeightResponse) ProtoMessage()
- func (x *GetMinimumHeightResponse) ProtoReflect() protoreflect.Message
- func (x *GetMinimumHeightResponse) Reset()
- func (x *GetMinimumHeightResponse) String() string
- type GetSupernetIDRequest
- func (*GetSupernetIDRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetSupernetIDRequest) GetChainId() []byte
- func (*GetSupernetIDRequest) ProtoMessage()
- func (x *GetSupernetIDRequest) ProtoReflect() protoreflect.Message
- func (x *GetSupernetIDRequest) Reset()
- func (x *GetSupernetIDRequest) String() string
- type GetSupernetIDResponse
- func (*GetSupernetIDResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetSupernetIDResponse) GetSupernetId() []byte
- func (*GetSupernetIDResponse) ProtoMessage()
- func (x *GetSupernetIDResponse) ProtoReflect() protoreflect.Message
- func (x *GetSupernetIDResponse) Reset()
- func (x *GetSupernetIDResponse) String() string
- type GetValidatorSetRequest
- func (*GetValidatorSetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetValidatorSetRequest) GetHeight() uint64
- func (x *GetValidatorSetRequest) GetSupernetId() []byte
- func (*GetValidatorSetRequest) ProtoMessage()
- func (x *GetValidatorSetRequest) ProtoReflect() protoreflect.Message
- func (x *GetValidatorSetRequest) Reset()
- func (x *GetValidatorSetRequest) String() string
- type GetValidatorSetResponse
- func (*GetValidatorSetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetValidatorSetResponse) GetValidators() []*Validator
- func (*GetValidatorSetResponse) ProtoMessage()
- func (x *GetValidatorSetResponse) ProtoReflect() protoreflect.Message
- func (x *GetValidatorSetResponse) Reset()
- func (x *GetValidatorSetResponse) String() string
- type UnimplementedValidatorStateServer
- func (UnimplementedValidatorStateServer) GetCurrentHeight(context.Context, *emptypb.Empty) (*GetCurrentHeightResponse, error)
- func (UnimplementedValidatorStateServer) GetMinimumHeight(context.Context, *emptypb.Empty) (*GetMinimumHeightResponse, error)
- func (UnimplementedValidatorStateServer) GetSupernetID(context.Context, *GetSupernetIDRequest) (*GetSupernetIDResponse, error)
- func (UnimplementedValidatorStateServer) GetValidatorSet(context.Context, *GetValidatorSetRequest) (*GetValidatorSetResponse, error)
- type UnsafeValidatorStateServer
- type Validator
- func (*Validator) Descriptor() ([]byte, []int)deprecated
- func (x *Validator) GetNodeId() []byte
- func (x *Validator) GetPublicKey() []byte
- func (x *Validator) GetWeight() uint64
- func (*Validator) ProtoMessage()
- func (x *Validator) ProtoReflect() protoreflect.Message
- func (x *Validator) Reset()
- func (x *Validator) String() string
- type ValidatorStateClient
- type ValidatorStateServer
Constants ¶
const ( ValidatorState_GetMinimumHeight_FullMethodName = "/validatorstate.ValidatorState/GetMinimumHeight" ValidatorState_GetCurrentHeight_FullMethodName = "/validatorstate.ValidatorState/GetCurrentHeight" ValidatorState_GetSupernetID_FullMethodName = "/validatorstate.ValidatorState/GetSupernetID" ValidatorState_GetValidatorSet_FullMethodName = "/validatorstate.ValidatorState/GetValidatorSet" )
Variables ¶
var File_validatorstate_validator_state_proto protoreflect.FileDescriptor
var ValidatorState_ServiceDesc = grpc.ServiceDesc{ ServiceName: "validatorstate.ValidatorState", HandlerType: (*ValidatorStateServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetMinimumHeight", Handler: _ValidatorState_GetMinimumHeight_Handler, }, { MethodName: "GetCurrentHeight", Handler: _ValidatorState_GetCurrentHeight_Handler, }, { MethodName: "GetSupernetID", Handler: _ValidatorState_GetSupernetID_Handler, }, { MethodName: "GetValidatorSet", Handler: _ValidatorState_GetValidatorSet_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "validatorstate/validator_state.proto", }
ValidatorState_ServiceDesc is the grpc.ServiceDesc for ValidatorState service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterValidatorStateServer ¶
func RegisterValidatorStateServer(s grpc.ServiceRegistrar, srv ValidatorStateServer)
Types ¶
type GetCurrentHeightResponse ¶
type GetCurrentHeightResponse struct { Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` // contains filtered or unexported fields }
func (*GetCurrentHeightResponse) Descriptor
deprecated
func (*GetCurrentHeightResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetCurrentHeightResponse.ProtoReflect.Descriptor instead.
func (*GetCurrentHeightResponse) GetHeight ¶
func (x *GetCurrentHeightResponse) GetHeight() uint64
func (*GetCurrentHeightResponse) ProtoMessage ¶
func (*GetCurrentHeightResponse) ProtoMessage()
func (*GetCurrentHeightResponse) ProtoReflect ¶
func (x *GetCurrentHeightResponse) ProtoReflect() protoreflect.Message
func (*GetCurrentHeightResponse) Reset ¶
func (x *GetCurrentHeightResponse) Reset()
func (*GetCurrentHeightResponse) String ¶
func (x *GetCurrentHeightResponse) String() string
type GetMinimumHeightResponse ¶
type GetMinimumHeightResponse struct { Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` // contains filtered or unexported fields }
func (*GetMinimumHeightResponse) Descriptor
deprecated
func (*GetMinimumHeightResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetMinimumHeightResponse.ProtoReflect.Descriptor instead.
func (*GetMinimumHeightResponse) GetHeight ¶
func (x *GetMinimumHeightResponse) GetHeight() uint64
func (*GetMinimumHeightResponse) ProtoMessage ¶
func (*GetMinimumHeightResponse) ProtoMessage()
func (*GetMinimumHeightResponse) ProtoReflect ¶
func (x *GetMinimumHeightResponse) ProtoReflect() protoreflect.Message
func (*GetMinimumHeightResponse) Reset ¶
func (x *GetMinimumHeightResponse) Reset()
func (*GetMinimumHeightResponse) String ¶
func (x *GetMinimumHeightResponse) String() string
type GetSupernetIDRequest ¶
type GetSupernetIDRequest struct { ChainId []byte `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // contains filtered or unexported fields }
func (*GetSupernetIDRequest) Descriptor
deprecated
func (*GetSupernetIDRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetSupernetIDRequest.ProtoReflect.Descriptor instead.
func (*GetSupernetIDRequest) GetChainId ¶
func (x *GetSupernetIDRequest) GetChainId() []byte
func (*GetSupernetIDRequest) ProtoMessage ¶
func (*GetSupernetIDRequest) ProtoMessage()
func (*GetSupernetIDRequest) ProtoReflect ¶
func (x *GetSupernetIDRequest) ProtoReflect() protoreflect.Message
func (*GetSupernetIDRequest) Reset ¶
func (x *GetSupernetIDRequest) Reset()
func (*GetSupernetIDRequest) String ¶
func (x *GetSupernetIDRequest) String() string
type GetSupernetIDResponse ¶
type GetSupernetIDResponse struct { SupernetId []byte `protobuf:"bytes,1,opt,name=supernet_id,json=supernetId,proto3" json:"supernet_id,omitempty"` // contains filtered or unexported fields }
func (*GetSupernetIDResponse) Descriptor
deprecated
func (*GetSupernetIDResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetSupernetIDResponse.ProtoReflect.Descriptor instead.
func (*GetSupernetIDResponse) GetSupernetId ¶
func (x *GetSupernetIDResponse) GetSupernetId() []byte
func (*GetSupernetIDResponse) ProtoMessage ¶
func (*GetSupernetIDResponse) ProtoMessage()
func (*GetSupernetIDResponse) ProtoReflect ¶
func (x *GetSupernetIDResponse) ProtoReflect() protoreflect.Message
func (*GetSupernetIDResponse) Reset ¶
func (x *GetSupernetIDResponse) Reset()
func (*GetSupernetIDResponse) String ¶
func (x *GetSupernetIDResponse) String() string
type GetValidatorSetRequest ¶
type GetValidatorSetRequest struct { Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` SupernetId []byte `protobuf:"bytes,2,opt,name=supernet_id,json=supernetId,proto3" json:"supernet_id,omitempty"` // contains filtered or unexported fields }
func (*GetValidatorSetRequest) Descriptor
deprecated
func (*GetValidatorSetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetValidatorSetRequest.ProtoReflect.Descriptor instead.
func (*GetValidatorSetRequest) GetHeight ¶
func (x *GetValidatorSetRequest) GetHeight() uint64
func (*GetValidatorSetRequest) GetSupernetId ¶
func (x *GetValidatorSetRequest) GetSupernetId() []byte
func (*GetValidatorSetRequest) ProtoMessage ¶
func (*GetValidatorSetRequest) ProtoMessage()
func (*GetValidatorSetRequest) ProtoReflect ¶
func (x *GetValidatorSetRequest) ProtoReflect() protoreflect.Message
func (*GetValidatorSetRequest) Reset ¶
func (x *GetValidatorSetRequest) Reset()
func (*GetValidatorSetRequest) String ¶
func (x *GetValidatorSetRequest) String() string
type GetValidatorSetResponse ¶
type GetValidatorSetResponse struct { Validators []*Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"` // contains filtered or unexported fields }
func (*GetValidatorSetResponse) Descriptor
deprecated
func (*GetValidatorSetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetValidatorSetResponse.ProtoReflect.Descriptor instead.
func (*GetValidatorSetResponse) GetValidators ¶
func (x *GetValidatorSetResponse) GetValidators() []*Validator
func (*GetValidatorSetResponse) ProtoMessage ¶
func (*GetValidatorSetResponse) ProtoMessage()
func (*GetValidatorSetResponse) ProtoReflect ¶
func (x *GetValidatorSetResponse) ProtoReflect() protoreflect.Message
func (*GetValidatorSetResponse) Reset ¶
func (x *GetValidatorSetResponse) Reset()
func (*GetValidatorSetResponse) String ¶
func (x *GetValidatorSetResponse) String() string
type UnimplementedValidatorStateServer ¶
type UnimplementedValidatorStateServer struct { }
UnimplementedValidatorStateServer must be embedded to have forward compatible implementations.
func (UnimplementedValidatorStateServer) GetCurrentHeight ¶
func (UnimplementedValidatorStateServer) GetCurrentHeight(context.Context, *emptypb.Empty) (*GetCurrentHeightResponse, error)
func (UnimplementedValidatorStateServer) GetMinimumHeight ¶
func (UnimplementedValidatorStateServer) GetMinimumHeight(context.Context, *emptypb.Empty) (*GetMinimumHeightResponse, error)
func (UnimplementedValidatorStateServer) GetSupernetID ¶
func (UnimplementedValidatorStateServer) GetSupernetID(context.Context, *GetSupernetIDRequest) (*GetSupernetIDResponse, error)
func (UnimplementedValidatorStateServer) GetValidatorSet ¶
func (UnimplementedValidatorStateServer) GetValidatorSet(context.Context, *GetValidatorSetRequest) (*GetValidatorSetResponse, error)
type UnsafeValidatorStateServer ¶
type UnsafeValidatorStateServer interface {
// contains filtered or unexported methods
}
UnsafeValidatorStateServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ValidatorStateServer will result in compilation errors.
type Validator ¶
type Validator struct { NodeId []byte `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` Weight uint64 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` PublicKey []byte `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // contains filtered or unexported fields }
func (*Validator) Descriptor
deprecated
func (*Validator) GetPublicKey ¶
func (*Validator) ProtoMessage ¶
func (*Validator) ProtoMessage()
func (*Validator) ProtoReflect ¶
func (x *Validator) ProtoReflect() protoreflect.Message
type ValidatorStateClient ¶
type ValidatorStateClient interface { // GetMinimumHeight returns the minimum height of the blocks in the optimal // proposal window. GetMinimumHeight(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetMinimumHeightResponse, error) // GetCurrentHeight returns the current height of the P-chain. GetCurrentHeight(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetCurrentHeightResponse, error) // GetSupernetID returns the supernetID of the provided chain. GetSupernetID(ctx context.Context, in *GetSupernetIDRequest, opts ...grpc.CallOption) (*GetSupernetIDResponse, error) // GetValidatorSet returns the weights of the nodeIDs for the provided // supernet at the requested P-chain height. GetValidatorSet(ctx context.Context, in *GetValidatorSetRequest, opts ...grpc.CallOption) (*GetValidatorSetResponse, error) }
ValidatorStateClient is the client API for ValidatorState service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewValidatorStateClient ¶
func NewValidatorStateClient(cc grpc.ClientConnInterface) ValidatorStateClient
type ValidatorStateServer ¶
type ValidatorStateServer interface { // GetMinimumHeight returns the minimum height of the blocks in the optimal // proposal window. GetMinimumHeight(context.Context, *emptypb.Empty) (*GetMinimumHeightResponse, error) // GetCurrentHeight returns the current height of the P-chain. GetCurrentHeight(context.Context, *emptypb.Empty) (*GetCurrentHeightResponse, error) // GetSupernetID returns the supernetID of the provided chain. GetSupernetID(context.Context, *GetSupernetIDRequest) (*GetSupernetIDResponse, error) // GetValidatorSet returns the weights of the nodeIDs for the provided // supernet at the requested P-chain height. GetValidatorSet(context.Context, *GetValidatorSetRequest) (*GetValidatorSetResponse, error) // contains filtered or unexported methods }
ValidatorStateServer is the server API for ValidatorState service. All implementations must embed UnimplementedValidatorStateServer for forward compatibility