@coinbase/agentkit
Version:
Coinbase AgentKit core primitives
57 lines (56 loc) • 2.09 kB
TypeScript
/**
* Onramp Action Provider
*
* This file contains the implementation of the OnrampActionProvider,
* which provides actions for onramp operations.
*
* @module onramp
*/
import { z } from "zod";
import { ActionProvider } from "../actionProvider";
import { Network } from "../../network";
import { EvmWalletProvider } from "../../wallet-providers";
import { GetOnrampBuyUrlActionSchema } from "./schemas";
type OnrampActionProviderProps = {
projectId: string;
};
/**
* OnrampActionProvider provides actions for onramp operations.
*
* @description
* This provider is designed to work with EvmWalletProvider for blockchain interactions.
* It supports all evm networks.
*/
export declare class OnrampActionProvider extends ActionProvider<EvmWalletProvider> {
private projectId;
/**
* Constructor for the OnrampActionProvider.
*
* @param props - The props for the OnrampActionProvider
* @param props.projectId - The project ID for the OnrampActionProvider
*/
constructor(props: OnrampActionProviderProps);
/**
* This action provides a link to buy more cryptocurrency (ETH, USDC, or BTC) using fiat currency (regular money like USD).
*
* @param walletProvider - The wallet provider instance for blockchain interactions
* @param _ - The arguments for the action (not used)
* @returns A promise that resolves to a string describing the action result
*/
getOnrampBuyUrl(walletProvider: EvmWalletProvider, _?: z.infer<typeof GetOnrampBuyUrlActionSchema>): 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 OnrampActionProvider instance.
*
* @param props - The props for the OnrampActionProvider
* @returns A new OnrampActionProvider instance
*/
export declare const onrampActionProvider: (props: OnrampActionProviderProps) => OnrampActionProvider;
export {};