GithubHelp home page GithubHelp logo

decentralized-identity / uni-resolver-driver-did-key Goto Github PK

View Code? Open in Web Editor NEW
4.0 12.0 2.0 87 KB

A Universal Resolver driver for did:key identifiers.

JavaScript 86.84% Dockerfile 13.16%
decentralized-identifiers wg-id universal-resolver

uni-resolver-driver-did-key's Introduction

DIF Logo

Universal Resolver Driver: did:key

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

Specifications

Example DIDs

did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6
did:key:z6MksQ35B5bwZDQq4QKuhQW2Sv6dcqwg4PqcSFf67pdgrtjB
did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH

Build and Run (Docker)

docker build -f ./docker/Dockerfile . -t universalresolver/driver-did-key
docker run -p 8080:8080 universalresolver/driver-did-key
curl -X GET http://localhost:8080/1.0/identifiers/did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6

Build and Run (NodeJS)

npm start

Driver Environment Variables

The driver recognizes the following environment variables:

(none)

Driver Metadata

The driver returns the following metadata in addition to a DID document:

(none)

uni-resolver-driver-did-key's People

Contributors

bernhardfuchs avatar dependabot[bot] avatar peacekeeper avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

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

uni-resolver-driver-did-key's Issues

Error: Cannot find module 'oas3-tools'

docker build -f ./docker/Dockerfile . -t universalresolver/driver-did-key
docker run -p 8080:8080 universalresolver/driver-did-key
Sending build context to Docker daemon 88.06kB
Step 1/8 : FROM node:10
---> 2457d5f85d32
Step 2/8 : MAINTAINER Markus Sabadello [email protected]
---> Using cache
---> 46a7e9a18610
Step 3/8 : WORKDIR /usr/src/app
---> Using cache
---> 10f55b6dfbb4
Step 4/8 : COPY package.json ./
---> Using cache
---> bf61e563c0bc
Step 5/8 : RUN npm install
---> Using cache
---> cb32807a96d0
Step 6/8 : COPY . .
---> Using cache
---> 4ecb170b24bd
Step 7/8 : EXPOSE 8080
---> Using cache
---> e9af987497ed
Step 8/8 : CMD [ "node", "index.js" ]
---> Using cache
---> d38a746372bd
Successfully built d38a746372bd
Successfully tagged universalresolver/driver-did-key:latest
internal/modules/cjs/loader.js:638
throw err;
^

Error: Cannot find module 'oas3-tools'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/usr/src/app/index.js:6:17)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)

Did Document Response changed in new docker images

Hey,

I am using universalresolver/driver-did-key:latest to resolve did document of did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6.

When I use docker image tag 0.2.0-f98a04a, it is returning below response:

{
    "@context":
    [
        "https://www.w3.org/ns/did/v1",
        "https://w3id.org/security/suites/jws-2020/v1"
    ],
    "id": "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6",
    "verificationMethod":
    [
        {
            "id": "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6#z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6",
            "type": "JsonWebKey2020",
            "controller": "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6",
            "publicKeyJwk":
            {
                "kty": "OKP",
                "crv": "Ed25519",
                "x": "FN5URrQRnKSaEjQvC8e6vpNGxivoocgPLgmzv_5JH2k"
            }
        }
    ],
    "assertionMethod":
    [
        "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6#z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6"
    ],
    "authentication":
    [
        "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6#z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6"
    ],
    "capabilityInvocation":
    [
        "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6#z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6"
    ],
    "capabilityDelegation":
    [
        "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6#z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6"
    ]
}

When I use latest docker tag, it is returning below response:

{
  "didDocument": {
    "@context": [
      "https://www.w3.org/ns/did/v1",
      "https://w3id.org/security/suites/jws-2020/v1"
    ],
    "id": "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6",
    "verificationMethod": [
      {
        "id": "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6#z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6",
        "type": "JsonWebKey2020",
        "controller": "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6",
        "publicKeyJwk": {
          "kty": "OKP",
          "crv": "Ed25519",
          "x": "FN5URrQRnKSaEjQvC8e6vpNGxivoocgPLgmzv_5JH2k"
        }
      }
    ],
    "assertionMethod": [
      "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6#z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6"
    ],
    "authentication": [
      "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6#z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6"
    ],
    "capabilityInvocation": [
      "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6#z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6"
    ],
    "capabilityDelegation": [
      "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6#z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6"
    ]
  }
}}

Why both docker images are returning did document in different json format?

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.