UNPKG

tensaikit

Version:

An autonomous DeFi AI Agent Kit on Katana enabling AI agents to plan and execute on-chain financial operations.

55 lines (54 loc) 2.24 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.QueryGetSushiAllTokens = exports.GetExecuteSwapSchema = exports.GetSwapQuoteSchema = exports.GetTokenDetailsSchema = exports.GetTokenPriceSchema = exports.GetLiquidityProvidersSchema = exports.GetAllTokenPricesSchema = void 0; const zod_1 = require("zod"); exports.GetAllTokenPricesSchema = zod_1.z.object({}); exports.GetLiquidityProvidersSchema = zod_1.z.object({}); exports.GetTokenPriceSchema = zod_1.z.object({ tokenAddress: zod_1.z .string() .describe("The address of the token to fetch the price for."), }); exports.GetTokenDetailsSchema = zod_1.z.object({ tokenAddress: zod_1.z .string() .describe("The address of the token to retrieve metadata for."), }); exports.GetSwapQuoteSchema = zod_1.z.object({ tokenIn: zod_1.z .string() .describe("Address of the token to be swapped from (input token)."), tokenOut: zod_1.z .string() .describe("Address of the token to be swapped to (output token)."), amount: zod_1.z .number() .describe("Amount of the input token to swap. Example: 3.5 (will be converted to base units using token decimals)"), maxSlippage: zod_1.z .number() .describe("Maximum allowed slippage for the swap, e.g., 0.005 for 0.5%"), }); exports.GetExecuteSwapSchema = zod_1.z.object({ tokenIn: zod_1.z .string() .min(42) .describe("Address of the token to be swapped from (input token)."), tokenOut: zod_1.z .string() .min(42) .describe("Address of the token to be swapped to (output token)."), amount: zod_1.z .number() .describe("Amount of the input token to swap. Example: 3.5 (will be converted to base units using token decimals)"), maxSlippage: zod_1.z .number() .describe("Maximum allowed slippage for the swap, e.g., 0.005 for 0.5%"), }); exports.QueryGetSushiAllTokens = zod_1.z.object({ first: zod_1.z .number() .int() .min(1, "Minimum value must be 1") .max(100, "Maximum value allowed is 100"), skip: zod_1.z.number().int().min(0, "Skip must be 0 or greater"), });