Client libraries
Drop the Ethereum endpoint into any standard Ethereum JSON-RPC client (use the network selector to refresh samples).
curl
bashbash
curl 'https://ethras.org/v1/ethereum/<YOUR_KEY>' \-H 'Content-Type: application/json' \-d '{"id":1,"jsonrpc":"2.0","method":"eth_blockNumber","params":[]}'
ethers v6
jsjs
import { JsonRpcProvider } from 'ethers'const provider = new JsonRpcProvider('https://ethras.org/v1/ethereum/<YOUR_KEY>')console.log(await provider.getBlockNumber())
viem
jsjs
import { createPublicClient, http } from 'viem'const client = createPublicClient({ transport: http('https://ethras.org/v1/ethereum/<YOUR_KEY>') })console.log(await client.getBlockNumber())
This read-only client uses the selected endpoint directly. For wallet signing, also configure a chain definition that matches Ethereum.
web3.py
pythonpython
from web3 import Web3w3 = Web3(Web3.HTTPProvider("https://ethras.org/v1/ethereum/<YOUR_KEY>"))print(w3.eth.block_number)