types

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// Default power every validator created with.
	Power int32 = 10

	// Zero power is used to demote validator.
	ZeroPower int32 = 0

	// Maximum number of nodes.
	MaxNodes = 100

	// Maximum time to accept double-sign evidence.
	MaxEvidenceAge = 60 * 2 * time.Second

	// Size (number of blocks) of the sliding window used to track validator liveness.
	SignedBlocksWindow int64 = 100

	// Minimal number of blocks must have been signed per window.
	MinSignedPerWindow int64 = 50
)
View Source
const (
	EventTypeCreateValidator = "create_validator"

	AttributeKeyValidator  = "validator"
	AttributeValueCategory = ModuleName
)

validator module event types.

View Source
const (
	// ValidatorKeyPrefix is the prefix to retrieve all Validator.
	ValidatorKeyPrefix = "Validator/value/"
	// ValidatorByConsAddrKeyPrefix is the prefix to retrieve all Validator by consensus address.
	ValidatorByConsAddrKeyPrefix = "ValidatorByConsAddr/value/"
)
View Source
const (
	// ModuleName defines the module name.
	ModuleName = "validator"

	// StoreKey defines the primary module store key.
	StoreKey = ModuleName

	// RouterKey is the message route for slashing.
	RouterKey = ModuleName

	// QuerierRoute defines the module's query routing key.
	QuerierRoute = ModuleName

	// MemStoreKey defines the in-memory store key.
	MemStoreKey = "mem_validator"
)
View Source
const (
	MaxNameLength     = 70
	MaxIdentityLength = 3000
	MaxWebsiteLength  = 140
	MaxDetailsLength  = 280
)
View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default capability global index.

View Source
const (
	// LastValidatorPowerKeyPrefix is the prefix to retrieve all LastValidatorPower.
	LastValidatorPowerKeyPrefix = "LastValidatorPower/value/"
)

Variables

View Source
var (
	ErrInvalidLengthDescription        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDescription          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDescription = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthLastValidatorPower        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowLastValidatorPower          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupLastValidatorPower = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthValidator        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowValidator          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupValidator = fmt.Errorf("proto: unexpected end of group")
)
View Source
var PoolIsFull = sdkerrors.Register(ModuleName, 601, "maximum number of active nodes reached")

Functions

func ErrPoolIsFull

func ErrPoolIsFull() error

func KeyPrefix

func KeyPrefix(p string) []byte

func LastValidatorPowerKey

func LastValidatorPowerKey(
	owner sdk.ValAddress,
) []byte

LastValidatorPowerKey returns the store key to retrieve a LastValidatorPower from the index fields.

func MustMarshalValidator

func MustMarshalValidator(cdc codec.BinaryCodec, validator *Validator) []byte

return the redelegation.

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

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 ValidatorByConsAddrKey

func ValidatorByConsAddrKey(
	addr sdk.ConsAddress,
) []byte

func ValidatorKey

func ValidatorKey(
	owner sdk.ValAddress,
) []byte

ValidatorKey returns the store key to retrieve a Validator from the index fields.

Types

type DclauthKeeper

type DclauthKeeper interface {
	// Methods imported from dclauth should be defined here
	HasRole(ctx sdk.Context, addr sdk.AccAddress, roleToCheck types.AccountRole) bool
}

type Description

type Description struct {
	// a human-readable name for the validator.
	Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"`
	// optional identity signature.
	Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"`
	// optional website link.
	Website string `protobuf:"bytes,3,opt,name=website,proto3" json:"website,omitempty"`
	// optional details.
	Details string `protobuf:"bytes,4,opt,name=details,proto3" json:"details,omitempty"`
}

func NewDescription

func NewDescription(moniker string, identity, website, details string) Description

NewDescription returns a new Description with the provided values.

func (*Description) Descriptor

func (*Description) Descriptor() ([]byte, []int)

func (*Description) Equal

func (this *Description) Equal(that interface{}) bool

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) GetWebsite

func (m *Description) GetWebsite() string

func (*Description) Marshal

func (m *Description) Marshal() (dAtA []byte, err error)

func (*Description) MarshalTo

func (m *Description) MarshalTo(dAtA []byte) (int, 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 (d Description) String() string

func (*Description) Unmarshal

func (m *Description) Unmarshal(dAtA []byte) error

func (Description) Validate

func (d Description) Validate() error

Ensure the length of a validator's description.

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 {
	ValidatorList          []Validator          `protobuf:"bytes,1,rep,name=validatorList,proto3" json:"validatorList"`
	LastValidatorPowerList []LastValidatorPower `protobuf:"bytes,2,rep,name=lastValidatorPowerList,proto3" json:"lastValidatorPowerList"`
}

GenesisState defines the validator module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default Capability genesis state.

func GetGenesisStateFromAppState

func GetGenesisStateFromAppState(cdc codec.JSONCodec, appState map[string]json.RawMessage) *GenesisState

GetGenesisStateFromAppState returns x/staking GenesisState given raw application genesis state.

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetLastValidatorPowerList

func (m *GenesisState) GetLastValidatorPowerList() []LastValidatorPower

func (*GenesisState) GetValidatorList

func (m *GenesisState) GetValidatorList() []Validator

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, 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) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

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 LastValidatorPower

type LastValidatorPower struct {
	Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	Power int32  `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"`
}

func NewLastValidatorPower

func NewLastValidatorPower(owner sdk.ValAddress) LastValidatorPower

func (*LastValidatorPower) Descriptor

func (*LastValidatorPower) Descriptor() ([]byte, []int)

func (LastValidatorPower) GetOwner

func (vp LastValidatorPower) GetOwner() sdk.ValAddress

func (LastValidatorPower) GetPower

func (vp LastValidatorPower) GetPower() int32

func (*LastValidatorPower) Marshal

func (m *LastValidatorPower) Marshal() (dAtA []byte, err error)

func (*LastValidatorPower) MarshalTo

func (m *LastValidatorPower) MarshalTo(dAtA []byte) (int, error)

func (*LastValidatorPower) MarshalToSizedBuffer

func (m *LastValidatorPower) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LastValidatorPower) ProtoMessage

func (*LastValidatorPower) ProtoMessage()

func (*LastValidatorPower) Reset

func (m *LastValidatorPower) Reset()

func (*LastValidatorPower) Size

func (m *LastValidatorPower) Size() (n int)

func (LastValidatorPower) String

func (vp LastValidatorPower) String() string

func (*LastValidatorPower) Unmarshal

func (m *LastValidatorPower) Unmarshal(dAtA []byte) error

func (*LastValidatorPower) XXX_DiscardUnknown

func (m *LastValidatorPower) XXX_DiscardUnknown()

func (*LastValidatorPower) XXX_Marshal

func (m *LastValidatorPower) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LastValidatorPower) XXX_Merge

func (m *LastValidatorPower) XXX_Merge(src proto.Message)

func (*LastValidatorPower) XXX_Size

func (m *LastValidatorPower) XXX_Size() int

func (*LastValidatorPower) XXX_Unmarshal

func (m *LastValidatorPower) XXX_Unmarshal(b []byte) error

type MsgClient

type MsgClient interface {
	CreateValidator(ctx context.Context, in *MsgCreateValidator, opts ...grpc.CallOption) (*MsgCreateValidatorResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgCreateValidator

type MsgCreateValidator struct {
	Signer      string      `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty" validate:"required"`
	PubKey      *types.Any  `protobuf:"bytes,2,opt,name=pubKey,proto3" json:"pubKey,omitempty" validate:"required"`
	Description Description `protobuf:"bytes,3,opt,name=description,proto3" json:"description"`
}

func NewMsgCreateValidator

func NewMsgCreateValidator(
	signer sdk.ValAddress,
	pubKey cryptotypes.PubKey,
	description *Description,
) (*MsgCreateValidator, error)

func (*MsgCreateValidator) Descriptor

func (*MsgCreateValidator) Descriptor() ([]byte, []int)

func (*MsgCreateValidator) GetSignBytes

func (msg *MsgCreateValidator) GetSignBytes() []byte

func (*MsgCreateValidator) GetSigners

func (msg *MsgCreateValidator) GetSigners() []sdk.AccAddress

func (*MsgCreateValidator) Marshal

func (m *MsgCreateValidator) Marshal() (dAtA []byte, err error)

func (*MsgCreateValidator) MarshalTo

func (m *MsgCreateValidator) MarshalTo(dAtA []byte) (int, error)

func (*MsgCreateValidator) MarshalToSizedBuffer

func (m *MsgCreateValidator) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCreateValidator) ProtoMessage

func (*MsgCreateValidator) ProtoMessage()

func (*MsgCreateValidator) Reset

func (m *MsgCreateValidator) Reset()

func (*MsgCreateValidator) Route

func (msg *MsgCreateValidator) Route() string

func (*MsgCreateValidator) Size

func (m *MsgCreateValidator) Size() (n int)

func (*MsgCreateValidator) String

func (m *MsgCreateValidator) String() string

func (*MsgCreateValidator) Type

func (msg *MsgCreateValidator) Type() string

func (*MsgCreateValidator) Unmarshal

func (m *MsgCreateValidator) Unmarshal(dAtA []byte) error

func (MsgCreateValidator) UnpackInterfaces

func (msg MsgCreateValidator) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces.

func (*MsgCreateValidator) ValidateBasic

func (msg *MsgCreateValidator) ValidateBasic() error

func (*MsgCreateValidator) XXX_DiscardUnknown

func (m *MsgCreateValidator) XXX_DiscardUnknown()

func (*MsgCreateValidator) XXX_Marshal

func (m *MsgCreateValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCreateValidator) XXX_Merge

func (m *MsgCreateValidator) XXX_Merge(src proto.Message)

func (*MsgCreateValidator) XXX_Size

func (m *MsgCreateValidator) XXX_Size() int

func (*MsgCreateValidator) XXX_Unmarshal

func (m *MsgCreateValidator) XXX_Unmarshal(b []byte) error

type MsgCreateValidatorResponse

type MsgCreateValidatorResponse struct {
}

func (*MsgCreateValidatorResponse) Descriptor

func (*MsgCreateValidatorResponse) Descriptor() ([]byte, []int)

func (*MsgCreateValidatorResponse) Marshal

func (m *MsgCreateValidatorResponse) Marshal() (dAtA []byte, err error)

func (*MsgCreateValidatorResponse) MarshalTo

func (m *MsgCreateValidatorResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgCreateValidatorResponse) MarshalToSizedBuffer

func (m *MsgCreateValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCreateValidatorResponse) ProtoMessage

func (*MsgCreateValidatorResponse) ProtoMessage()

func (*MsgCreateValidatorResponse) Reset

func (m *MsgCreateValidatorResponse) Reset()

func (*MsgCreateValidatorResponse) Size

func (m *MsgCreateValidatorResponse) Size() (n int)

func (*MsgCreateValidatorResponse) String

func (m *MsgCreateValidatorResponse) String() string

func (*MsgCreateValidatorResponse) Unmarshal

func (m *MsgCreateValidatorResponse) Unmarshal(dAtA []byte) error

func (*MsgCreateValidatorResponse) XXX_DiscardUnknown

func (m *MsgCreateValidatorResponse) XXX_DiscardUnknown()

func (*MsgCreateValidatorResponse) XXX_Marshal

func (m *MsgCreateValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCreateValidatorResponse) XXX_Merge

func (m *MsgCreateValidatorResponse) XXX_Merge(src proto.Message)

func (*MsgCreateValidatorResponse) XXX_Size

func (m *MsgCreateValidatorResponse) XXX_Size() int

func (*MsgCreateValidatorResponse) XXX_Unmarshal

func (m *MsgCreateValidatorResponse) XXX_Unmarshal(b []byte) error

type MsgServer

type MsgServer interface {
	CreateValidator(context.Context, *MsgCreateValidator) (*MsgCreateValidatorResponse, error)
}

MsgServer is the server API for Msg service.

type QueryAllLastValidatorPowerRequest

type QueryAllLastValidatorPowerRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryAllLastValidatorPowerRequest) Descriptor

func (*QueryAllLastValidatorPowerRequest) Descriptor() ([]byte, []int)

func (*QueryAllLastValidatorPowerRequest) GetPagination

func (*QueryAllLastValidatorPowerRequest) Marshal

func (m *QueryAllLastValidatorPowerRequest) Marshal() (dAtA []byte, err error)

func (*QueryAllLastValidatorPowerRequest) MarshalTo

func (m *QueryAllLastValidatorPowerRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryAllLastValidatorPowerRequest) MarshalToSizedBuffer

func (m *QueryAllLastValidatorPowerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAllLastValidatorPowerRequest) ProtoMessage

func (*QueryAllLastValidatorPowerRequest) ProtoMessage()

func (*QueryAllLastValidatorPowerRequest) Reset

func (*QueryAllLastValidatorPowerRequest) Size

func (m *QueryAllLastValidatorPowerRequest) Size() (n int)

func (*QueryAllLastValidatorPowerRequest) String

func (*QueryAllLastValidatorPowerRequest) Unmarshal

func (m *QueryAllLastValidatorPowerRequest) Unmarshal(dAtA []byte) error

func (*QueryAllLastValidatorPowerRequest) XXX_DiscardUnknown

func (m *QueryAllLastValidatorPowerRequest) XXX_DiscardUnknown()

func (*QueryAllLastValidatorPowerRequest) XXX_Marshal

func (m *QueryAllLastValidatorPowerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAllLastValidatorPowerRequest) XXX_Merge

func (*QueryAllLastValidatorPowerRequest) XXX_Size

func (m *QueryAllLastValidatorPowerRequest) XXX_Size() int

func (*QueryAllLastValidatorPowerRequest) XXX_Unmarshal

func (m *QueryAllLastValidatorPowerRequest) XXX_Unmarshal(b []byte) error

type QueryAllLastValidatorPowerResponse

type QueryAllLastValidatorPowerResponse struct {
	LastValidatorPower []LastValidatorPower `protobuf:"bytes,1,rep,name=lastValidatorPower,proto3" json:"lastValidatorPower"`
	Pagination         *query.PageResponse  `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryAllLastValidatorPowerResponse) Descriptor

func (*QueryAllLastValidatorPowerResponse) Descriptor() ([]byte, []int)

func (*QueryAllLastValidatorPowerResponse) GetLastValidatorPower

func (m *QueryAllLastValidatorPowerResponse) GetLastValidatorPower() []LastValidatorPower

func (*QueryAllLastValidatorPowerResponse) GetPagination

func (*QueryAllLastValidatorPowerResponse) Marshal

func (m *QueryAllLastValidatorPowerResponse) Marshal() (dAtA []byte, err error)

func (*QueryAllLastValidatorPowerResponse) MarshalTo

func (m *QueryAllLastValidatorPowerResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryAllLastValidatorPowerResponse) MarshalToSizedBuffer

func (m *QueryAllLastValidatorPowerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAllLastValidatorPowerResponse) ProtoMessage

func (*QueryAllLastValidatorPowerResponse) ProtoMessage()

func (*QueryAllLastValidatorPowerResponse) Reset

func (*QueryAllLastValidatorPowerResponse) Size

func (*QueryAllLastValidatorPowerResponse) String

func (*QueryAllLastValidatorPowerResponse) Unmarshal

func (m *QueryAllLastValidatorPowerResponse) Unmarshal(dAtA []byte) error

func (*QueryAllLastValidatorPowerResponse) XXX_DiscardUnknown

func (m *QueryAllLastValidatorPowerResponse) XXX_DiscardUnknown()

func (*QueryAllLastValidatorPowerResponse) XXX_Marshal

func (m *QueryAllLastValidatorPowerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAllLastValidatorPowerResponse) XXX_Merge

func (*QueryAllLastValidatorPowerResponse) XXX_Size

func (*QueryAllLastValidatorPowerResponse) XXX_Unmarshal

func (m *QueryAllLastValidatorPowerResponse) XXX_Unmarshal(b []byte) error

type QueryAllValidatorRequest

type QueryAllValidatorRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryAllValidatorRequest) Descriptor

func (*QueryAllValidatorRequest) Descriptor() ([]byte, []int)

func (*QueryAllValidatorRequest) GetPagination

func (m *QueryAllValidatorRequest) GetPagination() *query.PageRequest

func (*QueryAllValidatorRequest) Marshal

func (m *QueryAllValidatorRequest) Marshal() (dAtA []byte, err error)

func (*QueryAllValidatorRequest) MarshalTo

func (m *QueryAllValidatorRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryAllValidatorRequest) MarshalToSizedBuffer

func (m *QueryAllValidatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAllValidatorRequest) ProtoMessage

func (*QueryAllValidatorRequest) ProtoMessage()

func (*QueryAllValidatorRequest) Reset

func (m *QueryAllValidatorRequest) Reset()

func (*QueryAllValidatorRequest) Size

func (m *QueryAllValidatorRequest) Size() (n int)

func (*QueryAllValidatorRequest) String

func (m *QueryAllValidatorRequest) String() string

func (*QueryAllValidatorRequest) Unmarshal

func (m *QueryAllValidatorRequest) Unmarshal(dAtA []byte) error

func (*QueryAllValidatorRequest) XXX_DiscardUnknown

func (m *QueryAllValidatorRequest) XXX_DiscardUnknown()

func (*QueryAllValidatorRequest) XXX_Marshal

func (m *QueryAllValidatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAllValidatorRequest) XXX_Merge

func (m *QueryAllValidatorRequest) XXX_Merge(src proto.Message)

func (*QueryAllValidatorRequest) XXX_Size

func (m *QueryAllValidatorRequest) XXX_Size() int

func (*QueryAllValidatorRequest) XXX_Unmarshal

func (m *QueryAllValidatorRequest) XXX_Unmarshal(b []byte) error

type QueryAllValidatorResponse

type QueryAllValidatorResponse struct {
	Validator  []Validator         `protobuf:"bytes,1,rep,name=validator,proto3" json:"validator"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryAllValidatorResponse) Descriptor

func (*QueryAllValidatorResponse) Descriptor() ([]byte, []int)

func (*QueryAllValidatorResponse) GetPagination

func (m *QueryAllValidatorResponse) GetPagination() *query.PageResponse

func (*QueryAllValidatorResponse) GetValidator

func (m *QueryAllValidatorResponse) GetValidator() []Validator

func (*QueryAllValidatorResponse) Marshal

func (m *QueryAllValidatorResponse) Marshal() (dAtA []byte, err error)

func (*QueryAllValidatorResponse) MarshalTo

func (m *QueryAllValidatorResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryAllValidatorResponse) MarshalToSizedBuffer

func (m *QueryAllValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAllValidatorResponse) ProtoMessage

func (*QueryAllValidatorResponse) ProtoMessage()

func (*QueryAllValidatorResponse) Reset

func (m *QueryAllValidatorResponse) Reset()

func (*QueryAllValidatorResponse) Size

func (m *QueryAllValidatorResponse) Size() (n int)

func (*QueryAllValidatorResponse) String

func (m *QueryAllValidatorResponse) String() string

func (*QueryAllValidatorResponse) Unmarshal

func (m *QueryAllValidatorResponse) Unmarshal(dAtA []byte) error

func (*QueryAllValidatorResponse) XXX_DiscardUnknown

func (m *QueryAllValidatorResponse) XXX_DiscardUnknown()

func (*QueryAllValidatorResponse) XXX_Marshal

func (m *QueryAllValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAllValidatorResponse) XXX_Merge

func (m *QueryAllValidatorResponse) XXX_Merge(src proto.Message)

func (*QueryAllValidatorResponse) XXX_Size

func (m *QueryAllValidatorResponse) XXX_Size() int

func (*QueryAllValidatorResponse) XXX_Unmarshal

func (m *QueryAllValidatorResponse) XXX_Unmarshal(b []byte) error

type QueryClient

type QueryClient interface {
	// Queries a validator by index.
	Validator(ctx context.Context, in *QueryGetValidatorRequest, opts ...grpc.CallOption) (*QueryGetValidatorResponse, error)
	// Queries a list of validator items.
	ValidatorAll(ctx context.Context, in *QueryAllValidatorRequest, opts ...grpc.CallOption) (*QueryAllValidatorResponse, error)
	// Queries a lastValidatorPower by index.
	LastValidatorPower(ctx context.Context, in *QueryGetLastValidatorPowerRequest, opts ...grpc.CallOption) (*QueryGetLastValidatorPowerResponse, error)
	// Queries a list of lastValidatorPower items.
	LastValidatorPowerAll(ctx context.Context, in *QueryAllLastValidatorPowerRequest, opts ...grpc.CallOption) (*QueryAllLastValidatorPowerResponse, 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 QueryGetLastValidatorPowerRequest

type QueryGetLastValidatorPowerRequest struct {
	Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
}

func (*QueryGetLastValidatorPowerRequest) Descriptor

func (*QueryGetLastValidatorPowerRequest) Descriptor() ([]byte, []int)

func (*QueryGetLastValidatorPowerRequest) GetOwner

func (*QueryGetLastValidatorPowerRequest) Marshal

func (m *QueryGetLastValidatorPowerRequest) Marshal() (dAtA []byte, err error)

func (*QueryGetLastValidatorPowerRequest) MarshalTo

func (m *QueryGetLastValidatorPowerRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryGetLastValidatorPowerRequest) MarshalToSizedBuffer

func (m *QueryGetLastValidatorPowerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGetLastValidatorPowerRequest) ProtoMessage

func (*QueryGetLastValidatorPowerRequest) ProtoMessage()

func (*QueryGetLastValidatorPowerRequest) Reset

func (*QueryGetLastValidatorPowerRequest) Size

func (m *QueryGetLastValidatorPowerRequest) Size() (n int)

func (*QueryGetLastValidatorPowerRequest) String

func (*QueryGetLastValidatorPowerRequest) Unmarshal

func (m *QueryGetLastValidatorPowerRequest) Unmarshal(dAtA []byte) error

func (*QueryGetLastValidatorPowerRequest) XXX_DiscardUnknown

func (m *QueryGetLastValidatorPowerRequest) XXX_DiscardUnknown()

func (*QueryGetLastValidatorPowerRequest) XXX_Marshal

func (m *QueryGetLastValidatorPowerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGetLastValidatorPowerRequest) XXX_Merge

func (*QueryGetLastValidatorPowerRequest) XXX_Size

func (m *QueryGetLastValidatorPowerRequest) XXX_Size() int

func (*QueryGetLastValidatorPowerRequest) XXX_Unmarshal

func (m *QueryGetLastValidatorPowerRequest) XXX_Unmarshal(b []byte) error

type QueryGetLastValidatorPowerResponse

type QueryGetLastValidatorPowerResponse struct {
	LastValidatorPower LastValidatorPower `protobuf:"bytes,1,opt,name=lastValidatorPower,proto3" json:"lastValidatorPower"`
}

func (*QueryGetLastValidatorPowerResponse) Descriptor

func (*QueryGetLastValidatorPowerResponse) Descriptor() ([]byte, []int)

func (*QueryGetLastValidatorPowerResponse) GetLastValidatorPower

func (m *QueryGetLastValidatorPowerResponse) GetLastValidatorPower() LastValidatorPower

func (*QueryGetLastValidatorPowerResponse) Marshal

func (m *QueryGetLastValidatorPowerResponse) Marshal() (dAtA []byte, err error)

func (*QueryGetLastValidatorPowerResponse) MarshalTo

func (m *QueryGetLastValidatorPowerResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryGetLastValidatorPowerResponse) MarshalToSizedBuffer

func (m *QueryGetLastValidatorPowerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGetLastValidatorPowerResponse) ProtoMessage

func (*QueryGetLastValidatorPowerResponse) ProtoMessage()

func (*QueryGetLastValidatorPowerResponse) Reset

func (*QueryGetLastValidatorPowerResponse) Size

func (*QueryGetLastValidatorPowerResponse) String

func (*QueryGetLastValidatorPowerResponse) Unmarshal

func (m *QueryGetLastValidatorPowerResponse) Unmarshal(dAtA []byte) error

func (*QueryGetLastValidatorPowerResponse) XXX_DiscardUnknown

func (m *QueryGetLastValidatorPowerResponse) XXX_DiscardUnknown()

func (*QueryGetLastValidatorPowerResponse) XXX_Marshal

func (m *QueryGetLastValidatorPowerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGetLastValidatorPowerResponse) XXX_Merge

func (*QueryGetLastValidatorPowerResponse) XXX_Size

func (*QueryGetLastValidatorPowerResponse) XXX_Unmarshal

func (m *QueryGetLastValidatorPowerResponse) XXX_Unmarshal(b []byte) error

type QueryGetValidatorRequest

type QueryGetValidatorRequest struct {
	Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
}

func (*QueryGetValidatorRequest) Descriptor

func (*QueryGetValidatorRequest) Descriptor() ([]byte, []int)

func (*QueryGetValidatorRequest) GetOwner

func (m *QueryGetValidatorRequest) GetOwner() string

func (*QueryGetValidatorRequest) Marshal

func (m *QueryGetValidatorRequest) Marshal() (dAtA []byte, err error)

func (*QueryGetValidatorRequest) MarshalTo

func (m *QueryGetValidatorRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryGetValidatorRequest) MarshalToSizedBuffer

func (m *QueryGetValidatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGetValidatorRequest) ProtoMessage

func (*QueryGetValidatorRequest) ProtoMessage()

func (*QueryGetValidatorRequest) Reset

func (m *QueryGetValidatorRequest) Reset()

func (*QueryGetValidatorRequest) Size

func (m *QueryGetValidatorRequest) Size() (n int)

func (*QueryGetValidatorRequest) String

func (m *QueryGetValidatorRequest) String() string

func (*QueryGetValidatorRequest) Unmarshal

func (m *QueryGetValidatorRequest) Unmarshal(dAtA []byte) error

func (*QueryGetValidatorRequest) XXX_DiscardUnknown

func (m *QueryGetValidatorRequest) XXX_DiscardUnknown()

func (*QueryGetValidatorRequest) XXX_Marshal

func (m *QueryGetValidatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGetValidatorRequest) XXX_Merge

func (m *QueryGetValidatorRequest) XXX_Merge(src proto.Message)

func (*QueryGetValidatorRequest) XXX_Size

func (m *QueryGetValidatorRequest) XXX_Size() int

func (*QueryGetValidatorRequest) XXX_Unmarshal

func (m *QueryGetValidatorRequest) XXX_Unmarshal(b []byte) error

type QueryGetValidatorResponse

type QueryGetValidatorResponse struct {
	Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"`
}

func (*QueryGetValidatorResponse) Descriptor

func (*QueryGetValidatorResponse) Descriptor() ([]byte, []int)

func (*QueryGetValidatorResponse) GetValidator

func (m *QueryGetValidatorResponse) GetValidator() Validator

func (*QueryGetValidatorResponse) Marshal

func (m *QueryGetValidatorResponse) Marshal() (dAtA []byte, err error)

func (*QueryGetValidatorResponse) MarshalTo

func (m *QueryGetValidatorResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryGetValidatorResponse) MarshalToSizedBuffer

func (m *QueryGetValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGetValidatorResponse) ProtoMessage

func (*QueryGetValidatorResponse) ProtoMessage()

func (*QueryGetValidatorResponse) Reset

func (m *QueryGetValidatorResponse) Reset()

func (*QueryGetValidatorResponse) Size

func (m *QueryGetValidatorResponse) Size() (n int)

func (*QueryGetValidatorResponse) String

func (m *QueryGetValidatorResponse) String() string

func (*QueryGetValidatorResponse) Unmarshal

func (m *QueryGetValidatorResponse) Unmarshal(dAtA []byte) error

func (*QueryGetValidatorResponse) XXX_DiscardUnknown

func (m *QueryGetValidatorResponse) XXX_DiscardUnknown()

func (*QueryGetValidatorResponse) XXX_Marshal

func (m *QueryGetValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGetValidatorResponse) XXX_Merge

func (m *QueryGetValidatorResponse) XXX_Merge(src proto.Message)

func (*QueryGetValidatorResponse) XXX_Size

func (m *QueryGetValidatorResponse) XXX_Size() int

func (*QueryGetValidatorResponse) XXX_Unmarshal

func (m *QueryGetValidatorResponse) XXX_Unmarshal(b []byte) error

type QueryServer

type QueryServer interface {
	// Queries a validator by index.
	Validator(context.Context, *QueryGetValidatorRequest) (*QueryGetValidatorResponse, error)
	// Queries a list of validator items.
	ValidatorAll(context.Context, *QueryAllValidatorRequest) (*QueryAllValidatorResponse, error)
	// Queries a lastValidatorPower by index.
	LastValidatorPower(context.Context, *QueryGetLastValidatorPowerRequest) (*QueryGetLastValidatorPowerResponse, error)
	// Queries a list of lastValidatorPower items.
	LastValidatorPowerAll(context.Context, *QueryAllLastValidatorPowerRequest) (*QueryAllLastValidatorPowerResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) CreateValidator

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Validator

func (*UnimplementedQueryServer) ValidatorAll

type Validator

type Validator struct {
	// the account address of validator owner
	Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	// description of the validator
	Description *Description `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// the consensus public key of the tendermint validator
	PubKey *types.Any `protobuf:"bytes,3,opt,name=pubKey,proto3" json:"pubKey,omitempty"`
	// validator consensus power
	Power int32 `protobuf:"varint,4,opt,name=power,proto3" json:"power,omitempty"`
	// has the validator been removed from validator set
	Jailed bool `protobuf:"varint,5,opt,name=jailed,proto3" json:"jailed,omitempty"`
	// the reason of validator jailing
	JailedReason string `protobuf:"bytes,6,opt,name=jailedReason,proto3" json:"jailedReason,omitempty"`
}

func MustUnmarshalValidator

func MustUnmarshalValidator(cdc codec.BinaryCodec, value []byte) Validator

unmarshal a redelegation from a store value.

func NewValidator

func NewValidator(owner sdk.ValAddress, pubKey cryptotypes.PubKey, description Description) (Validator, error)

func UnmarshalValidator

func UnmarshalValidator(cdc codec.BinaryCodec, value []byte) (v Validator, err error)

unmarshal a redelegation from a store value.

func (Validator) ABCIValidatorUpdate

func (v Validator) ABCIValidatorUpdate() abci.ValidatorUpdate

ABCI ValidatorUpdate message to add new validator to validator set.

func (Validator) ABCIValidatorUpdateZero

func (v Validator) ABCIValidatorUpdateZero() abci.ValidatorUpdate

ABCI ValidatorUpdate message to remove validator from validator set.

func (*Validator) Descriptor

func (*Validator) Descriptor() ([]byte, []int)

func (Validator) GetConsAddr

func (v Validator) GetConsAddr() (sdk.ConsAddress, error)

GetConsAddr extracts Consensus key address.

func (Validator) GetConsAddress

func (v Validator) GetConsAddress() (sdk.ConsAddress, error)

func (Validator) GetConsPubKey

func (v Validator) GetConsPubKey() (cryptotypes.PubKey, error)

func (Validator) GetMoniker

func (v Validator) GetMoniker() string

func (Validator) GetOwner

func (v Validator) GetOwner() sdk.ValAddress

func (Validator) GetPower

func (v Validator) GetPower() int32

func (Validator) IsJailed

func (v Validator) IsJailed() bool

func (*Validator) Marshal

func (m *Validator) Marshal() (dAtA []byte, err error)

func (*Validator) MarshalTo

func (m *Validator) MarshalTo(dAtA []byte) (int, error)

func (*Validator) MarshalToSizedBuffer

func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Validator) ProtoMessage

func (*Validator) ProtoMessage()

func (*Validator) Reset

func (m *Validator) Reset()

func (*Validator) Size

func (m *Validator) Size() (n int)

func (Validator) String

func (v Validator) String() string

func (Validator) TmConsPublicKey

func (v Validator) TmConsPublicKey() (tmprotocrypto.PublicKey, error)

TmConsPublicKey casts Validator.Pubkey to tmprotocrypto.PubKey.

func (*Validator) Unmarshal

func (m *Validator) Unmarshal(dAtA []byte) error

func (Validator) UnpackInterfaces

func (v Validator) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces.

func (*Validator) XXX_DiscardUnknown

func (m *Validator) XXX_DiscardUnknown()

func (*Validator) XXX_Marshal

func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Validator) XXX_Merge

func (m *Validator) XXX_Merge(src proto.Message)

func (*Validator) XXX_Size

func (m *Validator) XXX_Size() int

func (*Validator) XXX_Unmarshal

func (m *Validator) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL