nodejs-keccak256

Hash Ethereum-related data with Keccak-256 in Node.js/TypeScript.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Maelwalser/claude-config --skill nodejs-keccak256
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nodejs-keccak256
Source: https://github.com/Maelwalser/claude-config/tree/main/skills/nodejs-keccak256
Command: npx skills add https://github.com/Maelwalser/claude-config --skill nodejs-keccak256

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ethereum hashing in Node.js often uses crypto.createHash('sha3-256'), which yields a Keccak variant incompatible with Ethereum tooling. This leads to silent mismatches when computing function selectors, event topics, and signatures.

Core Features & Use Cases

  • Keccak-256 hashing for Ethereum contexts within Node.js/TypeScript projects.
  • Compatible with popular libraries such as ethers, viem, and web3 for consistent hashes.
  • Use cases include building selectors, signing helpers, Merkle proofs, and other Ethereum data processing tasks.

Quick Start

Install and use this skill to hash Ethereum-related data with Keccak-256 in Node.js/TypeScript, ensuring compatibility with Ethereum tooling.

Frequently Asked Questions about nodejs-keccak256

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

FAQPage Schema
Why does my Keccak-256 hash in Node.js not match Ethereum tooling?

Node.js Keccak-256 hash mismatches occur because standard crypto modules use SHA3 variants incompatible with Ethereum. Using Keccak-aware libraries like ethers, viem, or web3 ensures consistent Ethereum-compatible outputs for function selectors and event topics.

How do I compute Ethereum function selectors and event topics in Node.js?

Compute Ethereum function selectors and event topics in Node.js by applying Keccak-256 hashing to your data. This requires explicit Keccak-aware libraries such as ethers, viem, or web3 to guarantee consistent results across environments.

Can I use crypto.createHash for Ethereum hashing in Node.js?

Using crypto.createHash('sha3-256') for Ethereum hashing in Node.js yields a Keccak variant incompatible with Ethereum tooling. To produce valid Ethereum-compatible outputs, you must use explicit Keccak-aware libraries like ethers, viem, or web3.

Does this Keccak-256 hashing approach work with ethers and viem?

Yes, Keccak-256 hashing for Ethereum contexts in Node.js is compatible with popular libraries like ethers, viem, and web3. This compatibility ensures consistent hashes across different environments when building selectors, signing helpers, or Merkle proofs.

What do I need to hash Ethereum data with Keccak-256 in TypeScript?

To hash Ethereum data with Keccak-256 in TypeScript, you need an explicit Keccak-aware library like ethers, viem, or web3. This setup ensures your Node.js project produces Ethereum-compatible hashes for smart contract tooling tasks.