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
recordIPFS
recordARWV
recordSHDW
recordA
recordCNAME
record
The resolver will resolve both records v1 and records v2, but records v2 are given priority.
This resolver is deployed on https://sol-domain.org
- Install the wrangler CLI
yarn global add wrangler
- Run the worker locally
wrangler dev
- Deploy on Cloudflare
wrangler publish
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 formatipfs://<CID>
(e.gipfs://QmZk9uh2mqmXJFKu2Hq7kFRh93pA8GDpSZ6ReNqubfRKKQ
)ARWV
: With the following formatarwv://<HASH>
(e.garwv://KuB5jmew87_M2flH9f6ZpB9jlDv8hZSHPrmGUY8KqEk
)url
: With the following formaturl_to_your_website
(e.ghttps://bonfida.org
)