Skip to main content

Key Generation

Generate threshold MPC key shares that are distributed across MPC nodes. The raw private key is never assembled in one place.


GENERATE_KEY_SHARE

GENERATE_KEY_SHARE MPC Workflow Component

Generate a new threshold key share. Returns a keyId — the share is stored securely in the MPC node network and never leaves.

Keep your key ID safe

The keyId is the only reference to your key shares stored in the MPC node network. If you lose your key ID, your key is gone forever — we cannot recover it for you. Store it permanently in your database immediately after generation.

Config

FieldTypeRequiredDescription
serversArray<'OFFICIAL_1' | 'OFFICIAL_2' | 'OFFICIAL_3'>YesMPC servers to generate the key share across (minimum 2)

Inputs

FieldTypeDescription
curve'SECP256k1' | 'ED25519' | 'P256' | 'P384' | 'P521' | 'ED448' | 'SECP256K1_SCHNORR'Elliptic curve for key generation (see table below)
thresholdnumberMinimum shares required to sign (e.g. 2 for a 2-of-3 setup)

Supported curves

ValueAliasUse case
SECP256k1secp256k1EVM (Ethereum, Polygon, etc.) and Bitcoin (ECDSA)
ED25519Ed25519Solana and other EdDSA chains
P256secp256r1 / prime256v1NIST P-256 — WebAuthn, Apple Secure Enclave, passkeys
P384secp384r1NIST P-384 — high-security government / enterprise
P521secp521r1NIST P-521 — maximum NIST security level
ED448Ed448 / GoldilocksEdwards 448-bit — higher security than Ed25519
SECP256K1_SCHNORRBIP-340 SchnorrBitcoin Taproot (P2TR)

Outputs

FieldTypeDescription
keyIdstringUnique key share identifier — store this permanently
rootPublicKeystring (hex)Root public key derived from the combined shares

SDK example

import { WorkspaceClient, ComponentModule } from 'caller-sdk';
const workspace = new WorkspaceClient({ apiKey: process.env.WR_API_KEY! });

const key = await workspace.call(ComponentModule.GENERATE_KEY_SHARE, {
curve: 'SECP256k1', // or 'ED25519' | 'P256' | 'P384' | 'P521' | 'ED448' | 'SECP256K1_SCHNORR'
threshold: 2,
}).promise();

// ⚠️ Store key.keyId in your database immediately
console.log(key.keyId); // UUID
console.log(key.rootPublicKey); // hex-encoded root public key

In a workflow

[Trigger: curve, threshold]


GENERATE_KEY_SHARE ← servers config (OFFICIAL_1, OFFICIAL_2, OFFICIAL_3)
│ keyId

[Store keyId in database — required for all future operations]


GET_*_DERIVATION_PATH
│ derivationPath

COMPUTE_PUBLIC_KEY
│ publicKey

COMPUTE_*_ADDRESS
│ address

[Output]