UNPKG

@coinbase/agentkit

Version:

Coinbase AgentKit core primitives

51 lines (50 loc) 2.04 kB
import { z } from "zod"; import { ActionProvider } from "../actionProvider"; import { Network } from "../../network"; import { BridgeTokenSchema, CheckDepositStatusSchema } from "./schemas"; import { EvmWalletProvider } from "../../wallet-providers"; /** * Configuration options for the SafeWalletProvider. */ export interface AcrossActionProviderConfig { /** * Private key of the wallet provider */ privateKey: string; } /** * AcrossActionProvider provides actions for cross-chain bridging via Across Protocol. */ export declare class AcrossActionProvider extends ActionProvider<EvmWalletProvider> { #private; /** * Constructor for the AcrossActionProvider. * * @param config - The configuration options for the AcrossActionProvider. */ constructor(config: AcrossActionProviderConfig); /** * Bridges a token from one chain to another using Across Protocol. * * @param walletProvider - The wallet provider to use for the transaction. * @param args - The input arguments for the action. * @returns A message containing the bridge details. */ bridgeToken(walletProvider: EvmWalletProvider, args: z.infer<typeof BridgeTokenSchema>): Promise<string>; /** * Checks the status of a bridge deposit via Across Protocol. * * @param walletProvider - The wallet provider to use for the transaction. * @param args - The input arguments for the action. * @returns A message containing the deposit status details. */ checkDepositStatus(walletProvider: EvmWalletProvider, args: z.infer<typeof CheckDepositStatusSchema>): Promise<string>; /** * Checks if the Across action provider supports the given network. * * @param network - The network to check. * @returns True if the Across action provider supports the network, false otherwise. */ supportsNetwork: (network: Network) => boolean; } export declare const acrossActionProvider: (config: AcrossActionProviderConfig) => AcrossActionProvider;