Coder Social home page Coder Social logo

uport-did-driver's Introduction

uport-did-driver

Driver for the uPort DID methods to be used in the Universal Resolver. The Docker image is hosted on Docker Hub here:

https://hub.docker.com/r/uport/uni-resolver-driver-did-uport/

The file src/server.js is a small Express Node app acting as a thin wrapper around the Javascript DID resolver. It listens to port 8081.

The following DID methods are supported:

Curl Tests

Run service with

npm start

then run queries

curl -X GET http://localhost:8081/1.0/identifiers/did:web:did.actor:alice
curl -X GET http://localhost:8081/1.0/identifiers/did:ethr:0x3b0BC51Ab9De1e5B7B6E34E5b960285805C41736

Example DIDs

  • did:ethr:0x3b0BC51Ab9De1e5B7B6E34E5b960285805C41736
  • did:ethr:0x02b97c30de767f084ce3080168ee293053ba33b235d7116a3263d29f1450936b71
  • did:ethr:mainnet:0x3b0BC51Ab9De1e5B7B6E34E5b960285805C41736
  • did:ethr:goerli:0x3b0BC51Ab9De1e5B7B6E34E5b960285805C41736
  • did:ethr:0x1:0x3b0BC51Ab9De1e5B7B6E34E5b960285805C41736
  • did:ethr:0x5:0x3b0BC51Ab9De1e5B7B6E34E5b960285805C41736
  • did:ethr:ewc:0x3b0BC51Ab9De1e5B7B6E34E5b960285805C41736
  • did:web:pulsar.veramo.io
  • did:web:did.actor:alice
  • did:ens:vitalik.eth

uport-did-driver's People

Contributors

beckkles avatar coder5876 avatar dependabot[bot] avatar jrhender avatar mat-work avatar mirceanis avatar nickreynolds avatar petertheone avatar renovate-bot avatar renovate[bot] avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

uport-did-driver's Issues

Rebuild and push Docker image

Hello, is the Docker image for the Universal Resolver https://hub.docker.com/r/uport/uni-resolver-driver-did-uport still up-to-date? We're trying to resolve did:web:data-vault.eu:u:zi4xgcHtYo7fh_KAURaO1beG2v6WN9ImVnQ30CBDEJjLrw with it and we're getting this error:

uni-resolver-driver-did-uport_1  | Error: DID must resolve to a valid https URL containing a JSON document: invalid json response body at https://data-vault.eu/en reason: Unexpected token < in JSON at position 0
uni-resolver-driver-did-uport_1  |     at /opt/uport-did-driver/node_modules/web-did-resolver/lib/resolver.js:81:31
uni-resolver-driver-did-uport_1  |     at step (/opt/uport-did-driver/node_modules/web-did-resolver/lib/resolver.js:32:23)
uni-resolver-driver-did-uport_1  |     at Object.throw (/opt/uport-did-driver/node_modules/web-did-resolver/lib/resolver.js:13:53)
uni-resolver-driver-did-uport_1  |     at rejected (/opt/uport-did-driver/node_modules/web-did-resolver/lib/resolver.js:5:65)
uni-resolver-driver-did-uport_1  |     at processTicksAndRejections (internal/process/task_queues.js:97:5)

Maybe you can rebuild and push the image?

Peer DIDs are not handled correctly when they contain multiple service endpoints

When trying to resolve the peer did presented by the specification

did:peer:2.Vz6Mkj3PUd1WjvaDhNZhhhXQdz5UnZXmS7ehtx8bsPpD47kKc.Ez6LSg8zQom395jKLrGiBNruB9MM6V8PWuf2FpEy4uRFiqQBR.SeyJ0IjoiZG0iLCJzIjp7InVyaSI6Imh0dHA6Ly9leGFtcGxlLmNvbS9kaWRjb21tIiwiYSI6WyJkaWRjb21tL3YyIl0sInIiOlsiZGlkOmV4YW1wbGU6MTIzNDU2Nzg5YWJjZGVmZ2hpI2tleS0xIl19fQ.SeyJ0IjoiZG0iLCJzIjp7InVyaSI6Imh0dHA6Ly9leGFtcGxlLmNvbS9hbm90aGVyIiwiYSI6WyJkaWRjb21tL3YyIl0sInIiOlsiZGlkOmV4YW1wbGU6MTIzNDU2Nzg5YWJjZGVmZ2hpI2tleS0yIl19fQ

returns

{
   "didDocument":null,
   "didDocumentMetadata":{
      
   },
   "didResolutionMetadata":{
      "error":"notFound",
      "message":"resolver_error: DID must resolve to a valid https URL containing a JSON document: Error: did:peer:2.Vz6Mkj3PUd1WjvaDhNZhhhXQdz5UnZXmS7ehtx8bsPpD47kKc.Ez6LSg8zQom395jKLrGiBNruB9MM6V8PWuf2FpEy4uRFiqQBR.SeyJ0IjoiZG0iLCJzIjp7InVyaSI6Imh0dHA6Ly9leGFtcGxlLmNvbS9kaWRjb21tIiwiYSI6WyJkaWRjb21tL3YyIl0sInIiOlsiZGlkOmV4YW1wbGU6MTIzNDU2Nzg5YWJjZGVmZ2hpI2tleS0xIl19fQ.SeyJ0IjoiZG0iLCJzIjp7InVyaSI6Imh0dHA6Ly9leGFtcGxlLmNvbS9hbm90aGVyIiwiYSI6WyJkaWRjb21tL3YyIl0sInIiOlsiZGlkOmV4YW1wbGU6MTIzNDU2Nzg5YWJjZGVmZ2hpI2tleS0yIl19fQ is not a valid did:peer"
   }
}

presumably caused by the second service attached. Tested on the live demo of the universal did resolver and the latest docker image.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
Dockerfile
  • node 21.6.2
github-actions
.github/workflows/release.yml
  • actions/checkout v4
  • actions/setup-node v4
  • ubuntu 22.04
.github/workflows/test.yml
  • actions/checkout v4
  • actions/setup-node v4
  • ubuntu 22.04
npm
package.json
  • did-resolver ^4.1.0
  • ens-did-resolver ^1.0.4
  • ethr-did-resolver ^10.0.0
  • express ^4.18.2
  • express-actuator ^1.8.4
  • peer-did-resolver ^2.0.0
  • plc-did-resolver ^1.0.0
  • web-did-resolver ^2.0.27
  • @jest/globals 29.7.0
  • @semantic-release/changelog 6.0.3
  • @semantic-release/commit-analyzer 11.1.0
  • @semantic-release/exec 6.0.3
  • @semantic-release/git 10.0.1
  • @semantic-release/github 9.2.6
  • @semantic-release/npm 11.0.2
  • @semantic-release/release-notes-generator 12.1.0
  • cross-env 7.0.3
  • jest 29.7.0
  • prettier 3.2.5
  • semantic-release 22.0.12
  • supertest 6.3.4

  • Check this box to trigger a request for Renovate to run again on this repository

Why call the method "uport"?

Naively, I would have expected a UPort DID to look like did:uport:<MNID>. I was pleasantly surprised to find out that it is actually did:uport:<multihash>, which is actually brilliant: as a user you will have to mention a multihash in your smart contract anyway, so you might as well use that hash as the DID. This way the initial creation of the DDO is easy because it doesn't require an Ethereum transaction. Then, the way back from the DDO to the MNID is through the public key, so reusability again here. Simply brilliant.

Going a step further, as I understand it, it also means that such a DID is not tied to UPort at all, or even to Ethereum. If that is correct, it would imply that the method name could be something more generic, such as did:ipfs or did:ipid. I know having "uport" in the DID is sexy, but I think not having it is even sexier. :)

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (github>whitesource/merge-confidence:beta)

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Example DID can't be resolved on DIF public resolver

When I resolve the example DID did:3:kjzl6cwe1jw14akzaln614o61ewgfzpmxhrn7zmejvgpuegdpz303uhurlmqjpx at dev.uniresolver.io then the resolver throws following error:

2023-02-24T09:28:26,175 INFO  [qtp695530017-515] u.w.s.ResolveServlet: Resolve representation result for did:3:kjzl6cwe1jw14akzaln614o61ewgfzpmxhrn7zmejvgpuegdpz303uhurlmqjpx: {"didResolutionMetadata":{"error":"invalidDid","message":"Error: Failed to properly resolve 3ID, stream kjzl6cwe1jw14akzaln614o61ewgfzpmxhrn7zmejvgpuegdpz303uhurlmqjpx not found in response.","contentType":"application/did+ld+json","convertedFrom":"application/did+json","convertedTo":"application/did+ld+json"},"didDocumentStream":"","didDocumentMetadata":{}}

Unfortunetely this error is not propagated to the UI which might be an issue on our end.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.