Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Chinchilla <chris@kilt.io>
  • Loading branch information
ChrisChinchilla committed Dec 19, 2023
1 parent 840dde2 commit 0669157
Showing 1 changed file with 9 additions and 24 deletions.
33 changes: 9 additions & 24 deletions docs/develop/01_sdk/04_integrate/04_extension_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,19 @@ import TabItem from '@theme/TabItem';
The KILT Extension API is a JavaScript and TypeScript library that provides helper functions for interacting with KILT extensions.
It facilitates communication between your application and KILT extensions.

## Installation

Add the package:

<Tabs groupId="ts-js-choice">
<TabItem value='ts' label='Typescript' default>

```bash
yarn add @kiltprotocol/kilt-extension-api
```

</TabItem>
<TabItem value='js' label='Javascript'>
## Installation

```bash
npm install --save @kiltprotocol/kilt-extension-api
```
Add the package:

</TabItem>
</Tabs>
```bash npm2yarn
npm install --save @kiltprotocol/kilt-extension-api
```

## Initialize Extension API

Before your application can communicate with KILT extensions, call the `initializeKiltExtensionAPI()` method to signal the API versions supported by your application so the extension can inject the appropriate scripts.
Before your application can communicate with KILT extensions, call the `initializeKiltExtensionAPI()` method to signal the API versions supported by your application so the extension can inject the appropriate scripts. This should happen at the earliest point possible on page load, or it won't inject the scripts.

<Tabs groupId="ts-js-choice">
<TabItem value='ts' label='Typescript' default>
Expand Down Expand Up @@ -151,20 +140,16 @@ The following is an example of how you can use this method in a React applicatio
</TabItem>
</Tabs>

## Well-Known DID Configuration
## DID Configuration

You need [an existing DID configuration](../../01_sdk/02_cookbook/01_dids/00_generate_keys.md) setup for your application to communicate with KILT extensions.

This library helps set up the [Well-Known DID Configuration](https://identity.foundation/.well-known/resources/did-configuration/) as required by the [KILT Credential API specification](https://github.com/KILTprotocol/spec-ext-credential-api).

### Using the CLI Tool

This library includes a CLI tool to create a [DID Configuration Resource](https://identity.foundation/.well-known/resources/did-configuration/#did-configuration-resource). This resource is necessary to establish a secure, end-to-end encrypted communication channel between a conforming browser extension and the application backend.

:::warning KILT Account
The `createDidConfig` CLI tool **only** works if you installed the package with Yarn.
:::
Run the CLI tool using Yarn as follows:

```bash
Expand Down

0 comments on commit 0669157

Please sign in to comment.