Block Explorers & Analytics

ChainhookReorg-Aware Indexing Engine for Stacks and Bitcoin

Free, open-source Stacks and Bitcoin indexing engine for Windows developers. Learn what it does, how to install it with winget, and when to use it.

Free Open source Windows: Yes v1.8.0 Updated 2 Jul 2025
8 min read Last update 2 Jul 2025 www.hiro.so

Chainhook is a free, open-source indexing engine for developers who build applications on the Stacks and Bitcoin blockchains. It reads blockchain transactions and passes along only the events an app cares about, so the data stays small and easier to manage. Its main job is handling forks and reorganizations, which can otherwise leave an application with data that later turns out to be wrong.

The program runs as a tool on your own machine during development and can also run as a service in the cloud. It is licensed under GPL-3.0, and the current release is 1.8.0, with the code last updated in July 2025. On Windows, you can install Chainhook from the command line with winget, which keeps setup short for anyone comfortable with a terminal.

02

What Is Chainhook and How Does It Fit In

Chainhook sits between a blockchain and the application that needs its data. A raw node stores every block and transaction, which is accurate but heavy to search. An indexing engine reads that stream, keeps only the parts an application needs, and stores them in a form that is quick to query.

The project describes itself as a reorg-aware transaction indexer for the Stacks and Bitcoin blockchains. The phrase reorg-aware means the engine is designed to cope with chain reorganizations, which happen when the network switches to a competing history. Many simple indexers assume the chain only moves forward, and that assumption leads to subtle bugs.

Because the tool is open source under GPL-3.0, developers can read its code, modify it, and redistribute changes under the same license terms. That openness is useful for teams that want to understand how their data is produced before building a product on top of it.

03

Why Forks and Reorgs Make Blockchain Data Tricky

A blockchain is a shared ledger, but the network does not always agree on one history at every moment. When two miners or validators produce competing blocks, the network may briefly consider both. Eventually one branch wins and the other is discarded. The discarded branch is what people call a fork, and the switch to the winning branch is a reorganization, or reorg.

For a wallet that shows a balance, a short reorg may be harmless. For an application that triggers actions based on a transaction, it can cause a real problem. If the app acted on a transaction that later disappears from the main history, it may have sent a notification or updated a record for an event that no longer counts.

A reorg-aware indexer tries to handle this by tracking which blocks have been replaced and correcting its output. Developers still need to design their own rules for when an action is safe to take, such as waiting for a number of confirmations. The tool gives them cleaner input, but the timing decision stays with the application.

04

Practical Use Cases for a Lightweight Blockchain Indexer

Chainhook fits projects that need to know when something specific happens on chain. Consider a team building a dashboard that tracks activity around one contract. Instead of storing every block, the team can define the events it cares about and keep only those records, which makes the database smaller and faster to query.

Another example is a notification service. An application might want to alert a user when a transaction meets certain conditions. The trigger-based logic lets the engine start a defined action, so the service does not need to scan the whole chain on a fixed schedule.

Local development is the third common scenario. A developer can run the engine on a laptop against test data, check that the filters work, and then move the same setup to a cloud environment. Testing locally first gives time to catch mistakes before real users depend on the output. Early testing also helps estimate how much storage the production setup will need.

05

Key features

Reorg-Aware Indexing

Chainhook is built to keep returning correct data when a chain reorganizes. Instead of trusting the first version of a block it sees, it tracks changes so an application can rely on its output even after forks. That matters for any app that makes decisions based on on-chain activity.

Targeted Data Filtering

Rather than storing everything, you define which transactions or contract events matter to your project. The result is a much lighter dataset to store and query, which keeps storage and processing needs smaller than a full copy of the chain would require.

Trigger-Based Logic

The engine can start an action when a matching event occurs, which is the IFTTT-style logic the project describes. An application can react to a specific transaction without constantly scanning the chain on a fixed schedule.

Local and Cloud Deployment

Chainhook can run inside a local development environment for testing, then be deployed as a cloud service. You can check your filters on a laptop first and later run the same setup as a service for real users.
06

Supported coins

The documentation mentions Bitcoin (BTC) as a supported coin. Beyond that, the engine is aimed at the Stacks and Bitcoin blockchains, so Stacks-based data and Bitcoin transactions are its main focus.

07

How to install Chainhook on Windows

Quick install
PowerShell · winget
PS> winget install HiroSystems.Chainhook
  1. 1

    Open a Terminal

    Open PowerShell or Command Prompt on Windows. The installation is a single command, so a standard terminal window is all you need.

  2. 2

    Run the winget Command

    Type winget install HiroSystems.Chainhook and press Enter. Winget downloads the program from its package listing and installs it for you. Wait for the command to report that the installation finished.

  3. Confirm the Install and Verify the Source

    Open a new terminal window and start the program to confirm it runs. If you prefer a manual route, download only from the official website at hiro.so or from the GitHub Releases page, and compare any published SHA-256 checksum or signature with your file before running it.

08

System requirements

  • Windows with winget available for the single-command install
  • About 3 GB of free disk space for the testnet, used by the chainstate archive downloaded on first run
  • About 10 GB of free disk space for the mainnet, used by the chainstate archive downloaded on first run
  • Platforms supported by the project include Windows, macOS and Linux
09

How to use Chainhook

Chainhook is a command-line-oriented tool, so the workflow centers on configuration and running it against a network. The steps below assume you have already installed the program.

  1. Install the program and confirm that it starts on your machine.
  2. Decide which network you want to index, testnet or mainnet, and start with the testnet to keep disk use down.
  3. Let the first run finish its chainstate download. Expect this step to take a while and to need several gigabytes of space.
  4. Write a configuration that lists the events or transactions your application needs, so unrelated data is ignored.
  5. Connect your application to the output the engine produces, then test how it behaves when a reorg happens on the testnet.
  6. Move to the mainnet only after your filters and handling logic pass your tests.

Repeat steps four and five whenever your application needs new events, since the filters define what the engine keeps.

10

Pros & cons

Pros
  • Free and open source under the GPL-3.0 license
  • Reorg-aware output helps applications avoid acting on data that later disappears
  • Filtering keeps datasets lighter than storing the whole chain
  • Can run locally during development and as a cloud service
  • Installs on Windows with a single winget command
Cons
  • The first run needs several gigabytes of disk space
  • Focused on Stacks and Bitcoin rather than many chains
  • Aimed at developers comfortable with the command line
  • Filters and downstream logic must be designed by your team
11

Is Chainhook safe?

Chainhook is an indexing tool rather than a wallet, so it does not manage funds or private keys. Still, treat any program downloaded from the internet with care. Download only from the official website at hiro.so or from the GitHub Releases page of the hirosystems/chainhook repository. Where the project publishes a SHA-256 checksum or a signature, compare it with your downloaded file before running the installer. Never enter a seed phrase on a third-party website, whatever it claims about Chainhook. The code was last updated in July 2025, so check the latest version on the official website before you install.

  • Official source only. Download from www.hiro.so. Ignore ads and lookalike domains.
  • Check the SHA-256. Compare the installer hash with the value the developer publishes before running it.
  • Never share your seed phrase. No developer, support agent or website — including CryptApps — will ever ask for it.
12

Alternatives

Chainhook is not a direct match for every alternative. Bitcoin Database Generator exports Bitcoin blockchain data into SQL Server, which suits teams that want everything in a relational database. Chainhook instead filters for the events you choose, handles reorgs, and also covers Stacks. Cshtop is a terminal visualizer for Cosmos blocks, so it is aimed at inspection rather than building applications. BX is a Bitcoin command-line tool for looking at chain data. Dubhe works at a different layer, as a toolchain for Move applications. Pick Chainhook when you need a dependable data feed for an app, and a viewer or exporter when you mainly want to look at the chain.

13

Specifications

Price
Free
Type
Open source
License
GPL-3.0
Latest version
1.8.0
Last update
2 Jul 2025
Windows support
Yes (available via winget)
Official site
www.hiro.so
Source code
github.com/hirosystems/chainhook
Install command
winget install HiroSystems.Chainhook
14

Frequently asked questions

Yes. Chainhook is free and released under the GPL-3.0 open-source license, which lets you use, study, modify and share the code under that license's terms. There is no price to pay for the program itself. Your main costs will be the computer resources it needs, especially disk space for chainstate data during the first run.

It is an indexing tool rather than a wallet, so it has no reason to ask for a seed phrase or private keys. Install it with the winget command, or download from the official website or GitHub Releases page and compare checksums where available. Check the latest version before installing, since the code was last updated in July 2025.

Reorg-aware means the engine is designed to handle chain reorganizations, where the network replaces recent blocks with a competing branch. Without that handling, an application may act on transactions that are later removed from the main history. The engine tracks these changes so its output stays consistent. Your application still decides how long to wait before acting on an event.

The first run downloads a chainstate archive, which is then unpacked and written to disk. Around 3 GB is needed for the testnet, and about 10 GB for the mainnet. Plan for these amounts before starting, and leave extra room for the data your own application produces.

Open PowerShell or Command Prompt and run winget install HiroSystems.Chainhook. Winget downloads and installs the program from its package listing. After it finishes, open a new terminal window and start the program to confirm it runs correctly.

No. The project focuses on the Stacks and Bitcoin blockchains, and its documentation names Bitcoin as a supported network. If your application runs on another chain, look for tools built for that network instead and compare the options in the alternatives section.

Chainhook is used to index blockchain transactions so applications can query relevant data quickly. Developers use it to watch for specific events, reduce the amount of data they store, and trigger actions when conditions match. It can run on a local machine during development or as a cloud service.

15

Verdict

Chainhook is a solid choice for developers who build on Stacks or Bitcoin and need indexed data that stays correct through forks. It is free, open source, and installs on Windows with a single winget command. It is less suitable for people who only want to browse blocks or who work on other chains. Before installing, check the latest version on the official website, since the code was last updated in July 2025. Plan for a sizable first download and set aside storage accordingly.

Download now