SkillAgentSearch skills...

Oshindexer

An indexer for BRC20 data using the Blockstream API or a custom Esplora endpoint.

Install / Use

/learn @m3rl1nog/Oshindexer
About this skill

Quality Score

0/100

Supported Platforms

Universal

README


OSHIndexer: BRC-20 Javascript Node Package Indexer

Author: m3rl1n

Introduction

Introducing OSHIndexer, a lightweight and efficient BRC-20 Javascript Node Package. This indexer is designed to extract BRC20 data leveraging the Blockstream API or a custom Esplora endpoint, all in under 200 lines of code.

Prerequisites

  • Node.js
  • npm

Installation

  1. Clone the Repository:

    git clone https://github.com/m3rl1n/oshindexer.git
    
  2. Navigate to the Directory and Install Dependencies:

    cd oshindexer
    npm install
    

Usage

  1. Default Usage with Blockstream API:

    node oshindexer.js
    
  2. Set a Blockstream API Key: In the script, use:

    oshindexer.setApiKey('<YOUR_API_KEY>');
    
  3. Specify a Custom Esplora Endpoint: In the script, use:

    oshindexer.setEsploraEndpoint('<YOUR_ESPLORA_ENDPOINT>');
    
  4. Run the SDK from a Specific Block:

    node oshindexer.js <BLOCK_NUMBER>
    

Enhanced Features

  • Data Extraction: Efficiently fetches BRC20 data from either the Blockstream API or any custom Esplora endpoint you provide.

  • Configuration Flexibility: Easily set a Blockstream API key or switch to a custom Esplora endpoint as per your needs.

  • Data Storage: After processing each block, the BRC20 data is conveniently saved to an indexer.json file. This file now also includes the block number (blockHeight) and the transaction hash (txHash) for each BRC20 entry.

  • Error Handling: The indexer is designed to gracefully handle errors and blocks that are not found, with built-in retry mechanisms.

Conclusion

OSHIndexer embodies the spirit of decentralization and transparency. It empowers users to seamlessly index and analyze BRC20 data. In the world of blockchain, code truly is law.

View on GitHub
GitHub Stars8
CategoryDevelopment
Updated7mo ago
Forks1

Languages

JavaScript

Security Score

62/100

Audited on Aug 18, 2025

No findings