Skip to content

Commit ad0506f

Browse files
author
Chris Chinchilla
committed
Draft
Signed-off-by: Chris Chinchilla <chris@kilt.io>
1 parent 96a1d81 commit ad0506f

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

docs/develop/01_sdk/04_integrate/04_extension_api.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,24 +171,30 @@ The `createDidConfig` CLI tool **only** works if you installed the package with
171171

172172
Run the CLI tool using Yarn as follows:
173173

174-
<!-- TODO: More info on these -->
175-
176174
```bash
177175
yarn createDidConfig --did <your DID> --origin <your domain> --assertionMethod <id of your DID's assertionMethod key> --seed <seed or mnemonic of the assertionMethod key>
178176
```
179177
180-
Use the tool's `--help` flag to see all available options:
178+
:::info
179+
180+
- `did`: DID of the issuer (and subject) of the Domain Linkage Credential. If omitted, attempts to infer this from the `assertionMethod`.
181+
- `seed`: Mnemonic or seed for the `assertionMethod` key used for issuing a new credential.
182+
- `origin`: Domain of the application that will be using the DID Configuration Resource.
183+
- `assertionMethod`: ID of the `assertionMethod` key used for issuing a new credential.
184+
:::
185+
186+
Use the `--help` flag to see all available options:
181187
182188
```bash
183189
yarn createDidConfig --help
184190
```
185191
186192
### Integration into an App
187193
188-
Similar functionality to the CLI tool is available for use in application code using the `kilt-extension-api/wellKnownDidConfiguration` subpath:
194+
Similar functionality to the CLI tool is available for use in application code using the `@kiltprotocol/extension-api/wellKnownDidConfiguration` subpath:
189195
190196
```ts
191-
import { createCredential, didConfigResourceFromCredential } from './wellKnownDidConfiguration/index.js'
197+
import { createCredential, didConfigResourceFromCredential } from '@kiltprotocol/extension-api/wellKnownDidConfiguration'
192198
193199
const credential = await createCredential(
194200
({ data }) => {
@@ -204,9 +210,9 @@ const didConfigResource = didConfigResourceFromCredential(credential)
204210
This module also assists in verifying a DID configuration resource within an extension context:
205211
206212
```ts
207-
import { verifyDidConfigResource } from './wellKnownDidConfiguration/index.js'
213+
import { verifyDidConfigResource } from '@kiltprotocol/extension-api/wellKnownDidConfiguration'
208214
209-
// load didConfigResource from https://example.com/.well-known/did-configuration.json
215+
load didConfigResource from https://example.com/.well-known/did-configuration.json
210216
211217
const didLinkedToOrigin = await verifyDidConfigResource(didConfigResource, 'https://example.com')
212218

0 commit comments

Comments
 (0)