keeper

package
v0.0.0-...-8551cdf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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

func (ak AccountKeeper) GetAccount(ctx sdk.Context, id AccountID) exported.Account

GetAccount get account from keeper

func (AccountKeeper) GetAccountByName

func (ak AccountKeeper) GetAccountByName(ctx sdk.Context, name Name) exported.Account

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

func (ak AccountKeeper) NewAccount(ctx sdk.Context, acc exported.Account) exported.Account

NewAccount sets the next account number to a given account interface

func (AccountKeeper) NewAccountByName

func (ak AccountKeeper) NewAccountByName(ctx sdk.Context, n Name) exported.Account

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL