Skip to content

Commit

Permalink
Add different modes description + response example
Browse files Browse the repository at this point in the history
  • Loading branch information
Toktar committed Jul 15, 2022
1 parent 4beb6af commit fdfe907
Showing 1 changed file with 101 additions and 15 deletions.
116 changes: 101 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,132 @@
# did:cheqd DID Resolver

## ℹ️ Overview

cheqd DID resovler offers multiple implementations for resolving cheqd DIDs, according to the [cheqd DID method](https://docs.cheqd.io/node/architecture/adr-list/adr-002-cheqd-did-method#:~:text=Summary,on%20the%20Cosmos%20blockchain%20framework.)

This resolver aims to make it easy for third parties to resolve cheqd DIDs, using either a full DID resolver, a proxy DID resolver or through the [Universal Resolver](https://dev.uniresolver.io/).

## Example DIDs

```commandline
did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY
did:cheqd:testnet:MTMxDQKMTMxDQKMT
```
did:cheqd:mainnet:1g7d92hf83h67fh6
did:cheqd:testnet:1g7d92hf83h67fh6

## Quick Start

If you do not want to install anything, but just want to resolve a DID right now, then make a request in the browser https://resolver.cheqd.net/1.0/identifiers/did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY:

or through the terminal:

```bash
curl -X GET https://resolver.cheqd.net/1.0/identifiers/did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY
```

### Response example

```json
{
"didResolutionMetadata":{
"contentType":"application/did+ld+json",
"retrieved":"2022-07-15T14:55:16Z",
"did":{
"didString":"did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY",
"methodSpecificId":"zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY",
"method":"cheqd"
}
},
"didDocument":{
"@context":[
"https://www.w3.org/ns/did/v1"
],
"id":"did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY",
"verificationMethod":[
{
"id":"did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY#key1",
"type":"Ed25519VerificationKey2020",
"controller":"did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY",
"publicKeyMultibase":"zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkYsWCo7fztHtepn"
}
],
"authentication":[
"did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY#key1"
],
"service":[
{
"id":"did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY#website",
"type":"LinkedDomains",
"serviceEndpoint":"https://www.cheqd.io"
},
{
"id":"did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY#non-fungible-image",
"type":"LinkedDomains",
"serviceEndpoint":"https://gateway.ipfs.io/ipfs/bafybeihetj2ng3d74k7t754atv2s5dk76pcqtvxls6dntef3xa6rax25xe"
},
{
"id":"did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY#twitter",
"type":"LinkedDomains",
"serviceEndpoint":"https://twitter.com/cheqd_io"
},
{
"id":"did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY#linkedin",
"type":"LinkedDomains",
"serviceEndpoint":"https://www.linkedin.com/company/cheqd-identity/"
}
]
},
"didDocumentMetadata":{
"created":"2022-04-05T11:49:19Z",
"versionId":"EDEAD35C83E20A72872ACD3C36B7BA42300712FC8E3EEE1340E47E2F1B216B2D"
}
}
```

[Read more about cheqd DID resolver features](https://github.com/cheqd/identity-docs/blob/main/tutorials/resolver/using-cheqd-universal-resolver-driver.md)

## 🧑‍💻🛠 Developer Guide

## Full DID Resolver

Todo
For starting Full DID Resolver use

## Proxy DID Resolver
```bash
docker compose --profile full up --build
```

Todo
After you can check if it works

## Universal Resolver
```bash
curl -X GET https://resolver.cheqd.net/1.0/identifiers/did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY
```

The Universal Resolver wraps an API around a number of co-located Docker containers running DID-method-specific drivers.
Response should be the same with [this example](#response-example)

[Read more about Full DID Resolver configuration](https://github.com/cheqd/identity-docs/blob/main/tutorials/resolver/using-full-cheqd-did-resolver.md)

## Proxy DID Resolver

### Build and Run (Docker)
You can use light profile:

Todo
```commandline
docker compose --profile light up --build
```

### Driver Environment Variables
for having an opportunity to make a localhost requests

The driver recognizes the following environment variables:
```commandline
curl -X GET http://localhost:8080/1.0/identifiers/did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY
```

Todo
with [this kind]((#response-example)) of responses redirected from https://resolver.cheqd.net

### Driver Metadata
[More about light DID Resolver](https://github.com/cheqd/identity-docs/blob/main/tutorials/resolver/using-light-cheqd-did-resolver.md)

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

Todo
The Universal Resolver wraps an API around a number of co-located Docker containers running DID-method-specific drivers.

Integration phase: in progress

## 🙋 Find us elsewhere

Expand Down

0 comments on commit fdfe907

Please sign in to comment.