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.
|
|
4 months ago | |
|---|---|---|
| .. | ||
| _cjs | 4 months ago | |
| _esm | 4 months ago | |
| _types | 4 months ago | |
| account-abstraction | 4 months ago | |
| accounts | 4 months ago | |
| actions | 4 months ago | |
| celo | 4 months ago | |
| chains | 4 months ago | |
| clients | 4 months ago | |
| constants | 4 months ago | |
| ens | 4 months ago | |
| errors | 4 months ago | |
| experimental | 4 months ago | |
| linea | 4 months ago | |
| node | 4 months ago | |
| nonce | 4 months ago | |
| op-stack | 4 months ago | |
| siwe | 4 months ago | |
| trusted-setups | 4 months ago | |
| types | 4 months ago | |
| utils | 4 months ago | |
| window | 4 months ago | |
| zksync | 4 months ago | |
| CHANGELOG.md | 4 months ago | |
| LICENSE | 4 months ago | |
| README.md | 4 months ago | |
| index.ts | 4 months ago | |
| package.json | 4 months ago | |
README.md
TypeScript Interface for Ethereum
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:
- Follow @wevm_dev, @_jxom, and @awkweb on Twitter for project updates
- Join the discussions on GitHub
- Share your project/organization that uses viem
Support
Sponsors
Contributing
If you're interested in contributing, please read the contributing docs before submitting a pull request.
Authors
License
MIT License