account

package
v0.6.11 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: Apache-2.0 Imports: 15 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EndBlocker added in v0.6.0

func EndBlocker(ctx sdk.Context, req abci.RequestEndBlock, am AccountKeeper)

EndBlocker - called every end blocker, udpate new round

func NewHandler

func NewHandler(am AccountKeeper) sdk.Handler

NewHandler - Handle all "account" type messages.

func NewQuerier added in v0.2.0

func NewQuerier(am AccountKeeper) sdk.Querier

creates a querier for account REST endpoints

Types

type AccountKeeper added in v0.3.0

type AccountKeeper interface {
	InitGenesis(ctx sdk.Context, total types.Coin, pools []model.Pool)
	// core bank APIs.
	MoveCoin(ctx sdk.Context, sender, receiver types.AccOrAddr, coin types.Coin) sdk.Error
	MoveFromPool(
		ctx sdk.Context, poolName types.PoolName, dest types.AccOrAddr, amount types.Coin) sdk.Error
	MoveToPool(
		ctx sdk.Context, poolName types.PoolName, from types.AccOrAddr, amount types.Coin) sdk.Error
	MoveBetweenPools(ctx sdk.Context, from, to types.PoolName, amount types.Coin) sdk.Error
	Mint(ctx sdk.Context) sdk.Error

	DoesAccountExist(ctx sdk.Context, username types.AccountKey) bool
	GenesisAccount(ctx sdk.Context, username types.AccountKey,
		signingKey, transactionKey crypto.PubKey) sdk.Error
	RegisterAccount(
		ctx sdk.Context, referrer types.AccOrAddr, registerFee types.Coin,
		username types.AccountKey, signingKey, transactionKey crypto.PubKey) sdk.Error
	UpdateJSONMeta(ctx sdk.Context, username types.AccountKey, JSONMeta string) sdk.Error
	GetPool(ctx sdk.Context, poolName types.PoolName) (types.Coin, sdk.Error)
	GetTransactionKey(ctx sdk.Context, username types.AccountKey) (crypto.PubKey, sdk.Error)
	GetSigningKey(ctx sdk.Context, username types.AccountKey) (crypto.PubKey, sdk.Error)
	GetSavingFromUsername(ctx sdk.Context, username types.AccountKey) (types.Coin, sdk.Error)
	GetSequence(ctx sdk.Context, address sdk.Address) (uint64, sdk.Error)
	GetAddress(ctx sdk.Context, username types.AccountKey) (sdk.AccAddress, sdk.Error)
	GetFrozenMoneyList(ctx sdk.Context, addr sdk.Address) ([]model.FrozenMoney, sdk.Error)
	GetSupply(ctx sdk.Context) model.Supply
	IncreaseSequenceByOne(ctx sdk.Context, address sdk.Address) sdk.Error
	AddFrozenMoney(
		ctx sdk.Context, username types.AccountKey, amount types.Coin, start, interval, times int64) sdk.Error
	CheckSigningPubKeyOwner(
		ctx sdk.Context, me types.AccountKey, signKey crypto.PubKey) (types.AccountKey, sdk.Error)
	CheckSigningPubKeyOwnerByAddress(
		ctx sdk.Context, addr sdk.AccAddress, signkey crypto.PubKey, isPaid bool) sdk.Error
	RecoverAccount(
		ctx sdk.Context, username types.AccountKey, newTransactionPubKey, newSigningKey crypto.PubKey) sdk.Error

	// getter
	GetInfo(ctx sdk.Context, username types.AccountKey) (*model.AccountInfo, sdk.Error)
	GetBank(ctx sdk.Context, username types.AccountKey) (*model.AccountBank, sdk.Error)
	GetBankByAddress(ctx sdk.Context, addr sdk.AccAddress) (*model.AccountBank, sdk.Error)
	GetMeta(ctx sdk.Context, username types.AccountKey) (*model.AccountMeta, sdk.Error)

	// import export
	ExportToFile(ctx sdk.Context, cdc *codec.Codec, filepath string) error
	ImportFromFile(ctx sdk.Context, cdc *codec.Codec, filepath string) error
}

Directories

Path Synopsis
client
cli

Jump to

Keyboard shortcuts

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