"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BalanceTool = void 0;
const zod_1 = require("zod");
const ai_1 = require("ai");
const balance_1 = require("../balance");
const balanceToolInputSchema = zod_1.z.object({
    chainId: zod_1.z.number(),
    account: zod_1.z.string(),
    for_user: zod_1.z.boolean().describe("Indicates if the balance is requested for the user or for internal purposes. " +
        "Note that if true then balance is shown to user in UI and need not to be added in final text response."),
});
class BalanceTool {
    constructor() {
        this.balance = new balance_1.Balance();
        this.tool = (0, ai_1.tool)({
            description: "Get the balance of a user",
            inputSchema: balanceToolInputSchema,
            execute: async (parameters) => {
                return await this.balance.getUserBalance(parameters.chainId, parameters.account);
            },
        });
    }
}
exports.BalanceTool = BalanceTool;
