ERCs

ERC-5564 — Stealth Addresses

eips.ethereum.org/EIPS/eip-5564

Generate one-time receiving addresses from a recipient’s public scheme key. The sender derives a fresh address; the recipient detects incoming payments by scanning for announcement events.

import { scheme_1 } from "@ethernauta/erc/5564";
import { announce } from "@ethernauta/erc/5564/announcer";

Surface

Scheme 1 (the SECP256K1 curve scheme)

@ethernauta/erc/5564/scheme_1 provides the cryptographic primitives:

  • generate_stealth_address({ scheme_id, stealth_meta_address }) — sender derives a stealth address + ephemeral pubkey + view tag.
  • check_stealth_address({ scheme_id, stealth_address, ephemeral_pub_key, viewing_key, spending_pub_key, metadata }) — recipient checks an announcement.
  • compute_stealth_key({ ephemeral_pub_key, viewing_key, spending_key }) — recipient derives the stealth private key.

Announcer (@ethernauta/erc/5564/announcer)

MethodShapePurpose
announce({ scheme_id, stealth_address, ephemeral_pub_key, metadata })Signable<Hash32>Emit an Announcement event.

The announcement contract emits an event the recipient scans for; the recipient then derives the stealth private key for any matching announcement.

See also