"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SwapLinkGeneratorTool = void 0;
const zod_1 = require("zod");
const ai_1 = require("ai");
const links_1 = require("../links");
const swapLinkGeneratorToolInputSchema = zod_1.z.object({
    fromAmount: zod_1.z.number(),
    fromChain: zod_1.z.number(),
    fromToken: zod_1.z.string(),
    toChain: zod_1.z.number(),
    toToken: zod_1.z.string(),
});
class SwapLinkGeneratorTool {
    constructor() {
        this.links = new links_1.Links();
        this.tool = (0, ai_1.tool)({
            description: "[Deprecated] Generate a swap link for a given amount, fromChain, fromToken (address), toChain, toToken (address)",
            inputSchema: swapLinkGeneratorToolInputSchema,
            execute: async (parameters) => {
                try {
                    return this.links.generateSwapLink(parameters.fromAmount, parameters.fromChain, parameters.fromToken, parameters.toChain, parameters.toToken);
                }
                catch (e) {
                    return e.message;
                }
            },
        });
    }
}
exports.SwapLinkGeneratorTool = SwapLinkGeneratorTool;
