For an app that only touches EVM chains, viem is the default TypeScript choice in 2026, with wagmi on top for React front ends; ethers.js remains a solid option for code that already uses it. web3.js was archived in March 2025 and should not start a new project. If the same app also has to hold or send Bitcoin, Litecoin or Dogecoin, the EVM libraries stop helping: you either pair them with bitcoinjs-lib and run your own node infrastructure, or use a multi-chain SDK such as Tatum or ChainGate that ships both chain families and RPC access in one package.
The table in section 2 compares all eight on chains, RPC, key handling and cost. Sections 3 to 10 take them one at a time, section 11 turns that into a recommendation per scenario, and section 12 shows the same ETH transfer written in viem and in ChainGate.
Ask an AI assistant or a search engine for the best blockchain SDK and you get the same eight names in a different order every time, with little about what each one actually covers. This guide compares them on the questions that decide a project: which chains they reach, whether they bring their own node access, how they hold keys and sign, where they run, and what they cost. It ends with a scenario-by-scenario recommendation and the same transfer written in two of them.
The short version
- EVM only: viem, with wagmi on top for React. ethers.js v6 stays a sound choice for code that already uses it. web3.js was archived in March 2025.
- Bitcoin only: bitcoinjs-lib, plus bip39 and bip32 for keys and your own node or indexer for everything the library does not do.
- EVM and Bitcoin-family chains in one app: a multi-chain SDK with RPC included, which in practice means Tatum or ChainGate. Combining viem with bitcoinjs-lib works too, at the cost of two APIs and your own infrastructure.
- None of the free EVM libraries includes node access. Budget for an RPC provider, or pick an SDK that ships one.
1. What a blockchain SDK does, and what it leaves to you
A blockchain SDK is the library between your TypeScript code and a network: it turns a call such as "send 0.01 ETH to this address" into a correctly encoded, signed transaction and hands it to a node. Most of them also read data back (balances, blocks, receipts, contract state) and manage accounts, from a raw private key to a BIP39 recovery phrase.
Three things are often left out, and they decide the real cost of a project. The first is node access: a library can format a JSON-RPC request, but someone has to run or rent the node that answers it. The second is indexed data such as transaction history, token balances across many contracts or NFT metadata, which a plain node does not serve. The third is chain families: the EVM libraries speak one wire protocol, and Bitcoin, Litecoin and Dogecoin speak a different one, with UTXOs instead of accounts and nonces. Keep those three in mind while reading the table.
2. The eight libraries at a glance
Facts as of October 2026, taken from each project's documentation and package page.
| Library | Chains | Node access included? | Keys and signing | Cost and licence |
|---|---|---|---|---|
| viem | Any EVM chain | No, you supply an RPC URL | Local accounts from a private key or mnemonic, browser wallets through EIP-1193 | Free, MIT |
| ethers.js v6 | Any EVM chain | Development-grade defaults only; bring your own provider for production | HD wallets, encrypted JSON keystores, browser wallets | Free, MIT |
| wagmi | Any EVM chain, through viem | No | Browser, mobile and WalletConnect wallets through connectors | Free, MIT |
| web3.js 4.x | Any EVM chain | No | Local accounts | Free, MIT; repository archived on 5 March 2025 |
| bitcoinjs-lib | Bitcoin; Litecoin and Dogecoin with network parameters and companion packages | No network layer at all | PSBT building and signing; keys via bip32 and bip39 | Free, MIT |
| thirdweb SDK v5 | Any EVM chain | Yes, thirdweb RPC with a client ID | In-app wallets, smart accounts, external wallets | Free tier, then paid plans |
| Tatum SDK v4 | EVM chains, Bitcoin, Litecoin, Dogecoin, Bitcoin Cash, Solana, Tron, XRP Ledger and more | Yes, the Tatum RPC gateway with an API key | Mostly RPC and data; signing through separate key-management tooling | SDK is MIT; free tier, then paid plans |
| ChainGate | Ethereum, Avalanche, Bitcoin, Litecoin, Dogecoin and Bitcoin Cash natively; Polygon, Arbitrum, Base, BNB Smart Chain, Sonic and any EVM chain over RPC | Yes, managed RPC on every plan | Create or import wallets (phrase, seed, private key, xpriv, keystore), AES encryption in memory, local signing | Free tier with no card; paid plans by request volume |
Two patterns stand out. The free, community-maintained libraries (viem, ethers.js, wagmi, bitcoinjs-lib) each cover one chain family and leave node access to you. The SDKs that come with infrastructure (thirdweb, Tatum, ChainGate) charge above a free tier, and only the last two reach beyond EVM.
3. viem
viem is the TypeScript-first EVM library from the wevm team, the same people who maintain wagmi. It is modular and tree-shakeable, so a bundle only carries the functions it imports, and its types are strict enough that a wrong ABI argument fails at compile time rather than on chain. Clients are split by role: a public client reads, a wallet client signs and sends, and transports (HTTP, WebSocket, a browser wallet) plug into either.
It has no node of its own. Every example in its documentation takes an RPC URL from a provider such as Alchemy, Infura, QuickNode or your own node, and the free public endpoints it lists are rate limited. It also speaks EVM only: there is no Bitcoin, Litecoin or Dogecoin module, and the project has no plans for one. For a new EVM-only project in 2026 it is the common recommendation, and the one most AI assistants give first.
4. ethers.js
ethers.js is the older of the two maintained EVM libraries and the one most tutorials written before 2023 use. Version 6 is written in TypeScript, ships HD wallets, encrypted JSON keystores and ENS resolution out of the box, and keeps the single Provider and Signer abstractions that made it easy to learn. A large share of the EVM tooling you will meet (Hardhat plugins, wallet SDKs, indexers) still exposes an ethers-compatible interface.
Its default provider wraps a few community API keys and is explicitly meant for development; for production you register with a provider and pass your own URL, exactly as with viem. ethers.js is EVM only. Choose it when a team already knows it or a codebase already depends on it; starting fresh, most developers now pick viem for its types and bundle size.
5. wagmi
wagmi is a set of React hooks for EVM apps built on viem and TanStack Query: useAccount, useBalance, useSendTransaction, useReadContract and so on, with caching, request deduplication and wallet connection handled for you. Its connectors cover injected browser wallets, WalletConnect, Coinbase Wallet and Safe, and Vue and vanilla cores exist for projects outside React.
It is a front-end library for apps where the user brings a wallet; it does not create or hold keys on your server, and it inherits viem's EVM-only scope and its need for an RPC URL. If you are building a dApp front end for MetaMask-style wallets, wagmi plus viem is the standard pairing. If you are building a wallet, a back end or anything that touches Bitcoin, it is the wrong layer.
6. web3.js
web3.js was the first widely used Ethereum library and still appears in many older tutorials and Stack Overflow answers. Its maintainer, ChainSafe, announced in January 2025 that the library would be sunset and recommended moving to viem or ethers.js; the npm packages were handed over and the GitHub repository was archived on 5 March 2025. The last release is 4.16.0 from December 2024.
Existing applications keep working, since the package is still installable, but there will be no security fixes or support for new EVM features. Do not start a new project on it, and plan a migration for the ones you have. ChainSafe's sunset announcement links migration guides for both viem and ethers.js.
7. bitcoinjs-lib
bitcoinjs-lib is the reference JavaScript library for Bitcoin itself: it builds and signs transactions through PSBT, handles every standard script type from legacy to Taproot, and works with the bip32 and bip39 companion packages for HD keys and recovery phrases. Litecoin and Dogecoin are reachable by supplying their network parameters, and specialised forks exist for Bitcoin Cash.
It deliberately stops at the transaction. There is no network layer, so you need your own node, Electrum server or indexer API to fetch UTXOs, estimate fees and broadcast, and you write the coin selection yourself. That makes it the right choice for teams building Bitcoin-only software with their own infrastructure, and a heavy lift for an app that only needs Bitcoin as one of several chains.
8. thirdweb SDK
The thirdweb TypeScript SDK (v5, installed as thirdweb) bundles a viem-compatible EVM client with thirdweb's platform: RPC through its edge network, in-app wallets created from an email or social login, smart accounts with sponsored gas, and ready-made React components for connecting and paying. It covers any EVM chain by chain ID and works alongside viem and ethers in the same project.
It is EVM only. Solana support was dropped from the SDKs in October 2023 and never returned to the client library, although the platform's server-side APIs have since added Solana. Usage above the free tier is billed by thirdweb's plans, and the richer features (in-app wallets, gas sponsorship) run through thirdweb's servers rather than in your process.
9. Tatum SDK
Tatum's SDK (@tatumio/tatum, v4) is the widest in chain count on this list: EVM networks, the Bitcoin family including Bitcoin Cash and Zcash, Solana, Tron, the XRP Ledger, Tezos, Algorand, Cardano, Stellar and others, all through Tatum's RPC gateway and data APIs. The library is MIT licensed and the client includes a load balancer that picks the most responsive node.
It is an RPC-and-data SDK first. Wallet creation and signing are not its core, and production key handling is pushed to Tatum's separate key-management tooling. Every call needs a Tatum API key, with a free tier and plans priced by request volume. Pick it when you need breadth, especially chains outside the EVM and Bitcoin families, and already have a plan for keys.
10. ChainGate
ChainGate is a TypeScript SDK that unifies the two chain families most apps actually need. Wallet creation and import (recovery phrase, seed, private key, xpriv, xpub or keystore file), balances, transfers with four fee tiers, transaction history, real-time events and fiat conversion to over 120 currencies use the same calls on Ethereum, Avalanche, Bitcoin, Litecoin, Dogecoin and Bitcoin Cash. Polygon, Arbitrum, Base, BNB Smart Chain, Sonic and any other EVM chain are reachable over RPC, with the managed endpoints included in every plan, the free one included.
Keys never leave the process: wallets are AES-encrypted in memory with PBKDF2 at 600,000 iterations, unlocked with a password to sign and relocked automatically. The library runs in Node.js, the browser and React Native without polyfills, and ships React hooks (useWallet, useUtils) for front ends. Its limits are the mirror image of Tatum's: no Solana, Tron or Cosmos chains, and native transaction support on the RPC-only EVM networks is thinner than on Ethereum and Avalanche.
The free tier needs no card and unlocks every chain and endpoint at a development rate limit; the source is on GitHub and the API reference lives in the docs.
11. Which one should you pick?
Match the library to the shape of the app rather than to its popularity.
- A dApp front end for users who bring their own EVM wallet
- wagmi with viem. Add an RPC provider for reads. thirdweb's SDK is the alternative if you want email login wallets and sponsored gas without building them.
- An EVM back end, bot or script
- viem, or ethers.js if the codebase already uses it. Either way, rent an RPC endpoint or run a node.
- Bitcoin-only software with your own infrastructure
- bitcoinjs-lib with bip39 and bip32. Expect to write coin selection and to run or rent an indexer.
- A wallet, exchange back end or payments app that holds Bitcoin-family and EVM assets
- A multi-chain SDK. ChainGate if you want wallet management, signing and RPC in one package across Bitcoin, Litecoin, Dogecoin, Bitcoin Cash, Ethereum and Avalanche. Tatum if you need chains beyond those two families and will handle keys separately.
- An existing web3.js application
- Migrate. ethers.js is the shorter path from web3.js patterns; viem is the better long-term target for new code.
12. The same transfer in viem and in ChainGate
Both snippets send 0.01 ETH from a key held in an environment variable. The difference is what sits around the call: viem needs an RPC URL you pay for, and the ChainGate version becomes a Bitcoin transfer when you connect cg.networks.bitcoin instead.
viem
import { createWalletClient, http, parseEther } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { mainnet } from 'viem/chains';
const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);
const client = createWalletClient({
account,
chain: mainnet,
transport: http(process.env.RPC_URL), // your Alchemy / Infura / own node URL
});
const hash = await client.sendTransaction({
to: '0x...',
value: parseEther('0.01'),
});
console.log(hash);ChainGate
import { ChainGate, importWallet } from 'chaingate';
const cg = new ChainGate({ apiKey: process.env.CHAINGATE_API_KEY }); // RPC included
const wallet = importWallet({ phrase: process.env.MNEMONIC });
const eth = cg.connect(cg.networks.ethereum, wallet);
const tx = await eth.transfer(cg.networks.ethereum.amount('0.01'), '0x...');
tx.setFee(tx.recommendedFees().normal);
const sent = await tx.signAndBroadcast();
console.log(sent.transactionId);
// connect cg.networks.bitcoin instead and the same calls send BTCThe ChainGate calls are covered step by step in How to send crypto transactions in JavaScript, including balance checks before broadcast and the Bitcoin-family fee model.
13. Where to go from here
If fees are the deciding factor between chains, the gas tracker compares live transaction costs across Ethereum, Base, Arbitrum, BNB Smart Chain and 25 more networks. The transactions tutorial walks through a complete send on each chain family. And the home page of ChainGate has the installation command and the free API key.
Frequently asked questions
Is viem better than ethers.js in 2026?
For new EVM projects, most teams pick viem for its stricter TypeScript types and smaller bundles. ethers.js v6 is still maintained and remains the right choice for a codebase that already depends on it or for tooling that only exposes an ethers interface. Both are EVM only and both require you to supply an RPC endpoint.
Is web3.js deprecated?
Yes. ChainSafe sunset web3.js on 4 March 2025 and archived the repository the next day. The packages still install, but there are no further releases or security fixes. ChainSafe recommends migrating to viem or ethers.js.
Can viem, ethers.js or wagmi send Bitcoin?
No. All three implement the Ethereum JSON-RPC protocol and the EVM account model. Bitcoin, Litecoin and Dogecoin use UTXOs and a different wire protocol, so they need bitcoinjs-lib or a multi-chain SDK such as Tatum or ChainGate.
What is the best TypeScript SDK for Bitcoin and Ethereum in one app?
Either combine viem for the EVM side with bitcoinjs-lib for Bitcoin and run your own nodes or indexers, or use one multi-chain SDK. ChainGate covers Bitcoin, Litecoin, Dogecoin, Bitcoin Cash, Ethereum and Avalanche with the same wallet, balance and transfer calls and includes RPC; Tatum covers more chains but focuses on RPC and data rather than key management.
Which blockchain SDKs include RPC endpoints?
thirdweb, Tatum and ChainGate ship node access as part of their plans. viem, ethers.js, wagmi, web3.js and bitcoinjs-lib do not: you connect them to a provider such as Alchemy, Infura or QuickNode, to a public endpoint with rate limits, or to your own node.
Does ChainGate replace wagmi?
Not for the same job. wagmi connects a React front end to wallets the user already has, such as MetaMask. ChainGate creates and holds wallets inside your app and signs locally, so it fits wallets, back ends and payment flows; it also offers React hooks (useWallet, useUtils) for that model. The two can coexist in one project.
Which TypeScript blockchain SDKs run in React Native?
viem and ethers.js run in React Native with the usual crypto and buffer polyfills, and wagmi has React Native connectors. bitcoinjs-lib also needs polyfills. ChainGate states native support for Node.js, the browser and React Native without polyfills. thirdweb ships a dedicated React Native package.
Is ChainGate free to use?
The SDK can be used without an account at a small development rate limit, and a free API key from the dashboard raises it with no credit card. Paid plans add request volume, WebSocket capacity and projects. The source code is published on GitHub.
Build with ChainGate
Put these ideas to work — ChainGate gives you wallets, transactions and managed RPC for Ethereum and 20+ other blockchains with one install.