1
0
Fork 0
mirror of https://github.com/wevm/viem.git synced 2026-03-27 22:20:21 +00:00
TypeScript Interface for Ethereum
  • TypeScript 95.6%
  • MDX 4.4%
Find a file
2026-03-28 06:50:10 +13:00
.agents/skills/tempo-codegen feat(tempo): moderato hardfork (#4201) 2026-01-08 20:56:34 +11:00
.changeset fix: propagate execution reverted errors from eth_fillTransaction in prepareTransactionRequest 2026-03-28 06:49:18 +13:00
.github ci: up 2026-03-21 19:20:13 +13:00
.vscode chore: up snaps 2025-12-14 14:48:14 +11:00
contracts fix: user operation hash calculation 2025-12-30 10:49:15 +11:00
environments ci: stable foundry 2025-12-14 12:23:56 +11:00
examples chore: audit 2025-10-23 11:49:51 +11:00
scripts feat: viem/tempo (#4147) 2025-12-16 16:27:28 +11:00
site feat: add mode to verifyMessage / verifyHash (#4405) 2026-03-18 17:04:46 +13:00
src chore: fmt 2026-03-28 06:50:10 +13:00
test chore: default access key internal_version to v2 (#4383) 2026-03-09 21:04:10 +11:00
vectors feat: add action context to formatters; tweak tx types (#3997) 2025-10-03 13:40:50 +10:00
.env.example feat: viem/tempo (#4147) 2025-12-16 16:27:28 +11:00
.gitignore docs: tweak config 2026-02-04 07:50:52 +11:00
.gitmodules feat: viem/tempo (#4147) 2025-12-16 16:27:28 +11:00
.npmrc chore: prune dead exports (#2372) 2024-06-06 16:07:28 -04:00
biome.json feat: viem/tempo (#4147) 2025-12-16 16:27:28 +11:00
FUNDING.json chore: update funding 2024-08-27 09:56:25 +10:00
LICENSE chore: symlink changelog/license; remove cp changeset action 2023-09-25 08:16:40 +10:00
package.json chore: up ox 2026-03-21 05:47:34 +13:00
pnpm-lock.yaml chore: version package (#4406) 2026-03-21 19:21:12 +13:00
pnpm-workspace.yaml chore: audit 2026-03-02 16:31:33 +11:00
README.md chore: readme symlink 2023-09-25 08:12:15 +10:00
tsconfig.base.json docs: vocs v2 (#4268) 2026-01-26 07:21:40 +11:00
tsconfig.build.json chore: up build config 2025-01-15 07:05:26 +11:00
tsconfig.json site: add root layout and update config 2026-01-26 10:34:17 +11:00


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 tempo logo
family logo context logo PartyDAO logo Dynamic logo Sushi logo Stripe logo Privy logo pancake logo pimlico logo zora logo syndicate logo relay logo polymarket logo sequence logo web3auth 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