facezk-core
Version:
ZKP-AI Proof of Humanity: Live Selfie Check with Biometric Template Extraction and Fuzzy Hashing
59 lines • 2.19 kB
TypeScript
/**
* Browser Compatibility Utilities
* Handles SSR issues and provides graceful degradation
*/
/** Browser environment detection */
export declare const isBrowser: boolean;
export declare const isNode: boolean;
export declare const isReactNative: boolean;
/** Get features with caching */
export declare function getFeatures(): {
/** WebGL support */
webgl: boolean;
/** WebAssembly support */
wasm: boolean;
/** Canvas support */
canvas: boolean;
/** Video element support */
video: boolean;
/** ImageData support */
imageData: boolean;
/** ImageBitmap support */
imageBitmap: boolean;
};
/** Backend availability check */
export declare function getAvailableBackends(): string[];
/** Get recommended backend */
export declare function getRecommendedBackend(): string;
/** Check if input type is supported */
export declare function isInputSupported(input: any): boolean;
/** Create a safe DOM element */
export declare function createSafeElement<T extends HTMLElement>(tagName: string): T | null;
/** Safe canvas creation */
export declare function createSafeCanvas(): HTMLCanvasElement | null;
/** Safe video element creation */
export declare function createSafeVideo(): HTMLVideoElement | null;
/** Safe image element creation */
export declare function createSafeImage(): HTMLImageElement | null;
/** Environment information */
export interface EnvironmentInfo {
isBrowser: boolean;
isNode: boolean;
isReactNative: boolean;
features: ReturnType<typeof getFeatures>;
availableBackends: string[];
recommendedBackend: string;
userAgent?: string | undefined;
platform?: string | undefined;
}
/** Get comprehensive environment information */
export declare function getEnvironmentInfo(): EnvironmentInfo;
/** Log environment information for debugging */
export declare function logEnvironmentInfo(): void;
/** SSR-safe window access */
export declare function getWindow(): Window | null;
/** SSR-safe document access */
export declare function getDocument(): Document | null;
/** SSR-safe navigator access */
export declare function getNavigator(): Navigator | null;
//# sourceMappingURL=browser.d.ts.map