Documentation ¶
Overview ¶
Package nns contains non-divisible non-fungible NEP11-compatible token implementation. This token is a compatible analogue of C# Neo Name Service token and is aimed to serve as a domain name service for Neo smart-contracts, thus it's NeoNameService. This token can be minted with new domain name registration, the domain name itself is your NFT. Corresponding domain root must be added by the committee before new domain name can be registered.
Index ¶
- func AddRoot(root string)
- func BalanceOf(owner interop.Hash160) int
- func Decimals() int
- func DeleteRecord(name string, typ RecordType)
- func GetPrice() int
- func GetRecord(name string, typ RecordType) string
- func IsAvailable(name string) bool
- func OwnerOf(tokenID []byte) interop.Hash160
- func Properties(tokenID []byte) map[string]interface{}
- func Register(name string, owner interop.Hash160) bool
- func Renew(name string) int
- func Resolve(name string, typ RecordType) string
- func Roots() iterator.Iterator
- func SetAdmin(name string, admin interop.Hash160)
- func SetPrice(price int)
- func SetRecord(name string, typ RecordType, data string)
- func Symbol() string
- func Tokens() iterator.Iterator
- func TokensOf(owner interop.Hash160) iterator.Iterator
- func TotalSupply() int
- func Transfer(to interop.Hash160, tokenID []byte, data interface{}) bool
- func Update(nef []byte, manifest string)
- type NameState
- type RecordType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteRecord ¶
func DeleteRecord(name string, typ RecordType)
DeleteRecord removes domain record with the specified type.
func GetRecord ¶
func GetRecord(name string, typ RecordType) string
GetRecord returns domain record of the specified type if it exists or an empty string if not.
func IsAvailable ¶
IsAvailable checks whether provided domain name is available.
func Properties ¶
Properties returns domain name and expiration date of the specified domain.
func Resolve ¶
func Resolve(name string, typ RecordType) string
Resolve resolves given name (not more then three redirects are allowed).
func SetRecord ¶
func SetRecord(name string, typ RecordType, data string)
SetRecord adds new record of the specified type to the provided domain.
func TotalSupply ¶
func TotalSupply() int
TotalSupply returns overall number of domains minted by the NeoNameService contract.
Types ¶
type RecordType ¶
type RecordType byte
RecordType is domain name service record types.
const ( // A represents address record type. A RecordType = 1 // CNAME represents canonical name record type. CNAME RecordType = 5 // TXT represents text record type. TXT RecordType = 16 )
Record types defined in [RFC 1035](https://tools.ietf.org/html/rfc1035)
const ( // AAAA represents IPv6 address record type. AAAA RecordType = 28 )
Record types defined in [RFC 3596](https://tools.ietf.org/html/rfc3596)