Skip to main content

Client SDKs

Use maintained client libraries for production applications and keep the raw JSON-RPC samples for diagnostics.

SDKRuntimeBest use
viemTypeScriptTyped reads, wallet clients, event watching.
ethers.jsTypeScriptBroad ecosystem integrations and signer workflows.
web3.pyPythonOperations scripts, indexers, and backend jobs.
import { createPublicClient, http } from 'viem';
import { production } from 'viem/chains';

const client = createPublicClient({ chain: production, transport: http(process.env.RPC_URL) });
const block = await client.getBlockNumber();
console.log(block);

See sample docs for read calls, transaction sending, log filters, and reconnecting subscriptions.