https://github.com/cheqd/did-registrar
Universal Registrar driver for did:cheqd DID Method
https://github.com/cheqd/did-registrar
did-registrar hacktoberfest
Last synced: over 1 year ago
JSON representation
Universal Registrar driver for did:cheqd DID Method
- Host: GitHub
- URL: https://github.com/cheqd/did-registrar
- Owner: cheqd
- License: apache-2.0
- Created: 2022-10-17T06:10:28.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-21T17:29:59.000Z (almost 2 years ago)
- Last Synced: 2024-10-25T06:29:32.889Z (over 1 year ago)
- Topics: did-registrar, hacktoberfest
- Language: TypeScript
- Homepage: https://did-registrar.cheqd.net
- Size: 929 KB
- Stars: 4
- Watchers: 5
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Universal Registrar Driver for did:cheqd
[](https://github.com/cheqd/did-registrar/releases/latest)  [](https://github.com/cheqd/did-registrar/blob/main/LICENSE)
[](https://github.com/cheqd/did-registrar/releases/)  [](https://github.com/cheqd/did-registrar/graphs/contributors)
[](https://github.com/cheqd/did-registrar/actions/workflows/dispatch.yml) [](https://github.com/cheqd/did-registrar/actions/workflows/codeql.yml) 
## âšī¸ Overview
The purpose of this service is to provide a [Universal Registrar driver](https://identity.foundation/did-registration/#abstract) for the `did:cheqd` DID method. Universal Registrar is a project to provide simple REST APIs for DID creation, update, and deactivation.
## đ Endpoints
- POST `/create`
- POST `/update`
- POST `/deactivate`
- POST `/{did}/create-resource`
- POST `/createResource`
- POST `/updateResource`
- GET `/key-pair`
- GET `/did-document`
- GET `/properties`
- GET `/methods`
- GET `/traits`
## đ§âđģđ Developer Guide
### Setup
#### Environment variable configuration
Environment variables needed for the Registrar are
1. `FEE_PAYER_TESTNET_MNEMONIC` : The cosmos payer mnemonic for the Cheqd Mainnet
2. `FEE_PAYER_MAINNET_MNEMONIC` : The cosmos payer mnemonic for the Cheqd Tesnet, By default it's the Testnet Faucet
3. `LOCAL_STORE_TTL` (default: `600`): The time in seconds for the registrar to store data in cache
4. `PORT` (default: `3000`): The port number
Clone the repository
```bash
git clone git@github.com:cheqd/did-registrar.git
cd did-registrar
```
***
### Running a DID Registrar Using Docker
Build Docker container image using Dockerfile:
```bash
docker build --target cheqd-did-registrar . --tag did-registrar:local
```
Run the Docker container (modify according to your own build tags and other desired parameters):
```bash
docker run -it did-registrar:local
```
***
### Running a DID Registrar Locally
```bash
npm install
npm run build
npm start
```
### đ Testing
This repository contains the playwright tests for unit and integration testing.
Add any additional tests in the `tests` directory.
You must set up these two env vars before running test:
1. `TEST_PRIVATE_KEY` : Private key for signing the requests
2. `TEST_PUBLIC_KEY` : Corresponding public key
Then execute the tests
```bash
npm run test
# if tests faile because of parallelism, run
npm run test -- --workers=1
```
## đ Bug reports & đ¤ feature requests
If you notice anything not behaving how you expected, or would like to make a suggestion / request for a new feature, please create a [**new issue**](https://github.com/cheqd/did-registrar/issues/new/choose) and let us know.
## đŦ Community
Our [**Discord server**](http://cheqd.link/discord-github) is the primary chat channel for our open-source community, software developers, and node operators.
Please reach out to us there for discussions, help, and feedback on the project.
## đ Find us elsewhere
[](https://t.me/cheqd) [](http://cheqd.link/discord-github) [](https://twitter.com/intent/follow?screen_name=cheqd_io) [](http://cheqd.link/linkedin) [](https://blog.cheqd.io) [](https://www.youtube.com/channel/UCBUGvvH6t3BAYo5u41hJPzw/)