types

package
v3.0.0-...-1ba514b Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: GPL-3.0 Imports: 34 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeLockPower       = "lock_power"
	EventTypeCreateVault     = "create_vault"
	EventTypeDeactivateVault = "deactivate_vault"
	EventTypeStake           = "stake"
	EventTypeUnstake         = "unstake"

	AttributeKeyStaker = "staker"
	AttributeKeyKey    = "key"
	AttributeKeyPower  = "power"
	AttributeKeyCoins  = "coins"
)

restake module event types

View Source
const (
	// ModuleName defines the module name
	ModuleName = "restake"

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

	// RouterKey defines the module's message routing key
	RouterKey = ModuleName

	// QuerierRoute is the querier route for the restake module
	QuerierRoute = ModuleName
)

Variables

View Source
var (
	ErrUnableToUndelegate     = errorsmod.Register(ModuleName, 2, "unable to undelegate")
	ErrVaultNotFound          = errorsmod.Register(ModuleName, 3, "vault not found")
	ErrVaultNotActive         = errorsmod.Register(ModuleName, 4, "vault not active")
	ErrLockNotFound           = errorsmod.Register(ModuleName, 5, "lock not found")
	ErrPowerNotEnough         = errorsmod.Register(ModuleName, 6, "power not enough")
	ErrInvalidPower           = errorsmod.Register(ModuleName, 7, "invalid power")
	ErrTotalPowerZero         = errorsmod.Register(ModuleName, 8, "total power is zero")
	ErrAccountAlreadyExist    = errorsmod.Register(ModuleName, 9, "account already exist")
	ErrInvalidLength          = errorsmod.Register(ModuleName, 10, "invalid length")
	ErrStakeNotEnough         = errorsmod.Register(ModuleName, 11, "stake not enough")
	ErrNotAllowedDenom        = errorsmod.Register(ModuleName, 12, "not allowed denom")
	ErrUnableToUnstake        = errorsmod.Register(ModuleName, 13, "unable to unstake")
	ErrLiquidStakerNotAllowed = errorsmod.Register(ModuleName, 14, "liquid staker not allowed")
)

x/restake module sentinel 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 (
	VaultStoreKeyPrefix = []byte{0x10}
	LockStoreKeyPrefix  = []byte{0x11}
	StakeStoreKeyPrefix = []byte{0x12}

	LocksByPowerIndexKeyPrefix = []byte{0x80}

	ParamsKey = []byte{0x90}
)
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")
)

Functions

func LockByPowerIndexKey

func LockByPowerIndexKey(lock Lock) []byte

LockByPowerIndexKey returns the key to retrieve a lock by power from the store.

func LockStoreKey

func LockStoreKey(addr sdk.AccAddress, key string) []byte

LockStoreKey returns the key to retrieve a lock of an address and the key from the store.

func LocksByAddressStoreKey

func LocksByAddressStoreKey(addr sdk.AccAddress) []byte

LocksByAddressStoreKey returns the key to retrieve all locks of an address from the store.

func LocksByPowerIndexKey

func LocksByPowerIndexKey(addr sdk.AccAddress) []byte

LocksByPowerIndexKey returns the key to retrieve all locks of an address ordering by locked power from the store.

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces registers the x/restake interfaces types with the interface registry

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary x/restake interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.

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 SplitLockByPowerIndexKey

func SplitLockByPowerIndexKey(key []byte) (addr sdk.AccAddress, power sdkmath.Int)

SplitLockByPowerIndexKey split the LockByPowerIndexKey and returns the address and power

func StakeStoreKey

func StakeStoreKey(addr sdk.AccAddress) []byte

StakeStoreKey returns the key to retrieve the stake of an address from the store.

func VaultStoreKey

func VaultStoreKey(key string) []byte

VaultStoreKey returns the key to retrieve a specified vault from the store.

Types

type AccountKeeper

type AccountKeeper interface {
	GetModuleAddress(name string) sdk.AccAddress
	GetModuleAccount(ctx context.Context, name string) sdk.ModuleAccountI
	SetModuleAccount(context.Context, sdk.ModuleAccountI)
}

AccountKeeper defines the expected account keeper

type BankKeeper

type BankKeeper interface {
	GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins
	SendCoinsFromModuleToAccount(
		ctx context.Context,
		senderModule string,
		recipientAddr sdk.AccAddress,
		amt sdk.Coins,
	) error
	SendCoinsFromAccountToModule(
		ctx context.Context,
		senderAddr sdk.AccAddress,
		recipientModule string,
		amt sdk.Coins,
	) error
}

BankKeeper defines the expected interface needed to retrieve account balances.

type GenesisState

type GenesisState struct {
	// params is all parameters of the module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// vaults is a list of vaults in the module.
	Vaults []Vault `protobuf:"bytes,2,rep,name=vaults,proto3" json:"vaults"`
	// locks is a list of locks in the module.
	Locks []Lock `protobuf:"bytes,3,rep,name=locks,proto3" json:"locks"`
	// stakes is a list of stakes in the module.
	Stakes []Stake `protobuf:"bytes,4,rep,name=stakes,proto3" json:"stakes"`
}

GenesisState represents the initial state of the blockchain.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState gets the raw genesis raw message for testing

func NewGenesisState

func NewGenesisState(params Params, vaults []Vault, locks []Lock, stakes []Stake) *GenesisState

NewGenesisState creates a new GenesisState instance

func (*GenesisState) Descriptor

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

func (*GenesisState) GetLocks

func (m *GenesisState) GetLocks() []Lock

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetStakes

func (m *GenesisState) GetStakes() []Stake

func (*GenesisState) GetVaults

func (m *GenesisState) GetVaults() []Vault

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 validation of genesis data returning an error for any failed validation criteria.

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 Lock

type Lock struct {
	// staker_address is the owner's address of the staker.
	StakerAddress string `protobuf:"bytes,1,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"`
	// key is the key of the vault that this lock is locked to.
	Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// power is the number of locked power.
	Power cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=power,proto3,customtype=cosmossdk.io/math.Int" json:"power"`
}

Lock is used to store lock information of each user on each vault.

func NewLock

func NewLock(
	stakerAddr string,
	key string,
	power sdkmath.Int,
) Lock

func (*Lock) Descriptor

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

func (*Lock) Equal

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

func (*Lock) GetKey

func (m *Lock) GetKey() string

func (*Lock) GetStakerAddress

func (m *Lock) GetStakerAddress() string

func (*Lock) Marshal

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

func (*Lock) MarshalTo

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

func (*Lock) MarshalToSizedBuffer

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

func (*Lock) ProtoMessage

func (*Lock) ProtoMessage()

func (*Lock) Reset

func (m *Lock) Reset()

func (*Lock) Size

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

func (*Lock) String

func (m *Lock) String() string

func (*Lock) Unmarshal

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

func (*Lock) XXX_DiscardUnknown

func (m *Lock) XXX_DiscardUnknown()

func (*Lock) XXX_Marshal

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

func (*Lock) XXX_Merge

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

func (*Lock) XXX_Size

func (m *Lock) XXX_Size() int

func (*Lock) XXX_Unmarshal

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

type LockResponse

type LockResponse struct {
	// key is the key of the vault that this lock belongs to.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// power is the number of locked power.
	Power cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=power,proto3,customtype=cosmossdk.io/math.Int" json:"power"`
}

LockResponse is used as response of the query to show the power that is locked by the vault for the user.

func (*LockResponse) Descriptor

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

func (*LockResponse) Equal

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

func (*LockResponse) GetKey

func (m *LockResponse) GetKey() string

func (*LockResponse) Marshal

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

func (*LockResponse) MarshalTo

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

func (*LockResponse) MarshalToSizedBuffer

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

func (*LockResponse) ProtoMessage

func (*LockResponse) ProtoMessage()

func (*LockResponse) Reset

func (m *LockResponse) Reset()

func (*LockResponse) Size

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

func (*LockResponse) String

func (m *LockResponse) String() string

func (*LockResponse) Unmarshal

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

func (*LockResponse) XXX_DiscardUnknown

func (m *LockResponse) XXX_DiscardUnknown()

func (*LockResponse) XXX_Marshal

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

func (*LockResponse) XXX_Merge

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

func (*LockResponse) XXX_Size

func (m *LockResponse) XXX_Size() int

func (*LockResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// Stake defines a method for staking coins into the module.
	Stake(ctx context.Context, in *MsgStake, opts ...grpc.CallOption) (*MsgStakeResponse, error)
	// Unstake defines a method for unstaking coins out of the module.
	Unstake(ctx context.Context, in *MsgUnstake, opts ...grpc.CallOption) (*MsgUnstakeResponse, error)
	// UpdateParams defines a method for updating parameters.
	UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, 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 MsgServer

type MsgServer interface {
	// Stake defines a method for staking coins into the module.
	Stake(context.Context, *MsgStake) (*MsgStakeResponse, error)
	// Unstake defines a method for unstaking coins out of the module.
	Unstake(context.Context, *MsgUnstake) (*MsgUnstakeResponse, error)
	// UpdateParams defines a method for updating parameters.
	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
}

MsgServer is the server API for Msg service.

type MsgStake

type MsgStake struct {
	// staker_address is the address that will stake the coins.
	StakerAddress string `protobuf:"bytes,1,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"`
	// coins is the coins that will be staked.
	Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"`
}

MsgStake is the request message type for staking coins.

func NewMsgStake

func NewMsgStake(
	stakerAddr sdk.AccAddress,
	coins sdk.Coins,
) *MsgStake

NewMsgStake creates a new MsgStake instance

func (*MsgStake) Descriptor

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

func (*MsgStake) GetCoins

func (*MsgStake) GetStakerAddress

func (m *MsgStake) GetStakerAddress() string

func (*MsgStake) Marshal

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

func (*MsgStake) MarshalTo

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

func (*MsgStake) MarshalToSizedBuffer

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

func (*MsgStake) ProtoMessage

func (*MsgStake) ProtoMessage()

func (*MsgStake) Reset

func (m *MsgStake) Reset()

func (*MsgStake) Size

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

func (*MsgStake) String

func (m *MsgStake) String() string

func (*MsgStake) Unmarshal

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

func (MsgStake) ValidateBasic

func (m MsgStake) ValidateBasic() error

ValidateBasic implements the sdk.Msg interface.

func (*MsgStake) XXX_DiscardUnknown

func (m *MsgStake) XXX_DiscardUnknown()

func (*MsgStake) XXX_Marshal

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

func (*MsgStake) XXX_Merge

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

func (*MsgStake) XXX_Size

func (m *MsgStake) XXX_Size() int

func (*MsgStake) XXX_Unmarshal

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

type MsgStakeResponse

type MsgStakeResponse struct {
}

MsgStakeResponse is the response message type for staking coins.

func (*MsgStakeResponse) Descriptor

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

func (*MsgStakeResponse) Marshal

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

func (*MsgStakeResponse) MarshalTo

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

func (*MsgStakeResponse) MarshalToSizedBuffer

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

func (*MsgStakeResponse) ProtoMessage

func (*MsgStakeResponse) ProtoMessage()

func (*MsgStakeResponse) Reset

func (m *MsgStakeResponse) Reset()

func (*MsgStakeResponse) Size

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

func (*MsgStakeResponse) String

func (m *MsgStakeResponse) String() string

func (*MsgStakeResponse) Unmarshal

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

func (*MsgStakeResponse) XXX_DiscardUnknown

func (m *MsgStakeResponse) XXX_DiscardUnknown()

func (*MsgStakeResponse) XXX_Marshal

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

func (*MsgStakeResponse) XXX_Merge

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

func (*MsgStakeResponse) XXX_Size

func (m *MsgStakeResponse) XXX_Size() int

func (*MsgStakeResponse) XXX_Unmarshal

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

type MsgUnstake

type MsgUnstake struct {
	// staker_address is the address that will unstake the coins.
	StakerAddress string `protobuf:"bytes,1,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"`
	// coins is the coins that will be unstaked.
	Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"`
}

MsgUnstake is the request message type for unstaking coins.

func NewMsgUnstake

func NewMsgUnstake(
	stakerAddr sdk.AccAddress,
	coins sdk.Coins,
) *MsgUnstake

NewMsgUnstake creates a new MsgUnstake instance

func (*MsgUnstake) Descriptor

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

func (*MsgUnstake) GetCoins

func (*MsgUnstake) GetStakerAddress

func (m *MsgUnstake) GetStakerAddress() string

func (*MsgUnstake) Marshal

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

func (*MsgUnstake) MarshalTo

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

func (*MsgUnstake) MarshalToSizedBuffer

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

func (*MsgUnstake) ProtoMessage

func (*MsgUnstake) ProtoMessage()

func (*MsgUnstake) Reset

func (m *MsgUnstake) Reset()

func (*MsgUnstake) Size

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

func (*MsgUnstake) String

func (m *MsgUnstake) String() string

func (*MsgUnstake) Unmarshal

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

func (MsgUnstake) ValidateBasic

func (m MsgUnstake) ValidateBasic() error

ValidateBasic implements the sdk.Msg interface.

func (*MsgUnstake) XXX_DiscardUnknown

func (m *MsgUnstake) XXX_DiscardUnknown()

func (*MsgUnstake) XXX_Marshal

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

func (*MsgUnstake) XXX_Merge

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

func (*MsgUnstake) XXX_Size

func (m *MsgUnstake) XXX_Size() int

func (*MsgUnstake) XXX_Unmarshal

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

type MsgUnstakeResponse

type MsgUnstakeResponse struct {
}

MsgUnstakeResponse is the response message type for unstaking coins.

func (*MsgUnstakeResponse) Descriptor

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

func (*MsgUnstakeResponse) Marshal

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

func (*MsgUnstakeResponse) MarshalTo

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

func (*MsgUnstakeResponse) MarshalToSizedBuffer

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

func (*MsgUnstakeResponse) ProtoMessage

func (*MsgUnstakeResponse) ProtoMessage()

func (*MsgUnstakeResponse) Reset

func (m *MsgUnstakeResponse) Reset()

func (*MsgUnstakeResponse) Size

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

func (*MsgUnstakeResponse) String

func (m *MsgUnstakeResponse) String() string

func (*MsgUnstakeResponse) Unmarshal

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

func (*MsgUnstakeResponse) XXX_DiscardUnknown

func (m *MsgUnstakeResponse) XXX_DiscardUnknown()

func (*MsgUnstakeResponse) XXX_Marshal

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

func (*MsgUnstakeResponse) XXX_Merge

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

func (*MsgUnstakeResponse) XXX_Size

func (m *MsgUnstakeResponse) XXX_Size() int

func (*MsgUnstakeResponse) XXX_Unmarshal

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

type MsgUpdateParams

type MsgUpdateParams struct {
	// authority is the address of the governance account.
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// params is parameters to update.
	Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}

MsgUpdateParams is the transaction message to update parameters.

func NewMsgUpdateParams

func NewMsgUpdateParams(
	authority string,
	params Params,
) *MsgUpdateParams

NewMsgUpdateParams creates a new MsgUpdateParams instance

func (*MsgUpdateParams) Descriptor

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

func (*MsgUpdateParams) GetAuthority

func (m *MsgUpdateParams) GetAuthority() string

func (*MsgUpdateParams) GetParams

func (m *MsgUpdateParams) GetParams() Params

func (*MsgUpdateParams) Marshal

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

func (*MsgUpdateParams) MarshalTo

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

func (*MsgUpdateParams) MarshalToSizedBuffer

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

func (*MsgUpdateParams) ProtoMessage

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) Reset

func (m *MsgUpdateParams) Reset()

func (*MsgUpdateParams) Size

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

func (*MsgUpdateParams) String

func (m *MsgUpdateParams) String() string

func (*MsgUpdateParams) Unmarshal

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

func (*MsgUpdateParams) ValidateBasic

func (m *MsgUpdateParams) ValidateBasic() error

ValidateBasic does a sanity check on the provided data.

func (*MsgUpdateParams) XXX_DiscardUnknown

func (m *MsgUpdateParams) XXX_DiscardUnknown()

func (*MsgUpdateParams) XXX_Marshal

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

func (*MsgUpdateParams) XXX_Merge

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

func (*MsgUpdateParams) XXX_Size

func (m *MsgUpdateParams) XXX_Size() int

func (*MsgUpdateParams) XXX_Unmarshal

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

type MsgUpdateParamsResponse

type MsgUpdateParamsResponse struct {
}

MsgUpdateParamsResponse is the response type for the Msg/UpdateParams RPC method.

func (*MsgUpdateParamsResponse) Descriptor

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

func (*MsgUpdateParamsResponse) Marshal

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

func (*MsgUpdateParamsResponse) MarshalTo

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

func (*MsgUpdateParamsResponse) MarshalToSizedBuffer

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

func (*MsgUpdateParamsResponse) ProtoMessage

func (*MsgUpdateParamsResponse) ProtoMessage()

func (*MsgUpdateParamsResponse) Reset

func (m *MsgUpdateParamsResponse) Reset()

func (*MsgUpdateParamsResponse) Size

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

func (*MsgUpdateParamsResponse) String

func (m *MsgUpdateParamsResponse) String() string

func (*MsgUpdateParamsResponse) Unmarshal

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

func (*MsgUpdateParamsResponse) XXX_DiscardUnknown

func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateParamsResponse) XXX_Marshal

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

func (*MsgUpdateParamsResponse) XXX_Merge

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

func (*MsgUpdateParamsResponse) XXX_Size

func (m *MsgUpdateParamsResponse) XXX_Size() int

func (*MsgUpdateParamsResponse) XXX_Unmarshal

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

type Params

type Params struct {
	// allowed_denoms is a list of denoms that the module allows to stake to get power.
	AllowedDenoms []string `protobuf:"bytes,1,rep,name=allowed_denoms,json=allowedDenoms,proto3" json:"allowed_denoms,omitempty"`
}

Params is the data structure that keeps the parameters.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters

func NewParams

func NewParams(
	allowedDenoms []string,
) Params

NewParams creates a new Params instance

func (*Params) Descriptor

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

func (*Params) Equal

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

func (*Params) GetAllowedDenoms

func (m *Params) GetAllowedDenoms() []string

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 {
	// Vaults returns a list of vault.
	Vaults(ctx context.Context, in *QueryVaultsRequest, opts ...grpc.CallOption) (*QueryVaultsResponse, error)
	// Vault returns a vault information.
	Vault(ctx context.Context, in *QueryVaultRequest, opts ...grpc.CallOption) (*QueryVaultResponse, error)
	// Locks returns all lock information for a specified address.
	Locks(ctx context.Context, in *QueryLocksRequest, opts ...grpc.CallOption) (*QueryLocksResponse, error)
	// Lock returns a lock information for a specified address and a vault.
	Lock(ctx context.Context, in *QueryLockRequest, opts ...grpc.CallOption) (*QueryLockResponse, error)
	// Stake returns stake information for a specific address.
	Stake(ctx context.Context, in *QueryStakeRequest, opts ...grpc.CallOption) (*QueryStakeResponse, error)
	// Params returns all parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, 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 QueryLockRequest

type QueryLockRequest struct {
	// staker_address is the target address to query lock.
	StakerAddress string `protobuf:"bytes,1,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"`
	// key is the key of target vault to query lock.
	Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
}

QueryLockRequest represents the request type for the Query/Lock RPC method.

func (*QueryLockRequest) Descriptor

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

func (*QueryLockRequest) GetKey

func (m *QueryLockRequest) GetKey() string

func (*QueryLockRequest) GetStakerAddress

func (m *QueryLockRequest) GetStakerAddress() string

func (*QueryLockRequest) Marshal

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

func (*QueryLockRequest) MarshalTo

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

func (*QueryLockRequest) MarshalToSizedBuffer

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

func (*QueryLockRequest) ProtoMessage

func (*QueryLockRequest) ProtoMessage()

func (*QueryLockRequest) Reset

func (m *QueryLockRequest) Reset()

func (*QueryLockRequest) Size

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

func (*QueryLockRequest) String

func (m *QueryLockRequest) String() string

func (*QueryLockRequest) Unmarshal

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

func (*QueryLockRequest) XXX_DiscardUnknown

func (m *QueryLockRequest) XXX_DiscardUnknown()

func (*QueryLockRequest) XXX_Marshal

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

func (*QueryLockRequest) XXX_Merge

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

func (*QueryLockRequest) XXX_Size

func (m *QueryLockRequest) XXX_Size() int

func (*QueryLockRequest) XXX_Unmarshal

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

type QueryLockResponse

type QueryLockResponse struct {
	// lock is the lock of the staker and the vault.
	Lock LockResponse `protobuf:"bytes,1,opt,name=lock,proto3" json:"lock"`
}

QueryLockResponse represents the response type for the Query/Lock RPC method.

func (*QueryLockResponse) Descriptor

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

func (*QueryLockResponse) GetLock

func (m *QueryLockResponse) GetLock() LockResponse

func (*QueryLockResponse) Marshal

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

func (*QueryLockResponse) MarshalTo

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

func (*QueryLockResponse) MarshalToSizedBuffer

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

func (*QueryLockResponse) ProtoMessage

func (*QueryLockResponse) ProtoMessage()

func (*QueryLockResponse) Reset

func (m *QueryLockResponse) Reset()

func (*QueryLockResponse) Size

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

func (*QueryLockResponse) String

func (m *QueryLockResponse) String() string

func (*QueryLockResponse) Unmarshal

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

func (*QueryLockResponse) XXX_DiscardUnknown

func (m *QueryLockResponse) XXX_DiscardUnknown()

func (*QueryLockResponse) XXX_Marshal

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

func (*QueryLockResponse) XXX_Merge

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

func (*QueryLockResponse) XXX_Size

func (m *QueryLockResponse) XXX_Size() int

func (*QueryLockResponse) XXX_Unmarshal

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

type QueryLocksRequest

type QueryLocksRequest struct {
	// staker_address is the target address to query locks.
	StakerAddress string `protobuf:"bytes,1,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"`
	// pagination defines optional pagination parameters.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryLocksRequest represents the request type for the Query/Locks RPC method.

func (*QueryLocksRequest) Descriptor

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

func (*QueryLocksRequest) GetPagination

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

func (*QueryLocksRequest) GetStakerAddress

func (m *QueryLocksRequest) GetStakerAddress() string

func (*QueryLocksRequest) Marshal

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

func (*QueryLocksRequest) MarshalTo

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

func (*QueryLocksRequest) MarshalToSizedBuffer

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

func (*QueryLocksRequest) ProtoMessage

func (*QueryLocksRequest) ProtoMessage()

func (*QueryLocksRequest) Reset

func (m *QueryLocksRequest) Reset()

func (*QueryLocksRequest) Size

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

func (*QueryLocksRequest) String

func (m *QueryLocksRequest) String() string

func (*QueryLocksRequest) Unmarshal

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

func (*QueryLocksRequest) XXX_DiscardUnknown

func (m *QueryLocksRequest) XXX_DiscardUnknown()

func (*QueryLocksRequest) XXX_Marshal

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

func (*QueryLocksRequest) XXX_Merge

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

func (*QueryLocksRequest) XXX_Size

func (m *QueryLocksRequest) XXX_Size() int

func (*QueryLocksRequest) XXX_Unmarshal

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

type QueryLocksResponse

type QueryLocksResponse struct {
	// locks is a list of locks of the staker.
	Locks []*LockResponse `protobuf:"bytes,1,rep,name=locks,proto3" json:"locks,omitempty"`
	// pagination defines pagination parameters in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryLocksResponse represents the response type for the Query/Locks RPC method.

func (*QueryLocksResponse) Descriptor

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

func (*QueryLocksResponse) GetLocks

func (m *QueryLocksResponse) GetLocks() []*LockResponse

func (*QueryLocksResponse) GetPagination

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

func (*QueryLocksResponse) Marshal

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

func (*QueryLocksResponse) MarshalTo

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

func (*QueryLocksResponse) MarshalToSizedBuffer

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

func (*QueryLocksResponse) ProtoMessage

func (*QueryLocksResponse) ProtoMessage()

func (*QueryLocksResponse) Reset

func (m *QueryLocksResponse) Reset()

func (*QueryLocksResponse) Size

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

func (*QueryLocksResponse) String

func (m *QueryLocksResponse) String() string

func (*QueryLocksResponse) Unmarshal

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

func (*QueryLocksResponse) XXX_DiscardUnknown

func (m *QueryLocksResponse) XXX_DiscardUnknown()

func (*QueryLocksResponse) XXX_Marshal

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

func (*QueryLocksResponse) XXX_Merge

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

func (*QueryLocksResponse) XXX_Size

func (m *QueryLocksResponse) XXX_Size() int

func (*QueryLocksResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is the 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 are the parameters of the module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is the 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 {
	// Vaults returns a list of vault.
	Vaults(context.Context, *QueryVaultsRequest) (*QueryVaultsResponse, error)
	// Vault returns a vault information.
	Vault(context.Context, *QueryVaultRequest) (*QueryVaultResponse, error)
	// Locks returns all lock information for a specified address.
	Locks(context.Context, *QueryLocksRequest) (*QueryLocksResponse, error)
	// Lock returns a lock information for a specified address and a vault.
	Lock(context.Context, *QueryLockRequest) (*QueryLockResponse, error)
	// Stake returns stake information for a specific address.
	Stake(context.Context, *QueryStakeRequest) (*QueryStakeResponse, error)
	// Params returns all parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}

QueryServer is the server API for Query service.

type QueryStakeRequest

type QueryStakeRequest struct {
	// staker_address is the target address used to query the stake.
	StakerAddress string `protobuf:"bytes,1,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"`
}

QueryStakeRequest represents the request type for the Query/Stake RPC method.

func (*QueryStakeRequest) Descriptor

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

func (*QueryStakeRequest) GetStakerAddress

func (m *QueryStakeRequest) GetStakerAddress() string

func (*QueryStakeRequest) Marshal

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

func (*QueryStakeRequest) MarshalTo

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

func (*QueryStakeRequest) MarshalToSizedBuffer

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

func (*QueryStakeRequest) ProtoMessage

func (*QueryStakeRequest) ProtoMessage()

func (*QueryStakeRequest) Reset

func (m *QueryStakeRequest) Reset()

func (*QueryStakeRequest) Size

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

func (*QueryStakeRequest) String

func (m *QueryStakeRequest) String() string

func (*QueryStakeRequest) Unmarshal

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

func (*QueryStakeRequest) XXX_DiscardUnknown

func (m *QueryStakeRequest) XXX_DiscardUnknown()

func (*QueryStakeRequest) XXX_Marshal

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

func (*QueryStakeRequest) XXX_Merge

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

func (*QueryStakeRequest) XXX_Size

func (m *QueryStakeRequest) XXX_Size() int

func (*QueryStakeRequest) XXX_Unmarshal

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

type QueryStakeResponse

type QueryStakeResponse struct {
	// stake is a stake information of the staker.
	Stake Stake `protobuf:"bytes,1,opt,name=stake,proto3" json:"stake"`
}

QueryStakeResponse represents the response type for the Query/Stake RPC method.

func (*QueryStakeResponse) Descriptor

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

func (*QueryStakeResponse) GetStake

func (m *QueryStakeResponse) GetStake() Stake

func (*QueryStakeResponse) Marshal

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

func (*QueryStakeResponse) MarshalTo

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

func (*QueryStakeResponse) MarshalToSizedBuffer

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

func (*QueryStakeResponse) ProtoMessage

func (*QueryStakeResponse) ProtoMessage()

func (*QueryStakeResponse) Reset

func (m *QueryStakeResponse) Reset()

func (*QueryStakeResponse) Size

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

func (*QueryStakeResponse) String

func (m *QueryStakeResponse) String() string

func (*QueryStakeResponse) Unmarshal

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

func (*QueryStakeResponse) XXX_DiscardUnknown

func (m *QueryStakeResponse) XXX_DiscardUnknown()

func (*QueryStakeResponse) XXX_Marshal

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

func (*QueryStakeResponse) XXX_Merge

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

func (*QueryStakeResponse) XXX_Size

func (m *QueryStakeResponse) XXX_Size() int

func (*QueryStakeResponse) XXX_Unmarshal

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

type QueryVaultRequest

type QueryVaultRequest struct {
	// key is the key of the vault that want to query.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}

QueryVaultRequest represents the request type for the Query/Vault RPC method.

func (*QueryVaultRequest) Descriptor

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

func (*QueryVaultRequest) GetKey

func (m *QueryVaultRequest) GetKey() string

func (*QueryVaultRequest) Marshal

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

func (*QueryVaultRequest) MarshalTo

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

func (*QueryVaultRequest) MarshalToSizedBuffer

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

func (*QueryVaultRequest) ProtoMessage

func (*QueryVaultRequest) ProtoMessage()

func (*QueryVaultRequest) Reset

func (m *QueryVaultRequest) Reset()

func (*QueryVaultRequest) Size

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

func (*QueryVaultRequest) String

func (m *QueryVaultRequest) String() string

func (*QueryVaultRequest) Unmarshal

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

func (*QueryVaultRequest) XXX_DiscardUnknown

func (m *QueryVaultRequest) XXX_DiscardUnknown()

func (*QueryVaultRequest) XXX_Marshal

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

func (*QueryVaultRequest) XXX_Merge

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

func (*QueryVaultRequest) XXX_Size

func (m *QueryVaultRequest) XXX_Size() int

func (*QueryVaultRequest) XXX_Unmarshal

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

type QueryVaultResponse

type QueryVaultResponse struct {
	// vault is a vault information.
	Vault Vault `protobuf:"bytes,1,opt,name=vault,proto3" json:"vault"`
}

QueryVaultResponse represents the response type for the Query/Vault RPC method.

func (*QueryVaultResponse) Descriptor

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

func (*QueryVaultResponse) GetVault

func (m *QueryVaultResponse) GetVault() Vault

func (*QueryVaultResponse) Marshal

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

func (*QueryVaultResponse) MarshalTo

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

func (*QueryVaultResponse) MarshalToSizedBuffer

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

func (*QueryVaultResponse) ProtoMessage

func (*QueryVaultResponse) ProtoMessage()

func (*QueryVaultResponse) Reset

func (m *QueryVaultResponse) Reset()

func (*QueryVaultResponse) Size

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

func (*QueryVaultResponse) String

func (m *QueryVaultResponse) String() string

func (*QueryVaultResponse) Unmarshal

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

func (*QueryVaultResponse) XXX_DiscardUnknown

func (m *QueryVaultResponse) XXX_DiscardUnknown()

func (*QueryVaultResponse) XXX_Marshal

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

func (*QueryVaultResponse) XXX_Merge

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

func (*QueryVaultResponse) XXX_Size

func (m *QueryVaultResponse) XXX_Size() int

func (*QueryVaultResponse) XXX_Unmarshal

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

type QueryVaultsRequest

type QueryVaultsRequest struct {
	// pagination defines optional pagination parameters.
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryVaultsRequest represents the request type for the Query/Vaults RPC method.

func (*QueryVaultsRequest) Descriptor

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

func (*QueryVaultsRequest) GetPagination

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

func (*QueryVaultsRequest) Marshal

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

func (*QueryVaultsRequest) MarshalTo

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

func (*QueryVaultsRequest) MarshalToSizedBuffer

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

func (*QueryVaultsRequest) ProtoMessage

func (*QueryVaultsRequest) ProtoMessage()

func (*QueryVaultsRequest) Reset

func (m *QueryVaultsRequest) Reset()

func (*QueryVaultsRequest) Size

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

func (*QueryVaultsRequest) String

func (m *QueryVaultsRequest) String() string

func (*QueryVaultsRequest) Unmarshal

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

func (*QueryVaultsRequest) XXX_DiscardUnknown

func (m *QueryVaultsRequest) XXX_DiscardUnknown()

func (*QueryVaultsRequest) XXX_Marshal

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

func (*QueryVaultsRequest) XXX_Merge

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

func (*QueryVaultsRequest) XXX_Size

func (m *QueryVaultsRequest) XXX_Size() int

func (*QueryVaultsRequest) XXX_Unmarshal

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

type QueryVaultsResponse

type QueryVaultsResponse struct {
	// vaults is a list of vaults.
	Vaults []*Vault `protobuf:"bytes,1,rep,name=vaults,proto3" json:"vaults,omitempty"`
	// pagination defines pagination parameters in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryVaultsResponse represents the response type for the Query/Vaults RPC method.

func (*QueryVaultsResponse) Descriptor

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

func (*QueryVaultsResponse) GetPagination

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

func (*QueryVaultsResponse) GetVaults

func (m *QueryVaultsResponse) GetVaults() []*Vault

func (*QueryVaultsResponse) Marshal

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

func (*QueryVaultsResponse) MarshalTo

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

func (*QueryVaultsResponse) MarshalToSizedBuffer

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

func (*QueryVaultsResponse) ProtoMessage

func (*QueryVaultsResponse) ProtoMessage()

func (*QueryVaultsResponse) Reset

func (m *QueryVaultsResponse) Reset()

func (*QueryVaultsResponse) Size

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

func (*QueryVaultsResponse) String

func (m *QueryVaultsResponse) String() string

func (*QueryVaultsResponse) Unmarshal

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

func (*QueryVaultsResponse) XXX_DiscardUnknown

func (m *QueryVaultsResponse) XXX_DiscardUnknown()

func (*QueryVaultsResponse) XXX_Marshal

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

func (*QueryVaultsResponse) XXX_Merge

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

func (*QueryVaultsResponse) XXX_Size

func (m *QueryVaultsResponse) XXX_Size() int

func (*QueryVaultsResponse) XXX_Unmarshal

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

type Stake

type Stake struct {
	// staker_address is the address that this stake belongs to.
	StakerAddress string `protobuf:"bytes,1,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"`
	// coins are the coins that the address has staked.
	Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"`
}

Stake is used to store staked coins of an address.

func NewStake

func NewStake(
	stakerAddr string,
	coins sdk.Coins,
) Stake

func (*Stake) Descriptor

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

func (*Stake) Equal

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

func (*Stake) GetCoins

func (*Stake) GetStakerAddress

func (m *Stake) GetStakerAddress() string

func (*Stake) Marshal

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

func (*Stake) MarshalTo

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

func (*Stake) MarshalToSizedBuffer

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

func (*Stake) ProtoMessage

func (*Stake) ProtoMessage()

func (*Stake) Reset

func (m *Stake) Reset()

func (*Stake) Size

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

func (*Stake) String

func (m *Stake) String() string

func (*Stake) Unmarshal

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

func (*Stake) XXX_DiscardUnknown

func (m *Stake) XXX_DiscardUnknown()

func (*Stake) XXX_Marshal

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

func (*Stake) XXX_Merge

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

func (*Stake) XXX_Size

func (m *Stake) XXX_Size() int

func (*Stake) XXX_Unmarshal

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

type StakingKeeper

type StakingKeeper interface {
	GetDelegatorBonded(ctx context.Context, delegator sdk.AccAddress) (math.Int, error)
	GetDelegation(
		ctx context.Context,
		delAddr sdk.AccAddress,
		valAddr sdk.ValAddress,
	) (stakingtypes.Delegation, error)
	GetValidator(ctx context.Context, addr sdk.ValAddress) (stakingtypes.Validator, error)
}

StakingKeeper defines the expected staking keeper.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) Stake

func (*UnimplementedMsgServer) Unstake

func (*UnimplementedMsgServer) UpdateParams

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Lock

func (*UnimplementedQueryServer) Locks

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) Stake

func (*UnimplementedQueryServer) Vault

func (*UnimplementedQueryServer) Vaults

type Vault

type Vault struct {
	// key is the key of the vault.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// is_active is the status of the vault
	IsActive bool `protobuf:"varint,2,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"`
}

Vault is used for tracking the status of the vaults.

func NewVault

func NewVault(
	key string,
	isActive bool,
) Vault

func (*Vault) Descriptor

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

func (*Vault) Equal

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

func (*Vault) GetIsActive

func (m *Vault) GetIsActive() bool

func (*Vault) GetKey

func (m *Vault) GetKey() string

func (*Vault) Marshal

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

func (*Vault) MarshalTo

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

func (*Vault) MarshalToSizedBuffer

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

func (*Vault) ProtoMessage

func (*Vault) ProtoMessage()

func (*Vault) Reset

func (m *Vault) Reset()

func (*Vault) Size

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

func (*Vault) String

func (m *Vault) String() string

func (*Vault) Unmarshal

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

func (*Vault) XXX_DiscardUnknown

func (m *Vault) XXX_DiscardUnknown()

func (*Vault) XXX_Marshal

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

func (*Vault) XXX_Merge

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

func (*Vault) XXX_Size

func (m *Vault) XXX_Size() int

func (*Vault) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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