keepers

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2019 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryAliasInfo  = "alias-info"
	QueryParameters = "parameters"
)
View Source
const (
	GetAddressFromAlias = 1
	ListAliasOfAccount  = 2
)

Variables

View Source
var (
	AliasToAccountKey    = []byte{0x10}
	AliasToAccountKeyEnd = []byte{0x11}
	AccountToAliasKey    = []byte{0x12}
)

Functions

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

creates a querier for asset REST endpoints

Types

type AliasEntry

type AliasEntry struct {
	Alias     string         `json:"alias"`
	Addr      sdk.AccAddress `json:"addr"`
	AsDefault bool           `json:"is_default"`
}

type AliasKeeper

type AliasKeeper struct {
	// contains filtered or unexported fields
}

func NewAliasKeeper

func NewAliasKeeper(key sdk.StoreKey) *AliasKeeper

func (*AliasKeeper) AddAlias

func (keeper *AliasKeeper) AddAlias(ctx sdk.Context, alias string, addr sdk.AccAddress, asDefault bool, maxCount int) (bool, bool)

func (*AliasKeeper) GetAddressFromAlias

func (keeper *AliasKeeper) GetAddressFromAlias(ctx sdk.Context, alias string) ([]byte, bool)

func (*AliasKeeper) GetAliasListOfAccount

func (keeper *AliasKeeper) GetAliasListOfAccount(ctx sdk.Context, addr sdk.AccAddress) []string

func (*AliasKeeper) GetAllAlias

func (keeper *AliasKeeper) GetAllAlias(ctx sdk.Context) []AliasEntry

func (*AliasKeeper) RemoveAlias

func (keeper *AliasKeeper) RemoveAlias(ctx sdk.Context, alias string, addr sdk.AccAddress)

type Keeper

type Keeper struct {
	AliasKeeper *AliasKeeper
	BankKeeper  types.ExpectedBankxKeeper
	AssetKeeper types.ExpectedAssetStatusKeeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(key sdk.StoreKey,
	bankKeeper types.ExpectedBankxKeeper,
	assetKeeper types.ExpectedAssetStatusKeeper,
	paramstore params.Subspace) Keeper

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams gets the asset module's parameters.

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams sets the asset module's parameters.

type QueryAliasInfoParam

type QueryAliasInfoParam struct {
	Owner   sdk.AccAddress `json:"owner"`
	Alias   string         `json:"alias"`
	QueryOp int32          `json:"query_op"`
}

Jump to

Keyboard shortcuts

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