Overview
Chainhook enables you to target events on the Bitcoin and Stacks blockchain important to your use case in order to trigger actions based on those events.
Chainhook is a reorg-aware indexer that serves reliable blockchain data—you don’t have to waste time 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.
To get started, check out our installation guide.
Create event streams
Create a Bitcoin chainhook
Build a chainhook that indexes events on the Bitcoin blockchain.
Create a Stacks chainhook
Build a chainhook that indexes events on the Stacks blockchain.
Test your chainhooks
Test and debug your chainhooks in a local environment.
Setting up Chainhook predicates
Bitcoin predicates
A list of "if this, then that" logic for Bitcoin chainhooks.
Stacks predicates
A list of "if this, then that" logic for Bitcoin chainhooks.
Related tools
- Bitcoin Indexer: Simplify your testing with the Clarinet JS SDK.
- Hiro Platform: A developer platform for building, deploying and scaling Bitcoin apps.
Reach out to us on the #chainhook channel on Discord under the Hiro Developer Tools section. There's also a weekly office hours call every Wednesday at 1pm ET.