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
51 lines • 1.46 kB
TypeScript
/**
* LaserEyes Wallet Service
* Provides inscription content fetching through LaserEyes wallet integration
*/
export interface LaserEyesWallet {
getInscriptionContent(inscriptionId: string): Promise<any>;
isConnected(): boolean;
getAddress(): string | null;
}
export interface LaserEyesInscriptionContent {
content: string | ArrayBuffer;
contentType: string;
inscriptionId: string;
}
export declare class LaserEyesService {
private wallet;
private cache;
private cacheMaxAge;
constructor(wallet?: LaserEyesWallet);
/**
* Set the LaserEyes wallet instance
*/
setWallet(wallet: LaserEyesWallet | null): void;
/**
* Check if LaserEyes wallet is available and connected
*/
isAvailable(): boolean;
/**
* Get wallet address
*/
getAddress(): string | null;
/**
* Fetch inscription content via LaserEyes wallet
* This uses the wallet's RPC call to get content directly from the node
*/
getInscriptionContent(inscriptionId: string): Promise<LaserEyesInscriptionContent | null>;
/**
* Clear cache for specific inscription or all
*/
clearCache(inscriptionId?: string): void;
/**
* Get cache statistics
*/
getCacheStats(): {
size: number;
entries: string[];
};
}
export declare const laserEyesService: LaserEyesService;
export default LaserEyesService;
//# sourceMappingURL=LaserEyesService.d.ts.map