JSPM

viem

0.4.0-main.20230429T085835
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1215027
  • Score
    100M100P100Q185855F
  • License MIT

TypeScript Interface for Ethereum

Package Exports

  • viem
  • viem/abi
  • viem/accounts
  • viem/chains
  • viem/contract
  • viem/ens
  • viem/ethers
  • viem/package.json
  • viem/public
  • viem/test
  • viem/utils
  • viem/wallet
  • viem/window

Readme


viem logo

TypeScript Interface for Ethereum

Version Code coverage MIT License Best of JS


Note

viem is in the Gitcoin Grants Beta Round until May 9. Click here to support development. Thank you 🙏

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
  • Test suite running against forked Ethereum network

... and a lot 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();

Community

Check out the following places for more viem-related content:

Support

Sponsors

paradigm logo
family logo context logo WalletConnect logo LooksRare logo PartyDAO logo Dynamic logo Sushi logo Stripe logo BitKeep logo Privy logo Spruce logo

Contributing

If you're interested in contributing, please read the contributing docs before submitting a pull request.

Authors

License

MIT License