declare const SUPPORTED_TEE_ATTESTATION_VERSIONS: readonly ["v2", "v3"];
type TeeAttestationVersion = typeof SUPPORTED_TEE_ATTESTATION_VERSIONS[number];
interface TeeAttestation {
    proof_version: TeeAttestationVersion;
    tee_provider: string;
    tee_technology: string;
    nonce: string;
    timestamp: string;
    workload: {
        container_name: string;
        image_digest: string;
    };
    verifier: {
        container_name: string;
        image_digest: string;
    };
    attestation: {
        token: string;
    };
    error?: {
        code: string;
        message: string;
    };
}
interface Proof {
    identifier: string;
    claimData: ProviderClaimData;
    signatures: string[];
    witnesses: WitnessData[];
    extractedParameterValues: any;
    /**
     * A JSON serializable object that is returned by the provider as additional data attached to proof.
     * This data is not verified or validated.
     */
    publicData?: any;
    taskId?: number;
    teeAttestation?: TeeAttestation;
}
declare const RECLAIM_EXTENSION_ACTIONS: {
    CHECK_EXTENSION: string;
    EXTENSION_RESPONSE: string;
    START_VERIFICATION: string;
    STATUS_UPDATE: string;
};
interface ExtensionMessage {
    action: string;
    messageId: string;
    data?: any;
    extensionID?: string;
}
interface WitnessData {
    id: string;
    url: string;
    claimAttestation?: AttestorClaimAttestation;
}
/**
 * Attestation produced by an attestor running inside a Trusted Execution
 * Environment. Binds the attestor's signing key (and its signature over
 * the claim) to a hardware-backed enclave identity.
 *
 * Verified by `runAttestorTeeVerification`.
 */
interface AttestorClaimAttestation {
    /** ETH address of the attestor whose enclave produced the attestation. Matches `WitnessData.id`. */
    attestor_address: string;
    /** Attestor signature over the claim. Must equal the corresponding entry in `Proof.signatures`. */
    claim_signature: string;
    /** Raw attestation report. For GCP Confidential Space, a JWT (header.payload.signature). */
    attestation_report: string;
}
interface ProviderClaimData {
    provider: string;
    parameters: string;
    owner: string;
    timestampS: number;
    context: string;
    identifier: string;
    epoch: number;
}
interface Context {
    contextAddress: string;
    contextMessage: string;
    reclaimSessionId: string;
    extractedParameters?: Record<string, string>;
    providerHash?: string;
    attestationNonce?: string;
    attestationNonceData?: {
        applicationId: string;
        sessionId: string;
        timestamp: string;
        attestationVersion?: TeeAttestationVersion;
    };
}
interface Beacon {
    getState(epoch?: number): Promise<BeaconState>;
    close?(): Promise<void>;
}
type BeaconState = {
    witnesses: WitnessData[];
    epoch: number;
    witnessesRequiredForClaim: number;
    nextEpochTimestampS: number;
};
/**
 * Information of the exact provider and its version used in the verification session.
 *
 * See also:
 *
 * * `ReclaimProofRequest.getProviderVersion()` - With a ReclaimProofRequest object, you can get the provider id & exact version of provider used in verification session.
 */
interface ProviderVersionInfo {
    /**
     * The identifier of provider used in verifications that resulted in a proof
     *
     * See also:
     *
     * * `ReclaimProofRequest.getProviderVersion()` - With a ReclaimProofRequest object, you can get the provider id & exact version of provider used in verification session.
     */
    providerId: string;
    /**
     * The exact version of provider used in verifications that resulted in a proof.
     *
     * This cannot be a version constaint or version expression.
     *
     * See also:
     *
     * * `ReclaimProofRequest.getProviderVersion()` - With a ReclaimProofRequest object, you can get the provider id & exact version of provider used in verification session.
     */
    providerVersion: string;
    /**
     * List of allowed pre-release tags.
     * For example, if you are using AI, provide `['ai']` to allow AI patch versions of the provider.
     */
    allowedTags: string[];
}

/**
 * Fetches the provider configuration by the providerId and its version; and constructs the robust hash requirements needed for proof validation.
 * It resolves both explicitly required HTTP requests and allowed injected requests based on the provider version.
 *
 * See also:
 *
 * * `ReclaimProofRequest.getProviderHashRequirements()` - An alternative of this function to get the expected hashes for a proof request. The result can be provided in verifyProof function's `config` parameter for proof validation.
 * * `getProviderHashRequirementsFromSpec()` - An alternative of this function to get the expected hashes from a provider spec. The result can be provided in verifyProof function's `config` parameter for proof validation.
 *
 * @param providerId - The unique identifier of the selected provider.
 * @param exactProviderVersionString - The specific version string of the provider configuration to ensure deterministic validation.
 * @returns A promise that resolves to `ProviderHashRequirementsConfig` representing the expected hashes for proof validation.
 */
declare function fetchProviderHashRequirementsBy(providerId: string, exactProviderVersionString: string | null | undefined, allowedTags: string[] | null | undefined, proofs?: Proof[]): Promise<ProviderHashRequirementsConfig[]>;
/**
 * Generates an array of `RequestSpec` objects by replacing template parameters with their corresponding values.
 *
 * If the input template includes `templateParams` (e.g., `['param1', 'param2']`), this function will
 * cartesian-map (or pairwise-map) the provided `templateParameters` record (e.g., `{ param1: ['v1', 'v2'], param2: ['a1', 'a2'] }`)
 * to generate `RequestSpec` configurations. How those configurations are shaped is controlled by
 * `template.templateParamsMode` (defaults to `'separate'`):
 *
 * - `'separate'`: each value pair produces its own independent `RequestSpec` — N values in, N
 *   specs out, each expected to match its own separate proof.
 * - `'merge'`: all value pairs are folded into a single `RequestSpec`, whose `responseMatches`/
 *   `responseRedactions` arrays gain one entry per value — N values in, 1 spec out (with N
 *   entries), expected to match one proof that bundles all N values into a single claim.
 *
 * The function ensures that:
 * 1. Parameters strictly specified in `template.templateParams` are found — unless NONE of them
 *    are present at all AND the template is optional (`template.required === false`), in which
 *    case that template is silently skipped (contributes no spec) rather than throwing. This is
 *    the expected shape for a template describing data a user may legitimately not have at all
 *    (e.g. zero followed artists never produces that group's witness params in any proof).
 *    A required (default) template with missing params still throws, and a template with only
 *    SOME of its declared params present (a partial, inconsistent match) still throws regardless
 *    of `required` — that indicates malformed data, not legitimate absence.
 * 2. All specified template parameters arrays have the exact same length (pairwise mapping).
 * 3. String replacements are fully applied (all occurrences) to `responseMatches` (value) and `responseRedactions` (jsonPath, xPath, regex).
 *
 * @param requestSpecTemplates - The base template `RequestSpec` containing parameter placeholders.
 * @param templateParameters - A record mapping parameter names to arrays of strings representing the extracted values.
 * @returns An array of fully constructed `RequestSpec` objects with templates replaced. May contain
 *   fewer entries than `requestSpecTemplates` when optional templates were skipped per the above.
 * @throws {InvalidRequestSpecError} If a required template's parameters are missing, or any template's
 *   parameter value arrays have mismatched lengths.
 */
declare function generateSpecsFromRequestSpecTemplate(requestSpecTemplates: RequestSpec[], templateParameters: Record<string, string[]>): RequestSpec[];
declare function takeTemplateParametersFromProofs(proofs?: Proof[]): Record<string, string[]>;
declare function takePairsWhereValueIsArray(o: Record<string, string> | undefined): Record<string, string[]>;
/**
 * Builds and returns raw hash requirement spec that can be used with `getProviderHashRequirementsFromSpec` to computes the expected proof hashes for a provider configuration
 * by combining its explicitly required requests and allowed injected requests.
 * It resolves template parameters from provided proofs to generate the final request specifications.
 *
 * @param providerConfig - The provider configuration containing request data and allowed injected requests.
 * @param proofs - Optional array of proofs used to extract template parameters for resolving placeholders in injected requests.
 * @returns A structured configuration containing that can be used with `getProviderHashRequirementsFromSpec` to compute the hashes.
 */
declare function getProviderHashRequirementSpecFromProviderConfig(providerConfig: ReclaimProviderConfigWithRequestSpec, proofs?: Proof[]): ProviderHashRequirementSpec;
/**
 * Transforms a raw provider hash requirement specification into a structured configuration for proof validation.
 * It computes the proof hashes for both required and allowed extra requests to correctly match uploaded proofs.
 *
 * See also:
 *
 * * `fetchProviderHashRequirementsBy()` - An alternative of this function to get the expected hashes for a provider version by providing providerId and exactProviderVersionString. The result can be provided in verifyProof function's `config` parameter for proof validation.
 * * `ReclaimProofRequest.getProviderHashRequirements()` - An alternative of this function to get the expected hashes for a proof request. The result can be provided in verifyProof function's `config` parameter for proof validation.
 *
 * @param spec - The raw provider specifications including required and allowed requests.
 * @returns A structured configuration containing computed required and allowed hashes for validation.
 */
declare function getProviderHashRequirementsFromSpec(spec: ProviderHashRequirementSpec): ProviderHashRequirementsConfig;
/**
 * Computes the claim hash for a specific request specification based on its properties.
 *
 * @param request - The HTTP request specification (e.g., URL, method, sniffs).
 * @returns A string representing the hashed proof claim parameters.
 */
declare function hashRequestSpec(request: RequestSpec): HashRequirement;
/**
 * Represents the raw specification of hash requirements provided by a provider's configuration.
 */
interface ProviderHashRequirementSpec {
    /** List of request specs that can match with HTTP requests to create a proof using Reclaim Protocol */
    requests: RequestSpec[] | undefined;
}
/**
 * The structured hash requirements configuration used during proof verification and content validation.
 */
type ProviderHashRequirementsConfig = {
    /**
     * Array of computed hash requirements that must be satisfied by the proofs.
     */
    hashes: HashRequirement[];
};
/**
 * Describes a hash requirement for a proof.
 */
type HashRequirement = {
    /**
     * The hash value(s) to match. An array represents multiple valid hashes for optional configurations.
     */
    value: string | string[];
    /**
     * Whether the hash is required to be present in the proof.
     * Defaults to true
     */
    required?: boolean;
    /**
     * Whether the hash can appear multiple times in the proof.
     * Defaults to false
     */
    multiple?: boolean;
};
interface ReclaimProviderConfigWithRequestSpec {
    requestData: InterceptorRequestSpec[];
    allowedInjectedRequestData: InjectedRequestSpec[];
}
/**
 * Specific marker interface for intercepted request specifications.
 */
interface InterceptorRequestSpec extends RequestSpec {
}
/**
 * Specific marker interface for injected request specifications.
 */
interface InjectedRequestSpec extends RequestSpec {
}
/**
 * Represents the properties and validation steps for an HTTP request involved in a Reclaim proof.
 */
interface RequestSpec {
    /** The URL or generic path of the HTTP request */
    url: string;
    /** Type or representation of the URL */
    urlType: string;
    /** The HTTP method used for the request */
    method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
    /** Identifies and captures the request body if enabled */
    bodySniff: BodySniff;
    /** Required matching configurations for the HTTP response */
    responseMatches: ResponseMatchSpec[];
    /** Redaction rules applied to the HTTP response before passing to attestors */
    responseRedactions: ResponseRedactionSpec[];
    /**
     * Whether request matching this spec is required and always expected in list of proofs
     * Defaults to true.
     */
    required?: boolean;
    /**
     * Whether request matching this spec is allowed to appear multiple times in list of proofs.
     * Defaults to true.
     */
    multiple?: boolean;
    /**
     * Template parameter variables for the request spec that should be replaced with real values
     * during dynamic request spec construction.
     */
    templateParams?: string[];
    /**
     * Controls how a template with multiple values per `templateParams` entry is expanded by
     * `generateSpecsFromRequestSpecTemplate`.
     *
     * - `'separate'` (default): each value produces its own independent `RequestSpec` (and
     *   therefore its own expected hash), matching N separate proofs. Use this when the same
     *   small claim shape is expected to appear as N separate proofs (e.g. one proof per employee
     *   record).
     * - `'merge'`: all values are folded into a single `RequestSpec`, with one `responseMatches`/
     *   `responseRedactions` entry generated per value, matching one proof/hash. Use this when a
     *   single claim bundles many values together (e.g. one claim proving 30 playlist names at
     *   once) — the shape that `'separate'` cannot express, since it can only ever produce many
     *   small specs, never one combined spec.
     */
    templateParamsMode?: 'separate' | 'merge';
}
/**
 * Defines the configuration for identifying/sniffing the request body.
 */
interface BodySniff {
    /** Indicates whether body sniffing is enabled */
    enabled: boolean;
    /** The template string used to match or capture the body */
    template: string;
}
/**
 * Specifies a rule to match against a string in response to validate proof content.
 */
interface ResponseMatchSpec {
    /** If true, the match condition is reversed */
    invert: boolean | undefined;
    /** If true, the match condition is optional and won't fail if absent */
    isOptional: boolean | undefined;
    /** The matching mechanism, typically regex or simple string containment */
    type: "regex" | "contains";
    /** The pattern or value to look for in the response */
    value: string;
}
/**
 * Specifies redaction rules for obscuring sensitive parts of the response.
 */
interface ResponseRedactionSpec {
    /** Optional hashing method applied to the redacted content (e.g., 'oprf') */
    hash?: "oprf" | "oprf-mpc" | "oprf-raw" | undefined;
    /** JSON path for locating the value to redact */
    jsonPath: string;
    /** RegEx applied to correctly parse and extract/redact value */
    regex: string;
    /** XPath for XML/HTML matching configuration */
    xPath: string;
}

/**
 * Result of verifying an attestor TEE attestation.
 */
type AttestorTeeVerificationResult = {
    isVerified: boolean;
    error?: string;
    /** sha256 image digest of the attestor container, on success. */
    imageDigest?: string;
};
/**
 * Validates a GCP Confidential Space attestation JWT produced by an
 * attestor running in a Confidential Space VM, and asserts that the
 * attestation binds to the given attestor address.
 *
 * The attestor (running inside the TEE) calls the Confidential Space
 * launcher's attestation endpoint with two nonces:
 *   - `attestor_public_key:<eth-address>` - binds to the signing key.
 *   - `attestor_cert_hash:<sha256-hex>`   - binds to the live TLS cert.
 *
 * This function only verifies the public-key nonce. The TLS cert hash
 * binding is informational and not checked here. Callers that need to
 * pin to a specific attestor image should compare the returned
 * `imageDigest` against a known-good value.
 *
 * The JWT signature is verified by walking the x5c certificate chain
 * to a pinned GCP Confidential Space Root CA. No outbound network
 * calls are made.
 *
 * Node-only (uses node:crypto). Mirrors the environment restriction in
 * the existing `verifyTeeAttestation` helper.
 *
 * @param report - the raw JWT string (header.payload.signature).
 * @param expectedAttestorAddress - hex ETH address (0x-prefixed or
 *   unprefixed) that the attestation should be bound to.
 */
declare function verifyAttestorTeeAttestation(report: string, expectedAttestorAddress: string): Promise<AttestorTeeVerificationResult>;
/**
 * Configuration for verifying the attestor's TEE attestation on each
 * witness of the proof.
 */
type AttestorTeeAttestationConfig = {
    /**
     * Optional allowlist of expected attestor container image digests
     * (e.g. `"sha256:4906340f..."`). When provided, the attestation's
     * `submods.container.image_digest` must be in this list.
     *
     * Leave undefined to skip image pinning and rely solely on the JWT
     * chain rooting to the GCP Confidential Space Root CA + nonce
     * binding to the attestor address.
     */
    expectedImageDigests?: string[];
};

/**
 * Content validation configuration specifying essential required hashes and optional extra proofs.
 * Used to explicitly validate that a generated proof matches the exact request structure expected.
 */
type ValidationConfigWithHash = {
    /**
     * Array of computed hashes that must be satisfied by the proofs.
     *
     * An element can be a `HashRequirement` object or a string that is equivalent to
     * a `{ value: '<hash>', required: true, multiple: false }` as `HashRequirement`.
     */
    hashes: (string | HashRequirement)[];
};
/**
 * Content validation configuration specifying the provider id and version used in the verification session that generated the proofs.
 * Used to explicitly validate that a generated proof matches the exact request structure expected.
 *
 * See also:
 *
 * * `ReclaimProofRequest.getProviderVersion()` - With a ReclaimProofRequest object, you can get the provider id & exact version of provider used in verification session.
 */
interface ValidationConfigWithProviderInformation {
    /**
     * The identifier of provider used in verifications that resulted in a proof
     *
     * See also:
     *
     * * `ReclaimProofRequest.getProviderVersion()` - With a ReclaimProofRequest object, you can get the provider id & exact version of provider used in verification session.
     **/
    providerId: string;
    /**
     * The exact version of provider used in verifications that resulted in a proof.
     *
     * This cannot be a version constaint or version expression. It can be undefined or left blank if proof must be validated with latest version of provider.
     * Patches for the next provider version are also fetched and hashes from that spec is also be used to compare the hashes from proof.
     *
     * See also:
     *
     * * `ReclaimProofRequest.getProviderVersion()` - With a ReclaimProofRequest object, you can get the provider id & exact version of provider used in verification session.
     **/
    providerVersion?: string;
    /**
     * List of allowed pre-release tags.
     * For example, if you are using AI, provide `['ai']` to allow AI patch versions of the provider.
     */
    allowedTags?: string[];
}
/**
 * Legacy configuration to completely bypass content validation during verification.
 * Warning: Using this poses a risk as it avoids strictly matching proof parameters to expected hashes.
 */
interface ValidationConfigWithDisabledValidation {
    dangerouslyDisableContentValidation: true;
}
/**
 * Represents the configuration options applied when validating proof contents, allowing
 * strict hash checking or intentionally skipping validation if flagged.
 */
type ValidationConfig = ValidationConfigWithHash | ValidationConfigWithProviderInformation | ValidationConfigWithDisabledValidation;
/**
 * Describes the comprehensive configuration required to initialize the proof verification process.
 * Aligns with `ValidationConfig` options for verifying signatures alongside proof contents.
 */
type TeeAttestationConfig = {
    /**
     * Your application secret (Ethereum private key).
     * Used to recompute the TEE attestation nonce and to derive the application ID
     * for binding the attestation to your application.
     */
    appSecret: string;
};
type VerifyAttestationConfig = {
    /**
    * TEE attestation verification configuration.
    * When provided, verifies the TEE attestation included in the proof.
    * The result will include `isTeeAttestationVerified` and `isVerified` will be false
    * if TEE attestation data is missing or verification fails.
    */
    teeAttestation?: TeeAttestationConfig;
    /**
     * Attestor TEE attestation verification configuration.
     * When provided, verifies that every witness on every proof has a valid
     * `claimAttestation` from an attestor running inside a TEE (GCP
     * Confidential Space).
     *
     * Independent of `teeAttestation`, which verifies the verifier-app's
     * own TEE attestation. Both can be enabled together.
     *
     * The result will include `isAttestorTeeAttestationVerified` and
     * `isVerified` will be false if any witness is missing TEE attestation
     * data or its verification fails.
     */
    attestorTeeAttestation?: AttestorTeeAttestationConfig;
};
type PiiVerificationConfig = {
    hasNoPii?: true;
};
type VerificationConfig = ValidationConfig & VerifyAttestationConfig & PiiVerificationConfig;
declare const HASH_REQUIRED_DEFAULT = true;
declare const HASH_MATCH_MULTIPLE_DEFAULT = true;
declare function getHashFromProof(proof: Proof, piiConfig?: PiiVerificationConfig): string[];
declare function assertValidProofsByHash(proofs: Proof[], config: ProviderHashRequirementsConfig, piiConfig?: PiiVerificationConfig): void;
declare function isHttpProviderClaimParams(claimParams: unknown): claimParams is HttpProviderClaimParams;
declare function getHttpProviderClaimParamsFromProof(proof: Proof): HttpProviderClaimParams;
/**
 * Asserts that the proof is validated by checking the content of proof with with expectations from provider config or hash based on [options]
 * @param proofs - The proofs to validate
 * @param config - The validation config
 * @throws {ProofNotValidatedError} When the proof is not validated
 */
declare function assertValidateProof(proofs: Proof[], config: VerificationConfig, piiConfig?: PiiVerificationConfig): Promise<void>;

type ClaimID = ProviderClaimData['identifier'];
type ClaimInfo = Pick<ProviderClaimData, 'context' | 'provider' | 'parameters'>;
type CompleteClaimData = Pick<ProviderClaimData, 'owner' | 'timestampS' | 'epoch'> & ClaimInfo;
interface HttpProviderClaimParams {
    body?: string | null;
    method: RequestSpec['method'];
    responseMatches: ResponseMatchSpec[];
    responseRedactions: ResponseRedactionSpec[];
    url: string;
}
interface HashableHttpProviderClaimParams {
    body: string;
    method: RequestSpec['method'];
    responseMatches: (Omit<ResponseMatchSpec, 'isOptional'>)[];
    responseRedactions: ResponseRedactionSpec[];
    url: string;
}
type SignedClaim = {
    claim: CompleteClaimData;
    signatures: Uint8Array[];
};
type CreateVerificationRequest = {
    providerIds: string[];
    applicationSecret?: string;
};
type StartSessionParams = {
    /**
     * Callback function that is invoked when the session is successfully created.
     *
     * @param proofOrProofs - A single proof object or an array of proof objects. This can be empty when proofs are sent to callback.
     */
    onSuccess: OnSuccess;
    /**
     * Callback function that is invoked when the session fails to be created.
     *
     * @param error - The error that caused the session to fail.
     */
    onError: OnError;
    /**
     * Configuration for proof validation. Defaults to the provider id and version used in this session.
     */
    verificationConfig?: VerificationConfig;
};
/**
 * Callback function that is invoked when the session is successfully created.
 *
 * @param proofOrProofs - A single proof object or an array of proof objects. This can be empty when proofs are sent to callback.
 */
type OnSuccess = (proofOrProofs: Proof | Proof[]) => void;
/**
 * Callback function that is invoked when the session fails to be created.
 *
 * @param error - The error that caused the session to fail.
 */
type OnError = (error: Error) => void;
type ProofRequestOptions = {
    /**
     * Enables troubleshooting mode and more verbose logging
     */
    log?: boolean;
    /**
     * Accepts AI providers in the verification flow
     */
    acceptAiProviders?: boolean;
    useAppClip?: boolean;
    device?: string;
    envUrl?: string;
    useBrowserExtension?: boolean;
    extensionID?: string;
    providerVersion?: string;
    /**
     * @deprecated Use `portalUrl` instead.
     */
    customSharePageUrl?: string;
    /**
     * URL of the portal/share page for the verification flow.
     *
     * @default 'https://portal.reclaimprotocol.org'
     */
    portalUrl?: string;
    customAppClipUrl?: string;
    launchOptions?: ReclaimFlowInitOptions;
    /**
     * Whether the verification client should automatically submit necessary proofs once they are generated.
     * If set to false, the user must manually click a button to submit.
     *
     * @since 4.7.0
     * @default true
     */
    canAutoSubmit?: boolean;
    /**
     * An identifier used to select a user's language and formatting preferences.
     *
     * Locales are expected to be canonicalized according to the "preferred value" entries in the [IANA Language Subtag Registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry).
     * For example, `he`, and `iw` are equal and both have the languageCode `he`, because `iw` is a deprecated language subtag that was replaced by the subtag `he`.
     *
     * Defaults to the browser's locale if available, otherwise English (en).
     *
     * For more info, refer: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#description
     *
     * @since 4.9.0
     */
    preferredLocale?: string;
    /**
     * Additional metadata to pass to the verification client frontend.
     * This can be used to customize the client UI experience, such as customizing themes or UI by passing context-specific information.
     * The keys and values must be strings. For most clients, this is not required and goes unused.
     *
     * This has no effect on the verification process.
     *
     * Example: `{ theme: 'dark', verify_another_way_link: 'https://exampe.org/alternative-verification?id=1234' }`
     *
     * @since 4.7.0
     */
    metadata?: Record<string, string>;
    /**
     * Generates a TEE attestation nonce during session initialization and expects a TEE attestation in the proof.
     *
     * @default true
     */
    acceptTeeAttestation?: boolean;
    /**
     * Identifier of the partner organization (e.g. the SheerID orgId) this
     * verification session belongs to.
     *
     * When set, it is included on session initialization and on session status
     * updates sent by the SDK, and in the template passed to the verification
     * client, which forwards it on its own status updates. Used for
     * per-organization attribution/analytics.
     *
     * This has no effect on the verification process.
     */
    orgId?: string;
};
type ReclaimFlowInitOptions = {
    /**
     * Enables deferred deep links for the Reclaim verification flow.
     *
     * When enabled, users without the verifier app installed will receive a deferred deep link
     * that automatically launches the verification flow after they install the app, ensuring
     * a seamless continuation of the verification process.
     *
     * **Default Behavior:** Enabled by default for Android. Opt-in during rollout phase for iOS.
     * Will default to `true` for all apps once fully released.
     * See: https://blog.reclaimprotocol.org/posts/moving-beyond-google-play-instant
     */
    canUseDeferredDeepLinksFlow?: boolean;
    /**
     * Verification mode for the flow.
     *
     * - `'portal'`: Opens the portal URL in the browser (remote browser verification).
     * - `'app'`: Verifier app flow via the share page. If `useAppClip` is `true`, uses App Clip on iOS.
     *
     * Can be set at call time via `triggerReclaimFlow({ verificationMode })` or `getRequestUrl({ verificationMode })`,
     * or at init time via `launchOptions: { verificationMode }`.
     *
     * @default 'portal'
     */
    verificationMode?: 'app' | 'portal';
    /**
     * The deeplink to ios mobile application.
     * Defaults to `reclaimverifier://org.reclaimprotocol.app`.
     */
    iosDeepLinkBaseUrl?: string;
    /**
     * The link to ios app store page.
     * Defaults to Reclaim Verifier's iOS App store page
     * `itms-apps://apps.apple.com/in/app/reclaim-verifier/id6503247508`
     */
    iosAppDownloadUrl?: string;
};
type ReclaimFlowLaunchOptions = ReclaimFlowInitOptions & {
    /**
     * Target DOM element to embed the verification flow in an iframe.
     * When provided, the portal opens inside the element instead of a new tab.
     * Use `closeEmbeddedFlow()` to remove the iframe programmatically.
     *
     * Only applies to portal mode.
     */
    target?: HTMLElement;
};
/**
 * Handle returned by `triggerReclaimFlow` to control the launched flow.
 */
type FlowHandle = {
    /** Closes the flow (removes iframe, closes tab, stops polling) */
    close: () => void;
    /** The iframe element when using embedded mode, `undefined` otherwise */
    iframe?: HTMLIFrameElement;
    /** The tab/window reference when using new tab mode, `undefined` otherwise */
    tab?: Window | null;
};
/** Alias for `FlowHandle` */
type EmbeddedFlowHandle = FlowHandle;
type ModalOptions = {
    title?: string;
    description?: string;
    extensionUrl?: string;
    darkTheme?: boolean;
    modalPopupTimer?: number;
    showExtensionInstallButton?: boolean;
    onClose?: () => void;
};
type SerializableModalOptions = Omit<ModalOptions, 'onClose'>;
declare enum ClaimCreationType {
    STANDALONE = "createClaim",
    ON_ME_CHAIN = "createClaimOnMechain"
}
declare enum DeviceType {
    ANDROID = "android",
    IOS = "ios",
    DESKTOP = "desktop",
    MOBILE = "mobile"
}
type InitSessionResponse = {
    sessionId: string;
    resolvedProviderVersion: string;
};
interface UpdateSessionResponse {
    success: boolean;
    message?: string;
}
declare enum SessionStatus {
    SESSION_INIT = "SESSION_INIT",
    SESSION_STARTED = "SESSION_STARTED",
    USER_INIT_VERIFICATION = "USER_INIT_VERIFICATION",
    USER_STARTED_VERIFICATION = "USER_STARTED_VERIFICATION",
    PROOF_GENERATION_STARTED = "PROOF_GENERATION_STARTED",
    PROOF_GENERATION_SUCCESS = "PROOF_GENERATION_SUCCESS",
    PROOF_GENERATION_FAILED = "PROOF_GENERATION_FAILED",
    PROOF_SUBMITTED = "PROOF_SUBMITTED",
    AI_PROOF_SUBMITTED = "AI_PROOF_SUBMITTED",
    PROOF_SUBMISSION_FAILED = "PROOF_SUBMISSION_FAILED",
    ERROR_SUBMITTED = "ERROR_SUBMITTED",
    ERROR_SUBMISSION_FAILED = "ERROR_SUBMISSION_FAILED",
    PROOF_MANUAL_VERIFICATION_SUBMITED = "PROOF_MANUAL_VERIFICATION_SUBMITED",
    SESSION_CANCELLED = "SESSION_CANCELLED"
}
type ProofPropertiesJSON = {
    applicationId: string;
    providerId: string;
    sessionId: string;
    context: Context;
    signature: string;
    redirectUrl?: string;
    redirectUrlOptions?: TemplateData['redirectUrlOptions'];
    parameters: {
        [key: string]: string;
    };
    /**
     * @deprecated use timestamp instead (maintained for compatibility)
     */
    timeStamp?: string;
    timestamp?: string;
    appCallbackUrl?: string;
    cancelCallbackUrl?: TemplateData['cancelCallbackUrl'];
    cancelRedirectUrl?: TemplateData['cancelRedirectUrl'];
    cancelRedirectUrlOptions?: TemplateData['cancelRedirectUrlOptions'];
    claimCreationType?: ClaimCreationType;
    options?: ProofRequestOptions;
    sdkVersion: string;
    jsonProofResponse?: boolean;
    resolvedProviderVersion: string;
    modalOptions?: SerializableModalOptions;
    teeAttestation?: TeeAttestation | string;
};
type HttpFormEntry = {
    name: string;
    value: string;
};
type HttpRedirectionMethod = 'GET' | 'POST';
/**
 * Options for HTTP redirection.
 *
 * Only supported by Portal flow.
 * On other SDKs, this will be ignored and a GET redirection will be performed with the URL.
 *
 * @since 4.11.0
 * @default "{ method: 'GET' }"
 */
type HttpRedirectionOptions = {
    /**
     * List of name-value pairs to be sent as the body of the form request.
     * When `method` is set to `POST`, `body` will be sent with 'application/x-www-form-urlencoded' content type.
     * When `method` is set to `GET`, `body` will be sent as query parameters.
     *
     * @default undefined
     */
    body?: HttpFormEntry[] | null | undefined;
    /**
     * HTTP method to use for the redirection.
     *
     * POST will result in `body` being sent with 'application/x-www-form-urlencoded' content type.
     * GET will result in `body`, if present, being sent as query parameters.
     *
     * With `method` set to `GET` and no `body`, this will result in a simple GET redirection using `window.location.href`.
     *
     * @default 'GET'
     */
    method?: HttpRedirectionMethod;
};
type TemplateData = {
    sessionId: string;
    providerId: string;
    applicationId: string;
    signature: string;
    timestamp: string;
    callbackUrl: string;
    context: string;
    parameters: {
        [key: string]: string;
    };
    redirectUrl: string;
    redirectUrlOptions?: HttpRedirectionOptions;
    cancelCallbackUrl?: string | null;
    cancelRedirectUrl?: string | null;
    cancelRedirectUrlOptions?: HttpRedirectionOptions;
    acceptAiProviders: boolean;
    sdkVersion: string;
    jsonProofResponse?: boolean;
    providerVersion?: string;
    resolvedProviderVersion: string;
    log?: boolean;
    canAutoSubmit?: boolean;
    metadata?: Record<string, string>;
    preferredLocale?: ProofRequestOptions['preferredLocale'];
    acceptTeeAttestation?: boolean;
    teeAttestationVersion?: TeeAttestationVersion;
    orgId?: string;
};
type TrustedData = {
    context: Record<string, unknown>;
    extractedParameters: Record<string, string>;
};
type VerifyProofResultSuccess = {
    isVerified: true;
    isTeeAttestationVerified?: boolean;
    isAttestorTeeAttestationVerified?: boolean;
    error: undefined;
    data: TrustedData[];
    publicData: any[];
};
type VerifyProofResultFailure = {
    isVerified: false;
    isTeeAttestationVerified?: boolean;
    isAttestorTeeAttestationVerified?: boolean;
    error: Error;
    data: [];
    publicData: [];
};
type VerifyProofResult = VerifyProofResultSuccess | VerifyProofResultFailure;
type ProviderVersionConfig = {
    major?: number;
    minor?: number;
    patch?: number;
    prereleaseTag?: string;
    prereleaseNumber?: number;
};
type StatusUrlResponse = {
    message: string;
    session?: {
        id: string;
        appId: string;
        httpProviderId: string[];
        providerId: string;
        providerVersionString: string;
        sessionId: string;
        proofs?: Proof[];
        statusV2: string;
        error?: {
            type: string;
            message: string;
        };
    };
    providerId?: string;
};
type ProviderConfigResponse = {
    message: string;
    providers?: ReclaimProviderConfig[];
    providerId?: string;
    providerVersionString?: string;
};
interface ReclaimProviderConfig extends ReclaimProviderConfigWithRequestSpec {
    loginUrl: string;
    customInjection: string;
    geoLocation: string;
    injectionType: string;
    disableRequestReplay: boolean;
    verificationType: string;
}
type ProviderHashRequirementsResponse = {
    message?: string;
    hashRequirements?: ProviderHashRequirementsConfig;
    providerId?: string;
    providerVersionString?: string;
};

/**
 * Verifies one or more Reclaim proofs by validating signatures, verifying witness information,
 * and performing content validation against the expected configuration.
 *
 * See also:
 *
 * * `ReclaimProofRequest.getProviderHashRequirements()` - To get the expected proof hash requirements for a proof request.
 * * `fetchProviderHashRequirementsBy()` - To get the expected proof hash requirements for a provider version by providing providerId and exactProviderVersionString.
 * * `getProviderHashRequirementsFromSpec()` - To get the expected proof hash requirements from a provider spec.
 * * All 3 functions above are alternatives of each other and result from these functions can be directly used as `config` parameter in this function for proof validation.
 *
 * Replay protection: this function is stateless. It verifies that a proof is cryptographically
 * bound to a specific `sessionId`/`applicationId` (via the `appSecret`-keyed attestation nonce
 * when `teeAttestation` is provided) but does not track which proofs have already been
 * verified. Callers must (a) verify the proof's `sessionId` matches a session they initiated
 * and (b) persist accepted `sessionId`s and reject duplicates. See the README's
 * "Replay Protection" section for details.
 *
 * @param proofOrProofs - A single proof object or an array of proof objects to be verified.
 * @param config - Verification configuration that specifies required hashes, allowed extra hashes, or disables content validation. Optionally includes `teeAttestation` to require TEE attestation verification.
 * @returns Verification result with `isVerified`, `isTeeAttestationVerified` (always boolean), extracted `data` from each proof, and optional `error` on failure. The application ID is derived from `appSecret` automatically.
 *
 * @example
 * ```typescript
 * // Fast and simple automatically fetched verification
 * const { isVerified, data } = await verifyProof(proof, request.getProviderVersion());
 *
 * // With TEE attestation verification (fails if TEE data is missing or invalid)
 * const { isVerified, isTeeAttestationVerified, data } = await verifyProof(proof, { ...request.getProviderVersion(), teeAttestation: { appSecret: APP_SECRET } });
 *
 * // Or, by manually providing the details:
 *
 * const { isVerified, data } = await verifyProof(proof, {
 *   providerId: "YOUR_PROVIDER_ID",
 *   // The exact provider version used in the session.
 *   providerVersion: "1.0.0",
 *   // Optionally provide tags. For example, this can be `['ai']` when you want to allow patches from ai.
 *   allowedTags: ["ai"]
 * });
 *
 * // Validate a single proof against expected hash
 * const { isVerified, data } = await verifyProof(proof, { hashes: ['0xAbC...'] });
 * if (isVerified) {
 *   console.log(data[0].context);
 *   console.log(data[0].extractedParameters);
 * }
 *
 * // Validate multiple proofs
 * const { isVerified, data } = await verifyProof([proof1, proof2], {
 *   hashes: ['0xAbC...', '0xF22..'],
 * });
 *
 * // Validate multiple proofs and handle optional matches or repeated proofs
 * const { isVerified, data } = await verifyProof([proof1, proof2, sameAsProof2], {
 *   hashes: [
 *     // A string hash is perfectly equivalent to { value: '...', required: true, multiple: true }
 *     '0xStrict1...',
 *     // An array 'value' means 1 proof can have any 1 matching hash from this list.
 *     // 'multiple: true' (the default) means any proof matching this hash is allowed to appear multiple times in the list of proofs.
 *     { value: ['0xOpt1..', '0xOpt2..'], multiple: true },
 *     // 'required: false' means there can be 0 proofs matching this hash. Such proofs may be optionally present. (Defaults to true).
 *     { value: '0xE33..', required: false }
 *   ],
 * });
 * ```
 */
declare function verifyProof(proofOrProofs: Proof | Proof[], config: VerificationConfig): Promise<VerifyProofResult>;
/**
 * Transforms a Reclaim proof into a format suitable for on-chain verification
 *
 * @param proof - The proof object to transform
 * @returns Object containing claimInfo and signedClaim formatted for blockchain contracts
 *
 * @example
 * ```typescript
 * const { claimInfo, signedClaim } = transformForOnchain(proof);
 * // Use claimInfo and signedClaim with smart contract verification
 * ```
 */
declare function transformForOnchain(proof: Proof): {
    claimInfo: any;
    signedClaim: any;
};
declare class ReclaimProofRequest {
    private applicationId;
    private signature?;
    private appCallbackUrl?;
    private sessionId;
    private options?;
    private context;
    private attestationNonce?;
    private attestationNonceData?;
    private claimCreationType?;
    private providerId;
    private resolvedProviderVersion?;
    private parameters;
    private redirectUrl?;
    private redirectUrlOptions?;
    private cancelCallbackUrl?;
    private cancelRedirectUrl?;
    private cancelRedirectUrlOptions?;
    private intervals;
    private timeStamp;
    private sdkVersion;
    private jsonProofResponse;
    private lastFailureTime?;
    private templateData;
    private extensionID;
    private customSharePageUrl?;
    private appSharePageUrl;
    private customAppClipUrl?;
    private portalTab?;
    private portalIframe?;
    private modalOptions?;
    private modal?;
    private readonly FAILURE_TIMEOUT;
    private constructor();
    /**
     * Initializes a new Reclaim proof request instance with automatic signature generation and session creation.
     *
     * @param applicationId - Your Reclaim application ID
     * @param appSecret - Your application secret key for signing requests
     * @param providerId - The ID of the provider to use for proof generation
     * @param options - Optional configuration options for the proof request
     * @returns A fully initialized proof request instance
     * @throws {InitError} When initialization fails due to invalid parameters or session creation errors
     *
     * @example
     * ```typescript
     * const proofRequest = await ReclaimProofRequest.init(
     *   'your-app-id',
     *   'your-app-secret',
     *   'provider-id',
     *   { portalUrl: 'https://portal.reclaimprotocol.org', log: true }
     * );
     * ```
     */
    static init(applicationId: string, appSecret: string, providerId: string, options?: ProofRequestOptions): Promise<ReclaimProofRequest>;
    /**
     * Initializes a new Reclaim proof request using a signature computed externally
     * (e.g. on a trusted backend), so `appSecret` never has to live on the client.
     *
     * The signature must be produced over `canonicalize({ providerId, timestamp })`
     * using the application's `appSecret` — see `generateInitSignature()` for the
     * exact algorithm. The same `timestamp` used at signing time must be passed here.
     *
     * TEE attestation: the attestation nonce depends on `sessionId`, which is only
     * known after the backend init call. To use TEE without exposing `appSecret`,
     * pass an async `getAttestationNonce` callback that derives the nonce on your
     * server using `generateAttestationNonce(appSecret, applicationId, sessionId, timestamp)`.
     * If `acceptTeeAttestation` is left enabled but no callback is provided, init throws.
     *
     * @param applicationId - Your Reclaim application ID
     * @param providerId - The ID of the provider to use for proof generation
     * @param sessionAuth - Pre-computed signature, the timestamp it was signed over,
     *                      and an optional async callback to compute the attestation nonce.
     * @param options - Optional configuration options for the proof request
     *
     * @example
     * ```typescript
     * // Backend (Node):
     * const timestamp = Date.now().toString();
     * const signature = await generateInitSignature(APP_SECRET, providerId, timestamp);
     * // ...return { signature, timestamp } to the client...
     *
     * // Client:
     * const proofRequest = await ReclaimProofRequest.initWithSignature(
     *   applicationId,
     *   providerId,
     *   { signature, timestamp },
     *   { acceptTeeAttestation: false }
     * );
     * ```
     */
    static initWithSignature(applicationId: string, providerId: string, sessionAuth: {
        signature: string;
        timestamp: string;
        getAttestationNonce?: (sessionId: string) => Promise<string> | string;
    }, options?: ProofRequestOptions): Promise<ReclaimProofRequest>;
    /**
     * Creates a ReclaimProofRequest instance from a JSON string representation
     *
     * This method deserializes a previously exported proof request (via toJsonString) and reconstructs
     * the instance with all its properties. Useful for recreating requests on the frontend or across different contexts.
     *
     * @param jsonString - JSON string containing the serialized proof request data
     * @returns {Promise<ReclaimProofRequest>} - Reconstructed proof request instance
     * @throws {InvalidParamError} When JSON string is invalid or contains invalid parameters
     *
     * @example
     * ```typescript
     * const jsonString = proofRequest.toJsonString();
     * const reconstructed = await ReclaimProofRequest.fromJsonString(jsonString);
     * // Can also be used with InApp SDK's startVerificationFromJson method
     * ```
     */
    static fromJsonString(jsonString: string): Promise<ReclaimProofRequest>;
    /**
     * Sets a custom callback URL where proofs will be submitted via HTTP `POST`
     *
     * By default, proofs are sent as HTTP POST with `Content-Type` as `application/x-www-form-urlencoded`.
     * Pass function argument `jsonProofResponse` as `true` to send proofs with `Content-Type` as `application/json`.
     *
     * When a custom callback URL is set, proofs are sent to the custom URL *instead* of the Reclaim backend.
     * Consequently, the startSession `onSuccess` callback will be invoked with an empty array (`[]`)
     * instead of the proof data, as the proof is not available to the SDK in this flow.
     *
     * This verification session's id will be present in `X-Reclaim-Session-Id` header of the request.
     * The request URL will contain query param `allowAiWitness` with value `true` when AI Witness should be allowed by handler of the request.
     *
     * Note: InApp SDKs are unaffected by this property as they do not handle proof submission.
     *
     * @param url - The URL where proofs should be submitted via HTTP `POST`
     * @param jsonProofResponse - Optional. Set to true to submit proofs as `application/json`. Defaults to false
     * @throws {InvalidParamError} When URL is invalid
     *
     * @example
     * ```typescript
     * proofRequest.setAppCallbackUrl('https://your-backend.com/callback');
     * // Or with JSON format
     * proofRequest.setAppCallbackUrl('https://your-backend.com/callback', true);
     * ```
     */
    setAppCallbackUrl(url: string, jsonProofResponse?: boolean): void;
    /**
     * Sets a redirect URL where users will be redirected after successfully acquiring and submitting proof
     *
     * @param url - The URL where users should be redirected after successful proof generation
     * @param method - The redirection method that should be used for redirection. Allowed options: `GET`, and `POST`.
     * `POST` form redirection is only supported in Portal flow.
     * @param body - List of name-value pairs to be sent as the body of the form request.
     * `When `method` is set to `POST`, `body` will be sent with 'application/x-www-form-urlencoded' content type.
     * When `method` is set to `GET`, if `body` is set then `body` will be sent as query parameters.
     * Sending `body` on redirection is only supported in Portal flow.
     *
     * @throws {InvalidParamError} When URL is invalid
     *
     * @example
     * ```typescript
     * proofRequest.setRedirectUrl('https://your-app.com/success');
     * ```
     */
    setRedirectUrl(url: string, method?: HttpRedirectionMethod, body?: HttpFormEntry[] | undefined): void;
    /**
     * Sets a custom callback URL where errors that abort the verification process will be submitted via HTTP POST
     *
     * Errors will be HTTP POSTed with `header 'Content-Type': 'application/json'`.
     * When a custom error callback URL is set, Reclaim will no longer receive errors upon submission,
     * and listeners on the startSession method will not be triggered. Your application must
     * coordinate with your backend to receive errors.
     *
     * This verification session's id will be present in `X-Reclaim-Session-Id` header of the request.
     *
     * Following is the data format which is sent as an HTTP POST request to the url with `Content-Type: application/json`:

     * ```json
     * {
     *  "type": "string", // Name of the exception
     *  "message": "string",
     *  "sessionId": "string",
     *   // context as canonicalized json string
     *   "context": "string",
     *   // Other fields with more details about error may be present
     *   // [key: any]: any
     * }
     * ```
     *
     * For more details about response format, check out [official documentation of Error Callback URL](https://docs.reclaimprotocol.org/js-sdk/preparing-request#cancel-callback).
     *
     * @param url - The URL where errors should be submitted via HTTP POST
     * @throws {InvalidParamError} When URL is invalid
     *
     * @example
     * ```typescript
     * proofRequest.setCancelCallbackUrl('https://your-backend.com/error-callback');
     * ```
     *
     * @since 4.8.1
     *
     */
    setCancelCallbackUrl(url: string): void;
    /**
     * Sets an error redirect URL where users will be redirected after an error which aborts the verification process
     *
     * @param url - The URL where users should be redirected after an error which aborts the verification process
     * @param method - The redirection method that should be used for redirection. Allowed options: `GET`, and `POST`.
     * `POST` form redirection is only supported in Portal flow.
     * @param body - List of name-value pairs to be sent as the body of the form request.
     * When `method` is set to `POST`, `body` will be sent with 'application/x-www-form-urlencoded' content type.
     * When `method` is set to `GET`, if `body` is set then `body` will be sent as query parameters.
     * Sending `body` on redirection is only supported in Portal flow.
     * @throws {InvalidParamError} When URL is invalid
     *
     * @example
     * ```typescript
     * proofRequest.setCancelRedirectUrl('https://your-app.com/error');
     * ```
     *
     * @since 4.10.0
     *
     */
    setCancelRedirectUrl(url: string, method?: HttpRedirectionMethod, body?: HttpFormEntry[] | undefined): void;
    /**
     * Sets the claim creation type for the proof request
     *
     * @param claimCreationType - The type of claim creation (e.g., STANDALONE)
     *
     * @example
     * ```typescript
     * proofRequest.setClaimCreationType(ClaimCreationType.STANDALONE);
     * ```
     */
    setClaimCreationType(claimCreationType: ClaimCreationType): void;
    /**
     * Sets custom options for the QR code modal display
     *
     * @param options - Modal configuration options including title, description, theme, etc.
     * @throws {SetParamsError} When modal options are invalid
     *
     * @example
     * ```typescript
     * proofRequest.setModalOptions({
     *   title: 'Scan QR Code',
     *   description: 'Scan with your mobile device',
     *   darkTheme: true
     * });
     * ```
     */
    setModalOptions(options: ModalOptions): void;
    /**
     * Sets additional context data to be stored with the claim
     *
     * This allows you to associate custom JSON serializable data with the proof claim.
     * The context can be retrieved and validated when verifying the proof.
     *
     * Also see [setContext] which is an alternate way to set context that has an address & message.
     *
     * [setContext] and [setJsonContext] overwrite each other. Each call replaces the existing context.
     *
     * @param context - Any additional data you want to store with the claim. Should be serializable to a JSON string.
     * @throws {SetContextError} When context parameters are invalid
     *
     * @example
     * ```typescript
     * proofRequest.setJsonContext({foo: 'bar'});
     * ```
     */
    setJsonContext(context: Record<string, any>): void;
    /**
     * Sets additional context data to be stored with the claim
     *
     * This allows you to associate custom data (address and message) with the proof claim.
     * The context can be retrieved and validated when verifying the proof.
     *
     * Also see [setJsonContext] which is an alternate way to set context that allows for custom JSON serializable data.
     *
     * [setContext] and [setJsonContext] overwrite each other. Each call replaces the existing context.
     *
     * @param address - Context address identifier
     * @param message - Additional data to associate with the address
     * @throws {SetContextError} When context parameters are invalid
     *
     * @example
     * ```typescript
     * proofRequest.setContext('0x1234...', 'User verification for premium access');
     * ```
     */
    setContext(address: string, message: string): void;
    /**
     * @deprecated use setContext instead
     *
     * @param address
     * @param message additional data you want associated with the [address]
     */
    addContext(address: string, message: string): void;
    /**
     * Sets provider-specific parameters for the proof request
     *
     * These parameters are passed to the provider and may include configuration options,
     * filters, or other provider-specific settings required for proof generation.
     *
     * @param params - Key-value pairs of parameters to set
     * @throws {SetParamsError} When parameters are invalid
     *
     * @example
     * ```typescript
     * proofRequest.setParams({
     *   minFollowers: '1000',
     *   platform: 'twitter'
     * });
     * ```
     */
    setParams(params: {
        [key: string]: string;
    }): void;
    /**
     * Returns the currently configured app callback URL
     *
     * If no custom callback URL was set via setAppCallbackUrl(), this returns the default
     * Reclaim service callback URL with the current session ID.
     *
     * @returns The callback URL where proofs will be submitted
     * @throws {GetAppCallbackUrlError} When unable to retrieve the callback URL
     *
     * @example
     * ```typescript
     * const callbackUrl = proofRequest.getAppCallbackUrl();
     * console.log('Proofs will be sent to:', callbackUrl);
     * ```
     */
    getAppCallbackUrl(): string;
    /**
     * Returns the currently configured cancel callback URL
     *
     * If no custom cancel callback URL was set via setCancelCallbackUrl(), this returns the default
     * Reclaim service cancel callback URL with the current session ID.
     *
     * @returns The cancel callback URL where proofs will be submitted
     * @throws {GetAppCallbackUrlError} When unable to retrieve the cancel callback URL
     *
     * @example
     * ```typescript
     * const callbackUrl = proofRequest.getCancelCallbackUrl();
     * console.log('Errors will be sent to:', callbackUrl);
     * ```
     */
    getCancelCallbackUrl(): string;
    /**
     * Returns the status URL for monitoring the current session
     *
     * This URL can be used to check the status of the proof request session.
     *
     * @returns The status monitoring URL for the current session
     * @throws {GetStatusUrlError} When unable to retrieve the status URL
     *
     * @example
     * ```typescript
     * const statusUrl = proofRequest.getStatusUrl();
     * // Use this URL to poll for session status updates
     * ```
     */
    getStatusUrl(): string;
    /**
     * Returns the session ID associated with this proof request
     *
     * The session ID is automatically generated during initialization and uniquely
     * identifies this proof request session.
     *
     * @returns The session ID string
     * @throws {SessionNotStartedError} When session ID is not set
     *
     * @example
     * ```typescript
     * const sessionId = proofRequest.getSessionId();
     * console.log('Session ID:', sessionId);
     * ```
     */
    getSessionId(): string;
    private static validateInitOptions;
    private setSignature;
    private generateSignature;
    private clearInterval;
    private setAttestationContext;
    private applyAttestationContext;
    private encodeTemplateData;
    private buildSharePageUrl;
    private openPortalTab;
    private closePortalTab;
    private embedPortalIframe;
    /**
     * Closes the embedded portal iframe and stops the session polling.
     *
     * Call this to programmatically cancel the embedded verification flow
     * that was started with `triggerReclaimFlow({ target: element })`.
     * Also called automatically when verification succeeds or fails.
     *
     * @example
     * ```typescript
     * proofRequest.closeEmbeddedFlow();
     * ```
     */
    closeEmbeddedFlow(): void;
    /**
     * Cancels an in-progress verification session.
     *
     * Use this when the user abandons the flow (e.g. navigates back) before a
     * proof is produced. It tears down all local session machinery — the status
     * polling interval, the 10-minute interval-ending timeout, and any portal UI
     * (modal / tab / embedded iframe) — and marks the session CANCELLED on the
     * backend.
     *
     * Marking the session CANCELLED is what prevents a stale, abandoned session
     * from later being reported as a failure: the portal's inactivity monitor
     * treats a cancelled session as a clean terminal state and will not emit a
     * connection-failure error to the cancel/error callback. Because that callback
     * URL is typically shared across sessions, suppressing it here stops an
     * abandoned session from contaminating the next one.
     *
     * `onSuccess` / `onError` are intentionally NOT invoked — cancellation is a
     * deliberate, silent teardown, not a verification outcome. Safe to call more
     * than once; a no-op when no session is active.
     *
     * @example
     * ```typescript
     * // e.g. in a React effect cleanup when the user navigates away
     * await proofRequest.cancelSession();
     * ```
     */
    cancelSession(): Promise<void>;
    /**
     * Exports the Reclaim proof verification request as a JSON string
     *
     * This serialized format can be sent to the frontend to recreate this request using
     * ReclaimProofRequest.fromJsonString() or any InApp SDK's startVerificationFromJson()
     * method to initiate the verification journey.
     *
     * @returns JSON string representation of the proof request. Note: The JSON includes both `timestamp` and `timeStamp` (deprecated) for backward compatibility.
     *
     * @example
     * ```typescript
     * const jsonString = proofRequest.toJsonString();
     * // Send to frontend or store for later use
     * // Can be reconstructed with: ReclaimProofRequest.fromJsonString(jsonString)
     * ```
     */
    toJsonString(): string;
    /**
     * Validates signature and returns template data
     * @returns
     */
    private getTemplateData;
    /**
     * Generates and returns the request URL for proof verification.
     *
     * Defaults to portal mode. Pass `{ verificationMode: 'app' }` for native app flow URLs.
     *
     * - Portal mode (default): returns portal URL on all platforms
     * - App mode: returns share page URL on all platforms
     * - App mode + `useAppClip: true` on iOS: returns App Clip URL instead
     *
     * Falls back to `launchOptions` set at init time if not passed at call time.
     *
     * @param launchOptions - Optional launch configuration to override default behavior
     * @returns Promise<string> - The generated request URL
     * @throws {SignatureNotFoundError} When signature is not set
     *
     * @example
     * ```typescript
     * // Portal URL (default)
     * const url = await proofRequest.getRequestUrl();
     *
     * // Verifier app flow URL
     * const url = await proofRequest.getRequestUrl({ verificationMode: 'app' });
     * ```
     */
    getRequestUrl(launchOptions?: ReclaimFlowLaunchOptions): Promise<string>;
    /**
     * Triggers the appropriate Reclaim verification flow based on device type and configuration.
     *
     * Defaults to portal mode (remote browser verification). Pass `{ verificationMode: 'app' }`
     * for verifier app flow via the share page.
     *
     * - **Embedded iframe**: Pass `{ target: element }` to embed the portal inside a DOM element instead of a new tab
     * - Desktop: browser extension takes priority in both modes
     * - Desktop portal mode (no extension): opens portal in new tab
     * - Desktop app mode (no extension): shows QR code modal with share page URL
     * - Mobile portal mode: opens portal in new tab
     * - Mobile app mode: opens share page (or App Clip on iOS if `useAppClip` is `true`)
     *
     * @param launchOptions - Optional launch configuration to override default behavior
     * @returns Promise<FlowHandle> - Handle to control the flow (close, access iframe)
     * @throws {SignatureNotFoundError} When signature is not set
     *
     * @example
     * ```typescript
     * // Portal flow (default) — opens in new tab
     * const handle = await proofRequest.triggerReclaimFlow();
     * handle.tab;   // Window reference to the opened tab
     * handle.close(); // close tab and stop polling
     *
     * // Embed portal in an iframe inside a DOM element
     * const handle = await proofRequest.triggerReclaimFlow({ target: document.getElementById('reclaim-container') });
     * handle.iframe; // HTMLIFrameElement reference
     * handle.close(); // remove iframe and stop polling
     *
     * // Verifier app flow
     * await proofRequest.triggerReclaimFlow({ verificationMode: 'app' });
     *
     * // App Clip on iOS (requires useAppClip: true at init)
     * const request = await ReclaimProofRequest.init(APP_ID, SECRET, PROVIDER, { useAppClip: true });
     * await request.triggerReclaimFlow({ verificationMode: 'app' });
     *
     * // Can also set verificationMode at init time via launchOptions
     * const request = await ReclaimProofRequest.init(APP_ID, SECRET, PROVIDER, {
     *   launchOptions: { verificationMode: 'app' }
     * });
     * await request.triggerReclaimFlow(); // uses 'app' mode from init
     * ```
     */
    triggerReclaimFlow(launchOptions?: ReclaimFlowLaunchOptions): Promise<FlowHandle>;
    /**
     * Checks if the Reclaim browser extension is installed and available
     *
     * This method attempts to communicate with the browser extension to verify its availability.
     * It uses a timeout mechanism to quickly determine if the extension responds.
     *
     * @param timeout - Timeout in milliseconds to wait for extension response. Defaults to 200ms
     * @returns Promise<boolean> - True if extension is available, false otherwise
     *
     * @example
     * ```typescript
     * const hasExtension = await proofRequest.isBrowserExtensionAvailable();
     * if (hasExtension) {
     *   console.log('Browser extension is installed');
     * }
     * ```
     */
    isBrowserExtensionAvailable(timeout?: number): Promise<boolean>;
    private triggerBrowserExtensionFlow;
    private showQRCodeModal;
    private redirectToInstantApp;
    private buildAppClipUrl;
    private redirectToAppClip;
    private redirectToiOSApp;
    /**
     * Returns the provider id and exact version of the provider that was used in the verification session of this request.
     *
     * This can be provided as a config parameter to the `verifyProof` function to verify the proof.
     *
     * See also:
     * * `verifyProof()` - Verifies a proof against the expected provider configuration.
     * * `getProviderHashRequirements()` - An alternative of this function to get the expected hashes for a provider version by providing providerId and exactProviderVersionString. The result can be provided in verifyProof function's `config` parameter for proof validation.
     * * `getProviderHashRequirementsFromSpec()` - An alternative of this function to get the expected hashes from a provider spec. The result can be provided in verifyProof function's `config` parameter for proof validation.
     */
    getProviderVersion(): ProviderVersionInfo;
    /**
     * Fetches the provider config that was used for this session and returns the hash requirements
     *
     * See also:
     * * `verifyProof()` - Verifies a proof against the expected provider configuration.
     * * `fetchProviderHashRequirementsBy()` - An alternative of this function to get the expected hashes for a provider version by providing providerId and exactProviderVersionString. The result can be provided in verifyProof function's `config` parameter for proof validation.
     * * `getProviderHashRequirementsFromSpec()` - An alternative of this function to get the expected hashes from a provider spec. The result can be provided in verifyProof function's `config` parameter for proof validation.
     *
     * @returns A promise that resolves to a `ProviderHashRequirementsConfig` or `ProviderHashRequirementsConfig[]`
     */
    getProviderHashRequirements(proofs: Proof[], allowedTags: string[] | null | undefined): Promise<ProviderHashRequirementsConfig[]>;
    /**
     * Starts the proof request session and monitors for proof submission
     *
     * This method begins polling the session status to detect when
     * a proof has been generated and submitted. It handles both default Reclaim callbacks
     * and custom callback URLs.
     *
     * For default callbacks: Verifies proofs automatically and passes them to onSuccess
     * For custom callbacks: Monitors submission status and notifies via onSuccess when complete.
     * In the custom-callback flow (where the SDK submits a proof to a provided callback URL),
     * onSuccess may be invoked with an empty array (onSuccess([])) when no proof is available
     * (this happens when a callback is set using setAppCallbackUrl where proof is sent to callback instead of reclaim backend).
     *
     * Please refer to the OnSuccess type signature ((proof?: Proof | Proof[]) => void)
     * and the startSession function source for more details.
     *
     * > [!TIP]
     * > **Best Practice:** When using `setAppCallbackUrl` and/or `setCancelCallbackUrl`, your backend receives the proof or cancellation details directly. We recommend your backend notifies the frontend (e.g. via WebSockets, SSE, or polling) to stop the verification process and handle the appropriate success/failure action. When a callback is set, `onSuccess` callback provided to `startSession` will have an empty array as its argument.
     *
     * @param onSuccess - Callback function invoked when proof is successfully submitted
     * @param onError - Callback function invoked when an error occurs during the session
     * @param verificationConfig - Optional configuration to customize proof verification
     * @returns Promise<void>
     * @throws {SessionNotStartedError} When session ID is not defined
     * @throws {ProofNotVerifiedError} When proof verification fails (default callback only)
     * @throws {ProofSubmissionFailedError} When proof submission fails (custom callback only)
     * @throws {ProviderFailedError} When proof generation fails with timeout
     *
     * @example
     * ```typescript
     * await proofRequest.startSession({
     *   onSuccess: (proof) => {
     *     console.log('Proof received:', proof);
     *   },
     *   onError: (error) => {
     *     console.error('Error:', error);
     *   }
     * });
     * ```
     */
    startSession({ onSuccess, onError, verificationConfig }: StartSessionParams): Promise<void>;
    /**
     * Closes the QR code modal if it is currently open
     *
     * This method can be called to programmatically close the modal, for example,
     * when implementing custom UI behavior or cleanup logic.
     *
     * @example
     * ```typescript
     * // Close modal after some condition
     * proofRequest.closeModal();
     * ```
     */
    closeModal(): void;
    /**
     * Returns whether proofs will be submitted as JSON format
     *
     * @returns boolean - True if proofs are sent as application/json, false for application/x-www-form-urlencoded
     *
     * @example
     * ```typescript
     * const isJson = proofRequest.getJsonProofResponse();
     * console.log('JSON format:', isJson);
     * ```
     */
    getJsonProofResponse(): boolean;
}

/**
 * Retrieves a shortened URL for the given URL
 * @param url - The URL to be shortened
 * @returns A promise that resolves to the shortened URL, or the original URL if shortening fails
 */
declare function getShortenedUrl(url: string): Promise<string>;
/**
 * Creates a link with embedded template data
 * @param templateData - The data to be embedded in the link
 * @param sharePagePath - The path to the share page (optional)
 * @returns A promise that resolves to the created link (shortened if possible)
 */
declare function createLinkWithTemplateData(templateData: TemplateData, sharePagePath?: string): Promise<string>;
/**
 * Retrieves the list of witnesses for a given claim
 */
declare function getAttestors(): Promise<WitnessData[]>;
/**
 * Recovers the signers' addresses from a signed claim
 * @param claim - The signed claim object
 * @param signatures - The signatures associated with the claim
 * @returns An array of recovered signer addresses
 */
declare function recoverSignersOfSignedClaim({ claim, signatures }: SignedClaim): string[];
/**
 * Asserts that the proof is verified by checking the signatures and witness information
 * @param proof - The proof to verify
 * @param attestors - The attestors to check against
 * @throws {ProofNotVerifiedError} When the proof is not verified
 */
declare function assertVerifiedProof(proof: Proof, attestors: WitnessData[]): Promise<void>;

/**
 * Initializes a session with the provided parameters
 * @param providerId - The ID of the provider
 * @param appId - The ID of the application
 * @param timestamp - The timestamp of the request
 * @param signature - The signature for authentication
 * @param versionNumber - Optional provider version to pin the session to
 * @param orgId - Optional partner organization id for attribution at session creation (omitted from the request when not set)
 * @returns A promise that resolves to an InitSessionResponse
 * @throws InitSessionError if the session initialization fails
 */
declare function initSession(providerId: string, appId: string, timestamp: string, signature: string, versionNumber?: string, orgId?: string): Promise<InitSessionResponse>;
/**
 * Updates the status of an existing session
 * @param sessionId - The ID of the session to update
 * @param status - The new status of the session
 * @param orgId - Optional partner organization id for attribution (omitted from the request when not set)
 * @returns A promise that resolves to the update response
 * @throws UpdateSessionError if the session update fails
 */
declare function updateSession(sessionId: string, status: SessionStatus, orgId?: string): Promise<any>;
/**
 * Fetches the status URL for a given session ID
 * @param sessionId - The ID of the session to fetch the status URL for
 * @returns A promise that resolves to a StatusUrlResponse
 * @throws StatusUrlError if the status URL fetch fails
 */
declare function fetchStatusUrl(sessionId: string): Promise<StatusUrlResponse>;
declare function fetchProviderConfigs(providerId: string, exactProviderVersionString: string | null | undefined, allowedTags: string[] | null | undefined): Promise<ProviderConfigResponse>;

/**
 * Computes the signature required by `initSession` over `{providerId, timestamp}`.
 *
 * Use this on a trusted server (where `appSecret` lives) to produce a signature
 * that can then be passed to `ReclaimProofRequest.initWithSignature(...)` from a
 * client that never sees the secret.
 *
 * @param appSecret - The application secret (private key). Must remain server-side.
 * @param providerId - The provider id the session will be initialized against.
 * @param timestamp - The timestamp (ms epoch as string) that will be sent with init.
 *                    The same value MUST be passed to `initWithSignature`.
 */
declare function generateInitSignature(appSecret: string, providerId: string, timestamp: string): Promise<string>;

declare function generateAttestationNonce(appSecret: string, applicationId: string, sessionId: string, timestamp: string): string;

declare function createSignDataForClaim(data: CompleteClaimData): string;
declare function getIdentifierFromClaimInfo(info: ClaimInfo): ClaimID;
/**
 * Computes the cryptographic claim hash(es) for the HTTP provider payload parameters.
 *
 * If the parameters comprise solely of rigid/required rules (or represents an extracted
 * attested payload that enforces all its defined elements), this computes and returns a single deterministic string.
 *
 * **Combinatorial Hashes Intention:**
 * If the payload configuration defines optional elements (`isOptional: true` on ResponseMatchSpec),
 * a single rule configuration inherently encompasses multiple logical subset definitions.
 * Since cryptographic hashes strictly enforce exact data byte-by-byte,
 * this function recursively computes a hash for every mathematically valid permutation of the optional subsets
 * (inclusive and exclusive) so the validator can verify the proof against any of the legitimate subset match signatures.
 *
 * @param params - The HTTP provider claim configuration or extracted attested parameters.
 * @returns A single keccak256 hash string, or an array of hex-string hashes if parameter optionality generates combinations.
 */
declare function hashProofClaimParams(params: HttpProviderClaimParams): string | string[];
/**
 * Computes canonicalized string(s) for the provided HTTP parameter payload.
 *
 * **Architectural Concept**:
 * In Reclaim, proof security revolves around generating a deterministic Hash based on the JSON stringified keys
 * of matched specifications (e.g. `responseMatches` and `responseRedactions`).
 * When processing a Provider Configuration containing `isOptional` rules, the protocol doesn't require users to generate a
 * proof that matched *all* of the rules. A client could inherently omit any optional rules from claim before
 * starting claim creation to make a valid proof if the server payload may not contain them.
 *
 * To ensure the eventual Proof's Hash safely validates against the parent template's Requirement Hash, logic here
 * loops $2^N$ times using bitmask computation (where N = number of rule pairs) and yields canonically sorted
 * permutations for every sub-set of optional combinations.
 * Any combination forcefully omitting a mathematically required (`isOptional: false`) rule is stripped out.
 *
 * Note: When a user successfully generates a proof, their attested parameter payload does not contain `isOptional` tags
 * because the client sending request to attestor omits rules where data may not be present in response,
 * producing exactly 1 deterministic configuration subset (what the user actually proved!).
 *
 * @param params - The structured parameters.
 * @returns Serialized string or array of strings.
 */
declare function getProviderParamsAsCanonicalizedString(params: HttpProviderClaimParams): string[];

type TeeVerificationResult = {
    isVerified: boolean;
    error?: string;
};
/**
 * Validates the hardware TEE attestation included in the proof.
 * Derives the application ID from `appSecret` and verifies the attestation
 * was generated for your application.
 * Returns a result object with `isVerified` and an optional `error` message.
 *
 * This check is stateless and does not protect against replay of a previously
 * valid proof. Callers must enforce session matching and dedup `sessionId` on
 * their server. See the README's "Replay Protection" section.
 *
 * @param proof - The proof containing TEE attestation data
 * @param appSecret - Your application secret (Ethereum private key). Used to
 *   derive the application ID and recompute the attestation nonce.
 */
declare function verifyTeeAttestation(proof: Proof, appSecret: string): Promise<TeeVerificationResult>;
/**
 * Verifies TEE attestation for all proofs.
 * Throws `TeeVerificationError` if any proof is missing TEE data or fails verification.
 *
 * @param proofs - The proofs to verify
 * @param config - TEE attestation configuration containing the app secret
 * @throws {TeeVerificationError} When TEE data is missing or verification fails
 */
declare function runTeeVerification(proofs: Proof[], config: TeeAttestationConfig): Promise<void>;

declare const TimeoutError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const ProofNotVerifiedError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const ProofNotValidatedError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const InvalidRequestSpecError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const UnknownProofsNotValidatedError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const SessionNotStartedError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const ProviderNotFoundError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const SignatureGeneratingError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const SignatureNotFoundError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const InvalidSignatureError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const UpdateSessionError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const InitSessionError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const ProviderFailedError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const InvalidParamError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const ApplicationError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const InitError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const BackendServerError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const GetStatusUrlError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const NoProviderParamsError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const SetParamsError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const SetContextError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const SetSignatureError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const GetAppCallbackUrlError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const StatusUrlError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const ProviderConfigFetchError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const InavlidParametersError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const ProofSubmissionFailedError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const ErrorDuringVerificationError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const CallbackUrlRequiredError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const TeeVerificationError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};
declare const AttestorTeeVerificationError: {
    new (message?: string, innerError?: unknown | undefined): {
        innerError?: unknown | undefined;
        name: string;
        message: string;
        stack?: string;
        cause?: unknown;
    };
    isError(error: unknown): error is Error;
    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
    prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
    stackTraceLimit: number;
};

/**
 * Highly accurate device type detection - returns only 'desktop' or 'mobile'
 * Uses multiple detection methods and scoring system for maximum accuracy
 * @returns {DeviceType.DESKTOP | DeviceType.MOBILE} The detected device type
 */
declare function getDeviceType(): DeviceType.DESKTOP | DeviceType.MOBILE;
/**
 * Highly accurate mobile device type detection - returns only 'android' or 'ios'
 * Should only be called when getDeviceType() returns 'mobile'
 * @returns {DeviceType.ANDROID | DeviceType.IOS} The detected mobile device type
 */
declare function getMobileDeviceType(): DeviceType.ANDROID | DeviceType.IOS;
/**
 * Convenience method to check if current device is mobile
 * @returns {boolean} True if device is mobile
 */
declare function isMobileDevice(): boolean;
/**
 * Convenience method to check if current device is desktop
 * @returns {boolean} True if device is desktop
 */
declare function isDesktopDevice(): boolean;
/**
 * Clear cached device detection results (useful for testing)
 */
declare function clearDeviceCache(): void;

export { ApplicationError, type AttestorClaimAttestation, type AttestorTeeAttestationConfig, AttestorTeeVerificationError, type AttestorTeeVerificationResult, BackendServerError, type Beacon, type BeaconState, type BodySniff, CallbackUrlRequiredError, ClaimCreationType, type ClaimID, type ClaimInfo, type CompleteClaimData, type Context, type CreateVerificationRequest, DeviceType, type EmbeddedFlowHandle, ErrorDuringVerificationError, type ExtensionMessage, type FlowHandle, GetAppCallbackUrlError, GetStatusUrlError, HASH_MATCH_MULTIPLE_DEFAULT, HASH_REQUIRED_DEFAULT, type HashRequirement, type HashableHttpProviderClaimParams, type HttpFormEntry, type HttpProviderClaimParams, type HttpRedirectionMethod, type HttpRedirectionOptions, InavlidParametersError, InitError, InitSessionError, type InitSessionResponse, type InjectedRequestSpec, type InterceptorRequestSpec, InvalidParamError, InvalidRequestSpecError, InvalidSignatureError, type ModalOptions, NoProviderParamsError, type OnError, type OnSuccess, type PiiVerificationConfig, type Proof, ProofNotValidatedError, ProofNotVerifiedError, type ProofPropertiesJSON, type ProofRequestOptions, ProofSubmissionFailedError, type ProviderClaimData, ProviderConfigFetchError, type ProviderConfigResponse, ProviderFailedError, type ProviderHashRequirementSpec, type ProviderHashRequirementsConfig, type ProviderHashRequirementsResponse, ProviderNotFoundError, type ProviderVersionConfig, type ProviderVersionInfo, RECLAIM_EXTENSION_ACTIONS, type ReclaimFlowInitOptions, type ReclaimFlowLaunchOptions, ReclaimProofRequest, type ReclaimProviderConfig, type ReclaimProviderConfigWithRequestSpec, type RequestSpec, type ResponseMatchSpec, type ResponseRedactionSpec, SUPPORTED_TEE_ATTESTATION_VERSIONS, type SerializableModalOptions, SessionNotStartedError, SessionStatus, SetContextError, SetParamsError, SetSignatureError, SignatureGeneratingError, SignatureNotFoundError, type SignedClaim, type StartSessionParams, StatusUrlError, type StatusUrlResponse, type TeeAttestation, type TeeAttestationConfig, type TeeAttestationVersion, TeeVerificationError, type TeeVerificationResult, type TemplateData, TimeoutError, type TrustedData, UnknownProofsNotValidatedError, UpdateSessionError, type UpdateSessionResponse, type ValidationConfig, type ValidationConfigWithDisabledValidation, type ValidationConfigWithHash, type ValidationConfigWithProviderInformation, type VerificationConfig, type VerifyAttestationConfig, type VerifyProofResult, type VerifyProofResultFailure, type VerifyProofResultSuccess, type WitnessData, assertValidProofsByHash, assertValidateProof, assertVerifiedProof, clearDeviceCache, createLinkWithTemplateData, createSignDataForClaim, fetchProviderConfigs, fetchProviderHashRequirementsBy, fetchStatusUrl, generateAttestationNonce, generateInitSignature, generateSpecsFromRequestSpecTemplate, getAttestors, getDeviceType, getHashFromProof, getHttpProviderClaimParamsFromProof, getIdentifierFromClaimInfo, getMobileDeviceType, getProviderHashRequirementSpecFromProviderConfig, getProviderHashRequirementsFromSpec, getProviderParamsAsCanonicalizedString, getShortenedUrl, hashProofClaimParams, hashRequestSpec, initSession, isDesktopDevice, isHttpProviderClaimParams, isMobileDevice, recoverSignersOfSignedClaim, runTeeVerification, takePairsWhereValueIsArray, takeTemplateParametersFromProofs, transformForOnchain, updateSession, verifyAttestorTeeAttestation, verifyProof, verifyTeeAttestation };
