UNPKG

@coinbase/agentkit

Version:

Coinbase AgentKit core primitives

46 lines (45 loc) 2 kB
import { z } from "zod"; import { ActionProvider } from "../actionProvider"; import { Network } from "../../network"; import { LegacyCdpProviderConfig, WalletProvider } from "../../wallet-providers"; import { AddressReputationSchema, RequestFaucetFundsSchema } from "./schemas"; /** * LegacyCdpApiActionProvider is a legacy action provider for CDP API using the old Coinbase SDK. * * This provider is used for any action that uses the CDP API, but does not require a CDP Wallet. * * @deprecated Use CdpApiActionProvider instead */ export declare class LegacyCdpApiActionProvider extends ActionProvider<WalletProvider> { /** * Constructor for the LegacyCdpApiActionProvider class. * * @param config - The configuration options for the LegacyCdpApiActionProvider. */ constructor(config?: LegacyCdpProviderConfig); /** * Check the reputation of an address. * * @param args - The input arguments for the action * @returns A string containing reputation data or error message */ addressReputation(args: z.infer<typeof AddressReputationSchema>): Promise<string>; /** * 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 RequestFaucetFundsSchema>): 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 legacyCdpApiActionProvider: (config?: LegacyCdpProviderConfig) => LegacyCdpApiActionProvider;