///
import { ProgressInfo } from '../LoadingStatus.js';
declare enum ResponseValidity {
VALID = "VALID",
INVALID = "INVALID",
NOT_VERIFIABLE = "NOT_VERIFIABLE"
}
declare function verifyResponseData(responseData: ArrayBuffer | Promise, expectedHash: string | undefined, wasmURI: string): Promise;
interface ProgressListener {
onProgress?: (info: ProgressInfo) => void;
onError?: ({ error }: {
error: unknown;
}) => void;
onComplete?: (info: ProgressInfo) => void;
}
declare function setWasmMetadata(wasmMetadata_: Record): void;
declare const getTotalInBytes: (wasmURI: string, headers?: Headers) => number;
declare function createResponseWithProgress(wasmUri: string, response: Response, returnVerificationStream: boolean, { onProgress, onError, onComplete }: ProgressListener): [Response, ReadableStream?];
interface FetchWasmParameters {
wasmURI: string;
expectedHash: string;
verifyResponseHash: boolean;
onProgress?: (info: ProgressInfo) => void;
onComplete?: (info: ProgressInfo) => void;
onError?: (error: unknown) => void;
referredOrigin?: string;
}
declare function fetchWasm({ wasmURI, expectedHash, verifyResponseHash, onProgress, onComplete, onError, referredOrigin, }: FetchWasmParameters): Promise;
export { ResponseValidity, createResponseWithProgress, fetchWasm, getTotalInBytes, setWasmMetadata, verifyResponseData };