Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/helius-labs/namor
Generate (deterministic) human-readable names from Solana addresses.
https://github.com/helius-labs/namor
Last synced: 3 months ago
JSON representation
Generate (deterministic) human-readable names from Solana addresses.
- Host: GitHub
- URL: https://github.com/helius-labs/namor
- Owner: helius-labs
- License: gpl-3.0
- Created: 2023-01-17T23:56:08.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-03T22:59:20.000Z (almost 2 years ago)
- Last Synced: 2024-09-14T12:14:59.952Z (4 months ago)
- Language: TypeScript
- Size: 141 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sol-namor (alpha)
Looking at long, cryptic public keys or trying to remember them is painful.
This package solves that by generating fun (deterministic) human-readable names from Solana addresses — or uses the actual known name for popular addresses (for example, exchanges).
![](/doc/example.png)
## Install
`npm i sol-namor`
## Usage
#### `getSolanaName(string: publicKey)`
The following will first attempt to lookup the provided address in our dictionary at `/src/types`, if fails, a deterministic name will be generated using the public key as the seed.
```js
import { getSolanaName } from "sol-namor";const pubKey = "enter a solana public key here";
const name = getSolanaName(pubKey);
```## Contribute
1. Fork the repo, work on your own branch, make a PR into this `main` branch when ready.
2. We suggest using VSCode and having ESList and Prettier installed so you get automatic linting and formatting. If using other editors you can run `npm run lint` and `npm run format` to lint/format manually.
3. GitHub will auto run some tests on your PR once you create it and they will be required to pass. To simulate locally you can `npm run build && npm test`.## Support
https://helius.xyz