Skip to main content

Ika Client

🚧 Under Construction 🚧
This SDK is still in an experimental phase. We advise you use the SDK with localnet.

Ika Client is the main entry point for interacting with the Ika protocol. It provides an easy way to query for the Ika protocol state and objects.

Info

We recommend you to have a single instance of Ika Client for your application. This enables caching of the Ika protocol state and objects.

Create a Ika Client​

import { getNetworkConfig, IkaClient } from '@ika.xyz/sdk';
import { getFullnodeUrl, SuiClient } from '@mysten/sui/client';

const client = new SuiClient({ url: getFullnodeUrl('testnet') }); // mainnet / testnet / localnet

const ikaClient = new IkaClient({
suiClient: client,
config: getNetworkConfig('testnet'), // mainnet / testnet / localnet
});

await ikaClient.initialize(); // This will initialize the Ika Client and fetch the Ika protocol state and objects.