cosmos-sdk/x/staking/alias.go

246 lines
14 KiB
Go
Raw Normal View History

Merge PR #1119: Unbonding, Redelegation * stake/fees spec updates * staking overview.md revisions, moving files * docs reorganization * staking spec state revisions * transaction stake updates * complete staking spec update * WIP adding unbonding/redelegation commands * added msg types for unbonding, redelegation * stake sub-package reorg * working stake reorg * modify lcd tests to not use hardcoded json strings * add description update * index keys * key managment for unbonding redelegation complete * update stake errors * completed handleMsgCompleteUnbonding fn * updated to use begin/complete unbonding/redelegation * fix token shares bug * develop docs into unbonding * got non-tests compiling after merge develop * working fixing tests * PrivlegedKeeper -> PrivilegedKeeper * tests compile * fix some tests * fixing tests * remove PrivilegedKeeper * get unbonding bug * only rpc sig verification failed tests now * move percent unbonding/redelegation to the CLI and out of handler logic * remove min unbonding height * add lcd txs * add pool sanity checks, fix a buncha tests * fix ante. set lcd log to debug (#1322) * redelegation tests, adding query functionality for bonds * add self-delegations at genesis ref #1165 * PR comments (mostly) addressed * cleanup, added Query LCD functionality * test cleanup/fixes * fix governance test * SlashValidatorSet -> ValidatorSet * changelog * stake lcd fix * x/auth: fix chainID in ante * fix lcd test * fix lint, update lint make command for spelling * lowercase error string * don't expose coinkeeper in staking * remove a few duplicate lines in changelog * chain_id in stake lcd tests * added transient redelegation * 'transient' => 'transitive' * Re-add nolint instruction * Fix tiny linter error
2018-06-26 19:00:12 -07:00
// nolint
2019-05-20 06:13:32 -07:00
// autogenerated code using github.com/rigelrozanski/multitool
// aliases generated for the following subdirectories:
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/staking/keeper
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/staking/types
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/staking/exported
2019-01-11 12:08:01 -08:00
package staking
Merge PR #1119: Unbonding, Redelegation * stake/fees spec updates * staking overview.md revisions, moving files * docs reorganization * staking spec state revisions * transaction stake updates * complete staking spec update * WIP adding unbonding/redelegation commands * added msg types for unbonding, redelegation * stake sub-package reorg * working stake reorg * modify lcd tests to not use hardcoded json strings * add description update * index keys * key managment for unbonding redelegation complete * update stake errors * completed handleMsgCompleteUnbonding fn * updated to use begin/complete unbonding/redelegation * fix token shares bug * develop docs into unbonding * got non-tests compiling after merge develop * working fixing tests * PrivlegedKeeper -> PrivilegedKeeper * tests compile * fix some tests * fixing tests * remove PrivilegedKeeper * get unbonding bug * only rpc sig verification failed tests now * move percent unbonding/redelegation to the CLI and out of handler logic * remove min unbonding height * add lcd txs * add pool sanity checks, fix a buncha tests * fix ante. set lcd log to debug (#1322) * redelegation tests, adding query functionality for bonds * add self-delegations at genesis ref #1165 * PR comments (mostly) addressed * cleanup, added Query LCD functionality * test cleanup/fixes * fix governance test * SlashValidatorSet -> ValidatorSet * changelog * stake lcd fix * x/auth: fix chainID in ante * fix lcd test * fix lint, update lint make command for spelling * lowercase error string * don't expose coinkeeper in staking * remove a few duplicate lines in changelog * chain_id in stake lcd tests * added transient redelegation * 'transient' => 'transitive' * Re-add nolint instruction * Fix tiny linter error
2018-06-26 19:00:12 -07:00
import (
"github.com/cosmos/cosmos-sdk/x/staking/exported"
2019-01-11 12:08:01 -08:00
"github.com/cosmos/cosmos-sdk/x/staking/keeper"
"github.com/cosmos/cosmos-sdk/x/staking/types"
Merge PR #1119: Unbonding, Redelegation * stake/fees spec updates * staking overview.md revisions, moving files * docs reorganization * staking spec state revisions * transaction stake updates * complete staking spec update * WIP adding unbonding/redelegation commands * added msg types for unbonding, redelegation * stake sub-package reorg * working stake reorg * modify lcd tests to not use hardcoded json strings * add description update * index keys * key managment for unbonding redelegation complete * update stake errors * completed handleMsgCompleteUnbonding fn * updated to use begin/complete unbonding/redelegation * fix token shares bug * develop docs into unbonding * got non-tests compiling after merge develop * working fixing tests * PrivlegedKeeper -> PrivilegedKeeper * tests compile * fix some tests * fixing tests * remove PrivilegedKeeper * get unbonding bug * only rpc sig verification failed tests now * move percent unbonding/redelegation to the CLI and out of handler logic * remove min unbonding height * add lcd txs * add pool sanity checks, fix a buncha tests * fix ante. set lcd log to debug (#1322) * redelegation tests, adding query functionality for bonds * add self-delegations at genesis ref #1165 * PR comments (mostly) addressed * cleanup, added Query LCD functionality * test cleanup/fixes * fix governance test * SlashValidatorSet -> ValidatorSet * changelog * stake lcd fix * x/auth: fix chainID in ante * fix lcd test * fix lint, update lint make command for spelling * lowercase error string * don't expose coinkeeper in staking * remove a few duplicate lines in changelog * chain_id in stake lcd tests * added transient redelegation * 'transient' => 'transitive' * Re-add nolint instruction * Fix tiny linter error
2018-06-26 19:00:12 -07:00
)
2018-10-20 13:31:26 -07:00
const (
2019-05-20 06:13:32 -07:00
DefaultParamspace = keeper.DefaultParamspace
DefaultCodespace = types.DefaultCodespace
CodeInvalidValidator = types.CodeInvalidValidator
CodeInvalidDelegation = types.CodeInvalidDelegation
CodeInvalidInput = types.CodeInvalidInput
CodeValidatorJailed = types.CodeValidatorJailed
CodeInvalidAddress = types.CodeInvalidAddress
CodeUnauthorized = types.CodeUnauthorized
CodeInternal = types.CodeInternal
CodeUnknownRequest = types.CodeUnknownRequest
ModuleName = types.ModuleName
StoreKey = types.StoreKey
TStoreKey = types.TStoreKey
QuerierRoute = types.QuerierRoute
RouterKey = types.RouterKey
DefaultUnbondingTime = types.DefaultUnbondingTime
DefaultMaxValidators = types.DefaultMaxValidators
DefaultMaxEntries = types.DefaultMaxEntries
2019-06-28 13:11:27 -07:00
NotBondedPoolName = types.NotBondedPoolName
BondedPoolName = types.BondedPoolName
QueryValidators = types.QueryValidators
QueryValidator = types.QueryValidator
QueryDelegatorDelegations = types.QueryDelegatorDelegations
QueryDelegatorUnbondingDelegations = types.QueryDelegatorUnbondingDelegations
QueryRedelegations = types.QueryRedelegations
QueryValidatorDelegations = types.QueryValidatorDelegations
QueryValidatorRedelegations = types.QueryValidatorRedelegations
QueryValidatorUnbondingDelegations = types.QueryValidatorUnbondingDelegations
QueryDelegation = types.QueryDelegation
QueryUnbondingDelegation = types.QueryUnbondingDelegation
QueryDelegatorValidators = types.QueryDelegatorValidators
QueryDelegatorValidator = types.QueryDelegatorValidator
QueryPool = types.QueryPool
QueryParameters = types.QueryParameters
2019-05-20 06:13:32 -07:00
MaxMonikerLength = types.MaxMonikerLength
MaxIdentityLength = types.MaxIdentityLength
MaxWebsiteLength = types.MaxWebsiteLength
MaxDetailsLength = types.MaxDetailsLength
DoNotModifyDesc = types.DoNotModifyDesc
Merge PR #1119: Unbonding, Redelegation * stake/fees spec updates * staking overview.md revisions, moving files * docs reorganization * staking spec state revisions * transaction stake updates * complete staking spec update * WIP adding unbonding/redelegation commands * added msg types for unbonding, redelegation * stake sub-package reorg * working stake reorg * modify lcd tests to not use hardcoded json strings * add description update * index keys * key managment for unbonding redelegation complete * update stake errors * completed handleMsgCompleteUnbonding fn * updated to use begin/complete unbonding/redelegation * fix token shares bug * develop docs into unbonding * got non-tests compiling after merge develop * working fixing tests * PrivlegedKeeper -> PrivilegedKeeper * tests compile * fix some tests * fixing tests * remove PrivilegedKeeper * get unbonding bug * only rpc sig verification failed tests now * move percent unbonding/redelegation to the CLI and out of handler logic * remove min unbonding height * add lcd txs * add pool sanity checks, fix a buncha tests * fix ante. set lcd log to debug (#1322) * redelegation tests, adding query functionality for bonds * add self-delegations at genesis ref #1165 * PR comments (mostly) addressed * cleanup, added Query LCD functionality * test cleanup/fixes * fix governance test * SlashValidatorSet -> ValidatorSet * changelog * stake lcd fix * x/auth: fix chainID in ante * fix lcd test * fix lint, update lint make command for spelling * lowercase error string * don't expose coinkeeper in staking * remove a few duplicate lines in changelog * chain_id in stake lcd tests * added transient redelegation * 'transient' => 'transitive' * Re-add nolint instruction * Fix tiny linter error
2018-06-26 19:00:12 -07:00
)
var (
2019-05-20 06:13:32 -07:00
// functions aliases
RegisterInvariants = keeper.RegisterInvariants
AllInvariants = keeper.AllInvariants
2019-06-28 13:11:27 -07:00
ModuleAccountInvariants = keeper.ModuleAccountInvariants
2019-05-20 06:13:32 -07:00
NonNegativePowerInvariant = keeper.NonNegativePowerInvariant
PositiveDelegationInvariant = keeper.PositiveDelegationInvariant
DelegatorSharesInvariant = keeper.DelegatorSharesInvariant
NewKeeper = keeper.NewKeeper
ParamKeyTable = keeper.ParamKeyTable
NewQuerier = keeper.NewQuerier
2019-05-20 06:13:32 -07:00
RegisterCodec = types.RegisterCodec
NewCommissionRates = types.NewCommissionRates
2019-05-20 06:13:32 -07:00
NewCommission = types.NewCommission
NewCommissionWithTime = types.NewCommissionWithTime
NewDelegation = types.NewDelegation
MustMarshalDelegation = types.MustMarshalDelegation
MustUnmarshalDelegation = types.MustUnmarshalDelegation
UnmarshalDelegation = types.UnmarshalDelegation
NewUnbondingDelegation = types.NewUnbondingDelegation
NewUnbondingDelegationEntry = types.NewUnbondingDelegationEntry
MustMarshalUBD = types.MustMarshalUBD
MustUnmarshalUBD = types.MustUnmarshalUBD
UnmarshalUBD = types.UnmarshalUBD
NewRedelegation = types.NewRedelegation
NewRedelegationEntry = types.NewRedelegationEntry
MustMarshalRED = types.MustMarshalRED
MustUnmarshalRED = types.MustUnmarshalRED
UnmarshalRED = types.UnmarshalRED
NewDelegationResp = types.NewDelegationResp
NewRedelegationResponse = types.NewRedelegationResponse
NewRedelegationEntryResponse = types.NewRedelegationEntryResponse
ErrNilValidatorAddr = types.ErrNilValidatorAddr
ErrBadValidatorAddr = types.ErrBadValidatorAddr
ErrNoValidatorFound = types.ErrNoValidatorFound
ErrValidatorOwnerExists = types.ErrValidatorOwnerExists
ErrValidatorPubKeyExists = types.ErrValidatorPubKeyExists
ErrValidatorPubKeyTypeNotSupported = types.ErrValidatorPubKeyTypeNotSupported
ErrValidatorJailed = types.ErrValidatorJailed
ErrBadRemoveValidator = types.ErrBadRemoveValidator
ErrDescriptionLength = types.ErrDescriptionLength
ErrCommissionNegative = types.ErrCommissionNegative
ErrCommissionHuge = types.ErrCommissionHuge
ErrCommissionGTMaxRate = types.ErrCommissionGTMaxRate
ErrCommissionUpdateTime = types.ErrCommissionUpdateTime
ErrCommissionChangeRateNegative = types.ErrCommissionChangeRateNegative
ErrCommissionChangeRateGTMaxRate = types.ErrCommissionChangeRateGTMaxRate
ErrCommissionGTMaxChangeRate = types.ErrCommissionGTMaxChangeRate
ErrSelfDelegationBelowMinimum = types.ErrSelfDelegationBelowMinimum
ErrMinSelfDelegationInvalid = types.ErrMinSelfDelegationInvalid
ErrMinSelfDelegationDecreased = types.ErrMinSelfDelegationDecreased
ErrNilDelegatorAddr = types.ErrNilDelegatorAddr
ErrBadDenom = types.ErrBadDenom
ErrBadDelegationAddr = types.ErrBadDelegationAddr
ErrBadDelegationAmount = types.ErrBadDelegationAmount
ErrNoDelegation = types.ErrNoDelegation
ErrBadDelegatorAddr = types.ErrBadDelegatorAddr
ErrNoDelegatorForAddress = types.ErrNoDelegatorForAddress
ErrInsufficientShares = types.ErrInsufficientShares
ErrDelegationValidatorEmpty = types.ErrDelegationValidatorEmpty
ErrNotEnoughDelegationShares = types.ErrNotEnoughDelegationShares
ErrBadSharesAmount = types.ErrBadSharesAmount
ErrBadSharesPercent = types.ErrBadSharesPercent
ErrNotMature = types.ErrNotMature
ErrNoUnbondingDelegation = types.ErrNoUnbondingDelegation
ErrMaxUnbondingDelegationEntries = types.ErrMaxUnbondingDelegationEntries
ErrBadRedelegationAddr = types.ErrBadRedelegationAddr
ErrNoRedelegation = types.ErrNoRedelegation
ErrSelfRedelegation = types.ErrSelfRedelegation
ErrVerySmallRedelegation = types.ErrVerySmallRedelegation
ErrBadRedelegationDst = types.ErrBadRedelegationDst
ErrTransitiveRedelegation = types.ErrTransitiveRedelegation
ErrMaxRedelegationEntries = types.ErrMaxRedelegationEntries
ErrDelegatorShareExRateInvalid = types.ErrDelegatorShareExRateInvalid
ErrBothShareMsgsGiven = types.ErrBothShareMsgsGiven
ErrNeitherShareMsgsGiven = types.ErrNeitherShareMsgsGiven
ErrMissingSignature = types.ErrMissingSignature
NewGenesisState = types.NewGenesisState
DefaultGenesisState = types.DefaultGenesisState
NewMultiStakingHooks = types.NewMultiStakingHooks
GetValidatorKey = types.GetValidatorKey
GetValidatorByConsAddrKey = types.GetValidatorByConsAddrKey
AddressFromLastValidatorPowerKey = types.AddressFromLastValidatorPowerKey
GetValidatorsByPowerIndexKey = types.GetValidatorsByPowerIndexKey
GetLastValidatorPowerKey = types.GetLastValidatorPowerKey
ParseValidatorPowerRankKey = types.ParseValidatorPowerRankKey
GetValidatorQueueTimeKey = types.GetValidatorQueueTimeKey
GetDelegationKey = types.GetDelegationKey
GetDelegationsKey = types.GetDelegationsKey
GetUBDKey = types.GetUBDKey
GetUBDByValIndexKey = types.GetUBDByValIndexKey
GetUBDKeyFromValIndexKey = types.GetUBDKeyFromValIndexKey
GetUBDsKey = types.GetUBDsKey
GetUBDsByValIndexKey = types.GetUBDsByValIndexKey
GetUnbondingDelegationTimeKey = types.GetUnbondingDelegationTimeKey
GetREDKey = types.GetREDKey
GetREDByValSrcIndexKey = types.GetREDByValSrcIndexKey
GetREDByValDstIndexKey = types.GetREDByValDstIndexKey
GetREDKeyFromValSrcIndexKey = types.GetREDKeyFromValSrcIndexKey
GetREDKeyFromValDstIndexKey = types.GetREDKeyFromValDstIndexKey
GetRedelegationTimeKey = types.GetRedelegationTimeKey
GetREDsKey = types.GetREDsKey
GetREDsFromValSrcIndexKey = types.GetREDsFromValSrcIndexKey
GetREDsToValDstIndexKey = types.GetREDsToValDstIndexKey
GetREDsByDelToValDstIndexKey = types.GetREDsByDelToValDstIndexKey
2019-05-20 06:13:32 -07:00
NewMsgCreateValidator = types.NewMsgCreateValidator
NewMsgEditValidator = types.NewMsgEditValidator
NewMsgDelegate = types.NewMsgDelegate
NewMsgBeginRedelegate = types.NewMsgBeginRedelegate
NewMsgUndelegate = types.NewMsgUndelegate
NewParams = types.NewParams
DefaultParams = types.DefaultParams
MustUnmarshalParams = types.MustUnmarshalParams
UnmarshalParams = types.UnmarshalParams
2019-06-28 13:11:27 -07:00
NewPool = types.NewPool
NewQueryDelegatorParams = types.NewQueryDelegatorParams
NewQueryValidatorParams = types.NewQueryValidatorParams
NewQueryBondsParams = types.NewQueryBondsParams
NewQueryRedelegationParams = types.NewQueryRedelegationParams
NewQueryValidatorsParams = types.NewQueryValidatorsParams
2019-05-20 06:13:32 -07:00
NewValidator = types.NewValidator
MustMarshalValidator = types.MustMarshalValidator
MustUnmarshalValidator = types.MustUnmarshalValidator
UnmarshalValidator = types.UnmarshalValidator
NewDescription = types.NewDescription
Merge PR #1119: Unbonding, Redelegation * stake/fees spec updates * staking overview.md revisions, moving files * docs reorganization * staking spec state revisions * transaction stake updates * complete staking spec update * WIP adding unbonding/redelegation commands * added msg types for unbonding, redelegation * stake sub-package reorg * working stake reorg * modify lcd tests to not use hardcoded json strings * add description update * index keys * key managment for unbonding redelegation complete * update stake errors * completed handleMsgCompleteUnbonding fn * updated to use begin/complete unbonding/redelegation * fix token shares bug * develop docs into unbonding * got non-tests compiling after merge develop * working fixing tests * PrivlegedKeeper -> PrivilegedKeeper * tests compile * fix some tests * fixing tests * remove PrivilegedKeeper * get unbonding bug * only rpc sig verification failed tests now * move percent unbonding/redelegation to the CLI and out of handler logic * remove min unbonding height * add lcd txs * add pool sanity checks, fix a buncha tests * fix ante. set lcd log to debug (#1322) * redelegation tests, adding query functionality for bonds * add self-delegations at genesis ref #1165 * PR comments (mostly) addressed * cleanup, added Query LCD functionality * test cleanup/fixes * fix governance test * SlashValidatorSet -> ValidatorSet * changelog * stake lcd fix * x/auth: fix chainID in ante * fix lcd test * fix lint, update lint make command for spelling * lowercase error string * don't expose coinkeeper in staking * remove a few duplicate lines in changelog * chain_id in stake lcd tests * added transient redelegation * 'transient' => 'transitive' * Re-add nolint instruction * Fix tiny linter error
2018-06-26 19:00:12 -07:00
2019-05-20 06:13:32 -07:00
// variable aliases
ModuleCdc = types.ModuleCdc
LastValidatorPowerKey = types.LastValidatorPowerKey
LastTotalPowerKey = types.LastTotalPowerKey
ValidatorsKey = types.ValidatorsKey
ValidatorsByConsAddrKey = types.ValidatorsByConsAddrKey
ValidatorsByPowerIndexKey = types.ValidatorsByPowerIndexKey
DelegationKey = types.DelegationKey
UnbondingDelegationKey = types.UnbondingDelegationKey
UnbondingDelegationByValIndexKey = types.UnbondingDelegationByValIndexKey
RedelegationKey = types.RedelegationKey
RedelegationByValSrcIndexKey = types.RedelegationByValSrcIndexKey
RedelegationByValDstIndexKey = types.RedelegationByValDstIndexKey
UnbondingQueueKey = types.UnbondingQueueKey
RedelegationQueueKey = types.RedelegationQueueKey
ValidatorQueueKey = types.ValidatorQueueKey
2019-05-20 06:13:32 -07:00
KeyUnbondingTime = types.KeyUnbondingTime
KeyMaxValidators = types.KeyMaxValidators
KeyMaxEntries = types.KeyMaxEntries
KeyBondDenom = types.KeyBondDenom
)
2019-02-08 12:44:19 -08:00
2019-05-20 06:13:32 -07:00
type (
Keeper = keeper.Keeper
Commission = types.Commission
CommissionRates = types.CommissionRates
2019-05-20 06:13:32 -07:00
DVPair = types.DVPair
DVVTriplet = types.DVVTriplet
Delegation = types.Delegation
Delegations = types.Delegations
UnbondingDelegation = types.UnbondingDelegation
UnbondingDelegationEntry = types.UnbondingDelegationEntry
UnbondingDelegations = types.UnbondingDelegations
Redelegation = types.Redelegation
RedelegationEntry = types.RedelegationEntry
Redelegations = types.Redelegations
DelegationResponse = types.DelegationResponse
DelegationResponses = types.DelegationResponses
RedelegationResponse = types.RedelegationResponse
RedelegationEntryResponse = types.RedelegationEntryResponse
RedelegationResponses = types.RedelegationResponses
CodeType = types.CodeType
GenesisState = types.GenesisState
LastValidatorPower = types.LastValidatorPower
MultiStakingHooks = types.MultiStakingHooks
MsgCreateValidator = types.MsgCreateValidator
MsgEditValidator = types.MsgEditValidator
MsgDelegate = types.MsgDelegate
MsgBeginRedelegate = types.MsgBeginRedelegate
MsgUndelegate = types.MsgUndelegate
Params = types.Params
Pool = types.Pool
QueryDelegatorParams = types.QueryDelegatorParams
QueryValidatorParams = types.QueryValidatorParams
QueryBondsParams = types.QueryBondsParams
QueryRedelegationParams = types.QueryRedelegationParams
QueryValidatorsParams = types.QueryValidatorsParams
2019-05-20 06:13:32 -07:00
Validator = types.Validator
Validators = types.Validators
Description = types.Description
DelegationI = exported.DelegationI
ValidatorI = exported.ValidatorI
Merge PR #1119: Unbonding, Redelegation * stake/fees spec updates * staking overview.md revisions, moving files * docs reorganization * staking spec state revisions * transaction stake updates * complete staking spec update * WIP adding unbonding/redelegation commands * added msg types for unbonding, redelegation * stake sub-package reorg * working stake reorg * modify lcd tests to not use hardcoded json strings * add description update * index keys * key managment for unbonding redelegation complete * update stake errors * completed handleMsgCompleteUnbonding fn * updated to use begin/complete unbonding/redelegation * fix token shares bug * develop docs into unbonding * got non-tests compiling after merge develop * working fixing tests * PrivlegedKeeper -> PrivilegedKeeper * tests compile * fix some tests * fixing tests * remove PrivilegedKeeper * get unbonding bug * only rpc sig verification failed tests now * move percent unbonding/redelegation to the CLI and out of handler logic * remove min unbonding height * add lcd txs * add pool sanity checks, fix a buncha tests * fix ante. set lcd log to debug (#1322) * redelegation tests, adding query functionality for bonds * add self-delegations at genesis ref #1165 * PR comments (mostly) addressed * cleanup, added Query LCD functionality * test cleanup/fixes * fix governance test * SlashValidatorSet -> ValidatorSet * changelog * stake lcd fix * x/auth: fix chainID in ante * fix lcd test * fix lint, update lint make command for spelling * lowercase error string * don't expose coinkeeper in staking * remove a few duplicate lines in changelog * chain_id in stake lcd tests * added transient redelegation * 'transient' => 'transitive' * Re-add nolint instruction * Fix tiny linter error
2018-06-26 19:00:12 -07:00
)