Documentation
¶
Overview ¶
Package auth nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/pokt-network/posmint/x/auth/types
Package auth nolint
Index ¶
- Constants
- Variables
- func DeductFees(supplyKeeper types.SupplyKeeper, ctx sdk.Ctx, acc Account, fees sdk.Coins) sdk.Result
- func EnsureSufficientMempoolFees(ctx sdk.Ctx, stdFee sdk.Coins) sdk.Result
- func GetSignBytes(chainID string, stdTx StdTx) []byte
- func InitGenesis(ctx sdk.Ctx, ak AccountKeeper, data GenesisState)
- func NewAnteHandler(ak AccountKeeper, supplyKeeper types.SupplyKeeper) sdk.AnteHandler
- func NewQuerier(keeper AccountKeeper) sdk.Querier
- func ProcessPubKey(acc Account, sig StdSignature) (posCrypto.PublicKey, sdk.Result)
- func ValidateMemo(stdTx StdTx, params Params) sdk.Result
- func ValidateSigCount(stdTx StdTx, params Params) sdk.Result
- type Account
- type AccountKeeper
- func (ak AccountKeeper) GetAccount(ctx sdk.Ctx, addr sdk.Address) exported.Account
- func (ak AccountKeeper) GetAllAccounts(ctx sdk.Ctx) []exported.Account
- func (ak AccountKeeper) GetParams(ctx sdk.Ctx) (params types.Params)
- func (ak AccountKeeper) GetPubKey(ctx sdk.Ctx, addr sdk.Address) (crypto.PublicKey, sdk.Error)
- func (ak AccountKeeper) IterateAccounts(ctx sdk.Ctx, process func(exported.Account) (stop bool))
- func (ak AccountKeeper) Logger(ctx sdk.Ctx) log.Logger
- func (ak AccountKeeper) NewAccount(ctx sdk.Ctx, acc exported.Account) exported.Account
- func (ak AccountKeeper) NewAccountWithAddress(ctx sdk.Ctx, addr sdk.Address) exported.Account
- func (ak AccountKeeper) RemoveAccount(ctx sdk.Ctx, acc exported.Account)
- func (ak AccountKeeper) SetAccount(ctx sdk.Ctx, acc exported.Account)
- func (ak AccountKeeper) SetParams(ctx sdk.Ctx, params types.Params)
- type AppModule
- func (AppModule) BeginBlock(_ sdk.Ctx, _ abci.RequestBeginBlock)
- func (AppModule) EndBlock(_ sdk.Ctx, _ abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Ctx) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Ctx, data json.RawMessage) []abci.ValidatorUpdate
- func (AppModule) Name() string
- func (AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (AppModule) QuerierRoute() string
- func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
- func (AppModule) Route() string
- type AppModuleBasic
- type BaseAccount
- type DummySupplyKeeper
- func (sk DummySupplyKeeper) GetModuleAccount(ctx sdk.Ctx, moduleName string) exported.ModuleAccountI
- func (sk DummySupplyKeeper) GetModuleAddress(moduleName string) sdk.Address
- func (sk DummySupplyKeeper) SendCoinsFromAccountToModule(ctx sdk.Ctx, fromAddr sdk.Address, recipientModule string, amt sdk.Coins) sdk.Error
- type GenesisState
- type Params
- type QueryAccountParams
- type StdSignDoc
- type StdSignature
- type StdTx
- type TxBuilder
Constants ¶
const ( ModuleName = types.ModuleName StoreKey = types.StoreKey FeeCollectorName = types.FeeCollectorName QuerierRoute = types.QuerierRoute DefaultParamspace = types.DefaultParamspace QueryAccount = types.QueryAccount )
Const Constants
Variables ¶
var ( ProtoBaseAccount = types.ProtoBaseAccount NewBaseAccountWithAddress = types.NewBaseAccountWithAddress RegisterCodec = types.RegisterCodec NewGenesisState = types.NewGenesisState DefaultGenesisState = types.DefaultGenesisState CountSubKeys = types.CountSubKeys StdSignBytes = types.StdSignBytes DefaultTxDecoder = types.DefaultTxDecoder DefaultTxEncoder = types.DefaultTxEncoder NewTxBuilder = types.NewTxBuilder NewAccountRetriever = types.NewAccountRetriever ModuleCdc = types.ModuleCdc )
Functions ¶
func DeductFees ¶
func DeductFees(supplyKeeper types.SupplyKeeper, ctx sdk.Ctx, 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 EnsureSufficientMempoolFees ¶
EnsureSufficientMempoolFees verifies that the given transaction has supplied enough fees 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 InitGenesis ¶
func InitGenesis(ctx sdk.Ctx, ak AccountKeeper, data GenesisState)
InitGenesis - Init store state from genesis data
CONTRACT: old coins from the FeeCollectionKeeper need to be transferred through a genesis port script to the new fee collector account
func NewAnteHandler ¶
func NewAnteHandler(ak AccountKeeper, supplyKeeper types.SupplyKeeper) sdk.AnteHandler
NewAnteHandler returns an AnteHandler that checks signatures and deducts fees from the first signer.
func NewQuerier ¶
func NewQuerier(keeper AccountKeeper) sdk.Querier
NewQuerier creates a querier for auth REST endpoints
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 ValidateMemo ¶
ValidateMemo validates the memo size.
Types ¶
type Account ¶
Type exported types
func GetSignerAcc ¶
GetSignerAcc returns an account for a given address that is expected to sign a transaction.
type AccountKeeper ¶
type AccountKeeper struct {
// contains filtered or unexported fields
}
AccountKeeper encodes/decodes accounts using the go-amino (binary) encoding/decoding library.
func NewAccountKeeper ¶
func NewAccountKeeper( cdc *codec.Codec, key sdk.StoreKey, paramstore sdk.Subspace, proto func() exported.Account, ) AccountKeeper
NewAccountKeeper returns a new sdk.AccountKeeper that uses go-amino to (binary) encode and decode concrete sdk.Accounts. nolint
func (AccountKeeper) GetAccount ¶
GetAccount implements sdk.AccountKeeper.
func (AccountKeeper) GetAllAccounts ¶
func (ak AccountKeeper) GetAllAccounts(ctx sdk.Ctx) []exported.Account
GetAllAccounts returns all accounts in the accountKeeper.
func (AccountKeeper) GetParams ¶
func (ak AccountKeeper) GetParams(ctx sdk.Ctx) (params types.Params)
GetParams gets the auth module's parameters.
func (AccountKeeper) IterateAccounts ¶
IterateAccounts implements sdk.AccountKeeper.
func (AccountKeeper) Logger ¶
func (ak AccountKeeper) Logger(ctx sdk.Ctx) log.Logger
Logger returns a module-specific logger.
func (AccountKeeper) NewAccount ¶
NewAccount creates a new account
func (AccountKeeper) NewAccountWithAddress ¶
NewAccountWithAddress implements sdk.AccountKeeper.
func (AccountKeeper) RemoveAccount ¶
func (ak AccountKeeper) RemoveAccount(ctx sdk.Ctx, acc exported.Account)
RemoveAccount removes an account for the account mapper store. NOTE: this will cause supply invariant violation if called
func (AccountKeeper) SetAccount ¶
func (ak AccountKeeper) SetAccount(ctx sdk.Ctx, acc exported.Account)
SetAccount implements sdk.AccountKeeper.
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule app module object ___________________________
func NewAppModule ¶
func NewAppModule(accountKeeper AccountKeeper) AppModule
NewAppModule creates a new AppModule object
func (AppModule) BeginBlock ¶
func (AppModule) BeginBlock(_ sdk.Ctx, _ abci.RequestBeginBlock)
BeginBlock module begin-block
func (AppModule) EndBlock ¶
func (AppModule) EndBlock(_ sdk.Ctx, _ abci.RequestEndBlock) []abci.ValidatorUpdate
EndBlock module end-block
func (AppModule) ExportGenesis ¶
func (am AppModule) ExportGenesis(ctx sdk.Ctx) json.RawMessage
ExportGenesis module export genesis
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Ctx, data json.RawMessage) []abci.ValidatorUpdate
InitGenesis module init-genesis
func (AppModule) NewQuerierHandler ¶
NewQuerierHandler module querier
func (AppModule) QuerierRoute ¶
QuerierRoute module querier route name
func (AppModule) RegisterInvariants ¶
func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
RegisterInvariants register invariants
type AppModuleBasic ¶
type AppModuleBasic struct{}
AppModuleBasic app module basics object
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis() json.RawMessage
DefaultGenesis default genesis state
func (AppModuleBasic) RegisterCodec ¶
func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
RegisterCodec register module codec
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
ValidateGenesis module validate genesis
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.Ctx, moduleName string) exported.ModuleAccountI
GetModuleAccount for dummy supply keeper
func (DummySupplyKeeper) GetModuleAddress ¶
func (sk DummySupplyKeeper) GetModuleAddress(moduleName string) sdk.Address
GetModuleAddress for dummy supply keeper
type GenesisState ¶
type GenesisState = types.GenesisState
Type exported types
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Ctx, ak AccountKeeper) GenesisState
ExportGenesis returns a GenesisState for a given context and keeper