UNPKG

@coinbase/agentkit

Version:

Coinbase AgentKit core primitives

52 lines (51 loc) 2.28 kB
import { z } from "zod"; import { ActionProvider } from "../actionProvider"; import { Network } from "../../network"; import { GetTruthMarketsSchema, GetTruthMarketDetailsSchema } from "./schemas"; import { EvmWalletProvider } from "../../wallet-providers"; /** * Configuration options for the TrueMarketsActionProvider. */ export interface TrueMarketsActionProviderConfig { /** * RPC URL for creating the Viem public client */ RPC_URL?: string; } /** * TrueMarketsActionProvider provides actions to interact with TrueMarkets contracts. */ export declare class TrueMarketsActionProvider extends ActionProvider<EvmWalletProvider> { #private; /** * Constructor for the TrueMarketsActionProvider. * * @param config - The configuration options for the TrueMarketsActionProvider. */ constructor(config?: TrueMarketsActionProviderConfig); /** * Gets active markets from the TruthMarketManager contract. * * @param walletProvider - The wallet provider to use for contract interactions. * @param args - The input arguments for the action, including pagination and sorting options. * @returns JSON object containing the active markets information. */ getPredictionMarkets(walletProvider: EvmWalletProvider, args: z.infer<typeof GetTruthMarketsSchema>): Promise<string>; /** * Gets detailed information for a specific market address. * * @param walletProvider - The wallet provider to use for contract interactions. * @param args - The input arguments for the action, containing the market address. * @returns JSON object containing detailed market information. */ getPredictionMarketDetails(walletProvider: EvmWalletProvider, args: z.infer<typeof GetTruthMarketDetailsSchema>): Promise<string>; /** * Checks if the TrueMarkets action provider supports the given network. * Currently only supports Base mainnet. * * @param network - The network to check. * @returns True if the TrueMarkets action provider supports the network, false otherwise. */ supportsNetwork: (network: Network) => boolean; } export declare const truemarketsActionProvider: (config?: TrueMarketsActionProviderConfig) => TrueMarketsActionProvider;