Architecture
Winternitz is a monorepo with one onchain layer, one shared TypeScript SDK, and three interfaces built on top of it.
Interfaces
Web wallet
web/, Next.js
Chrome extension
extension/, Manifest V3
CLI
cli/, Node.js
↓ all built on ↓
SDK in sdk/ (TypeScript and viem)
WOTS
key generation, signing, verification
Wallet client
key journal and rotation guard
Submitters
bundler or self relay
↓ talks to ↓
Onchain in contracts/ (Solidity)
QuantumSafeAccount
ERC-4337 account
WOTS.sol
signature verifier
Account factory
CREATE2 clones
Repository layout#
winternitz/
├── contracts/ Solidity + Foundry: WOTS verifier, account, factory, tests, deploy script
├── sdk/ TypeScript: WOTS, wallet client, key journal, submitters, networks, tokens
├── cli/ Command-line wallet (Node 24 runs the TypeScript directly)
├── extension/ Chrome extension, Manifest V3 (esbuild + Tailwind)
├── web/ Next.js: landing page, web wallet (/wallet), docs (/docs)
└── docs/ Design notes and benchmark report
| Choice | Used for |
|---|---|
| Solidity 0.8.28, Foundry | Contracts, unit, fuzz and differential tests |
| TypeScript, viem | SDK, CLI, extension and web wallet |
| ERC-4337, EntryPoint v0.7 | Account standard (canonical 0x0000000071727De22E5E9d8BAf0edAc6f37da032) |
| Alto (local), Alchemy (Robinhood Chain) | Bundlers |
| Robinhood Chain, Ethereum Sepolia, Base Sepolia, Arbitrum Sepolia | Networks |
| Next.js 16, React 19 | Web |
Onchain#
WOTS.solis a library that walks each hash chain from the signature to its end and hashes the 67 results into a public key hash. It is written in assembly to keep verification around 80k gas.QuantumSafeAccountis the ERC-4337 account. It stores the main and recovery key hashes and indices, validates signatures withWOTS.sol, rotates during successful validation, and executes single or batched calls. The used key stays retired if execution later reverts. Only the EntryPoint (or the account itself) can make it act.QuantumSafeAccountFactorydeploys accounts as minimal proxies (EIP-1167) at CREATE2 addresses derived from the initial main and recovery key hashes and the deployment inputs. The address is known before account deployment; sending still requires the factory to be deployed on that network.
Offchain#
- WOTS module: key derivation from the seed, signing, verification; byte for byte identical to the Solidity verifier (checked by differential tests).
- Wallet client: builds UserOperations, checks onchain key state, and keeps a write-ahead journal that refuses conflicting signatures on that device. Journals are not shared between devices, so concurrent signing from multiple devices is unsafe.
- Submitters: send through an ERC-4337 bundler, or "self relay" by calling
handleOpsfrom an ordinary account that is refunded by the EntryPoint. - Networks and tokens: chain registry (Robinhood Chain testnet and mainnet, Sepolia, local) and the verified token lists.
One transaction, end to end#
Your device
derives one time key #n from the seed
Bundler / relayer
ERC-4337
EntryPoint v0.7
canonical
Your account
checks key #n, then stores #n+1
- The interface asks the wallet client to send a set of calls.
- The client reads
keyIndexandpublicKeyHashfrom the account (or uses key #0 if it isn't deployed yet). - It builds the UserOperation, gets a gas estimate, and on Arbitrum chains adds the L1 data fee.
- It records the operation in the journal, then signs with key #n while committing to key #n+1.
- The bundler or relayer submits it; the EntryPoint calls
validateUserOp, which verifies and rotates the key; then the calls execute. - The client confirms the new key index onchain and marks the journal entry as confirmed.
Web-only privacy integration#
The web wallet's Privacy flow uses an isolated RAILGUN worker for Ethereum ETH/WETH shielding, private transfers and withdrawals. The account, encrypted backup, balance scan and pending-operation journal are separate from the WOTS signing account. Balance synchronization and backup acknowledgement are required before preparation; the pending payment is saved before submission. Full-sync validation, funded public-network acceptance and independent audit remain pending.
This layer is separate from the core Winternitz SDK and Chrome extension. The earlier Gloam note-based implementation remains in source and archived documentation, but is no longer offered as a second dashboard workspace. Existing encrypted notes are not converted into the new privacy account.
Robinhood Chain specifics#
Robinhood Chain is an Arbitrum Orbit chain. The contracts need no changes, but three things are handled offchain:
- L1 data fee. Arbitrum charges the cost of posting data to Ethereum as extra gas on the bundle. The SDK queries Arbitrum's NodeInterface for it and includes it in
preVerificationGas. - Incompressible estimate. The fee is based on compressed data, and a real WOTS signature doesn't compress. Gas estimates therefore use a pseudorandom placeholder signature; a constant one would underestimate by roughly 89k gas.
- Bundler pricing. Alchemy's bundler requires a minimum priority fee, which the SDK reads with
rundler_maxPriorityFeePerGas.