getLiquidityTool.tsā¢777 B
import { Tool } from "./../../shared/types/tool";
import { z } from "zod";
import { get_liquidity } from "../hooks";
export const getLiquidityToolParams = {
chainId: z.string(),
};
export const getLiquidityToolZodParams = z.object({
...getLiquidityToolParams,
});
export type GetLiquidityToolParamType = z.infer<
typeof getLiquidityToolZodParams
>;
export const getLiquidityTool: Tool<
typeof getLiquidityToolParams,
{ chainId: string },
string
> = {
name: "OKX_DEX_GET_LIQUIDITY",
description:
"Get a list of liquidity that are available for swap in the OKX aggregation protocol.",
parameters: {
...getLiquidityToolParams,
},
callback: async ({ chainId }: { chainId: string }): Promise<string> => {
return get_liquidity(chainId);
},
};