import { Identity, Transport, type SessionRecoveryToken } from "ehbp"; export type { SessionRecoveryToken } from "ehbp"; export { decryptResponseWithToken } from "ehbp"; export interface SecureTransport { fetch: typeof fetch; getSessionRecoveryToken(): Promise; } /** * Fetch and parse server identity from the HPKE keys endpoint. * Returns the server Identity which can be used to create a Transport. */ export declare function getServerIdentity(enclaveURL: string): Promise; export declare function normalizeEncryptedBodyRequestArgs(input: RequestInfo | URL, init?: RequestInit): { url: string; init?: RequestInit; }; export declare function encryptedBodyRequest(input: RequestInfo | URL, hpkePublicKey: string, init?: RequestInit, transportInstance?: Transport): Promise; export declare function createEncryptedBodyFetch(baseURL: string, hpkePublicKey: string, enclaveURL?: string): SecureTransport; /** * WARNING: THIS FUNCTION IS INSECURE. * * Creates an encrypted body fetch that fetches the HPKE key from the server without * attestation verification. This is vulnerable to man-in-the-middle attacks where * a malicious server could provide its own key. * * This function is useful for testing the EHBP protocol against a local development * server that doesn't have attestation set up. For production, use createEncryptedBodyFetch * with a key obtained through attestation verification. * * @param baseURL - Base URL for API requests * @param keyOrigin - Origin URL for fetching the HPKE public key. If not provided, derived from baseURL. */ export declare function createUnverifiedEncryptedBodyFetch(baseURL: string, keyOrigin?: string): SecureTransport; //# sourceMappingURL=encrypted-body-fetch.d.ts.map