frostfs-contract/nns
Evgenii Stratonikov 60b81c4bf6
[#131] *: Reformat code
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-21 10:23:31 +03:00
..
config.yml [#114] nns: Add 'DeleteRecord' 2024-09-27 17:50:26 +03:00
doc.go [#102] nns: Support global domain 2024-08-16 16:38:54 +03:00
frostfsid.go [#119] nns: Integrate FrostfsID into NNS 2024-11-02 11:24:49 +03:00
namestate.go [#248] *: Fix integer types 2022-07-06 14:28:47 +03:00
nns_contract.go [#131] *: Reformat code 2024-11-21 10:23:31 +03:00
README.md [#119] nns/docs: Integrate FrostfsID into NNS 2024-11-02 11:25:09 +03:00
recordtype.go [#240] English Check 2022-04-26 23:22:06 +03:00

NNS

NNS - Neo Name Service is a service that allows manage a domain name as a digital asset (NFT). It has an interface similar to DNS but has significant differences in its internal structure.

Entities:

  • Domain
  • Record
  • Owner
  • Committee

Domain

Domain is string that satisfies the following requirements:

  • Length from 2 to 255 characters.
  • Root domain must start with a letter.
  • All other fragments must start and end with a letter or digit.

Domain has owner, a registration period, and may optionally have records.

A fee established by the committee is charged upon domain registration. After registration, the owner can manage this asset (add/delete records, transfer ownership to another owner) until the end of the domain registration period.

Record

A record is a pair of values <type, string>.

Supported record types:

Type Description
A Represents address record type
AAA Represents IPv6 address record type
TXT Represents text record type
CNAME Represents canonical name record type
SOA Represents start of authority record type

Owner

An owner is a wallet that has the right to manage this NFT (domain).

Committee

The committee makes new tokens (domains), sets, and charges a fee for issuance.

Globally Unique Domain Zone

For more information, see here.

NNS and Frostfsid

You can register a TLD domain without a committee signature using Frostfsid. To do this, create a new wallet

neo-go wallet init -w newwallet/wallet.json

Get wallet address:

neo-go wallet dump-keys -w newwallet/wallet.json
[subject-address]
[subject-key]

Create a subject in FrostfsID:

frostfs-adm morph frostfsid create-subject --subject-key="[subject-key]"

Grant permissions to the wallet:

frostfs-adm morph nns give-privilege --subject-address="[subject-address]"

Register domain:

neo-go contract invokefunction [NNS-hash] register   "subdomain.domain"  hash160:[subject-address]   "email@frostfs.info"   10000   1000   1000   1000 -- [subject-address]:Global