MetaName
About
Introduction
To build a more comprehensive ecosystem, the MetaID-v2 protocol utilizes MetaName as its domain name system. Anyone can register their own domain name and namespace and use its features.
Spec
MetaName defines the domain name specification for MetaID-v2, with the agreed path being /metaname/{namespace}.
Register Name
Registering a new domain name follows the principle of First is first and is temporarily indexed on BTC. Anyone can easily register a MetaName on the MetaID-v2 protocol. According to the MetaID-v2 protocol, use operation as create and path as /metaname/{namespace} to declare any namespace, such as metaid/ord/sats/btc. For example, registering alice.metaid would look like this:
OP_FALSE
OP_IF
metaid
create
/metaname/metaid //namespace: metaid/ord/sats/btc
0
OP_0
Application/json
{
"name": "alice",
"rev": "",
"relay": "",
"metadata": ""
} // MetaName payload (example)
OP_ENDIFMetaName allows users to set rev, relay, and metadata parameters during registration:
{
"name": "alice",
"rev": "",
"relay": "",
"metadata": ""
}Key
Required?
Type
Expected
Description
name
Y
String
MNS name
The domain name set during registration. Namespace does not need to be added. See specific restrictions.
rev
N
String
address format
The address corresponding to domain resolution.
relay
N
String
The pointer corresponding to domain resolution.
metadata
N
String
Custom content, suggested to be within 200 characters.
⚠️ Domain Name Restrictions
Domain names cannot be duplicated and follow the principle of First is first.
The
operationmust becreatewhen registering a domain name.Any UTF-8 character is valid.
All domain names are automatically converted to lowercase.
Spaces, periods, and line breaks are not allowed in domain names.
Update Name
To update or modify a domain name, use operation as modify under the rules of MetaID-v2. The path must point to the corresponding MetaName's pinid, and only the rev, relay, and metadata parameters can be updated.
Note that
modifydoes not affect thename.The
namein the payload can be left blank when modifying.
OP_FALSE
OP_IF
metaid
modify
@{pinid}
0
OP_0
Application/json
{
"rev": "xxx",
"relay": "xxxxx",
"metadata": "xxxxxxxx"
}
OP_ENDIFExample
Registration
MetaName: alice.metaid
OP_FALSE
OP_IF
metaid
create
/metaname/metaid //metaid/ord/sats/btc
0
OP_0
Application/json
{
"name": "alice",
"rev" : "bc1puyjhe7h2crd86qnerjqwmhc55t9zzhacnj4h9ypmclwkgsd4h8eq6xk2ys",
"relay": "xxx",
"metadata": ""
}
OP_ENDIFUpdate
MetaName: alice.metaid
OP_FALSE
OP_IF
metaid
modify
@2e9b714d338c47cb4144d9f6986f510f83504ad4158297158b490406e825ff0c
0
OP_0
Application/json
{
"rev" : "bc1ppkvfwnw67q4w8pt86l7wr3jkngsyymqucrn6vxak7zpntawm6n6qe2n9ls",
"relay": "xxx",
"metadata": ""
}
OP_ENDIFLast updated