types

package
v0.36.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ErrFProxyAddress    = "could not get the proxy address"
	ErrFOperatorAddress = "could not get the operator address"
	ErrFSnapshot        = "could not get the snapshot"
	ErrValidators       = "could not get the validators"
)

module errors

View Source
const (
	AttributeModule               = ModuleName
	AttributeAddress              = "address"
	AttributeRegisterProxy        = "registerProxy"
	AttributeDeactivateProxy      = "deactivateProxy"
	AttributeParticipants         = "participants"
	AttributeParticipantsStake    = "participantsStake"
	AttributeNonParticipants      = "nonParticipants"
	AttributeNonParticipantsStake = "nonParticipantsStake"
)

Event attribute keys

View Source
const (
	// ModuleName is the name of the module
	ModuleName = "snapshot"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName

	// RouterKey to be used for routing msgs
	RouterKey = ModuleName

	// QuerierRoute to be used for legacy query routing
	QuerierRoute = ModuleName

	// RestRoute to be used for rest routing
	RestRoute = ModuleName
)

ModuleName must be different from "staking" otherwise we conflict with the sdk staking module

View Source
const (
	AttributeValueStart = "start"
)

Event attribute values

View Source
const (
	EventTypeCreateSnapshot = "createSnapshot"
)

Event types

Variables

View Source
var (
	ErrSnapshot         = sdkerrors.Register(ModuleName, 2, "snapshot error")
	ErrInvalidChain     = sdkerrors.Register(ModuleName, 3, "invalid chain")
	ErrInvalidValidator = sdkerrors.Register(ModuleName, 4, "invalid validator")
)

module errors

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 (
	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 (
	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 (
	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 (
	// KeyMinProxyBalance is the key for the minimum proxy balance
	KeyMinProxyBalance = []byte("minproxybalance")
)
View Source
var ModuleCdc = codec.NewAminoCodec(amino)

ModuleCdc defines the module codec

Functions

func KeyTable

func KeyTable() params.KeyTable

KeyTable retrieves a subspace table for the module

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

RegisterInterfaces registers types and interfaces with the given registry

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers concrete types on codec

func RegisterMsgServiceHandler

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

RegisterMsgServiceHandler registers the http handlers for service MsgService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterMsgServiceHandlerClient

func RegisterMsgServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgServiceClient) error

RegisterMsgServiceHandlerClient registers the http handlers for service MsgService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MsgServiceClient" to call the correct interceptors.

func RegisterMsgServiceHandlerFromEndpoint

func RegisterMsgServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterMsgServiceHandlerFromEndpoint is same as RegisterMsgServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterMsgServiceHandlerServer

func RegisterMsgServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServiceServer) error

RegisterMsgServiceHandlerServer registers the http handlers for service MsgService to "mux". UnaryRPC :call MsgServiceServer 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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterMsgServiceHandlerFromEndpoint instead.

func RegisterMsgServiceServer

func RegisterMsgServiceServer(s grpc1.Server, srv MsgServiceServer)

func RegisterQueryServiceHandler added in v0.34.0

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

RegisterQueryServiceHandler registers the http handlers for service QueryService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryServiceHandlerClient added in v0.34.0

func RegisterQueryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryServiceClient) error

RegisterQueryServiceHandlerClient registers the http handlers for service QueryService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryServiceClient" to call the correct interceptors.

func RegisterQueryServiceHandlerFromEndpoint added in v0.34.0

func RegisterQueryServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryServiceHandlerFromEndpoint is same as RegisterQueryServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryServiceHandlerServer added in v0.34.0

func RegisterQueryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServiceServer) error

RegisterQueryServiceHandlerServer registers the http handlers for service QueryService to "mux". UnaryRPC :call QueryServiceServer 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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryServiceHandlerFromEndpoint instead.

func RegisterQueryServiceServer added in v0.34.0

func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer)

Types

type BankKeeper

type BankKeeper interface {
	SpendableBalance(ctx sdk.Context, address sdk.AccAddress, denom string) sdk.Coin
}

BankKeeper adopts the GetBalance function of the bank keeper that is used by this module

type DeactivateProxyRequest

type DeactivateProxyRequest struct {
	Sender github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=sender,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"sender,omitempty"`
}

func NewDeactivateProxyRequest

func NewDeactivateProxyRequest(sender sdk.ValAddress) *DeactivateProxyRequest

NewDeactivateProxyRequest - DeregisterProxyRequest constructor

func (*DeactivateProxyRequest) Descriptor

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

func (DeactivateProxyRequest) GetSignBytes

func (m DeactivateProxyRequest) GetSignBytes() []byte

GetSignBytes returns the message bytes that need to be signed

func (DeactivateProxyRequest) GetSigners

func (m DeactivateProxyRequest) GetSigners() []sdk.AccAddress

GetSigners returns the set of signers for this message

func (*DeactivateProxyRequest) Marshal

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

func (*DeactivateProxyRequest) MarshalTo

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

func (*DeactivateProxyRequest) MarshalToSizedBuffer

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

func (*DeactivateProxyRequest) ProtoMessage

func (*DeactivateProxyRequest) ProtoMessage()

func (*DeactivateProxyRequest) Reset

func (m *DeactivateProxyRequest) Reset()

func (DeactivateProxyRequest) Route

func (m DeactivateProxyRequest) Route() string

Route returns the route for this message

func (*DeactivateProxyRequest) Size

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

func (*DeactivateProxyRequest) String

func (m *DeactivateProxyRequest) String() string

func (DeactivateProxyRequest) Type

func (m DeactivateProxyRequest) Type() string

Type returns the type of the message

func (*DeactivateProxyRequest) Unmarshal

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

func (DeactivateProxyRequest) ValidateBasic

func (m DeactivateProxyRequest) ValidateBasic() error

ValidateBasic executes a stateless message validation

func (*DeactivateProxyRequest) XXX_DiscardUnknown

func (m *DeactivateProxyRequest) XXX_DiscardUnknown()

func (*DeactivateProxyRequest) XXX_Marshal

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

func (*DeactivateProxyRequest) XXX_Merge

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

func (*DeactivateProxyRequest) XXX_Size

func (m *DeactivateProxyRequest) XXX_Size() int

func (*DeactivateProxyRequest) XXX_Unmarshal

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

type DeactivateProxyResponse

type DeactivateProxyResponse struct {
}

func (*DeactivateProxyResponse) Descriptor

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

func (*DeactivateProxyResponse) Marshal

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

func (*DeactivateProxyResponse) MarshalTo

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

func (*DeactivateProxyResponse) MarshalToSizedBuffer

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

func (*DeactivateProxyResponse) ProtoMessage

func (*DeactivateProxyResponse) ProtoMessage()

func (*DeactivateProxyResponse) Reset

func (m *DeactivateProxyResponse) Reset()

func (*DeactivateProxyResponse) Size

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

func (*DeactivateProxyResponse) String

func (m *DeactivateProxyResponse) String() string

func (*DeactivateProxyResponse) Unmarshal

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

func (*DeactivateProxyResponse) XXX_DiscardUnknown

func (m *DeactivateProxyResponse) XXX_DiscardUnknown()

func (*DeactivateProxyResponse) XXX_Marshal

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

func (*DeactivateProxyResponse) XXX_Merge

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

func (*DeactivateProxyResponse) XXX_Size

func (m *DeactivateProxyResponse) XXX_Size() int

func (*DeactivateProxyResponse) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	Params            Params             `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	ProxiedValidators []ProxiedValidator `protobuf:"bytes,2,rep,name=proxied_validators,json=proxiedValidators,proto3" json:"proxied_validators"`
}

GenesisState represents the genesis state

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState returns a genesis state with default parameters

func GetGenesisStateFromAppState

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

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

func NewGenesisState added in v0.9.0

func NewGenesisState(params Params, proxiedValidators []ProxiedValidator) *GenesisState

NewGenesisState is the constructor for GenesisState

func (*GenesisState) Descriptor

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

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 (m GenesisState) Validate() error

Validate performs a validation check on the genesis parameters

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 MsgServiceClient

type MsgServiceClient interface {
	// RegisterProxy defines a method for registering a proxy account that can act
	// in a validator account's stead.
	RegisterProxy(ctx context.Context, in *RegisterProxyRequest, opts ...grpc.CallOption) (*RegisterProxyResponse, error)
	// DeactivateProxy defines a method for deregistering a proxy account.
	DeactivateProxy(ctx context.Context, in *DeactivateProxyRequest, opts ...grpc.CallOption) (*DeactivateProxyResponse, error)
}

MsgServiceClient is the client API for MsgService service.

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

func NewMsgServiceClient

func NewMsgServiceClient(cc grpc1.ClientConn) MsgServiceClient

type MsgServiceServer

type MsgServiceServer interface {
	// RegisterProxy defines a method for registering a proxy account that can act
	// in a validator account's stead.
	RegisterProxy(context.Context, *RegisterProxyRequest) (*RegisterProxyResponse, error)
	// DeactivateProxy defines a method for deregistering a proxy account.
	DeactivateProxy(context.Context, *DeactivateProxyRequest) (*DeactivateProxyResponse, error)
}

MsgServiceServer is the server API for MsgService service.

type Nexus added in v0.10.0

type Nexus interface {
	GetChains(ctx sdk.Context) []nexus.Chain
	IsChainMaintainer(ctx sdk.Context, chain exported.Chain, maintainer sdk.ValAddress) bool
	RemoveChainMaintainer(ctx sdk.Context, chain nexus.Chain, maintainer sdk.ValAddress) error
}

Nexus provides functionality to manage cross-chain transfers

type Params

type Params struct {
	MinProxyBalance int64 `protobuf:"varint,1,opt,name=min_proxy_balance,json=minProxyBalance,proto3" json:"min_proxy_balance,omitempty"`
}

Params represent the genesis parameters for the module

func DefaultParams

func DefaultParams() Params

DefaultParams - the module's default parameters

func (*Params) Descriptor

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

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

func (m *Params) ParamSetPairs() params.ParamSetPairs

ParamSetPairs implements the ParamSet interface and returns all the key/value pairs pairs of snapshot module's parameters.

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 (m Params) Validate() error

Validate performs a validation check on the parameters

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 ParamsRequest added in v0.34.0

type ParamsRequest struct {
}

ParamsRequest represents a message that queries the params

func (*ParamsRequest) Descriptor added in v0.34.0

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

func (*ParamsRequest) Marshal added in v0.34.0

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

func (*ParamsRequest) MarshalTo added in v0.34.0

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

func (*ParamsRequest) MarshalToSizedBuffer added in v0.34.0

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

func (*ParamsRequest) ProtoMessage added in v0.34.0

func (*ParamsRequest) ProtoMessage()

func (*ParamsRequest) Reset added in v0.34.0

func (m *ParamsRequest) Reset()

func (*ParamsRequest) Size added in v0.34.0

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

func (*ParamsRequest) String added in v0.34.0

func (m *ParamsRequest) String() string

func (*ParamsRequest) Unmarshal added in v0.34.0

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

func (*ParamsRequest) XXX_DiscardUnknown added in v0.34.0

func (m *ParamsRequest) XXX_DiscardUnknown()

func (*ParamsRequest) XXX_Marshal added in v0.34.0

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

func (*ParamsRequest) XXX_Merge added in v0.34.0

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

func (*ParamsRequest) XXX_Size added in v0.34.0

func (m *ParamsRequest) XXX_Size() int

func (*ParamsRequest) XXX_Unmarshal added in v0.34.0

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

type ParamsResponse added in v0.34.0

type ParamsResponse struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

func (*ParamsResponse) Descriptor added in v0.34.0

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

func (*ParamsResponse) Marshal added in v0.34.0

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

func (*ParamsResponse) MarshalTo added in v0.34.0

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

func (*ParamsResponse) MarshalToSizedBuffer added in v0.34.0

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

func (*ParamsResponse) ProtoMessage added in v0.34.0

func (*ParamsResponse) ProtoMessage()

func (*ParamsResponse) Reset added in v0.34.0

func (m *ParamsResponse) Reset()

func (*ParamsResponse) Size added in v0.34.0

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

func (*ParamsResponse) String added in v0.34.0

func (m *ParamsResponse) String() string

func (*ParamsResponse) Unmarshal added in v0.34.0

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

func (*ParamsResponse) XXX_DiscardUnknown added in v0.34.0

func (m *ParamsResponse) XXX_DiscardUnknown()

func (*ParamsResponse) XXX_Marshal added in v0.34.0

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

func (*ParamsResponse) XXX_Merge added in v0.34.0

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

func (*ParamsResponse) XXX_Size added in v0.34.0

func (m *ParamsResponse) XXX_Size() int

func (*ParamsResponse) XXX_Unmarshal added in v0.34.0

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

type ProxiedValidator added in v0.9.0

type ProxiedValidator struct {
	Validator github_com_cosmos_cosmos_sdk_types.ValAddress `` /* 126-byte string literal not displayed */
	Proxy     github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=proxy,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"proxy,omitempty"`
	Active    bool                                          `protobuf:"varint,3,opt,name=active,proto3" json:"active,omitempty"`
}

func NewProxiedValidator added in v0.9.0

func NewProxiedValidator(validator sdk.ValAddress, proxy sdk.AccAddress, active bool) ProxiedValidator

NewProxiedValidator is the constructor of ProxiedValidator

func (*ProxiedValidator) Descriptor added in v0.9.0

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

func (*ProxiedValidator) Marshal added in v0.9.0

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

func (*ProxiedValidator) MarshalTo added in v0.9.0

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

func (*ProxiedValidator) MarshalToSizedBuffer added in v0.9.0

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

func (*ProxiedValidator) ProtoMessage added in v0.9.0

func (*ProxiedValidator) ProtoMessage()

func (*ProxiedValidator) Reset added in v0.9.0

func (m *ProxiedValidator) Reset()

func (*ProxiedValidator) Size added in v0.9.0

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

func (*ProxiedValidator) String added in v0.9.0

func (m *ProxiedValidator) String() string

func (*ProxiedValidator) Unmarshal added in v0.9.0

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

func (ProxiedValidator) Validate added in v0.9.0

func (m ProxiedValidator) Validate() error

Validate returns an error if the validator proxy is not valid; nil otherwise

func (*ProxiedValidator) XXX_DiscardUnknown added in v0.9.0

func (m *ProxiedValidator) XXX_DiscardUnknown()

func (*ProxiedValidator) XXX_Marshal added in v0.9.0

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

func (*ProxiedValidator) XXX_Merge added in v0.9.0

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

func (*ProxiedValidator) XXX_Size added in v0.9.0

func (m *ProxiedValidator) XXX_Size() int

func (*ProxiedValidator) XXX_Unmarshal added in v0.9.0

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

type QueryServiceClient added in v0.34.0

type QueryServiceClient interface {
	Params(ctx context.Context, in *ParamsRequest, opts ...grpc.CallOption) (*ParamsResponse, error)
}

QueryServiceClient is the client API for QueryService service.

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

func NewQueryServiceClient added in v0.34.0

func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient

type QueryServiceServer added in v0.34.0

type QueryServiceServer interface {
	Params(context.Context, *ParamsRequest) (*ParamsResponse, error)
}

QueryServiceServer is the server API for QueryService service.

type QueryValidatorsResponse

type QueryValidatorsResponse struct {
	Validators []*QueryValidatorsResponse_Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"`
}

func (*QueryValidatorsResponse) Descriptor

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

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 QueryValidatorsResponse_TssIllegibilityInfo

type QueryValidatorsResponse_TssIllegibilityInfo struct {
	Tombstoned            bool `protobuf:"varint,1,opt,name=tombstoned,proto3" json:"tombstoned,omitempty"`
	Jailed                bool `protobuf:"varint,2,opt,name=jailed,proto3" json:"jailed,omitempty"`
	MissedTooManyBlocks   bool `protobuf:"varint,3,opt,name=missed_too_many_blocks,json=missedTooManyBlocks,proto3" json:"missed_too_many_blocks,omitempty"`
	NoProxyRegistered     bool `protobuf:"varint,4,opt,name=no_proxy_registered,json=noProxyRegistered,proto3" json:"no_proxy_registered,omitempty"`
	TssSuspended          bool `protobuf:"varint,5,opt,name=tss_suspended,json=tssSuspended,proto3" json:"tss_suspended,omitempty"`
	ProxyInsuficientFunds bool `` /* 127-byte string literal not displayed */
	StaleTssHeartbeat     bool `protobuf:"varint,7,opt,name=stale_tss_heartbeat,json=staleTssHeartbeat,proto3" json:"stale_tss_heartbeat,omitempty"`
}

func (*QueryValidatorsResponse_TssIllegibilityInfo) Descriptor

func (*QueryValidatorsResponse_TssIllegibilityInfo) Marshal

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

func (*QueryValidatorsResponse_TssIllegibilityInfo) MarshalTo

func (*QueryValidatorsResponse_TssIllegibilityInfo) MarshalToSizedBuffer

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

func (*QueryValidatorsResponse_TssIllegibilityInfo) ProtoMessage

func (*QueryValidatorsResponse_TssIllegibilityInfo) Reset

func (*QueryValidatorsResponse_TssIllegibilityInfo) Size

func (*QueryValidatorsResponse_TssIllegibilityInfo) String

func (*QueryValidatorsResponse_TssIllegibilityInfo) Unmarshal

func (*QueryValidatorsResponse_TssIllegibilityInfo) XXX_DiscardUnknown

func (m *QueryValidatorsResponse_TssIllegibilityInfo) XXX_DiscardUnknown()

func (*QueryValidatorsResponse_TssIllegibilityInfo) XXX_Marshal

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

func (*QueryValidatorsResponse_TssIllegibilityInfo) XXX_Merge

func (*QueryValidatorsResponse_TssIllegibilityInfo) XXX_Size

func (*QueryValidatorsResponse_TssIllegibilityInfo) XXX_Unmarshal

type QueryValidatorsResponse_Validator

type QueryValidatorsResponse_Validator struct {
	OperatorAddress     string                                      `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"`
	Moniker             string                                      `protobuf:"bytes,2,opt,name=moniker,proto3" json:"moniker,omitempty"`
	TssIllegibilityInfo QueryValidatorsResponse_TssIllegibilityInfo `protobuf:"bytes,3,opt,name=tss_illegibility_info,json=tssIllegibilityInfo,proto3" json:"tss_illegibility_info"`
}

func (*QueryValidatorsResponse_Validator) Descriptor

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

func (*QueryValidatorsResponse_Validator) Marshal

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

func (*QueryValidatorsResponse_Validator) MarshalTo

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

func (*QueryValidatorsResponse_Validator) MarshalToSizedBuffer

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

func (*QueryValidatorsResponse_Validator) ProtoMessage

func (*QueryValidatorsResponse_Validator) ProtoMessage()

func (*QueryValidatorsResponse_Validator) Reset

func (*QueryValidatorsResponse_Validator) Size

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

func (*QueryValidatorsResponse_Validator) String

func (*QueryValidatorsResponse_Validator) Unmarshal

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

func (*QueryValidatorsResponse_Validator) XXX_DiscardUnknown

func (m *QueryValidatorsResponse_Validator) XXX_DiscardUnknown()

func (*QueryValidatorsResponse_Validator) XXX_Marshal

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

func (*QueryValidatorsResponse_Validator) XXX_Merge

func (*QueryValidatorsResponse_Validator) XXX_Size

func (m *QueryValidatorsResponse_Validator) XXX_Size() int

func (*QueryValidatorsResponse_Validator) XXX_Unmarshal

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

type RegisterProxyRequest

type RegisterProxyRequest struct {
	Sender    github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=sender,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"sender,omitempty"`
	ProxyAddr github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 143-byte string literal not displayed */
}

func NewRegisterProxyRequest

func NewRegisterProxyRequest(sender sdk.ValAddress, proxy sdk.AccAddress) *RegisterProxyRequest

NewRegisterProxyRequest - RegisterProxyRequest constructor

func (*RegisterProxyRequest) Descriptor

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

func (RegisterProxyRequest) GetSignBytes

func (m RegisterProxyRequest) GetSignBytes() []byte

GetSignBytes returns the message bytes that need to be signed

func (RegisterProxyRequest) GetSigners

func (m RegisterProxyRequest) GetSigners() []sdk.AccAddress

GetSigners returns the set of signers for this message

func (*RegisterProxyRequest) Marshal

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

func (*RegisterProxyRequest) MarshalTo

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

func (*RegisterProxyRequest) MarshalToSizedBuffer

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

func (*RegisterProxyRequest) ProtoMessage

func (*RegisterProxyRequest) ProtoMessage()

func (*RegisterProxyRequest) Reset

func (m *RegisterProxyRequest) Reset()

func (RegisterProxyRequest) Route

func (m RegisterProxyRequest) Route() string

Route returns the route for this message

func (*RegisterProxyRequest) Size

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

func (*RegisterProxyRequest) String

func (m *RegisterProxyRequest) String() string

func (RegisterProxyRequest) Type

func (m RegisterProxyRequest) Type() string

Type returns the type of the message

func (*RegisterProxyRequest) Unmarshal

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

func (RegisterProxyRequest) ValidateBasic

func (m RegisterProxyRequest) ValidateBasic() error

ValidateBasic executes a stateless message validation

func (*RegisterProxyRequest) XXX_DiscardUnknown

func (m *RegisterProxyRequest) XXX_DiscardUnknown()

func (*RegisterProxyRequest) XXX_Marshal

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

func (*RegisterProxyRequest) XXX_Merge

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

func (*RegisterProxyRequest) XXX_Size

func (m *RegisterProxyRequest) XXX_Size() int

func (*RegisterProxyRequest) XXX_Unmarshal

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

type RegisterProxyResponse

type RegisterProxyResponse struct {
}

func (*RegisterProxyResponse) Descriptor

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

func (*RegisterProxyResponse) Marshal

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

func (*RegisterProxyResponse) MarshalTo

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

func (*RegisterProxyResponse) MarshalToSizedBuffer

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

func (*RegisterProxyResponse) ProtoMessage

func (*RegisterProxyResponse) ProtoMessage()

func (*RegisterProxyResponse) Reset

func (m *RegisterProxyResponse) Reset()

func (*RegisterProxyResponse) Size

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

func (*RegisterProxyResponse) String

func (m *RegisterProxyResponse) String() string

func (*RegisterProxyResponse) Unmarshal

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

func (*RegisterProxyResponse) XXX_DiscardUnknown

func (m *RegisterProxyResponse) XXX_DiscardUnknown()

func (*RegisterProxyResponse) XXX_Marshal

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

func (*RegisterProxyResponse) XXX_Merge

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

func (*RegisterProxyResponse) XXX_Size

func (m *RegisterProxyResponse) XXX_Size() int

func (*RegisterProxyResponse) XXX_Unmarshal

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

type Slasher added in v0.21.0

type Slasher interface {
	GetValidatorSigningInfo(ctx sdk.Context, address sdk.ConsAddress) (info types.ValidatorSigningInfo, found bool)
	SignedBlocksWindow(ctx sdk.Context) (res int64)
	GetValidatorMissedBlockBitArray(ctx sdk.Context, address sdk.ConsAddress, index int64) bool
}

Slasher provides functionality to manage slashing info for a validator

type StakingKeeper

type StakingKeeper interface {
	GetLastTotalPower(ctx sdk.Context) (power sdk.Int)
	IterateBondedValidatorsByPower(ctx sdk.Context, fn func(index int64, validator stakingtypes.ValidatorI) (stop bool))
	Validator(ctx sdk.Context, addr sdk.ValAddress) stakingtypes.ValidatorI
	PowerReduction(ctx sdk.Context) sdk.Int
	BondDenom(ctx sdk.Context) string
}

StakingKeeper adopts the methods from "github.com/cosmos/cosmos-sdk/x/staking/exported" that are actually used by this module

type UnimplementedMsgServiceServer

type UnimplementedMsgServiceServer struct {
}

UnimplementedMsgServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServiceServer) DeactivateProxy

func (*UnimplementedMsgServiceServer) RegisterProxy

type UnimplementedQueryServiceServer added in v0.34.0

type UnimplementedQueryServiceServer struct {
}

UnimplementedQueryServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServiceServer) Params added in v0.34.0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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