Documentation ¶
Index ¶
- func HandleCreateRootNameProposal(ctx sdk.Context, k Keeper, p *types.CreateRootNameProposal) error
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- type Handler
- type Keeper
- func (keeper Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (keeper Keeper) GetAllowUnrestrictedNames(ctx sdk.Context) (enabled bool)
- func (keeper Keeper) GetMaxNameLevels(ctx sdk.Context) (max uint32)
- func (keeper Keeper) GetMaxSegmentLength(ctx sdk.Context) (max uint32)
- func (keeper Keeper) GetMinSegmentLength(ctx sdk.Context) (min uint32)
- func (keeper Keeper) GetParams(clientCtx sdk.Context) (params types.Params)
- func (keeper Keeper) GetRecordByName(ctx sdk.Context, name string) (record *types.NameRecord, err error)
- func (keeper Keeper) GetRecordsByAddress(ctx sdk.Context, address sdk.AccAddress) (types.NameRecords, error)
- func (keeper Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
- func (keeper Keeper) IterateRecords(ctx sdk.Context, prefix []byte, handle Handler) error
- func (keeper Keeper) Logger(ctx sdk.Context) log.Logger
- func (keeper Keeper) Normalize(ctx sdk.Context, name string) (string, error)
- func (keeper Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (keeper Keeper) Resolve(c context.Context, request *types.QueryResolveRequest) (*types.QueryResolveResponse, error)
- func (keeper Keeper) ResolvesTo(ctx sdk.Context, name string, addr sdk.AccAddress) bool
- func (keeper Keeper) ReverseLookup(c context.Context, request *types.QueryReverseLookupRequest) (*types.QueryReverseLookupResponse, error)
- func (keeper Keeper) SetParams(ctx sdk.Context, params types.Params)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleCreateRootNameProposal ¶
HandleCreateRootNameProposal is a handler for executing a passed create root name proposal
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the account MsgServer interface for the provided Keeper.
func NewQuerier ¶
func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
NewQuerier creates a new legacy amino query service
Types ¶
type Handler ¶
type Handler func(record types.NameRecord) error
Handler is a name record handler function for use with IterateRecords.
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper defines the name module Keeper
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryMarshaler, key sdk.StoreKey, paramSpace paramtypes.Subspace, authKeeper types.AccountKeeper, ) Keeper
NewKeeper returns a name keeper. It handles: - managing a hierarchy of names - enforcing permissions for name creation/deletion
CONTRACT: the parameter Subspace must have the param key table already initialized
func (Keeper) ExportGenesis ¶
func (keeper Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis exports the current keeper state of the name module.
func (Keeper) GetAllowUnrestrictedNames ¶
GetAllowUnrestrictedNames returns the current unrestricted names allowed parameter.
func (Keeper) GetMaxNameLevels ¶
GetMaxNameLevels returns the current maximum number of name segments allowed.
func (Keeper) GetMaxSegmentLength ¶
GetMaxSegmentLength returns the current maximum length allowed for a name segment.
func (Keeper) GetMinSegmentLength ¶
GetMinSegmentLength returns the current minimum allowed name segment length. rate.
func (Keeper) GetRecordByName ¶
func (keeper Keeper) GetRecordByName(ctx sdk.Context, name string) (record *types.NameRecord, err error)
GetRecordByName resolves a record by name.
func (Keeper) GetRecordsByAddress ¶
func (keeper Keeper) GetRecordsByAddress(ctx sdk.Context, address sdk.AccAddress) (types.NameRecords, error)
GetRecordsByAddress looks up all names bound to an address.
func (Keeper) InitGenesis ¶
func (keeper Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
InitGenesis creates the initial genesis state for the name module.
func (Keeper) IterateRecords ¶
IterateRecords iterates over all the stored name records and passes them to a callback function.
func (Keeper) Params ¶
func (keeper Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params queries params of distribution module
func (Keeper) Resolve ¶
func (keeper Keeper) Resolve(c context.Context, request *types.QueryResolveRequest) (*types.QueryResolveResponse, error)
Resolve returns the address a name resolves to or an error.
func (Keeper) ResolvesTo ¶
ResolvesTo to determines whether a name resolves to a given address.
func (Keeper) ReverseLookup ¶
func (keeper Keeper) ReverseLookup(c context.Context, request *types.QueryReverseLookupRequest) (*types.QueryReverseLookupResponse, error)
ReverseLookup gets all names bound to an address.