Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ description: Queues an on-demand evaluation job for a specific block
full: true
---

Use this endpoint to replay a single block (historical) against an existing chainhook so you can debug delivery issues, re-run missed events, or backfill data after a filter change. Provide either a `block_height` or `index_block_hash` to pinpoint the block you evaluate.

The evaluation job returns `204 No Content`; if your filters match, the webhook payload is delivered to the hook's configured action just like a live event.

<APIPage
document="./openapi/chainhook-api.json"
operations={[{ path: '/me/{uuid}/evaluate', method: 'post' }]}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Get a specific chainhook
sidebarTitle: Get a specific chainhook
title: Get a chainhook
sidebarTitle: Get a chainhook
description: Returns a chainhook by its UUID
full: true
---
Expand Down
2 changes: 1 addition & 1 deletion content/docs/en/apis/chainhooks-api/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ curl https://api.testnet.hiro.so/chainhooks/v1/me/ \
-H "x-api-key: YOUR_API_KEY"
```

### Get a Specific Chainhook
### Get a chainhook

```bash
curl https://api.testnet.hiro.so/chainhooks/v1/me/{uuid} \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Get a specific chainhook
title: Get a chainhook
sidebarTitle: Get
description: Get a specific chainhook through the Hiro Platform.
description: Get a chainhook through the Hiro Platform.
full: true
---

<APIPage
document="./openapi/platform-api.json"
operations={[{ path: '/v1/ext/{apiKey}/chainhooks/{chainhookUuid}', method: 'get' }]}
hasHead={false}
/>
/>
14 changes: 7 additions & 7 deletions content/docs/en/tools/chainhooks/(chainhook-sdk)/evaluate.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Evaluate a specific block
description: Run your chainhooks against specific blocks for testing, debugging, and historical indexing.
title: Replay a block
description: Replay any block height or hash against a chainhook to debug, backfill, or re-process historical events.
---

The evaluate endpoint replays a single block against one of your registered chainhooks so you can validate filters without waiting for live traffic.
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.

Expand Down Expand Up @@ -56,13 +56,13 @@ Returns HTTP `204 No Content`. If filters match, webhook payload is sent to your

| 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 |
| **Debug** | Investigate missed events | Replay a block height that should have triggered |
| **Backfill** | Index historical data | Process older blocks created before the hook existed |
| **Re-process** | Fix webhook handler issues | Re-evaluate a block after patching infrastructure |

## Next steps

:::next-steps
- [Register & Enable](/tools/chainhooks/create): Create chainhooks to evaluate
- [Filter Reference](/tools/chainhooks/reference/filters): Configure which events to match
- [Evaluate endpoint](/apis/chainhooks-api/reference/chainhooks/evaluate-chainhook): Replay past blocks through the API
:::
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ The SDK provides the following methods:
|--------|-------------|
| `registerChainhook()` | Create a new chainhook |
| `getChainhooks()` | List all your chainhooks (with pagination) |
| `getChainhook()` | Get a specific chainhook by UUID |
| `getChainhook()` | Get a chainhook by UUID |
| `updateChainhook()` | Update an existing chainhook |
| `deleteChainhook()` | Delete a chainhook |

Expand Down
8 changes: 2 additions & 6 deletions content/docs/en/tools/chainhooks/(chainhook-sdk)/secrets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ When you create a secret, our Chainhooks service attaches an `Authorization: Bea

### Create/rotate consumer secret

```ts -nc server.ts
```ts server.ts -nc
import { ChainhooksClient, CHAINHOOKS_BASE_URL } from '@hirosystems/chainhooks-client';

const client = new ChainhooksClient({
Expand All @@ -40,11 +40,7 @@ const secret = await client.rotateConsumerSecret(chainhookUuid).secret;

### Example Fastify server

```ts -nc -n
import Fastify from 'fastify';

const server = Fastify();

```ts server.ts -n
server.post('/webhook', async (request, reply) => {
if (!secret) {
reply.code(503).send({ error: 'consumer secret unavailable' });
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 21 additions & 21 deletions content/docs/es/apis/chainhooks-api/usage.mdx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions content/docs/es/tools/chainhooks/(chainhook-sdk)/evaluate.mdx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions content/docs/es/tools/chainhooks/(chainhook-sdk)/introduction.mdx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading