Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 4068b77

Browse files
committed
Add name service to sidebar
1 parent 512497a commit 4068b77

File tree

2 files changed

+47
-12
lines changed

2 files changed

+47
-12
lines changed

docs/sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module.exports = {
88
"token-lending",
99
"associated-token-account",
1010
"memo",
11+
"name-service",
1112
"shared-memory",
1213
"stake-pool",
1314
"feature-proposal",

docs/src/name-service.md

Lines changed: 46 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,57 @@
1-
# SPL Name Service
1+
---
2+
title: Name Service
3+
---
24

3-
A spl program for issuing and managing ownership of: domain names, Solana Pubkeys, URLs, twitter handles, ipfs cid's etc..
5+
A SPL program for issuing and managing ownership of: domain names, Solana Pubkeys, URLs, twitter handles, ipfs cid's etc..
6+
7+
This program could be used for dns, pubkey etc lookups via a browser extension
8+
for example, the goal is to create an easy way to identify Solana public keys
9+
with various links.
410

5-
This program could be used for dns, pubkey etc lookups via a browser extension for example, the goal is to create an easy way to identify Solana public keys with various links.
611
Broader use cases are also imaginable.
712

8-
Key points:
13+
Key points:
914
- A Name is a string that maps to a record (program derived account) which can hold data.
10-
- Each name is of a certain class and has a certain owner, both are identified by their pubkeys. The class of a name needs to sign the issuance of it.
11-
- A name can have a parent name that is identified by the address of its record. The owner of the parent name (when it exists) needs to sign the issuance of the child name.
12-
- The data of a name registry is controlled byb the class keypair or, when it is set to `Pubkey::default()`, by the name owner keypair.
15+
- Each name is of a certain class and has a certain owner, both are identified
16+
by their pubkeys. The class of a name needs to sign the issuance of it.
17+
- A name can have a parent name that is identified by the address of its record.
18+
The owner of the parent name (when it exists) needs to sign the issuance of
19+
the child name.
20+
- The data of a name registry is controlled byb the class keypair or, when it is
21+
set to `Pubkey::default()`, by the name owner keypair.
1322
- Only the owner can delete a name registry.
1423

1524

1625
Remarks and use cases:
17-
- Domain name declarations: One could arbitrarly set-up a class that we can call Top-Level-Domain names. Names in this class can only be issued with the permission of the class keypair, ie the administrator, who can enforce that TLD names are of the type `".something"`. From then on one could create and own the TLD `".sol"` and create a class of ".sol" sub-domains, administrating the issuance of the `"something.sol"` sub-domains that way (by setting tha parent name to the address of the `".sol"` registry).\
18-
An off-chain browser extension could then, similarly to DNS, parse the user SPL name service URL input and descend the chain of names, verifying that the names exist with the correct parenthood, and finally use the data of the last child name (or also a combination of the parents data) in order to resolve this call towards a real DNS URL or any kind of data.\
19-
Although the ownership and class system makes the administration a given class centralized, the creation of new classes is permissionless and as a class owner any kind of decentralized governance signing program could be used.
26+
- Domain name declarations: One could arbitrarly set-up a class that we can call
27+
Top-Level-Domain names. Names in this class can only be issued with the
28+
permission of the class keypair, ie the administrator, who can enforce that
29+
TLD names are of the type `".something"`. From then on one could create and
30+
own the TLD `".sol"` and create a class of ".sol" sub-domains, administrating
31+
the issuance of the `"something.sol"` sub-domains that way (by setting tha
32+
parent name to the address of the `".sol"` registry).
33+
34+
An off-chain browser extension could then, similarly to DNS, parse the user SPL
35+
name service URL input and descend the chain of names, verifying that the names
36+
exist with the correct parenthood, and finally use the data of the last child
37+
name (or also a combination of the parents data) in order to resolve this call
38+
towards a real DNS URL or any kind of data.
2039

21-
- Twitter handles can be added as names of one specific name class. The class authority of will therefore hold the right to add a twitter handle name. This enables the verification of twitter accounts for example by asking the user to tweet his pubkey or a signed message. A bot that holds the private issuing authority key can then sign the Create instruction (with a metadata_authority that is the tweeted pubkey) and send it back to the user who will then submit it to the program.\
40+
Although the ownership and class system makes the administration a given class
41+
centralized, the creation of new classes is permissionless and as a class owner
42+
any kind of decentralized governance signing program could be used.
43+
44+
- Twitter handles can be added as names of one specific name class. The class
45+
authority of will therefore hold the right to add a twitter handle name. This
46+
enables the verification of twitter accounts for example by asking the user to
47+
tweet his pubkey or a signed message. A bot that holds the private issuing
48+
authority key can then sign the Create instruction (with a metadata_authority
49+
that is the tweeted pubkey) and send it back to the user who will then submit
50+
it to the program.
2251
In this case the class will still be able to control the data of the name registry, and not the user for example.
23-
Therefore, another way of using this program would be to create a name (`"verified-twitter-handles"` for example) with the `Pubkey::default()` class and with the owner being the authority. That way verified twitter names could be issued as child names of this parent by the owner, leaving the user as being to able to modify the data of his twitter name registry.
52+
53+
Therefore, another way of using this program would be to create a name
54+
(`"verified-twitter-handles"` for example) with the `Pubkey::default()` class
55+
and with the owner being the authority. That way verified twitter names could be
56+
issued as child names of this parent by the owner, leaving the user as being to
57+
able to modify the data of his twitter name registry.

0 commit comments

Comments
 (0)