Skip to content

Commit 90f42c3

Browse files
committed
Merge branch 'main' into develop
2 parents 86ee756 + 058b8a6 commit 90f42c3

File tree

1 file changed

+84
-6
lines changed

1 file changed

+84
-6
lines changed

README.md

Lines changed: 84 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,25 @@ The [Architecture Decision Record for the cheqd DID Resolver](https://docs.cheqd
1616

1717
## ✅ Quick Start
1818

19-
If you do not want to install anything and just want to resolve a `did:cheqd` entry from the ledger, you can [load the REST API endpoint for resolver.cheqd.net in your browser](https://resolver.cheqd.net/1.0/identifiers/did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN).
19+
If you do not want to install anything and just want to resolve a `did:cheqd` entry from the ledger, you can load the REST API endpoint for [resolver.cheqd.net](https://resolver.cheqd.net/) in your browser.
2020

2121
Or, make a request from terminal to this hosted REST API:
2222

2323
```bash
2424
curl -X GET https://resolver.cheqd.net/1.0/identifiers/did:cheqd:testnet:55dbc8bf-fba3-4117-855c-1e0dc1d3bb47
2525
```
2626

27-
### Running your own cheqd DID Resolver using Docker
28-
29-
#### Docker Compose command
27+
## 🛠️ Running your own cheqd DID Resolver using Docker
3028

3129
Spinning up a Docker container from the [pre-built `did-resolver` Docker image on Github](https://github.com/cheqd/did-resolver/pkgs/container/did-resolver) is as simple as the command below:
3230

3331
```bash
3432
docker compose -f docker/docker-compose.yml up --detach
3533
```
3634

37-
#### Configure resolver settings
35+
### Configure resolver settings
3836

39-
To configure the resolver, modify the values under the `environment` section of the [Docker Compose file](docker/docker-compose.yml). The values that can be edited are as follows:
37+
To configure the resolver, modify the values under the `environment` section of the [Docker Compose file](https://github.com/cheqd/did-resolver/blob/main/docker/docker-compose.yml). The values that can be edited are as follows:
4038

4139
1. **`MAINNET_ENDPOINT`** : Mainnet Network endpoint as string with the following format" `<networks>,<useTls>,<timeout>`. Example: `grpc.cheqd.net:443,true,5s`
4240
1. `networks`: A string specifying the Cosmos SDK gRPC endpoint from which the Resolver pulls data. Format: `<resource_url>:<resource_port>`
@@ -46,6 +44,86 @@ To configure the resolver, modify the values under the `environment` section of
4644
3. **`RESOLVER_LISTENER`**`: A string with address and port where the resolver listens for requests from clients.
4745
4. **`LOG_LEVEL`**: `debug`/`warn`/`info`/`error` - to define the application log level.
4846

47+
#### gRPC Endpoints used by DID Resolver
48+
49+
Our DID Resolver uses the [Cosmos gRPC endpoint](https://docs.cosmos.network/main/core/grpc_rest) from `cheqd-node` to fetch data. Typically, this would be running on port `9090` on a `cheqd-node` instance.
50+
51+
You can either use [public gRPC endpoints for the cheqd network](https://cosmos.directory/cheqd/nodes) (such as the default ones mentioned above), or point it to your own `cheqd-node` instance by enabling gRPC in the `app.toml` configuration file on a node:
52+
53+
```toml
54+
[grpc]
55+
56+
# Enable defines if the gRPC server should be enabled.
57+
enable = true
58+
59+
# Address defines the gRPC server address to bind to.
60+
address = "0.0.0.0:9090"
61+
```
62+
63+
**Note**: If you're pointing a DID Resolver to your own node instance, by default `cheqd-node` instance gRPC endpoints are *not* served up with a TLS certificate. This means the `useTls` property would need to be set to `false`, unless you're otherwise using a load balancer that provides TLS connections to the gRPC port.
64+
65+
## 🧑‍💻 Building your own Docker image
66+
67+
### Using Docker Build
68+
69+
You can build your own image using `docker build`
70+
71+
```bash
72+
docker build --file docker/Dockerfile --target resolver . --tag did-resolver:local
73+
```
74+
75+
### Using Docker Compose Build
76+
77+
Uncomment the `build` section in the `docker/docker-compose.yml` file. This relies on the `Dockerfile` above but uses Docker Compose syntax to customise the build:
78+
79+
```yaml
80+
build:
81+
context: ../
82+
dockerfile: docker/Dockerfile
83+
target: resolver
84+
image: did-resolver:local
85+
# image: ghcr.io/cheqd/did-resolver:${IMAGE_VERSION}
86+
```
87+
88+
Make sure you comment out the pre-existing `image` property that pulls in a container image from Github Container Registry, as shown above.
89+
90+
You can also do *just* a build with:
91+
92+
```bash
93+
docker-compose -f docker/docker-compose.yml --env-file docker/docker-compose.env build --no-cache
94+
```
95+
96+
### Running a custom built image
97+
98+
The instructions to configure and run the resolver are the same as when using the pre-built image.
99+
100+
## 🌐 Resolving `did:cheqd` via Universal Resolver
101+
102+
The [resolver.cheqd.net](https://resolver.cheqd.net/) API endpoint is run by the cheqd team and only handles `did:cheqd` credentials.
103+
104+
If you want to resolve DIDs from multiple DID methods, the [Universal Resolver](https://github.com/decentralized-identity/universal-resolver) project provides a multi DID method resolver.
105+
106+
### Using a pre-existing Universal Resolver endpoint
107+
108+
You can make resolution requests to a pre-existing Universal Resolver endpoint, such as [dev.uniresolver.io](https://dev.uniresolver.io), to their REST API endpoint:
109+
110+
```bash
111+
curl -X GET https://resolver.cheqd.net/1.0/identifiers/did:cheqd:testnet:55dbc8bf-fba3-4117-855c-1e0dc1d3bb47
112+
```
113+
114+
### Running your own Universal Resolver instance
115+
116+
You can also run your own instance of Universal Resolver, using the Docker Compose file of the project.
117+
118+
The [Universal Resolver quick start guide](https://github.com/decentralized-identity/universal-resolver#quick-start) provides instructions on how to do this:
119+
120+
```bash
121+
git clone https://github.com/decentralized-identity/universal-resolver
122+
cd universal-resolver/
123+
docker-compose -f docker-compose.yml pull
124+
docker-compose -f docker-compose.yml up
125+
```
126+
49127
## 📖 Documentation
50128

51129
Further documentation on [cheqd DID Resolver](https://docs.cheqd.io/identity/on-ledger-identity/did-resolver) is available on the [cheqd Identity Documentation site](https://docs.cheqd.io/identity/). This includes instructions on how to do custom builds using `Dockerfile` / Docker Compose.

0 commit comments

Comments
 (0)