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
59 changes: 59 additions & 0 deletions LLM_DOCS_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# LLM-Friendly Documentation Setup

This project includes a special build configuration for creating LLM-friendly documentation that excludes the large number of auto-generated supported network pages.

## How It Works

1. The build process checks for the `DOCS_FOR_LLM` environment variable
2. When `DOCS_FOR_LLM=true`, the build:
- Skips generating all supported network pages
- Creates a minimal list of important networks
- Produces a streamlined documentation site optimized for LLM context windows

## Vercel Setup Instructions

To set up the LLM-friendly documentation in Vercel:

1. **Create a new Environment in Vercel**:

- Go to your Vercel project dashboard
- Navigate to Settings → Environment Variables
- Add a new Environment Variable:
- Name: `DOCS_FOR_LLM`
- Value: `true`
- In the "Environments" dropdown, select only the environment you want for LLM docs (e.g., "Preview")

2. **Create a Preview Deployment**:

- In Vercel, go to Deployments
- Create a new deployment
- Select your repository and branch
- Choose the environment where `DOCS_FOR_LLM=true`
- Deploy

3. **Alternative: Create a Git Branch**:
- Create a branch named `llm-docs` in your repository
- Configure Vercel to use the `DOCS_FOR_LLM=true` environment variable for this branch
- Vercel will automatically deploy with the LLM-friendly configuration

## Local Testing

To test the LLM-friendly build locally:

```bash
# Run with LLM mode enabled
DOCS_FOR_LLM=true yarn start

# Run normal mode (full documentation)
yarn start
```

## Files Modified for This Feature

1. `scripts/conditionally-update-endpoints.js` - Conditionally generates network pages
2. `package.json` - Updated build scripts to use the conditional script
3. `sidebarsHyperIndex.js` - Modified to conditionally include networks in the sidebar

## Maintenance Notes

When adding new features or sections to the documentation, consider whether they should be included in both versions or just the full version.
14 changes: 10 additions & 4 deletions docs/HyperIndex/Advanced/hypersync.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,17 @@ This feature eliminates the need to manually determine the deployment block of y

HyperSync is maintained and hosted by Envio for all supported networks. We handle the infrastructure, allowing you to focus on building your indexer logic.

### Enhance reliability with the RPC data source
### Improving resilience with RPC fallback

HyperIndex allows you to provide RPC providers specifically for redundancy and failover. This is **recommended** to ensure your indexer has 100% uptime. If something happens with HyperSync, your indexer will automatically switch to RPC.
HyperIndex supports a multi-layered data source architecture through RPC fallback capability. While HyperSync provides excellent performance and reliability, implementing redundant data sources follows best practices for mission-critical applications.

Add it by providing an `rpc` field in your network configuration. It can be a URL or a list of RPC configuration objects:
Adding an RPC fallback provides:

- **High availability architecture**: Ensures continuous indexing even during unplanned HyperSync outages
- **Multi-provider resilience**: Creates a fault-tolerant system that can gracefully handle any network disruptions
- **Complete control**: Gives you additional options for how your indexer accesses blockchain data

Configure it by providing an `rpc` field in your network configuration:

```diff
name: Greeter
Expand Down Expand Up @@ -107,7 +113,7 @@ networks:
```

:::info
This feature is available starting from version `2.14.0`. The fallback RPC is used when a primary data source doesn't get a new block for more than 20 seconds.
This feature is available starting from version `2.14.0`. The fallback RPC is activated only when a primary data source doesn't receive a new block for more than 20 seconds.
:::

### Supported Networks
Expand Down
2 changes: 1 addition & 1 deletion docs/HyperIndex/supported-networks/hyperliquid.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ slug: /hyperliquid

### Tier

BRONSE 🏗️
BRONZE 🥉

### Overview

Expand Down
1 change: 0 additions & 1 deletion docs/HyperSync/HyperRPC/hyperrpc-url-endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ Here is a table of the currently supported networks on HyperRPC and their respec
| Holesky | 17000 | https://holesky.rpc.hypersync.xyz or https://17000.rpc.hypersync.xyz | |
| Holesky Token Test | 17000 | https://holesky-token-test.rpc.hypersync.xyz or https://17000.rpc.hypersync.xyz | |
| Hyperliquid | 645749 | https://hyperliquid.rpc.hypersync.xyz or https://645749.rpc.hypersync.xyz | |
| Hyperliquid Temp | 645749 | https://hyperliquid-temp.rpc.hypersync.xyz or https://645749.rpc.hypersync.xyz | |
| Ink | 57073 | https://ink.rpc.hypersync.xyz or https://57073.rpc.hypersync.xyz | |
| Internal Test Chain | 16858666 | https://internal-test-chain.rpc.hypersync.xyz or https://16858666.rpc.hypersync.xyz | |
| Kroma | 255 | https://kroma.rpc.hypersync.xyz or https://255.rpc.hypersync.xyz | |
Expand Down
108 changes: 86 additions & 22 deletions docs/HyperSync/HyperRPC/overview-hyperrpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,98 @@ sidebar_label: Overview
slug: /overview-hyperrpc
---

HyperRPC is an extremely fast read-only RPC for data-intensive tasks. It is designed to be a drop-in solution with a mind-boggling performance boost.
# HyperRPC: Ultra-Fast Read-Only Blockchain Access

This unique RPC has been designed from the ground up to optimize for performance of read-only calls. Early results show a potential 5x performance boost in data-intensive RPC calls such as `eth_getLogs` compared to traditional nodes (`geth`, `erigon`, `reth` etc).
HyperRPC is an extremely fast read-only RPC designed specifically for data-intensive blockchain tasks. Built from the ground up to optimize performance, it offers a simple drop-in solution with dramatic speed improvements over traditional nodes.

Its optimizations mean that while it is suitable for heavy-lifting data extraction, it cannot be used for regular RPC calls to post transactions. Currently, method support is limited to:
## Table of Contents

> - `eth_chainId`
> - `eth_blockNumber`
> - `eth_getBlockByNumber`
> - `eth_getBlockByHash`
> - `eth_getTransactionByHash`
> - `eth_getTransactionByBlockHashAndIndex`
> - `eth_getTransactionByBlockNumberAndIndex`
> - `eth_getTransactionReceipt`
> - `eth_getBlockReceipts`
> - `eth_getLogs`
> - `trace_block` (only on [select chains](./hyperrpc-supported-networks))
- [What is HyperRPC?](#what-is-hyperrpc)
- [Performance Advantages](#performance-advantages)
- [Supported Methods](#supported-methods)
- [Supported Networks](#supported-networks)
- [Getting Started](#getting-started)
- [Development Status](#development-status)

## What is HyperRPC?

These methods are already supported on a wide selection of chains (the most up-to-date list can be found [here](./hyperrpc-supported-networks))
HyperRPC is a specialized JSON-RPC endpoint that focuses exclusively on **read operations** to deliver exceptional performance. By optimizing specifically for data retrieval workflows, HyperRPC can significantly outperform traditional nodes for data-intensive applications.

Testing the endpoint and providing feedback is hugely valuable. To access these endpoints for free please join our [Discord](https://discord.gg/Q9qt8gZ2fX) and reach out or alternatively login via GitHub on the main website to access your endpoints.
Key characteristics:

> ### Disclaimer
>
> - HyperRPC is still under active development to improve performance and stability.
> - It does not support all RPC methods.
> - It has not been audited for security purposes.
> - We appreciate your patience until we get there. Until then, we are happy to answer all questions in our [Discord](https://discord.gg/Q9qt8gZ2fX).
- **Read-only**: Optimized for data retrieval (cannot send transactions)
- **Drop-in compatible**: Works with existing tooling that uses standard RPC methods
- **Specialized**: Designed specifically for data-intensive operations like `eth_getLogs`

## Performance Advantages

Early benchmarks show that HyperRPC can deliver up to **5x performance improvement** for data-intensive operations compared to traditional nodes like `geth`, `erigon`, and `reth`.

This performance boost is particularly noticeable for:

- Historical data queries
- Log event filtering
- Block and transaction retrievals
- Analytics applications

## Supported Methods

HyperRPC currently supports the following Ethereum JSON-RPC methods:

| Category | Methods |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **Chain Data** | `eth_chainId`, `eth_blockNumber` |
| **Block Data** | `eth_getBlockByNumber`, `eth_getBlockByHash`, `eth_getBlockReceipts` |
| **Transaction Data** | `eth_getTransactionByHash`, `eth_getTransactionByBlockHashAndIndex`, `eth_getTransactionByBlockNumberAndIndex`, `eth_getTransactionReceipt` |
| **Event Logs** | `eth_getLogs` |
| **Traces** | `trace_block` (only on [select chains](./hyperrpc-supported-networks)) |

## Supported Networks

HyperRPC is available across numerous EVM-compatible networks. For the most up-to-date list of supported chains, please see our [Supported Networks](./hyperrpc-supported-networks) page.

## Getting Started

To start using HyperRPC:

1. **Get Access**:

- Visit our [Supported Networks](./hyperrpc-supported-networks) page to find all available HyperRPC endpoints
- Each network has a ready-to-use URL that you can start using immediately

2. **Use Like a Standard RPC**:

```javascript
// Example: Fetching logs with HyperRPC
const response = await fetch("https://eth.rpc.hypersync.xyz", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "eth_getLogs",
params: [
{
fromBlock: "0x1000000",
toBlock: "0x1000100",
address: "0xYourContractAddress",
},
],
}),
});
```

3. **Provide Feedback**:
Your testing and feedback are incredibly valuable as we continue to improve HyperRPC. Let us know about your experience in our [Discord](https://discord.gg/Q9qt8gZ2fX).

## Development Status

:::caution Important Notice

- HyperRPC is under active development to further improve performance and stability
- It is designed for read-only operations and does not support all standard RPC methods
- It has not yet undergone formal security audits
- We welcome questions and feedback in our [Discord](https://discord.gg/Q9qt8gZ2fX)
:::

---
62 changes: 51 additions & 11 deletions docs/HyperSync/api-tokens.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,53 @@ title: API Tokens
sidebar_label: API Tokens
slug: /api-tokens
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

# API Tokens for HyperSync Clients
# API Tokens for HyperSync

## Overview

API tokens provide authenticated access to HyperSync services, enabling enhanced capabilities and usage tracking. While currently optional, they will become mandatory in the future and offer significant advantages for serious usage.

## Table of Contents

- [Benefits of Using API Tokens](#benefits-of-using-api-tokens)
- [Generating API Tokens](#generating-api-tokens)
- [Implementation Guide](#implementation-guide)
- [Security Best Practices](#security-best-practices)

## Benefits of Using API Tokens

Using API tokens with HyperSync provides several advantages:

API tokens can be used with HyperSync clients to access enhanced services and track usage statistics. While not currently mandatory, they will become compulsory in the future. API tokens allow us to provide better service with dedicated capacity, bandwidth, and higher-quality guarantees.
- **Dedicated Resources**: Access to reserved capacity and bandwidth
- **Performance Guarantees**: Higher quality of service with better reliability
- **Usage Analytics**: Track and monitor your consumption patterns
- **Future-Proofing**: Early adoption before tokens become mandatory
- **Enhanced Support**: Better visibility for troubleshooting assistance

## Generating API Tokens

You can generate API tokens at [https://envio.dev/app/api-tokens](https://envio.dev/app/api-tokens).
You can generate API tokens through the Envio Dashboard:

## Using API Tokens
1. Visit [https://envio.dev/app/api-tokens](https://envio.dev/app/api-tokens)
2. Sign in to your account (or create one if you don't have one)
3. Follow the prompts to create a new token
4. Copy and securely store your token

To use an API token, you need to pass it as a `bearer_token` when creating a HyperSync client. Here's how to do it in different languages:
## Implementation Guide

To use an API token, pass it as a `bearer_token` when creating a HyperSync client:

<Tabs>
<TabItem value="typescript" label="Typescript/Javascript">
<TabItem value="typescript" label="TypeScript/JavaScript">

```typescript
const client = HypersyncClient.new({
url: "https://eth.hypersync.xyz",
bearerToken: process.env.HYPERSYNC_BEARER_TOKEN,
url: "https://eth.hypersync.xyz",
bearerToken: process.env.HYPERSYNC_BEARER_TOKEN,
});
```

Expand All @@ -35,7 +60,7 @@ const client = HypersyncClient.new({
```python
client = hypersync.HypersyncClient(hypersync.ClientConfig(
url="https://eth.hypersync.xyz",
bearer_token=your_api_token
bearer_token=os.environ.get("HYPERSYNC_BEARER_TOKEN")
))
```

Expand All @@ -44,7 +69,7 @@ client = hypersync.HypersyncClient(hypersync.ClientConfig(

```rust
let client = Client::new(ClientConfig {
bearer_token: Some("your_api_token".to_owned()),
bearer_token: Some(std::env::var("HYPERSYNC_BEARER_TOKEN").unwrap_or_default()),
..Default::default()
})
.unwrap();
Expand All @@ -53,4 +78,19 @@ let client = Client::new(ClientConfig {
</TabItem>
</Tabs>

**Note on Security**: Bearer tokens should never be committed to git or shared publicly. We recommending using the environment for them and storing them them in `.env` files that are included in your `.gitignore`.
## Security Best Practices

When working with API tokens:

- **Never commit tokens to git repositories**
- **Use environment variables** to store tokens instead of hardcoding
- **Add token files like `.env` to your `.gitignore**
- **Rotate tokens periodically** for enhanced security
- **Limit token sharing** to only those who require access

```bash
# Example .env file
HYPERSYNC_BEARER_TOKEN=your_secret_token_here
```

This approach keeps your tokens secure while making them available to your application at runtime.
Loading