"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PriceTool = void 0;
const zod_1 = require("zod");
const ai_1 = require("ai");
const price_1 = require("../price");
const priceToolInputSchema = zod_1.z.object({
    tokenAddresses: zod_1.z.string().describe("Comma-separated list of token addresses to get prices for"),
    chainId: zod_1.z.number().describe("Chain ID of the tokens"),
});
class PriceTool {
    constructor() {
        this.price = new price_1.Price();
        this.tool = (0, ai_1.tool)({
            description: "Get the price of a token",
            inputSchema: priceToolInputSchema,
            execute: async (parameters) => {
                let cryptoPrice = await this.price.getCryptoPrices(parameters.tokenAddresses, parameters.chainId);
                return JSON.stringify(cryptoPrice, null, 2);
            },
        });
    }
}
exports.PriceTool = PriceTool;
