Skip to content

Commit b6fedb8

Browse files
authored
Add generate-sol-tx, change chainIds to lowercased string[] (#22)
1 parent 2d391a1 commit b6fedb8

4 files changed

Lines changed: 5 additions & 3 deletions

File tree

app/api/plugins/[pluginId]/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export const POST = withUnkey(
192192
repo: assistantDefinition.repo || null,
193193
verified: false,
194194
chainIds:
195-
assistantDefinition.chainIds?.map((cid) => cid.toString()) || [],
195+
assistantDefinition.chainIds?.map((cid) => cid.toString().toLowerCase()) || [],
196196
tools: pluginTools.map((t) => t.id),
197197
primitives:
198198
assistantDefinition.tools
@@ -335,7 +335,7 @@ export const PUT = withUnkey(
335335
assistantDefinition.instructions || plugin.info.description || "",
336336
image: assistantDefinition.image || null,
337337
chainIds:
338-
assistantDefinition.chainIds?.map((cid) => cid.toString()) || [],
338+
assistantDefinition.chainIds?.map((cid) => cid.toString().toLowerCase()) || [],
339339
tools: pluginTools.map((t) => t.id),
340340
primitives:
341341
assistantDefinition.tools

app/primitives/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export enum BittePrimitiveName {
77
GET_TOKEN_METADATA = 'getTokenMetadata',
88
GENERATE_EVM_TX = 'generate-evm-tx',
99
GENERATE_SUI_TX = 'generate-sui-tx',
10+
GENERATE_SOL_TX = 'generate-sol-tx',
1011
RENDER_CHART = 'render-chart',
1112
SIGN_MESSAGE = 'sign-message',
1213
GET_PORTFOLIO = 'get-portfolio',

lib/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const COLLECTIONS = {
1515
export const BittePrimitiveNames = [
1616
"create-drop",
1717
"generate-evm-tx",
18+
"generate-sol-tx",
1819
"generate-image",
1920
"generate-transaction",
2021
"getSwapTransactions",

lib/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export type BitteAgentBase = {
6363
instructions: string;
6464
tools?: BitteToolSpec[];
6565
image?: string;
66-
chainIds?: number[];
66+
chainIds?: string[];
6767
categories?: string[];
6868
repo?: string;
6969
};

0 commit comments

Comments
 (0)