types

package
Version: v0.41.10 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeCompleteUnbonding    = "complete_unbonding"
	EventTypeCompleteRedelegation = "complete_redelegation"
	EventTypeCreateValidator      = "create_validator"
	EventTypeEditValidator        = "edit_validator"
	EventTypeDelegate             = "delegate"
	EventTypeUnbond               = "unbond"
	EventTypeRedelegate           = "redelegate"

	AttributeKeyValidator         = "validator"
	AttributeKeyCommissionRate    = "commission_rate"
	AttributeKeyMinSelfDelegation = "min_self_delegation"
	AttributeKeySrcValidator      = "source_validator"
	AttributeKeyDstValidator      = "destination_validator"
	AttributeKeyDelegator         = "delegator"
	AttributeKeyCompletionTime    = "completion_time"
	AttributeValueCategory        = ModuleName
)

staking module event types

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

	// StoreKey is the string store representation
	StoreKey = ModuleName

	// QuerierRoute is the querier route for the staking module
	QuerierRoute = ModuleName

	// RouterKey is the msg router key for the staking module
	RouterKey = ModuleName
)
View Source
const (
	TypeMsgUndelegate      = "begin_unbonding"
	TypeMsgEditValidator   = "edit_validator"
	TypeMsgCreateValidator = "create_validator"
	TypeMsgDelegate        = "delegate"
	TypeMsgBeginRedelegate = "begin_redelegate"
)

staking message types

View Source
const (
	// DefaultUnbondingTime reflects three weeks in seconds as the default
	// unbonding time.
	// TODO: Justify our choice of default here.
	DefaultUnbondingTime time.Duration = time.Hour * 24 * 7 * 3

	// Default maximum number of bonded validators
	DefaultMaxValidators uint32 = 100

	// Default maximum entries in a UBD/RED pair
	DefaultMaxEntries uint32 = 7

	// DefaultHistorical entries is 10000. Apps that don't use IBC can ignore this
	// value by not adding the staking module to the application module manager's
	// SetOrderBeginBlockers.
	DefaultHistoricalEntries uint32 = 10000
)

Staking params default values

View Source
const (
	NotBondedPoolName = "not_bonded_tokens_pool"
	BondedPoolName    = "bonded_tokens_pool"
)

names used as root for pool module accounts:

- NotBondedPool -> "not_bonded_tokens_pool"

- BondedPool -> "bonded_tokens_pool"

View Source
const (
	QueryValidators                    = "validators"
	QueryValidator                     = "validator"
	QueryDelegatorDelegations          = "delegatorDelegations"
	QueryDelegatorUnbondingDelegations = "delegatorUnbondingDelegations"
	QueryRedelegations                 = "redelegations"
	QueryValidatorDelegations          = "validatorDelegations"
	QueryValidatorRedelegations        = "validatorRedelegations"
	QueryValidatorUnbondingDelegations = "validatorUnbondingDelegations"
	QueryDelegation                    = "delegation"
	QueryUnbondingDelegation           = "unbondingDelegation"
	QueryDelegatorValidators           = "delegatorValidators"
	QueryDelegatorValidator            = "delegatorValidator"
	QueryPool                          = "pool"
	QueryParameters                    = "parameters"
	QueryHistoricalInfo                = "historicalInfo"
)

query endpoints supported by the staking Querier

View Source
const (
	// TODO: Why can't we just have one string description which can be JSON by convention
	MaxMonikerLength         = 70
	MaxIdentityLength        = 3000
	MaxWebsiteLength         = 140
	MaxSecurityContactLength = 140
	MaxDetailsLength         = 280
)
View Source
const DoNotModifyDesc = "[do-not-modify]"

constant used in flags to indicate that description field should not be updated

Variables

View Source
var (
	ErrEmptyValidatorAddr              = sdkerrors.Register(ModuleName, 2, "empty validator address")
	ErrBadValidatorAddr                = sdkerrors.Register(ModuleName, 3, "validator address is invalid")
	ErrNoValidatorFound                = sdkerrors.Register(ModuleName, 4, "validator does not exist")
	ErrValidatorOwnerExists            = sdkerrors.Register(ModuleName, 5, "validator already exist for this operator address; must use new validator operator address")
	ErrValidatorPubKeyExists           = sdkerrors.Register(ModuleName, 6, "validator already exist for this pubkey; must use new validator pubkey")
	ErrValidatorPubKeyTypeNotSupported = sdkerrors.Register(ModuleName, 7, "validator pubkey type is not supported")
	ErrValidatorJailed                 = sdkerrors.Register(ModuleName, 8, "validator for this address is currently jailed")
	ErrBadRemoveValidator              = sdkerrors.Register(ModuleName, 9, "failed to remove validator")
	ErrCommissionNegative              = sdkerrors.Register(ModuleName, 10, "commission must be positive")
	ErrCommissionHuge                  = sdkerrors.Register(ModuleName, 11, "commission cannot be more than 100%")
	ErrCommissionGTMaxRate             = sdkerrors.Register(ModuleName, 12, "commission cannot be more than the max rate")
	ErrCommissionUpdateTime            = sdkerrors.Register(ModuleName, 13, "commission cannot be changed more than once in 24h")
	ErrCommissionChangeRateNegative    = sdkerrors.Register(ModuleName, 14, "commission change rate must be positive")
	ErrCommissionChangeRateGTMaxRate   = sdkerrors.Register(ModuleName, 15, "commission change rate cannot be more than the max rate")
	ErrCommissionGTMaxChangeRate       = sdkerrors.Register(ModuleName, 16, "commission cannot be changed more than max change rate")
	ErrSelfDelegationBelowMinimum      = sdkerrors.Register(ModuleName, 17, "validator's self delegation must be greater than their minimum self delegation")
	ErrMinSelfDelegationInvalid        = sdkerrors.Register(ModuleName, 18, "minimum self delegation must be a positive integer")
	ErrMinSelfDelegationDecreased      = sdkerrors.Register(ModuleName, 19, "minimum self delegation cannot be decrease")
	ErrEmptyDelegatorAddr              = sdkerrors.Register(ModuleName, 20, "empty delegator address")
	ErrBadDenom                        = sdkerrors.Register(ModuleName, 21, "invalid coin denomination")
	ErrBadDelegationAddr               = sdkerrors.Register(ModuleName, 22, "invalid address for (address, validator) tuple")
	ErrBadDelegationAmount             = sdkerrors.Register(ModuleName, 23, "invalid delegation amount")
	ErrNoDelegation                    = sdkerrors.Register(ModuleName, 24, "no delegation for (address, validator) tuple")
	ErrBadDelegatorAddr                = sdkerrors.Register(ModuleName, 25, "delegator does not exist with address")
	ErrNoDelegatorForAddress           = sdkerrors.Register(ModuleName, 26, "delegator does not contain delegation")
	ErrInsufficientShares              = sdkerrors.Register(ModuleName, 27, "insufficient delegation shares")
	ErrDelegationValidatorEmpty        = sdkerrors.Register(ModuleName, 28, "cannot delegate to an empty validator")
	ErrNotEnoughDelegationShares       = sdkerrors.Register(ModuleName, 29, "not enough delegation shares")
	ErrBadSharesAmount                 = sdkerrors.Register(ModuleName, 30, "invalid shares amount")
	ErrBadSharesPercent                = sdkerrors.Register(ModuleName, 31, "Invalid shares percent")
	ErrNotMature                       = sdkerrors.Register(ModuleName, 32, "entry not mature")
	ErrNoUnbondingDelegation           = sdkerrors.Register(ModuleName, 33, "no unbonding delegation found")
	ErrMaxUnbondingDelegationEntries   = sdkerrors.Register(ModuleName, 34, "too many unbonding delegation entries for (delegator, validator) tuple")
	ErrBadRedelegationAddr             = sdkerrors.Register(ModuleName, 35, "invalid address for (address, src-validator, dst-validator) tuple")
	ErrNoRedelegation                  = sdkerrors.Register(ModuleName, 36, "no redelegation found")
	ErrSelfRedelegation                = sdkerrors.Register(ModuleName, 37, "cannot redelegate to the same validator")
	ErrTinyRedelegationAmount          = sdkerrors.Register(ModuleName, 38, "too few tokens to redelegate (truncates to zero tokens)")
	ErrBadRedelegationDst              = sdkerrors.Register(ModuleName, 39, "redelegation destination validator not found")
	ErrTransitiveRedelegation          = sdkerrors.Register(ModuleName, 40, "redelegation to this validator already in progress; first redelegation to this validator must complete before next redelegation")
	ErrMaxRedelegationEntries          = sdkerrors.Register(ModuleName, 41, "too many redelegation entries for (delegator, src-validator, dst-validator) tuple")
	ErrDelegatorShareExRateInvalid     = sdkerrors.Register(ModuleName, 42, "cannot delegate to validators with invalid (zero) ex-rate")
	ErrBothShareMsgsGiven              = sdkerrors.Register(ModuleName, 43, "both shares amount and shares percent provided")
	ErrNeitherShareMsgsGiven           = sdkerrors.Register(ModuleName, 44, "neither shares amount nor shares percent provided")
	ErrInvalidHistoricalInfo           = sdkerrors.Register(ModuleName, 45, "invalid historical info")
	ErrNoHistoricalInfo                = sdkerrors.Register(ModuleName, 46, "no historical info found")
	ErrEmptyValidatorPubKey            = sdkerrors.Register(ModuleName, 47, "empty validator public key")
)

x/staking module sentinel errors

TODO: Many of these errors are redundant. They should be removed and replaced by sdkerrors.ErrInvalidRequest.

REF: https://github.com/JaTochNietDan/cosmos-sdk/issues/5450

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 (
	// Keys for store prefixes
	// Last* values are constant during a block.
	LastValidatorPowerKey = []byte{0x11} // prefix for each key to a validator index, for bonded validators
	LastTotalPowerKey     = []byte{0x12} // prefix for the total power

	ValidatorsKey             = []byte{0x21} // prefix for each key to a validator
	ValidatorsByConsAddrKey   = []byte{0x22} // prefix for each key to a validator index, by pubkey
	ValidatorsByPowerIndexKey = []byte{0x23} // prefix for each key to a validator index, sorted by power

	DelegationKey                    = []byte{0x31} // key for a delegation
	UnbondingDelegationKey           = []byte{0x32} // key for an unbonding-delegation
	UnbondingDelegationByValIndexKey = []byte{0x33} // prefix for each key for an unbonding-delegation, by validator operator
	RedelegationKey                  = []byte{0x34} // key for a redelegation
	RedelegationByValSrcIndexKey     = []byte{0x35} // prefix for each key for an redelegation, by source validator operator
	RedelegationByValDstIndexKey     = []byte{0x36} // prefix for each key for an redelegation, by destination validator operator

	UnbondingQueueKey    = []byte{0x41} // prefix for the timestamps in unbonding queue
	RedelegationQueueKey = []byte{0x42} // prefix for the timestamps in redelegations queue
	ValidatorQueueKey    = []byte{0x43} // prefix for the timestamps in validator queue

	HistoricalInfoKey = []byte{0x50} // prefix for the historical info
)
View Source
var (
	KeyUnbondingTime     = []byte("UnbondingTime")
	KeyMaxValidators     = []byte("MaxValidators")
	KeyMaxEntries        = []byte("MaxEntries")
	KeyBondDenom         = []byte("BondDenom")
	KeyHistoricalEntries = []byte("HistoricalEntries")
)
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 (
	ErrInvalidLengthStaking        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowStaking          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupStaking = 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 (
	BondStatusUnspecified = BondStatus_name[int32(Unspecified)]
	BondStatusUnbonded    = BondStatus_name[int32(Unbonded)]
	BondStatusUnbonding   = BondStatus_name[int32(Unbonding)]
	BondStatusBonded      = BondStatus_name[int32(Bonded)]
)
View Source
var BondStatus_name = map[int32]string{
	0: "BOND_STATUS_UNSPECIFIED",
	1: "BOND_STATUS_UNBONDED",
	2: "BOND_STATUS_UNBONDING",
	3: "BOND_STATUS_BONDED",
}
View Source
var BondStatus_value = map[string]int32{
	"BOND_STATUS_UNSPECIFIED": 0,
	"BOND_STATUS_UNBONDED":    1,
	"BOND_STATUS_UNBONDING":   2,
	"BOND_STATUS_BONDED":      3,
}
View Source
var (

	// ModuleCdc references the global x/staking module codec. Note, the codec should
	// ONLY be used in certain instances of tests and for JSON encoding as Amino is
	// still used for that purpose.
	//
	// The actual codec used for serialization should be provided to x/staking and
	// defined at the application level.
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func AddressFromLastValidatorPowerKey added in v0.41.4

func AddressFromLastValidatorPowerKey(key []byte) []byte

Get the validator operator address from LastValidatorPowerKey

func GetDelegationKey added in v0.41.4

func GetDelegationKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte

gets the key for delegator bond with validator VALUE: staking/Delegation

func GetDelegationsKey added in v0.41.4

func GetDelegationsKey(delAddr sdk.AccAddress) []byte

gets the prefix for a delegator for all validators

func GetHistoricalInfoKey added in v0.41.4

func GetHistoricalInfoKey(height int64) []byte

GetHistoricalInfoKey returns a key prefix for indexing HistoricalInfo objects.

func GetLastValidatorPowerKey added in v0.41.4

func GetLastValidatorPowerKey(operator sdk.ValAddress) []byte

get the bonded validator index key for an operator address

func GetREDByValDstIndexKey added in v0.41.4

func GetREDByValDstIndexKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte

gets the index-key for a redelegation, stored by destination-validator-index VALUE: none (key rearrangement used)

func GetREDByValSrcIndexKey added in v0.41.4

func GetREDByValSrcIndexKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte

gets the index-key for a redelegation, stored by source-validator-index VALUE: none (key rearrangement used)

func GetREDKey added in v0.41.4

func GetREDKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte

GetREDKey returns a key prefix for indexing a redelegation from a delegator and source validator to a destination validator.

func GetREDKeyFromValDstIndexKey added in v0.41.4

func GetREDKeyFromValDstIndexKey(indexKey []byte) []byte

GetREDKeyFromValDstIndexKey rearranges the ValDstIndexKey to get the REDKey

func GetREDKeyFromValSrcIndexKey added in v0.41.4

func GetREDKeyFromValSrcIndexKey(indexKey []byte) []byte

GetREDKeyFromValSrcIndexKey rearranges the ValSrcIndexKey to get the REDKey

func GetREDsByDelToValDstIndexKey added in v0.41.4

func GetREDsByDelToValDstIndexKey(delAddr sdk.AccAddress, valDstAddr sdk.ValAddress) []byte

GetREDsByDelToValDstIndexKey returns a key prefix for indexing a redelegation from an address to a source validator.

func GetREDsFromValSrcIndexKey added in v0.41.4

func GetREDsFromValSrcIndexKey(valSrcAddr sdk.ValAddress) []byte

GetREDsFromValSrcIndexKey returns a key prefix for indexing a redelegation to a source validator.

func GetREDsKey added in v0.41.4

func GetREDsKey(delAddr sdk.AccAddress) []byte

GetREDsKey returns a key prefix for indexing a redelegation from a delegator address.

func GetREDsToValDstIndexKey added in v0.41.4

func GetREDsToValDstIndexKey(valDstAddr sdk.ValAddress) []byte

GetREDsToValDstIndexKey returns a key prefix for indexing a redelegation to a destination (target) validator.

func GetRedelegationTimeKey added in v0.41.4

func GetRedelegationTimeKey(timestamp time.Time) []byte

GetRedelegationTimeKey returns a key prefix for indexing an unbonding redelegation based on a completion time.

func GetUBDByValIndexKey added in v0.41.4

func GetUBDByValIndexKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte

gets the index-key for an unbonding delegation, stored by validator-index VALUE: none (key rearrangement used)

func GetUBDKey added in v0.41.4

func GetUBDKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte

gets the key for an unbonding delegation by delegator and validator addr VALUE: staking/UnbondingDelegation

func GetUBDKeyFromValIndexKey added in v0.41.4

func GetUBDKeyFromValIndexKey(indexKey []byte) []byte

rearranges the ValIndexKey to get the UBDKey

func GetUBDsByValIndexKey added in v0.41.4

func GetUBDsByValIndexKey(valAddr sdk.ValAddress) []byte

gets the prefix keyspace for the indexes of unbonding delegations for a validator

func GetUBDsKey added in v0.41.4

func GetUBDsKey(delAddr sdk.AccAddress) []byte

gets the prefix for all unbonding delegations from a delegator

func GetUnbondingDelegationTimeKey added in v0.41.4

func GetUnbondingDelegationTimeKey(timestamp time.Time) []byte

gets the prefix for all unbonding delegations from a delegator

func GetValidatorByConsAddrKey added in v0.41.4

func GetValidatorByConsAddrKey(addr sdk.ConsAddress) []byte

gets the key for the validator with pubkey VALUE: validator operator address ([]byte)

func GetValidatorKey added in v0.41.4

func GetValidatorKey(operatorAddr sdk.ValAddress) []byte

gets the key for the validator with address VALUE: staking/Validator

func GetValidatorQueueKey added in v0.41.4

func GetValidatorQueueKey(timestamp time.Time, height int64) []byte

GetValidatorQueueKey returns the prefix key used for getting a set of unbonding validators whose unbonding completion occurs at the given time and height.

func GetValidatorsByPowerIndexKey added in v0.41.4

func GetValidatorsByPowerIndexKey(validator Validator) []byte

get the validator by power index. Power index is the key used in the power-store, and represents the relative power ranking of the validator. VALUE: validator operator address ([]byte)

func MustMarshalDelegation

func MustMarshalDelegation(cdc codec.BinaryMarshaler, delegation Delegation) []byte

MustMarshalDelegation returns the delegation bytes. Panics if fails

func MustMarshalRED

func MustMarshalRED(cdc codec.BinaryMarshaler, red Redelegation) []byte

MustMarshalRED returns the Redelegation bytes. Panics if fails.

func MustMarshalUBD

func MustMarshalUBD(cdc codec.BinaryMarshaler, ubd UnbondingDelegation) []byte

return the unbonding delegation

func MustMarshalValidator

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

return the redelegation

func ParamKeyTable added in v0.41.4

func ParamKeyTable() paramtypes.KeyTable

ParamTable for staking module

func ParseValidatorPowerRankKey added in v0.41.4

func ParseValidatorPowerRankKey(key []byte) (operAddr []byte)

parse the validators operator address from power rank key

func ParseValidatorQueueKey added in v0.41.4

func ParseValidatorQueueKey(bz []byte) (time.Time, int64, error)

ParseValidatorQueueKey returns the encoded time and height from a key created from GetValidatorQueueKey.

func RegisterInterfaces added in v0.41.4

func RegisterInterfaces(registry types.InterfaceRegistry)

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

func RegisterLegacyAminoCodec added in v0.41.4

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

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

func RegisterMsgServer added in v0.41.4

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler added in v0.41.4

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

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

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

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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer added in v0.41.4

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func StakingDescription added in v0.41.4

func ValidateBasic added in v0.41.4

func ValidateBasic(hi HistoricalInfo) error

ValidateBasic will ensure HistoricalInfo is not nil and sorted

Types

type AccountKeeper added in v0.41.4

type AccountKeeper interface {
	IterateAccounts(ctx sdk.Context, process func(authtypes.AccountI) (stop bool))
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI // only used for simulation

	GetModuleAddress(name string) sdk.AccAddress
	GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI

	// TODO remove with genesis 2-phases refactor https://github.com/JaTochNietDan/cosmos-sdk/issues/2862
	SetModuleAccount(sdk.Context, authtypes.ModuleAccountI)
}

AccountKeeper defines the expected account keeper (noalias)

type BankKeeper added in v0.32.0

type BankKeeper interface {
	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
	SetBalances(ctx sdk.Context, addr sdk.AccAddress, balances sdk.Coins) error
	LockedCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins

	GetSupply(ctx sdk.Context) bankexported.SupplyI

	SendCoinsFromModuleToModule(ctx sdk.Context, senderPool, recipientPool string, amt sdk.Coins) error
	UndelegateCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	DelegateCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error

	BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error
}

BankKeeper defines the expected interface needed to retrieve account balances.

type BondStatus added in v0.41.4

type BondStatus int32

BondStatus is the status of a validator.

const (
	// UNSPECIFIED defines an invalid validator status.
	Unspecified BondStatus = 0
	// UNBONDED defines a validator that is not bonded.
	Unbonded BondStatus = 1
	// UNBONDING defines a validator that is unbonding.
	Unbonding BondStatus = 2
	// BONDED defines a validator that is bonded.
	Bonded BondStatus = 3
)

func (BondStatus) EnumDescriptor added in v0.41.4

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

func (BondStatus) String added in v0.41.4

func (x BondStatus) String() string

type Commission

type Commission struct {
	// commission_rates defines the initial commission rates to be used for creating a validator.
	CommissionRates `protobuf:"bytes,1,opt,name=commission_rates,json=commissionRates,proto3,embedded=commission_rates" json:"commission_rates"`
	// update_time is the last time the commission rate was changed.
	UpdateTime time.Time `protobuf:"bytes,2,opt,name=update_time,json=updateTime,proto3,stdtime" json:"update_time" yaml:"update_time"`
}

Commission defines commission parameters for a given validator.

func NewCommission

func NewCommission(rate, maxRate, maxChangeRate sdk.Dec) Commission

NewCommission returns an initialized validator commission.

func NewCommissionWithTime

func NewCommissionWithTime(rate, maxRate, maxChangeRate sdk.Dec, updatedAt time.Time) Commission

NewCommissionWithTime returns an initialized validator commission with a specified update time which should be the current block BFT time.

func (*Commission) Descriptor added in v0.41.4

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

func (*Commission) Equal

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

func (*Commission) GetUpdateTime added in v0.41.4

func (m *Commission) GetUpdateTime() time.Time

func (*Commission) Marshal added in v0.41.4

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

func (*Commission) MarshalTo added in v0.41.4

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

func (*Commission) MarshalToSizedBuffer added in v0.41.4

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

func (*Commission) ProtoMessage added in v0.41.4

func (*Commission) ProtoMessage()

func (*Commission) Reset added in v0.41.4

func (m *Commission) Reset()

func (*Commission) Size added in v0.41.4

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

func (Commission) String

func (c Commission) String() string

String implements the Stringer interface for a Commission object.

func (*Commission) Unmarshal added in v0.41.4

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

func (Commission) ValidateNewRate

func (c Commission) ValidateNewRate(newRate sdk.Dec, blockTime time.Time) error

ValidateNewRate performs basic sanity validation checks of a new commission rate. If validation fails, an SDK error is returned.

func (*Commission) XXX_DiscardUnknown added in v0.41.4

func (m *Commission) XXX_DiscardUnknown()

func (*Commission) XXX_Marshal added in v0.41.4

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

func (*Commission) XXX_Merge added in v0.41.4

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

func (*Commission) XXX_Size added in v0.41.4

func (m *Commission) XXX_Size() int

func (*Commission) XXX_Unmarshal added in v0.41.4

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

type CommissionRates added in v0.41.4

type CommissionRates struct {
	// rate is the commission rate charged to delegators, as a fraction.
	Rate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=rate,proto3,customtype=github.com/JaTochNietDan/cosmos-sdk/types.Dec" json:"rate"`
	// max_rate defines the maximum commission rate which validator can ever charge, as a fraction.
	MaxRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 145-byte string literal not displayed */
	// max_change_rate defines the maximum daily increase of the validator commission, as a fraction.
	MaxChangeRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 172-byte string literal not displayed */
}

CommissionRates defines the initial commission rates to be used for creating a validator.

func NewCommissionRates added in v0.41.4

func NewCommissionRates(rate, maxRate, maxChangeRate sdk.Dec) CommissionRates

NewCommissionRates returns an initialized validator commission rates.

func (*CommissionRates) Descriptor added in v0.41.4

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

func (*CommissionRates) Equal added in v0.41.4

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

func (*CommissionRates) Marshal added in v0.41.4

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

func (*CommissionRates) MarshalTo added in v0.41.4

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

func (*CommissionRates) MarshalToSizedBuffer added in v0.41.4

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

func (*CommissionRates) ProtoMessage added in v0.41.4

func (*CommissionRates) ProtoMessage()

func (*CommissionRates) Reset added in v0.41.4

func (m *CommissionRates) Reset()

func (*CommissionRates) Size added in v0.41.4

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

func (CommissionRates) String added in v0.41.4

func (cr CommissionRates) String() string

String implements the Stringer interface for a CommissionRates object.

func (*CommissionRates) Unmarshal added in v0.41.4

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

func (CommissionRates) Validate added in v0.41.4

func (cr CommissionRates) Validate() error

Validate performs basic sanity validation checks of initial commission parameters. If validation fails, an SDK error is returned.

func (*CommissionRates) XXX_DiscardUnknown added in v0.41.4

func (m *CommissionRates) XXX_DiscardUnknown()

func (*CommissionRates) XXX_Marshal added in v0.41.4

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

func (*CommissionRates) XXX_Merge added in v0.41.4

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

func (*CommissionRates) XXX_Size added in v0.41.4

func (m *CommissionRates) XXX_Size() int

func (*CommissionRates) XXX_Unmarshal added in v0.41.4

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

type DVPair

type DVPair struct {
	DelegatorAddress string `` /* 134-byte string literal not displayed */
	ValidatorAddress string `` /* 134-byte string literal not displayed */
}

DVPair is struct that just has a delegator-validator pair with no other data. It is intended to be used as a marshalable pointer. For example, a DVPair can be used to construct the key to getting an UnbondingDelegation from state.

func (*DVPair) Descriptor added in v0.41.4

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

func (*DVPair) Marshal added in v0.41.4

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

func (*DVPair) MarshalTo added in v0.41.4

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

func (*DVPair) MarshalToSizedBuffer added in v0.41.4

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

func (*DVPair) ProtoMessage added in v0.41.4

func (*DVPair) ProtoMessage()

func (*DVPair) Reset added in v0.41.4

func (m *DVPair) Reset()

func (*DVPair) Size added in v0.41.4

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

func (DVPair) String added in v0.41.4

func (dv DVPair) String() string

String implements the Stringer interface for a DVPair object.

func (*DVPair) Unmarshal added in v0.41.4

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

func (*DVPair) XXX_DiscardUnknown added in v0.41.4

func (m *DVPair) XXX_DiscardUnknown()

func (*DVPair) XXX_Marshal added in v0.41.4

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

func (*DVPair) XXX_Merge added in v0.41.4

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

func (*DVPair) XXX_Size added in v0.41.4

func (m *DVPair) XXX_Size() int

func (*DVPair) XXX_Unmarshal added in v0.41.4

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

type DVPairs added in v0.41.4

type DVPairs struct {
	Pairs []DVPair `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs"`
}

DVPairs defines an array of DVPair objects.

func (*DVPairs) Descriptor added in v0.41.4

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

func (*DVPairs) GetPairs added in v0.41.4

func (m *DVPairs) GetPairs() []DVPair

func (*DVPairs) Marshal added in v0.41.4

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

func (*DVPairs) MarshalTo added in v0.41.4

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

func (*DVPairs) MarshalToSizedBuffer added in v0.41.4

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

func (*DVPairs) ProtoMessage added in v0.41.4

func (*DVPairs) ProtoMessage()

func (*DVPairs) Reset added in v0.41.4

func (m *DVPairs) Reset()

func (*DVPairs) Size added in v0.41.4

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

func (*DVPairs) String added in v0.41.4

func (m *DVPairs) String() string

func (*DVPairs) Unmarshal added in v0.41.4

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

func (*DVPairs) XXX_DiscardUnknown added in v0.41.4

func (m *DVPairs) XXX_DiscardUnknown()

func (*DVPairs) XXX_Marshal added in v0.41.4

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

func (*DVPairs) XXX_Merge added in v0.41.4

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

func (*DVPairs) XXX_Size added in v0.41.4

func (m *DVPairs) XXX_Size() int

func (*DVPairs) XXX_Unmarshal added in v0.41.4

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

type DVVTriplet

type DVVTriplet struct {
	DelegatorAddress    string `` /* 134-byte string literal not displayed */
	ValidatorSrcAddress string `` /* 149-byte string literal not displayed */
	ValidatorDstAddress string `` /* 149-byte string literal not displayed */
}

DVVTriplet is struct that just has a delegator-validator-validator triplet with no other data. It is intended to be used as a marshalable pointer. For example, a DVVTriplet can be used to construct the key to getting a Redelegation from state.

func (*DVVTriplet) Descriptor added in v0.41.4

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

func (*DVVTriplet) Marshal added in v0.41.4

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

func (*DVVTriplet) MarshalTo added in v0.41.4

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

func (*DVVTriplet) MarshalToSizedBuffer added in v0.41.4

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

func (*DVVTriplet) ProtoMessage added in v0.41.4

func (*DVVTriplet) ProtoMessage()

func (*DVVTriplet) Reset added in v0.41.4

func (m *DVVTriplet) Reset()

func (*DVVTriplet) Size added in v0.41.4

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

func (DVVTriplet) String added in v0.41.4

func (dvv DVVTriplet) String() string

String implements the Stringer interface for a DVVTriplet object.

func (*DVVTriplet) Unmarshal added in v0.41.4

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

func (*DVVTriplet) XXX_DiscardUnknown added in v0.41.4

func (m *DVVTriplet) XXX_DiscardUnknown()

func (*DVVTriplet) XXX_Marshal added in v0.41.4

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

func (*DVVTriplet) XXX_Merge added in v0.41.4

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

func (*DVVTriplet) XXX_Size added in v0.41.4

func (m *DVVTriplet) XXX_Size() int

func (*DVVTriplet) XXX_Unmarshal added in v0.41.4

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

type DVVTriplets added in v0.41.4

type DVVTriplets struct {
	Triplets []DVVTriplet `protobuf:"bytes,1,rep,name=triplets,proto3" json:"triplets"`
}

DVVTriplets defines an array of DVVTriplet objects.

func (*DVVTriplets) Descriptor added in v0.41.4

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

func (*DVVTriplets) GetTriplets added in v0.41.4

func (m *DVVTriplets) GetTriplets() []DVVTriplet

func (*DVVTriplets) Marshal added in v0.41.4

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

func (*DVVTriplets) MarshalTo added in v0.41.4

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

func (*DVVTriplets) MarshalToSizedBuffer added in v0.41.4

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

func (*DVVTriplets) ProtoMessage added in v0.41.4

func (*DVVTriplets) ProtoMessage()

func (*DVVTriplets) Reset added in v0.41.4

func (m *DVVTriplets) Reset()

func (*DVVTriplets) Size added in v0.41.4

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

func (*DVVTriplets) String added in v0.41.4

func (m *DVVTriplets) String() string

func (*DVVTriplets) Unmarshal added in v0.41.4

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

func (*DVVTriplets) XXX_DiscardUnknown added in v0.41.4

func (m *DVVTriplets) XXX_DiscardUnknown()

func (*DVVTriplets) XXX_Marshal added in v0.41.4

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

func (*DVVTriplets) XXX_Merge added in v0.41.4

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

func (*DVVTriplets) XXX_Size added in v0.41.4

func (m *DVVTriplets) XXX_Size() int

func (*DVVTriplets) XXX_Unmarshal added in v0.41.4

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

type Delegation

type Delegation struct {
	// delegator_address is the bech32-encoded address of the delegator.
	DelegatorAddress string `` /* 134-byte string literal not displayed */
	// validator_address is the bech32-encoded address of the validator.
	ValidatorAddress string `` /* 134-byte string literal not displayed */
	// shares define the delegation shares received.
	Shares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=shares,proto3,customtype=github.com/JaTochNietDan/cosmos-sdk/types.Dec" json:"shares"`
}

Delegation represents the bond with tokens held by an account. It is owned by one delegator, and is associated with the voting power of one validator.

func MustUnmarshalDelegation

func MustUnmarshalDelegation(cdc codec.BinaryMarshaler, value []byte) Delegation

MustUnmarshalDelegation return the unmarshaled delegation from bytes. Panics if fails.

func NewDelegation

func NewDelegation(delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, shares sdk.Dec) Delegation

NewDelegation creates a new delegation object

func UnmarshalDelegation

func UnmarshalDelegation(cdc codec.BinaryMarshaler, value []byte) (delegation Delegation, err error)

return the delegation

func (*Delegation) Descriptor added in v0.41.4

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

func (Delegation) GetDelegatorAddr

func (d Delegation) GetDelegatorAddr() sdk.AccAddress

func (Delegation) GetShares

func (d Delegation) GetShares() sdk.Dec

func (Delegation) GetValidatorAddr

func (d Delegation) GetValidatorAddr() sdk.ValAddress

func (*Delegation) Marshal added in v0.41.4

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

func (*Delegation) MarshalTo added in v0.41.4

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

func (*Delegation) MarshalToSizedBuffer added in v0.41.4

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

func (*Delegation) ProtoMessage added in v0.41.4

func (*Delegation) ProtoMessage()

func (*Delegation) Reset added in v0.41.4

func (m *Delegation) Reset()

func (*Delegation) Size added in v0.41.4

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

func (Delegation) String

func (d Delegation) String() string

String returns a human readable string representation of a Delegation.

func (*Delegation) Unmarshal added in v0.41.4

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

func (*Delegation) XXX_DiscardUnknown added in v0.41.4

func (m *Delegation) XXX_DiscardUnknown()

func (*Delegation) XXX_Marshal added in v0.41.4

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

func (*Delegation) XXX_Merge added in v0.41.4

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

func (*Delegation) XXX_Size added in v0.41.4

func (m *Delegation) XXX_Size() int

func (*Delegation) XXX_Unmarshal added in v0.41.4

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

type DelegationI added in v0.41.4

type DelegationI interface {
	GetDelegatorAddr() sdk.AccAddress // delegator sdk.AccAddress for the bond
	GetValidatorAddr() sdk.ValAddress // validator operator address
	GetShares() sdk.Dec               // amount of validator's shares held in this delegation
}

DelegationI delegation bond for a delegated proof of stake system

type DelegationResponse added in v0.41.4

type DelegationResponse struct {
	Delegation Delegation  `protobuf:"bytes,1,opt,name=delegation,proto3" json:"delegation"`
	Balance    types2.Coin `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance"`
}

DelegationResponse is equivalent to Delegation except that it contains a balance in addition to shares which is more suitable for client responses.

func NewDelegationResp added in v0.41.4

func NewDelegationResp(
	delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, shares sdk.Dec, balance sdk.Coin,
) DelegationResponse

NewDelegationResp creates a new DelegationResponse instance

func (*DelegationResponse) Descriptor added in v0.41.4

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

func (*DelegationResponse) GetBalance added in v0.41.4

func (m *DelegationResponse) GetBalance() types2.Coin

func (*DelegationResponse) GetDelegation added in v0.41.4

func (m *DelegationResponse) GetDelegation() Delegation

func (*DelegationResponse) Marshal added in v0.41.4

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

func (DelegationResponse) MarshalJSON added in v0.41.4

func (d DelegationResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. This is so we can achieve a flattened structure while embedding other types.

func (*DelegationResponse) MarshalTo added in v0.41.4

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

func (*DelegationResponse) MarshalToSizedBuffer added in v0.41.4

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

func (*DelegationResponse) ProtoMessage added in v0.41.4

func (*DelegationResponse) ProtoMessage()

func (*DelegationResponse) Reset added in v0.41.4

func (m *DelegationResponse) Reset()

func (*DelegationResponse) Size added in v0.41.4

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

func (DelegationResponse) String added in v0.41.4

func (d DelegationResponse) String() string

String implements the Stringer interface for DelegationResponse.

func (*DelegationResponse) Unmarshal added in v0.41.4

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

func (*DelegationResponse) UnmarshalJSON added in v0.41.4

func (d *DelegationResponse) UnmarshalJSON(bz []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. This is so we can achieve a flattened structure while embedding other types.

func (*DelegationResponse) XXX_DiscardUnknown added in v0.41.4

func (m *DelegationResponse) XXX_DiscardUnknown()

func (*DelegationResponse) XXX_Marshal added in v0.41.4

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

func (*DelegationResponse) XXX_Merge added in v0.41.4

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

func (*DelegationResponse) XXX_Size added in v0.41.4

func (m *DelegationResponse) XXX_Size() int

func (*DelegationResponse) XXX_Unmarshal added in v0.41.4

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

type DelegationResponses added in v0.41.4

type DelegationResponses []DelegationResponse

DelegationResponses is a collection of DelegationResp

func (DelegationResponses) String added in v0.41.4

func (d DelegationResponses) String() (out string)

String implements the Stringer interface for DelegationResponses.

type DelegationSet added in v0.41.4

type DelegationSet interface {
	GetValidatorSet() ValidatorSet // validator set for which delegation set is based upon

	// iterate through all delegations from one delegator by validator-AccAddress,
	//   execute func for each validator
	IterateDelegations(ctx sdk.Context, delegator sdk.AccAddress,
		fn func(index int64, delegation DelegationI) (stop bool))
}

DelegationSet expected properties for the set of all delegations for a particular (noalias)

type Delegations

type Delegations []Delegation

Delegations is a collection of delegations

func (Delegations) String

func (d Delegations) String() (out string)

type Description

type Description struct {
	// moniker defines a human-readable name for the validator.
	Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"`
	// identity defines an optional identity signature (ex. UPort or Keybase).
	Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"`
	// website defines an optional website link.
	Website string `protobuf:"bytes,3,opt,name=website,proto3" json:"website,omitempty"`
	// security_contact defines an optional email for security contact.
	SecurityContact string `` /* 130-byte string literal not displayed */
	// details define other optional details.
	Details string `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"`
}

Description defines a validator description.

func NewDescription

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

func (*Description) Descriptor added in v0.41.4

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

func (Description) EnsureLength

func (d Description) EnsureLength() (Description, error)

EnsureLength ensures the length of a validator's description.

func (*Description) Equal added in v0.41.4

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

func (*Description) GetDetails added in v0.41.4

func (m *Description) GetDetails() string

func (*Description) GetIdentity added in v0.41.4

func (m *Description) GetIdentity() string

func (*Description) GetMoniker added in v0.41.4

func (m *Description) GetMoniker() string

func (*Description) GetSecurityContact added in v0.41.4

func (m *Description) GetSecurityContact() string

func (*Description) GetWebsite added in v0.41.4

func (m *Description) GetWebsite() string

func (*Description) Marshal added in v0.41.4

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

func (*Description) MarshalTo added in v0.41.4

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

func (*Description) MarshalToSizedBuffer added in v0.41.4

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

func (*Description) ProtoMessage added in v0.41.4

func (*Description) ProtoMessage()

func (*Description) Reset added in v0.41.4

func (m *Description) Reset()

func (*Description) Size added in v0.41.4

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

func (Description) String added in v0.41.4

func (d Description) String() string

String implements the Stringer interface for a Description object.

func (*Description) Unmarshal added in v0.41.4

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

func (Description) UpdateDescription

func (d Description) UpdateDescription(d2 Description) (Description, error)

UpdateDescription updates the fields of a given description. An error is returned if the resulting description contains an invalid length.

func (*Description) XXX_DiscardUnknown added in v0.41.4

func (m *Description) XXX_DiscardUnknown()

func (*Description) XXX_Marshal added in v0.41.4

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

func (*Description) XXX_Merge added in v0.41.4

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

func (*Description) XXX_Size added in v0.41.4

func (m *Description) XXX_Size() int

func (*Description) XXX_Unmarshal added in v0.41.4

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

type DistributionKeeper added in v0.32.0

type DistributionKeeper interface {
	GetFeePoolCommunityCoins(ctx sdk.Context) sdk.DecCoins
	GetValidatorOutstandingRewardsCoins(ctx sdk.Context, val sdk.ValAddress) sdk.DecCoins
}

DistributionKeeper expected distribution keeper (noalias)

type GenesisState

type GenesisState struct {
	// params defines all the paramaters of related to deposit.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// last_total_power tracks the total amounts of bonded tokens recorded during
	// the previous end block.
	LastTotalPower github_com_cosmos_cosmos_sdk_types.Int `` /* 176-byte string literal not displayed */
	// last_validator_powers is a special index that provides a historical list
	// of the last-block's bonded validators.
	LastValidatorPowers []LastValidatorPower `` /* 139-byte string literal not displayed */
	// delegations defines the validator set at genesis.
	Validators []Validator `protobuf:"bytes,4,rep,name=validators,proto3" json:"validators"`
	// delegations defines the delegations active at genesis.
	Delegations []Delegation `protobuf:"bytes,5,rep,name=delegations,proto3" json:"delegations"`
	// unbonding_delegations defines the unbonding delegations active at genesis.
	UnbondingDelegations []UnbondingDelegation `` /* 140-byte string literal not displayed */
	// redelegations defines the redelegations active at genesis.
	Redelegations []Redelegation `protobuf:"bytes,7,rep,name=redelegations,proto3" json:"redelegations"`
	Exported      bool           `protobuf:"varint,8,opt,name=exported,proto3" json:"exported,omitempty"`
}

GenesisState defines the staking module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState gets the raw genesis raw message for testing

func GetGenesisStateFromAppState added in v0.41.4

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

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

func NewGenesisState

func NewGenesisState(params Params, validators []Validator, delegations []Delegation) *GenesisState

NewGenesisState creates a new GenesisState instanc e

func (*GenesisState) Descriptor added in v0.41.4

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

func (*GenesisState) GetDelegations added in v0.41.4

func (m *GenesisState) GetDelegations() []Delegation

func (*GenesisState) GetExported added in v0.41.4

func (m *GenesisState) GetExported() bool

func (*GenesisState) GetLastValidatorPowers added in v0.41.4

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

func (*GenesisState) GetParams added in v0.41.4

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetRedelegations added in v0.41.4

func (m *GenesisState) GetRedelegations() []Redelegation

func (*GenesisState) GetUnbondingDelegations added in v0.41.4

func (m *GenesisState) GetUnbondingDelegations() []UnbondingDelegation

func (*GenesisState) GetValidators added in v0.41.4

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

func (*GenesisState) Marshal added in v0.41.4

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

func (*GenesisState) MarshalTo added in v0.41.4

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

func (*GenesisState) MarshalToSizedBuffer added in v0.41.4

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

func (*GenesisState) ProtoMessage added in v0.41.4

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset added in v0.41.4

func (m *GenesisState) Reset()

func (*GenesisState) Size added in v0.41.4

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

func (*GenesisState) String added in v0.41.4

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal added in v0.41.4

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

func (GenesisState) UnpackInterfaces added in v0.41.4

func (g GenesisState) UnpackInterfaces(c codectypes.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (*GenesisState) XXX_DiscardUnknown added in v0.41.4

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal added in v0.41.4

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

func (*GenesisState) XXX_Merge added in v0.41.4

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

func (*GenesisState) XXX_Size added in v0.41.4

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal added in v0.41.4

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

type HistoricalInfo added in v0.41.4

type HistoricalInfo struct {
	Header types.Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header"`
	Valset []Validator  `protobuf:"bytes,2,rep,name=valset,proto3" json:"valset"`
}

HistoricalInfo contains header and validator information for a given block. It is stored as part of staking module's state, which persists the `n` most recent HistoricalInfo (`n` is set by the staking module's `historical_entries` parameter).

func MustUnmarshalHistoricalInfo added in v0.41.4

func MustUnmarshalHistoricalInfo(cdc codec.BinaryMarshaler, value []byte) HistoricalInfo

MustUnmarshalHistoricalInfo wll unmarshal historical info and panic on error

func NewHistoricalInfo added in v0.41.4

func NewHistoricalInfo(header tmproto.Header, valSet Validators) HistoricalInfo

NewHistoricalInfo will create a historical information struct from header and valset it will first sort valset before inclusion into historical info

func UnmarshalHistoricalInfo added in v0.41.4

func UnmarshalHistoricalInfo(cdc codec.BinaryMarshaler, value []byte) (hi HistoricalInfo, err error)

UnmarshalHistoricalInfo will unmarshal historical info and return any error

func (*HistoricalInfo) Descriptor added in v0.41.4

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

func (*HistoricalInfo) Equal added in v0.41.4

func (hi *HistoricalInfo) Equal(hi2 *HistoricalInfo) bool

Equal checks if receiver is equal to the parameter

func (*HistoricalInfo) GetHeader added in v0.41.4

func (m *HistoricalInfo) GetHeader() types.Header

func (*HistoricalInfo) GetValset added in v0.41.4

func (m *HistoricalInfo) GetValset() []Validator

func (*HistoricalInfo) Marshal added in v0.41.4

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

func (*HistoricalInfo) MarshalTo added in v0.41.4

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

func (*HistoricalInfo) MarshalToSizedBuffer added in v0.41.4

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

func (*HistoricalInfo) ProtoMessage added in v0.41.4

func (*HistoricalInfo) ProtoMessage()

func (*HistoricalInfo) Reset added in v0.41.4

func (m *HistoricalInfo) Reset()

func (*HistoricalInfo) Size added in v0.41.4

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

func (*HistoricalInfo) String added in v0.41.4

func (m *HistoricalInfo) String() string

func (*HistoricalInfo) Unmarshal added in v0.41.4

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

func (HistoricalInfo) UnpackInterfaces added in v0.41.4

func (hi HistoricalInfo) UnpackInterfaces(c codectypes.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (*HistoricalInfo) XXX_DiscardUnknown added in v0.41.4

func (m *HistoricalInfo) XXX_DiscardUnknown()

func (*HistoricalInfo) XXX_Marshal added in v0.41.4

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

func (*HistoricalInfo) XXX_Merge added in v0.41.4

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

func (*HistoricalInfo) XXX_Size added in v0.41.4

func (m *HistoricalInfo) XXX_Size() int

func (*HistoricalInfo) XXX_Unmarshal added in v0.41.4

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

type LastValidatorPower

type LastValidatorPower struct {
	// address is the address of the validator.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// power defines the power of the validator.
	Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"`
}

LastValidatorPower required for validator set update logic.

func (*LastValidatorPower) Descriptor added in v0.41.4

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

func (*LastValidatorPower) Marshal added in v0.41.4

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

func (*LastValidatorPower) MarshalTo added in v0.41.4

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

func (*LastValidatorPower) MarshalToSizedBuffer added in v0.41.4

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

func (*LastValidatorPower) ProtoMessage added in v0.41.4

func (*LastValidatorPower) ProtoMessage()

func (*LastValidatorPower) Reset added in v0.41.4

func (m *LastValidatorPower) Reset()

func (*LastValidatorPower) Size added in v0.41.4

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

func (*LastValidatorPower) String added in v0.41.4

func (m *LastValidatorPower) String() string

func (*LastValidatorPower) Unmarshal added in v0.41.4

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

func (*LastValidatorPower) XXX_DiscardUnknown added in v0.41.4

func (m *LastValidatorPower) XXX_DiscardUnknown()

func (*LastValidatorPower) XXX_Marshal added in v0.41.4

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

func (*LastValidatorPower) XXX_Merge added in v0.41.4

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

func (*LastValidatorPower) XXX_Size added in v0.41.4

func (m *LastValidatorPower) XXX_Size() int

func (*LastValidatorPower) XXX_Unmarshal added in v0.41.4

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

type MsgBeginRedelegate

type MsgBeginRedelegate struct {
	DelegatorAddress    string      `` /* 134-byte string literal not displayed */
	ValidatorSrcAddress string      `` /* 149-byte string literal not displayed */
	ValidatorDstAddress string      `` /* 149-byte string literal not displayed */
	Amount              types1.Coin `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount"`
}

MsgBeginRedelegate defines a SDK message for performing a redelegation of coins from a delegator and source validator to a destination validator.

func NewMsgBeginRedelegate

func NewMsgBeginRedelegate(
	delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress, amount sdk.Coin,
) *MsgBeginRedelegate

NewMsgBeginRedelegate creates a new MsgBeginRedelegate instance.

func (*MsgBeginRedelegate) Descriptor added in v0.41.4

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

func (MsgBeginRedelegate) GetSignBytes

func (msg MsgBeginRedelegate) GetSignBytes() []byte

GetSignBytes implements the sdk.Msg interface.

func (MsgBeginRedelegate) GetSigners

func (msg MsgBeginRedelegate) GetSigners() []sdk.AccAddress

GetSigners implements the sdk.Msg interface

func (*MsgBeginRedelegate) Marshal added in v0.41.4

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

func (*MsgBeginRedelegate) MarshalTo added in v0.41.4

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

func (*MsgBeginRedelegate) MarshalToSizedBuffer added in v0.41.4

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

func (*MsgBeginRedelegate) ProtoMessage added in v0.41.4

func (*MsgBeginRedelegate) ProtoMessage()

func (*MsgBeginRedelegate) Reset added in v0.41.4

func (m *MsgBeginRedelegate) Reset()

func (MsgBeginRedelegate) Route

func (msg MsgBeginRedelegate) Route() string

Route implements the sdk.Msg interface.

func (*MsgBeginRedelegate) Size added in v0.41.4

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

func (*MsgBeginRedelegate) String added in v0.41.4

func (m *MsgBeginRedelegate) String() string

func (MsgBeginRedelegate) Type

func (msg MsgBeginRedelegate) Type() string

Type implements the sdk.Msg interface

func (*MsgBeginRedelegate) Unmarshal added in v0.41.4

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

func (MsgBeginRedelegate) ValidateBasic

func (msg MsgBeginRedelegate) ValidateBasic() error

ValidateBasic implements the sdk.Msg interface.

func (*MsgBeginRedelegate) XXX_DiscardUnknown added in v0.41.4

func (m *MsgBeginRedelegate) XXX_DiscardUnknown()

func (*MsgBeginRedelegate) XXX_Marshal added in v0.41.4

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

func (*MsgBeginRedelegate) XXX_Merge added in v0.41.4

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

func (*MsgBeginRedelegate) XXX_Size added in v0.41.4

func (m *MsgBeginRedelegate) XXX_Size() int

func (*MsgBeginRedelegate) XXX_Unmarshal added in v0.41.4

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

type MsgBeginRedelegateResponse added in v0.41.4

type MsgBeginRedelegateResponse struct {
	CompletionTime time.Time `protobuf:"bytes,1,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time"`
}

MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type.

func (*MsgBeginRedelegateResponse) Descriptor added in v0.41.4

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

func (*MsgBeginRedelegateResponse) GetCompletionTime added in v0.41.4

func (m *MsgBeginRedelegateResponse) GetCompletionTime() time.Time

func (*MsgBeginRedelegateResponse) Marshal added in v0.41.4

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

func (*MsgBeginRedelegateResponse) MarshalTo added in v0.41.4

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

func (*MsgBeginRedelegateResponse) MarshalToSizedBuffer added in v0.41.4

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

func (*MsgBeginRedelegateResponse) ProtoMessage added in v0.41.4

func (*MsgBeginRedelegateResponse) ProtoMessage()

func (*MsgBeginRedelegateResponse) Reset added in v0.41.4

func (m *MsgBeginRedelegateResponse) Reset()

func (*MsgBeginRedelegateResponse) Size added in v0.41.4

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

func (*MsgBeginRedelegateResponse) String added in v0.41.4

func (m *MsgBeginRedelegateResponse) String() string

func (*MsgBeginRedelegateResponse) Unmarshal added in v0.41.4

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

func (*MsgBeginRedelegateResponse) XXX_DiscardUnknown added in v0.41.4

func (m *MsgBeginRedelegateResponse) XXX_DiscardUnknown()

func (*MsgBeginRedelegateResponse) XXX_Marshal added in v0.41.4

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

func (*MsgBeginRedelegateResponse) XXX_Merge added in v0.41.4

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

func (*MsgBeginRedelegateResponse) XXX_Size added in v0.41.4

func (m *MsgBeginRedelegateResponse) XXX_Size() int

func (*MsgBeginRedelegateResponse) XXX_Unmarshal added in v0.41.4

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

type MsgClient added in v0.41.4

type MsgClient interface {
	// CreateValidator defines a method for creating a new validator.
	CreateValidator(ctx context.Context, in *MsgCreateValidator, opts ...grpc.CallOption) (*MsgCreateValidatorResponse, error)
	// EditValidator defines a method for editing an existing validator.
	EditValidator(ctx context.Context, in *MsgEditValidator, opts ...grpc.CallOption) (*MsgEditValidatorResponse, error)
	// Delegate defines a method for performing a delegation of coins
	// from a delegator to a validator.
	Delegate(ctx context.Context, in *MsgDelegate, opts ...grpc.CallOption) (*MsgDelegateResponse, error)
	// BeginRedelegate defines a method for performing a redelegation
	// of coins from a delegator and source validator to a destination validator.
	BeginRedelegate(ctx context.Context, in *MsgBeginRedelegate, opts ...grpc.CallOption) (*MsgBeginRedelegateResponse, error)
	// Undelegate defines a method for performing an undelegation from a
	// delegate and a validator.
	Undelegate(ctx context.Context, in *MsgUndelegate, opts ...grpc.CallOption) (*MsgUndelegateResponse, 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 added in v0.41.4

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgCreateValidator

type MsgCreateValidator struct {
	Description       Description                            `protobuf:"bytes,1,opt,name=description,proto3" json:"description"`
	Commission        CommissionRates                        `protobuf:"bytes,2,opt,name=commission,proto3" json:"commission"`
	MinSelfDelegation github_com_cosmos_cosmos_sdk_types.Int `` /* 188-byte string literal not displayed */
	DelegatorAddress  string                                 `` /* 134-byte string literal not displayed */
	ValidatorAddress  string                                 `` /* 134-byte string literal not displayed */
	Pubkey            *types.Any                             `protobuf:"bytes,6,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
	Value             types1.Coin                            `protobuf:"bytes,7,opt,name=value,proto3" json:"value"`
}

MsgCreateValidator defines a SDK message for creating a new validator.

func NewMsgCreateValidator

func NewMsgCreateValidator(
	valAddr sdk.ValAddress, pubKey cryptotypes.PubKey,
	selfDelegation sdk.Coin, description Description, commission CommissionRates, minSelfDelegation sdk.Int,
) (*MsgCreateValidator, error)

NewMsgCreateValidator creates a new MsgCreateValidator instance. Delegator address and validator address are the same.

func (*MsgCreateValidator) Descriptor added in v0.41.4

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

func (MsgCreateValidator) GetSignBytes

func (msg MsgCreateValidator) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgCreateValidator) GetSigners

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

GetSigners implements the sdk.Msg interface. It returns the address(es) that must sign over msg.GetSignBytes(). If the validator address is not same as delegator's, then the validator must sign the msg as well.

func (*MsgCreateValidator) Marshal added in v0.41.4

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

func (*MsgCreateValidator) MarshalTo added in v0.41.4

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

func (*MsgCreateValidator) MarshalToSizedBuffer added in v0.41.4

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

func (*MsgCreateValidator) ProtoMessage added in v0.41.4

func (*MsgCreateValidator) ProtoMessage()

func (*MsgCreateValidator) Reset added in v0.41.4

func (m *MsgCreateValidator) Reset()

func (MsgCreateValidator) Route

func (msg MsgCreateValidator) Route() string

Route implements the sdk.Msg interface.

func (*MsgCreateValidator) Size added in v0.41.4

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

func (*MsgCreateValidator) String added in v0.41.4

func (m *MsgCreateValidator) String() string

func (MsgCreateValidator) Type

func (msg MsgCreateValidator) Type() string

Type implements the sdk.Msg interface.

func (*MsgCreateValidator) Unmarshal added in v0.41.4

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

func (MsgCreateValidator) UnpackInterfaces added in v0.41.4

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

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (MsgCreateValidator) ValidateBasic

func (msg MsgCreateValidator) ValidateBasic() error

ValidateBasic implements the sdk.Msg interface.

func (*MsgCreateValidator) XXX_DiscardUnknown added in v0.41.4

func (m *MsgCreateValidator) XXX_DiscardUnknown()

func (*MsgCreateValidator) XXX_Marshal added in v0.41.4

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

func (*MsgCreateValidator) XXX_Merge added in v0.41.4

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

func (*MsgCreateValidator) XXX_Size added in v0.41.4

func (m *MsgCreateValidator) XXX_Size() int

func (*MsgCreateValidator) XXX_Unmarshal added in v0.41.4

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

type MsgCreateValidatorResponse added in v0.41.4

type MsgCreateValidatorResponse struct {
}

MsgCreateValidatorResponse defines the Msg/CreateValidator response type.

func (*MsgCreateValidatorResponse) Descriptor added in v0.41.4

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

func (*MsgCreateValidatorResponse) Marshal added in v0.41.4

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

func (*MsgCreateValidatorResponse) MarshalTo added in v0.41.4

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

func (*MsgCreateValidatorResponse) MarshalToSizedBuffer added in v0.41.4

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

func (*MsgCreateValidatorResponse) ProtoMessage added in v0.41.4

func (*MsgCreateValidatorResponse) ProtoMessage()

func (*MsgCreateValidatorResponse) Reset added in v0.41.4

func (m *MsgCreateValidatorResponse) Reset()

func (*MsgCreateValidatorResponse) Size added in v0.41.4

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

func (*MsgCreateValidatorResponse) String added in v0.41.4

func (m *MsgCreateValidatorResponse) String() string

func (*MsgCreateValidatorResponse) Unmarshal added in v0.41.4

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

func (*MsgCreateValidatorResponse) XXX_DiscardUnknown added in v0.41.4

func (m *MsgCreateValidatorResponse) XXX_DiscardUnknown()

func (*MsgCreateValidatorResponse) XXX_Marshal added in v0.41.4

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

func (*MsgCreateValidatorResponse) XXX_Merge added in v0.41.4

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

func (*MsgCreateValidatorResponse) XXX_Size added in v0.41.4

func (m *MsgCreateValidatorResponse) XXX_Size() int

func (*MsgCreateValidatorResponse) XXX_Unmarshal added in v0.41.4

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

type MsgDelegate

type MsgDelegate struct {
	DelegatorAddress string      `` /* 134-byte string literal not displayed */
	ValidatorAddress string      `` /* 134-byte string literal not displayed */
	Amount           types1.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"`
}

MsgDelegate defines a SDK message for performing a delegation of coins from a delegator to a validator.

func NewMsgDelegate

func NewMsgDelegate(delAddr sdk.AccAddress, valAddr sdk.ValAddress, amount sdk.Coin) *MsgDelegate

NewMsgDelegate creates a new MsgDelegate instance.

func (*MsgDelegate) Descriptor added in v0.41.4

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

func (MsgDelegate) GetSignBytes

func (msg MsgDelegate) GetSignBytes() []byte

GetSignBytes implements the sdk.Msg interface.

func (MsgDelegate) GetSigners

func (msg MsgDelegate) GetSigners() []sdk.AccAddress

GetSigners implements the sdk.Msg interface.

func (*MsgDelegate) Marshal added in v0.41.4

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

func (*MsgDelegate) MarshalTo added in v0.41.4

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

func (*MsgDelegate) MarshalToSizedBuffer added in v0.41.4

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

func (*MsgDelegate) ProtoMessage added in v0.41.4

func (*MsgDelegate) ProtoMessage()

func (*MsgDelegate) Reset added in v0.41.4

func (m *MsgDelegate) Reset()

func (MsgDelegate) Route

func (msg MsgDelegate) Route() string

Route implements the sdk.Msg interface.

func (*MsgDelegate) Size added in v0.41.4

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

func (*MsgDelegate) String added in v0.41.4

func (m *MsgDelegate) String() string

func (MsgDelegate) Type

func (msg MsgDelegate) Type() string

Type implements the sdk.Msg interface.

func (*MsgDelegate) Unmarshal added in v0.41.4

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

func (MsgDelegate) ValidateBasic

func (msg MsgDelegate) ValidateBasic() error

ValidateBasic implements the sdk.Msg interface.

func (*MsgDelegate) XXX_DiscardUnknown added in v0.41.4

func (m *MsgDelegate) XXX_DiscardUnknown()

func (*MsgDelegate) XXX_Marshal added in v0.41.4

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

func (*MsgDelegate) XXX_Merge added in v0.41.4

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

func (*MsgDelegate) XXX_Size added in v0.41.4

func (m *MsgDelegate) XXX_Size() int

func (*MsgDelegate) XXX_Unmarshal added in v0.41.4

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

type MsgDelegateResponse added in v0.41.4

type MsgDelegateResponse struct {
}

MsgDelegateResponse defines the Msg/Delegate response type.

func (*MsgDelegateResponse) Descriptor added in v0.41.4

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

func (*MsgDelegateResponse) Marshal added in v0.41.4

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

func (*MsgDelegateResponse) MarshalTo added in v0.41.4

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

func (*MsgDelegateResponse) MarshalToSizedBuffer added in v0.41.4

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

func (*MsgDelegateResponse) ProtoMessage added in v0.41.4

func (*MsgDelegateResponse) ProtoMessage()

func (*MsgDelegateResponse) Reset added in v0.41.4

func (m *MsgDelegateResponse) Reset()

func (*MsgDelegateResponse) Size added in v0.41.4

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

func (*MsgDelegateResponse) String added in v0.41.4

func (m *MsgDelegateResponse) String() string

func (*MsgDelegateResponse) Unmarshal added in v0.41.4

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

func (*MsgDelegateResponse) XXX_DiscardUnknown added in v0.41.4

func (m *MsgDelegateResponse) XXX_DiscardUnknown()

func (*MsgDelegateResponse) XXX_Marshal added in v0.41.4

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

func (*MsgDelegateResponse) XXX_Merge added in v0.41.4

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

func (*MsgDelegateResponse) XXX_Size added in v0.41.4

func (m *MsgDelegateResponse) XXX_Size() int

func (*MsgDelegateResponse) XXX_Unmarshal added in v0.41.4

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

type MsgEditValidator

type MsgEditValidator struct {
	Description      Description `protobuf:"bytes,1,opt,name=description,proto3" json:"description"`
	ValidatorAddress string      `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"address"`
	// We pass a reference to the new commission rate and min self delegation as
	// it's not mandatory to update. If not updated, the deserialized rate will be
	// zero with no way to distinguish if an update was intended.
	// REF: #2373
	CommissionRate    *github_com_cosmos_cosmos_sdk_types.Dec `` /* 183-byte string literal not displayed */
	MinSelfDelegation *github_com_cosmos_cosmos_sdk_types.Int `` /* 198-byte string literal not displayed */
}

MsgEditValidator defines a SDK message for editing an existing validator.

func NewMsgEditValidator

func NewMsgEditValidator(valAddr sdk.ValAddress, description Description, newRate *sdk.Dec, newMinSelfDelegation *sdk.Int) *MsgEditValidator

NewMsgEditValidator creates a new MsgEditValidator instance

func (*MsgEditValidator) Descriptor added in v0.41.4

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

func (MsgEditValidator) GetSignBytes

func (msg MsgEditValidator) GetSignBytes() []byte

GetSignBytes implements the sdk.Msg interface.

func (MsgEditValidator) GetSigners

func (msg MsgEditValidator) GetSigners() []sdk.AccAddress

GetSigners implements the sdk.Msg interface.

func (*MsgEditValidator) Marshal added in v0.41.4

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

func (*MsgEditValidator) MarshalTo added in v0.41.4

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

func (*MsgEditValidator) MarshalToSizedBuffer added in v0.41.4

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

func (*MsgEditValidator) ProtoMessage added in v0.41.4

func (*MsgEditValidator) ProtoMessage()

func (*MsgEditValidator) Reset added in v0.41.4

func (m *MsgEditValidator) Reset()

func (MsgEditValidator) Route

func (msg MsgEditValidator) Route() string

Route implements the sdk.Msg interface.

func (*MsgEditValidator) Size added in v0.41.4

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

func (*MsgEditValidator) String added in v0.41.4

func (m *MsgEditValidator) String() string

func (MsgEditValidator) Type

func (msg MsgEditValidator) Type() string

Type implements the sdk.Msg interface.

func (*MsgEditValidator) Unmarshal added in v0.41.4

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

func (MsgEditValidator) ValidateBasic

func (msg MsgEditValidator) ValidateBasic() error

ValidateBasic implements the sdk.Msg interface.

func (*MsgEditValidator) XXX_DiscardUnknown added in v0.41.4

func (m *MsgEditValidator) XXX_DiscardUnknown()

func (*MsgEditValidator) XXX_Marshal added in v0.41.4

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

func (*MsgEditValidator) XXX_Merge added in v0.41.4

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

func (*MsgEditValidator) XXX_Size added in v0.41.4

func (m *MsgEditValidator) XXX_Size() int

func (*MsgEditValidator) XXX_Unmarshal added in v0.41.4

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

type MsgEditValidatorResponse added in v0.41.4

type MsgEditValidatorResponse struct {
}

MsgEditValidatorResponse defines the Msg/EditValidator response type.

func (*MsgEditValidatorResponse) Descriptor added in v0.41.4

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

func (*MsgEditValidatorResponse) Marshal added in v0.41.4

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

func (*MsgEditValidatorResponse) MarshalTo added in v0.41.4

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

func (*MsgEditValidatorResponse) MarshalToSizedBuffer added in v0.41.4

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

func (*MsgEditValidatorResponse) ProtoMessage added in v0.41.4

func (*MsgEditValidatorResponse) ProtoMessage()

func (*MsgEditValidatorResponse) Reset added in v0.41.4

func (m *MsgEditValidatorResponse) Reset()

func (*MsgEditValidatorResponse) Size added in v0.41.4

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

func (*MsgEditValidatorResponse) String added in v0.41.4

func (m *MsgEditValidatorResponse) String() string

func (*MsgEditValidatorResponse) Unmarshal