tensaikit
Version:
An autonomous DeFi AI Agent Kit on Katana enabling AI agents to plan and execute on-chain financial operations.
34 lines (33 loc) • 1.56 kB
TypeScript
import { z } from "zod";
import { ActionProvider } from "../actionProvider";
import { Network } from "../../network";
import { GetBalanceSchema, TransferSchema } from "./schemas";
import { EvmWalletProvider } from "../../walletProviders";
/**
* ERC20ActionProvider provides actions to interact with ERC20 tokens such as
* checking token balances and initiating token transfers.
*/
export declare class ERC20ActionProvider extends ActionProvider<EvmWalletProvider> {
/**
* Constructs a new ERC20ActionProvider instance with no predefined actions.
*/
constructor();
/**
* Fetches the ERC20 token balance for the connected wallet address.
*
* @param walletProvider - The EVM-compatible wallet provider
* @param args - Contains the contract address of the ERC20 token
* @returns A formatted message showing the balance in human-readable units
*/
getBalance(walletProvider: EvmWalletProvider, args: z.infer<typeof GetBalanceSchema>): Promise<string>;
/**
* Transfers ERC20 tokens from the connected wallet to another onchain address.
*
* @param walletProvider - The EVM-compatible wallet provider
* @param args - Contains token contract address, destination, and amount
* @returns A success message including transaction hash, or an error message
*/
transfer(walletProvider: EvmWalletProvider, args: z.infer<typeof TransferSchema>): Promise<string>;
supportsNetwork: (network: Network) => boolean;
}
export declare const erc20ActionProvider: () => ERC20ActionProvider;