Skip to main content

ZKML SDK

Zero-knowledge ML — prove inference, verify proofs, register models on-chain

Operations

Generated Reference

Overview

Zero-knowledge ML — prove inference, verify proofs, register models on-chain

Available Operations

lucidGenerateZkmlProof

Generate a zero-knowledge proof for a model inference run. The proof attests that a specific model produced a specific output without revealing the model weights or full input.

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<operations.LucidGenerateZkmlProofResponse>

Errors

lucidVerifyZkmlProof

Verify a zkML Groth16 proof. Performs off-chain verification first, then optionally submits for on-chain verification via the ecPairing precompile on EVM chains.

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<models.ZkMLVerifyResponse>

Errors

lucidRegisterZkmlModel

Register a model’s Groth16 verifying key on-chain, enabling future proofs for this model to be verified by the ZkMLVerifier smart contract.

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<models.SuccessResponse>

Errors

lucidListZkmlModels

List all registered zkML model circuits on a specific chain, including model IDs, verifying key hashes, and registration timestamps.

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<models.ListZkMLModelsResponse>

Errors