Replay a block

Replay any block height or hash against a chainhook to debug, backfill, or re-process historical events.

The evaluate endpoint replays any single block you choose—live or historical—against one of your registered chainhooks so you can validate filters without waiting for live traffic. Provide either a block height or block hash to target the exact block you care about.

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

MethodParameterExample
By heightblock_height{ block_height: 100000 }
By hashindex_block_hash{ index_block_hash: '0xa204...' }

Example

1
import { ChainhooksClient, CHAINHOOKS_BASE_URL } from '@hirosystems/chainhooks-client';
2
3
const client = new ChainhooksClient({
4
baseUrl: CHAINHOOKS_BASE_URL.testnet,
5
apiKey: process.env.HIRO_API_KEY!,
6
});
7
8
await client.evaluateChainhook('chainhook-uuid', {
9
block_height: 100000,
10
});

Returns HTTP 204 No Content. If filters match, webhook payload is sent to your action.url.

Use Cases

Use CaseDescriptionExample
DebugInvestigate missed eventsReplay a block height that should have triggered
BackfillIndex historical dataProcess older blocks created before the hook existed
Re-processFix webhook handler issuesRe-evaluate a block after patching infrastructure

Next steps

How is this guide?