@did-core/did-ld-json
Advanced tools
Comparing version 0.1.0 to 0.1.1-unstable.0
@@ -5,3 +5,3 @@ { | ||
"module": "dist/did-ld-json.esm.js", | ||
"version": "0.1.0", | ||
"version": "0.1.1-unstable.0", | ||
"license": "Apache-2.0", | ||
@@ -26,3 +26,3 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@did-core/data-model": "^0.1.0", | ||
"@did-core/data-model": "^0.1.1-unstable.0", | ||
"@size-limit/preset-small-lib": "^4.9.2", | ||
@@ -58,3 +58,3 @@ "husky": "^5.0.9", | ||
}, | ||
"gitHead": "c955cf2e77280eec74a022449257defe52ea08b1" | ||
"gitHead": "e99bbf8ead282e2f496cd2f30a44351de46e7574" | ||
} |
@@ -6,1 +6,19 @@ # @did-core/did-ld-json | ||
``` | ||
## Usage | ||
```ts | ||
import { factory, DidDocument } from '@did-core/data-model'; | ||
import { representation } from '@did-core/did-ld-json'; | ||
const didDocument: DidDocument = factory.build({ | ||
entries: { | ||
'@context': 'https://www.w3.org/ns/did/v1', | ||
id: 'did:example:123', | ||
}, | ||
}); | ||
const representation: Buffer = await didDocument | ||
.addRepresentation({ 'application/did+ld+json': representation }) | ||
.produce('application/did+ld+json'); | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
222717
24