MPCKitMPCKit

TypeScript SDK

Overview of @mpckit/sdk. One MPCKit class for every chain ika supports.

@mpckit/sdk exposes a single MPCKit class. It composes a typed HTTP client, a CryptoEngine for the WASM-heavy DKG and centralized signature math, and a lazily-built on-chain reader for protocol public parameters.

Consumers never need to import @ika.xyz/sdk directly. MPCKit wraps everything.

At a glance

import { MPCKit, Curve, Hash, SignatureAlgorithm } from "@mpckit/sdk";
import { randomBytes } from "node:crypto";

const api = new MPCKit({
  baseUrl: "https://api.mpckit.xyz",
  apiKey: process.env.MPCKIT_API_KEY!,
  network: "testnet",
});

const seed = randomBytes(32);

const { dwallet, userSecretKeyShareHex } = await api.onboard({
  seed,
  curve: Curve.SECP256K1,
});

const sig = await api.sign({
  seed,
  dwalletId: dwallet.id,
  curve: Curve.SECP256K1,
  signatureAlgorithm: SignatureAlgorithm.ECDSASecp256k1,
  hashScheme: Hash.SHA256,
  message: new TextEncoder().encode("hello, ika"),
  userSecretKeyShareHex,
});

Where to go next

On this page