Documentation
¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func GetApplicationByConsAddrKey(cons sdk.ConsAddress) []byte
- func GetApplicationKey(operator sdk.ValAddress) []byte
- func GetHistoricalInfoKey(height int64) []byte
- func GetValidatorByConsAddrKey(cons sdk.ConsAddress) []byte
- func GetValidatorKey(operator sdk.ValAddress) []byte
- func GetValidatorStateKey(operator sdk.ValAddress) []byte
- func GetValidatorsByPrivilegeKey(privilege string) []byte
- func MustMarshalApplication(cdc codec.BinaryCodec, v Application) []byte
- func MustMarshalValidator(cdc codec.BinaryCodec, validator Validator) []byte
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func ValidateGenesis(data GenesisState) error
- type Application
- func (*Application) Descriptor() ([]byte, []int)
- func (m *Application) GetValidator() Validator
- func (m *Application) Marshal() (dAtA []byte, err error)
- func (m *Application) MarshalTo(dAtA []byte) (int, error)
- func (m *Application) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Application) ProtoMessage()
- func (m *Application) Reset()
- func (m *Application) Size() (n int)
- func (m *Application) String() string
- func (m *Application) Unmarshal(dAtA []byte) error
- func (m *Application) XXX_DiscardUnknown()
- func (m *Application) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Application) XXX_Merge(src proto.Message)
- func (m *Application) XXX_Size() int
- func (m *Application) XXX_Unmarshal(b []byte) error
- type Description
- func (*Description) Descriptor() ([]byte, []int)
- func (m *Description) GetDetails() string
- func (m *Description) GetIdentity() string
- func (m *Description) GetMoniker() string
- func (m *Description) GetSecurityContact() string
- func (m *Description) GetWebsite() string
- func (m *Description) Marshal() (dAtA []byte, err error)
- func (m *Description) MarshalTo(dAtA []byte) (int, error)
- func (m *Description) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Description) ProtoMessage()
- func (m *Description) Reset()
- func (m *Description) Size() (n int)
- func (m *Description) String() string
- func (m *Description) Unmarshal(dAtA []byte) error
- func (m *Description) XXX_DiscardUnknown()
- func (m *Description) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Description) XXX_Merge(src proto.Message)
- func (m *Description) XXX_Size() int
- func (m *Description) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetOwner() string
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) GetValidators() []Validator
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type HistoricalInfo
- func (*HistoricalInfo) Descriptor() ([]byte, []int)
- func (m *HistoricalInfo) GetHeader() types.Header
- func (m *HistoricalInfo) GetValset() []Validator
- func (m *HistoricalInfo) Marshal() (dAtA []byte, err error)
- func (m *HistoricalInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *HistoricalInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*HistoricalInfo) ProtoMessage()
- func (m *HistoricalInfo) Reset()
- func (m *HistoricalInfo) Size() (n int)
- func (m *HistoricalInfo) String() string
- func (m *HistoricalInfo) Unmarshal(dAtA []byte) error
- func (m *HistoricalInfo) XXX_DiscardUnknown()
- func (m *HistoricalInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HistoricalInfo) XXX_Merge(src proto.Message)
- func (m *HistoricalInfo) XXX_Size() int
- func (m *HistoricalInfo) XXX_Unmarshal(b []byte) error
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetMaxValidators() uint32
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (p Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type QueryApplicationsRequest
- func (*QueryApplicationsRequest) Descriptor() ([]byte, []int)
- func (m *QueryApplicationsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryApplicationsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryApplicationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryApplicationsRequest) ProtoMessage()
- func (m *QueryApplicationsRequest) Reset()
- func (m *QueryApplicationsRequest) Size() (n int)
- func (m *QueryApplicationsRequest) String() string
- func (m *QueryApplicationsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryApplicationsRequest) XXX_DiscardUnknown()
- func (m *QueryApplicationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryApplicationsRequest) XXX_Merge(src proto.Message)
- func (m *QueryApplicationsRequest) XXX_Size() int
- func (m *QueryApplicationsRequest) XXX_Unmarshal(b []byte) error
- type QueryApplicationsResponse
- func (*QueryApplicationsResponse) Descriptor() ([]byte, []int)
- func (m *QueryApplicationsResponse) GetApplications() []Application
- func (m *QueryApplicationsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryApplicationsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryApplicationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryApplicationsResponse) ProtoMessage()
- func (m *QueryApplicationsResponse) Reset()
- func (m *QueryApplicationsResponse) Size() (n int)
- func (m *QueryApplicationsResponse) String() string
- func (m *QueryApplicationsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryApplicationsResponse) XXX_DiscardUnknown()
- func (m *QueryApplicationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryApplicationsResponse) XXX_Merge(src proto.Message)
- func (m *QueryApplicationsResponse) XXX_Size() int
- func (m *QueryApplicationsResponse) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type QueryValidatorRequest
- func (*QueryValidatorRequest) Descriptor() ([]byte, []int)
- func (m *QueryValidatorRequest) GetOperator() string
- func (m *QueryValidatorRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryValidatorRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryValidatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryValidatorRequest) ProtoMessage()
- func (m *QueryValidatorRequest) Reset()
- func (m *QueryValidatorRequest) Size() (n int)
- func (m *QueryValidatorRequest) String() string
- func (m *QueryValidatorRequest) Unmarshal(dAtA []byte) error
- func (m *QueryValidatorRequest) XXX_DiscardUnknown()
- func (m *QueryValidatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryValidatorRequest) XXX_Merge(src proto.Message)
- func (m *QueryValidatorRequest) XXX_Size() int
- func (m *QueryValidatorRequest) XXX_Unmarshal(b []byte) error
- type QueryValidatorResponse
- func (*QueryValidatorResponse) Descriptor() ([]byte, []int)
- func (m *QueryValidatorResponse) GetValidator() Validator
- func (m *QueryValidatorResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryValidatorResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryValidatorResponse) ProtoMessage()
- func (m *QueryValidatorResponse) Reset()
- func (m *QueryValidatorResponse) Size() (n int)
- func (m *QueryValidatorResponse) String() string
- func (m *QueryValidatorResponse) Unmarshal(dAtA []byte) error
- func (m *QueryValidatorResponse) XXX_DiscardUnknown()
- func (m *QueryValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryValidatorResponse) XXX_Merge(src proto.Message)
- func (m *QueryValidatorResponse) XXX_Size() int
- func (m *QueryValidatorResponse) XXX_Unmarshal(b []byte) error
- type QueryValidatorsRequest
- func (*QueryValidatorsRequest) Descriptor() ([]byte, []int)
- func (m *QueryValidatorsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryValidatorsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryValidatorsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryValidatorsRequest) ProtoMessage()
- func (m *QueryValidatorsRequest) Reset()
- func (m *QueryValidatorsRequest) Size() (n int)
- func (m *QueryValidatorsRequest) String() string
- func (m *QueryValidatorsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryValidatorsRequest) XXX_DiscardUnknown()
- func (m *QueryValidatorsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryValidatorsRequest) XXX_Merge(src proto.Message)
- func (m *QueryValidatorsRequest) XXX_Size() int
- func (m *QueryValidatorsRequest) XXX_Unmarshal(b []byte) error
- type QueryValidatorsResponse
- func (*QueryValidatorsResponse) Descriptor() ([]byte, []int)
- func (m *QueryValidatorsResponse) GetValidators() []Validator
- func (m *QueryValidatorsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryValidatorsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryValidatorsResponse) ProtoMessage()
- func (m *QueryValidatorsResponse) Reset()
- func (m *QueryValidatorsResponse) Size() (n int)
- func (m *QueryValidatorsResponse) String() string
- func (m *QueryValidatorsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryValidatorsResponse) XXX_DiscardUnknown()
- func (m *QueryValidatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryValidatorsResponse) XXX_Merge(src proto.Message)
- func (m *QueryValidatorsResponse) XXX_Size() int
- func (m *QueryValidatorsResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) Applications(ctx context.Context, req *QueryApplicationsRequest) (*QueryApplicationsResponse, error)
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
- func (*UnimplementedQueryServer) Validator(ctx context.Context, req *QueryValidatorRequest) (*QueryValidatorResponse, error)
- func (*UnimplementedQueryServer) Validators(ctx context.Context, req *QueryValidatorsRequest) (*QueryValidatorsResponse, error)
- type Validator
- func (v Validator) ABCIValidatorUpdateAppend() abci.ValidatorUpdate
- func (v Validator) ABCIValidatorUpdateRemove() abci.ValidatorUpdate
- func (*Validator) Descriptor() ([]byte, []int)
- func (v Validator) GetConsAddress() sdk.ConsAddress
- func (v Validator) GetConsPubKey() cryptotypes.PubKey
- func (m *Validator) GetConsPubKeyBech32() string
- func (m *Validator) GetDescription() Description
- func (v Validator) GetOperator() sdk.ValAddress
- func (m *Validator) GetOperatorBech32() string
- func (m *Validator) Marshal() (dAtA []byte, err error)
- func (m *Validator) MarshalTo(dAtA []byte) (int, error)
- func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Validator) ProtoMessage()
- func (m *Validator) Reset()
- func (m *Validator) Size() (n int)
- func (m *Validator) String() string
- func (m *Validator) Unmarshal(dAtA []byte) error
- func (m *Validator) XXX_DiscardUnknown()
- func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Validator) XXX_Merge(src proto.Message)
- func (m *Validator) XXX_Size() int
- func (m *Validator) XXX_Unmarshal(b []byte) error
- type ValidatorCompat
- func (v ValidatorCompat) ConsPubKey() (cryptotypes.PubKey, error)
- func (v ValidatorCompat) GetBondedTokens() math.Int
- func (v ValidatorCompat) GetCommission() math.LegacyDec
- func (v ValidatorCompat) GetConsAddr() ([]byte, error)
- func (v ValidatorCompat) GetConsensusPower(_ math.Int) int64
- func (v ValidatorCompat) GetDelegatorShares() math.LegacyDec
- func (v ValidatorCompat) GetMinSelfDelegation() math.Int
- func (v ValidatorCompat) GetMoniker() string
- func (v ValidatorCompat) GetOperator() string
- func (v ValidatorCompat) GetStatus() stakingtypes.BondStatus
- func (v ValidatorCompat) GetTokens() math.Int
- func (v ValidatorCompat) IsBonded() bool
- func (v ValidatorCompat) IsJailed() bool
- func (v ValidatorCompat) IsUnbonded() bool
- func (v ValidatorCompat) IsUnbonding() bool
- func (v ValidatorCompat) SharesFromTokens(_ math.Int) (math.LegacyDec, error)
- func (v ValidatorCompat) SharesFromTokensTruncated(_ math.Int) (math.LegacyDec, error)
- func (v ValidatorCompat) TmConsPublicKey() (crypto.PublicKey, error)
- func (v ValidatorCompat) TokensFromShares(_ math.LegacyDec) math.LegacyDec
- func (v ValidatorCompat) TokensFromSharesRoundUp(_ math.LegacyDec) math.LegacyDec
- func (v ValidatorCompat) TokensFromSharesTruncated(_ math.LegacyDec) math.LegacyDec
- type ValidatorState
Constants ¶
const ( // ModuleName is the name of the module ModuleName = "poa" // StoreKey to be used when creating the KVStore StoreKey = ModuleName )
const ( // DefaultMaxValidators is the default maximum number of validators. DefaultMaxValidators uint32 = 150 // DefaultHistoricalEntries is the default number of historical entries // to persist in store. DefaultHistoricalEntries uint32 = 10000 // MaxDescriptionLength is the maximum allowed length of description info // that can be included in a validator MaxValidatorDescriptionLength = 100 )
Default parameter namespace
Variables ¶
var ( ErrNoValidatorFound = errorsmod.Register(ModuleName, 1, "no validator found") ErrInvalidValidator = errorsmod.Register(ModuleName, 2, "invalid validator") ErrAlreadyApplying = errorsmod.Register(ModuleName, 3, "the candidate is already applying to become a validator") ErrAlreadyValidator = errorsmod.Register(ModuleName, 4, "the candidate is already a validator") ErrMaxValidatorsReached = errorsmod.Register(ModuleName, 5, "the maximum number of validators has been reached") ErrNoApplicationFound = errorsmod.Register(ModuleName, 6, "no application found") ErrNotValidator = errorsmod.Register(ModuleName, 7, "not a validator") ErrWrongValidatorState = errorsmod.Register(ModuleName, 8, "wrong validator state") ErrOnlyOneValidator = errorsmod.Register(ModuleName, 9, "there is only one validator in the validator set") ErrOwnershipTransferNotInitialized = errorsmod.Register(ModuleName, 10, "pool ownership transfer not initialized") ErrExistingPrivilege = errorsmod.Register(ModuleName, 11, "privilege already granted to the validator") ErrMissingPrivilege = errorsmod.Register(ModuleName, 12, "privilege not granted to the validator") )
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( ParamsKey = []byte{0x10} // standalone key for module params OwnerKey = []byte{0x20} // standalone key for the owner of the validator pool CandidateOwnerKey = []byte{0x21} // standalone key for the candidate owner of the validator pool ApplicationKeyPrefix = []byte{0x30} // prefix for each key to a validator application ApplicationByConsAddrKeyPrefix = []byte{0x31} // prefix for each key to a validator application index, by consensus address ValidatorKeyPrefix = []byte{0x40} // prefix for each key to a validator ValidatorByConsAddrKeyPrefix = []byte{0x41} // prefix for each key to a validator index, by consensus address ValidatorStateKeyPrefix = []byte{0x42} // prefix for each key to a validator state ValidatorsByPrivilegeKeyPrefix = []byte{0x43} // prefix for each key to a validators sub-set, by privilege HistoricalInfoKeyPrefix = []byte{0x50} // prefix for each key to a historical info )
Standalone keys and key prefixes for the poa module.
Functions ¶
func GetApplicationByConsAddrKey ¶
func GetApplicationByConsAddrKey(cons sdk.ConsAddress) []byte
GetApplicationByConsAddrKey gets the key for a validator application by consensus address.
func GetApplicationKey ¶
func GetApplicationKey(operator sdk.ValAddress) []byte
GetApplicationKey gets the key for a validator application by operator address.
func GetHistoricalInfoKey ¶
GetHistoricalInfoKey gets the key for a historical info by height.
func GetValidatorByConsAddrKey ¶
func GetValidatorByConsAddrKey(cons sdk.ConsAddress) []byte
GetValidatorByConsAddrKey gets the key for the validator by consensus address.
func GetValidatorKey ¶
func GetValidatorKey(operator sdk.ValAddress) []byte
GetValidatorKey gets the key for the validator by operator address.
func GetValidatorStateKey ¶
func GetValidatorStateKey(operator sdk.ValAddress) []byte
GetValidatorStateKey gets the key for the validator state by operator address.
func GetValidatorsByPrivilegeKey ¶
GetValidatorsByPrivilegeKey gets the key for a validators sub-set having the given privilege. A value is a set of consensus addresses of validators that have the given privilege. We use the consensus address not the operator address because consensus-address-based lookups occur more frequently than operator-address-based lookups.
func MustMarshalApplication ¶
func MustMarshalApplication(cdc codec.BinaryCodec, v Application) []byte
MustMarshalApplication marshals an application to bytes. It panics on error.
func MustMarshalValidator ¶
func MustMarshalValidator(cdc codec.BinaryCodec, validator Validator) []byte
MustMarshalValidator marshals a validator to bytes. It panics on error.
func RegisterQueryHandler ¶
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.
func RegisterQueryHandlerFromEndpoint ¶
func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQueryHandlerServer ¶
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis validates the poa genesis parameters.
Types ¶
type Application ¶
type Application struct { // validator is the candidate that is subject of the application. Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"` }
Application represents validator's application for joining the pool.
func MustUnmarshalApplication ¶
func MustUnmarshalApplication(cdc codec.BinaryCodec, value []byte) Application
MustUnmarshalApplication unmarshals an application from bytes. It panics on error.
func NewApplication ¶
func NewApplication(validator Validator) Application
NewApplication creates a new Application instance.
func UnmarshalApplication ¶
func UnmarshalApplication(cdc codec.BinaryCodec, value []byte) (v Application, err error)
UnmarshalApplication unmarshals an application from bytes.
func (*Application) Descriptor ¶
func (*Application) Descriptor() ([]byte, []int)
func (*Application) GetValidator ¶
func (m *Application) GetValidator() Validator
func (*Application) Marshal ¶
func (m *Application) Marshal() (dAtA []byte, err error)
func (*Application) MarshalToSizedBuffer ¶
func (m *Application) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Application) ProtoMessage ¶
func (*Application) ProtoMessage()
func (*Application) Reset ¶
func (m *Application) Reset()
func (*Application) Size ¶
func (m *Application) Size() (n int)
func (*Application) String ¶
func (m *Application) String() string
func (*Application) Unmarshal ¶
func (m *Application) Unmarshal(dAtA []byte) error
func (*Application) XXX_DiscardUnknown ¶
func (m *Application) XXX_DiscardUnknown()
func (*Application) XXX_Marshal ¶
func (m *Application) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Application) XXX_Merge ¶
func (m *Application) XXX_Merge(src proto.Message)
func (*Application) XXX_Size ¶
func (m *Application) XXX_Size() int
func (*Application) XXX_Unmarshal ¶
func (m *Application) XXX_Unmarshal(b []byte) error
type Description ¶
type Description struct { // moniker is the validator's name. Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` // identity is the optional identity signature (ex. UPort or Keybase). Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // website is the optional website link. Website string `protobuf:"bytes,3,opt,name=website,proto3" json:"website,omitempty"` // security_contact is the optional security contact information. SecurityContact string `protobuf:"bytes,4,opt,name=security_contact,json=securityContact,proto3" json:"security_contact,omitempty"` // details is the optional details about the validator. Details string `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"` }
Description defines a validator description.
func NewDescription ¶
func NewDescription(moniker, identity, website, securityContact, details string) Description
NewDescription creates a new description.
func (*Description) Descriptor ¶
func (*Description) Descriptor() ([]byte, []int)
func (*Description) GetDetails ¶
func (m *Description) GetDetails() string
func (*Description) GetIdentity ¶
func (m *Description) GetIdentity() string
func (*Description) GetMoniker ¶
func (m *Description) GetMoniker() string
func (*Description) GetSecurityContact ¶
func (m *Description) GetSecurityContact() string
func (*Description) GetWebsite ¶
func (m *Description) GetWebsite() string
func (*Description) Marshal ¶
func (m *Description) Marshal() (dAtA []byte, err error)
func (*Description) MarshalToSizedBuffer ¶
func (m *Description) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Description) ProtoMessage ¶
func (*Description) ProtoMessage()
func (*Description) Reset ¶
func (m *Description) Reset()
func (*Description) Size ¶
func (m *Description) Size() (n int)
func (*Description) String ¶
func (m *Description) String() string
func (*Description) Unmarshal ¶
func (m *Description) Unmarshal(dAtA []byte) error
func (*Description) XXX_DiscardUnknown ¶
func (m *Description) XXX_DiscardUnknown()
func (*Description) XXX_Marshal ¶
func (m *Description) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Description) XXX_Merge ¶
func (m *Description) XXX_Merge(src proto.Message)
func (*Description) XXX_Size ¶
func (m *Description) XXX_Size() int
func (*Description) XXX_Unmarshal ¶
func (m *Description) XXX_Unmarshal(b []byte) error
type GenesisState ¶
type GenesisState struct { // params defines all the parameters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // owner is the initial owner of the validator pool in Bech32 format. Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` // validators defines the initial list of validators. Validators []Validator `protobuf:"bytes,3,rep,name=validators,proto3" json:"validators"` }
GenesisState defines the module's genesis state.
func DefaultGenesisState ¶
func DefaultGenesisState() *GenesisState
DefaultGenesisState defines the default GenesisState.
WARNING: The default genesis state has an empty owner address hence it is invalid (ValidateGenesis will fail). A proper owner must be set at later stages, before running the network. This is done on purpose to avoid using a random owner that cannot be controlled.
func NewGenesisState ¶
func NewGenesisState( params Params, owner sdk.AccAddress, validators []Validator, ) GenesisState
NewGenesisState creates a new GenesisState object.
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetOwner ¶
func (m *GenesisState) GetOwner() string
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) GetValidators ¶
func (m *GenesisState) GetValidators() []Validator
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type HistoricalInfo ¶
type HistoricalInfo struct { // header contains the block's header. Header types.Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header"` // valset contains the active validator set at the block. Valset []Validator `protobuf:"bytes,2,rep,name=valset,proto3" json:"valset"` }
HistoricalInfo contains header and validator information for a given block. It is stored as part of poa module's state, which persists the `n` most recent HistoricalInfo. The `n` is determined by the poa's module HistoricalEntries constant.
func MustUnmarshalHistoricalInfo ¶
func MustUnmarshalHistoricalInfo( cdc codec.BinaryCodec, value []byte, ) HistoricalInfo
MustUnmarshalHistoricalInfo wll unmarshal historical info and panic on error
func NewHistoricalInfo ¶
func NewHistoricalInfo(header tmproto.Header, valSet []Validator) HistoricalInfo
NewHistoricalInfo will create a historical information struct from header and valset it will first sort valset before inclusion into historical info
func UnmarshalHistoricalInfo ¶
func UnmarshalHistoricalInfo( cdc codec.BinaryCodec, value []byte, ) (hi HistoricalInfo, err error)
UnmarshalHistoricalInfo will unmarshal historical info and return any error
func (*HistoricalInfo) Descriptor ¶
func (*HistoricalInfo) Descriptor() ([]byte, []int)
func (*HistoricalInfo) GetHeader ¶
func (m *HistoricalInfo) GetHeader() types.Header
func (*HistoricalInfo) GetValset ¶
func (m *HistoricalInfo) GetValset() []Validator
func (*HistoricalInfo) Marshal ¶
func (m *HistoricalInfo) Marshal() (dAtA []byte, err error)
func (*HistoricalInfo) MarshalToSizedBuffer ¶
func (m *HistoricalInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*HistoricalInfo) ProtoMessage ¶
func (*HistoricalInfo) ProtoMessage()
func (*HistoricalInfo) Reset ¶
func (m *HistoricalInfo) Reset()
func (*HistoricalInfo) Size ¶
func (m *HistoricalInfo) Size() (n int)
func (*HistoricalInfo) String ¶
func (m *HistoricalInfo) String() string
func (*HistoricalInfo) Unmarshal ¶
func (m *HistoricalInfo) Unmarshal(dAtA []byte) error
func (*HistoricalInfo) XXX_DiscardUnknown ¶
func (m *HistoricalInfo) XXX_DiscardUnknown()
func (*HistoricalInfo) XXX_Marshal ¶
func (m *HistoricalInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HistoricalInfo) XXX_Merge ¶
func (m *HistoricalInfo) XXX_Merge(src proto.Message)
func (*HistoricalInfo) XXX_Size ¶
func (m *HistoricalInfo) XXX_Size() int
func (*HistoricalInfo) XXX_Unmarshal ¶
func (m *HistoricalInfo) XXX_Unmarshal(b []byte) error
type Params ¶
type Params struct { // max_validators defines the maximum number of validators in the network. MaxValidators uint32 `protobuf:"varint,1,opt,name=max_validators,json=maxValidators,proto3" json:"max_validators,omitempty"` }
Params defines the parameters for the module.
func DefaultParams ¶
func DefaultParams() Params
DefaultParams defines the parameters for this module.
func (*Params) Descriptor ¶
func (*Params) GetMaxValidators ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type QueryApplicationsRequest ¶
type QueryApplicationsRequest struct { }
QueryApplicationsRequest is request type for the Query/Applications RPC method.
func (*QueryApplicationsRequest) Descriptor ¶
func (*QueryApplicationsRequest) Descriptor() ([]byte, []int)
func (*QueryApplicationsRequest) Marshal ¶
func (m *QueryApplicationsRequest) Marshal() (dAtA []byte, err error)
func (*QueryApplicationsRequest) MarshalTo ¶
func (m *QueryApplicationsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryApplicationsRequest) MarshalToSizedBuffer ¶
func (m *QueryApplicationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryApplicationsRequest) ProtoMessage ¶
func (*QueryApplicationsRequest) ProtoMessage()
func (*QueryApplicationsRequest) Reset ¶
func (m *QueryApplicationsRequest) Reset()
func (*QueryApplicationsRequest) Size ¶
func (m *QueryApplicationsRequest) Size() (n int)
func (*QueryApplicationsRequest) String ¶
func (m *QueryApplicationsRequest) String() string
func (*QueryApplicationsRequest) Unmarshal ¶
func (m *QueryApplicationsRequest) Unmarshal(dAtA []byte) error
func (*QueryApplicationsRequest) XXX_DiscardUnknown ¶
func (m *QueryApplicationsRequest) XXX_DiscardUnknown()
func (*QueryApplicationsRequest) XXX_Marshal ¶
func (m *QueryApplicationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryApplicationsRequest) XXX_Merge ¶
func (m *QueryApplicationsRequest) XXX_Merge(src proto.Message)
func (*QueryApplicationsRequest) XXX_Size ¶
func (m *QueryApplicationsRequest) XXX_Size() int
func (*QueryApplicationsRequest) XXX_Unmarshal ¶
func (m *QueryApplicationsRequest) XXX_Unmarshal(b []byte) error
type QueryApplicationsResponse ¶
type QueryApplicationsResponse struct { // applications holds all the validators' applications of the module. Applications []Application `protobuf:"bytes,1,rep,name=applications,proto3" json:"applications"` }
QueryApplicationsResponse is response type for the Query/Applications RPC method.
func (*QueryApplicationsResponse) Descriptor ¶
func (*QueryApplicationsResponse) Descriptor() ([]byte, []int)
func (*QueryApplicationsResponse) GetApplications ¶
func (m *QueryApplicationsResponse) GetApplications() []Application
func (*QueryApplicationsResponse) Marshal ¶
func (m *QueryApplicationsResponse) Marshal() (dAtA []byte, err error)
func (*QueryApplicationsResponse) MarshalTo ¶
func (m *QueryApplicationsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryApplicationsResponse) MarshalToSizedBuffer ¶
func (m *QueryApplicationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryApplicationsResponse) ProtoMessage ¶
func (*QueryApplicationsResponse) ProtoMessage()
func (*QueryApplicationsResponse) Reset ¶
func (m *QueryApplicationsResponse) Reset()
func (*QueryApplicationsResponse) Size ¶
func (m *QueryApplicationsResponse) Size() (n int)
func (*QueryApplicationsResponse) String ¶
func (m *QueryApplicationsResponse) String() string
func (*QueryApplicationsResponse) Unmarshal ¶
func (m *QueryApplicationsResponse) Unmarshal(dAtA []byte) error
func (*QueryApplicationsResponse) XXX_DiscardUnknown ¶
func (m *QueryApplicationsResponse) XXX_DiscardUnknown()
func (*QueryApplicationsResponse) XXX_Marshal ¶
func (m *QueryApplicationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryApplicationsResponse) XXX_Merge ¶
func (m *QueryApplicationsResponse) XXX_Merge(src proto.Message)
func (*QueryApplicationsResponse) XXX_Size ¶
func (m *QueryApplicationsResponse) XXX_Size() int
func (*QueryApplicationsResponse) XXX_Unmarshal ¶
func (m *QueryApplicationsResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { // Params queries the parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Validators queries all validators of the module. Validators(ctx context.Context, in *QueryValidatorsRequest, opts ...grpc.CallOption) (*QueryValidatorsResponse, error) // Validator queries a single validator by address. Validator(ctx context.Context, in *QueryValidatorRequest, opts ...grpc.CallOption) (*QueryValidatorResponse, error) // Applications queries all validators' applications of the module. Applications(ctx context.Context, in *QueryApplicationsRequest, opts ...grpc.CallOption) (*QueryApplicationsResponse, error) }
QueryClient is the client API for Query service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewQueryClient ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryParamsRequest ¶
type QueryParamsRequest struct { }
QueryParamsRequest is request type for the Query/Params RPC method.
func (*QueryParamsRequest) Descriptor ¶
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶
type QueryParamsResponse struct { // params holds all the parameters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` }
QueryParamsResponse is response type for the Query/Params RPC method.
func (*QueryParamsResponse) Descriptor ¶
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) GetParams ¶
func (m *QueryParamsResponse) GetParams() Params
func (*QueryParamsResponse) Marshal ¶
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryParamsResponse) MarshalTo ¶
func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsResponse) MarshalToSizedBuffer ¶
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsResponse) ProtoMessage ¶
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) Size ¶
func (m *QueryParamsResponse) Size() (n int)
func (*QueryParamsResponse) String ¶
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) Unmarshal ¶
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryParamsResponse) XXX_DiscardUnknown ¶
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (*QueryParamsResponse) XXX_Marshal ¶
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsResponse) XXX_Merge ¶
func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (*QueryParamsResponse) XXX_Size ¶
func (m *QueryParamsResponse) XXX_Size() int
func (*QueryParamsResponse) XXX_Unmarshal ¶
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Params queries the parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Validators queries all validators of the module. Validators(context.Context, *QueryValidatorsRequest) (*QueryValidatorsResponse, error) // Validator queries a single validator by address. Validator(context.Context, *QueryValidatorRequest) (*QueryValidatorResponse, error) // Applications queries all validators' applications of the module. Applications(context.Context, *QueryApplicationsRequest) (*QueryApplicationsResponse, error) }
QueryServer is the server API for Query service.
type QueryValidatorRequest ¶
type QueryValidatorRequest struct { // operator is the Cosmos SDK operator address (bech32) of the validator to query. Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` }
QueryValidatorRequest is request type for the Query/Validator RPC method.
func (*QueryValidatorRequest) Descriptor ¶
func (*QueryValidatorRequest) Descriptor() ([]byte, []int)
func (*QueryValidatorRequest) GetOperator ¶
func (m *QueryValidatorRequest) GetOperator() string
func (*QueryValidatorRequest) Marshal ¶
func (m *QueryValidatorRequest) Marshal() (dAtA []byte, err error)
func (*QueryValidatorRequest) MarshalTo ¶
func (m *QueryValidatorRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryValidatorRequest) MarshalToSizedBuffer ¶
func (m *QueryValidatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryValidatorRequest) ProtoMessage ¶
func (*QueryValidatorRequest) ProtoMessage()
func (*QueryValidatorRequest) Reset ¶
func (m *QueryValidatorRequest) Reset()
func (*QueryValidatorRequest) Size ¶
func (m *QueryValidatorRequest) Size() (n int)
func (*QueryValidatorRequest) String ¶
func (m *QueryValidatorRequest) String() string
func (*QueryValidatorRequest) Unmarshal ¶
func (m *QueryValidatorRequest) Unmarshal(dAtA []byte) error
func (*QueryValidatorRequest) XXX_DiscardUnknown ¶
func (m *QueryValidatorRequest) XXX_DiscardUnknown()
func (*QueryValidatorRequest) XXX_Marshal ¶
func (m *QueryValidatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryValidatorRequest) XXX_Merge ¶
func (m *QueryValidatorRequest) XXX_Merge(src proto.Message)
func (*QueryValidatorRequest) XXX_Size ¶
func (m *QueryValidatorRequest) XXX_Size() int
func (*QueryValidatorRequest) XXX_Unmarshal ¶
func (m *QueryValidatorRequest) XXX_Unmarshal(b []byte) error
type QueryValidatorResponse ¶
type QueryValidatorResponse struct { // validator holds the queried validator. Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"` }
QueryValidatorResponse is response type for the Query/Validator RPC method.
func (*QueryValidatorResponse) Descriptor ¶
func (*QueryValidatorResponse) Descriptor() ([]byte, []int)
func (*QueryValidatorResponse) GetValidator ¶
func (m *QueryValidatorResponse) GetValidator() Validator
func (*QueryValidatorResponse) Marshal ¶
func (m *QueryValidatorResponse) Marshal() (dAtA []byte, err error)
func (*QueryValidatorResponse) MarshalTo ¶
func (m *QueryValidatorResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryValidatorResponse) MarshalToSizedBuffer ¶
func (m *QueryValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryValidatorResponse) ProtoMessage ¶
func (*QueryValidatorResponse) ProtoMessage()
func (*QueryValidatorResponse) Reset ¶
func (m *QueryValidatorResponse) Reset()
func (*QueryValidatorResponse) Size ¶
func (m *QueryValidatorResponse) Size() (n int)
func (*QueryValidatorResponse) String ¶
func (m *QueryValidatorResponse) String() string
func (*QueryValidatorResponse) Unmarshal ¶
func (m *QueryValidatorResponse) Unmarshal(dAtA []byte) error
func (*QueryValidatorResponse) XXX_DiscardUnknown ¶
func (m *QueryValidatorResponse) XXX_DiscardUnknown()
func (*QueryValidatorResponse) XXX_Marshal ¶
func (m *QueryValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryValidatorResponse) XXX_Merge ¶
func (m *QueryValidatorResponse) XXX_Merge(src proto.Message)
func (*QueryValidatorResponse) XXX_Size ¶
func (m *QueryValidatorResponse) XXX_Size() int
func (*QueryValidatorResponse) XXX_Unmarshal ¶
func (m *QueryValidatorResponse) XXX_Unmarshal(b []byte) error
type QueryValidatorsRequest ¶
type QueryValidatorsRequest struct { }
QueryValidatorsRequest is request type for the Query/Validators RPC method.
func (*QueryValidatorsRequest) Descriptor ¶
func (*QueryValidatorsRequest) Descriptor() ([]byte, []int)
func (*QueryValidatorsRequest) Marshal ¶
func (m *QueryValidatorsRequest) Marshal() (dAtA []byte, err error)
func (*QueryValidatorsRequest) MarshalTo ¶
func (m *QueryValidatorsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryValidatorsRequest) MarshalToSizedBuffer ¶
func (m *QueryValidatorsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryValidatorsRequest) ProtoMessage ¶
func (*QueryValidatorsRequest) ProtoMessage()
func (*QueryValidatorsRequest) Reset ¶
func (m *QueryValidatorsRequest) Reset()
func (*QueryValidatorsRequest) Size ¶
func (m *QueryValidatorsRequest) Size() (n int)
func (*QueryValidatorsRequest) String ¶
func (m *QueryValidatorsRequest) String() string
func (*QueryValidatorsRequest) Unmarshal ¶
func (m *QueryValidatorsRequest) Unmarshal(dAtA []byte) error
func (*QueryValidatorsRequest) XXX_DiscardUnknown ¶
func (m *QueryValidatorsRequest) XXX_DiscardUnknown()
func (*QueryValidatorsRequest) XXX_Marshal ¶
func (m *QueryValidatorsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryValidatorsRequest) XXX_Merge ¶
func (m *QueryValidatorsRequest) XXX_Merge(src proto.Message)
func (*QueryValidatorsRequest) XXX_Size ¶
func (m *QueryValidatorsRequest) XXX_Size() int
func (*QueryValidatorsRequest) XXX_Unmarshal ¶
func (m *QueryValidatorsRequest) XXX_Unmarshal(b []byte) error
type QueryValidatorsResponse ¶
type QueryValidatorsResponse struct { // validators holds all the validators of the module. Validators []Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators"` }
QueryValidatorsResponse is response type for the Query/Validators RPC method.
func (*QueryValidatorsResponse) Descriptor ¶
func (*QueryValidatorsResponse) Descriptor() ([]byte, []int)
func (*QueryValidatorsResponse) GetValidators ¶
func (m *QueryValidatorsResponse) GetValidators() []Validator
func (*QueryValidatorsResponse) Marshal ¶
func (m *QueryValidatorsResponse) Marshal() (dAtA []byte, err error)
func (*QueryValidatorsResponse) MarshalTo ¶
func (m *QueryValidatorsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryValidatorsResponse) MarshalToSizedBuffer ¶
func (m *QueryValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryValidatorsResponse) ProtoMessage ¶
func (*QueryValidatorsResponse) ProtoMessage()
func (*QueryValidatorsResponse) Reset ¶
func (m *QueryValidatorsResponse) Reset()
func (*QueryValidatorsResponse) Size ¶
func (m *QueryValidatorsResponse) Size() (n int)
func (*QueryValidatorsResponse) String ¶
func (m *QueryValidatorsResponse) String() string
func (*QueryValidatorsResponse) Unmarshal ¶
func (m *QueryValidatorsResponse) Unmarshal(dAtA []byte) error
func (*QueryValidatorsResponse) XXX_DiscardUnknown ¶
func (m *QueryValidatorsResponse) XXX_DiscardUnknown()
func (*QueryValidatorsResponse) XXX_Marshal ¶
func (m *QueryValidatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryValidatorsResponse) XXX_Merge ¶
func (m *QueryValidatorsResponse) XXX_Merge(src proto.Message)
func (*QueryValidatorsResponse) XXX_Size ¶
func (m *QueryValidatorsResponse) XXX_Size() int
func (*QueryValidatorsResponse) XXX_Unmarshal ¶
func (m *QueryValidatorsResponse) XXX_Unmarshal(b []byte) error
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Applications ¶
func (*UnimplementedQueryServer) Applications(ctx context.Context, req *QueryApplicationsRequest) (*QueryApplicationsResponse, error)
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
func (*UnimplementedQueryServer) Validator ¶
func (*UnimplementedQueryServer) Validator(ctx context.Context, req *QueryValidatorRequest) (*QueryValidatorResponse, error)
func (*UnimplementedQueryServer) Validators ¶
func (*UnimplementedQueryServer) Validators(ctx context.Context, req *QueryValidatorsRequest) (*QueryValidatorsResponse, error)
type Validator ¶
type Validator struct { // operator_bech32 is the Cosmos SDK address (bech32) identifying the validator. OperatorBech32 string `protobuf:"bytes,1,opt,name=operator_bech32,json=operatorBech32,proto3" json:"operator_bech32,omitempty"` // cons_pub_key_bech32 is the consensus public key (bech32) of the validator // used to vote on blocks. ConsPubKeyBech32 string `protobuf:"bytes,2,opt,name=cons_pub_key_bech32,json=consPubKeyBech32,proto3" json:"cons_pub_key_bech32,omitempty"` // description holds some human-readable information about the validator. Description Description `protobuf:"bytes,3,opt,name=description,proto3" json:"description"` }
Validator represents a validator in the pool.
func MustUnmarshalValidator ¶
func MustUnmarshalValidator(cdc codec.BinaryCodec, value []byte) Validator
MustUnmarshalValidator unmarshals a validator from bytes. It panics on error.
func NewValidator ¶
func NewValidator( operator sdk.ValAddress, consPubKey cryptotypes.PubKey, description Description, ) (Validator, error)
NewValidator creates a new validator. Validates inputs and returns an error if any of them is invalid.
func UnmarshalValidator ¶
func UnmarshalValidator(cdc codec.BinaryCodec, value []byte) (v Validator, err error)
UnmarshalValidator unmarshals a validator from bytes.
func (Validator) ABCIValidatorUpdateAppend ¶
func (v Validator) ABCIValidatorUpdateAppend() abci.ValidatorUpdate
ABCIValidatorUpdateAppend gets an ABCI validator update object from the validator.
func (Validator) ABCIValidatorUpdateRemove ¶
func (v Validator) ABCIValidatorUpdateRemove() abci.ValidatorUpdate
ABCIValidatorUpdateRemove gets a ABCI validator update with no voting power from the validator.
func (*Validator) Descriptor ¶
func (Validator) GetConsAddress ¶
func (v Validator) GetConsAddress() sdk.ConsAddress
GetConsAddress gets the consensus address of the validator.
func (Validator) GetConsPubKey ¶
func (v Validator) GetConsPubKey() cryptotypes.PubKey
GetConsPubKey gets the consensus public key of the validator.
func (*Validator) GetConsPubKeyBech32 ¶
func (*Validator) GetDescription ¶
func (m *Validator) GetDescription() Description
func (Validator) GetOperator ¶
func (v Validator) GetOperator() sdk.ValAddress
GetOperator gets the operator address of the validator.
func (*Validator) GetOperatorBech32 ¶
func (*Validator) MarshalToSizedBuffer ¶
func (*Validator) ProtoMessage ¶
func (*Validator) ProtoMessage()
func (*Validator) XXX_DiscardUnknown ¶
func (m *Validator) XXX_DiscardUnknown()
func (*Validator) XXX_Marshal ¶
func (*Validator) XXX_Unmarshal ¶
type ValidatorCompat ¶
type ValidatorCompat struct {
Validator
}
ValidatorCompat is a wrapper for the Poa Validator type. It is used in Connect as a compatibility wrapper for the SDK's x/staking keeper types.
func (ValidatorCompat) ConsPubKey ¶
func (v ValidatorCompat) ConsPubKey() (cryptotypes.PubKey, error)
ConsPubKey is not implemented
func (ValidatorCompat) GetBondedTokens ¶
func (v ValidatorCompat) GetBondedTokens() math.Int
GetBondedTokens returns 1 for every validator since the PoaKeeper weights each validator equally.
func (ValidatorCompat) GetCommission ¶
func (v ValidatorCompat) GetCommission() math.LegacyDec
GetCommission is not implemented
func (ValidatorCompat) GetConsAddr ¶
func (v ValidatorCompat) GetConsAddr() ([]byte, error)
GetConsAddr is not implemented
func (ValidatorCompat) GetConsensusPower ¶
func (v ValidatorCompat) GetConsensusPower(_ math.Int) int64
GetConsensusPower is not implemented
func (ValidatorCompat) GetDelegatorShares ¶
func (v ValidatorCompat) GetDelegatorShares() math.LegacyDec
GetDelegatorShares is not implemented
func (ValidatorCompat) GetMinSelfDelegation ¶
func (v ValidatorCompat) GetMinSelfDelegation() math.Int
GetMinSelfDelegation is not implemented
func (ValidatorCompat) GetMoniker ¶
func (v ValidatorCompat) GetMoniker() string
GetMoniker is not implemented
func (ValidatorCompat) GetOperator ¶
func (v ValidatorCompat) GetOperator() string
GetOperator is not implemented
func (ValidatorCompat) GetStatus ¶
func (v ValidatorCompat) GetStatus() stakingtypes.BondStatus
GetStatus is not implemented
func (ValidatorCompat) GetTokens ¶
func (v ValidatorCompat) GetTokens() math.Int
GetTokens is not implemented
func (ValidatorCompat) IsBonded ¶
func (v ValidatorCompat) IsBonded() bool
IsBonded is not implemented
func (ValidatorCompat) IsJailed ¶
func (v ValidatorCompat) IsJailed() bool
IsJailed is not implemented
func (ValidatorCompat) IsUnbonded ¶
func (v ValidatorCompat) IsUnbonded() bool
IsUnbonded is not implemented
func (ValidatorCompat) IsUnbonding ¶
func (v ValidatorCompat) IsUnbonding() bool
IsUnbonding is not implemented
func (ValidatorCompat) SharesFromTokens ¶
SharesFromTokens is not implemented
func (ValidatorCompat) SharesFromTokensTruncated ¶
SharesFromTokensTruncated is not implemented
func (ValidatorCompat) TmConsPublicKey ¶
func (v ValidatorCompat) TmConsPublicKey() (crypto.PublicKey, error)
TmConsPublicKey is not implemented
func (ValidatorCompat) TokensFromShares ¶
func (v ValidatorCompat) TokensFromShares(_ math.LegacyDec) math.LegacyDec
TokensFromShares is not implemented
func (ValidatorCompat) TokensFromSharesRoundUp ¶
func (v ValidatorCompat) TokensFromSharesRoundUp(_ math.LegacyDec) math.LegacyDec
TokensFromSharesRoundUp is not implemented
func (ValidatorCompat) TokensFromSharesTruncated ¶
func (v ValidatorCompat) TokensFromSharesTruncated(_ math.LegacyDec) math.LegacyDec
TokensFromSharesTruncated is not implemented
type ValidatorState ¶
type ValidatorState uint8
ValidatorState is the state of a validator.
const ( // ValidatorStateUnknown is the default state of a validator. ValidatorStateUnknown ValidatorState = iota // ValidatorStateJoining means that the validator is not yet present in the // Tendermint consensus validator set and will join it at the end of the block. ValidatorStateJoining // ValidatorStateActive means that the validator is present in the // Tendermint consensus validator set. ValidatorStateActive // ValidatorStateLeaving means that the validator will leave the Tendermint // consensus validator set at the end of the block. ValidatorStateLeaving )