Skip to content

Commit

Permalink
update readme and resolver libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
Shashank.Kulkarni committed May 3, 2021
1 parent fe7c642 commit 0825885
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import express from "express"
import * as dot from 'dotenv';
import { resolveDID } from 'polygon-did-resolver';
import { resolveDID } from '@ayanworks/polygon-did-resolver';

dot.config();

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)
});
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "polygon-did-driver",
"version": "1.0.1",
"version": "1.0.0",
"main": "js/index.js",
"license": "MIT",
"private": false,
Expand All @@ -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",
Expand Down

0 comments on commit 0825885

Please sign in to comment.