tensaikit
Version:
An autonomous DeFi AI Agent Kit on Katana enabling AI agents to plan and execute on-chain financial operations.
31 lines (30 loc) • 1.44 kB
TypeScript
import z from "zod";
import { ActionProvider } from "../../actionProvider";
import { EvmWalletProvider } from "../../../walletProviders";
import { Network } from "../../../network";
import { GetSwapQuoteSchema } from "../schemas";
/**
* SushiSwapQuoteActions provides functionality to generate swap quotes from SushiSwap.
*
* This action group handles fetching and formatting quote data for token swaps on EVM-compatible chains.
* It interacts with the SushiSwap public quote API and prepares data required for downstream swap execution.
*
* Responsibilities:
* - Convert human-readable token amounts into base units using token metadata
* - Handle optional slippage settings
* - Fetch swap quote including expected output, route, and calldata
*
*/
export declare class SushiSwapQuoteActions extends ActionProvider<EvmWalletProvider> {
constructor();
/**
* Fetches a swap quote for a given token pair and amount from SushiSwap’s public API.
*
* @param walletProvider - An instance of EVM-compatible WalletProvider
* @param args - Object containing tokenIn, tokenOut, amount, and optional maxSlippage
* @returns A formatted string representing the swap quote
* @throws If token metadata is invalid or the API request fails
*/
getSwapQuote(walletProvider: EvmWalletProvider, args: z.infer<typeof GetSwapQuoteSchema>): Promise<any>;
supportsNetwork: (network: Network) => boolean;
}