Documentation
¶
Index ¶
- func NewMsgServerImpl(keeper AccountKeeper) types.MsgServer
- func NewQuerier(k AccountKeeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- type AccountKeeper
- func (ak AccountKeeper) Account(c context.Context, req *types.QueryAccountRequest) (*types.QueryAccountResponse, error)
- func (ak AccountKeeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
- func (ak AccountKeeper) GetAllAccounts(ctx sdk.Context) (accounts []types.AccountI)
- func (ak AccountKeeper) GetCodec() codec.BinaryMarshaler
- func (ak AccountKeeper) GetModuleAccount(ctx sdk.Context, moduleName string) types.ModuleAccountI
- func (ak AccountKeeper) GetModuleAccountAndPermissions(ctx sdk.Context, moduleName string) (types.ModuleAccountI, []string)
- func (ak AccountKeeper) GetModuleAddress(moduleName string) sdk.AccAddress
- func (ak AccountKeeper) GetModuleAddressAndPermissions(moduleName string) (addr sdk.AccAddress, permissions []string)
- func (ak AccountKeeper) GetParams(ctx sdk.Context) (params types.Params)
- func (ak AccountKeeper) GetPubKey(ctx sdk.Context, addr sdk.AccAddress) (cryptotypes.PubKey, error)
- func (ak AccountKeeper) GetSequence(ctx sdk.Context, addr sdk.AccAddress) (uint64, error)
- func (ak AccountKeeper) IterateAccounts(ctx sdk.Context, cb func(account types.AccountI) (stop bool))
- func (ak AccountKeeper) Logger(ctx sdk.Context) log.Logger
- func (ak AccountKeeper) MarshalAccount(accountI types.AccountI) ([]byte, error)
- func (ak AccountKeeper) NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
- func (ak AccountKeeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (ak AccountKeeper) RemoveAccount(ctx sdk.Context, acc types.AccountI)
- func (ak AccountKeeper) SetAccount(ctx sdk.Context, acc types.AccountI)
- func (ak AccountKeeper) SetModuleAccount(ctx sdk.Context, macc types.ModuleAccountI)
- func (ak AccountKeeper) SetParams(ctx sdk.Context, params types.Params)
- func (ak AccountKeeper) UnmarshalAccount(bz []byte) (types.AccountI, error)
- func (ak AccountKeeper) ValidatePermissions(macc types.ModuleAccountI) error
- type AccountKeeperI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶ added in v0.43.0
func NewMsgServerImpl(keeper AccountKeeper) types.MsgServer
NewMsgServerImpl returns an implementation of the auth MsgServer interface for the provided Keeper.
func NewQuerier ¶
func NewQuerier(k AccountKeeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
NewQuerier creates a querier for auth REST endpoints
Types ¶
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.BinaryMarshaler, key sdk.StoreKey, paramstore *paramtypes.Subspace, proto func() types.AccountI, maccPerms map[string][]string, ) AccountKeeper
NewAccountKeeper returns a new AccountKeeperI that uses go-amino to (binary) encode and decode concrete sdk.Accounts.
func (AccountKeeper) Account ¶ added in v0.43.0
func (ak AccountKeeper) Account(c context.Context, req *types.QueryAccountRequest) (*types.QueryAccountResponse, error)
Account returns account details based on address
func (AccountKeeper) GetAccount ¶
func (ak AccountKeeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
GetAccount implements AccountKeeperI.
func (AccountKeeper) GetAllAccounts ¶
func (ak AccountKeeper) GetAllAccounts(ctx sdk.Context) (accounts []types.AccountI)
GetAllAccounts returns all accounts in the accountKeeper.
func (AccountKeeper) GetCodec ¶ added in v0.43.0
func (ak AccountKeeper) GetCodec() codec.BinaryMarshaler
GetCodec return codec.Marshaler object used by the keeper
func (AccountKeeper) GetModuleAccount ¶ added in v0.43.0
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 ¶ added in v0.43.0
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 ¶ added in v0.43.0
func (ak AccountKeeper) GetModuleAddress(moduleName string) sdk.AccAddress
GetModuleAddress returns an address based on the module name
func (AccountKeeper) GetModuleAddressAndPermissions ¶ added in v0.43.0
func (ak AccountKeeper) GetModuleAddressAndPermissions(moduleName string) (addr sdk.AccAddress, permissions []string)
GetModuleAddressAndPermissions returns an address and permissions based on the module name
func (AccountKeeper) GetParams ¶
func (ak AccountKeeper) GetParams(ctx sdk.Context) (params types.Params)
GetParams gets the auth module's parameters.
func (AccountKeeper) GetPubKey ¶
func (ak AccountKeeper) GetPubKey(ctx sdk.Context, addr sdk.AccAddress) (cryptotypes.PubKey, error)
GetPubKey Returns the PubKey of the account at address
func (AccountKeeper) GetSequence ¶
func (ak AccountKeeper) GetSequence(ctx sdk.Context, addr sdk.AccAddress) (uint64, error)
GetSequence Returns the Sequence of the account at address
func (AccountKeeper) IterateAccounts ¶
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 ¶
func (ak AccountKeeper) Logger(ctx sdk.Context) log.Logger
Logger returns a module-specific logger.
func (AccountKeeper) MarshalAccount ¶ added in v0.43.0
func (ak AccountKeeper) MarshalAccount(accountI types.AccountI) ([]byte, error)
MarshalAccount protobuf serializes an Account interface
func (AccountKeeper) NewAccountWithAddress ¶
func (ak AccountKeeper) NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
NewAccountWithAddress implements AccountKeeperI.
func (AccountKeeper) Params ¶ added in v0.43.0
func (ak AccountKeeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params returns parameters of auth module
func (AccountKeeper) RemoveAccount ¶
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 ¶
func (ak AccountKeeper) SetAccount(ctx sdk.Context, acc types.AccountI)
SetAccount implements AccountKeeperI.
func (AccountKeeper) SetModuleAccount ¶ added in v0.43.0
func (ak AccountKeeper) SetModuleAccount(ctx sdk.Context, macc types.ModuleAccountI)
SetModuleAccount sets the module account to the auth account store
func (AccountKeeper) SetParams ¶
func (ak AccountKeeper) SetParams(ctx sdk.Context, params types.Params)
SetParams sets the auth module's parameters.
func (AccountKeeper) UnmarshalAccount ¶ added in v0.43.0
func (ak AccountKeeper) UnmarshalAccount(bz []byte) (types.AccountI, error)
UnmarshalAccount returns an Account interface from raw encoded account bytes of a Proto-based Account type
func (AccountKeeper) ValidatePermissions ¶ added in v0.43.0
func (ak AccountKeeper) ValidatePermissions(macc types.ModuleAccountI) error
ValidatePermissions validates that the module account has been granted permissions within its set of allowed permissions.
type AccountKeeperI ¶ added in v0.43.0
type AccountKeeperI interface {
// Return a new account with the specified address. Does not save the new account to the store.
NewAccountWithAddress(sdk.Context, sdk.AccAddress) types.AccountI
// Retrieve an account from the store.
GetAccount(sdk.Context, sdk.AccAddress) types.AccountI
// Set an account in the store.
SetAccount(sdk.Context, types.AccountI)
// Remove an account from the store.
RemoveAccount(sdk.Context, types.AccountI)
// Iterate over all accounts, calling the provided function. Stop iteraiton when it returns false.
IterateAccounts(sdk.Context, func(types.AccountI) bool)
// Fetch the public key of an account at a specified address
GetPubKey(sdk.Context, sdk.AccAddress) (cryptotypes.PubKey, error)
// Fetch the sequence of an account at a specified address.
GetSequence(sdk.Context, sdk.AccAddress) (uint64, error)
}
AccountKeeperI is the interface contract that x/auth's keeper implements.