import { KeyType } from '@near-js/crypto'; import { type OpenAPIV3 } from 'openapi-types'; import { z } from 'zod'; export declare const DEFAULT_GAS: bigint; export declare const YOCTO_NEAR_PER_NEAR: number; export declare const MCP_SERVER_NAME = "near-mcp"; export declare const mapSemaphore: (items: T[], concurrency: number, f: (t: T) => Promise) => Promise; export type Result = { ok: true; value: T; } | { ok: false; error: E; }; export declare const keyTypeToCurvePrefix: (keyType: KeyType) => "ed25519" | "secp256k1"; export declare const curvePrefixToKeyType: (curvePrefix: string) => Result; export declare function getConfig(env: string): { networkId: string; nodeUrl: string; walletUrl: string; WRAP_NEAR_CONTRACT_ID: string; REF_FI_CONTRACT_ID: string; REF_TOKEN_ID: string; indexerUrl: string; explorerUrl: string; REF_DCL_SWAP_CONTRACT_ID: string; } | { networkId: string; nodeUrl: string; walletUrl: string; WRAP_NEAR_CONTRACT_ID: string; REF_FI_CONTRACT_ID: string; REF_TOKEN_ID: string; explorerUrl: string; REF_DCL_SWAP_CONTRACT_ID: string; indexerUrl?: undefined; }; export interface TokenMetadata { id: string; name: string; symbol: string; decimals: number; icon: string; } export declare type PoolKind = 'SIMPLE_POOL' | 'STABLE_SWAP' | 'RATED_SWAP' | 'DEGEN_SWAP'; export interface PoolRPCView { id: number; token_account_ids: string[]; token_symbols: string[]; amounts: string[]; total_fee: number; shares_total_supply: string; tvl: number; token0_ref_price: string; share: string; decimalsHandled?: boolean; tokens_meta_data?: TokenMetadata[]; pool_kind?: PoolKind; } export interface Pool { id: number; tokenIds: string[]; supplies: Record; fee: number; total_fee?: number; shareSupply: string; tvl: number; token0_ref_price: string; partialAmountIn?: string; Dex?: string; pool_kind?: PoolKind; rates?: Record; } export declare const parsePool: (pool: PoolRPCView, id?: number) => Pool; export interface SwapEstimate { result_code: number; result_message: string; result_data: { routes: { pools: { pool_id: string; token_in: string; token_out: string; amount_in: string; amount_out: string; min_amount_out: string; }[]; amount_in: string; min_amount_out: string; amount_out: string; }[]; contract_in: string; contract_out: string; amount_in: string; amount_out: string; }; } export declare const getSmartRouteRefSwapEstimate: (amountIn: string, tokenIn: string, tokenOut: string, pathDepth: number, slippagePercent: number) => Promise>; export type RefSwapByOutputAction = { pool_id: number; token_in: string; amount_out: string | null; token_out: string; min_amount_out: string | null; }; export declare const refSwapEstimateToActions: (estimate: SwapEstimate) => RefSwapByOutputAction[]; export type FungibleTokenContract = { contract: string; spec: string; name: string; symbol: string; icon: string; reference: string; reference_hash: string; decimals: number; }; export declare const searchFungibleTokens: (accountIDSearchTerm: string | undefined, symbolSearchTerm: string | undefined, nameSearchTerm: string | undefined, maxNumberOfResults: number) => Promise>; export declare const getFungibleTokenContractInfo: (contractId: string) => Promise>; declare const ParsedMethodSchema: z.ZodObject<{ action: z.ZodArray; method_name: z.ZodString; }, "strip", z.ZodTypeAny, { gas: number; deposit: string; args_base64: string | null; method_name: string; args_json?: any; }, { gas: number; deposit: string; args_base64: string | null; method_name: string; args_json?: any; }>; }, "strip", z.ZodTypeAny, { args: { gas: number; deposit: string; args_base64: string | null; method_name: string; args_json?: any; }; }, { args: { gas: number; deposit: string; args_base64: string | null; method_name: string; args_json?: any; }; }>, "many">; }, "strip", z.ZodTypeAny, { action: { args: { gas: number; deposit: string; args_base64: string | null; method_name: string; args_json?: any; }; }[]; }, { action: { args: { gas: number; deposit: string; args_base64: string | null; method_name: string; args_json?: any; }; }[]; }>; export type ParsedMethod = z.infer; export declare const getParsedContractMethod: (contractId: string, methodName: string) => Promise>; export declare const getNearBlocksJsonSchema: () => Promise>; export interface JsonToZodConfig { convertTuples?: boolean; zodValueOverrides?: Record>; } export declare const json_to_zod: (json: unknown, options?: JsonToZodConfig) => Result, Error>; export declare const stringify_bigint: (val: unknown) => string; export declare const bigIntPreprocess: (val: unknown) => unknown; export declare class NearToken { private yoctoNear; constructor(yoctoNear: bigint); as_yocto_near(): bigint; as_near(): number; static parse_yocto_near(yoctoNear: string | bigint): NearToken; static parse_near(near: string | number): NearToken; } export declare const noLeadingWhitespace: (strings: TemplateStringsArray, ...values: unknown[]) => string; export {}; //# sourceMappingURL=utils.d.ts.map