Documentation ¶
Index ¶
- func NewQuerier(k AccountKeeper) sdk.Querier
- type AccountKeeper
- func (ak AccountKeeper) AddBalance(ctx sdk.Context, addr sdk.AccAddress, amount sdk.Coins) (sdk.Coins, error)
- func (k AccountKeeper) ClearBalances(ctx sdk.Context, addr sdk.AccAddress)
- func (ak AccountKeeper) GetAccount(ctx types.Context, addr types.AccAddress) exported.Account
- func (ak AccountKeeper) GetAllAccounts(ctx types.Context) (accounts []exported.Account)
- func (am AccountKeeper) GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
- func (ak AccountKeeper) GetBalance(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
- func (ak AccountKeeper) GetNextAccountNumber(ctx types.Context) uint64
- func (k AccountKeeper) IterateAccountBalances(ctx sdk.Context, addr sdk.AccAddress, cb func(sdk.Coin) bool)
- func (ak AccountKeeper) IterateAccounts(ctx types.Context, cb func(account exported.Account) (stop bool))
- func (ak AccountKeeper) NewAccount(ctx types.Context, acc exported.Account) exported.Account
- func (ak AccountKeeper) NewAccountWithAddress(ctx types.Context, addr types.AccAddress) exported.Account
- func (ak AccountKeeper) RemoveAccount(ctx types.Context, acc exported.Account)
- func (ak AccountKeeper) SetAccount(ctx types.Context, acc exported.Account)
- func (k AccountKeeper) SetBalances(ctx sdk.Context, addr sdk.AccAddress, balances sdk.Coins) error
- func (ak AccountKeeper) SetCoin(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) error
- func (ak AccountKeeper) SubBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, error)
- func (ak AccountKeeper) Transfer(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, ...) error
- type QueryAccountParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶
func NewQuerier(k AccountKeeper) sdk.Querier
Types ¶
type AccountKeeper ¶
type AccountKeeper struct {
// contains filtered or unexported fields
}
func NewAccountKeeper ¶
func (AccountKeeper) AddBalance ¶
func (ak AccountKeeper) AddBalance(ctx sdk.Context, addr sdk.AccAddress, amount sdk.Coins) (sdk.Coins, error)
func (AccountKeeper) ClearBalances ¶
func (k AccountKeeper) ClearBalances(ctx sdk.Context, addr sdk.AccAddress)
func (AccountKeeper) GetAccount ¶
func (ak AccountKeeper) GetAccount(ctx types.Context, addr types.AccAddress) exported.Account
func (AccountKeeper) GetAllAccounts ¶
func (ak AccountKeeper) GetAllAccounts(ctx types.Context) (accounts []exported.Account)
GetAllAccounts returns all accounts in the accountKeeper.
func (AccountKeeper) GetAllBalances ¶
func (am AccountKeeper) GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
func (AccountKeeper) GetBalance ¶
func (ak AccountKeeper) GetBalance(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
func (AccountKeeper) GetNextAccountNumber ¶
func (ak AccountKeeper) GetNextAccountNumber(ctx types.Context) uint64
func (AccountKeeper) IterateAccountBalances ¶
func (k AccountKeeper) IterateAccountBalances(ctx sdk.Context, addr sdk.AccAddress, cb func(sdk.Coin) bool)
IterateAccountBalances iterates over the balances of a single account and provides the token balance to a callback. If true is returned from the callback, iteration is halted.
func (AccountKeeper) IterateAccounts ¶
func (ak AccountKeeper) IterateAccounts(ctx types.Context, cb func(account exported.Account) (stop bool))
IterateAccounts iterates over all the stored accounts and performs a callback function
func (AccountKeeper) NewAccount ¶
func (AccountKeeper) NewAccountWithAddress ¶
func (ak AccountKeeper) NewAccountWithAddress(ctx types.Context, addr types.AccAddress) exported.Account
利用一个地址 新建一个账户
func (AccountKeeper) RemoveAccount ¶
func (ak AccountKeeper) RemoveAccount(ctx types.Context, acc exported.Account)
func (AccountKeeper) SetAccount ¶
func (ak AccountKeeper) SetAccount(ctx types.Context, acc exported.Account)
func (AccountKeeper) SetBalances ¶
func (k AccountKeeper) SetBalances(ctx sdk.Context, addr sdk.AccAddress, balances sdk.Coins) error
func (AccountKeeper) SetCoin ¶
func (ak AccountKeeper) SetCoin(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) error
func (AccountKeeper) SubBalance ¶
func (ak AccountKeeper) SubBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, error)
func (AccountKeeper) Transfer ¶
func (ak AccountKeeper) Transfer(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, coin sdk.Coins) error
type QueryAccountParams ¶
type QueryAccountParams struct { AccountAddress sdk.AccAddress `json:"account_address"` Height int64 `json:"height"` }
func NewQueryAccountParams ¶
func NewQueryAccountParams(accountAddress sdk.AccAddress, h int64) QueryAccountParams
Click to show internal directories.
Click to hide internal directories.