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.
Modules SDK
ERC-7579 module management — install, uninstall, and configure policy/payout modules
Operations
| Method | Description |
|---|
lucidInstallModule | Install module on smart account |
lucidUninstallModule | Uninstall module from smart account |
lucidConfigurePolicyModule | Configure policy module |
lucidConfigurePayoutModule | Configure payout module |
lucidListModules | List installed modules |
Generated Reference
Overview
ERC-7579 module management — install, uninstall, and configure policy/payout modules
Available Operations
lucidInstallModule
Install an ERC-7579 module (policy, payout, or receipt) on a smart account. The module type and initialization data must be provided in the request body.
Example Usage
import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";
const raijinLabsLucidAi = new RaijinLabsLucidAi();
async function run() {
const result = await raijinLabsLucidAi.modules.lucidInstallModule({
chainId: "<id>",
account: "81158790",
moduleType: "<value>",
moduleAddress: "<value>",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { modulesLucidInstallModule } from "raijin-labs-lucid-ai/funcs/modulesLucidInstallModule.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 modulesLucidInstallModule(raijinLabsLucidAi, {
chainId: "<id>",
account: "81158790",
moduleType: "<value>",
moduleAddress: "<value>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("modulesLucidInstallModule failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|
request | models.InstallModuleRequest | :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 | :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 | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.SuccessResponse>
Errors
| Error Type | Status Code | Content Type |
|---|
| errors.ErrorResponse | 400 | application/json |
| errors.ErrorResponse | 500 | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX | */* |
lucidUninstallModule
Uninstall an ERC-7579 module from a smart account. Requires the module address and type to identify which module to remove.
Example Usage
import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";
const raijinLabsLucidAi = new RaijinLabsLucidAi();
async function run() {
const result = await raijinLabsLucidAi.modules.lucidUninstallModule({
chainId: "<id>",
account: "31674046",
moduleType: "<value>",
moduleAddress: "<value>",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { modulesLucidUninstallModule } from "raijin-labs-lucid-ai/funcs/modulesLucidUninstallModule.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 modulesLucidUninstallModule(raijinLabsLucidAi, {
chainId: "<id>",
account: "31674046",
moduleType: "<value>",
moduleAddress: "<value>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("modulesLucidUninstallModule failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|
request | models.UninstallModuleRequest | :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 | :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 | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.SuccessResponse>
Errors
| Error Type | Status Code | Content Type |
|---|
| errors.ErrorResponse | 400 | application/json |
| errors.ErrorResponse | 500 | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX | */* |
Configure allowed policy hashes on the LucidPolicyModule. Only transactions matching an allowed policy hash will be permitted by the module.
Example Usage
import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";
const raijinLabsLucidAi = new RaijinLabsLucidAi();
async function run() {
const result = await raijinLabsLucidAi.modules.lucidConfigurePolicyModule({
chainId: "<id>",
account: "04622028",
policyHashes: [],
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { modulesLucidConfigurePolicyModule } from "raijin-labs-lucid-ai/funcs/modulesLucidConfigurePolicyModule.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 modulesLucidConfigurePolicyModule(raijinLabsLucidAi, {
chainId: "<id>",
account: "04622028",
policyHashes: [],
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("modulesLucidConfigurePolicyModule failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|
request | models.ConfigurePolicyRequest | :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 | :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 | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.SuccessResponse>
Errors
| Error Type | Status Code | Content Type |
|---|
| errors.ErrorResponse | 400 | application/json |
| errors.ErrorResponse | 500 | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX | */* |
Configure the revenue split percentages on the LucidPayoutModule. Sets the basis-point allocations for compute, model, and protocol recipients.
Example Usage
import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";
const raijinLabsLucidAi = new RaijinLabsLucidAi();
async function run() {
const result = await raijinLabsLucidAi.modules.lucidConfigurePayoutModule({
chainId: "<id>",
account: "86222423",
recipients: [
"<value 1>",
"<value 2>",
],
basisPoints: [
122328,
],
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { modulesLucidConfigurePayoutModule } from "raijin-labs-lucid-ai/funcs/modulesLucidConfigurePayoutModule.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 modulesLucidConfigurePayoutModule(raijinLabsLucidAi, {
chainId: "<id>",
account: "86222423",
recipients: [
"<value 1>",
"<value 2>",
],
basisPoints: [
122328,
],
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("modulesLucidConfigurePayoutModule failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|
request | models.ConfigurePayoutRequest | :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 | :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 | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.SuccessResponse>
Errors
| Error Type | Status Code | Content Type |
|---|
| errors.ErrorResponse | 400 | application/json |
| errors.ErrorResponse | 500 | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX | */* |
lucidListModules
List all ERC-7579 modules installed on a smart account, including module type, address, and configuration status for each.
Example Usage
import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";
const raijinLabsLucidAi = new RaijinLabsLucidAi();
async function run() {
const result = await raijinLabsLucidAi.modules.lucidListModules({
chainId: "<id>",
account: "00461751",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { modulesLucidListModules } from "raijin-labs-lucid-ai/funcs/modulesLucidListModules.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 modulesLucidListModules(raijinLabsLucidAi, {
chainId: "<id>",
account: "00461751",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("modulesLucidListModules failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|
request | operations.LucidListModulesRequest | :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 | :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 | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.ListModulesResponse>
Errors
| Error Type | Status Code | Content Type |
|---|
| errors.ErrorResponse | 400 | application/json |
| errors.ErrorResponse | 500 | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX | */* |