Bitcoin Indexer

High-performance UTXO indexing and blockchain data API

Development MIT License

Overview

The Indexer is a high-performance blockchain indexing service designed for production applications requiring fast, reliable access to Bitcoin blockchain data. Built from the ground up for efficiency, it provides real-time UTXO set tracking, transaction history, and address balance queries through a clean REST API.

Unlike traditional Blockchain Explorers that focus on human-readable interfaces, the Indexer is optimized for programmatic access with sub-second query response times and WebSocket support for real-time updates. Perfect for exchanges, wallets, payment processors, and analytics platforms.

Key Features

  • UTXO Set Indexing: Complete UTXO set tracking with efficient queries for unspent outputs by address, script, or amount.
  • Transaction History API: Fast transaction history retrieval with pagination, filtering, and sorting capabilities.
  • Address Balance Tracking: Real-time address balance calculations with confirmed and unconfirmed balance separation.
  • Mempool Monitoring: Live mempool tracking with fee estimation and transaction propagation status.
  • WebSocket Real-time Updates: Subscribe to address, transaction, or block events for instant notifications.
  • Chain Reorganization Detection: Real-time detection and alerting for blockchain reorganizations with depth monitoring and webhook notifications.

Technical Specifications

Language
Kotlin (JVM)
License
MIT
Status
Development (v0.4.0)
Database
PostgreSQL + Redis
Reorg Detection
Real-time with webhooks

Roadmap

v0.1 - Core Indexing

Block and transaction indexing, basic API

Completed Q3 2024

v0.3 - UTXO Tracking

UTXO set indexing, address balance queries

Completed Q4 2024

v0.4 - Real-time Updates

WebSocket support, mempool monitoring

In Progress Q1 2025

v0.6 - Performance Optimization

Query optimization, caching layer, horizontal scaling

Planned Q2 2025

v1.0 - Production Release

Full API documentation, production hardening, SLA guarantees

Planned Q3 2025

Integration Example

// Get address balance
val response = client.get("/api/v1/address/bc1q.../balance")
val balance = response.body<AddressBalance>()
println("Confirmed: ${balance.confirmed} sats")
println("Unconfirmed: ${balance.unconfirmed} sats")

// Get UTXO set for address
val utxos = client.get("/api/v1/address/bc1q.../utxos")
    .body<List<UTXO>>()

// Subscribe to address updates via WebSocket
val ws = WebSocket("wss://indexer.mnemore.com/ws")
ws.send("""{"subscribe": "address", "address": "bc1q..."}""")
ws.onMessage { event ->
    println("New transaction: ${event.txid}")
}

// Subscribe to chain reorganization alerts
client.post("/api/v1/reorg/subscribe") {
    setBody(ReorgSubscription(
        webhook = "https://myapp.com/reorg-alert",
        minDepth = 1
    ))
}
// Webhook receives: {"depth": 2, "oldTip": "...", "newTip": "..."}