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

# Wallet SDK

> Wallet and account helpers.

# Wallet SDK

Wallet and account helpers.

## Operations

| Method                       | Description                      |
| ---------------------------- | -------------------------------- |
| `lucidGetAgentWalletBalance` | Get agent wallet balance         |
| `lucidAgentWalletSend`       | Send from agent wallet           |
| `lucidSetAgentWalletLimits`  | Set agent wallet spending limits |
| `lucidGetAgentWalletPolicy`  | Get agent wallet policy          |

## Generated Reference

### Overview

#### Available Operations

* [lucidGetAgentWalletBalance](#lucidgetagentwalletbalance) - Get agent wallet balance
* [lucidAgentWalletSend](#lucidagentwalletsend) - Send from agent wallet
* [lucidSetAgentWalletLimits](#lucidsetagentwalletlimits) - Set agent wallet spending limits
* [lucidGetAgentWalletPolicy](#lucidgetagentwalletpolicy) - Get agent wallet policy

### lucidGetAgentWalletBalance

Retrieve the wallet balance for a deployed agent's PDA wallet, including SOL and token balances on the configured chain.

#### Example Usage

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

const raijinLabsLucidAi = new RaijinLabsLucidAi();

async function run() {
  const result = await raijinLabsLucidAi.agents.wallet.lucidGetAgentWalletBalance({
    agentId: "<id>",
  });

  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 { agentsWalletLucidGetAgentWalletBalance } from "raijin-labs-lucid-ai/funcs/agentsWalletLucidGetAgentWalletBalance.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 agentsWalletLucidGetAgentWalletBalance(raijinLabsLucidAi, {
    agentId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("agentsWalletLucidGetAgentWalletBalance failed:", res.error);
  }
}

run();
```

#### Parameters

| Parameter              | Type                                                                                                                                                                       | Required             | Description                                                                                                                                                                    |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request`              | [operations.LucidGetAgentWalletBalanceRequest](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidgetagentwalletbalancerequest.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.LucidGetAgentWalletBalanceResponse](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidgetagentwalletbalanceresponse.md)>**

#### Errors

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

### lucidAgentWalletSend

Admin-only. Execute a policy-gated transaction from the agent's PDA wallet.

#### Example Usage

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

const raijinLabsLucidAi = new RaijinLabsLucidAi({
  bearerAuth: process.env["RAIJINLABSLUCIDAI_BEARER_AUTH"] ?? "",
});

async function run() {
  const result = await raijinLabsLucidAi.agents.wallet.lucidAgentWalletSend({
    agentId: "<id>",
    body: {
      to: "<value>",
      amount: "634.76",
    },
  });

  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 { agentsWalletLucidAgentWalletSend } from "raijin-labs-lucid-ai/funcs/agentsWalletLucidAgentWalletSend.js";

// Use `RaijinLabsLucidAiCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raijinLabsLucidAi = new RaijinLabsLucidAiCore({
  bearerAuth: process.env["RAIJINLABSLUCIDAI_BEARER_AUTH"] ?? "",
});

async function run() {
  const res = await agentsWalletLucidAgentWalletSend(raijinLabsLucidAi, {
    agentId: "<id>",
    body: {
      to: "<value>",
      amount: "634.76",
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("agentsWalletLucidAgentWalletSend failed:", res.error);
  }
}

run();
```

#### Parameters

| Parameter              | Type                                                                                                                                                           | Required             | Description                                                                                                                                                                    |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request`              | [operations.LucidAgentWalletSendRequest](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidagentwalletsendrequest.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.LucidAgentWalletSendResponse](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidagentwalletsendresponse.md)>**

#### Errors

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

### lucidSetAgentWalletLimits

Admin-only. Set per-transaction and daily spending limits.

#### Example Usage

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

const raijinLabsLucidAi = new RaijinLabsLucidAi({
  bearerAuth: process.env["RAIJINLABSLUCIDAI_BEARER_AUTH"] ?? "",
});

async function run() {
  const result = await raijinLabsLucidAi.agents.wallet.lucidSetAgentWalletLimits({
    agentId: "<id>",
    body: {
      perTxUsd: 4858.69,
      dailyUsd: 8909.2,
    },
  });

  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 { agentsWalletLucidSetAgentWalletLimits } from "raijin-labs-lucid-ai/funcs/agentsWalletLucidSetAgentWalletLimits.js";

// Use `RaijinLabsLucidAiCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raijinLabsLucidAi = new RaijinLabsLucidAiCore({
  bearerAuth: process.env["RAIJINLABSLUCIDAI_BEARER_AUTH"] ?? "",
});

async function run() {
  const res = await agentsWalletLucidSetAgentWalletLimits(raijinLabsLucidAi, {
    agentId: "<id>",
    body: {
      perTxUsd: 4858.69,
      dailyUsd: 8909.2,
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("agentsWalletLucidSetAgentWalletLimits failed:", res.error);
  }
}

run();
```

#### Parameters

| Parameter              | Type                                                                                                                                                                     | Required             | Description                                                                                                                                                                    |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request`              | [operations.LucidSetAgentWalletLimitsRequest](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidsetagentwalletlimitsrequest.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.LucidSetAgentWalletLimitsResponse](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidsetagentwalletlimitsresponse.md)>**

#### Errors

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

### lucidGetAgentWalletPolicy

Retrieve the wallet policy and configuration for an agent, including the wallet address, chain, provider type, and any spending constraints.

#### Example Usage

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

const raijinLabsLucidAi = new RaijinLabsLucidAi();

async function run() {
  const result = await raijinLabsLucidAi.agents.wallet.lucidGetAgentWalletPolicy({
    agentId: "<id>",
  });

  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 { agentsWalletLucidGetAgentWalletPolicy } from "raijin-labs-lucid-ai/funcs/agentsWalletLucidGetAgentWalletPolicy.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 agentsWalletLucidGetAgentWalletPolicy(raijinLabsLucidAi, {
    agentId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("agentsWalletLucidGetAgentWalletPolicy failed:", res.error);
  }
}

run();
```

#### Parameters

| Parameter              | Type                                                                                                                                                                     | Required             | Description                                                                                                                                                                    |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request`              | [operations.LucidGetAgentWalletPolicyRequest](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidgetagentwalletpolicyrequest.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.LucidGetAgentWalletPolicyResponse](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidgetagentwalletpolicyresponse.md)>**

#### Errors

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