UNPKG

@coinbase/agentkit

Version:

Coinbase AgentKit core primitives

35 lines (34 loc) 1.4 kB
import { z } from "zod"; import { Network } from "../../network"; import { WalletProvider } from "../../wallet-providers"; import { ActionProvider } from "../actionProvider"; import { RequestFaucetFundsV2Schema } from "./schemas"; /** * CdpApiActionProvider is an action provider for CDP API. * * This provider is used for any action that uses the CDP API, but does not require a CDP Wallet. */ export declare class CdpApiActionProvider extends ActionProvider<WalletProvider> { /** * Constructor for the CdpApiActionProvider class. */ constructor(); /** * Requests test tokens from the faucet for the default address in the wallet. * * @param walletProvider - The wallet provider to request funds from. * @param args - The input arguments for the action. * @returns A confirmation message with transaction details. */ faucet(walletProvider: WalletProvider, args: z.infer<typeof RequestFaucetFundsV2Schema>): Promise<string>; /** * Checks if the CDP action provider supports the given network. * * NOTE: Network scoping is done at the action implementation level * * @param _ - The network to check. * @returns True if the CDP action provider supports the network, false otherwise. */ supportsNetwork: (_: Network) => boolean; } export declare const cdpApiActionProvider: () => CdpApiActionProvider;