import type { AccessRoute } from './types'; export declare const XPOD_P2P_HTTP_PROTOCOL: "xpod-p2p-http/1"; export type P2PHttpProtocol = typeof XPOD_P2P_HTTP_PROTOCOL; export type P2PHttpHeaderList = [string, string][]; export interface P2PHttpRequestFrame { protocol: P2PHttpProtocol; requestId?: string; method: string; url: string; headers?: P2PHttpHeaderList; bodyBase64?: string; } export interface P2PHttpResponseFrame { protocol: P2PHttpProtocol; requestId?: string; status: number; statusText?: string; headers?: P2PHttpHeaderList; bodyBase64?: string; } export interface P2PDataPlaneTransport { request(frame: P2PHttpRequestFrame): Promise; } export interface P2PDataPlaneFetchOptions { route: AccessRoute; transport: P2PDataPlaneTransport; } export interface P2PDataPlaneHandlerOptions { targetBaseUrl: string | URL; fetchImpl?: typeof fetch; } export interface P2PDataPlaneHandler { handleRequest(frame: P2PHttpRequestFrame): Promise; } export type P2PDataPlaneFetch = (input: RequestInfo | URL, init?: RequestInit) => Promise; export declare function createP2PDataPlaneFetch(options: P2PDataPlaneFetchOptions): P2PDataPlaneFetch; export declare function createP2PDataPlaneHandler(options: P2PDataPlaneHandlerOptions): P2PDataPlaneHandler;