SolanaSolana Pre-Alpha is live! dWallets now support Solana for native cross-chain signing.
Ika LogoIka Docs
Ika Client

Creating a Ika Client

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 { SuiGrpcClient } from '@mysten/sui/grpc';
 
const client = new SuiGrpcClient({
	baseUrl: 'https://fullnode.testnet.sui.io:443', // mainnet / testnet
	network: 'testnet',
});
 
const ikaClient = new IkaClient({
	suiClient: client,
	config: getNetworkConfig('testnet'), // mainnet / testnet
});
 
await ikaClient.initialize(); // This will initialize the Ika Client and fetch the Ika protocol state and objects.

Use gRPC against public fullnodes

Public Sui fullnodes no longer serve JSON-RPC, so a SuiJsonRpcClient pointed at fullnode.mainnet.sui.io / fullnode.testnet.sui.io fails with Method not found. Ika Client accepts any ClientWithCoreApi implementation — SuiGrpcClient, a GraphQL client, or SuiJsonRpcClient against an endpoint that still serves JSON-RPC (a localnet or a private fullnode).

On this page