{"id":23665670,"url":"https://github.com/intellltech/grano-did-resolver","last_synced_at":"2025-10-09T10:41:40.610Z","repository":{"id":269720565,"uuid":"908241025","full_name":"intellltech/grano-did-resolver","owner":"intellltech","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-25T15:32:21.000Z","size":363,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-22T05:40:46.519Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/intellltech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-25T14:49:45.000Z","updated_at":"2024-12-25T15:32:25.000Z","dependencies_parsed_at":"2024-12-25T16:26:40.910Z","dependency_job_id":"faa7feac-0109-43ab-a2d5-d31874f8ba57","html_url":"https://github.com/intellltech/grano-did-resolver","commit_stats":null,"previous_names":["intellltech/grano-did-resolver"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/intellltech/grano-did-resolver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intellltech%2Fgrano-did-resolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intellltech%2Fgrano-did-resolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intellltech%2Fgrano-did-resolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intellltech%2Fgrano-did-resolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intellltech","download_url":"https://codeload.github.com/intellltech/grano-did-resolver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intellltech%2Fgrano-did-resolver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001275,"owners_count":26083040,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-12-29T06:14:47.302Z","updated_at":"2025-10-09T10:41:40.593Z","avatar_url":"https://github.com/intellltech.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grano DID Resolver\nGrano DID Resolver is a program that returns values according to the [DID specification](https://www.w3.org/TR/did-core/) defined by the [W3C](https://www.w3.org/). It depends on [Sequelize](https://github.com/sequelize/sequelize) and all values refer to the off-chain database.\n\n## How to Use\n0. Create Mariadb and export data from [grano-did-contract](https://github.com/intellltech/grano-did-contract) using [grano-did-exporter](https://github.com/intellltech/grano-did-exporter)\n\n1. Set DB configuration in `.env`\n```env\nDATABASE=grano\nUSERNAME=root\nPASSWORD=password\nDIALECT=mariadb\nHOST=localhost\nPORT=3306\n```\n\n2. Call Resolver\n```index.js\nconst { Resolver } = require('did-resolver')\nconst { getResolver, DatabaseClient } = require('@intellltech/grano-did-resolver')\n\nconst main = async () =\u003e {\n  const dbClient = new DatabaseClient()\n\n  const granoDidResolver = getResolver(dbClient)\n\n  const didResolver = new Resolver(granoDidResolver)\n\n  const didDocument = await didResolver.resolve('did:grn:grano14fsulwpdj9wmjchsjzuze0k37qvw7n7am3reev', {})\n\n  console.dir(didDocument, { depth: 3 })\n}\n\nmain()\n```\n\n## Sample Response\n```js\n{\n  didResolutionMetadata: { contentType: 'application/did+ld+json' },\n  didDocumentMetadata: {},\n  didDocument: {\n    '@context': [\n      'https://www.w3.org/ns/did/v1',\n      'https://w3id.org/security/suites/secp256k1recovery-2020/v2'\n    ],\n    id: 'did:grn:grano14fsulwpdj9wmjchsjzuze0k37qvw7n7am3reev',\n    verificationMethod: [\n      {\n        id: 'did:grn:grano1m2pz9nj72lj2yxnpcmxqwfwk50v35gq7wd399m#controller',\n        type: 'EcdsaSecp256k1RecoveryMethod2020',\n        controller: 'did:grn:grano1m2pz9nj72lj2yxnpcmxqwfwk50v35gq7wd399m'\n      }\n    ],\n    authentication: [\n      'did:grn:grano1m2pz9nj72lj2yxnpcmxqwfwk50v35gq7wd399m#controller'\n    ],\n    assertionMethod: [\n      'did:grn:grano1m2pz9nj72lj2yxnpcmxqwfwk50v35gq7wd399m#controller'\n    ],\n    controller: 'did:grn:grano1m2pz9nj72lj2yxnpcmxqwfwk50v35gq7wd399m',\n    service: [ 'twitter' ]\n  }\n}\n```\n\n## References\n- https://github.com/intellltech/grano-did\n- https://github.com/intellltech/grano-did-client\n- https://github.com/intellltech/grano-did-contract\n- https://github.com/intellltech/grano-did-exporter\n- https://github.com/intellltech/grano-did-node\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintellltech%2Fgrano-did-resolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintellltech%2Fgrano-did-resolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintellltech%2Fgrano-did-resolver/lists"}