viem

Interact with Ethereum using type-safe clients in TypeScript.

7|Updated Nov 27, 2025
One-click install
npx skills add https://github.com/sablier-labs/plugin-marketplace --skill viem
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: viem
Source: https://github.com/sablier-labs/plugin-marketplace/tree/main/plugins/web3/skills/viem
Command: npx skills add https://github.com/sablier-labs/plugin-marketplace --skill viem

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Viem provides a type-safe, ergonomic interface for interacting with Ethereum in TypeScript, eliminating brittle, loosely-typed code paths.

Core Features & Use Cases

  • PublicClient and WalletClient for read and write operations across chains.
  • Transport abstractions, type-safe contract interactions (read/write), and utilities (addresses, ABI).
  • Use cases include building dApps, scripts, or developer tooling that query blockchain state, send transactions, and parse/format ether.

Quick Start

Install Viem in your TypeScript project and initialize a client to perform common tasks, e.g., create a PublicClient with http transport and call readContract or getBlockNumber.

Frequently Asked Questions about viem

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I interact with Ethereum using TypeScript?

Viem provides type-safe Ethereum APIs through PublicClient and WalletClient, enabling you to query blockchain state and send transactions with full TypeScript support. Install the viem npm package and instantiate a client with http transport to start making contract calls.

Can I use Viem to read and write smart contract data?

Yes, Viem supports both readContract and writeContract operations across multiple chains. PublicClient handles read-only queries while WalletClient manages write operations, giving you type-safe contract interactions with ABI support.

What transport options does Viem support for connecting to Ethereum?

Viem abstracts transport layer details, supporting http and other connection methods to Ethereum nodes. You configure transport when initializing your client, allowing flexible connection strategies across different chain environments.

Do I need existing Ethereum knowledge to use Viem?

Viem is designed for TypeScript developers building dApps and tooling. You should be comfortable with TypeScript and have basic familiarity with Ethereum concepts like addresses and ABIs, though Viem's type safety guides you through contract interactions.

How does Viem compare to other Ethereum client libraries?

Viem prioritizes type safety and ergonomics for TypeScript, offering lightweight APIs for read and write operations. It eliminates brittle, loosely-typed code paths common in other Ethereum libraries while maintaining a minimal dependency footprint.

Can Viem format and parse ether values?

Yes, Viem includes utility functions for parsing, formatting, and converting ether values alongside address and ABI utilities. These tools streamline common blockchain data operations within your TypeScript workflows.