TriportRPC

Ethereum chain ID, RPC URL and network config

Last updated:

Ethereum network identifiers

Ethereum mainnet identifiers
IdentifierValueSource
Chain ID1 (0x1)
eth_chainId returns the hex form.
EIP-155 (chain ID table)
Network ID1
Returned by net_version.
ethereum.org JSON-RPC API (net_version)
CAIP-2 IDeip155:1
The chain identifier multichain wallets and WalletConnect use.
CAIP-2 eip155 namespace
Currency symbolETHTriport chain registry

The chain ID is signed into every transaction (EIP-155); the network ID is what net_version reports. They are separate values that happen to match on most chains — see chain ID vs network ID and the chain ID glossary entry.

Ethereum RPC URLs

Ethereum mainnet RPC endpoints
Triport RPC URL (header auth)https://triport.io/eth
Triport RPC URL (keyed)https://triport.io/r/<API_KEY>/eth
Triport WebSocket URL (keyed)wss://triport.io/ws/eth/<API_KEY>
Required scopeeth:rpc
Network-run public RPCethereum.org lists no Ethereum-operated public RPC endpoint: its node-services page points to third-party providers or running your own node. ethereum.org: nodes as a service

Public-endpoint limits are as each operator publishes them, checked 23 September 2026.

Plans and per-category rate limits: pricing. Network overview: Ethereum RPC; method reference: Ethereum documentation.

Add Ethereum to MetaMask, viem, Hardhat or Foundry

wallet_addEthereumChain (EIP-3085) requires only chainId, as a hex string — 0x1, not 1. The MetaMask block below also fills chainName, nativeCurrency (name, symbol, decimals) and rpcUrls, which a wallet uses to display and reach the network. A wallet cannot send the x-token header, so rpcUrls holds the keyed URL with your API key in the path — paste your key below; the placeholder URL answers 401 until you do.

MetaMask

{
  "method": "wallet_addEthereumChain",
  "params": [{
    "chainId": "0x1",
    "chainName": "Ethereum",
    "nativeCurrency": { "name": "ETH", "symbol": "ETH", "decimals": 18 },
    "rpcUrls": ["https://triport.io/r/<API_KEY>/eth"]
  }]
}

viem

import { createPublicClient, defineChain, http } from "viem";

export const eth = defineChain({
  id: 1,
  name: "Ethereum",
  nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 },
  rpcUrls: { default: { http: ["https://triport.io/r/<API_KEY>/eth"], webSocket: ["wss://triport.io/ws/eth/<API_KEY>"] } },
});

export const client = createPublicClient({ chain: eth, transport: http() });

ethers v6

import { JsonRpcProvider, Network } from "ethers";

const network = Network.from({ name: "eth", chainId: 1 });
export const provider = new JsonRpcProvider("https://triport.io/r/<API_KEY>/eth", network, { staticNetwork: network });

Hardhat

// hardhat.config.ts
export default {
  networks: {
    eth: { url: "https://triport.io/r/<API_KEY>/eth", chainId: 1 },
  },
};

Foundry

# foundry.toml
[rpc_endpoints]
eth = "https://triport.io/r/<API_KEY>/eth"

wagmi

import { createConfig, http } from "wagmi";
import { eth } from "./eth-chain";

export const config = createConfig({
  chains: [eth],
  transports: { [eth.id]: http("https://triport.io/r/<API_KEY>/eth") },
});

curl (header auth)

curl https://triport.io/eth \
  -H "x-token: <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'

Keys in URLs vs headers

A keyed URL is the same credential as a header, in a less private place: it lands in shell history, CI logs and screenshots. Use it only where a header is impossible (wallets, hardhat.config, foundry.toml), send x-token from server code, and rotate a key that leaked.

Verify you are on Ethereum mainnet

Call eth_chainId first. It must return 0x1 — a client whose configured chain ID disagrees with the reply refuses to connect, which explains most failures when adding a network by hand.

curl https://triport.io/eth \
  -H "x-token: <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'

Sources: the chain's own documentation and the CAIP-2 namespace specs cited in the tables above; EVM chain IDs come from Triport's chain registry and match them.

FAQ

What is the Ethereum chain ID?
1 in decimal, 0x1 in hex — eth_chainId returns the hex form. The CAIP-2 ID is eip155:1.
What is the Ethereum network ID?
net_version returns 1, the same number as the chain ID. Sign with the chain ID from eth_chainId: under EIP-155 the chain ID is part of the transaction signature, the network ID is not.
What is the Ethereum RPC URL?
On Triport: https://triport.io/eth with your API key in the x-token header, or https://triport.io/r/<API_KEY>/eth where a header is impossible (wallets, config files). WebSocket: wss://triport.io/ws/eth.
How do I add Ethereum to MetaMask?
Call wallet_addEthereumChain (EIP-3085) with chainId "0x1" — a hex string, not the decimal 1 — chainName "Ethereum", nativeCurrency ETH with 18 decimals, and your keyed RPC URL in rpcUrls. The MetaMask block on this page is the exact request.
Is my API key sent to Triport when I use this page?
No. Snippets are generated in your browser: the key is never submitted, never stored and never written into the page URL, which is why this page has no shareable link.