Skip to content

tgrid-usa/Universal-did-proxy-resolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


README.md

# 🛡️ DID Proxy Resolver

This project is a simple **Node.js + Express** proxy API that resolves `did:tgrid` identifiers by internally calling a DID resolver running on `http://localhost:3000`.

It exposes an endpoint:

GET /1.0/identifiers/:identifier


Which internally calls:

GET http://localhost:3000/resolve?did=did:tgrid:trustgrid:dev:


## 📁 Project Structure

did-proxy-resolver/ ├── controllers/ │ └── Default.js ├── index.js ├── package.json ├── Dockerfile └── README.md


---

## 🚀 How to Run

### 1. Install dependencies

```bash
npm install

2. Start the server

node index.js

Server runs at http://localhost:8080


🔁 Example Request

Call this proxy endpoint:

curl http://localhost:8080/1.0/identifiers/QjA1qdXKmxzgK4u8mFoBpF

It will internally send a request to:

http://localhost:3000/resolve?did=did:tgrid:trustgrid:dev:QjA1qdXKmxzgK4u8mFoBpF

And return the resolved DID Document.


🐳 Docker Support

Build the image

docker build -t did-proxy .

Run the container

docker run -p 8080:8080 did-proxy

🧱 Docker Compose (optional)

If you're running the DID resolver (on port 3000) and this proxy together:

docker-compose.yml

version: '3.8'

services:
  resolver:
    image: your-did-resolver-image
    build:
      context: ./resolver
    ports:
      - "3000:3000"

  proxy:
    build: .
    ports:
      - "8080:8080"
    depends_on:
      - resolver

Make sure to update controllers/Default.js to call:

const url = `http://resolver:3000/resolve?did=...`

instead of localhost.


📦 Dependencies


👨‍💻 Author

Srikanth Hubli Feel free to use, improve, and contribute.


📝 License

MIT License. Free to use and modify.


---

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published