Versions in this module Expand all Collapse all v0 v0.34.7 Oct 3, 2019 Changes in this version + const DefaultMaxEntries + const DefaultMaxValidators + const DefaultUnbondingTime + const DoNotModifyDesc + const MaxDetailsLength + const MaxIdentityLength + const MaxMonikerLength + const MaxWebsiteLength + const ModuleName + const QuerierRoute + const RouterKey + const StoreKey + const TStoreKey + var KeyBondDenom = []byte("BondDenom") + var KeyMaxEntries = []byte("KeyMaxEntries") + var KeyMaxValidators = []byte("MaxValidators") + var KeyUnbondingTime = []byte("UnbondingTime") + var MsgCdc *codec.Codec + func ErrBadDelegationAddr(codespace sdk.CodespaceType) sdk.Error + func ErrBadDelegationAmount(codespace sdk.CodespaceType) sdk.Error + func ErrBadDelegatorAddr(codespace sdk.CodespaceType) sdk.Error + func ErrBadDenom(codespace sdk.CodespaceType) sdk.Error + func ErrBadRedelegationAddr(codespace sdk.CodespaceType) sdk.Error + func ErrBadRedelegationDst(codespace sdk.CodespaceType) sdk.Error + func ErrBadRemoveValidator(codespace sdk.CodespaceType) sdk.Error + func ErrBadSharesAmount(codespace sdk.CodespaceType) sdk.Error + func ErrBadSharesPercent(codespace sdk.CodespaceType) sdk.Error + func ErrBadValidatorAddr(codespace sdk.CodespaceType) sdk.Error + func ErrBothShareMsgsGiven(codespace sdk.CodespaceType) sdk.Error + func ErrCommissionChangeRateGTMaxRate(codespace sdk.CodespaceType) sdk.Error + func ErrCommissionChangeRateNegative(codespace sdk.CodespaceType) sdk.Error + func ErrCommissionGTMaxChangeRate(codespace sdk.CodespaceType) sdk.Error + func ErrCommissionGTMaxRate(codespace sdk.CodespaceType) sdk.Error + func ErrCommissionHuge(codespace sdk.CodespaceType) sdk.Error + func ErrCommissionNegative(codespace sdk.CodespaceType) sdk.Error + func ErrCommissionUpdateTime(codespace sdk.CodespaceType) sdk.Error + func ErrDelegationValidatorEmpty(codespace sdk.CodespaceType) sdk.Error + func ErrDelegatorShareExRateInvalid(codespace sdk.CodespaceType) sdk.Error + func ErrDescriptionLength(codespace sdk.CodespaceType, descriptor string, got, max int) sdk.Error + func ErrInsufficientShares(codespace sdk.CodespaceType) sdk.Error + func ErrMaxRedelegationEntries(codespace sdk.CodespaceType) sdk.Error + func ErrMaxUnbondingDelegationEntries(codespace sdk.CodespaceType) sdk.Error + func ErrMinSelfDelegationDecreased(codespace sdk.CodespaceType) sdk.Error + func ErrMinSelfDelegationInvalid(codespace sdk.CodespaceType) sdk.Error + func ErrMissingSignature(codespace sdk.CodespaceType) sdk.Error + func ErrNeitherShareMsgsGiven(codespace sdk.CodespaceType) sdk.Error + func ErrNilDelegatorAddr(codespace sdk.CodespaceType) sdk.Error + func ErrNilValidatorAddr(codespace sdk.CodespaceType) sdk.Error + func ErrNoDelegation(codespace sdk.CodespaceType) sdk.Error + func ErrNoDelegatorForAddress(codespace sdk.CodespaceType) sdk.Error + func ErrNoRedelegation(codespace sdk.CodespaceType) sdk.Error + func ErrNoUnbondingDelegation(codespace sdk.CodespaceType) sdk.Error + func ErrNoValidatorFound(codespace sdk.CodespaceType) sdk.Error + func ErrNotEnoughDelegationShares(codespace sdk.CodespaceType, shares string) sdk.Error + func ErrNotMature(codespace sdk.CodespaceType, operation, descriptor string, got, min time.Time) sdk.Error + func ErrSelfDelegationBelowMinimum(codespace sdk.CodespaceType) sdk.Error + func ErrSelfRedelegation(codespace sdk.CodespaceType) sdk.Error + func ErrTransitiveRedelegation(codespace sdk.CodespaceType) sdk.Error + func ErrValidatorJailed(codespace sdk.CodespaceType) sdk.Error + func ErrValidatorOwnerExists(codespace sdk.CodespaceType) sdk.Error + func ErrValidatorPubKeyExists(codespace sdk.CodespaceType) sdk.Error + func ErrValidatorPubKeyTypeNotSupported(codespace sdk.CodespaceType, keyType string, supportedTypes []string) sdk.Error + func ErrVerySmallRedelegation(codespace sdk.CodespaceType) sdk.Error + func MustMarshalDelegation(cdc *codec.Codec, delegation Delegation) []byte + func MustMarshalRED(cdc *codec.Codec, red Redelegation) []byte + func MustMarshalUBD(cdc *codec.Codec, ubd UnbondingDelegation) []byte + func MustMarshalValidator(cdc *codec.Codec, validator Validator) []byte + func RegisterCodec(cdc *codec.Codec) + type BankKeeper interface + DelegateCoins func(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Tags, sdk.Error) + UndelegateCoins func(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Tags, sdk.Error) + type CodeType = sdk.CodeType + const CodeInternal + const CodeInvalidAddress + const CodeInvalidDelegation + const CodeInvalidInput + const CodeInvalidValidator + const CodeUnauthorized + const CodeUnknownRequest + const CodeValidatorJailed + const DefaultCodespace + type Commission struct + MaxChangeRate sdk.Dec + MaxRate sdk.Dec + Rate sdk.Dec + UpdateTime time.Time + func NewCommission(rate, maxRate, maxChangeRate sdk.Dec) Commission + func NewCommissionWithTime(rate, maxRate, maxChangeRate sdk.Dec, updatedAt time.Time) Commission + func (c Commission) Equal(c2 Commission) bool + func (c Commission) String() string + func (c Commission) Validate() sdk.Error + func (c Commission) ValidateNewRate(newRate sdk.Dec, blockTime time.Time) sdk.Error + type CommissionMsg struct + MaxChangeRate sdk.Dec + MaxRate sdk.Dec + Rate sdk.Dec + func NewCommissionMsg(rate, maxRate, maxChangeRate sdk.Dec) CommissionMsg + type CrisisKeeper interface + RegisterRoute func(moduleName, route string, invar sdk.Invariant) + type DVPair struct + DelegatorAddress sdk.AccAddress + ValidatorAddress sdk.ValAddress + type DVVTriplet struct + DelegatorAddress sdk.AccAddress + ValidatorDstAddress sdk.ValAddress + ValidatorSrcAddress sdk.ValAddress + type Delegation struct + DelegatorAddress sdk.AccAddress + Shares sdk.Dec + ValidatorAddress sdk.ValAddress + func MustUnmarshalDelegation(cdc *codec.Codec, value []byte) Delegation + func NewDelegation(delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, shares sdk.Dec) Delegation + func UnmarshalDelegation(cdc *codec.Codec, value []byte) (delegation Delegation, err error) + func (d Delegation) Equal(d2 Delegation) bool + func (d Delegation) GetDelegatorAddr() sdk.AccAddress + func (d Delegation) GetShares() sdk.Dec + func (d Delegation) GetValidatorAddr() sdk.ValAddress + func (d Delegation) String() string + type Delegations []Delegation + func (d Delegations) String() (out string) + type Description struct + Details string + Identity string + Moniker string + Website string + func NewDescription(moniker, identity, website, details string) Description + func (d Description) EnsureLength() (Description, sdk.Error) + func (d Description) UpdateDescription(d2 Description) (Description, sdk.Error) + type DistributionKeeper interface + GetFeePoolCommunityCoins func(ctx sdk.Context) sdk.DecCoins + GetValidatorOutstandingRewardsCoins func(ctx sdk.Context, val sdk.ValAddress) sdk.DecCoins + type FeeCollectionKeeper interface + GetCollectedFees func(ctx sdk.Context) sdk.Coins + type GenesisState struct + Delegations Delegations + Exported bool + LastTotalPower sdk.Int + LastValidatorPowers []LastValidatorPower + Params Params + Pool Pool + Redelegations []Redelegation + UnbondingDelegations []UnbondingDelegation + Validators Validators + func DefaultGenesisState() GenesisState + func NewGenesisState(pool Pool, params Params, validators []Validator, delegations []Delegation) GenesisState + type LastValidatorPower struct + Address sdk.ValAddress + Power int64 + type MsgBeginRedelegate struct + Amount sdk.Coin + DelegatorAddress sdk.AccAddress + ValidatorDstAddress sdk.ValAddress + ValidatorSrcAddress sdk.ValAddress + func NewMsgBeginRedelegate(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress, amount sdk.Coin) MsgBeginRedelegate + func (msg MsgBeginRedelegate) GetSignBytes() []byte + func (msg MsgBeginRedelegate) GetSigners() []sdk.AccAddress + func (msg MsgBeginRedelegate) Route() string + func (msg MsgBeginRedelegate) Type() string + func (msg MsgBeginRedelegate) ValidateBasic() sdk.Error + type MsgCreateValidator struct + Commission CommissionMsg + DelegatorAddress sdk.AccAddress + Description Description + MinSelfDelegation sdk.Int + PubKey crypto.PubKey + ValidatorAddress sdk.ValAddress + Value sdk.Coin + func NewMsgCreateValidator(valAddr sdk.ValAddress, pubKey crypto.PubKey, selfDelegation sdk.Coin, ...) MsgCreateValidator + func (msg *MsgCreateValidator) UnmarshalJSON(bz []byte) error + func (msg MsgCreateValidator) GetSignBytes() []byte + func (msg MsgCreateValidator) GetSigners() []sdk.AccAddress + func (msg MsgCreateValidator) MarshalJSON() ([]byte, error) + func (msg MsgCreateValidator) Route() string + func (msg MsgCreateValidator) Type() string + func (msg MsgCreateValidator) ValidateBasic() sdk.Error + type MsgDelegate struct + Amount sdk.Coin + DelegatorAddress sdk.AccAddress + ValidatorAddress sdk.ValAddress + func NewMsgDelegate(delAddr sdk.AccAddress, valAddr sdk.ValAddress, amount sdk.Coin) MsgDelegate + func (msg MsgDelegate) GetSignBytes() []byte + func (msg MsgDelegate) GetSigners() []sdk.AccAddress + func (msg MsgDelegate) Route() string + func (msg MsgDelegate) Type() string + func (msg MsgDelegate) ValidateBasic() sdk.Error + type MsgEditValidator struct + CommissionRate *sdk.Dec + MinSelfDelegation *sdk.Int + ValidatorAddress sdk.ValAddress + func NewMsgEditValidator(valAddr sdk.ValAddress, description Description, newRate *sdk.Dec, ...) MsgEditValidator + func (msg MsgEditValidator) GetSignBytes() []byte + func (msg MsgEditValidator) GetSigners() []sdk.AccAddress + func (msg MsgEditValidator) Route() string + func (msg MsgEditValidator) Type() string + func (msg MsgEditValidator) ValidateBasic() sdk.Error + type MsgUndelegate struct + Amount sdk.Coin + DelegatorAddress sdk.AccAddress + ValidatorAddress sdk.ValAddress + func NewMsgUndelegate(delAddr sdk.AccAddress, valAddr sdk.ValAddress, amount sdk.Coin) MsgUndelegate + func (msg MsgUndelegate) GetSignBytes() []byte + func (msg MsgUndelegate) GetSigners() []sdk.AccAddress + func (msg MsgUndelegate) Route() string + func (msg MsgUndelegate) Type() string + func (msg MsgUndelegate) ValidateBasic() sdk.Error + type Params struct + BondDenom string + MaxEntries uint16 + MaxValidators uint16 + UnbondingTime time.Duration + func DefaultParams() Params + func MustUnmarshalParams(cdc *codec.Codec, value []byte) Params + func NewParams(unbondingTime time.Duration, maxValidators, maxEntries uint16, ...) Params + func UnmarshalParams(cdc *codec.Codec, value []byte) (params Params, err error) + func (p *Params) ParamSetPairs() params.ParamSetPairs + func (p Params) Equal(p2 Params) bool + func (p Params) String() string + func (p Params) Validate() error + type Pool struct + BondedTokens sdk.Int + NotBondedTokens sdk.Int + func InitialPool() Pool + func MustUnmarshalPool(cdc *codec.Codec, value []byte) Pool + func UnmarshalPool(cdc *codec.Codec, value []byte) (pool Pool, err error) + func (p Pool) BondedRatio() sdk.Dec + func (p Pool) Equal(p2 Pool) bool + func (p Pool) String() string + func (p Pool) TokenSupply() sdk.Int + type Redelegation struct + DelegatorAddress sdk.AccAddress + Entries []RedelegationEntry + ValidatorDstAddress sdk.ValAddress + ValidatorSrcAddress sdk.ValAddress + func MustUnmarshalRED(cdc *codec.Codec, value []byte) Redelegation + func NewRedelegation(delegatorAddr sdk.AccAddress, ...) Redelegation + func UnmarshalRED(cdc *codec.Codec, value []byte) (red Redelegation, err error) + func (d *Redelegation) AddEntry(creationHeight int64, minTime time.Time, balance sdk.Int, sharesDst sdk.Dec) + func (d *Redelegation) RemoveEntry(i int64) + func (d Redelegation) Equal(d2 Redelegation) bool + func (d Redelegation) String() string + type RedelegationEntry struct + CompletionTime time.Time + CreationHeight int64 + InitialBalance sdk.Int + SharesDst sdk.Dec + func NewRedelegationEntry(creationHeight int64, completionTime time.Time, balance sdk.Int, ...) RedelegationEntry + func (e RedelegationEntry) IsMature(currentTime time.Time) bool + type Redelegations []Redelegation + func (d Redelegations) String() (out string) + type UnbondingDelegation struct + DelegatorAddress sdk.AccAddress + Entries []UnbondingDelegationEntry + ValidatorAddress sdk.ValAddress + func MustUnmarshalUBD(cdc *codec.Codec, value []byte) UnbondingDelegation + func NewUnbondingDelegation(delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, ...) UnbondingDelegation + func UnmarshalUBD(cdc *codec.Codec, value []byte) (ubd UnbondingDelegation, err error) + func (d *UnbondingDelegation) AddEntry(creationHeight int64, minTime time.Time, balance sdk.Int) + func (d *UnbondingDelegation) RemoveEntry(i int64) + func (d UnbondingDelegation) Equal(d2 UnbondingDelegation) bool + func (d UnbondingDelegation) String() string + type UnbondingDelegationEntry struct + Balance sdk.Int + CompletionTime time.Time + CreationHeight int64 + InitialBalance sdk.Int + func NewUnbondingDelegationEntry(creationHeight int64, completionTime time.Time, balance sdk.Int) UnbondingDelegationEntry + func (e UnbondingDelegationEntry) IsMature(currentTime time.Time) bool + type UnbondingDelegations []UnbondingDelegation + func (ubds UnbondingDelegations) String() (out string) + type Validator struct + Commission Commission + ConsPubKey crypto.PubKey + DelegatorShares sdk.Dec + Description Description + Jailed bool + MinSelfDelegation sdk.Int + OperatorAddress sdk.ValAddress + Status sdk.BondStatus + Tokens sdk.Int + UnbondingCompletionTime time.Time + UnbondingHeight int64 + func MustUnmarshalValidator(cdc *codec.Codec, value []byte) Validator + func NewValidator(operator sdk.ValAddress, pubKey crypto.PubKey, description Description) Validator + func UnmarshalValidator(cdc *codec.Codec, value []byte) (validator Validator, err error) + func (v *Validator) UnmarshalJSON(data []byte) error + func (v Validator) ABCIValidatorUpdate() abci.ValidatorUpdate + func (v Validator) ABCIValidatorUpdateZero() abci.ValidatorUpdate + func (v Validator) AddTokensFromDel(pool Pool, amount sdk.Int) (Validator, Pool, sdk.Dec) + func (v Validator) BondedTokens() sdk.Int + func (v Validator) ConsAddress() sdk.ConsAddress + func (v Validator) GetBondedTokens() sdk.Int + func (v Validator) GetCommission() sdk.Dec + func (v Validator) GetConsAddr() sdk.ConsAddress + func (v Validator) GetConsPubKey() crypto.PubKey + func (v Validator) GetDelegatorShares() sdk.Dec + func (v Validator) GetMinSelfDelegation() sdk.Int + func (v Validator) GetMoniker() string + func (v Validator) GetOperator() sdk.ValAddress + func (v Validator) GetStatus() sdk.BondStatus + func (v Validator) GetTendermintPower() int64 + func (v Validator) GetTokens() sdk.Int + func (v Validator) InvalidExRate() bool + func (v Validator) IsJailed() bool + func (v Validator) MarshalJSON() ([]byte, error) + func (v Validator) PotentialTendermintPower() int64 + func (v Validator) RemoveDelShares(pool Pool, delShares sdk.Dec) (Validator, Pool, sdk.Int) + func (v Validator) RemoveTokens(pool Pool, tokens sdk.Int) (Validator, Pool) + func (v Validator) SetInitialCommission(commission Commission) (Validator, sdk.Error) + func (v Validator) SharesFromTokens(amt sdk.Int) (sdk.Dec, sdk.Error) + func (v Validator) SharesFromTokensTruncated(amt sdk.Int) (sdk.Dec, sdk.Error) + func (v Validator) String() string + func (v Validator) TendermintPower() int64 + func (v Validator) TestEquivalent(v2 Validator) bool + func (v Validator) TokensFromShares(shares sdk.Dec) sdk.Dec + func (v Validator) TokensFromSharesRoundUp(shares sdk.Dec) sdk.Dec + func (v Validator) TokensFromSharesTruncated(shares sdk.Dec) sdk.Dec + func (v Validator) UpdateStatus(pool Pool, NewStatus sdk.BondStatus) (Validator, Pool) + type Validators []Validator + func (v Validators) String() (out string) + func (v Validators) ToSDKValidators() (validators []sdk.Validator)