Skip to main content

Getting Started

warning

You can use kukai-embed on ghostnet for local development. However, if you intend to use kukai-embed on mainnet, your domain needs to be whitelisted. Send inquiries to contact@kukai.app.

Installation​

Install the kukai-embed npm package

npm install kukai-embed
# or
yarn add kukai-embed

Initialization​

Kukai-Embed needs only to be constructed and initialized:

import { KukaiEmbed, Networks } from "kukai-embed";

// construct the embed instance using mainnet (also the default value)
const embed = new KukaiEmbed({
net: Networks.mainnet,
});

// wait for the embedded Kukai instance to be initialized
await embed.init();
Tip

Kukai-embed can only be loaded in OAuth compatible browsers, otherwise, social authentication flows will likely be blocked by social providers. Visit our Troubleshooting page for more information.

Examples​

See the examples directory for simple examples of Kukai-Embed appearing in consuming applications.

Building​

To build Kukai-Embed, use yarn build or npm run build.

Running unit tests​

To run the unit tests, use yarn test or npm run test. Unit tests make use of Jest and JS-DOM.