UNPKG

@coinbase/agentkit

Version:

Coinbase AgentKit core primitives

39 lines (38 loc) 1.65 kB
import { z } from "zod"; import { CdpClient } from "@coinbase/cdp-sdk"; import { Network } from "../../network"; import { WalletProvider } from "../../wallet-providers"; import { RequestFaucetFundsV2Schema } from "./schemas"; /** * Gets or creates a CDP client from the wallet provider or environment variables. * * @param walletProvider - The wallet provider to get the client from. * @returns The CDP client. */ export declare function getCdpClient(walletProvider: WalletProvider): CdpClient; /** * Validates that the network and protocol family are supported for faucet operations. * * @param network - The network to validate. * @param networkId - The network ID to validate. */ export declare function validateNetworkSupport(network: Network, networkId: string): void; /** * Handles faucet requests for EVM networks. * * @param cdpClient - The CDP client to use. * @param address - The address to request funds from. * @param networkId - The network ID to request funds from. * @param args - The arguments to request funds from. * @returns The transaction hash. */ export declare function handleEvmFaucet(cdpClient: CdpClient, address: string, networkId: string, args: z.infer<typeof RequestFaucetFundsV2Schema>): Promise<string>; /** * Handles faucet requests for Solana networks. * * @param cdpClient - The CDP client to use. * @param address - The address to request funds from. * @param args - The arguments to request funds from. * @returns The transaction hash. */ export declare function handleSvmFaucet(cdpClient: CdpClient, address: string, args: z.infer<typeof RequestFaucetFundsV2Schema>): Promise<string>;