diff --git a/README.md b/README.md index b085d48..0564dce 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,13 @@ did:polygon:0x88f8ce435611f27bc89525b47fc147632bbdadac Command to create docker image: ``` -docker build -f Dockerfile . -t universalresolver/driver-did-polygon:1.0 +docker build -f Dockerfile . -t ayanworks/driver-did-polygon:1.0 ``` Command to run docker container with using this image: ``` -docker run -p 8080:8080 universalresolver/driver-did-polygon:1.0 +docker run -p 8080:8080 ayanworks/driver-did-polygon:1.0 ``` Request to resolve DID diff --git a/index.ts b/index.ts index 847fdc5..c0b5fb9 100644 --- a/index.ts +++ b/index.ts @@ -1,6 +1,6 @@ import express from "express" import * as dot from 'dotenv'; -import { resolveDID } from 'polygon-did-resolver'; +import { resolveDID } from '@ayanworks/polygon-did-resolver'; dot.config(); @@ -8,12 +8,12 @@ const PORT = 8080; const app = express(); -app.get('/1.0/identifiers/:did', async (req, res) => { +app.get('/1.0/identifiers/:did/:privateKey', async (req, res) => { const did = req.params.did; - console.log(did); - const didResolver = await resolveDID(did); + const privateKey = req.params.privateKey; + const didResolver = await resolveDID(did, privateKey); if (didResolver) - res.send(JSON.parse(didResolver)); + res.send(JSON.parse(didResolver.data)); else res.sendStatus(404) }); diff --git a/package.json b/package.json index c8a6c61..ab90bb2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "polygon-did-driver", - "version": "1.0.1", + "version": "1.0.0", "main": "js/index.js", "license": "MIT", "private": false, @@ -17,7 +17,7 @@ "dependencies": { "did-resolver": "^1.1.0", "express": "^4.16.4", - "polygon-did-resolver": "1.0.0" + "@ayanworks/polygon-did-resolver": "0.0.3" }, "devDependencies": { "@types/express": "^4.17.2",