import { PaymentSDK } from "./PaymentSDK"; import { IdentitySDK } from "./IdentitySDK"; import { PauliKeySDK } from "./PauliKeySDK"; import type { FluidAgentConfig, AgentMeResult } from "./types"; export declare class FluidAgent { readonly payments: PaymentSDK; readonly identity: IdentitySDK; readonly keys: PauliKeySDK; private agentKey; private baseUrl; private fadpEnabled; private fadpMaxUsd; private checkBalanceEnabled; constructor(config: FluidAgentConfig); private _fetch; /** * Returns balance entries plus a pre-parsed USDC amount for the given chain. */ private _getBalance; /** * Checks if the wallet has enough balance to pay. * Logs a funding message if insufficient and throws. */ private _assertSufficientBalance; private _logReceipt; private _fadpRequest; /** * FADP-aware fetch — call any external API and auto-pay FADP 402 walls. * * Requires `fadp: true` in config (or use fadpFetch() for per-call config). * * @example * const agent = new FluidAgent({ agentKey: "fwag_...", fadp: true }); * const res = await agent.fetch("https://paid-api.example.com/data"); */ fetch(input: string | URL, init?: RequestInit): Promise; /** * Returns a reusable FADP-aware fetch function. * Always auto-pays regardless of the `fadp` config flag. * * @example * // Type B — TypeScript project * const fetch = agent.fadpFetch({ maxAutoPayUsd: 5 }); * const res = await fetch("https://paid-api.example.com/data"); * * // Type C — Full-stack: pass to a service * const safeFetch = agent.fadpFetch(); * const data = await safeFetch(apiUrl).then(r => r.json()); */ fadpFetch(opts?: { maxAutoPayUsd?: number; }): (input: string | URL, init?: RequestInit) => Promise; /** Get identity, email, scopes, and key metadata for the current agent key */ me(): Promise; /** * USDC (and ETH) balance for the current agent's wallet. * * @param chainOrOpts Chain name "base" | "ethereum" | "solana" * or an options object { chain?: string } * * @example * await agent.getBalance("base"); * await agent.getBalance({ chain: "base" }); */ getBalance(chainOrOpts?: string | { chain?: string; }): Promise; } //# sourceMappingURL=FluidAgent.d.ts.map