npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

Iโ€™ve always been into building performant and accessible sites, but lately Iโ€™ve been taking it extremely seriously. So much so that Iโ€™ve been building a tool to help me optimize and monitor the sites that I build to make sure that Iโ€™m making an attempt to offer the best experience to those who visit them. If youโ€™re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, ๐Ÿ‘‹, Iโ€™m Ryan Hefnerย  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If youโ€™re interested in other things Iโ€™m working on, follow me on Twitter or check out the open source projects Iโ€™ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soonโ€“ish.

Open Software & Tools

This site wouldnโ€™t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you ๐Ÿ™

ยฉ 2026 โ€“ย Pkg Stats / Ryan Hefner

bitcoin-inscription-viewer

v2.3.7

Published

๐Ÿ” 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

Readme

๐Ÿ” Bitcoin Inscription Viewer

A React/TypeScript library for displaying Bitcoin Ordinals inscriptions with responsive design and comprehensive content support.

๐Ÿ”ง Compatibility: React 18 & React 19 | TypeScript 5+ | Modern Browsers

๐Ÿš€ Quick Start

npm install bitcoin-inscription-viewer
import { InscriptionGallery } from 'bitcoin-inscription-viewer';

function MyApp() {
  const inscriptionIds = [
    '6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i0',
    'e317a2a5d68bd1004ae15a06175a319272a10389ff125c98820389edef8b0a94i0'
  ];

  return (
    <InscriptionGallery
      inscriptionIds={inscriptionIds}
      columns={3}
      cardSize={200}
      enableModal={true}
    />
  );
}

โœจ Features

  • ๐ŸŽจ Responsive Design - Works perfectly in any container size
  • ๐Ÿ–ผ๏ธ Content Support - Images, videos, audio, 3D models, JSON, text, HTML
  • ๐Ÿ’ฐ Wallet Integration - Built-in LaserEyes wallet support
  • โšก Performance - Lazy loading, caching, and optimization features
  • ๐Ÿ”ง Flexible - Customizable layouts, themes, and behaviors
  • ๐Ÿ“ฑ Mobile-First - Optimized for all screen sizes
  • ๐Ÿ›ก๏ธ Type Safe - Full TypeScript support

๐Ÿ“– Documentation

Visit our comprehensive documentation:

โš ๏ธ Important: Implementation Status (Updated Dec 2024)

For Production Use: Please refer to our Working Features Only page for accurate implementation details.

Some of our examples show "aspirational" features that aren't fully implemented yet. We've now:

  • โœ… Fixed all runtime errors - No more toUpperCase() crashes or unsafe operations
  • โœ… Added comprehensive error handling - ErrorBoundary components throughout
  • โœ… Created working-only examples - Working Features Only for production reference
  • โœ… Added implementation status - Full status breakdown explains what works vs. what's planned
  • โœ… Enhanced safety - All string operations, array access, and user inputs properly validated

Quick Reference:

๐Ÿ”ง Core Components

InscriptionGallery

Display multiple inscriptions in a responsive grid:

<InscriptionGallery
  inscriptionIds={['inscription1', 'inscription2']}
  columns={3}
  cardSize={200}
  enableModal={true}
  showIndex={true}
/>

LaserEyesInscriptionGallery

Auto-fetch inscriptions from connected LaserEyes wallet:

import { LaserEyesProvider } from '@omnisat/lasereyes';

<LaserEyesProvider>
  <LaserEyesInscriptionGallery
    columns={3}
    cardSize={250}
    enableModal={true}
  />
</LaserEyesProvider>

InscriptionRenderer

Display individual inscriptions with full controls:

<InscriptionRenderer
  inscriptionId="6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i0"
  size={400}
  showHeader={true}
  showControls={true}
/>

๐ŸŽฏ Use Cases

  • Wallet Applications - Display user inscription collections
  • NFT Marketplaces - Showcase inscriptions for sale
  • Portfolio Trackers - Monitor inscription values
  • Explorer Tools - Browse and analyze inscriptions
  • Collection Galleries - Curate inscription displays

โšก Advanced Features

  • Enhanced Caching - LRU cache with TTL support
  • Batch Fetching - Efficient concurrent loading
  • Virtual Scrolling - Handle thousands of inscriptions
  • Performance Monitoring - Real-time metrics
  • Service Worker - Offline support and intelligent caching
  • Custom Fetchers - Pluggable data sources

๐Ÿ› ๏ธ Installation & Setup

NPM

npm install bitcoin-inscription-viewer

Yarn

yarn add bitcoin-inscription-viewer

Import Styles

import 'bitcoin-inscription-viewer/dist/style.css';

๐ŸŒ API Support

Works with any Bitcoin Ordinals API:

  • Recursive endpoints (recommended) - No Bitcoin node required
  • Standard endpoints - Fallback support
  • Custom servers - Configure your own endpoints

๐Ÿš€ Service Worker Caching

The library includes an optional service worker for intelligent caching and offline support. The service worker provides:

  • Smart Caching - Automatic caching of inscription content and metadata
  • Offline Support - View previously loaded inscriptions without internet
  • Performance - Dramatically faster load times for cached content
  • Bandwidth Savings - Reduce API calls and data usage

In-Memory Caching

The library includes built-in in-memory caching for improved performance:

import { useInscriptionCache } from 'bitcoin-inscription-viewer';

function App() {
  const { 
    cachedData,
    cacheSize,
    clearCache,
    getCachedData,
    setCachedData
  } = useInscriptionCache();

  return (
    <div>
      <div>Cache Size: {Object.keys(cachedData).length} entries</div>
      <button onClick={clearCache}>Clear Cache</button>
      {/* Your inscription components */}
    </div>
  );
}

Caching Features

  • Automatic Caching - Content is automatically cached after first load
  • LRU Eviction - Least recently used items are removed when cache is full
  • Memory Efficient - Configurable cache size limits
  • Manual Control - Programmatic cache management
  • Performance Monitoring - Cache hit/miss statistics

The caching system improves load times for frequently viewed inscriptions and reduces API requests.

๐Ÿค Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

๐Ÿ“„ License

MIT License - see LICENSE file for details.

๐Ÿ”— Links

  • GitHub: https://github.com/switch-900/InscriptionViewer
  • NPM: https://www.npmjs.com/package/bitcoin-inscription-viewer
  • Documentation: https://switch-900.github.io/InscriptionViewer

Built with โค๏ธ for the Bitcoin ecosystem