Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.lucid.foundation/llms.txt

Use this file to discover all available pages before exploring further.

TypeScript SDK

LucidLayer API: LucidLayer Offchain API. Route groups:
  • /v1/* — Passports, Match, Run, Receipts, Epochs, Payouts, Compute
  • /health/* — System health and dependency checks
  • /api/agents/* — AI Agent MMR, Planner, and Orchestrator

Installation

npm install raijin-labs-lucid-ai

Quick Start

import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";

const sdk = new RaijinLabsLucidAi({
  serverURL: "https://api.lucid.foundation",
});

// Check system health
const health = await sdk.health.checkSystemHealth();
console.log("Status:", health.status);

Authentication

import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";

const sdk = new RaijinLabsLucidAi({
  serverURL: "https://api.lucid.foundation",
  // Add API key auth when the endpoint requires it.
  // security: { bearerAuth: process.env.LUCID_API_KEY },
});

Namespaces

NamespaceDescriptionOperations
sdk.a2aGoogle A2A protocol — agent cards, task submission, and task lifecycle6
sdk.agentsDEPRECATED: Legacy agent MMR orchestration (use AgentDeploy, AgentMirror instead)19
sdk.agentscrosschainCross-chain agent operations.2
sdk.anchoringDePIN anchoring control plane — query, verify, and trace artifact anchor records5
sdk.chainsSupported chain and network metadata.2
sdk.computeCompute node heartbeat registration and health monitoring3
sdk.crosschainEVM multi-chain operations — chain status, ERC-8004 registration, cross-chain reputation and payouts2
sdk.deployAgent deployment workflows.8
sdk.disputesEscrow dispute resolution — open, submit evidence, resolve, appeal5
sdk.epochsEpoch lifecycle — creation, finalization, on-chain anchoring, and retry12
sdk.escrowCross-chain escrow lifecycle — create, release, dispute, and query4
sdk.healthSystem health — liveness, readiness, and per-dependency status checks7
sdk.identityCross-chain identity bridging — CAIP-10 linking, resolution, and chain discovery5
sdk.launchAgent launch flows.6
sdk.matchPolicy-based compute matching and route planning3
sdk.memoryAgent memory — episodic, semantic, procedural, entity, trust-weighted, temporal types with hash-chain provenance19
sdk.mirrorMirroring and projection operations.4
sdk.modulesERC-7579 module management — install, uninstall, and configure policy/payout modules5
sdk.passportsAI asset identity — create, list, update, delete model/compute/tool/dataset/agent passports15
sdk.paymasterERC-4337 gas sponsorship — sponsor transactions, estimate fees, check rates3
sdk.paymentsx402 payment configuration — pricing, facilitators, grants, and subscription10
sdk.payoutsRevenue split calculation and payout execution (basis-point math)4
sdk.payoutscrosschainCross-chain payout operations.2
sdk.receiptsCryptographic receipts — create, verify, and generate MMR inclusion proofs7
sdk.reputationPluggable reputation scoring — algorithms, compute scores, and composite aggregation3
sdk.reputationcrosschainCross-chain reputation operations.5
sdk.revenueRevenue and share accounting.3
sdk.runOpenAI-compatible inference (chat completions) and model listing2
sdk.sharesShare token launch and revenue airdrop for fractional AI asset ownership3
sdk.tbaERC-6551 Token Bound Accounts — create and query agent wallets2
sdk.walletWallet and account helpers.4
sdk.webhooksDeployment webhook receivers — normalizes provider-specific callbacks into deployment events1
sdk.zkmlZero-knowledge ML — prove inference, verify proofs, register models on-chain4

Supported Runtimes

This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features: Runtime environments that are explicitly supported are:
  • Evergreen browsers which include: Chrome, Safari, Edge, Firefox
  • Node.js active and maintenance LTS releases
    • Currently, this is v18 and v20
  • Bun v1 and above
  • Deno v1.39
    • Note that Deno does not currently have native support for streaming file uploads backed by the filesystem (issue link)
The following tsconfig.json options are recommended for projects using this SDK in order to get static type support for features like async iterables, streams and fetch-related APIs (for await...of, AbortSignal, Request, Response and so on):
{
  "compilerOptions": {
    "target": "es2020", // or higher
    "lib": ["es2020", "dom", "dom.iterable"]
  }
}
While target can be set to older ECMAScript versions, it may result in extra, unnecessary compatibility code being generated if you are not targeting old runtimes.

Source