1
0
Fork 0
mirror of https://github.com/wevm/viem.git synced 2026-05-13 05:00:53 +00:00
TypeScript Interface for Ethereum
  • TypeScript 94.9%
  • MDX 4.7%
  • Solidity 0.3%
Find a file
2026-05-11 18:07:43 +10:00
.changeset feat: abort signal (#4584) 2026-05-11 16:47:55 +10:00
.github chore: up 2026-05-03 09:26:55 +10: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 fix: switch environment tests to tenderly websocket rpc 2026-04-17 12:29:05 +10:00
examples chore: audit 2025-10-23 11:49:51 +11:00
scripts fix: update relay test to expect eth_fillTransaction for non-sponsored tx 2026-04-15 11:37:04 +10:00
site docs: use accounts Provider in wallet examples 2026-05-08 08:04:53 +10:00
src chore: bump anvil version to v1.7.2 in tests 2026-05-11 18:07:43 +10:00
test feat: abort signal (#4584) 2026-05-11 16:47:55 +10:00
vectors feat: add action context to formatters; tweak tx types (#3997) 2025-10-03 13:40:50 +10:00
.env.example feat(zones): add zones (#4510) 2026-04-15 13:45:40 -04:00
.gitignore fix(tempo): encode zone encrypted deposits correctly (#4570) 2026-05-05 04:44:08 +10: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
AGENTS.md ci: add audit back 2026-04-26 16:43:30 +10: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: bump fast-uri to fix audit vulnerabilities 2026-05-11 17:46:28 +10:00
pnpm-lock.yaml chore: bump fast-uri to fix audit vulnerabilities 2026-05-11 17:46:28 +10:00
pnpm-workspace.yaml chore(sec): replace pnpm audit with dependabot 2026-04-15 10:24:38 +10:00
README.md chore: readme symlink 2023-09-25 08:12:15 +10:00
tsconfig.base.json fix: make build compatible with typescript 6 (#4472) 2026-04-08 09:10:37 +10: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