UNPKG

@coinbase/agentkit

Version:

Coinbase AgentKit core primitives

59 lines (58 loc) 2.26 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CompoundPortfolioSchema = exports.CompoundRepaySchema = exports.CompoundBorrowSchema = exports.CompoundWithdrawSchema = exports.CompoundSupplySchema = void 0; const zod_1 = require("zod"); /** * Input schema for Compound supply action. */ exports.CompoundSupplySchema = zod_1.z .object({ assetId: zod_1.z.enum(["weth", "cbeth", "cbbtc", "wsteth", "usdc"]).describe("The asset to supply"), amount: zod_1.z .string() .regex(/^\d+(\.\d+)?$/, "Must be a valid integer or decimal value") .describe("The amount of tokens to supply in human-readable format"), }) .describe("Input schema for Compound supply action"); /** * Input schema for Compound withdraw action. */ exports.CompoundWithdrawSchema = zod_1.z .object({ assetId: zod_1.z.enum(["weth", "cbeth", "cbbtc", "wsteth", "usdc"]).describe("The asset to withdraw"), amount: zod_1.z .string() .regex(/^\d+(\.\d+)?$/, "Must be a valid integer or decimal value") .describe("The amount of tokens to withdraw in human-readable format"), }) .describe("Input schema for Compound withdraw action"); /** * Input schema for Compound borrow action. */ exports.CompoundBorrowSchema = zod_1.z .object({ assetId: zod_1.z.enum(["weth", "usdc"]).describe("The asset to borrow"), amount: zod_1.z .string() .regex(/^\d+(\.\d+)?$/, "Must be a valid integer or decimal value") .describe("The amount of base tokens to borrow in human-readable format"), }) .describe("Input schema for Compound borrow action"); /** * Input schema for Compound repay action. */ exports.CompoundRepaySchema = zod_1.z .object({ assetId: zod_1.z.enum(["weth", "usdc"]).describe("The asset to repay"), amount: zod_1.z .string() .regex(/^\d+(\.\d+)?$/, "Must be a valid integer or decimal value") .describe("The amount of tokens to repay in human-readable format"), }) .describe("Input schema for Compound repay action"); /** * Input schema for Compound get portfolio action. */ exports.CompoundPortfolioSchema = zod_1.z .object({}) .describe("Input schema for Compound get portfolio action");