TLD Solve
Solana Multi Name Service Protocol Solver.
currently integrated:
- All ANS domains.
- SNS domain.
- More to come.
Examples:
the example below is a replica of the tests in tests
folder
const RPC_URL = '';
const owner = new PublicKey('owner pubkey');
const domain = 'miester.abc';
const connection = new Connection(RPC_URL);
const solver = new TldSolve(connection);
const mainDomain = await solver.getMainDomain(owner);
const nameRecordState = await solver.resolveDomain(domain);
const owner = await solver.getOwnerFromDomain(domain);
const nameAccount = await solver.getNameAccountFromDomain(domain);
const ownerDomains = await solver.getAllDomainsFromUser(owner);
const ownerDomains = await solver.getAllDomainsFromUserFromTld(owner, tld);
const [AbcTldHouse] = findTldHouse('.abc');
const domain = await solver.reverseLookupNameAccountWithKnownParent(
nameAccount,
AbcTldHouse,
);
const domain = await solver.reverseLookupNameAccount(nameAccount);
Active ANS Tlds
TLD => parentAccountKey
.bonk => 2j6gC6MMrnw4JJpAKR5FyyUFdxxvdZdG2sg4FrqfyWi5
.poor => 8err4ThuTiZo9LbozHAvMrzXUmyPWj9urnMo38vC6FdQ
.abc => 3pSeaEVTcKLkXPCpZHDpHUMWAogYFZgKSiVtyvqcgo8a
Contribute
- fork repo, make a new branch.
- install dependencies
yarn
- add changes. please comment your code as much as you can.
- follow the code style of the project, including indentation.
- add tests in tests/ folder and do
yarn test
- add or change the documentation as needed.
- do a PR.