Build with ERC-5564
What a wallet or app needs to receive and send stealth payments safely, with the pieces you can reuse.
Stealth payments are an open standard. Any wallet can add them, and every wallet that does makes the crowd bigger for everyone. This is the short list of what it takes, and what we learned doing it.
The pieces
| Piece | Use |
|---|---|
| ScopeLift stealth-address SDK | Generation, checking, key derivation, metadata helpers (TypeScript) |
| @noble/curves | secp256k1 if you write your own |
| Test vectors | Sixteen scheme 1 vectors plus key derivation, checked against the SDK |
| Announcer and registry | The two shared contracts and the metadata layout |
Sending
- Get the receiver's meta-address: pasted, or from the ERC-6538 registry for an address or ENS name.
- Generate the one-time address and the ephemeral key.
- Announce first, then pay. If the payment fails after the announcement, nothing is lost. The other order can leave funds where the receiver cannot find them.
- Put the view tag in the first byte of the metadata. Use the standard layout so every client can show what was paid.
Receiving
- Derive keys from one signature, and check determinism: sign twice and compare. Some wallets cannot recreate the same signature, and keys they produce are keys their users will lose.
- Scan on the device. The view tag removes 255 of 256 strangers' payments before any curve multiplication that matters.
- Treat announcements as claims to verify. Anyone can announce anything.
Withdrawing: the part that decides privacy
Our leak study found that the math holds and the habits leak. If you ship one thing, ship these defaults:
- never offer the wallet the keys come from (or the registrant) as a destination (H1);
- no sweep-all: one payment, one path, one time (H3);
- network-standard fees only (H4);
- warn on round trips to the payer (H2) and on fast withdrawals.
Our client implements these as plain functions you can copy; see Receiving.
Questions
Write to devs@ephemeral.money. We answer builders first.
Stealth Buy on Uniswap v4
Buy any token on a Uniswap v4 pool straight into an ERC-5564 stealth address, with gas included and an announcement the receiver's wallet can find.
4 in 10: the leak study
We re-ran a 2023 study on every Umbra and ERC-5564 payment ever made on Ethereum. 38.97% of withdrawn stealth addresses were traced to their owner.