Documentation ¶
Index ¶
- func NewQuerier(keeper AccountKeeper) sdk.Querier
- type AccAddress
- type AccountID
- type AccountKeeper
- func (ak AccountKeeper) AddAccountByAuth(ctx sdk.Context, auth chaintypes.AccAddress, acc string)
- func (ak AccountKeeper) DeleteAccountByAuth(ctx sdk.Context, auth chaintypes.AccAddress, acc string)
- func (ak AccountKeeper) EnsureAccount(ctx sdk.Context, id AccountID) error
- func (ak AccountKeeper) EnsureAuthInited(ctx sdk.Context, auth AccAddress)
- func (ak AccountKeeper) GetAccount(ctx sdk.Context, id AccountID) exported.Account
- func (ak AccountKeeper) GetAccountByName(ctx sdk.Context, name Name) exported.Account
- func (ak AccountKeeper) GetAccountsByAuth(ctx sdk.Context, auth chaintypes.AccAddress) []string
- func (ak AccountKeeper) GetAuth(ctx sdk.Context, account Name) (sdk.AccAddress, error)
- func (ak AccountKeeper) GetAuthSequence(ctx sdk.Context, auth AccAddress) (uint64, uint64, error)
- func (ak AccountKeeper) GetNextAccountNumber(ctx sdk.Context) uint64
- func (ak AccountKeeper) IncAuthSequence(ctx sdk.Context, auth AccAddress)
- func (ak AccountKeeper) InitAuthData(ctx sdk.Context, auth AccAddress)
- func (ak AccountKeeper) IsAccountExist(ctx sdk.Context, id AccountID) bool
- func (ak AccountKeeper) IterateAccounts(ctx sdk.Context, cb func(account exported.Account) (stop bool))
- func (ak AccountKeeper) Logger(ctx sdk.Context) log.Logger
- func (ak AccountKeeper) NewAccount(ctx sdk.Context, acc exported.Account) exported.Account
- func (ak AccountKeeper) NewAccountByName(ctx sdk.Context, n Name) exported.Account
- func (ak AccountKeeper) SetAccount(ctx sdk.Context, acc exported.Account)
- func (ak AccountKeeper) SetPubKey(ctx sdk.Context, auth AccAddress, pubKey crypto.PubKey)
- type Name
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶
func NewQuerier(keeper AccountKeeper) sdk.Querier
NewQuerier creates a querier for auth REST endpoints
Types ¶
type AccAddress ¶
type AccAddress = chainTypes.AccAddress
type AccountID ¶
type AccountID = chainTypes.AccountID
type AccountKeeper ¶
type AccountKeeper struct {
// contains filtered or unexported fields
}
AccountKeeper keeper for account module
func NewAccountKeeper ¶
func NewAccountKeeper(cdc *codec.Codec, key sdk.StoreKey) AccountKeeper
NewAccountKeeper new account keeper
func (AccountKeeper) AddAccountByAuth ¶
func (ak AccountKeeper) AddAccountByAuth(ctx sdk.Context, auth chaintypes.AccAddress, acc string)
func (AccountKeeper) DeleteAccountByAuth ¶
func (ak AccountKeeper) DeleteAccountByAuth(ctx sdk.Context, auth chaintypes.AccAddress, acc string)
func (AccountKeeper) EnsureAccount ¶
func (ak AccountKeeper) EnsureAccount(ctx sdk.Context, id AccountID) error
EnsureAccount ensure account is exist, if not create a account with init data
func (AccountKeeper) EnsureAuthInited ¶
func (ak AccountKeeper) EnsureAuthInited(ctx sdk.Context, auth AccAddress)
func (AccountKeeper) GetAccount ¶
GetAccount get account from keeper
func (AccountKeeper) GetAccountByName ¶
GetAccount get account from keeper
func (AccountKeeper) GetAccountsByAuth ¶
func (ak AccountKeeper) GetAccountsByAuth(ctx sdk.Context, auth chaintypes.AccAddress) []string
func (AccountKeeper) GetAuth ¶
func (ak AccountKeeper) GetAuth(ctx sdk.Context, account Name) (sdk.AccAddress, error)
GetAuth get auth for a account
func (AccountKeeper) GetAuthSequence ¶
func (ak AccountKeeper) GetAuthSequence(ctx sdk.Context, auth AccAddress) (uint64, uint64, error)
GetAuthSequence
func (AccountKeeper) GetNextAccountNumber ¶
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) IncAuthSequence ¶
func (ak AccountKeeper) IncAuthSequence(ctx sdk.Context, auth AccAddress)
IncAuthSequence
func (AccountKeeper) InitAuthData ¶
func (ak AccountKeeper) InitAuthData(ctx sdk.Context, auth AccAddress)
InitAuthData
func (AccountKeeper) IsAccountExist ¶
func (ak AccountKeeper) IsAccountExist(ctx sdk.Context, id AccountID) bool
func (AccountKeeper) IterateAccounts ¶
func (ak AccountKeeper) IterateAccounts(ctx sdk.Context, cb func(account exported.Account) (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) NewAccount ¶
NewAccount sets the next account number to a given account interface
func (AccountKeeper) NewAccountByName ¶
NewAccountByName create a account struct by name.
func (AccountKeeper) SetAccount ¶
func (ak AccountKeeper) SetAccount(ctx sdk.Context, acc exported.Account)
SetAccount implements sdk.AccountKeeper.
func (AccountKeeper) SetPubKey ¶
func (ak AccountKeeper) SetPubKey(ctx sdk.Context, auth AccAddress, pubKey crypto.PubKey)
SetPubKey
type Name ¶
type Name = chainTypes.Name