Skip to content

Bonfida/name-resolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Name Resolver




Introduction


diagram

This repository is an implementation of a Solana Name Service resolver made with Cloudflare workers.

It allows people to browse SNS websites directly from their favorite web browser (e.g https://bonfida.sol-domain.org). The resolver supports URLs, IPFS CIDs and Arweave hashes.

When resolving a domain the worker will look into the following records and return the first one that exists:

  • url record
  • IPFS record
  • ARWV record
  • SHDW record
  • A record
  • CNAME record

The resolver will resolve both records v1 and records v2, but records v2 are given priority.


Deployment


This resolver is deployed on https://sol-domain.org


Get started


  1. Install the wrangler CLI
yarn global add wrangler
  1. Run the worker locally
wrangler dev
  1. Deploy on Cloudflare
wrangler publish

Edit your records


To make your domain browsable, you must set your records:

  • Go to your domain's page (e.g https://www.sns.id/domain?domain=bonfida)
  • Connect your wallet
  • In order to resolve your domain one of the following record must be set:
    • IPFS: With the following format ipfs://<CID> (e.g ipfs://QmZk9uh2mqmXJFKu2Hq7kFRh93pA8GDpSZ6ReNqubfRKKQ)
    • ARWV: With the following format arwv://<HASH> (e.g arwv://KuB5jmew87_M2flH9f6ZpB9jlDv8hZSHPrmGUY8KqEk)
    • url: With the following format url_to_your_website (e.g https://bonfida.org)

record