@coinbase/agentkit
Version:
Coinbase AgentKit core primitives
46 lines (45 loc) • 1.78 kB
TypeScript
import { z } from "zod";
import { ActionProvider } from "../actionProvider";
import { Network } from "../../network";
import { WrapEthSchema, UnwrapEthSchema } from "./schemas";
import { EvmWalletProvider } from "../../wallet-providers";
/**
* Gets the WETH address for the given network.
*
* @param network - The network to get the WETH address for.
* @returns The WETH address for the network, or undefined if not supported.
*/
export declare const getWethAddress: (network: Network) => string | undefined;
/**
* WethActionProvider is an action provider for WETH.
*/
export declare class WethActionProvider extends ActionProvider<EvmWalletProvider> {
/**
* Constructor for the WethActionProvider.
*/
constructor();
/**
* Wraps ETH to WETH.
*
* @param walletProvider - The wallet provider to use for the action.
* @param args - The input arguments for the action.
* @returns A message containing the transaction hash.
*/
wrapEth(walletProvider: EvmWalletProvider, args: z.infer<typeof WrapEthSchema>): Promise<string>;
/**
* Unwraps WETH to ETH.
*
* @param walletProvider - The wallet provider to use for the action.
* @param args - The input arguments for the action.
* @returns A message containing the transaction hash.
*/
unwrapEth(walletProvider: EvmWalletProvider, args: z.infer<typeof UnwrapEthSchema>): Promise<string>;
/**
* Checks if the Weth action provider supports the given network.
*
* @param network - The network to check.
* @returns True if the Weth action provider supports the network, false otherwise.
*/
supportsNetwork: (network: Network) => boolean;
}
export declare const wethActionProvider: () => WethActionProvider;