UNPKG

tensaikit

Version:

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

162 lines (161 loc) 6.38 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UserDataQuerySchema = exports.CuratorsQuerySchema = exports.MarketStateByUniqueKeySchema = exports.WhitelistedVaultsQuerySchema = exports.ActiveMarketsQuerySchema = exports.BorrowerInterestRateSchema = exports.LenderInterestRateSchema = exports.RepaySchema = exports.BorrowSchema = exports.WithdrawCollateralSchema = exports.SupplyCollateralSchema = exports.WithdrawSchema = exports.SupplySchema = exports.GetMarketPositionInfoSchema = exports.GetMarketStatesSchema = exports.GetMarketInfoSchema = void 0; const zod_1 = require("zod"); /** * Input schema for Morpho Blue get market information. */ exports.GetMarketInfoSchema = zod_1.z .object({ marketId: zod_1.z .string() .regex(/^0x[a-fA-F0-9]{64}$/, "Invalid marketId (bytes32 hex)") .describe("The unique bytes32 identifier of the Morpho Blue market"), }) .describe("Input schema for fetching Morpho Blue market parameters"); exports.GetMarketStatesSchema = zod_1.z .object({ marketId: zod_1.z .string() .regex(/^0x[a-fA-F0-9]{64}$/, "Invalid marketId (bytes32 hex)") .describe("The unique bytes32 identifier of the Morpho Blue market"), }) .describe("Input schema for fetching Morpho Blue market state"); exports.GetMarketPositionInfoSchema = zod_1.z .object({ marketId: zod_1.z .string() .regex(/^0x[a-fA-F0-9]{64}$/, "Invalid marketId (bytes32 hex)") .describe("The unique bytes32 identifier of the Morpho Blue market"), }) .describe("Input schema for fetching Position on Morpho Blue market"); /** * Input schema for Morpho Blue supply action. */ exports.SupplySchema = zod_1.z .object({ assets: zod_1.z .string() .regex(/^\d+(\.\d+)?$/, "Must be a valid integer or decimal value") .describe("The quantity of loanToken assets to supply, in whole units"), marketId: zod_1.z .string() .regex(/^0x[a-fA-F0-9]{64}$/, "Invalid marketId (bytes32 hex)") .describe("The market ID (bytes32) to supply into"), }) .describe("Input schema for Morpho Blue supply action"); /** * Input schema for Morpho Vault withdraw action. */ exports.WithdrawSchema = zod_1.z .object({ assets: zod_1.z .string() .regex(/^\d+(\.\d+)?$/, "Must be a valid integer or decimal value") .describe("The quantity of loanToken assets to withdraw, in whole units"), marketId: zod_1.z .string() .regex(/^0x[a-fA-F0-9]{64}$/, "Invalid marketId (bytes32 hex)") .describe("The market ID (bytes32) to withdraw from"), }) .describe("Input schema for Morpho Blue withdraw action"); /** * Input schema for Morpho Blue supply collateral action. */ exports.SupplyCollateralSchema = zod_1.z .object({ assets: zod_1.z .string() .regex(/^\d+(\.\d+)?$/, "Must be a valid integer or decimal value") .describe("The quantity of collateralToken assets to supply, in whole units"), marketId: zod_1.z .string() .regex(/^0x[a-fA-F0-9]{64}$/, "Invalid marketId (bytes32 hex)") .describe("The market ID (bytes32) to supply collateral into"), }) .describe("Input schema for Morpho Blue supply collateral action"); /** * Input schema for Morpho Blue withdraw collateral action. */ exports.WithdrawCollateralSchema = zod_1.z .object({ assets: zod_1.z .string() .regex(/^\d+(\.\d+)?$/, "Must be a valid integer or decimal value") .describe("The quantity of collateralToken assets to withdraw, in whole units"), marketId: zod_1.z .string() .regex(/^0x[a-fA-F0-9]{64}$/, "Invalid marketId (bytes32 hex)") .describe("The market ID (bytes32) to withdraw collateral from"), }) .describe("Input schema for Morpho Blue withdraw collateral action"); /** * Input schema for Morpho Blue borrow action. */ exports.BorrowSchema = zod_1.z .object({ assets: zod_1.z .string() .regex(/^\d+(\.\d+)?$/, "Must be a valid integer or decimal value") .describe("The quantity of loanToken assets to borrow, in whole units"), marketId: zod_1.z .string() .regex(/^0x[a-fA-F0-9]{64}$/, "Invalid marketId (bytes32 hex)") .describe("The market ID (bytes32) to borrow from"), }) .describe("Input schema for Morpho Blue borrow action"); /** * Input schema for Morpho Blue repay action. */ exports.RepaySchema = zod_1.z .object({ assets: zod_1.z .string() .regex(/^\d+(\.\d+)?$/, "Must be a valid integer or decimal value") .describe("The quantity of loanToken assets to repay, in whole units"), marketId: zod_1.z .string() .regex(/^0x[a-fA-F0-9]{64}$/, "Invalid marketId (bytes32 hex)") .describe("The market ID (bytes32) to repay"), }) .describe("Input schema for Morpho Blue repay action"); exports.LenderInterestRateSchema = zod_1.z.object({ skip: zod_1.z.number().int().min(0, "Skip must be 0 or greater"), first: zod_1.z .number() .int() .min(1, "Minimum value must be 1") .max(100, "Maximum value allowed is 100"), }); exports.BorrowerInterestRateSchema = zod_1.z.object({ skip: zod_1.z.number().int().min(0, "Skip must be 0 or greater"), first: zod_1.z .number() .int() .min(1, "Minimum value must be 1") .max(100, "Maximum value allowed is 100"), }); exports.ActiveMarketsQuerySchema = zod_1.z.object({ skip: zod_1.z.number().int().min(0, "Skip must be 0 or greater"), first: zod_1.z .number() .int() .min(1, "Minimum value must be 1") .max(100, "Maximum value allowed is 100"), }); exports.WhitelistedVaultsQuerySchema = zod_1.z.object({ skip: zod_1.z.number().int().min(0, "Skip must be 0 or greater"), first: zod_1.z .number() .int() .min(1, "Minimum value must be 1") .max(100, "Maximum value allowed is 100"), }); exports.MarketStateByUniqueKeySchema = zod_1.z.object({ uniqueKey: zod_1.z .string() .regex(/^0x[a-fA-F0-9]{64}$/, "Invalid uniqueKey (bytes32 hex)") .describe("Unique market identifier (bytes32 hex string)"), }); exports.CuratorsQuerySchema = zod_1.z.object({}); exports.UserDataQuerySchema = zod_1.z.object({});