Tool fixes and updates

This commit is contained in:
Damjan
2025-01-16 14:43:25 +01:00
parent 4d213665d3
commit 611de50acd
5 changed files with 8 additions and 6 deletions

View File

@@ -16,7 +16,7 @@ const getAssetsByAuthorityAction: Action = {
[
{
input: {
authorityAddress: "mRdta4rc2RtsxEUDYuvKLamMZAdW6qHcwuq866Skxxv",
authority: "mRdta4rc2RtsxEUDYuvKLamMZAdW6qHcwuq866Skxxv",
limit: 10,
},
output: {
@@ -74,7 +74,7 @@ const getAssetsByAuthorityAction: Action = {
],
],
schema: z.object({
authorityAddress: z.string().min(1, "Authority address is required"),
authority: z.string().min(1, "Authority address is required"),
sortBy: z
.object({
sortBy: z.enum(["created", "updated", "recentAction", "none"]),

View File

@@ -16,7 +16,7 @@ const getAssetsByCreatorAction: Action = {
[
{
input: {
creatorAddress: "D3XrkNZz6wx6cofot7Zohsf2KSsu2ArngNk8VqU9cTY3",
creator: "D3XrkNZz6wx6cofot7Zohsf2KSsu2ArngNk8VqU9cTY3",
onlyVerified: true,
limit: 10,
},
@@ -75,7 +75,7 @@ const getAssetsByCreatorAction: Action = {
],
],
schema: z.object({
creatorAddress: z.string().min(1, "Creator address is required"),
creator: z.string().min(1, "Creator address is required"),
onlyVerified: z.boolean(),
sortBy: z
.object({

View File

@@ -117,6 +117,7 @@ import {
SolanaGetAssetTool,
SolanaGetAssetsByAuthorityTool,
SolanaGetAssetsByCreatorTool,
SolanaSearchAssetsTool,
} from "./index";
export function createSolanaTools(solanaKit: SolanaAgentKit) {
@@ -214,5 +215,6 @@ export function createSolanaTools(solanaKit: SolanaAgentKit) {
new SolanaGetAssetTool(solanaKit),
new SolanaGetAssetsByAuthorityTool(solanaKit),
new SolanaGetAssetsByCreatorTool(solanaKit),
new SolanaSearchAssetsTool(solanaKit),
];
}

View File

@@ -6,7 +6,7 @@ export class SolanaGetAssetsByAuthorityTool extends Tool {
description = `Fetch a list of assets owned by a specific address using the Metaplex DAS API.
Inputs (input is a JSON string):
authorityAddress: string, eg "N4f6zftYsuu4yT7icsjLwh4i6pB1zvvKbseHj2NmSQw" (required)
authority: string, eg "mRdta4rc2RtsxEUDYuvKLamMZAdW6qHcwuq866Skxxv" (required)
sortBy: { sortBy: "created" | "updated" | "recentAction" | "none", sortDirection: "asc" | "desc" } (optional)
limit: number (optional)
page: number (optional)

View File

@@ -6,7 +6,7 @@ export class SolanaGetAssetsByCreatorTool extends Tool {
description = `Fetch a list of assets created by a specific address using the Metaplex DAS API.
Inputs (input is a JSON string):
creatorAddress: string, eg "N4f6zftYsuu4yT7icsjLwh4i6pB1zvvKbseHj2NmSQw" (required)
creator: string, eg "D3XrkNZz6wx6cofot7Zohsf2KSsu2ArngNk8VqU9cTY3" (required)
onlyVerified: boolean (optional)
sortBy: { sortBy: "created" | "updated" | "recentAction" | "none", sortDirection: "asc" | "desc" } (optional)
limit: number (optional)