UNPKG

@coinbase/agentkit

Version:

Coinbase AgentKit core primitives

41 lines (40 loc) 1.7 kB
import { z } from "zod"; import { EvmWalletProvider } from "../../wallet-providers"; import { ActionProvider } from "../actionProvider"; import { SushiQuoteSchema, SushiSwapSchema } from "./sushiRouterSchemas"; import { Network } from "../../network"; /** * SushiRouterActionProvider is an action provider for Sushi. * * This provider is used for any action that uses the Sushi Router API. */ export declare class SushiRouterActionProvider extends ActionProvider<EvmWalletProvider> { /** * Constructor for the SushiRouterActionProvider class. */ constructor(); /** * Swaps a specified amount of a from token to a to token for the wallet. * * @param walletProvider - The wallet provider to swap the tokens from. * @param args - The input arguments for the action. * @returns A message containing the swap details. */ swap(walletProvider: EvmWalletProvider, args: z.infer<typeof SushiSwapSchema>): Promise<string>; /** * Gets a quote for a specified amount of a from token to a to token * * @param walletProvider - The wallet provider to swap the tokens from. * @param args - The input arguments for the action. * @returns A message containing the quote details. */ quote(walletProvider: EvmWalletProvider, args: z.infer<typeof SushiQuoteSchema>): Promise<string>; /** * Custom action providers are supported on all networks * * @param network - The network to checkpointSaver * @returns True if the network is supported, false otherwise */ supportsNetwork(network: Network): boolean; } export declare const sushiRouterActionProvider: () => SushiRouterActionProvider;