{"id":18258197,"url":"https://github.com/cheqd/did-resolver","last_synced_at":"2025-04-04T18:31:36.463Z","repository":{"id":38327852,"uuid":"473956234","full_name":"cheqd/did-resolver","owner":"cheqd","description":"DID Resolver for the did:cheqd method","archived":false,"fork":false,"pushed_at":"2025-03-17T06:41:41.000Z","size":16399,"stargazers_count":11,"open_issues_count":2,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-20T17:06:09.288Z","etag":null,"topics":["cheqd","decentralized-identifiers","hacktoberfest"],"latest_commit_sha":null,"homepage":"https://docs.cheqd.io/identity/advanced/did-resolver","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cheqd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-25T10:00:34.000Z","updated_at":"2025-03-11T10:59:17.000Z","dependencies_parsed_at":"2023-11-21T09:27:06.072Z","dependency_job_id":"9a8e4c90-6d4f-4bcf-acc8-017d1c622ba1","html_url":"https://github.com/cheqd/did-resolver","commit_stats":{"total_commits":261,"total_committers":14,"mean_commits":"18.642857142857142","dds":0.5900383141762452,"last_synced_commit":"ed6c4316e7677563144ed8fa9d50d455416f836b"},"previous_names":[],"tags_count":86,"template":false,"template_full_name":"cheqd/.github","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheqd%2Fdid-resolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheqd%2Fdid-resolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheqd%2Fdid-resolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheqd%2Fdid-resolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cheqd","download_url":"https://codeload.github.com/cheqd/did-resolver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247229427,"owners_count":20905051,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cheqd","decentralized-identifiers","hacktoberfest"],"created_at":"2024-11-05T10:29:35.104Z","updated_at":"2025-04-04T18:31:36.456Z","avatar_url":"https://github.com/cheqd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cheqd DID Resolver\n\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/cheqd/did-resolver?color=green\u0026label=stable%20release\u0026style=flat-square)](https://github.com/cheqd/did-resolver/releases/latest) ![GitHub Release Date](https://img.shields.io/github/release-date/cheqd/did-resolver?color=green\u0026style=flat-square) [![GitHub license](https://img.shields.io/github/license/cheqd/did-resolver?color=blue\u0026style=flat-square)](https://github.com/cheqd/did-resolver/blob/main/LICENSE)\n\n[![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/cheqd/did-resolver?include_prereleases\u0026label=dev%20release\u0026style=flat-square)](https://github.com/cheqd/did-resolver/releases/) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/cheqd/did-resolver/latest?style=flat-square) [![GitHub contributors](https://img.shields.io/github/contributors/cheqd/did-resolver?label=contributors%20%E2%9D%A4%EF%B8%8F\u0026style=flat-square)](https://github.com/cheqd/did-resolver/graphs/contributors)\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/cheqd/did-resolver/dispatch.yml?label=workflows\u0026style=flat-square)](https://github.com/cheqd/did-resolver/actions/workflows/dispatch.yml) [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/cheqd/did-resolver/codeql.yml?label=CodeQL\u0026style=flat-square)](https://github.com/cheqd/did-resolver/actions/workflows/codeql.yml) ![GitHub repo size](https://img.shields.io/github/repo-size/cheqd/did-resolver?style=flat-square)\n\n## ℹ️ Overview\n\nDID methods are expected to provide [standards-compliant methods of DID and DID Document (\"DIDDoc\") production](https://w3c.github.io/did-resolution/#resolver-architectures). The **cheqd DID Resolver** is designed to implement the [W3C DID _Resolution_ specification](https://w3c.github.io/did-resolution/) for [`did:cheqd`](https://docs.cheqd.io/identity/architecture/adr-list/adr-001-cheqd-did-method) method.\n\n### 📝 Architecture\n\nThe [Architecture Decision Record for the cheqd DID Resolver](https://docs.cheqd.io/identity/architecture/adr-list/adr-003-did-resolver) describes the architecture \u0026 design decisions for this software package.\n\n## ✅ Quick Start\n\nIf 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.\n\nOr, make a request from terminal to this hosted REST API:\n\n```bash\ncurl -X GET https://resolver.cheqd.net/1.0/identifiers/did:cheqd:testnet:55dbc8bf-fba3-4117-855c-1e0dc1d3bb47\n```\n\n## 🛠️ Running your own cheqd DID Resolver using Docker\n\nSpinning 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:\n\n```bash\ndocker compose -f docker/docker-compose.yml up --detach\n```\n\n### Configure resolver settings\n\nTo 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:\n\n1. **`MAINNET_ENDPOINT`** : Mainnet Network endpoint as string with the following format\" `\u003cnetworks\u003e,\u003cuseTls\u003e,\u003ctimeout\u003e`. Example: `grpc.cheqd.net:443,true,5s`\n   1. `networks`: A string specifying the Cosmos SDK gRPC endpoint from which the Resolver pulls data. Format: `\u003cresource_url\u003e:\u003cresource_port\u003e`\n   2. `useTls`: Specify whether gRPC connection to ledger should use secure or insecure pulls. Default is `true` since gRPC uses HTTP/2 with TLS as the transport mechanism.\n   3. `timeout`: Timeout (in seconds) to wait for before any ledger requests are considered to have time out.\n2. **`TESTNET_ENDPOINT`** : Testnet Network endpoint as string with the following format\" `\u003cnetworks\u003e,\u003cuseTls\u003e,\u003ctimeout\u003e`. Example: `grpc.cheqd.network:443,true,5s`\n3. **`RESOLVER_LISTENER`**`: A string with address and port where the resolver listens for requests from clients.\n4. **`LOG_LEVEL`**: `debug`/`warn`/`info`/`error` - to define the application log level.\n\n#### gRPC Endpoints used by DID Resolver\n\nOur 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.\n\nYou 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:\n\n```toml\n[grpc]\n\n# Enable defines if the gRPC server should be enabled.\nenable = true\n\n# Address defines the gRPC server address to bind to.\naddress = \"0.0.0.0:9090\"\n```\n\n**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.\n\n## 🧑‍💻 Building your own Docker image\n\n### Using Docker Build\n\nYou can build your own image using `docker build`\n\n```bash\ndocker build --file docker/Dockerfile --target resolver . --tag did-resolver:local\n```\n\n### Using Docker Compose Build\n\nUncomment 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:\n\n```yaml\nbuild:\n  context: ../\n  dockerfile: docker/Dockerfile\n  target: resolver\nimage: did-resolver:local\n# image: ghcr.io/cheqd/did-resolver:${IMAGE_VERSION}\n```\n\nMake sure you comment out the pre-existing `image` property that pulls in a container image from Github Container Registry, as shown above.\n\nYou can also do _just_ a build with:\n\n```bash\ndocker-compose -f docker/docker-compose.yml --env-file docker/docker-compose.env build --no-cache\n```\n\n### Running a custom built image\n\nThe instructions to configure and run the resolver are the same as when using the pre-built image.\n\n## 🌐 Resolving `did:cheqd` via Universal Resolver\n\nThe [resolver.cheqd.net](https://resolver.cheqd.net/) API endpoint is run by the cheqd team and only handles `did:cheqd` credentials.\n\nIf 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.\n\n### Using a pre-existing Universal Resolver endpoint\n\nYou 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:\n\n```bash\ncurl -X GET https://resolver.cheqd.net/1.0/identifiers/did:cheqd:testnet:55dbc8bf-fba3-4117-855c-1e0dc1d3bb47\n```\n\n### Running your own Universal Resolver instance\n\nYou can also run your own instance of Universal Resolver, using the Docker Compose file of the project.\n\nThe [Universal Resolver quick start guide](https://github.com/decentralized-identity/universal-resolver#quick-start) provides instructions on how to do this:\n\n```bash\ngit clone https://github.com/decentralized-identity/universal-resolver\ncd universal-resolver/\ndocker-compose -f docker-compose.yml pull\ndocker-compose -f docker-compose.yml up\n```\n\n## 🧪 Running tests\n\nThis repository has two kinds of tests:\n\n1. **Unit tests**: Test coverage for internal functions and utilities\n2. **Integration tests**: Test coverage for a built version of this software with the ledger.\n\n### Prerequisites\n\nTests are written in [Ginkgo](https://onsi.github.io/ginkgo/), a behaviour-driven test framework for Golang.\n\nTo install Ginkgo, run the following command:\n\n```bash\ngo install github.com/onsi/ginkgo/v2/ginkgo@latest\n```\n\n### Execute unit tests with Ginkgo\n\nUnit tests can be executed without running a Docker container. To execute all unit tests, use the following command:\n\n```bash\nginkgo -r --tags unit --race --randomize-all --randomize-suites --keep-going --trace\n```\n\nThe `unit` tag is specified to only run unit tests.\n\n### Execute integration tests with Ginkgo\n\nTo run integration tests, it's necessary to have a instance of this DID Resolver running. The easiest way to do this is to use the [Docker Compose file under the `tests` directory](./tests/docker-compose-testing.yml), with a few modifications.\n\n#### If you **don't have** an already-built Docker image\n\nTo build a local image for testing, uncomment the `build` section in the Docker Compose file. You can modify the `build` section according to your needs:\n\n```yaml\nbuild:\n  context: ../\n  dockerfile: docker/Dockerfile\n  target: resolver\n```\n\n#### If you **do have** an already-built Docker image\n\nAlternatively, if you want to run tests using an already-built image, just change the image name and tag in the `image` line in the Docker Compose file:\n\n```yaml\n# image: cheqd/did-resolver:staging-latest\nimage: cheqd/did-resolver:local\n```\n\n#### Run the test Docker container\n\nUse Docker Compose to bring the container up (for both scenarios above):\n\n```bash\ndocker compose -f tests/docker-compose-testing.yml up --detach\n```\n\n#### Execute the integration tests\n\nYou can execute the tests as long as you have Ginkgo CLI installed, which targets the tests towards the running Docker container:\n\n```bash\nginkgo -r --tags integration --race --randomize-suites --keep-going --trace\n```\n\n**Note**: By default, the tests target `localhost:8080` as the port where it expects the running DID Resolver instance for testing. If your running instance is at a different address, you can override this by setting a value for the `TEST_HOST_ADDRESS` environment variable _before_ executing the Ginkgo test suite.\n\n```bash\nexport TEST_HOST_ADDRESS=\"where.is.did.resolver.running:port\"\n```\n\nYou can also do this inline without exporting the value:\n\n```bash\nTEST_HOST_ADDRESS=\"where.is.did.resolver.running:port\" ginkgo -r --tags integration --race --randomize-suites --keep-going --trace\n```\n\n### (Alternative) Executing tests with Github Actions\n\nAll tests are run automatically by the [Github Actions `test` workflow](.github/workflows/test.yml) in this repository. Use that workflow for inspiration if you want to customise the test execution; or [Ginkgo documentation on how to customise test execution](https://onsi.github.io/ginkgo/#reporting-and-profiling-suites).\n\nYou can also directly [execute the Github Actions locally using `nektos/act`](https://github.com/nektos/act).\n\n## 📖 Documentation\n\nFurther documentation on [cheqd DID Resolver](https://docs.cheqd.io/product/advanced/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.\n\n## 🐞 Bug reports \u0026 🤔 feature requests\n\nIf you notice anything not behaving how you expected, or would like to make a suggestion / request for a new feature, please create a [**new issue**](https://github.com/cheqd/did-resolver/issues/new/choose) and let us know.\n\n## 💬 Community\n\nOur [**Discord server**](http://cheqd.link/discord-github) is the primary chat channel for the open-source community, software developers, and node operators.\n\nPlease reach out to us there for discussions, help, and feedback on the project.\n\n## 🙋 Find us elsewhere\n\n[![Telegram](https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge\u0026logo=telegram\u0026logoColor=white)](https://t.me/cheqd) [![Discord](https://img.shields.io/badge/Discord-7289DA?style=for-the-badge\u0026logo=discord\u0026logoColor=white)](http://cheqd.link/discord-github) [![Twitter](https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge\u0026logo=twitter\u0026logoColor=white)](https://twitter.com/intent/follow?screen_name=cheqd_io) [![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white)](http://cheqd.link/linkedin) [![Medium](https://img.shields.io/badge/Medium-12100E?style=for-the-badge\u0026logo=medium\u0026logoColor=white)](https://blog.cheqd.io) [![YouTube](https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge\u0026logo=youtube\u0026logoColor=white)](https://www.youtube.com/channel/UCBUGvvH6t3BAYo5u41hJPzw/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheqd%2Fdid-resolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcheqd%2Fdid-resolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheqd%2Fdid-resolver/lists"}