@coinbase/agentkit
Version:
Coinbase AgentKit core primitives
40 lines (39 loc) • 1.84 kB
TypeScript
import { z } from "zod";
import { ActionProvider } from "../actionProvider";
import { Network } from "../../network";
import { GetTruthMarketsSchema, GetTruthMarketDetailsSchema } from "./schemas";
import { EvmWalletProvider } from "../../wallet-providers";
/**
* Action provider for TrueMarkets interactions.
*/
export declare class TrueMarketsActionProvider extends ActionProvider<EvmWalletProvider> {
/**
* Creates a new TrueMarkets action provider.
*/
constructor();
/**
* 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: () => TrueMarketsActionProvider;