ethernauta

Guide Ethernauta contributors in designing wallet-safe Ethereum library code.

1|Updated Jul 22, 2025
One-click install
npx skills add https://github.com/niconiahi/ethernauta --skill ethernauta
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ethernauta
Source: https://github.com/niconiahi/ethernauta/tree/main/.claude/skills/ethernauta
Command: npx skills add https://github.com/niconiahi/ethernauta --skill ethernauta

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents implementation drift by aligning new code with Ethernauta’s package boundaries, resolver method shapes, and schema-validated invariants for safe Ethereum JSON-RPC and wallet signing.

Core Features & Use Cases

  • Package map & dependency direction: keeps wallet and eip correctly layered on top of transport, avoiding circular dependencies.
  • Method-shape mental model: distinguishes Readable<T> (reads), Writable<T> (writes), and Signable<T> (wallet interaction) so you implement factories instead of executing early.
  • Transport dispatch rules: standardizes fallback behavior across multiple transports using Promise.any() instead of Promise.all() or sequential logic.
  • Security and correctness invariants: enforces Valibot validation on every boundary, CAIP-2 chain IDs, strict naming conventions, and safer error handling.
  • Extension messaging protocol: defines how signer-provider split and postMessage correlation IDs work for wallet requests.

Quick Start

Ask an AI assistant to help you add a new eth_* method by following Ethernauta’s factory pattern, validating parameters and results with Valibot schemas, dispatching via Promise.any across transports, and exporting it through the correct package index paths.

Frequently Asked Questions about ethernauta

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

FAQPage Schema
How do I structure TypeScript Ethereum JSON-RPC methods to prevent implementation drift?

To structure Ethereum JSON-RPC methods safely, use typed resolver shapes that distinguish readable, writable, and signable operations, enforcing factories over early execution. This prevents implementation drift by aligning new code with strict package boundaries and schema-validated invariants.

What is the best way to handle multi-transport fallback for Ethereum JSON-RPC requests?

The best way to handle multi-transport fallback for Ethereum JSON-RPC requests is using Promise.any() for transport dispatch. This standardizes fallback behavior across multiple transports, replacing sequential logic or Promise.all() to ensure safer and more reliable request routing.

How does CAIP-2 chain-id handling work for wallet signing flows?

CAIP-2 chain-id handling for wallet signing flows works by enforcing strict chain identifiers across signer-provider splits. It ensures correct network targeting during wallet interactions, using postMessage correlation IDs to securely route and validate extension messaging protocols.

Why use Valibot validation boundaries in an Ethereum library?

Valibot validation boundaries are used in an Ethereum library to enforce security and correctness invariants on every data boundary. Applying Valibot ensures that parameters and results are strictly schema-validated, preventing invalid data from entering wallet-side signing or JSON-RPC flows.

How do I add a new eth_* method following Ethernauta's factory pattern?

To add a new eth_* method following Ethernauta's factory pattern, implement the method using typed resolver shapes, validate parameters and results with Valibot schemas, dispatch via Promise.any across transports, and export it through the correct package index paths.

Can I wire wallet-side signing flows without strict package layering?

Wiring wallet-side signing flows without strict package layering risks circular dependencies and security leaks. Correct implementation requires keeping wallet and EIP modules layered on top of transport utilities, ensuring signer-provider splits and strict naming conventions are maintained.