UNPKG

@coinbase/agentkit

Version:

Coinbase AgentKit core primitives

64 lines (63 loc) 2.75 kB
import { z } from "zod"; import { ActionProvider } from "../actionProvider"; import { Network } from "../../network"; import { EvmWalletProvider } from "../../wallet-providers"; import { FlaunchSchema, BuyCoinWithETHInputSchema, BuyCoinWithCoinInputSchema, SellCoinSchema } from "./schemas"; /** * FlaunchActionProvider provides actions for flaunch operations. * * @description * This provider is designed to work with EvmWalletProvider for blockchain interactions. */ export declare class FlaunchActionProvider extends ActionProvider<EvmWalletProvider> { /** * Constructor for the FlaunchActionProvider. * */ constructor(); /** * Launches a new memecoin using the flaunch protocol. * * @param walletProvider - The wallet provider instance for blockchain interactions * @param args - Arguments defined by FlaunchSchema * @returns A promise that resolves to a string describing the transaction result */ flaunch(walletProvider: EvmWalletProvider, args: z.infer<typeof FlaunchSchema>): Promise<string>; /** * Buys a flaunch coin using ETH input. * * @param walletProvider - The wallet provider instance for blockchain interactions * @param args - Arguments defined by BuyCoinSchema * @returns A promise that resolves to a string describing the transaction result */ buyCoinWithETHInput(walletProvider: EvmWalletProvider, args: z.infer<typeof BuyCoinWithETHInputSchema>): Promise<string>; /** * Buys a flaunch coin using Coin input. * * @param walletProvider - The wallet provider instance for blockchain interactions * @param args - Arguments defined by BuyCoinSchema * @returns A promise that resolves to a string describing the transaction result */ buyCoinWithCoinInput(walletProvider: EvmWalletProvider, args: z.infer<typeof BuyCoinWithCoinInputSchema>): Promise<string>; /** * Sells a flaunch coin into ETH. * * @param walletProvider - The wallet provider instance for blockchain interactions * @param args - Arguments defined by SellCoinSchema * @returns A promise that resolves to a string describing the transaction result */ sellCoin(walletProvider: EvmWalletProvider, args: z.infer<typeof SellCoinSchema>): Promise<string>; /** * Checks if this provider supports the given network. * * @param network - The network to check support for * @returns True if the network is supported */ supportsNetwork(network: Network): boolean; } /** * Factory function to create a new FlaunchActionProvider instance. * * @returns A new FlaunchActionProvider instance */ export declare const flaunchActionProvider: () => FlaunchActionProvider;