import type { ProviderParams } from '@reclaimprotocol/attestor-core'; import type { ProofResult } from './attestor.ts'; /** Attestor HTTP provider params — the recipe the agent synthesis produces. */ export type HttpParams = ProviderParams<'http'>; /** Captured secrets for the replay, exactly as `/reclaim/prove` wants them. */ export interface HttpSecretParams { cookieStr?: string; authorisationHeader?: string; headers?: Record; paramValues?: Record; } export interface PopcornProveOptions { /** Pod API base (the session's `apiUrl`). */ apiUrl: string; params: HttpParams; secretParams: HttpSecretParams; /** Session context, stringified into the claim context if given. */ context?: Record; /** Base64 JSON authorization forwarded by reclaim-tee to the attestor. */ authRequest?: string; fetchImpl?: typeof fetch; } export interface ValidateExtractionResult { valid: boolean; extractedValue?: string; error?: string; steps?: string[]; } /** * The cloud "replay": validate that a drafted recipe's selectors extract the * expected value from a captured response, inside the TEE — `POST {apiUrl} * /reclaim/validate-extraction`. Reuses the prover's own redaction engine, so * a pass means the selectors won't diverge at proof time. No proof/secrets. */ export declare function popcornValidateExtraction(opts: { apiUrl: string; responseBody: string; expectedValue: string; xPath?: string; jsonPath?: string; regex?: string; fetchImpl?: typeof fetch; }): Promise; /** * Prove a single request through the Popcorn TEE. Returns the shared * {@link ProofResult}; on any failure `verified` is false and `error` carries * the reason (never throws for an expected proof failure). */ export declare function popcornProve(opts: PopcornProveOptions): Promise;