Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bonfida/name-resolver
Solana name service resolver in browser
https://github.com/bonfida/name-resolver
cloudflare-workers rust solana webassembly
Last synced: 3 months ago
JSON representation
Solana name service resolver in browser
- Host: GitHub
- URL: https://github.com/bonfida/name-resolver
- Owner: Bonfida
- License: mit
- Created: 2022-07-20T14:35:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-06T03:42:02.000Z (10 months ago)
- Last Synced: 2024-04-18T03:46:05.647Z (10 months ago)
- Topics: cloudflare-workers, rust, solana, webassembly
- Language: TypeScript
- Homepage: https://sol-domain.org
- Size: 1.12 MB
- Stars: 9
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Name Resolver
Introduction
![diagram](/assets/diagram.png)
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](https://bonfida.sol-domain.org)). The resolver supports URLs, [IPFS CIDs](https://www.ipfs.com/) and [Arweave hashes](https://www.arweave.org/).
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` recordThe 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](https://sol-domain.org)
Get started
1. Install the wrangler CLI
```
yarn global add wrangler
```2. Run the worker locally
```
wrangler dev
```3. 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](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://` (e.g `ipfs://QmZk9uh2mqmXJFKu2Hq7kFRh93pA8GDpSZ6ReNqubfRKKQ`)
- `ARWV`: With the following format `arwv://` (e.g `arwv://KuB5jmew87_M2flH9f6ZpB9jlDv8hZSHPrmGUY8KqEk`)
- `url`: With the following format `url_to_your_website` (e.g `https://bonfida.org`)![record](/assets/record.png)