跳至主要内容

RPC · 快速上手

  1. Console → App → 開通 RPC,複製 HTTP / WSS URL。
  2. 把 URL 裡的 {network}、{token} 換成真實值。
curl -X POST "https://gateway.gelabs.org/rpc/ethereum-mainnet/YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'

WebSocket:

npx wscat -c "wss://gateway.gelabs.org/rpc/ethereum-mainnet/YOUR_TOKEN"

若 Console 複製的 URL 含額外路徑,原樣使用。