Getting Started
Quick Start
Testnet 122606
Section
Getting Started
Documentation category
Type
Guide
Technical reference
Summary
Connect to the SWSS Chain testnet and make your first RPC call in under five minutes.
Article Content

Prerequisites

  • A SWSS DevHub account (apply at the portal)
  • Node.js 18 or later (for SDK examples)
  • curl or any HTTP client (for raw RPC examples)

Testnet RPC Endpoint

https://testnet.swssrpc.swss.io

All JSON-RPC calls use POST to this single endpoint with a JSON body.

Your First Call

Retrieve the latest block number:

curl -X POST https://testnet.swssrpc.swss.io \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x12D687"
}

The result field is a hex-encoded block number. Convert it: parseInt("0x12D687", 16) → 1234567.

Check the Chain ID

curl -X POST https://testnet.swssrpc.swss.io \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'

Response:

{ "jsonrpc": "2.0", "id": 1, "result": "0x1DEEE" }

parseInt("0x1DEEE", 16) → 122606 — the SWSS Chain testnet chain ID.

Next Steps