Versions in this module Expand all Collapse all v1 v1.0.3 Apr 12, 2024 v1.0.2 Apr 3, 2024 v1.0.1 Apr 2, 2024 v1.0.0 Mar 15, 2024 Changes in this version + const AttributeKeyCommissionRate + const AttributeKeyCompletionTime + const AttributeKeyCreationHeight + const AttributeKeyDelegator + const AttributeKeyDstValidator + const AttributeKeyMinSelfDelegation + const AttributeKeyNewShares + const AttributeKeySrcValidator + const AttributeKeyValidator + const BondedPoolName + const DefaultHistoricalEntries + const DefaultMaxEntries + const DefaultMaxValidators + const DefaultMaximumMonthlyPoints + const DefaultRedelegationTime + const DefaultUnbondingTime + const DoNotModifyDesc + const EventTypeCancelUnbondingDelegation + const EventTypeCompleteRedelegation + const EventTypeCompleteUnbonding + const EventTypeCreateValidator + const EventTypeDelegate + const EventTypeEditValidator + const EventTypeRedelegate + const EventTypeUnbond + const MaxDetailsLength + const MaxIdentityLength + const MaxMonikerLength + const MaxSecurityContactLength + const MaxWebsiteLength + const ModuleName + const NotBondedPoolName + const QueryDelegation + const QueryDelegatorDelegations + const QueryDelegatorUnbondingDelegations + const QueryDelegatorValidator + const QueryDelegatorValidators + const QueryHistoricalInfo + const QueryParameters + const QueryPool + const QueryRedelegations + const QueryUnbondingDelegation + const QueryValidator + const QueryValidatorDelegations + const QueryValidatorRedelegations + const QueryValidatorUnbondingDelegations + const QueryValidators + const RouterKey + const StoreKey + var BondStatusBonded = BondStatus_name[int32(Bonded)] + var BondStatusUnbonded = BondStatus_name[int32(Unbonded)] + var BondStatusUnbonding = BondStatus_name[int32(Unbonding)] + var BondStatusUnspecified = BondStatus_name[int32(Unspecified)] + var DefaultEmissionRange = EmissionRange + var DefaultMinSelfDelegation = math.NewInt(20000000000) + var DefaultValidatorEmissionRate = math.LegacyNewDecWithPrec(3, 3) + var DelegationByValIndexKey = []byte + var DelegationKey = []byte + var ErrBadDelegatorAddr = types.ErrBadDelegatorAddr + var ErrBadRedelegationDst = types.ErrBadRedelegationDst + var ErrBadRedelegationSrc = types.ErrBadRedelegationSrc + var ErrBadRemoveValidator = types.ErrBadRemoveValidator + var ErrBothShareMsgsGiven = types.ErrBothShareMsgsGiven + var ErrCommissionChangeRateGTMaxRate = types.ErrCommissionChangeRateGTMaxRate + var ErrCommissionChangeRateNegative = types.ErrCommissionChangeRateNegative + var ErrCommissionGTMaxChangeRate = types.ErrCommissionGTMaxChangeRate + var ErrCommissionGTMaxRate = types.ErrCommissionGTMaxRate + var ErrCommissionHuge = types.ErrCommissionHuge + var ErrCommissionLTMinRate = types.ErrCommissionLTMinRate + var ErrCommissionNegative = types.ErrCommissionNegative + var ErrCommissionUpdateTime = types.ErrCommissionUpdateTime + var ErrDelegationValidatorEmpty = types.ErrDelegationValidatorEmpty + var ErrDelegatorShareExRateInvalid = types.ErrDelegatorShareExRateInvalid + var ErrEmptyDelegatorAddr = types.ErrEmptyDelegatorAddr + var ErrEmptyValidatorAddr = types.ErrEmptyValidatorAddr + var ErrEmptyValidatorPubKey = types.ErrEmptyValidatorPubKey + var ErrInsufficientShares = types.ErrInsufficientShares + var ErrInvalidHistoricalInfo = types.ErrInvalidHistoricalInfo + var ErrInvalidSigner = types.ErrInvalidSigner + var ErrMaxRedelegationEntries = types.ErrMaxRedelegationEntries + var ErrMaxUnbondingDelegationEntries = types.ErrMaxUnbondingDelegationEntries + var ErrMinSelfDelegationDecreased = types.ErrMinSelfDelegationDecreased + var ErrNeitherShareMsgsGiven = types.ErrNeitherShareMsgsGiven + var ErrNoDelegation = types.ErrNoDelegation + var ErrNoDelegatorForAddress = types.ErrNoDelegatorForAddress + var ErrNoHistoricalInfo = types.ErrNoHistoricalInfo + var ErrNoRedelegation = types.ErrNoRedelegation + var ErrNoUnbondingDelegation = types.ErrNoUnbondingDelegation + var ErrNoUnbondingType = types.ErrNoUnbondingType + var ErrNoValidatorFound = types.ErrNoValidatorFound + var ErrNotEnoughDelegationShares = types.ErrNotEnoughDelegationShares + var ErrNotMature = types.ErrNotMature + var ErrSelfDelegationBelowMinimum = types.ErrSelfDelegationBelowMinimum + var ErrSelfRedelegation = types.ErrSelfRedelegation + var ErrTinyRedelegationAmount = types.ErrTinyRedelegationAmount + var ErrTransitiveRedelegation = types.ErrTransitiveRedelegation + var ErrUnbondingNotFound = types.ErrUnbondingNotFound + var ErrUnbondingOnHoldRefCountNegative = types.ErrUnbondingOnHoldRefCountNegative + var ErrValidatorJailed = types.ErrValidatorJailed + var ErrValidatorOwnerExists = types.ErrValidatorOwnerExists + var ErrValidatorPubKeyExists = types.ErrValidatorPubKeyExists + var ErrValidatorPubKeyTypeNotSupported = types.ErrValidatorPubKeyTypeNotSupported + var HistoricalInfoKey = []byte + var KeyBondDenom = []byte("BondDenom") + var KeyHistoricalEntries = []byte("HistoricalEntries") + var KeyMaxEntries = []byte("MaxEntries") + var KeyMaxValidators = []byte("MaxValidators") + var KeyMinCommissionRate = []byte("MinCommissionRate") + var KeyUnbondingTime = []byte("UnbondingTime") + var LastTotalPowerKey = []byte + var LastValidatorPowerKey = []byte + var ParamsKey = []byte + var RedelegationByValDstIndexKey = []byte + var RedelegationByValSrcIndexKey = []byte + var RedelegationKey = []byte + var RedelegationQueueKey = []byte + var UnbondingDelegationByValIndexKey = []byte + var UnbondingDelegationKey = []byte + var UnbondingIDKey = []byte + var UnbondingIndexKey = []byte + var UnbondingQueueKey = []byte + var UnbondingTypeKey = []byte + var ValidatorQueueKey = []byte + var ValidatorUpdatesKey = []byte + var ValidatorsByConsAddrKey = []byte + var ValidatorsByPowerIndexKey = []byte + var ValidatorsKey = []byte + func AddressFromLastValidatorPowerKey(key []byte) []byte + func AddressFromValidatorsKey(key []byte) []byte + func GetDelegationKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte + func GetDelegationsByValKey(valAddr sdk.ValAddress, delAddr sdk.AccAddress) []byte + func GetDelegationsByValPrefixKey(valAddr sdk.ValAddress) []byte + func GetDelegationsKey(delAddr sdk.AccAddress) []byte + func GetHistoricalInfoKey(height int64) []byte + func GetLastValidatorPowerKey(operator sdk.ValAddress) []byte + func GetREDByValDstIndexKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte + func GetREDByValSrcIndexKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte + func GetREDKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte + func GetREDKeyFromValDstIndexKey(indexKey []byte) []byte + func GetREDKeyFromValSrcIndexKey(indexKey []byte) []byte + func GetREDsByDelToValDstIndexKey(delAddr sdk.AccAddress, valDstAddr sdk.ValAddress) []byte + func GetREDsFromValSrcIndexKey(valSrcAddr sdk.ValAddress) []byte + func GetREDsKey(delAddr sdk.AccAddress) []byte + func GetREDsToValDstIndexKey(valDstAddr sdk.ValAddress) []byte + func GetRedelegationTimeKey(timestamp time.Time) []byte + func GetUBDByValIndexKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte + func GetUBDKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte + func GetUBDKeyFromValIndexKey(indexKey []byte) []byte + func GetUBDsByValIndexKey(valAddr sdk.ValAddress) []byte + func GetUBDsKey(delAddr sdk.AccAddress) []byte + func GetUnbondingDelegationTimeKey(timestamp time.Time) []byte + func GetUnbondingIndexKey(id uint64) []byte + func GetUnbondingTypeKey(id uint64) []byte + func GetValidatorByConsAddrKey(addr sdk.ConsAddress) []byte + func GetValidatorKey(operatorAddr sdk.ValAddress) []byte + func GetValidatorQueueKey(timestamp time.Time, height int64) []byte + func GetValidatorsByPowerIndexKey(validator Validator, powerReduction math.Int, valAc addresscodec.Codec) []byte + func MustMarshalDelegation(cdc codec.BinaryCodec, delegation Delegation) []byte + func MustMarshalRED(cdc codec.BinaryCodec, red Redelegation) []byte + func MustMarshalUBD(cdc codec.BinaryCodec, ubd UnbondingDelegation) []byte + func MustMarshalUBDE(cdc codec.BinaryCodec, ubd UnbondingDelegationEntry) []byte + func MustMarshalValidator(cdc codec.BinaryCodec, validator *Validator) []byte + func ParamKeyTable() paramtypes.KeyTable + func ParseDelegationsByValKey(bz []byte) (sdk.ValAddress, sdk.AccAddress, error) + func ParseValidatorPowerRankKey(key []byte) (operAddr []byte) + func ParseValidatorQueueKey(bz []byte) (time.Time, int64, error) + func RegisterInterfaces(registry types.InterfaceRegistry) + func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) + func ValidateBasic(hi HistoricalInfo, valAc address.Codec) error + func ValidatePowerReduction(i interface{}) error + type AccountKeeper interface + AddressCodec func() address.Codec + GetAccount func(ctx context.Context, addr sdk.AccAddress) sdk.AccountI + GetModuleAccount func(ctx context.Context, moduleName string) sdk.ModuleAccountI + GetModuleAddress func(name string) sdk.AccAddress + IterateAccounts func(ctx context.Context, process func(sdk.AccountI) (stop bool)) + SetModuleAccount func(context.Context, sdk.ModuleAccountI) + type BankKeeper interface + BurnCoins func(ctx context.Context, name string, amt sdk.Coins) error + DelegateCoinsFromAccountToModule func(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, ...) error + GetAllBalances func(ctx context.Context, addr sdk.AccAddress) sdk.Coins + GetBalance func(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin + GetSupply func(ctx context.Context, denom string) sdk.Coin + LockedCoins func(ctx context.Context, addr sdk.AccAddress) sdk.Coins + SendCoinsFromModuleToModule func(ctx context.Context, senderPool, recipientPool string, amt sdk.Coins) error + SpendableCoins func(ctx context.Context, addr sdk.AccAddress) sdk.Coins + UndelegateCoinsFromModuleToAccount func(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, ...) error + type DelegationI interface + GetDelegatorAddr func() string + GetPoints func() uint64 + GetShares func() math.LegacyDec + GetValidatorAddr func() string + type DelegationResponses []DelegationResponse + func (d DelegationResponses) String() (out string) + type DelegationSet interface + GetValidatorSet func() ValidatorSet + IterateDelegations func(ctx context.Context, delegator sdk.AccAddress, ...) error + type Delegations []Delegation + func (d Delegations) String() (out string) + type MultiRefStakingHooks []RefStakingHooks + func NewMultiRefStakingHooks(hooks ...RefStakingHooks) MultiRefStakingHooks + func (h MultiRefStakingHooks) CheckDelegationAvailable(ctx context.Context, delAddr, valAddr string) error + func (h MultiRefStakingHooks) DelegationCoinsModified(ctx context.Context, delAddr, valAddr string, oldCoins, newCoins math.Int) error + func (h MultiRefStakingHooks) SpendCoinsForRef(ctx context.Context, addr string, totalAmount math.Int) (math.Int, error) + type MultiStakingHooks []StakingHooks + func NewMultiStakingHooks(hooks ...StakingHooks) MultiStakingHooks + func (h MultiStakingHooks) AfterDelegationModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error + func (h MultiStakingHooks) AfterUnbondingInitiated(ctx context.Context, id uint64) error + func (h MultiStakingHooks) AfterValidatorBeginUnbonding(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error + func (h MultiStakingHooks) AfterValidatorBonded(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error + func (h MultiStakingHooks) AfterValidatorCreated(ctx context.Context, valAddr sdk.ValAddress) error + func (h MultiStakingHooks) AfterValidatorRemoved(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error + func (h MultiStakingHooks) BeforeDelegationCreated(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error + func (h MultiStakingHooks) BeforeDelegationRemoved(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error + func (h MultiStakingHooks) BeforeDelegationSharesModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error + func (h MultiStakingHooks) BeforeValidatorModified(ctx context.Context, valAddr sdk.ValAddress) error + func (h MultiStakingHooks) BeforeValidatorSlashed(ctx context.Context, valAddr sdk.ValAddress, fraction sdkmath.LegacyDec) error + type QueryDelegatorParams struct + DelegatorAddr sdk.AccAddress + func NewQueryDelegatorParams(delegatorAddr sdk.AccAddress) QueryDelegatorParams + type QueryRedelegationParams struct + DelegatorAddr sdk.AccAddress + DstValidatorAddr sdk.ValAddress + SrcValidatorAddr sdk.ValAddress + func NewQueryRedelegationParams(delegatorAddr sdk.AccAddress, ...) QueryRedelegationParams + type QueryValidatorParams struct + Limit int + Page int + ValidatorAddr sdk.ValAddress + func NewQueryValidatorParams(validatorAddr sdk.ValAddress, page, limit int) QueryValidatorParams + type QueryValidatorsParams struct + Limit int + Page int + Status string + func NewQueryValidatorsParams(page, limit int, status string) QueryValidatorsParams + type RedelegationResponses []RedelegationResponse + func (r RedelegationResponses) String() (out string) + type Redelegations []Redelegation + func (d Redelegations) String() (out string) + type RefStakingHooks interface + CheckDelegationAvailable func(ctx context.Context, delAddr, valAddr string) error + DelegationCoinsModified func(ctx context.Context, delAddr, valAddr string, oldCoins, newCoins math.Int) error + SpendCoinsForRef func(ctx context.Context, addr string, totalAmount math.Int) (math.Int, error) + type RefStakingHooksWrapper struct + func (RefStakingHooksWrapper) IsOnePerModuleType() + type StakingHooks interface + AfterDelegationModified func(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error + AfterUnbondingInitiated func(ctx context.Context, id uint64) error + AfterValidatorBeginUnbonding func(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error + AfterValidatorBonded func(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error + AfterValidatorCreated func(ctx context.Context, valAddr sdk.ValAddress) error + AfterValidatorRemoved func(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error + BeforeDelegationCreated func(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error + BeforeDelegationRemoved func(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error + BeforeDelegationSharesModified func(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error + BeforeValidatorModified func(ctx context.Context, valAddr sdk.ValAddress) error + BeforeValidatorSlashed func(ctx context.Context, valAddr sdk.ValAddress, fraction math.LegacyDec) error + type StakingHooksWrapper struct + func (StakingHooksWrapper) IsOnePerModuleType() + type UnbondingDelegations []UnbondingDelegation + func (ubds UnbondingDelegations) String() (out string) + type UnbondingType int + const UnbondingType_Redelegation + const UnbondingType_UnbondingDelegation + const UnbondingType_Undefined + const UnbondingType_ValidatorUnbonding + type ValidatorI interface + ConsPubKey func() (cryptotypes.PubKey, error) + GetBondedTokens func() math.Int + GetConsAddr func() ([]byte, error) + GetConsensusPower func(math.Int) int64 + GetDelegatorShares func() math.LegacyDec + GetEmission func() math.LegacyDec + GetMinSelfDelegation func() math.Int + GetMoniker func() string + GetOperator func() string + GetPoints func() uint64 + GetStatus func() BondStatus + GetTokens func() math.Int + IsBonded func() bool + IsJailed func() bool + IsUnbonded func() bool + IsUnbonding func() bool + SharesFromTokens func(amt math.Int) (math.LegacyDec, error) + SharesFromTokensTruncated func(amt math.Int) (math.LegacyDec, error) + TmConsPublicKey func() (cmtprotocrypto.PublicKey, error) + TokensFromShares func(math.LegacyDec) math.LegacyDec + TokensFromSharesRoundUp func(math.LegacyDec) math.LegacyDec + TokensFromSharesTruncated func(math.LegacyDec) math.LegacyDec + type ValidatorSet interface + Delegation func(context.Context, sdk.AccAddress, sdk.ValAddress) (DelegationI, error) + GetPubKeyByConsAddr func(context.Context, sdk.ConsAddress) (cmtprotocrypto.PublicKey, error) + IterateBondedValidatorsByPower func(context.Context, func(index int64, validator ValidatorI) (stop bool)) error + IterateLastValidators func(context.Context, func(index int64, validator ValidatorI) (stop bool)) error + IterateValidators func(context.Context, func(index int64, validator ValidatorI) (stop bool)) error + Jail func(context.Context, sdk.ConsAddress) error + MaxValidators func(context.Context) (uint32, error) + Slash func(context.Context, sdk.ConsAddress, int64, int64, math.LegacyDec) (math.Int, error) + SlashWithInfractionReason func(context.Context, sdk.ConsAddress, int64, int64, math.LegacyDec, Infraction) (math.Int, error) + StakingTokenSupply func(context.Context) (math.Int, error) + TotalBondedTokens func(context.Context) (math.Int, error) + Unjail func(context.Context, sdk.ConsAddress) error + Validator func(context.Context, sdk.ValAddress) (ValidatorI, error) + ValidatorByConsAddr func(context.Context, sdk.ConsAddress) (ValidatorI, error) + type Validators struct + ValidatorCodec address.Codec + Validators []Validator + func (v Validators) Len() int + func (v Validators) Less(i, j int) bool + func (v Validators) Sort() + func (v Validators) String() (out string) + func (v Validators) Swap(i, j int) + func (v Validators) ToSDKValidators() (validators []ValidatorI) + func (v Validators) UnpackInterfaces(c codectypes.AnyUnpacker) error + type ValidatorsByvotePower []Validator + func (valz ValidatorsByvotePower) Len() int + func (valz ValidatorsByvotePower) Less(i, j int, r math.Int) bool + func (valz ValidatorsByvotePower) Swap(i, j int)