Skip to content

Repository files navigation

uni-resolver-driver-did-solidus

A DIF Universal Resolver driver for the did:solidus DID method.

did:solidus is registered in the W3C DID Method Registry (spec).

DID resolution is a public read: this driver needs no API key, no account, and no private key.

Run

docker run --rm -p 8080:8080 ghcr.io/solidusnetwork/uni-resolver-driver-did-solidus:0.1.1
curl http://localhost:8080/1.0/identifiers/did:solidus:testnet:2FDp7gH5qyb66jjsXAbFQYwLygqQ

0.1.1 enforces the SPEC v0.2.0 identifier bound (20*28base58char). 0.1.0 accepted up to 40 characters and answers notFound where 0.1.1 answers invalidDid — a meaningful difference, since "no such DID" implies the identifier could have existed.

Configuration

Variable Default Purpose
SOLIDUS_RPC_URL https://rpc.solidus.network Chain RPC endpoint
PORT 8080 Listen port

DID syntax

did:solidus:{network}:{base58-address}

network is testnet or mainnet. The address is base58 (no 0, O, I, l).

Note: some older Solidus documentation shows a three-segment form, did:solidus:<address>. That form is not valid and this driver rejects it with invalidDid.

Responses

Implements W3C DID Resolution as DIF's openapi.yaml specifies:

Status When
200 Resolved
400 invalidDid — malformed DID
404 notFound — well-formed, not registered
406 representationNotSupported — unsupported Accept
410 Deactivated (document still returned)
500 internalError

Errors are RFC 9457 problem-details objects in didResolutionMetadata.error. Content negotiation supports application/did (bare document) and application/did-resolution (full envelope).

Develop

npm install && npm test && npm run build && npm start

License

Apache-2.0

About

DIF Universal Resolver driver for the did:solidus DID method

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages