Skip to content

Commit fe2dfda

Browse files
authored
update chainhooks copy for evaluate (#1106)
* update redirects * update locale configurations * update copy * update refs to chainhook -> chainhooks * fix link validation for locale * update locale content * update chainhook copy * update locale lockfile * fix(api-playground): fix body schema and skip empty JSON headers * feat(api-playground): persist api key in session storage * docs(chainhooks): add get-secret reference page and sync metadata * fix: lint * copy updates + minor bug fixes * update copy
1 parent 98d326e commit fe2dfda

File tree

16 files changed

+94
-94
lines changed

16 files changed

+94
-94
lines changed

content/docs/en/apis/chainhooks-api/reference/chainhooks/evaluate-chainhook.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ description: Queues an on-demand evaluation job for a specific block
55
full: true
66
---
77

8+
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.
9+
10+
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.
11+
812
<APIPage
913
document="./openapi/chainhook-api.json"
1014
operations={[{ path: '/me/{uuid}/evaluate', method: 'post' }]}

content/docs/en/apis/chainhooks-api/reference/chainhooks/get-chainhook.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Get a specific chainhook
3-
sidebarTitle: Get a specific chainhook
2+
title: Get a chainhook
3+
sidebarTitle: Get a chainhook
44
description: Returns a chainhook by its UUID
55
full: true
66
---

content/docs/en/apis/chainhooks-api/usage.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ curl https://api.testnet.hiro.so/chainhooks/v1/me/ \
134134
-H "x-api-key: YOUR_API_KEY"
135135
```
136136

137-
### Get a Specific Chainhook
137+
### Get a chainhook
138138

139139
```bash
140140
curl https://api.testnet.hiro.so/chainhooks/v1/me/{uuid} \
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: Get a specific chainhook
2+
title: Get a chainhook
33
sidebarTitle: Get
4-
description: Get a specific chainhook through the Hiro Platform.
4+
description: Get a chainhook through the Hiro Platform.
55
full: true
66
---
77

88
<APIPage
99
document="./openapi/platform-api.json"
1010
operations={[{ path: '/v1/ext/{apiKey}/chainhooks/{chainhookUuid}', method: 'get' }]}
1111
hasHead={false}
12-
/>
12+
/>

content/docs/en/tools/chainhooks/(chainhook-sdk)/evaluate.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: Evaluate a specific block
3-
description: Run your chainhooks against specific blocks for testing, debugging, and historical indexing.
2+
title: Replay a block
3+
description: Replay any block height or hash against a chainhook to debug, backfill, or re-process historical events.
44
---
55

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

88
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.
99

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

5757
| Use Case | Description | Example |
5858
|----------|-------------|---------|
59-
| **Debug** | Investigate missed events | Evaluate specific block that should have triggered |
60-
| **Backfill** | Index historical data | Process past blocks after creating chainhook |
61-
| **Re-process** | Fix webhook handler issues | Re-evaluate after fixing bugs |
59+
| **Debug** | Investigate missed events | Replay a block height that should have triggered |
60+
| **Backfill** | Index historical data | Process older blocks created before the hook existed |
61+
| **Re-process** | Fix webhook handler issues | Re-evaluate a block after patching infrastructure |
6262

6363
## Next steps
6464

6565
:::next-steps
66-
- [Register & Enable](/tools/chainhooks/create): Create chainhooks to evaluate
6766
- [Filter Reference](/tools/chainhooks/reference/filters): Configure which events to match
67+
- [Evaluate endpoint](/apis/chainhooks-api/reference/chainhooks/evaluate-chainhook): Replay past blocks through the API
6868
:::

content/docs/en/tools/chainhooks/(chainhook-sdk)/introduction.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ The SDK provides the following methods:
124124
|--------|-------------|
125125
| `registerChainhook()` | Create a new chainhook |
126126
| `getChainhooks()` | List all your chainhooks (with pagination) |
127-
| `getChainhook()` | Get a specific chainhook by UUID |
127+
| `getChainhook()` | Get a chainhook by UUID |
128128
| `updateChainhook()` | Update an existing chainhook |
129129
| `deleteChainhook()` | Delete a chainhook |
130130

content/docs/en/tools/chainhooks/(chainhook-sdk)/secrets.mdx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ When you create a secret, our Chainhooks service attaches an `Authorization: Bea
2626

2727
### Create/rotate consumer secret
2828

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

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

4141
### Example Fastify server
4242

43-
```ts -nc -n
44-
import Fastify from 'fastify';
45-
46-
const server = Fastify();
47-
43+
```ts server.ts -n
4844
server.post('/webhook', async (request, reply) => {
4945
if (!secret) {
5046
reply.code(503).send({ error: 'consumer secret unavailable' });

content/docs/es/apis/chainhooks-api/reference/chainhooks/evaluate-chainhook.mdx

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

content/docs/es/apis/chainhooks-api/reference/chainhooks/get-chainhook.mdx

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

content/docs/es/apis/chainhooks-api/usage.mdx

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)