Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

Latest commit

 

History

History
54 lines (35 loc) · 2.07 KB

File metadata and controls

54 lines (35 loc) · 2.07 KB
title Getting Started

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.

Prerequisites

Before installing Chainhook, ensure you have the following:

  • Rust toolchain (stable) — required to build from source
  • git — to clone the repository
  • A C compiler and pkg-config (on Linux: build-essential, libssl-dev)

Install Chainhook from the Source

Chainhook can be installed from the source by following the steps below:

  1. Clone the chainhook repo by using the following command:

    git clone https://github.com/hirosystems/chainhook.git
  2. Navigate to the root directory of the cloned repo:

    cd chainhook
  3. Build and install the Chainhook CLI:

    cargo install --path components/chainhook-cli
  4. Verify the installation:

    chainhook --version

If you want to start using Chainhook for extracting data from Bitcoin or Stacks, you can design your predicates using the following guides: