Documentation ¶
Overview ¶
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/terra-project/core/x/auth/internal/types/
nolint
Index ¶
- Constants
- Variables
- func DeductFees(supplyKeeper types.SupplyKeeper, ctx sdk.Context, acc Account, fees sdk.Coins) sdk.Result
- func DefaultSigVerificationGasConsumer(meter sdk.GasMeter, sig []byte, pubkey crypto.PubKey, params Params) sdk.Result
- func EnsureSufficientMempoolFees(ctx sdk.Context, stdFee StdFee, taxes sdk.Coins) sdk.Result
- func GetSignBytes(chainID string, stdTx StdTx, acc Account, genesis bool) []byte
- func NewAnteHandler(ak AccountKeeper, supplyKeeper types.SupplyKeeper, ...) sdk.AnteHandler
- func ProcessPubKey(acc Account, sig StdSignature, simulate bool) (crypto.PubKey, sdk.Result)
- func SetGasMeter(simulate bool, ctx sdk.Context, gasLimit uint64) sdk.Context
- func ValidateMemo(stdTx StdTx, params Params) sdk.Result
- func ValidateSigCount(stdTx StdTx, params Params) sdk.Result
- type Account
- type AccountKeeper
- type AppModule
- func (am AppModule) BeginBlock(ctx sdk.Context, rbb abci.RequestBeginBlock)
- func (am AppModule) EndBlock(ctx sdk.Context, rbb abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (am AppModule) Name() string
- func (am AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (am AppModule) QuerierRoute() string
- func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
- func (am AppModule) Route() string
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (AppModuleBasic) RegisterRESTRoutes(cliCtx context.CLIContext, route *mux.Router)
- func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type BaseAccount
- type BaseLazyGradedVestingAccount
- type BaseVestingAccount
- type ContinuousVestingAccount
- type CosmosAppModule
- type CosmosAppModuleBasic
- type DelayedVestingAccount
- type DummySupplyKeeper
- func (sk DummySupplyKeeper) GetModuleAccount(ctx sdk.Context, moduleName string) supply.ModuleAccountI
- func (sk DummySupplyKeeper) GetModuleAddress(moduleName string) sdk.AccAddress
- func (sk DummySupplyKeeper) SendCoinsFromAccountToModule(ctx sdk.Context, fromAddr sdk.AccAddress, recipientModule string, ...) sdk.Error
- type DummyTreasuryKeeper
- type GenesisState
- type LazyGradedVestingAccount
- type LazySchedule
- type Params
- type QueryAccountParams
- type SignatureVerificationGasConsumer
- type StdFee
- type StdSignDoc
- type StdSignMsg
- type StdSignature
- type StdTx
- type SupplyKeeper
- type TreasuryKeeper
- type TxBuilder
- type VestingAccount
- type VestingSchedule
Constants ¶
const ( ModuleName = auth.ModuleName StoreKey = auth.StoreKey FeeCollectorName = auth.FeeCollectorName QuerierRoute = auth.QuerierRoute DefaultParamspace = auth.DefaultParamspace DefaultMaxMemoCharacters = auth.DefaultMaxMemoCharacters DefaultTxSigLimit = auth.DefaultTxSigLimit DefaultTxSizeCostPerByte = auth.DefaultTxSizeCostPerByte DefaultSigVerifyCostED25519 = auth.DefaultSigVerifyCostED25519 DefaultSigVerifyCostSecp256k1 = auth.DefaultSigVerifyCostSecp256k1 QueryAccount = auth.QueryAccount )
Variables ¶
var ( // functions aliases RegisterCodec = types.RegisterCodec NewLazySchedule = types.NewLazySchedule NewVestingSchedule = types.NewVestingSchedule NewBaseLazyGradedVestingAccountRaw = types.NewBaseLazyGradedVestingAccountRaw NewBaseLazyGradedVestingAccount = types.NewBaseLazyGradedVestingAccount // variable aliases ModuleCdc = types.ModuleCdc )
var ( // functions aliases NewBaseAccount = auth.NewBaseAccount ProtoBaseAccount = auth.ProtoBaseAccount NewBaseAccountWithAddress = auth.NewBaseAccountWithAddress NewBaseVestingAccount = auth.NewBaseVestingAccount NewContinuousVestingAccountRaw = auth.NewContinuousVestingAccountRaw NewContinuousVestingAccount = auth.NewContinuousVestingAccount NewDelayedVestingAccountRaw = auth.NewDelayedVestingAccountRaw NewDelayedVestingAccount = auth.NewDelayedVestingAccount NewGenesisState = auth.NewGenesisState ValidateGenesis = auth.ValidateGenesis AddressStoreKey = auth.AddressStoreKey NewParams = auth.NewParams ParamKeyTable = auth.ParamKeyTable DefaultParams = auth.DefaultParams NewQueryAccountParams = auth.NewQueryAccountParams NewStdTx = auth.NewStdTx CountSubKeys = auth.CountSubKeys NewStdFee = auth.NewStdFee StdSignBytes = auth.StdSignBytes DefaultTxDecoder = auth.DefaultTxDecoder DefaultTxEncoder = auth.DefaultTxEncoder NewTxBuilder = auth.NewTxBuilder NewTxBuilderFromCLI = auth.NewTxBuilderFromCLI MakeSignature = auth.MakeSignature NewAccountRetriever = auth.NewAccountRetriever NewAccountKeeper = auth.NewAccountKeeper // variable aliases AddressStoreKeyPrefix = auth.AddressStoreKeyPrefix GlobalAccountNumberKey = auth.GlobalAccountNumberKey KeyMaxMemoCharacters = auth.KeyMaxMemoCharacters KeyTxSigLimit = auth.KeyTxSigLimit KeyTxSizeCostPerByte = auth.KeyTxSizeCostPerByte KeySigVerifyCostED25519 = auth.KeySigVerifyCostED25519 KeySigVerifyCostSecp256k1 = auth.KeySigVerifyCostSecp256k1 CosmosModuleCdc = auth.ModuleCdc NewCosmosAppModule = auth.NewAppModule )
Functions ¶
func DeductFees ¶
func DeductFees(supplyKeeper types.SupplyKeeper, ctx sdk.Context, acc Account, fees sdk.Coins) sdk.Result
DeductFees deducts fees from the given account.
NOTE: We could use the CoinKeeper (in addition to the AccountKeeper, because the CoinKeeper doesn't give us accounts), but it seems easier to do this.
func DefaultSigVerificationGasConsumer ¶
func DefaultSigVerificationGasConsumer( meter sdk.GasMeter, sig []byte, pubkey crypto.PubKey, params Params, ) sdk.Result
DefaultSigVerificationGasConsumer is the default implementation of SignatureVerificationGasConsumer. It consumes gas for signature verification based upon the public key type. The cost is fetched from the given params and is matched by the concrete type.
func EnsureSufficientMempoolFees ¶
EnsureSufficientMempoolFees verifies that the given transaction has supplied enough fees(gas + stability) to cover a proposer's minimum fees. A result object is returned indicating success or failure.
Contract: This should only be called during CheckTx as it cannot be part of consensus.
func GetSignBytes ¶
GetSignBytes returns a slice of bytes to sign over for a given transaction and an account.
func NewAnteHandler ¶
func NewAnteHandler(ak AccountKeeper, supplyKeeper types.SupplyKeeper, treasuryKeeper TreasuryKeeper, sigGasConsumer SignatureVerificationGasConsumer) sdk.AnteHandler
NewAnteHandler returns an AnteHandler that checks and increments sequence numbers, checks signatures & account numbers, and deducts fees from the first signer.
func ProcessPubKey ¶
ProcessPubKey verifies that the given account address matches that of the StdSignature. In addition, it will set the public key of the account if it has not been set.
func SetGasMeter ¶
SetGasMeter returns a new context with a gas meter set from a given context.
func ValidateMemo ¶
ValidateMemo validates the memo size.
Types ¶
type Account ¶
func GetSignerAcc ¶
func GetSignerAcc(ctx sdk.Context, ak AccountKeeper, addr sdk.AccAddress) (Account, sdk.Result)
GetSignerAcc returns an account for a given address that is expected to sign a transaction.
type AccountKeeper ¶
type AccountKeeper = auth.AccountKeeper
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule implements an application module for the auth module.
func NewAppModule ¶
func NewAppModule(accountKeeper AccountKeeper) AppModule
NewAppModule creates a new AppModule object
func (AppModule) BeginBlock ¶
func (am AppModule) BeginBlock(ctx sdk.Context, rbb abci.RequestBeginBlock)
BeginBlock returns the begin blocker for the auth module.
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(ctx sdk.Context, rbb abci.RequestEndBlock) []abci.ValidatorUpdate
EndBlock returns the end blocker for the auth module.
func (AppModule) ExportGenesis ¶
func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
ExportGenesis returns the exported genesis state as raw bytes for the auth module.
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
InitGenesis performs genesis initialization for the auth module.
func (AppModule) NewHandler ¶
NewHandler returns an sdk.Handler for the auth module.
func (AppModule) NewQuerierHandler ¶
NewQuerierHandler returns the auth module sdk.Querier.
func (AppModule) QuerierRoute ¶
QuerierRoute returns the auth module's querier route name.
func (AppModule) RegisterInvariants ¶
func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
RegisterInvariants registers the auth module invariants.
type AppModuleBasic ¶
type AppModuleBasic struct{}
AppModuleBasic defines the basic application module used by the auth module.
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis() json.RawMessage
DefaultGenesis returns default genesis state as raw bytes for the auth module.
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
GetQueryCmd returns the root query command for the auth module.
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
GetTxCmd returns the root tx command for the auth module.
func (AppModuleBasic) Name ¶
func (AppModuleBasic) Name() string
Name returns the auth module's name
func (AppModuleBasic) RegisterCodec ¶
func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
RegisterCodec registers the auth module's types for the given codec.
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(cliCtx context.CLIContext, route *mux.Router)
RegisterRESTRoutes registers the REST routes for the auth module.
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
ValidateGenesis performs genesis state validation for the auth module.
type BaseAccount ¶
type BaseAccount = auth.BaseAccount
type BaseLazyGradedVestingAccount ¶
type BaseLazyGradedVestingAccount = types.BaseLazyGradedVestingAccount
type BaseVestingAccount ¶
type BaseVestingAccount = auth.BaseVestingAccount
type ContinuousVestingAccount ¶
type ContinuousVestingAccount = auth.ContinuousVestingAccount
type CosmosAppModule ¶
type CosmosAppModuleBasic ¶
type CosmosAppModuleBasic = auth.AppModuleBasic
type DelayedVestingAccount ¶
type DelayedVestingAccount = auth.DelayedVestingAccount
type DummySupplyKeeper ¶
type DummySupplyKeeper struct {
// contains filtered or unexported fields
}
DummySupplyKeeper defines a supply keeper used only for testing to avoid circle dependencies
func NewDummySupplyKeeper ¶
func NewDummySupplyKeeper(ak AccountKeeper) DummySupplyKeeper
NewDummySupplyKeeper creates a DummySupplyKeeper instance
func (DummySupplyKeeper) GetModuleAccount ¶
func (sk DummySupplyKeeper) GetModuleAccount(ctx sdk.Context, moduleName string) supply.ModuleAccountI
GetModuleAccount for dummy supply keeper
func (DummySupplyKeeper) GetModuleAddress ¶
func (sk DummySupplyKeeper) GetModuleAddress(moduleName string) sdk.AccAddress
GetModuleAddress for dummy supply keeper
func (DummySupplyKeeper) SendCoinsFromAccountToModule ¶
func (sk DummySupplyKeeper) SendCoinsFromAccountToModule(ctx sdk.Context, fromAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) sdk.Error
SendCoinsFromAccountToModule for the dummy supply keeper
type DummyTreasuryKeeper ¶
type DummyTreasuryKeeper struct{}
DummyTreasuryKeeper no-lint
func NewDummyTreasuryKeeper ¶
func NewDummyTreasuryKeeper() DummyTreasuryKeeper
NewDummyTreasuryKeeper no-lint
func (DummyTreasuryKeeper) GetTaxRate ¶
func (tk DummyTreasuryKeeper) GetTaxRate(_ sdk.Context) (rate sdk.Dec)
GetTaxRate for the dummy treasury keeper
func (DummyTreasuryKeeper) RecordEpochTaxProceeds ¶
func (tk DummyTreasuryKeeper) RecordEpochTaxProceeds(_ sdk.Context, _ sdk.Coins)
RecordEpochTaxProceeds for the dummy treasury keeper
type GenesisState ¶
type GenesisState = auth.GenesisState
type LazyGradedVestingAccount ¶
type LazyGradedVestingAccount = types.LazyGradedVestingAccount
type LazySchedule ¶
type LazySchedule = types.LazySchedule
type QueryAccountParams ¶
type QueryAccountParams = auth.QueryAccountParams
type SignatureVerificationGasConsumer ¶
type SignatureVerificationGasConsumer = func(meter sdk.GasMeter, sig []byte, pubkey crypto.PubKey, params Params) sdk.Result
SignatureVerificationGasConsumer is the type of function that is used to both consume gas when verifying signatures and also to accept or reject different types of PubKey's. This is where apps can define their own PubKey
type StdSignDoc ¶
type StdSignDoc = auth.StdSignDoc
type StdSignMsg ¶
type StdSignMsg = auth.StdSignMsg
type StdSignature ¶
type StdSignature = auth.StdSignature
type SupplyKeeper ¶
type SupplyKeeper = types.SupplyKeeper
type TreasuryKeeper ¶
type TreasuryKeeper = types.TreasuryKeeper
type VestingAccount ¶
type VestingAccount = auth.VestingAccount
type VestingSchedule ¶
type VestingSchedule = types.VestingSchedule