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.
Shares SDK
Share token launch and revenue airdrop for fractional AI asset ownership
Operations
| Method | Description |
|---|
lucidLaunchShareToken | Launch a share token for a passport |
lucidGetShareToken | Get share token info for a passport |
lucidTriggerRevenueAirdrop | Trigger revenue airdrop for share token holders |
Generated Reference
Overview
Share token launch and revenue airdrop for fractional AI asset ownership
Available Operations
lucidLaunchShareToken
Create and launch an SPL Token-2022 share token for fractional ownership of an AI asset. Configurable name, symbol, initial supply, and decimals. Requires the passport to exist and not already have a share token.
Example Usage
import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";
const raijinLabsLucidAi = new RaijinLabsLucidAi();
async function run() {
const result = await raijinLabsLucidAi.shares.lucidLaunchShareToken({
passportId: "<id>",
body: {
name: "Mistral 7B Share",
symbol: "M7BS",
totalSupply: 39757,
decimals: 9,
},
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { sharesLucidLaunchShareToken } from "raijin-labs-lucid-ai/funcs/sharesLucidLaunchShareToken.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 sharesLucidLaunchShareToken(raijinLabsLucidAi, {
passportId: "<id>",
body: {
name: "Mistral 7B Share",
symbol: "M7BS",
totalSupply: 63424,
decimals: 9,
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("sharesLucidLaunchShareToken failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|
request | operations.LucidLaunchShareTokenRequest | :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.TokenLaunchResponse>
Errors
| Error Type | Status Code | Content Type |
|---|
| errors.ErrorResponse | 400, 404 | application/json |
| errors.ErrorResponse | 500 | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX | */* |
lucidGetShareToken
Retrieve share token information for a passport including the SPL mint address, total supply, decimals, and current holder count. Returns 404 if no share token has been launched.
Example Usage
import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";
const raijinLabsLucidAi = new RaijinLabsLucidAi();
async function run() {
const result = await raijinLabsLucidAi.shares.lucidGetShareToken({
passportId: "<id>",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { sharesLucidGetShareToken } from "raijin-labs-lucid-ai/funcs/sharesLucidGetShareToken.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 sharesLucidGetShareToken(raijinLabsLucidAi, {
passportId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("sharesLucidGetShareToken failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|
request | operations.LucidGetShareTokenRequest | :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.TokenInfo>
Errors
| Error Type | Status Code | Content Type |
|---|
| errors.ErrorResponse | 404 | application/json |
| errors.ErrorResponse | 500 | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX | */* |
lucidTriggerRevenueAirdrop
Snapshot all current share token holders and distribute accumulated SOL revenue proportionally based on each holder’s token balance. Requires the passport to have a launched share token with accumulated revenue.
Example Usage
import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";
const raijinLabsLucidAi = new RaijinLabsLucidAi();
async function run() {
const result = await raijinLabsLucidAi.shares.lucidTriggerRevenueAirdrop({
passportId: "<id>",
body: {
amountLamports: 453116,
},
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { sharesLucidTriggerRevenueAirdrop } from "raijin-labs-lucid-ai/funcs/sharesLucidTriggerRevenueAirdrop.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 sharesLucidTriggerRevenueAirdrop(raijinLabsLucidAi, {
passportId: "<id>",
body: {
amountLamports: 453116,
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("sharesLucidTriggerRevenueAirdrop failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|
request | operations.LucidTriggerRevenueAirdropRequest | :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.AirdropResponse>
Errors
| Error Type | Status Code | Content Type |
|---|
| errors.ErrorResponse | 400, 404 | application/json |
| errors.ErrorResponse | 500 | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX | */* |