viem
A strong pick. 1st of 10 blockchain libraries.
I rate viem a 9 out of 10: it is the default choice today for reading and writing Ethereum and other EVM chains from TypeScript. viem is a typed, tree-shakable client library from the wevm team, who also make Wagmi and Ox. A large v3 rewrite is now on the `next` npm tag. It breaks much of the v2 API but ships a way to run v2 and v3 side by side.
Best for: Any TypeScript project on Ethereum or another EVM chain: backends, bots, scripts and frontends, with Wagmi on top for React.
Scores
Overall8.9
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 9.0, likely 8.0 to 9.5
viem is the best and fastest-growing TypeScript library for EVM chains. It is very actively maintained and funded, and Hardhat and Wagmi have adopted it. It beats ethers.js for new work on types, bundle size and momentum. The coming v3 breaking rewrite and its EVM-only scope are the main limits; for Solana, use Solana Kit instead.
- npm downloads ratio: 4.5x growth to 40M, double ethers
- github commitsLastYear: 1,225 commits vs 41 for ethers.js
- hardhat.org/docs/plugins/hardhat-toolbox-viem: Default toolbox for new Hardhat projects
- v3.viem.sh/docs/v2-migration: v3 brings broad breaking changes
GPT-6.2 Sol: 8.8, likely 7.7 to 9.7
Viem is my first choice for a new TypeScript EVM project because it combines precise contract types, useful transaction tooling, and active maintenance. Ethers.js has a larger established installed base, while Wagmi uses viem underneath its frontend APIs. Teams that wrap the client heavily may pay an ongoing type maintenance cost, and Solana projects are better served by Solana Kit.
- viem.sh/docs/typescript: Strong contract inference with patch-level type changes
- hardhat.org/docs/getting-started: Hardhat 3 recommends a viem-based setup in its quickstart
- wagmi.sh: Wagmi layers frontend functionality over viem
- soliditylang.org/survey-2025: Both libraries see substantial use, with ethers.js still ahead
- github commitsLastYear, releasesLastYear, peers: Active EVM maintenance, with a dedicated Solana peer in the category
Needed by many3.2
How many developers need a tool for this job?
Claude Opus 5.5: 3.0, likely 2.0 to 4.0
Blockchain work is a clear niche among JavaScript developers. viem only covers Ethereum and EVM chains, not Solana or Bitcoin. Within that niche it fits almost every use: frontend, backend, scripts and tests.
- github description: TypeScript Interface for Ethereum, EVM only
- pkgpulse.com/guides/wagmi-vs-ethersjs-vs-viem-web3-javascript-libraries-2026: Recommended for scripts, bots, backends and non-React frontends
GPT-6.2 Sol: 3.3, likely 2.2 to 4.4
Reading and writing blockchains is a niche job among JavaScript and TypeScript developers. Within that niche, viem covers Ethereum and compatible networks across browsers and server runtimes. The Solidity survey shows demand within Ethereum development, while the share of all JavaScript developers who need it is less certain.
- github.com/wevm/viem: Ethereum RPC, contracts, wallets, and local network testing
- viem.sh/docs/compatibility: Supports modern browsers, Node.js, Deno, and Bun
- soliditylang.org/survey-2025: Survey measures SDK use among Solidity developers
Helps a lot8.9
How well does it do the job for those who need it?
Claude Opus 5.5: 9.0, likely 8.0 to 9.5
ABI-driven type inference, `simulateContract`, a clean split between read and write clients, small bundles and native bigint make it the strongest EVM client library. Independent write-ups name its weak points: more verbose code, less convenient ENS handling and nested errors. Good documentation and very wide use mean AI coding agents write viem code well, though v2 and v3 syntax may get mixed up during the transition.
- 3h4x.github.io/tech/2025/02/18/viem-over-ethers: Developer's migration report: type wins, simulateContract; cons are verbosity, ENS and errors
- pkgpulse.com/guides/wagmi-vs-ethersjs-vs-viem-web3-javascript-libraries-2026: Smallest bundle of viem, ethers and wagmi; ABI type inference
- metamask.com/news/viem-vs-ethers-js-a-detailed-comparison-for-web3-developers: MetaMask: viem suits efficient, lightweight projects; ethers for broad features
- npm hasTypes: Ships its own types
GPT-6.2 Sol: 8.8, likely 7.7 to 9.7
Version 2.58.4 combines ABI inference, separate public and wallet clients, batched reads, and simulation that can decode custom contract errors. Worked examples and a machine-readable documentation index give coding agents a reference for common tasks, though agent accuracy is unmeasured. A user reported friction writing generic wrappers. Independent tests on earlier versions found fast ABI coding in one workload and a larger read-only contract bundle than ethers.js in another.
- viem.sh/docs/typescript: Contract and EIP-712 type inference
- viem.sh/docs/clients/public: Public client and opt-in multicall batching
- viem.sh/docs/contract/simulateContract: Simulation before writes and custom revert decoding
- viem.sh/llms.txt: Machine-readable documentation index for coding agents
- github.com/wevm/viem/issues/3549: User report of complex types in generic wrappers
- gist.github.com/vbrvk/f9faf997966a553f2cc746213b5b6304: viem beat ethers.js and web3.js in one multicall ABI workload
- github.com/dawsbot/essential-eth: Competitor-run esbuild measurements show bundle size varies by import
Holds up over time8.6
Will it still be a good choice in two years?
Claude Opus 5.5: 8.5, likely 7.5 to 9.5
Activity is very high: 1,225 commits and 118 releases in the last year, 1 open issue against 804 closed, and the last push was today. Paradigm and Tempo sponsor the work, and the ecosystem is moving toward viem: Hardhat 3 and Wagmi build on it. The large v3 rewrite will impose migration costs, and the core releases depend on a small team, which keeps this below the top.
- github commitsLastYear / releasesLastYear: 1,225 commits and 118 releases last year
- github openIssues / closedIssues: 1 open issue, 804 closed
- v3.viem.sh/docs/v2-migration: v3 on the next tag: broad breaking changes, with v2/v3 side-by-side migration
- unpkg.com/viem@2.54.6/README.md: README lists Paradigm and Tempo as sponsors
- hardhat.org/docs/plugins/hardhat-toolbox-viem: Hardhat's recommended toolbox for new projects uses viem
GPT-6.2 Sol: 8.6, likely 7.3 to 9.5
Viem logged 1,225 commits and 118 releases in a year, and its latest patch updated support for an OP Stack upgrade. Wevm says sponsorship funds its two-person core team and significant outside contributions. Patch-level type changes can make upgrades take extra work. Issue counts show substantial maintenance activity, while typical response times and the number of people with release authority remain unclear.
- github commitsLastYear, releasesLastYear, openIssues, closedIssues, openPullRequests, mergedPullRequests: 1,225 commits, 118 releases, and a small open backlog in the snapshot
- github.com/wevm/viem/releases/tag/viem@2.58.4: Current patch updates withdrawals for OP Stack Upgrade 22
- github.com/sponsors/wevm: Sponsorship supports two listed core maintainers and outside contributions
- viem.sh/docs/typescript: Type changes can ship in patch releases
Used widely6.8
How many use it, and is that growing?
Claude Opus 5.5: 8.0, likely 7.0 to 8.5
viem had 40M downloads in the last 4 weeks, up 4.5x from 8.9M a year ago. That is above the 4.1 median and about twice ethers' current 19.5M. Part of that count comes from Wagmi, wallet SDKs and Hardhat installing it, so direct choices are fewer. The low ecosyste.ms count (2,412 repos against ethers' 93k) reflects older counting rather than current choices. Even so, viem is clearly gaining share among new EVM projects.
- npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 40.0M vs 8.9M, ratio 4.5 against a 4.1 median
- peers ethers.js downloads: ethers at 19.5M, ratio 2.2
- dependents: 2,412 repos and 623 packages, far below ethers' 93k repos
- peers Wagmi downloads: Wagmi's 6.5M downloads install viem as a dependency
GPT-6.2 Sol: 5.6, likely 4.2 to 6.9
Four-week installs rose from 8.9 million to 40.0 million, a 4.50-fold increase that modestly exceeds the 4.10-fold catalog baseline and outpaces ethers.js. CI and downstream tools such as Wagmi inflate installs as a measure of direct choice. Ecosyste.ms found 2,412 dependent repositories and 623 packages, well below ethers.js in repository count. The Solidity survey shows substantial adoption, while incomplete repository coverage and sparse social activity leave its direct reach uncertain.
- npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio, peers: viem grew 4.50-fold, the median was 4.10-fold, and ethers.js grew 2.20-fold
- dependents, peers: 2,412 indexed viem repositories versus 93,211 for ethers.js
- github stars, bluesky posts, hackerNews stories: 3,633 stars, two qualifying Bluesky posts, and zero matched Hacker News stories
- wagmi.sh: Wagmi performs blockchain operations through viem
- soliditylang.org/survey-2025: 39% of SDK respondents use viem and 70% use ethers.js
Vouched for8.2
Who stands behind it being good?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
Nomic Foundation chose viem as the default for Hardhat 3, Wagmi is built on it, Paradigm backs it, and MetaMask and many independent comparisons discuss it. Developer write-ups say they would not start a new project on ethers v5. No developer survey ranks it, and many comparison pages are vendor SEO, so the range stays open.
- hardhat.org/docs/plugins/hardhat-toolbox-viem: Hardhat 3 recommends a viem-based toolbox
- paradigm.xyz/oss/viem: Listed in Paradigm's open-source portfolio
- metamask.com/news/viem-vs-ethers-js-a-detailed-comparison-for-web3-developers: MetaMask comparison article
- 3h4x.github.io/tech/2025/02/18/viem-over-ethers: Independent developer prefers viem for new work
GPT-6.2 Sol: 8.3, likely 7.2 to 9.3
Uniswap lists viem as a direct dependency of its production web app, and Hardhat 3 offers a first-party viem toolbox. Coinbase documents viem for its EVM wallet workflows. The Solidity survey confirms substantial use among respondents, while satisfaction, retention, and performance on the latest patch have less direct evidence.
- github.com/Uniswap/interface/blob/main/apps/web/package.json: Uniswap's web app declares viem as a direct dependency
- hardhat.org/docs/plugins/official-plugins: Official viem toolbox, assertions, and deployment integration
- docs.cdp.coinbase.com/wallet-api/docs/quickstart: Coinbase's TypeScript EVM wallet flow uses viem to confirm transactions
- soliditylang.org/survey-2025: 39% of 871 SDK respondents selected viem in a multiple-choice question
Safe8.1
How safe is it to depend on?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
OSV has no advisories for viem, it has 8 dependencies, and it is MIT on npm. Its crypto comes from the audited noble and scure libraries. There is no Scorecard result, and the GitHub licence field is empty. For a library that signs transactions, any compromise of its many automated releases would be severe, so the score stays below the top.
- advisories total: 0 advisories
- npm dependencies: 8 direct dependencies
- npm license: MIT
- scorecard: No OpenSSF Scorecard data
- viem dependency tree: Relies on @noble/curves, @noble/hashes and @scure, which are audited
GPT-6.2 Sol: 8.2, likely 7.0 to 9.2
Viem uses the permissive MIT license, has eight direct dependencies, and has zero tracked advisories in the bundle. The stable release workflow runs verification and uses npm trusted publishing, and the security policy covers 2.x. The workflow leaves required release-environment review pending. The missing OpenSSF Scorecard and unclear number of people with release authority limit confidence in the remaining controls.
- npm license, npm dependencies, advisories, scorecard: MIT, eight direct dependencies, zero tracked advisories, and no Scorecard result
- github.com/wevm/viem/blob/main/LICENSE: Repository contains the MIT license
- raw.githubusercontent.com/wevm/viem/refs/tags/viem%402.58.4/.github/workflows/changesets.yml: Stable workflow gates releases on verification, uses npm trusted publishing, and lists required reviewers as pending
- github.com/wevm/viem/security: Private vulnerability reporting and a patch policy for 2.x
Good
- Its types are inferred from the ABI, so wrong function names, argument types or read/write misuse fail at compile time.
- Bundles are small and tree-shake well, and it uses native bigint instead of BigNumber wrappers.
- It is very actively maintained: 1,225 commits and 118 releases last year, with only 1 open issue.
- Hardhat 3's recommended toolbox and Wagmi both build on it, so it is the shared base of much of the EVM toolchain.
Bad
- It only covers EVM chains, so Solana or Bitcoin need another library.
- Code is more verbose than ethers, and some conveniences such as built-in ENS helpers and contract objects are thinner.
- The coming v3 renames and regroups most of the API (clients, actions, utilities, errors), so upgrading will take real work.
- Errors are typed but deeply nested, and v2 minor releases have sometimes included breaking changes to chain-specific features.
The numbers
- npm downloads, 4 weeks
- 40M ×4.5 in a year
- GitHub stars
- 3.6k
- Commits, 12 months
- 1.2k
- npm version
- 2.58.4 Nov 2026
- Versions, 12 months
- 118
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- None
- Licence
- MIT
Read on 21 November 2026 from GitHub (wevm/viem), npm (viem), OSV and the OpenSSF Scorecard.
Blockchain libraries
- 8.9viem
- 8.2Wagmi
- 8.0Solana Kit
- 7.1Ox
- 6.9bitcoinjs-lib
- 6.7Hardhat
- 6.6ethers.js
- 6.3Solana web3.js
- 5.6thirdweb
- 1.7web3.js