Rust SDK
Async client for backend services. Same shapes as the TypeScript SDK.
The mpckit crate is the Rust client for the same HTTP surface
@mpckit/sdk consumes. v1 covers introspection, billing, dWallet
state, and the two-phase sign API as low-level methods. The high-level
zero-trust DKG and centralized signature ceremonies require WASM-
equivalent crypto; that lands in a future release behind a crypto
feature once the upstream Rust crate is wired in.
At a glance
use mpckit::{MPCKit, Curve, Network};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let api = MPCKit::builder()
.base_url("https://api.mpckit.xyz")
.api_key(std::env::var("MPCKIT_API_KEY")?)
.network(Network::Testnet)
.build()?;
let health = api.health().await?;
println!("{} ok={}", health.service, health.ok);
let pp = api.protocol_parameters(Curve::Secp256k1).await?;
println!("{} bytes of public params", pp.len());
Ok(())
}Where to go next
Setup
Cargo dependencies, builder, network selection.
Introspection
health, network_info, protocol_parameters.
Billing
deposit, balance, pricing, declare, history.
dWallets
list_dwallets, get_dwallet, the DWallet type.
Low-level onboarding
Drive DKG step by step from your own crypto pipeline.
Low-level signing
The two-phase sign API: prepare, submit, poll.
High-level (crypto feature)
onboard / sign once the crypto feature lands.
Errors
The MPCKitError variants and how to match them.
Utilities
Idempotency keys and shared helpers.