{"_id":"@caelumlabs/resolver","_rev":"4-c0441e0290ce9177186391c689f676d0","name":"@caelumlabs/resolver","dist-tags":{"latest":"0.1.5"},"versions":{"0.1.5":{"name":"@caelumlabs/resolver","version":"0.1.5","description":"Lorena DID Resolver","main":"src/index.js","author":{"name":"Caelum Labs"},"license":"MIT","private":false,"publishConfig":{"access":"public"},"scripts":{"test":"jest --silent","coverage":"jest --coverage","lint":"eslint ./src","lint-fix":"eslint ./src --fix"},"dependencies":{"@caelumlabs/blockchain-substrate":"^0.1.5","@caelumlabs/storage":"^0.1.5","bip39":"^3.0.2","debug":"^4.1.1","did-resolver":"^1.1.0"},"gitHead":"4c0aeec68441a7f69a542c1db3a801d29f2f7349","_id":"@caelumlabs/resolver@0.1.5","_nodeVersion":"12.10.0","_npmVersion":"lerna/3.22.0/node@v12.10.0+x64 (linux)","dist":{"integrity":"sha512-is0hqUW3bH+VSYU6g/4CuQZAr9lmTyz2eMKq0NCgfayBfkPzBzFph83eOMRixMLFBJnM/oPDRagXNwPZiVnRkg==","shasum":"5f51019d12222968aeb9b6ad118b2768337e4472","tarball":"https://registry.npmjs.org/@caelumlabs/resolver/-/resolver-0.1.5.tgz","fileCount":7,"unpackedSize":418482,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2CHvCRA9TVsSAnZWagAAiyEP/2jbMqXs49zr34Bp3U11\nqvWFSMxjDKq5ew8Yqe13XiEIayPF/QRIzOOXrMAywMQCm14qK8LSUnaFsadp\no/+sxuU7z/OR5GWjgKrqMnnJEE8ClmD+Z/SLNLT1wTzCltRmrnNbYJkxKPVd\nslq5hfHUHw4pyZE0By4wtHCqiaBelk6DIOa4m7Fn1S2CPeIOivYOPoegELYm\ngYlhLv0Kw42AyOY3RaNS4ZTjXVygRr51yXhLM9cX2ScNl0aP/CueFwEriBwO\niE43MZaZgbJBTLUFVK9iHtmq4f6NaCdAx5WoaD9ooVpHoUjzp4TNb2+PcnQN\nCq1bT/ouaMoRyvRa6rwS6BbHBDNIvd+VAIEkxWuU0rrPT68SA3CCRvs9qQFa\nVehy5NEYw9drXsSIq3LIjEGc9GXm6EfUYxdlGp9qnq4q+vdtjj1t7mWYqFmB\nEehsYksVwtKzraL3FsT8q0TrEPmf1SW2LRog8k6kkA8Q5LmkNu4qKpCzBESA\nk9BSfAxCCoAYDr3KxuwPpq86gyhXW8YOpLbGIPCln1H03hVXinpcCw/J+JJa\nyzSh7qwcDGQy230ccxXetVzLOFfz36QCTID+AW/YbkwJXmm4H0cHNYjwnxcj\n9hkG6FhQ1g7trZPhAwQEE1hhoYFeq/a6F0zobxhbCWq5GXZ2qf/NWn7d6n/Y\nQwrv\r\n=nIGJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmQQ1FwdoYrN7vnEvwfJq+5ddxSSeZjL7lIdFvpNc6SwIhAPySRImjkOwMONKaT4iLlLhFRfDWRWmjO22TeR4CKzIS"}]},"maintainers":[{"name":"alexpuig","email":"alex@caelumlabs.com"}],"_npmUser":{"name":"alexpuig","email":"alex@caelumlabs.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/resolver_0.1.5_1591263034346_0.39955363973521285"},"_hasShrinkwrap":false}},"time":{"created":"2020-06-04T09:30:34.133Z","0.1.5":"2020-06-04T09:30:34.579Z","modified":"2022-04-04T21:30:06.500Z"},"maintainers":[{"email":"alex@caelumlabs.com","name":"alexpuig"}],"description":"Lorena DID Resolver","author":{"name":"Caelum Labs"},"license":"MIT","readme":"# Lorena DID Resolver\n\n[![Build Status](https://travis-ci.com/lorena-ssi/did-resolver.svg?branch=master)](https://travis-ci.com/lorena-ssi/did-resolver)\n[![Coverage Status](https://coveralls.io/repos/github/lorena-ssi/did-resolver/badge.svg?branch=master)](https://coveralls.io/github/lorena-ssi/did-resolver?branch=master&service=github)\n\nResolve DID Documents from DIDs in the Lorena namespace.  This is is a plug-in for the [Decentralized Identity Foundation](https://identity.foundation) [did-resolver](https://www.npmjs.com/package/did-resolver).\n\n## Network configurations (static data)\nThere are two static methods (no blockchain calls) which are useful for retrieving endpoints for different Lorena networks:\n\n```javascript\ngetInfoForNetwork('labdev')\ngetInfoForDid('did:lor:labdev:2nQtiQG6Cgm1GYTBaaKAgr76uY7iSexUkqX')\n```\n... and both return the same data:\n```javascript\n{ \"type\": \"substrate\", \"blockchainEndpoint\": \"wss://labdev.substrate.lorena.tech\", \"matrixEndpoint\": \"https://labdev.matrix.lorena.tech\"}\n```\n\n## DID Resolver (retrieve DID Document from blockchain data)\nThe Lorena DID resolver exposes a function called `getResolver` which will return an object containing one of these key/value pairs.\n```js\nimport { Resolver } from 'did-resolver'\nimport LorenaDidResolver from '@lorena-ssi/did-resolver'\n\n// returns an object of { methodName: resolveFunction}\nlorResolver = LorenaDidResolver.getResolver()\n\n// If you are using only one method you can simply pass the result of `getResolver()` into the constructor\nconst resolver = new Resolver(lorResolver)\n```\n\nThe resolver presents a simple `resolve()` function that returns a ES6 Promise returning the DID document.\n\n```js\nresolver.resolve('did:lor:and:2nQtiQG6Cgm1GYTBaaKAgr76uY7iSexUkqX/some/path#fragment=123').then(doc => console.log)\n\n// You can also use ES7 async/await syntax\nconst doc = await resolver.resolve('did:lor:and:2nQtiQG6Cgm1GYTBaaKAgr76uY7iSexUkqX/some/path#fragment=123')\n```\n\nOutside of the standard `resolve()` method, LorenaDidResolver also provides a simple method to retrieve the public key for a DID, whether stored directly on the blockchain, in a DID Document, or through IPLD.\n\n```js\nconst pubKey = LorenaDidResolver.getPublicKeyForDid('did:lor:maxtest:2nQtiQG6Cgm1GYTBaaKAgr76uY7iSexUkqX')\n\n```\n## License\n\nMIT\n","readmeFilename":"README.md"}