bitcoin-inscription-viewer
Version:
🔍 A robust, production-ready React/TypeScript library for viewing Bitcoin Ordinals inscriptions with advanced optimization features including LRU caching, LaserEyes wallet integration, virtual scrolling, and performance monitoring
50 lines • 1.87 kB
TypeScript
/**
* Enhanced Inscription Viewer with Advanced Optimization Features
* This component provides all the advanced features including virtual scrolling,
* batch fetching, performance monitoring, caching, and service worker integration.
*/
import React from 'react';
import { InscriptionGalleryProps } from '../InscriptionGallery/InscriptionGallery';
import { CacheConfig } from '../../hooks/useInscriptionCache';
import type { InscriptionData } from '../../types';
export interface PreFetchedContent {
content: string | ArrayBuffer;
contentType: string;
size?: number;
cached?: boolean;
}
export interface PerformanceOptions {
batchSize?: number;
lazyLoad?: boolean;
preloadNext?: number;
virtualScrolling?: boolean;
enableOptimizations?: boolean;
enableMemoryOptimization?: boolean;
}
export interface FallbackOptions {
useAPI?: boolean;
apiEndpoint?: string;
retryAttempts?: number;
timeout?: number;
retryDelay?: number;
enableOfflineMode?: boolean;
}
export interface EnhancedInscriptionViewerProps extends Omit<InscriptionGalleryProps, 'inscriptionIds'> {
inscriptions: InscriptionData[] | string[] | {
ids: string[];
} | {
children: InscriptionData[];
};
inscriptionContent?: Record<string, PreFetchedContent>;
contentFetcher?: (inscriptionId: string) => Promise<any>;
cacheConfig?: CacheConfig;
performanceOptions?: PerformanceOptions;
fallbackOptions?: FallbackOptions;
enableErrorBoundary?: boolean;
onLoadComplete?: (stats: any) => void;
onLoadError?: (inscriptionId: string, error: Error) => void;
onCacheUpdate?: (stats: any) => void;
}
export declare const EnhancedInscriptionViewer: React.FC<EnhancedInscriptionViewerProps>;
export default EnhancedInscriptionViewer;
//# sourceMappingURL=EnhancedInscriptionViewer.d.ts.map