https://github.com/selfkeyfoundation/selfkey-did-resolver
Library for resolving DIDs in SelfKey method space
https://github.com/selfkeyfoundation/selfkey-did-resolver
Last synced: over 1 year ago
JSON representation
Library for resolving DIDs in SelfKey method space
- Host: GitHub
- URL: https://github.com/selfkeyfoundation/selfkey-did-resolver
- Owner: SelfKeyFoundation
- Created: 2018-04-06T03:18:43.000Z (over 8 years ago)
- Default Branch: develop
- Last Pushed: 2022-12-10T16:16:36.000Z (over 3 years ago)
- Last Synced: 2025-04-09T10:01:52.679Z (over 1 year ago)
- Language: JavaScript
- Size: 1.13 MB
- Stars: 0
- Watchers: 17
- Forks: 3
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# SelfKey DID Resolver
Library for resolving DIDs in SelfKey method space
## Install
```bash
npm i --save selfkey-did-resolver
```
## Usage
The following example script shows how we can integrate the did-resolver library:
```javascript
const selfkeyResolver = require('selfkey-did-resolver')
const did = 'did:key:0x62dfbf9cee9c6eded64d7e0b1e72165f0d26a7c8'
runTest = async () => {
const doc = await selfkeyResolver(did)
console.log(JSON.stringify(doc, undefined, 2))
}
runTest()
```
Alternatively you can run the script via the command line by passing the DID string as an argument:
```bash
node src/index.js did:key:0x62dfbf9cee9c6eded64d7e0b1e72165f0d26a7c8
```
## Tests
```bash
npm run test
```