import { Identity } from './identity.js'; import type { SessionRecoveryToken } from './identity.js'; import type { Key } from 'hpke'; /** * HTTP transport for EHBP */ export declare class Transport { private serverIdentity; private serverHost; private _lastSessionRecoveryToken?; private requestGeneration; constructor(serverIdentity: Identity, serverHost: string); getSessionRecoveryToken(): SessionRecoveryToken; /** * Create a new transport by fetching server public key. * The optional init is applied to the key fetch (e.g. credentials). */ static create(serverURL: string, init?: RequestInit): Promise; private static isProblemJSONContentType; private static checkKeyConfigMismatch; private static shouldDecryptResponse; /** * Get the server identity */ getServerIdentity(): Identity; /** * Get the server public key */ getServerPublicKey(): Key; /** * Get the server public key as hex string */ getServerPublicKeyHex(): Promise; /** * Make an encrypted HTTP request. */ request(input: RequestInfo | URL, init?: RequestInit): Promise; /** * Convenience method for GET requests */ get(url: string | URL, init?: RequestInit): Promise; /** * Convenience method for POST requests */ post(url: string | URL, body?: BodyInit, init?: RequestInit): Promise; /** * Convenience method for PUT requests */ put(url: string | URL, body?: BodyInit, init?: RequestInit): Promise; /** * Convenience method for DELETE requests */ delete(url: string | URL, init?: RequestInit): Promise; } /** * Create a new transport instance. * The optional init is applied to the server key fetch (e.g. credentials). */ export declare function createTransport(serverURL: string, init?: RequestInit): Promise; //# sourceMappingURL=client.d.ts.map