keeper

package
v0.37.1-0...-14cb8ee Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryResolve   = "resolve"
	QueryWhois     = "whois"
	QueryNames     = "names"
	QueryTransfers = "transfers"
	QueryTransfer  = "transfer"
)

query endpoints supported by the nameservice Querier

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

NewQuerier is the module level router for state queries

Types

type Keeper

type Keeper struct {
	CoinKeeper bank.Keeper
	// contains filtered or unexported fields
}

Keeper maintains the link to storage and exposes getter/setter methods for the various parts of the state machine

func NewKeeper

func NewKeeper(coinKeeper bank.Keeper, pKey sdk.StoreKey, storeKey sdk.StoreKey, cdc *codec.Codec) Keeper

NewKeeper creates new instances of the nameservice Keeper

func (Keeper) DeleteWhois

func (k Keeper) DeleteWhois(ctx sdk.Context, name string)

Deletes the entire Whois metadata struct for a name

func (Keeper) GetNamesIterator

func (k Keeper) GetNamesIterator(ctx sdk.Context) sdk.Iterator

Get an iterator over all names in which the keys are the names and the values are the whois

func (Keeper) GetOwner

func (k Keeper) GetOwner(ctx sdk.Context, name string) sdk.AccAddress

GetOwner - get the current owner of a name

func (Keeper) GetPrice

func (k Keeper) GetPrice(ctx sdk.Context, name string) sdk.Coins

GetPrice - gets the current price of a name

func (Keeper) GetTransfer

func (k Keeper) GetTransfer(ctx sdk.Context, name string) types.Transfer

~~~~~~~~~~~~~~~ added for PoP ~~~~~~~~~~~~~~~~~~~~~~ Gets the entire Whois metadata struct for a name

func (Keeper) GetWhois

func (k Keeper) GetWhois(ctx sdk.Context, name string) types.Whois

Gets the entire Whois metadata struct for a name

func (Keeper) HasOwner

func (k Keeper) HasOwner(ctx sdk.Context, name string) bool

HasOwner - returns whether or not the name already has an owner

func (Keeper) IsNamePresent

func (k Keeper) IsNamePresent(ctx sdk.Context, name string) bool

Check if the name is present in the store or not

func (Keeper) ResolveName

func (k Keeper) ResolveName(ctx sdk.Context, name string) string

ResolveName - returns the string that the name resolves to

func (Keeper) SetName

func (k Keeper) SetName(ctx sdk.Context, name string, value string)

SetName - sets the value string that a name resolves to

func (Keeper) SetOwner

func (k Keeper) SetOwner(ctx sdk.Context, name string, owner sdk.AccAddress)

SetOwner - sets the current owner of a name

func (Keeper) SetPrice

func (k Keeper) SetPrice(ctx sdk.Context, name string, price sdk.Coins)

SetPrice - sets the current price of a name

func (Keeper) SetTransfer

func (k Keeper) SetTransfer(ctx sdk.Context, transfer types.Transfer)

Sets the entire Whois metadata struct for a name

func (Keeper) SetWhois

func (k Keeper) SetWhois(ctx sdk.Context, name string, whois types.Whois)

Sets the entire Whois metadata struct for a name

Jump to

Keyboard shortcuts

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