Skip to content

danubetech/uni-resolver-driver-did-scid

Repository files navigation

Universal Resolver Driver: did:scid

This is a Universal Resolver driver for did:scid identifiers.

(work in progress)

Specifications

Architecture

This driver depends on other drivers of did:scid "source DID methods". At the moment, these are:

This driver also depends on "?src" dereferencers, which can process values of the ?src DID parameter used by did:scid:

      /-------------------\      /-------------------\
      | did:webs driver   |      | did:webvh driver  |      ...
      \-------------------/      \-------------------/
                ^                          ^
                |                          |
   /--------------------------------------------------------------\
   | source DID method drivers                                    |
/====================================================================\
|  did:scid driver                                                   |
\====================================================================/
   | "?src" dereferencers                                         |
   |--------------------------------------------------------------|
   | DID URL            | Domain Name        | Hedera URI         |
   | e.g. did:cheqd:... | e.g. example.com   | e.g. hedera:...    |
   \--------------------------------------------------------------/

Build and Run (Docker)

docker compose build
docker compose up

Example DIDs and DID URLs

curl -X GET http://localhost:8080/1.0/identifiers/did:webvh:QmPEQVM1JPTyrvEgBcDXwjK4TeyLGSX1PxjgyeAisdWM1p:gist.githubusercontent.com:brianorwhatever:9c4633d18eb644f7a47f93a802691626:raw
curl -X GET http://localhost:8080/1.0/identifiers/did:scid:vh:1:QmPEQVM1JPTyrvEgBcDXwjK4TeyLGSX1PxjgyeAisdWM1p?src=gist.githubusercontent.com%2Fbrianorwhatever%2F9c4633d18eb644f7a47f93a802691626%2Fraw
curl -X GET http://localhost:8080/1.0/identifiers/did:scid:vh:1:QmPEQVM1JPTyrvEgBcDXwjK4TeyLGSX1PxjgyeAisdWM1p?src=gist.githubusercontent.com%2Fpeacekeeper%2F2a0e3e9b87819a38555273a3f2c5bd2c%2Fraw
curl -X GET http://localhost:8080/1.0/identifiers/did:scid:vh:1:QmPEQVM1JPTyrvEgBcDXwjK4TeyLGSX1PxjgyeAisdWM1p?src=did:cheqd:testnet:3ba8fcbb-45c8-4b20-b5a2-b4155199a1ac/resources/4c3f5d83-03f0-466f-8455-4f8d2c760ef0
curl -X GET http://localhost:8080/1.0/identifiers/did:scid:vh:1:QmPEQVM1JPTyrvEgBcDXwjK4TeyLGSX1PxjgyeAisdWM1p?src=hedera:testnet:0.0.5815515
curl -X GET http://localhost:8080/1.0/identifiers/did:webs:peacekeeper.github.io:did-webs-iiw37-tutorial:EKYGGh-FtAphGmSZbsuBs_t4qpsjYJ2ZqvMKluq9OxmP
curl -X GET http://localhost:8080/1.0/identifiers/did:scid:ke:1:EKYGGh-FtAphGmSZbsuBs_t4qpsjYJ2ZqvMKluq9OxmP?src=gist.githubusercontent.com%2Fpeacekeeper%2F01fa6c0a2c00c161b9a56f1d094b081f%2Fraw
curl -X GET http://localhost:8080/1.0/identifiers/did:scid:ke:1:EKYGGh-FtAphGmSZbsuBs_t4qpsjYJ2ZqvMKluq9OxmP?src=did:cheqd:testnet:c2e0c5b8-b2a1-489a-a969-abe6d5459bad/resources/a498845c-a74d-497f-b706-56dfb9b3f1c5
curl -X GET http://localhost:8080/1.0/identifiers/did:scid:ke:1:EKYGGh-FtAphGmSZbsuBs_t4qpsjYJ2ZqvMKluq9OxmP?src=hedera:testnet:0.0.6525344

Build (native Java)

mvn clean install

Driver Environment Variables

The driver recognizes the following environment variables:

uniresolver_driver_did_scid_didResolverUri

  • The endpoint of a DID Resolver that can dereference DID URLs as the value of the "src" parameter.

Additional (theoretical) examples

did:scid:vh:1:QmfGEUAcMpzo25kF2Rhn8L5FAXysfGnkzjwdKoNPi615XQ?src=example.com
did:scid:vh:1:QmfGEUAcMpzo25kF2Rhn8L5FAXysfGnkzjwdKoNPi615XQ?src=newlocation.com
did:scid:vh:1:QmfGEUAcMpzo25kF2Rhn8L5FAXysfGnkzjwdKoNPi615XQ?src=bluesky.com
did:scid:ke:1:Ew-o5dU5WjDrxDBK4b4HrF82_rYb6MX6xsegjq4n0Y7M?src=example.com

About

A Universal Resolver driver for did:scid identifiers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published