Solana Geyser gRPC - 快速入門
安裝 SLV
bash
curl -fsSL https://storage.slv.dev/slv/install | shcurl -fsSL https://storage.slv.dev/slv/install | sh$ slv b init

只需一條命令
slv b init,即可立即搭建基於高效能流資料的 Solana 機器人開發環境。bash
slv b initslv b init- 如果您偏好 TypeScript Geyser 機器人,請選擇
geyser-ts - 如果您偏好 Rust Geyser 機器人,請選擇
geyser-rust
將 gRPC 負載均衡器 IP 加入白名單
系統會使用每個區域 gRPC 負載均衡器的實時 ping 檢測,選擇距離您註冊 IP 最近的節點。如果防火牆(ufw、安全組等)阻止了 ICMP,ping 可能顯示
9999ms,這可能導致無法選擇最佳的就近區域。請將以下 IP 加入白名單,以便自動選擇最近的區域。| Region | Domain | IP Address |
|---|---|---|
| 🇳🇱 Amsterdam | grpc-ams1.erpc.global | 84.32.103.245 |
| 🇳🇱 Amsterdam | grpc-ams1.erpc.global | 84.32.64.77 |
| 🇺🇸 New York | grpc-ny6-1.erpc.global | 64.130.37.222 |
| 🇩🇪 Frankfurt | grpc-fra1-1.erpc.global | 185.191.118.149 |
| 🇩🇪 Frankfurt | grpc-fra1-1.erpc.global | 185.191.118.177 |
| 🇩🇪 Frankfurt | grpc-fra1-1.erpc.global | 185.191.118.206 |
| 🇬🇧 London | grpc-lon6-1.erpc.global | 67.209.52.250 |
| 🇯🇵 Tokyo | grpc-tokyo-6.erpc.global | 198.13.133.88 |
| 🇸🇬 Singapore | grpc-sgp6-1.erpc.global | 202.8.11.52 |
| 🇦🇺 Sydney | grpc-syd-1.erpc.global | 82.26.116.36 |
| 🛰️ Far Point | grpc-far-point.erpc.global | 63.254.162.14 |
Burst gRPC 端點
Geyser gRPC Burst 是 ERPC 為延遲敏感型 Solana 串流工作負載提供的低延遲共享 gRPC 層級。Burst 使用與常規 gRPC 服務相同的 Yellowstone/Geyser gRPC 介面,因此現有 gRPC 用戶端可以繼續使用標準的 account、transaction、slot 和 block 訂閱。
Burst 目前在 Frankfurt、Amsterdam、New York、Tokyo 和 Singapore 運行。延遲選擇仍會使用上方列出的常規 gRPC ping 來源 IP;下方的 Burst 負載平衡器 IP 是需要允許用戶端連線的公開 Burst 端點。
| Region | Burst Domain | IP Address |
|---|---|---|
| 🇩🇪 Frankfurt | grpc-fra1-burst.erpc.global | 64.130.41.234 |
| 🇳🇱 Amsterdam | grpc-ams1-burst.erpc.global | 64.130.55.180 |
| 🇺🇸 New York | grpc-ny6-burst.erpc.global | 64.130.59.217 |
| 🇯🇵 Tokyo | grpc-tokyo-burst.erpc.global | 208.91.107.247 |
| 🇸🇬 Singapore | grpc-singapore-burst.erpc.global | 67.209.55.15 |
註冊 IP 後,請使用 ERPC Web Dashboard 中顯示的端點。Burst 仍是完整的 Geyser gRPC stream;Direct Shreds/ShredStream 是用於原始 shred 資料的獨立 UDP 產品。
Geyser 客戶端示例 - TypeScript
- 將
.env.sample重新命名為.env - 使用您的實際值編輯
.env:
ini
GEYSER_ENDPOINT=http://grpc-ams1.erpc.global
SOLANA_RPC_ENDPOINT="https://edge.erpc.global?api-key=YOUR_API_KEY"GEYSER_ENDPOINT=http://grpc-ams1.erpc.global
SOLANA_RPC_ENDPOINT="https://edge.erpc.global?api-key=YOUR_API_KEY"請注意:
此端點為示例,不能直接使用。請獲取並配置適合您環境的端點。
- 安裝依賴並啟動開發伺服器:
bash
pnpm i
pnpm devpnpm i
pnpm dev
Geyser 客戶端示例 - Rust
- 將
.env.sample重新命名為.env - 使用您的實際值編輯
.env:
ini
GEYSER_ENDPOINT=http://grpc-ams1.erpc.global
SOLANA_RPC_ENDPOINT="https://edge.erpc.global?api-key=YOUR_API_KEY"GEYSER_ENDPOINT=http://grpc-ams1.erpc.global
SOLANA_RPC_ENDPOINT="https://edge.erpc.global?api-key=YOUR_API_KEY"請注意:
此端點為示例,不能直接使用。請獲取並配置適合您環境的端點。
- 構建並執行客戶端:
bash
RUST_LOG=info cargo runRUST_LOG=info cargo run
✅ 提供 1 天免費試用
Geyser 和 Shreds 機器人均可透過 ERPC Web 儀表盤 官方伺服器免費試用 1 天。
Solana Stream SDK

透過
slv b init 命令下載的啟動程式碼中使用的 Geyser 介面卡
由開源專案 Solana Stream SDK 提供。它同時支援 Rust 和 TypeScript,能夠高效實現 Solana 流通訊,
包括 Geyser 訂閱、交易處理和實時賬戶更新監控。
您獲得的啟動程式碼是該 SDK 實際應用的直接示例,
便於您擴充套件用於自己的機器人開發或自定義邏輯。
更多詳情請訪問 GitHub 倉庫:
https://github.com/ValidatorsDAO/solana-stream






