Documentation ¶
Index ¶
- Constants
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- func NewQueryServerImpl(keeper Keeper) types.QueryServer
- type DNSNameRecord
- type DNSTransferOffer
- type DNSTypeRecord
- type DomainAlreadyCreated
- type DomainDoesntExist
- type DomainNotOwned
- type Keeper
- func (k Keeper) Authorize(ctx sdk.Context, tokenID string, owner sdk.AccAddress) (types.BaseDomain, error)
- func (k Keeper) BlockedTLDs(ctx sdk.Context) (res []string)
- func (k Keeper) CheckAllowedForAddress(ctx types.Context, dnsName string, creatorAddress types.AccAddress) error
- func (k Keeper) CheckDomainBlocked(ctx types.Context, domain string) bool
- func (k Keeper) DomainExpirationHours(ctx sdk.Context) (res int64)
- func (k Keeper) DomainOwnerProlongationHours(ctx sdk.Context) (res int64)
- func (k Keeper) DomainPriceUDWS(ctx sdk.Context) (res uint64)
- func (k Keeper) EditDomain(ctx sdk.Context, tokenID, tokenData string, owner sdk.AccAddress) error
- func (k Keeper) GetByOwner(ctx sdk.Context, address sdk.AccAddress) types.Owner
- func (k Keeper) GetCollection(ctx sdk.Context, denomID string) (types.Collection, error)
- func (k Keeper) GetCollections(ctx sdk.Context) (cs []types.Collection)
- func (k Keeper) GetDenom(ctx sdk.Context, id string) (denom types.Denom, found bool)
- func (k Keeper) GetDenoms(ctx sdk.Context) (denoms []types.Denom)
- func (k Keeper) GetDomain(ctx sdk.Context, tokenID string) (nft exported.Domain, err error)
- func (k Keeper) GetDomains(ctx sdk.Context, denom string) (nfts []exported.Domain)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetTotalSupply(ctx sdk.Context, denomID string) uint64
- func (k Keeper) HasDenomID(ctx sdk.Context, id string) bool
- func (k Keeper) HasDomain(ctx sdk.Context, denomID, tokenID string) bool
- func (k Keeper) IssueDenom(ctx sdk.Context, id, name, schema, symbol string, creator sdk.AccAddress, ...) error
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) ProcessDomainsExpiration(ctx sdk.Context)
- func (k Keeper) RegisterDomain(ctx sdk.Context, domainName, tokenData string, owner sdk.AccAddress, ...) error
- func (k Keeper) RemoveDomain(ctx sdk.Context, tokenID string, owner sdk.AccAddress) error
- func (k Keeper) SetCollection(ctx sdk.Context, collection types.Collection) error
- func (k Keeper) SetDenom(ctx sdk.Context, denom types.Denom) error
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SubDomainPriceUDWS(ctx sdk.Context) (res uint64)
- func (k Keeper) TransferDomainOwner(ctx sdk.Context, tokenID string, cancelTransfer bool, price uint64, ...) error
- func (k Keeper) UpdateDenom(ctx sdk.Context, denom types.Denom) error
Constants ¶
const ( DNSDenomName = "domains" TimeFactor = time.Hour )
const (
DefaultDomainsCount = 10
)
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the NFT MsgServer interface for the provided Keeper.
func NewQuerier ¶
func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
NewQuerier is the module level router for state queries
func NewQueryServerImpl ¶
func NewQueryServerImpl(keeper Keeper) types.QueryServer
NewQueryServerImpl returns an implementation of the NFT QueryServer interface for the provided Keeper.
Types ¶
type DNSNameRecord ¶
type DNSNameRecord struct { Issued time.Time `json:"issued"` ValidTill time.Time `json:"valid_till"` TransferOffer *DNSTransferOffer `json:"transfer_offer"` SubDomainsOnSale bool `json:"sub_domains_sale"` SubDomainsSalePrice uint64 `json:"sub_domains_sale_price"` DomainProlongationPrice uint64 `json:"domain_prolongation_price"` // price to pay parent domain owner on prolongation Records []DNSTypeRecord `json:"records"` }
func ParseDomainData ¶
func ParseDomainData(data []byte) (DNSNameRecord, error)
type DNSTransferOffer ¶
type DNSTypeRecord ¶
type DomainAlreadyCreated ¶
type DomainAlreadyCreated struct {
// contains filtered or unexported fields
}
func (DomainAlreadyCreated) Error ¶
func (e DomainAlreadyCreated) Error() string
type DomainDoesntExist ¶
type DomainDoesntExist struct {
// contains filtered or unexported fields
}
func (DomainDoesntExist) Error ¶
func (e DomainDoesntExist) Error() string
type DomainNotOwned ¶
type DomainNotOwned struct {
// contains filtered or unexported fields
}
func (DomainNotOwned) Error ¶
func (e DomainNotOwned) Error() string
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine
func NewKeeper ¶
func NewKeeper(cdc codec.Codec, storeKey storetypes.StoreKey, bankKeeper keeper.Keeper, ps paramtypes.Subspace) Keeper
NewKeeper creates a new instance of the NFT Keeper
func (Keeper) Authorize ¶
func (k Keeper) Authorize(ctx sdk.Context, tokenID string, owner sdk.AccAddress) (types.BaseDomain, error)
Authorize checks if the sender is the owner of the given Domain Return the Domain if true, an error otherwise
func (Keeper) CheckAllowedForAddress ¶
func (Keeper) CheckDomainBlocked ¶
func (Keeper) DomainExpirationHours ¶
func (Keeper) DomainOwnerProlongationHours ¶
func (Keeper) EditDomain ¶
EditDomain updates an already existing NFT
func (Keeper) GetByOwner ¶
GetByOwner gets all the domains owned by an address
func (Keeper) GetCollection ¶
GetCollection returns the collection by the specified denom ID
func (Keeper) GetCollections ¶
func (k Keeper) GetCollections(ctx sdk.Context) (cs []types.Collection)
GetCollections returns all the collections
func (Keeper) GetDomains ¶
GetDomains returns all Domains by the specified denom ID
func (Keeper) GetTotalSupply ¶
GetDenomSupply returns the number of Domains by the specified denom ID
func (Keeper) HasDenomID ¶
HasDenom returns whether the specified denom ID exists
func (Keeper) IssueDenom ¶
func (k Keeper) IssueDenom(ctx sdk.Context, id, name, schema, symbol string, creator sdk.AccAddress, mintRestricted, updateRestricted bool, description, uri, uriHash, data string, ) error
IssueDenom issues a denom according to the given params
func (Keeper) ProcessDomainsExpiration ¶
func (Keeper) RegisterDomain ¶
func (k Keeper) RegisterDomain(ctx sdk.Context, domainName, tokenData string, owner sdk.AccAddress, recipient sdk.AccAddress) error
RegisterDomain mints an NFT and manages the NFT's existence within Collections and Owners
func (Keeper) RemoveDomain ¶
RemoveDomain deletes a specified NFT
func (Keeper) SetCollection ¶
SetCollection saves all Domai and returns an error if there already exists