UNPKG

@coinbase/agentkit

Version:

Coinbase AgentKit core primitives

60 lines (59 loc) 2.05 kB
import { z } from "zod"; import { ActionProvider } from "../actionProvider"; import { ListNftSchema, GetNftsByAccountSchema } from "./schemas"; import { Network } from "../../network"; import { EvmWalletProvider } from "../../wallet-providers"; /** * Configuration options for the OpenseaActionProvider. */ export interface OpenseaActionProviderConfig { /** * OpenSea API Key. */ apiKey?: string; /** * The network ID to use for the OpenseaActionProvider. */ networkId?: string; /** * The private key to use for the OpenseaActionProvider. */ privateKey?: string; } /** * OpenseaActionProvider is an action provider for OpenSea marketplace interactions. */ export declare class OpenseaActionProvider extends ActionProvider<EvmWalletProvider> { private readonly apiKey; private walletWithProvider; private openseaSDK; private openseaBaseUrl; /** * Constructor for the OpenseaActionProvider class. * * @param config - The configuration options for the OpenseaActionProvider. */ constructor(config?: OpenseaActionProviderConfig); /** * Lists an NFT for sale on OpenSea. * * @param args - The input arguments for the action. * @returns A message containing the listing details. */ listNft(args: z.infer<typeof ListNftSchema>): Promise<string>; /** * Fetch NFTs of a specific wallet address. * * @param args - The input arguments for the action. * @returns A JSON string containing the NFTs or error message */ getNftsByAccount(args: z.infer<typeof GetNftsByAccountSchema>): Promise<string>; /** * Checks if the Opensea action provider supports the given network. * * @param network - The network to check. * @returns True if the Opensea action provider supports the network, false otherwise. */ supportsNetwork: (network: Network) => boolean; } export declare const openseaActionProvider: (config?: OpenseaActionProviderConfig) => OpenseaActionProvider;