types

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeDowngraded = "validator_downgraded"
	EventTypeTombstoned = "validator_tombstoned"
)
View Source
const (
	// ModuleName defines the module name
	ModuleName = "locking"

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

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_locking"
)
View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default global index

Variables

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 (
	ParamsKey       = collections.NewPrefix(0)
	LockingKey      = collections.NewPrefix(1)
	PowerRankingKey = collections.NewPrefix(2)
	ValidatorSetKey = collections.NewPrefix(3)
	ValidatorsKey   = collections.NewPrefix(4)
	TokensKey       = collections.NewPrefix(5)
	SlashedKey      = collections.NewPrefix(6)
	EthTxNonceKey   = collections.NewPrefix(7)
	EthTxQueueKey   = collections.NewPrefix(8)
	RewardPoolKey   = collections.NewPrefix(9)
	UnlockQueueKey  = collections.NewPrefix(10)
	ThresholdKey    = collections.NewPrefix(11)
)
View Source
var (
	ErrInvalidLengthLocking        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowLocking          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupLocking = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = 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 (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Msg_serviceDesc = _Msg_serviceDesc
View Source
var PowerReduction = math.NewIntFromUint64(1e18)
View Source
var Query_serviceDesc = _Query_serviceDesc
View Source
var ValidatorStatus_name = map[int32]string{
	0: "VALIDATOR_STATUS_UNSPECIFIED",
	1: "VALIDATOR_STATUS_PENDING",
	2: "VALIDATOR_STATUS_ACTIVE",
	3: "VALIDATOR_STATUS_TOMBSTONED",
	4: "VALIDATOR_STATUS_DOWNGRADE",
	5: "VALIDATOR_STATUS_INACTIVE",
}
View Source
var ValidatorStatus_value = map[string]int32{
	"VALIDATOR_STATUS_UNSPECIFIED": 0,
	"VALIDATOR_STATUS_PENDING":     1,
	"VALIDATOR_STATUS_ACTIVE":      2,
	"VALIDATOR_STATUS_TOMBSTONED":  3,
	"VALIDATOR_STATUS_DOWNGRADE":   4,
	"VALIDATOR_STATUS_INACTIVE":    5,
}

Functions

func KeyPrefix

func KeyPrefix(p string) []byte

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 TokenDenom

func TokenDenom(token common.Address) string

func ValidatorDowngradedEvent

func ValidatorDowngradedEvent(validator sdktypes.ConsAddress) sdktypes.Event

func ValidatorName

func ValidatorName(val sdktypes.ConsAddress) string

func ValidatorTombstonedEvent

func ValidatorTombstonedEvent(validator sdktypes.ConsAddress) sdktypes.Event

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(context.Context, sdk.AccAddress) sdk.AccountI
	HasAccount(context.Context, sdk.AccAddress) bool
	SetAccount(context.Context, sdk.AccountI)
	RemoveAccount(ctx context.Context, acc sdk.AccountI)
	NewAccountWithAddress(ctx context.Context, addr sdk.AccAddress) sdk.AccountI
}

AccountKeeper defines the expected interface for the Account module.

type EthTxQueue

type EthTxQueue struct {
	Rewards []*Reward `protobuf:"bytes,1,rep,name=rewards,proto3" json:"rewards,omitempty"`
	Unlocks []*Unlock `protobuf:"bytes,2,rep,name=unlocks,proto3" json:"unlocks,omitempty"`
}

EthTxQueue

func (*EthTxQueue) Descriptor

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

func (*EthTxQueue) GetRewards

func (m *EthTxQueue) GetRewards() []*Reward

func (*EthTxQueue) GetUnlocks

func (m *EthTxQueue) GetUnlocks() []*Unlock

func (*EthTxQueue) Marshal

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

func (*EthTxQueue) MarshalTo

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

func (*EthTxQueue) MarshalToSizedBuffer

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

func (*EthTxQueue) ProtoMessage

func (*EthTxQueue) ProtoMessage()

func (*EthTxQueue) Reset

func (m *EthTxQueue) Reset()

func (*EthTxQueue) Size

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

func (*EthTxQueue) String

func (m *EthTxQueue) String() string

func (*EthTxQueue) Unmarshal

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

func (*EthTxQueue) XXX_DiscardUnknown

func (m *EthTxQueue) XXX_DiscardUnknown()

func (*EthTxQueue) XXX_Marshal

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

func (*EthTxQueue) XXX_Merge

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

func (*EthTxQueue) XXX_Size

func (m *EthTxQueue) XXX_Size() int

func (*EthTxQueue) XXX_Unmarshal

func (m *EthTxQueue) 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"`
	Validators  []Validator                              `protobuf:"bytes,2,rep,name=validators,proto3" json:"validators"`
	Tokens      []*TokenGenesis                          `protobuf:"bytes,3,rep,name=tokens,proto3" json:"tokens,omitempty"`
	Slashed     github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=slashed,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"slashed"`
	EthTxNonce  uint64                                   `protobuf:"varint,5,opt,name=eth_tx_nonce,json=ethTxNonce,proto3" json:"eth_tx_nonce,omitempty"`
	EthTxQueue  EthTxQueue                               `protobuf:"bytes,6,opt,name=eth_tx_queue,json=ethTxQueue,proto3" json:"eth_tx_queue"`
	RewardPool  RewardPool                               `protobuf:"bytes,7,opt,name=reward_pool,json=rewardPool,proto3" json:"reward_pool"`
	UnlockQueue []*UnlockQueueGenesis                    `protobuf:"bytes,8,rep,name=unlock_queue,json=unlockQueue,proto3" json:"unlock_queue,omitempty"`
}

GenesisState defines the locking module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetEthTxNonce

func (m *GenesisState) GetEthTxNonce() uint64

func (*GenesisState) GetEthTxQueue

func (m *GenesisState) GetEthTxQueue() EthTxQueue

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetRewardPool

func (m *GenesisState) GetRewardPool() RewardPool

func (*GenesisState) GetSlashed

func (*GenesisState) GetTokens

func (m *GenesisState) GetTokens() []*TokenGenesis

func (*GenesisState) GetUnlockQueue

func (m *GenesisState) GetUnlockQueue() []*UnlockQueueGenesis

func (*GenesisState) GetValidators

func (m *GenesisState) GetValidators() []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 MsgClient

type MsgClient interface {
}

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 MsgServer

type MsgServer interface {
}

MsgServer is the server API for Msg service.

type Params

type Params struct {
	// the partial unlock duation
	UnlockDuration time.Duration `protobuf:"bytes,1,opt,name=unlock_duration,json=unlockDuration,proto3,stdduration" json:"unlock_duration"`
	// if the token amount is less then threshold, the validator will be the
	// inactive status the validator operator should wait for long then paritial
	// unlock duation
	ExitingDuration      time.Duration `protobuf:"bytes,2,opt,name=exiting_duration,json=exitingDuration,proto3,stdduration" json:"exiting_duration"`
	DowntimeJailDuration time.Duration `protobuf:"bytes,3,opt,name=downtime_jail_duration,json=downtimeJailDuration,proto3,stdduration" json:"downtime_jail_duration"`
	// max_validators is the maximum number of validators.
	MaxValidators           int64                       `protobuf:"varint,4,opt,name=max_validators,json=maxValidators,proto3" json:"max_validators,omitempty"`
	SignedBlocksWindow      int64                       `protobuf:"varint,5,opt,name=signed_blocks_window,json=signedBlocksWindow,proto3" json:"signed_blocks_window,omitempty"`
	MaxMissedPerWindow      int64                       `protobuf:"varint,6,opt,name=max_missed_per_window,json=maxMissedPerWindow,proto3" json:"max_missed_per_window,omitempty"`
	SlashFractionDoubleSign cosmossdk_io_math.LegacyDec `` /* 163-byte string literal not displayed */
	SlashFractionDowntime   cosmossdk_io_math.LegacyDec `` /* 155-byte string literal not displayed */
	HalvingInterval         int64                       `protobuf:"varint,9,opt,name=halving_interval,json=halvingInterval,proto3" json:"halving_interval,omitempty"`
	InitialBlockReward      int64                       `protobuf:"varint,10,opt,name=initial_block_reward,json=initialBlockReward,proto3" json:"initial_block_reward,omitempty"`
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters.

func NewParams

func NewParams() Params

NewParams creates a new Params instance.

func (*Params) Descriptor

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

func (*Params) GetDowntimeJailDuration

func (m *Params) GetDowntimeJailDuration() time.Duration

func (*Params) GetExitingDuration

func (m *Params) GetExitingDuration() time.Duration

func (*Params) GetHalvingInterval

func (m *Params) GetHalvingInterval() int64

func (*Params) GetInitialBlockReward

func (m *Params) GetInitialBlockReward() int64

func (*Params) GetMaxMissedPerWindow

func (m *Params) GetMaxMissedPerWindow() int64

func (*Params) GetMaxValidators

func (m *Params) GetMaxValidators() int64

func (*Params) GetSignedBlocksWindow

func (m *Params) GetSignedBlocksWindow() int64

func (*Params) GetUnlockDuration

func (m *Params) GetUnlockDuration() time.Duration

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate validates the set of params.

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Parameters queries the parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Validator queries validator state by address.
	Validator(ctx context.Context, in *QueryValidatorRequest, opts ...grpc.CallOption) (*QueryValidatorResponse, 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 this 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 {
	// Parameters queries the parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Validator queries validator state by address.
	Validator(context.Context, *QueryValidatorRequest) (*QueryValidatorResponse, error)
}

QueryServer is the server API for Query service.

type QueryValidatorRequest

type QueryValidatorRequest struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

QueryValidatorRequest

func (*QueryValidatorRequest) Descriptor

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

func (*QueryValidatorRequest) GetAddress

func (m *QueryValidatorRequest) GetAddress() 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 Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"`
}

QueryValidatorResponse

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 Reward

type Reward struct {
	Id        uint64                `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Recipient []byte                `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"`
	Goat      cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=goat,proto3,customtype=cosmossdk.io/math.Int" json:"goat"`
	Gas       cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=gas,proto3,customtype=cosmossdk.io/math.Int" json:"gas"`
}

Reward

func (*Reward) Descriptor

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

func (*Reward) EthTx

func (r *Reward) EthTx(seq uint64) *ethtypes.Transaction

func (*Reward) GetId

func (m *Reward) GetId() uint64

func (*Reward) GetRecipient

func (m *Reward) GetRecipient() []byte

func (*Reward) Marshal

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

func (*Reward) MarshalTo

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

func (*Reward) MarshalToSizedBuffer

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

func (*Reward) ProtoMessage

func (*Reward) ProtoMessage()

func (*Reward) Reset

func (m *Reward) Reset()

func (*Reward) Size

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

func (*Reward) String

func (m *Reward) String() string

func (*Reward) Unmarshal

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

func (*Reward) XXX_DiscardUnknown

func (m *Reward) XXX_DiscardUnknown()

func (*Reward) XXX_Marshal

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

func (*Reward) XXX_Merge

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

func (*Reward) XXX_Size

func (m *Reward) XXX_Size() int

func (*Reward) XXX_Unmarshal

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

type RewardPool

type RewardPool struct {
	// the goat reward for the last block
	Goat cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=goat,proto3,customtype=cosmossdk.io/math.Int" json:"goat"`
	// the gas fee for the last block
	Gas cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=gas,proto3,customtype=cosmossdk.io/math.Int" json:"gas"`
	// the remain goat reward in the pool
	Remain cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=remain,proto3,customtype=cosmossdk.io/math.Int" json:"remain"`
}

RewardPool

func (*RewardPool) Descriptor

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

func (*RewardPool) Marshal

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

func (*RewardPool) MarshalTo

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

func (*RewardPool) MarshalToSizedBuffer

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

func (*RewardPool) ProtoMessage

func (*RewardPool) ProtoMessage()

func (*RewardPool) Reset

func (m *RewardPool) Reset()

func (*RewardPool) Size

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

func (*RewardPool) String

func (m *RewardPool) String() string

func (*RewardPool) Unmarshal

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

func (*RewardPool) XXX_DiscardUnknown

func (m *RewardPool) XXX_DiscardUnknown()

func (*RewardPool) XXX_Marshal

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

func (*RewardPool) XXX_Merge

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

func (*RewardPool) XXX_Size

func (m *RewardPool) XXX_Size() int

func (*RewardPool) XXX_Unmarshal

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

type SigningInfo

type SigningInfo struct {
	// offset of the current sign window
	Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
	// missed of the current sign window
	Missed int64 `protobuf:"varint,2,opt,name=missed,proto3" json:"missed,omitempty"`
}

SigningInfo

func (*SigningInfo) Descriptor

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

func (*SigningInfo) GetMissed

func (m *SigningInfo) GetMissed() int64

func (*SigningInfo) GetOffset

func (m *SigningInfo) GetOffset() int64

func (*SigningInfo) Marshal

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

func (*SigningInfo) MarshalTo

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

func (*SigningInfo) MarshalToSizedBuffer

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

func (*SigningInfo) ProtoMessage

func (*SigningInfo) ProtoMessage()

func (*SigningInfo) Reset

func (m *SigningInfo) Reset()

func (*SigningInfo) Size

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

func (*SigningInfo) String

func (m *SigningInfo) String() string

func (*SigningInfo) Unmarshal

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

func (*SigningInfo) XXX_DiscardUnknown

func (m *SigningInfo) XXX_DiscardUnknown()

func (*SigningInfo) XXX_Marshal

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

func (*SigningInfo) XXX_Merge

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

func (*SigningInfo) XXX_Size

func (m *SigningInfo) XXX_Size() int

func (*SigningInfo) XXX_Unmarshal

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

type Threshold

type Threshold struct {
	List github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=list,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"list"`
}

Threshold

func (*Threshold) Descriptor

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

func (*Threshold) GetList

func (*Threshold) Marshal

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

func (*Threshold) MarshalTo

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

func (*Threshold) MarshalToSizedBuffer

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

func (*Threshold) ProtoMessage

func (*Threshold) ProtoMessage()

func (*Threshold) Reset

func (m *Threshold) Reset()

func (*Threshold) Size

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

func (*Threshold) String

func (m *Threshold) String() string

func (*Threshold) Unmarshal

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

func (*Threshold) XXX_DiscardUnknown

func (m *Threshold) XXX_DiscardUnknown()

func (*Threshold) XXX_Marshal

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

func (*Threshold) XXX_Merge

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

func (*Threshold) XXX_Size

func (m *Threshold) XXX_Size() int

func (*Threshold) XXX_Unmarshal

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

type Token

type Token struct {
	Weight    uint64                `protobuf:"varint,1,opt,name=weight,proto3" json:"weight,omitempty"`
	Threshold cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=threshold,proto3,customtype=cosmossdk.io/math.Int" json:"threshold"`
}

Token config

func (*Token) Descriptor

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

func (*Token) GetWeight

func (m *Token) GetWeight() uint64

func (*Token) Marshal

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

func (*Token) MarshalTo

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

func (*Token) MarshalToSizedBuffer

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

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) Reset

func (m *Token) Reset()

func (*Token) Size

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

func (*Token) String

func (m *Token) String() string

func (*Token) Unmarshal

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

func (*Token) XXX_DiscardUnknown

func (m *Token) XXX_DiscardUnknown()

func (*Token) XXX_Marshal

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

func (*Token) XXX_Merge

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

func (*Token) XXX_Size

func (m *Token) XXX_Size() int

func (*Token) XXX_Unmarshal

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

type TokenGenesis

type TokenGenesis struct {
	Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
	Token Token  `protobuf:"bytes,2,opt,name=token,proto3" json:"token"`
}

TokenGenesis

func (*TokenGenesis) Descriptor

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

func (*TokenGenesis) GetDenom

func (m *TokenGenesis) GetDenom() string

func (*TokenGenesis) GetToken

func (m *TokenGenesis) GetToken() Token

func (*TokenGenesis) Marshal

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

func (*TokenGenesis) MarshalTo

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

func (*TokenGenesis) MarshalToSizedBuffer

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

func (*TokenGenesis) ProtoMessage

func (*TokenGenesis) ProtoMessage()

func (*TokenGenesis) Reset

func (m *TokenGenesis) Reset()

func (*TokenGenesis) Size

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

func (*TokenGenesis) String

func (m *TokenGenesis) String() string

func (*TokenGenesis) Unmarshal

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

func (*TokenGenesis) XXX_DiscardUnknown

func (m *TokenGenesis) XXX_DiscardUnknown()

func (*TokenGenesis) XXX_Marshal

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

func (*TokenGenesis) XXX_Merge

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

func (*TokenGenesis) XXX_Size

func (m *TokenGenesis) XXX_Size() int

func (*TokenGenesis) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) Validator

type Unlock

type Unlock struct {
	Id        uint64                `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Token     []byte                `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	Recipient []byte                `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"`
	Amount    cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"`
}

Unlock

func (*Unlock) Descriptor

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

func (*Unlock) EthTx

func (l *Unlock) EthTx(seq uint64) *ethtypes.Transaction

func (*Unlock) GetId

func (m *Unlock) GetId() uint64

func (*Unlock) GetRecipient

func (m *Unlock) GetRecipient() []byte

func (*Unlock) GetToken

func (m *Unlock) GetToken() []byte

func (*Unlock) Marshal

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

func (*Unlock) MarshalTo

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

func (*Unlock) MarshalToSizedBuffer

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

func (*Unlock) ProtoMessage

func (*Unlock) ProtoMessage()

func (*Unlock) Reset

func (m *Unlock) Reset()

func (*Unlock) Size

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

func (*Unlock) String

func (m *Unlock) String() string

func (*Unlock) Unmarshal

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

func (*Unlock) XXX_DiscardUnknown

func (m *Unlock) XXX_DiscardUnknown()

func (*Unlock) XXX_Marshal

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

func (*Unlock) XXX_Merge

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

func (*Unlock) XXX_Size

func (m *Unlock) XXX_Size() int

func (*Unlock) XXX_Unmarshal

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

type UnlockQueueGenesis

type UnlockQueueGenesis struct {
	Timestamp time.Time `protobuf:"bytes,1,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
	Unlocks   []*Unlock `protobuf:"bytes,2,rep,name=unlocks,proto3" json:"unlocks,omitempty"`
}

UnlockQueueGenesis

func (*UnlockQueueGenesis) Descriptor

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

func (*UnlockQueueGenesis) GetTimestamp

func (m *UnlockQueueGenesis) GetTimestamp() time.Time

func (*UnlockQueueGenesis) GetUnlocks

func (m *UnlockQueueGenesis) GetUnlocks() []*Unlock

func (*UnlockQueueGenesis) Marshal

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

func (*UnlockQueueGenesis) MarshalTo

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

func (*UnlockQueueGenesis) MarshalToSizedBuffer

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

func (*UnlockQueueGenesis) ProtoMessage

func (*UnlockQueueGenesis) ProtoMessage()

func (*UnlockQueueGenesis) Reset

func (m *UnlockQueueGenesis) Reset()

func (*UnlockQueueGenesis) Size

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

func (*UnlockQueueGenesis) String

func (m *UnlockQueueGenesis) String() string

func (*UnlockQueueGenesis) Unmarshal

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

func (*UnlockQueueGenesis) XXX_DiscardUnknown

func (m *UnlockQueueGenesis) XXX_DiscardUnknown()

func (*UnlockQueueGenesis) XXX_Marshal

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

func (*UnlockQueueGenesis) XXX_Merge

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

func (*UnlockQueueGenesis) XXX_Size

func (m *UnlockQueueGenesis) XXX_Size() int

func (*UnlockQueueGenesis) XXX_Unmarshal

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

type Unlocks

type Unlocks struct {
	Unlocks []*Unlock `protobuf:"bytes,1,rep,name=unlocks,proto3" json:"unlocks,omitempty"`
}

Unlocks

func (*Unlocks) Descriptor

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

func (*Unlocks) GetUnlocks

func (m *Unlocks) GetUnlocks() []*Unlock

func (*Unlocks) Marshal

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

func (*Unlocks) MarshalTo

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

func (*Unlocks) MarshalToSizedBuffer

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

func (*Unlocks) ProtoMessage

func (*Unlocks) ProtoMessage()

func (*Unlocks) Reset

func (m *Unlocks) Reset()

func (*Unlocks) Size

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

func (*Unlocks) String

func (m *Unlocks) String() string

func (*Unlocks) Unmarshal

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

func (*Unlocks) XXX_DiscardUnknown

func (m *Unlocks) XXX_DiscardUnknown()

func (*Unlocks) XXX_Marshal

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

func (*Unlocks) XXX_Merge

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

func (*Unlocks) XXX_Size

func (m *Unlocks) XXX_Size() int

func (*Unlocks) XXX_Unmarshal

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

type Validator

type Validator struct {
	Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
	Power  uint64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"`
	// the total locking
	Locking github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=locking,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"locking"`
	// unclaimed goat reward
	Reward cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=reward,proto3,customtype=cosmossdk.io/math.Int" json:"reward"`
	// unclaimed gas fee rewrad
	GasReward   cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=gas_reward,json=gasReward,proto3,customtype=cosmossdk.io/math.Int" json:"gas_reward"`
	Status      ValidatorStatus       `protobuf:"varint,6,opt,name=status,proto3,enum=goat.locking.v1.ValidatorStatus" json:"status,omitempty"`
	SigningInfo SigningInfo           `protobuf:"bytes,7,opt,name=signing_info,json=signingInfo,proto3" json:"signing_info"`
	// Timestamp until which the validator is jailed due to liveness downtime.
	JailedUntil time.Time `protobuf:"bytes,8,opt,name=jailed_until,json=jailedUntil,proto3,stdtime" json:"jailed_until"`
}

Validator

func (*Validator) CMPubkey

func (v *Validator) CMPubkey() tmcrypto.PublicKey

func (*Validator) Descriptor

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

func (*Validator) GetJailedUntil

func (m *Validator) GetJailedUntil() time.Time

func (*Validator) GetLocking

func (*Validator) GetPower

func (m *Validator) GetPower() uint64

func (*Validator) GetPubkey

func (m *Validator) GetPubkey() []byte

func (*Validator) GetSigningInfo

func (m *Validator) GetSigningInfo() SigningInfo

func (*Validator) GetStatus

func (m *Validator) GetStatus() ValidatorStatus

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 (m *Validator) String() string

func (*Validator) Unmarshal

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

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

type ValidatorStatus

type ValidatorStatus int32

ValidatorStatus is the status of a validator.

const (
	// UNSPECIFIED defines an invalid validator status.
	Unspecified ValidatorStatus = 0
	// Pending means the validator is waitting for
	Pending ValidatorStatus = 1
	// Active means the validator is producing and voting new blocks
	Active ValidatorStatus = 2
	// Tombstoned means the validator did malicious behaviors like double sign and
	// killed out
	Tombstoned ValidatorStatus = 3
	// Downgrade means the validator is offline
	Downgrade ValidatorStatus = 4
	// Inactive means the validator is exiting in progress or exited
	Inactive ValidatorStatus = 5
)

func (ValidatorStatus) EnumDescriptor

func (ValidatorStatus) EnumDescriptor() ([]byte, []int)

func (ValidatorStatus) String

func (x ValidatorStatus) String() string

Jump to

Keyboard shortcuts

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