This is a Universal Resolver driver for did:nda identifiers. The driver resolves did:nda identifiers by making HTTP API calls to the NDA DID resolution service.
did:nda:testnet:0x86977f96a4f0973819d204541b1d9d48424302d9
The driver requires the NDA_API_URL environment variable to be set. Copy the example environment file and configure it:
cp .env.example .envEdit .env and set your API URL:
NDA_API_URL=https://example.com/api/v1/did
# Example full URL: https://example.com/api/v1/did/did:nda:testnet:0x86977f96a4f0973819d204541b1d9d48424302d9- Install dependencies:
npm install- Set up environment variables:
cp .env.example .env
# Edit .env with your configuration- Start the server:
npm startThe server will start on port 8080. You can test it with:
curl -X GET http://localhost:8080/1.0/identifiers/did:nda:testnet:0x86977f96a4f0973819d204541b1d9d48424302d9docker build -t driver-did-nda .
docker run -p 8080:8080 -e NDA_API_URL=https://example.com/api/v1/did driver-did-ndaOr use a .env file:
docker run -p 8080:8080 --env-file .env driver-did-ndaTest the container:
curl -X GET http://localhost:8080/1.0/identifiers/did:nda:testnet:0x86977f96a4f0973819d204541b1d9d48424302d9- Login to Docker Hub:
docker login- Tag your image (replace
yourusernamewith your Docker Hub username):
docker tag driver-did-nda yourusername/driver-did-nda:latest
# Optionally tag with a version:
docker tag driver-did-nda yourusername/driver-did-nda:v1.0.0- Push the image:
docker push yourusername/driver-did-nda:latest
docker push yourusername/driver-did-nda:v1.0.0- Run from Docker Hub:
docker run -p 8080:8080 -e NDA_API_URL=https://example.com/api/v1/did yourusername/driver-did-nda:latestThe driver calls the following API endpoint to resolve DIDs:
{NDA_API_URL}/{full_did_identifier}
Where:
NDA_API_URLis configured via theNDA_API_URLenvironment variable (default:https://example.com/api/v1/did){full_did_identifier}is the complete DID identifier (e.g.,did:nda:testnet:0x86977f96a4f0973819d204541b1d9d48424302d9)
The full URL format is: https://example.com/api/v1/did/{full_did_identifier}