Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) CreateRootName(ctx sdk.Context, name, owner string, restricted bool) error
- func (k Keeper) DeleteInvalidAddressIndexEntries(ctx sdk.Context)
- func (k Keeper) DeleteRecord(ctx sdk.Context, name string) error
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetAllowUnrestrictedNames(ctx sdk.Context) bool
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetMaxNameLevels(ctx sdk.Context) uint32
- func (k Keeper) GetMaxSegmentLength(ctx sdk.Context) uint32
- func (k Keeper) GetMinSegmentLength(ctx sdk.Context) uint32
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetRecordByName(ctx sdk.Context, name string) (record *types.NameRecord, err error)
- func (k Keeper) GetRecordsByAddress(ctx sdk.Context, address sdk.AccAddress) (types.NameRecords, error)
- func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
- func (k Keeper) IsAuthority(addr string) bool
- func (k Keeper) IterateRecords(ctx sdk.Context, prefix []byte, handle func(record types.NameRecord) error) error
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) NameExists(ctx sdk.Context, name string) bool
- func (k Keeper) Normalize(ctx sdk.Context, name string) (string, error)
- func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) Resolve(c context.Context, request *types.QueryResolveRequest) (*types.QueryResolveResponse, error)
- func (k Keeper) ResolvesTo(ctx sdk.Context, name string, addr sdk.AccAddress) bool
- func (k Keeper) ReverseLookup(c context.Context, request *types.QueryReverseLookupRequest) (*types.QueryReverseLookupResponse, error)
- func (k *Keeper) SetAttributeKeeper(ak types.AttributeKeeper)
- func (k Keeper) SetNameRecord(ctx sdk.Context, name string, addr sdk.AccAddress, restrict bool) error
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) UpdateNameRecord(ctx sdk.Context, name string, addr sdk.AccAddress, restrict bool) error
- func (k Keeper) ValidateAuthority(addr string) error
- type Migrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the name MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper defines the name module Keeper
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, ) 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) CreateRootName ¶ added in v1.19.0
func (Keeper) DeleteInvalidAddressIndexEntries ¶ added in v1.16.0
DeleteInvalidAddressIndexEntries is only for the rust upgrade. It goes over all the address -> name entries and deletes any that are no longer accurate.
func (Keeper) DeleteRecord ¶ added in v1.0.0
DeleteRecord removes a name record from the kvstore.
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis exports the current keeper state of the name module.
func (Keeper) GetAllowUnrestrictedNames ¶
GetAllowUnrestrictedNames returns whether unrestricted names are allowed.
func (Keeper) GetAuthority ¶ added in v1.14.0
GetAuthority is signer of the proposal
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.
func (Keeper) GetParams ¶
GetParams returns the total set of name parameters with fallback to default values.
func (Keeper) GetRecordByName ¶
GetRecordByName resolves a record by name.
func (Keeper) GetRecordsByAddress ¶
func (k Keeper) GetRecordsByAddress(ctx sdk.Context, address sdk.AccAddress) (types.NameRecords, error)
GetRecordsByAddress looks up all names bound to an address.
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
InitGenesis creates the initial genesis state for the name module.
func (Keeper) IsAuthority ¶ added in v1.19.0
IsAuthority returns true if the provided address bech32 string is the authority address.
func (Keeper) IterateRecords ¶
func (k Keeper) IterateRecords(ctx sdk.Context, prefix []byte, handle func(record types.NameRecord) error) error
IterateRecords iterates over all the stored name records and passes them to a callback function.
func (Keeper) NameExists ¶ added in v1.0.0
NameExists returns true if store contains a record for the given name.
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params queries params of distribution module
func (Keeper) Resolve ¶
func (k 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 (k Keeper) ReverseLookup(c context.Context, request *types.QueryReverseLookupRequest) (*types.QueryReverseLookupResponse, error)
ReverseLookup gets all names bound to an address.
func (*Keeper) SetAttributeKeeper ¶ added in v1.15.0
func (k *Keeper) SetAttributeKeeper(ak types.AttributeKeeper)
SetAttributeKeeper sets the attribute keeper
func (Keeper) SetNameRecord ¶ added in v1.0.0
func (k Keeper) SetNameRecord(ctx sdk.Context, name string, addr sdk.AccAddress, restrict bool) error
SetNameRecord binds a name to an address.
func (Keeper) UpdateNameRecord ¶ added in v1.14.0
func (k Keeper) UpdateNameRecord(ctx sdk.Context, name string, addr sdk.AccAddress, restrict bool) error
UpdateNameRecord updates the owner address and restricted flag on a name.
func (Keeper) ValidateAuthority ¶ added in v1.19.0
ValidateAuthority returns an error if the provided address is not the authority.