cosmos-sdk: Index | Files

package keeper

import ""


Package Files

account.go keeper.go params.go querier.go

func NewQuerier Uses

func NewQuerier(k AccountKeeper) sdk.Querier

NewQuerier creates a querier for auth REST endpoints

type AccountKeeper Uses

type AccountKeeper struct {
    // contains filtered or unexported fields

AccountKeeper encodes/decodes accounts using the go-amino (binary) encoding/decoding library.

func NewAccountKeeper Uses

func NewAccountKeeper(
    cdc codec.Marshaler, key sdk.StoreKey, paramstore paramtypes.Subspace, proto func() types.AccountI,
    maccPerms map[string][]string,
) AccountKeeper

NewAccountKeeper returns a new sdk.AccountKeeper that uses go-amino to (binary) encode and decode concrete sdk.Accounts.

func (AccountKeeper) GetAccount Uses

func (ak AccountKeeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI

GetAccount implements sdk.AccountKeeper.

func (AccountKeeper) GetAllAccounts Uses

func (ak AccountKeeper) GetAllAccounts(ctx sdk.Context) (accounts []types.AccountI)

GetAllAccounts returns all accounts in the accountKeeper.

func (AccountKeeper) GetCodec Uses

func (ak AccountKeeper) GetCodec() codec.Marshaler

func (AccountKeeper) GetModuleAccount Uses

func (ak AccountKeeper) GetModuleAccount(ctx sdk.Context, moduleName string) types.ModuleAccountI

GetModuleAccount gets the module account from the auth account store, if the account does not exist in the AccountKeeper, then it is created.

func (AccountKeeper) GetModuleAccountAndPermissions Uses

func (ak AccountKeeper) GetModuleAccountAndPermissions(ctx sdk.Context, moduleName string) (types.ModuleAccountI, []string)

GetModuleAccountAndPermissions gets the module account from the auth account store and its registered permissions

func (AccountKeeper) GetModuleAddress Uses

func (ak AccountKeeper) GetModuleAddress(moduleName string) sdk.AccAddress

GetModuleAddress returns an address based on the module name

func (AccountKeeper) GetModuleAddressAndPermissions Uses

func (ak AccountKeeper) GetModuleAddressAndPermissions(moduleName string) (addr sdk.AccAddress, permissions []string)

GetModuleAddressAndPermissions returns an address and permissions based on the module name

func (AccountKeeper) GetNextAccountNumber Uses

func (ak AccountKeeper) GetNextAccountNumber(ctx sdk.Context) uint64

GetNextAccountNumber returns and increments the global account number counter. If the global account number is not set, it initializes it with value 0.

func (AccountKeeper) GetParams Uses

func (ak AccountKeeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams gets the auth module's parameters.

func (AccountKeeper) GetPubKey Uses

func (ak AccountKeeper) GetPubKey(ctx sdk.Context, addr sdk.AccAddress) (crypto.PubKey, error)

GetPubKey Returns the PubKey of the account at address

func (AccountKeeper) GetSequence Uses

func (ak AccountKeeper) GetSequence(ctx sdk.Context, addr sdk.AccAddress) (uint64, error)

GetSequence Returns the Sequence of the account at address

func (AccountKeeper) IterateAccounts Uses

func (ak AccountKeeper) IterateAccounts(ctx sdk.Context, cb func(account types.AccountI) (stop bool))

IterateAccounts iterates over all the stored accounts and performs a callback function

func (AccountKeeper) Logger Uses

func (ak AccountKeeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (AccountKeeper) MarshalAccount Uses

func (ak AccountKeeper) MarshalAccount(accountI types.AccountI) ([]byte, error)

MarshalEvidence marshals an Evidence interface. If the given type implements the Marshaler interface, it is treated as a Proto-defined message and serialized that way. Otherwise, it falls back on the internal Amino codec.

func (AccountKeeper) NewAccount Uses

func (ak AccountKeeper) NewAccount(ctx sdk.Context, acc types.AccountI) types.AccountI

NewAccount sets the next account number to a given account interface

func (AccountKeeper) NewAccountWithAddress Uses

func (ak AccountKeeper) NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) types.AccountI

NewAccountWithAddress implements sdk.AccountKeeper.

func (AccountKeeper) RemoveAccount Uses

func (ak AccountKeeper) RemoveAccount(ctx sdk.Context, acc types.AccountI)

RemoveAccount removes an account for the account mapper store. NOTE: this will cause supply invariant violation if called

func (AccountKeeper) SetAccount Uses

func (ak AccountKeeper) SetAccount(ctx sdk.Context, acc types.AccountI)

SetAccount implements sdk.AccountKeeper.

func (AccountKeeper) SetModuleAccount Uses

func (ak AccountKeeper) SetModuleAccount(ctx sdk.Context, macc types.ModuleAccountI)

SetModuleAccount sets the module account to the auth account store

func (AccountKeeper) SetParams Uses

func (ak AccountKeeper) SetParams(ctx sdk.Context, params types.Params)

SetParams sets the auth module's parameters.

func (AccountKeeper) UnmarshalAccount Uses

func (ak AccountKeeper) UnmarshalAccount(bz []byte) (types.AccountI, error)

UnmarshalEvidence returns an Evidence interface from raw encoded evidence bytes of a Proto-based Evidence type. An error is returned upon decoding failure.

func (AccountKeeper) UnmarshalAccountJSON Uses

func (ak AccountKeeper) UnmarshalAccountJSON(bz []byte) (types.AccountI, error)

UnmarshalAccountJSON returns an AccountI from JSON encoded bytes

func (AccountKeeper) ValidatePermissions Uses

func (ak AccountKeeper) ValidatePermissions(macc types.ModuleAccountI) error

ValidatePermissions validates that the module account has been granted permissions within its set of allowed permissions.

Package keeper imports 11 packages (graph) and is imported by 2 packages. Updated 2020-07-07. Refresh now. Tools for package owners.