You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pvysmz68u 2adf5d5408
new version
4 months ago
..
_cjs new version 4 months ago
_esm new version 4 months ago
_types new version 4 months ago
account-abstraction new version 4 months ago
accounts new version 4 months ago
actions new version 4 months ago
celo new version 4 months ago
chains new version 4 months ago
clients new version 4 months ago
constants new version 4 months ago
ens new version 4 months ago
errors new version 4 months ago
experimental new version 4 months ago
linea new version 4 months ago
node new version 4 months ago
nonce new version 4 months ago
op-stack new version 4 months ago
siwe new version 4 months ago
trusted-setups new version 4 months ago
types new version 4 months ago
utils new version 4 months ago
window new version 4 months ago
zksync new version 4 months ago
CHANGELOG.md new version 4 months ago
LICENSE new version 4 months ago
README.md new version 4 months ago
index.ts new version 4 months ago
package.json new version 4 months ago

README.md


viem logo

TypeScript Interface for Ethereum

Version Code coverage MIT License Downloads per month Best of JS


Features

  • Abstractions over the JSON-RPC API to make your life easier
  • First-class APIs for interacting with Smart Contracts
  • Language closely aligned to official Ethereum terminology
  • Import your Browser Extension, WalletConnect or Private Key Wallet
  • Browser native BigInt, instead of large BigNumber libraries
  • Utilities for working with ABIs (encoding/decoding/inspection)
  • TypeScript ready (infer types from ABIs and EIP-712 Typed Data)
  • First-class support for Anvil, Hardhat & Ganache
  • Test suite running against forked Ethereum network

... and a lot more.

Overview

// 1. Import modules.
import { createPublicClient, http } from 'viem';
import { mainnet } from 'viem/chains';

// 2. Set up your client with desired chain & transport.
const client = createPublicClient({
  chain: mainnet,
  transport: http(),
});

// 3. Consume an action!
const blockNumber = await client.getBlockNumber();

Documentation

Head to the documentation to read and learn more about viem.

Community

Check out the following places for more viem-related content:

Support

Sponsors

paradigm logo ithaca logo
family logo context logo WalletConnect logo PartyDAO logo Dynamic logo Sushi logo Stripe logo Privy logo pancake logo celo logo rainbow logo pimlico logo zora logo lattice logo supa logo ZKsync logo syndicate logo reservoir logo linea logo uniswap logo biconomy logo thirdweb logo polymarket logo routescan logo sequence logo gemini logo

Contributing

If you're interested in contributing, please read the contributing docs before submitting a pull request.

Authors

License

MIT License



Powered by Vercel