The open-source core behind Wavect's browser-local ERC-4337 UserOperation Doctor.
It decodes and validates UserOperations, bundler JSON-RPC envelopes, packed handleOps calldata, paymaster data, EntryPoint reverts, and EIP-7702 authorization context without contacting a chain, bundler, explorer, or wallet.
- v0.6 legacy UserOperation encoding and hashing
- v0.7 PackedUserOperation encoding and hashing
- v0.8 EIP-712 hashing
- v0.9-compatible packed operations and paymaster signature suffixes
Cryptographic and ABI operations use the pinned viem dependency. Conclusions that require live chain state remain explicitly marked for external verification.
src/erc4337-core.js: decoding, normalization, validation, hashing, and export logicsrc/browser-app.js: Wavect's browser UI adaptertest/erc4337-core.test.mjs: version, hashing, packing, paymaster, revert, and EIP-7702 fixtures
The browser adapter expects the markup and localized configuration rendered by the hosted Wavect page. The core module can be imported independently.
npm ci
npm testGNU General Public License v3.0 only. See LICENSE.