UNPKG

tensaikit

Version:

An autonomous DeFi AI Agent Kit on Katana enabling AI agents to plan and execute on-chain financial operations.

49 lines (48 loc) 1.76 kB
import { EvmWalletProvider } from "../../walletProviders"; import { ActionProvider } from "../actionProvider"; import { Network } from "../../network"; /** * Configuration options for initializing the SushiSwapActionProvider. * * @property subGraphApiKey - API key required to query SushiSwap's subgraph. This is mandatory. */ export interface SushiSwapActionProviderConfig { subGraphApiKey?: string; } /** * SushiSwapActionProvider is a modular integration layer for interacting with SushiSwap on EVM-compatible chains. * * This provider bundles multiple functional action groups: * - Token pricing (USD prices and metadata) * - Token discovery via subgraph * - Swap quote generation * * Responsibilities: * - Register individual SushiSwap action modules into a unified provider * - Enforce required configuration (e.g., subgraph API key) * - Determine whether the current network is supported (EVM only) * * * Usage: * ```ts * const provider = new SushiSwapActionProvider({ subGraphApiKey: "<API_KEY>" }); * ``` */ export declare class SushiSwapActionProvider extends ActionProvider<EvmWalletProvider> { /** * Constructs the SushiSwapActionProvider and registers its action groups. */ constructor(config?: SushiSwapActionProviderConfig); /** * Checks if the SushiSwap action provider supports the given network. * * @param network - The network to validate. * @returns `true` if the network uses the EVM protocol family, else `false`. */ supportsNetwork: (network: Network) => boolean; } /** * Creates a new instance of SushiSwapActionProvider. * @returns A new instance of SushiSwapActionProvider */ export declare const sushiSwapActionProvider: () => SushiSwapActionProvider;