| title | Getting Started |
|---|
Chainhook is a transaction indexing engine for Stacks and Bitcoin. It can extract data from blockchains based on a predicate definition. Chainhook can be used as a development tool and a service.
Chainhook can extract data from the Bitcoin and the Stacks blockchains using predicates (sometimes called chainhooks). A predicate specifies a rule applied as a filtering function on every block transaction.
- Chainhook as a development tool has a few convenient features designed to make developers as productive as possible by allowing them to iterate quickly in their local environments.
- Chainhook as a service can be used to evaluate new Bitcoin and/or Stacks blocks against your predicates. You can also dynamically register new predicates by enabling predicates registration API.
Chainhook can be installed from the source by following the steps below:
-
Clone the chainhook repo by using the following command:
git clone https://github.com/hirosystems/chainhook.git
-
Navigate to the root directory of the cloned repo:
cd chainhook -
Run cargo target to install chainhook:
cargo chainhook-install
If you want to start using Chainhook for extracting data from Bitcoin or Stacks, you can design your predicates using the following guides: