> ## 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.

# Crosschain SDK

> EVM multi-chain operations — chain status, ERC-8004 registration, cross-chain reputation and payouts

# Crosschain SDK

EVM multi-chain operations — chain status, ERC-8004 registration, cross-chain reputation and payouts

## Operations

| Method                    | Description                    |
| ------------------------- | ------------------------------ |
| `lucidCrossChainValidate` | Validate a receipt cross-chain |
| `lucidCrossChainRoute`    | Chain-aware compute routing    |

## Generated Reference

### Overview

EVM multi-chain operations — chain status, ERC-8004 registration, cross-chain reputation and payouts

#### Available Operations

* [lucidCrossChainValidate](#lucidcrosschainvalidate) - Validate a receipt cross-chain
* [lucidCrossChainRoute](#lucidcrosschainroute) - Chain-aware compute routing

### lucidCrossChainValidate

Validate a receipt locally and optionally submit the validation on-chain
via the ERC-8004 Validation Registry.

#### Example Usage

```typescript theme={null}
import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";

const raijinLabsLucidAi = new RaijinLabsLucidAi();

async function run() {
  const result = await raijinLabsLucidAi.crossChain.lucidCrossChainValidate({
    receiptHash: "a3f2b8c1d4e5f6789012345678901234567890abcdef1234567890abcdef1234",
    runId: "run_abc123def456",
    signature: "3045022100...",
    chainId: "base",
  });

  console.log(result);
}

run();
```

#### Standalone function

The standalone function version of this method:

```typescript theme={null}
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { crossChainLucidCrossChainValidate } from "raijin-labs-lucid-ai/funcs/crossChainLucidCrossChainValidate.js";

// Use `RaijinLabsLucidAiCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raijinLabsLucidAi = new RaijinLabsLucidAiCore();

async function run() {
  const res = await crossChainLucidCrossChainValidate(raijinLabsLucidAi, {
    receiptHash: "a3f2b8c1d4e5f6789012345678901234567890abcdef1234567890abcdef1234",
    runId: "run_abc123def456",
    signature: "3045022100...",
    chainId: "base",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("crossChainLucidCrossChainValidate failed:", res.error);
  }
}

run();
```

#### Parameters

| Parameter              | Type                                                                                                                                                                 | Required             | Description                                                                                                                                                                    |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request`              | [operations.LucidCrossChainValidateRequest](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidcrosschainvalidaterequest.md) | :heavy\_check\_mark: | The request object to use for the request.                                                                                                                                     |
| `options`              | RequestOptions                                                                                                                                                       | :heavy\_minus\_sign: | Used to set various options for making HTTP requests.                                                                                                                          |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options)                                                                              | :heavy\_minus\_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries`      | [RetryConfig](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/lib/utils/retryconfig.md)                                                          | :heavy\_minus\_sign: | Enables retrying HTTP requests under certain failure conditions.                                                                                                               |

#### Response

**Promise\<[operations.LucidCrossChainValidateResponse](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidcrosschainvalidateresponse.md)>**

#### Errors

| Error Type                           | Status Code | Content Type     |
| ------------------------------------ | ----------- | ---------------- |
| errors.ErrorResponse                 | 400         | application/json |
| errors.ErrorResponse                 | 500         | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX    | \*/\*            |

### lucidCrossChainRoute

Route with chain\_id parameter for chain-aware compute matching.
Extends the standard /v1/match with cross-chain context.

#### Example Usage

```typescript theme={null}
import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";

const raijinLabsLucidAi = new RaijinLabsLucidAi();

async function run() {
  const result = await raijinLabsLucidAi.crossChain.lucidCrossChainRoute({
    modelMeta: {
      "key": "<value>",
      "key1": "<value>",
    },
    policy: {
      "key": "<value>",
    },
    computeCatalog: [
      {
        "key": "<value>",
      },
      {

      },
      {

      },
    ],
  });

  console.log(result);
}

run();
```

#### Standalone function

The standalone function version of this method:

```typescript theme={null}
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { crossChainLucidCrossChainRoute } from "raijin-labs-lucid-ai/funcs/crossChainLucidCrossChainRoute.js";

// Use `RaijinLabsLucidAiCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raijinLabsLucidAi = new RaijinLabsLucidAiCore();

async function run() {
  const res = await crossChainLucidCrossChainRoute(raijinLabsLucidAi, {
    modelMeta: {
      "key": "<value>",
      "key1": "<value>",
    },
    policy: {
      "key": "<value>",
    },
    computeCatalog: [
      {
        "key": "<value>",
      },
      {
  
      },
      {
  
      },
    ],
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("crossChainLucidCrossChainRoute failed:", res.error);
  }
}

run();
```

#### Parameters

| Parameter              | Type                                                                                                                                                           | Required             | Description                                                                                                                                                                    |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request`              | [operations.LucidCrossChainRouteRequest](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidcrosschainrouterequest.md) | :heavy\_check\_mark: | The request object to use for the request.                                                                                                                                     |
| `options`              | RequestOptions                                                                                                                                                 | :heavy\_minus\_sign: | Used to set various options for making HTTP requests.                                                                                                                          |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options)                                                                        | :heavy\_minus\_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries`      | [RetryConfig](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/lib/utils/retryconfig.md)                                                    | :heavy\_minus\_sign: | Enables retrying HTTP requests under certain failure conditions.                                                                                                               |

#### Response

**Promise\<[operations.LucidCrossChainRouteResponse](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidcrosschainrouteresponse.md)>**

#### Errors

| Error Type                           | Status Code | Content Type     |
| ------------------------------------ | ----------- | ---------------- |
| errors.ErrorResponse                 | 400         | application/json |
| errors.ErrorResponse                 | 500         | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX    | \*/\*            |
