- Tools
- Chainhooks
- Evaluate
Evaluate a specific block
Run your chainhooks against specific blocks for testing, debugging, and historical indexing.
The evaluate endpoint replays a single block against one of your registered chainhooks so you can validate filters without waiting for live traffic.
Use it to reproduce missed deliveries, inspect payload schemas after filter changes, or test webhook infrastructure with known blocks before enabling a hook in production.
evaluateChainhook
Evaluation Methods
| Method | Parameter | Example |
|---|---|---|
By height | block_height | { block_height: 100000 } |
By hash | index_block_hash | { index_block_hash: '0xa204...' } |
Example
1import { ChainhooksClient, CHAINHOOKS_BASE_URL } from '@hirosystems/chainhooks-client';23const client = new ChainhooksClient({4baseUrl: CHAINHOOKS_BASE_URL.testnet,5apiKey: process.env.HIRO_API_KEY!,6});78await client.evaluateChainhook('chainhook-uuid', {9block_height: 100000,10});
Returns HTTP 204 No Content. If filters match, webhook payload is sent to your action.url.
Use Cases
| Use Case | Description | Example |
|---|---|---|
Debug | Investigate missed events | Evaluate specific block that should have triggered |
Backfill | Index historical data | Process past blocks after creating chainhook |
Re-process | Fix webhook handler issues | Re-evaluate after fixing bugs |