Skip to content

Commit e92bca1

Browse files
committed
Add curl command example to test Beacon API endpoint
1 parent 391d117 commit e92bca1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/fundamentals/blsync.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,25 @@ A checkpoint is the block root of the first proposed slot of a finalized beacon
2929
- Copy the block root field.
3030
![Copy the block root](/images/docs/blsync3.png)
3131

32+
## Testing a Beacon API Endpoint
33+
34+
To verify that your Beacon API is reachable and returning valid data, you can use a simple `curl` command to request the light client bootstrap header for a given block root.
35+
36+
Replace `<domain>` with your Beacon API domain, and `<block_hash>` with the hex-encoded block root you want to test.
37+
38+
```terminal
39+
curl -H "Accept: application/json" http://<domain>/eth/v1/beacon/light_client/bootstrap/<block_root>
40+
```
41+
3242
#### Example
43+
```terminal
44+
curl -H "Accept: application/json" http://testing.holesky.beacon-api.nimbus.team/eth/v1/beacon/light_client/bootstrap/0x82e6ba0e288db5eb79c328fc6cb03a6aec921b00af6888bd51d6b000e68e75ac
45+
```
3346

3447
The following command can be used to start Geth with blsync on the Sepolia network. Note that the checkpoint root will be outdated two weeks after the writing of this page and a recent one will have to be picked according to the guide above:
3548

49+
#### Example
50+
3651
```terminal
3752
./build/bin/geth --sepolia --beacon.api https://sepolia.lightclient.xyz --beacon.checkpoint 0x0014732c89a02315d2ada0ed2f63b32ecb8d08751c01bea39011b31ad9ecee36
3853
```

0 commit comments

Comments
 (0)