UNPKG

pharos-agent-kit

Version:
103 lines 2.86 kB
import { PharosAgentKit } from "../agent"; import { z } from "zod"; export interface Config { OPENAI_API_KEY?: string; PERPLEXITY_API_KEY?: string; PRIORITY_LEVEL?: "medium" | "high" | "veryHigh"; ELFA_AI_API_KEY?: string; COINGECKO_PRO_API_KEY?: string; COINGECKO_DEMO_API_KEY?: string; } export interface Creator { address: string; percentage: number; } /** * Example of an action with input and output */ export interface ActionExample { input: Record<string, any>; output: Record<string, any>; explanation: string; } /** * Handler function type for executing the action */ export type Handler = (agent: PharosAgentKit, input: Record<string, any>) => Promise<Record<string, any>>; /** * Main Action interface inspired by ELIZA * This interface makes it easier to implement actions across different frameworks */ export interface Action { /** * Unique name of the action */ name: string; /** * Alternative names/phrases that can trigger this action */ similes: string[]; /** * Detailed description of what the action does */ description: string; /** * Array of example inputs and outputs for the action * Each inner array represents a group of related examples */ examples: ActionExample[][]; /** * Zod schema for input validation */ schema: z.ZodObject<any>; /** * Function that executes the action */ handler: Handler; } export interface TokenCheck { tokenProgram: string; tokenType: string; risks: Array<{ name: string; level: string; description: string; score: number; }>; score: number; } export declare const EVM_ADDRESS_REGEX: RegExp; export declare const chainIdSchema: z.ZodEffects<z.ZodString, string, string>; export declare const getDebridgeTokensInfoSchema: z.ZodObject<{ /** Chain ID to query tokens for */ chainId: z.ZodEffects<z.ZodString, string, string>; /** Optional token address to filter results */ tokenAddress: z.ZodOptional<z.ZodString>; /** Optional search term to filter tokens by name or symbol */ search: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { chainId: string; search?: string | undefined; tokenAddress?: string | undefined; }, { chainId: string; search?: string | undefined; tokenAddress?: string | undefined; }>; export type GetDebridgeTokensInfoParams = z.infer<typeof getDebridgeTokensInfoSchema>; export interface FluxbeamServerResponse { signature: string; } export interface Quote { amountIn: number; inputMint: string; minimumOut: number; outAmount: number; outputMint: string; pool: string; program: string; } export interface TransformedResponse { quote: Quote; } //# sourceMappingURL=index.d.ts.map