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
Setup
Install, construct, and configure MPCKit.
Onboarding
DKG end-to-end via api.onboard.
Signing
Producing a raw signature with api.sign.
dWallets
Listing, fetching, and the DWallet shape.
Billing
Deposits, balance, pricing, and history.
Introspection
Health, network info, and protocol parameters.
Crypto engines
Inline vs Web Worker crypto for browser apps.
Errors
Typed error classes and how to handle them.
Utilities
Hex helpers, idempotency keys, raw HTTP escape hatch.