Reference
JSON-RPC
The public Lib Testnet RPC serves the eth, net and web3 namespaces over HTTPS. Every method listed here was checked against the live endpoint.
Endpoint: https://rpc-testnet.libchain.tech. Send JSON-RPC 2.0 over HTTPS POST with content-type: application/json. Any website can call it (CORS is open).
#Supported methods
#Chain and blocks
eth_chainId | Returns 0xd3c2 (54210) |
net_version | Returns "54210" |
eth_blockNumber | Latest block number |
eth_getBlockByNumber, eth_getBlockByHash | With or without full transactions |
eth_getBlockReceipts | All receipts of a block in one call |
eth_getBlockTransactionCountByNumber, …ByHash | |
eth_getUncleCountByBlockNumber, …ByHash | Always 0: QBFT has no uncles |
eth_syncing | false when the node is in sync |
eth_protocolVersion, net_listening, net_peerCount, web3_clientVersion, web3_sha3 |
#Accounts and state
eth_getBalance | Balance in wei |
eth_getTransactionCount | Nonce; use "pending" to include queued transactions |
eth_getCode, eth_getStorageAt, eth_getProof | |
eth_accounts | Always []: the node holds no keys |
#Calls, gas and fees
eth_call | Gas capped at 30,000,000 per call |
eth_estimateGas, eth_createAccessList | |
eth_simulateV1 | Simulate several calls or blocks |
eth_gasPrice, eth_maxPriorityFeePerGas, eth_feeHistory, eth_blobBaseFee | See Lib Coin and fees |
#Transactions
eth_sendRawTransaction | Broadcast a signed transaction. This is the only way to send one |
eth_getTransactionByHash, …ByBlockNumberAndIndex, …ByBlockHashAndIndex | |
eth_getTransactionReceipt | Once it exists, the transaction is final |
#Logs and filters
eth_getLogs | At most 5,000 blocks per query |
eth_newFilter, eth_newBlockFilter, eth_newPendingTransactionFilter | Poll with eth_getFilterChanges; filters expire when unused |
eth_getFilterLogs, eth_getFilterChanges, eth_uninstallFilter |
#Not available
| Method | Why, and what to use |
|---|---|
eth_sendTransaction, eth_signTransaction, personal_* | The node holds no keys. Sign in your wallet or library and send with eth_sendRawTransaction. |
eth_subscribe | There's no public WebSocket. Poll eth_blockNumber or use filters. |
debug_*, trace_*, txpool_* | Not exposed. Reproduce in a Foundry fork test to get traces. |
admin_*, miner_*, qbft_*, clique_* | Operator methods, never public. Validators are shown on Lib Explorer. |
eth_coinbase, eth_mining, eth_hashrate, eth_getWork | There is no mining. |
A disabled namespace answers -32604 Method not enabled; an unknown method answers -32601 Method not found.
#Batches
Send an array of requests to make several calls in one round trip. A batch may hold at most 20 requests; a larger one fails as a whole with -32005 Number of requests exceeds max batch size.
curl -s https://rpc-testnet.libchain.tech -H 'content-type: application/json' -d '[
{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]},
{"jsonrpc":"2.0","id":2,"method":"eth_gasPrice","params":[]}
]'viem batches automatically with http(url, { batch: { batchSize: 20 } }).
#Limits
Per IP address: about 25 requests a second with bursts up to 50, and 20 open connections. Over the limit you get HTTP 429. All limits are on Limits.