Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,6 @@ uniresolver_driver_did_near_contract_id=neardti.testnet
uniresolver_driver_did_near_rpc_url=https://rpc.testnet.near.org
uniresolver_driver_did_near_network_id=testnet

uniresolver_driver_did_empe_did_methods=[{"method":"empe","network":"testnet","url":"https://rpc-testnet.empe.io"},{"method":"empe","url":"https://rpc.empe.io"}]
uniresolver_driver_did_empe_did_methods=[{"method":"empe","network":"testnet","url":"https://rpc-testnet.empe.io"},{"method":"empe","url":"https://rpc.empe.io"}]
# did:cid (Archon Protocol)
uniresolver_driver_did_cid_gatekeeper_url=http://localhost:4224
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ Are you developing a DID method and Universal Resolver driver? Click [Driver Dev
| [did-andorra](https://github.com/davidgbvargroup/uni-resolver-driver-did-andorra) | 1.0.0 | [0.1.1](https://github.com/davidgbvargroup/did-andorra-method-spec/blob/main/spec.md) | [davidgbvargroup/uni-resolver-driver-did-andorra](https://hub.docker.com/r/davidgbvargroup/uni-resolver-driver-did-andorra) | Andorra DID |
| [did-hedera](https://github.com/hiero-ledger/identity-collaboration-hub/tree/main/universal-resolver-driver) | 0.1.7 | [1.0](https://github.com/hashgraph/did-method/blob/master/hedera-did-method-specification.md) | [ghcr.io/hiero-ledger/uni-resolver-driver-did-hedera](ghcr.io/hiero-ledger/uni-resolver-driver-did-hedera:v0.1.7-8ae3a53) | Hedera DID Method |
| [did-nda](https://github.com/pilacorp/nda-resolver-driver) | 1.0.0 | [1.0.0](https://did-specs.ndachain.vn/) | [pilacorp/driver-did-nda](https://github.com/orgs/pilacorp/packages/container/package/driver-did-nda) | NDA DID |
| [did-cid](https://github.com/archetech/universal-resolver/tree/main/drivers/did-cid) | 0.1.0 | [0.1.0](https://github.com/nickthetj/archon-protocol) | [archetech/uni-resolver-driver-did-cid](https://github.com/archetech/universal-resolver/pkgs/container/uni-resolver-driver-did-cid) | Archon Protocol (content-addressed DID) |


## More Information
Expand Down
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -434,3 +434,10 @@ services:
image: ghcr.io/pilacorp/driver-did-nda:1.0.0
ports:
- "8166:8080"

driver-did-cid:
image: archetech/uni-resolver-driver-did-cid:0.1.0
environment:
ARCHON_GATEKEEPER_URL: ${uniresolver_driver_did_cid_gatekeeper_url}
ports:
- "4250:4250"
7 changes: 7 additions & 0 deletions drivers/did-cid/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
npm-debug.log
.git
.gitignore
README.md
.env
*.md
4 changes: 4 additions & 0 deletions drivers/did-cid/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
.env
*.log
.DS_Store
15 changes: 15 additions & 0 deletions drivers/did-cid/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Universal Resolver Driver for did:cid
FROM node:20-alpine

WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY server.js ./

ENV PORT=4250
ENV ARCHON_GATEKEEPER_URL=http://localhost:4224

EXPOSE 4250
HEALTHCHECK --interval=30s --timeout=5s CMD wget -qO- http://localhost:4250/health || exit 1

CMD ["node", "server.js"]
98 changes: 98 additions & 0 deletions drivers/did-cid/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Universal Resolver Driver: did:cid

A [Universal Resolver](https://github.com/decentralized-identity/universal-resolver) driver for the **did:cid** method used by [Archon Protocol](https://archetech.com).

## About did:cid

`did:cid` is a content-addressed DID method where the DID identifier is derived from the IPFS CID of the initial DID document. This provides:

- **Instant creation** — No blockchain transaction required
- **Self-certifying** — The DID proves its own integrity
- **Multi-registry** — Updates can be anchored to various registries (Hyperswarm, Bitcoin, etc.)

## Specifications

- DID Method: `did:cid`
- [DID Specification](https://github.com/nickthetj/archon-protocol/blob/main/docs/did-cid-spec.md)
- [Archon Protocol](https://archetech.com)

## Example DIDs

```
did:cid:bagaaieraxdxq4fm2kjh6yqjxjor3t2idczkmxd4v7in4u353fa6m6sms2pnq
did:cid:bagaaierajzwcicueqdkbgk75lgekdmvtbo5zv3spq2p4f7d7ow42urlwi32a
```

## Running Locally

```bash
# Install dependencies
npm install

# Start the driver
PORT=4250 ARCHON_GATEKEEPER_URL=http://localhost:4224 npm start

# Test resolution
curl http://localhost:4250/1.0/identifiers/did:cid:bagaaieraxdxq4fm2kjh6yqjxjor3t2idczkmxd4v7in4u353fa6m6sms2pnq
```

## Docker

```bash
# Build
docker build -t archetech/uni-resolver-driver-did-cid:0.1.0 .

# Run
docker run -p 4250:4250 -e ARCHON_GATEKEEPER_URL=http://host.docker.internal:4224 archetech/uni-resolver-driver-did-cid:0.1.0

# Test
curl http://localhost:4250/1.0/identifiers/did:cid:bagaaieraxdxq4fm2kjh6yqjxjor3t2idczkmxd4v7in4u353fa6m6sms2pnq
```

## Environment Variables

| Variable | Default | Description |
|----------|---------|-------------|
| `PORT` | `4250` | Port to listen on |
| `GATEKEEPER_URL` | `https://gatekeeper.archon.technology` | Archon gatekeeper endpoint |

## API Endpoints

| Endpoint | Description |
|----------|-------------|
| `GET /1.0/identifiers/{did}` | Resolve a did:cid |
| `GET /1.0/methods` | List supported methods (`["cid"]`) |
| `GET /health` | Health check |

## Integration with Universal Resolver

Add to `docker-compose.yml`:

```yaml
driver-did-cid:
image: archetech/uni-resolver-driver-did-cid:0.1.0
ports:
- "4250:4250"
environment:
- ARCHON_GATEKEEPER_URL=http://your-gatekeeper:4224
```

Add to `application.yml`:

```yaml
- pattern: "^(did:cid:.+)$"
url: "${uniresolver_web_driver_url_did_cid:http://driver-did-cid:4250/1.0/identifiers/}"
testIdentifiers:
- "did:cid:bagaaieraxdxq4fm2kjh6yqjxjor3t2idczkmxd4v7in4u353fa6m6sms2pnq"
- "did:cid:bagaaierajzwcicueqdkbgk75lgekdmvtbo5zv3spq2p4f7d7ow42urlwi32a"
```

## Contact

- **Maintainer**: Archetech
- **Email**: contact@archetech.com
- **GitHub**: https://github.com/nickthetj/archon-protocol

## License

Apache 2.0
Loading