Skip to main content

Chainhook Overview

Chainhook enables you to build custom event streams for Bitcoin layers and trigger actions based on those events.

Chainhook is a reorg-aware indexer that serves reliable blockchain data—saving you time by avoiding reindexing your database every time there’s a fork. Chainhook also lets you index only the data you need, which means you can build lighter databases, get faster query results, and deliver a better experience to your users.

Chainhook can be used as a tool in your local development environment and as a hosted service in the cloud via the Hiro Platform.

Install Chainhook

Clone the Chainhook Repo:

git clone

Navigate to the root directory and run cargo chainhook-install to install:

cd chainhook && cargo chainhook-install

Create Event Streams

Scan Blocks for Past Events

Ordhook: Create event streams specifically for Bitcoin Ordinals.

Hiro Platform: Streamline chainhook creation in a cloud-hosted UI.

Need help building with Chainhook? Reach out to us on the #chainhook channel on Discord under the Hiro Developer Tools section. There's also a weekly office hours on Discord every Thursday at 11am ET.