Skip to main content

Receipts SDK

Cryptographic receipts — create, verify, and generate MMR inclusion proofs

Operations

Generated Reference

Overview

Cryptographic receipts — create, verify, and generate MMR inclusion proofs

Available Operations

create

Create a new cryptographic receipt for a completed inference run and append it to the Merkle Mountain Range. The receipt is Ed25519-signed by the orchestrator and includes timing metrics.

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<operations.LucidCreateReceiptResponse>

Errors

get

Retrieve a single receipt by its UUID, including the receipt hash, Ed25519 signature, signer public key, and inference metrics (tokens, latency, TTFT).

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<operations.LucidGetReceiptResponse>

Errors

verify

Verify a receipt’s integrity by checking its SHA-256 hash against the canonical JSON content, validating the Ed25519 signature, and confirming MMR inclusion. Returns per-check pass/fail status.

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<models.ReceiptVerification>

Errors

getProof

Retrieve the MMR inclusion proof for a receipt, containing the sibling hashes needed to verify the receipt’s membership in the Merkle Mountain Range.

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<operations.LucidGetReceiptProofResponse>

Errors

lucidVerifyReceiptByHash

Verify a receipt using its 64-character hex hash. Returns the inclusion proof, on-chain anchoring status, and epoch information. This is the primary verification endpoint for the Fluid Compute protocol.

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<models.ReceiptHashVerification>

Errors

getMmrRoot

Retrieve the current global MMR root hash and total leaf count. The root is recomputed via right-to-left peak bagging after each receipt append.

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<operations.LucidGetMmrRootResponse>

Errors

getSignerPubKey

Retrieve the Ed25519 public key used by the orchestrator to sign receipts. Clients use this key to independently verify receipt signatures offline.

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<operations.LucidGetSignerPubkeyResponse>

Errors