frostfs-contract/nns
Alexander Chuprov 0d76a79d5b
All checks were successful
DCO action / DCO (pull_request) Successful in 1m19s
Code generation / Generate wrappers (pull_request) Successful in 1m22s
Tests / Tests (pull_request) Successful in 1m45s
[#119] nns/docs: Integrate FrostfsID into NNS
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2024-10-30 15:28:05 +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-10-30 15:27:36 +03:00
namestate.go [#248] *: Fix integer types 2022-07-06 14:28:47 +03:00
nns_contract.go [#119] nns: Integrate FrostfsID into NNS 2024-10-30 15:27:36 +03:00
README.md [#119] nns/docs: Integrate FrostfsID into NNS 2024-10-30 15:28:05 +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