Skip to content
Lattice

IERC5564Announcer

Git Source

Title: IERC5564Announcer

Authors: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80), Modified from ScopeLift (https://github.com/ScopeLift/stealth-address-erc-contracts), Conforms to ERC-5564 (https://eips.ethereum.org/EIPS/eip-5564)

External interface for the ERC-5564 stealth-address announcer: a permissionless event emitter that lets a sender publish the data a stealth-payment recipient needs to detect and spend a payment, without revealing the recipient on-chain.

The announcer is stateless — announce only emits Announcement. Any account may call it; there is no access control or validation, matching the canonical ERC-5564 contract.

Functions

announce

Emits an Announcement broadcasting a stealth payment.

Permissionless and stateless; caller in the event is forced to msg.sender.

function announce(uint256 schemeId, address stealthAddress, bytes calldata ephemeralPubKey, bytes calldata metadata)
        external;

Parameters

NameTypeDescription
schemeIduint256The stealth-address scheme id (1 == SECP256k1 with view tags).
stealthAddressaddressThe destination stealth address.
ephemeralPubKeybytesThe sender's ephemeral public key.
metadatabytesScheme-specific metadata (view tag + optional transfer hints for scheme 1).

Events

Announcement

Emitted on every announcement. Indexers watch this to discover stealth payments.

event Announcement(
        uint256 indexed schemeId,
        address indexed stealthAddress,
        address indexed caller,
        bytes ephemeralPubKey,
        bytes metadata
    );

Parameters

NameTypeDescription
schemeIduint256The stealth-address scheme id (1 == SECP256k1 with view tags).
stealthAddressaddressThe destination stealth address the funds were sent to.
calleraddressThe account that emitted the announcement (msg.sender), set by the contract.
ephemeralPubKeybytesThe sender's ephemeral public key, used by the recipient to derive the shared secret.
metadatabytesScheme-specific metadata; for scheme 1, byte[0] is the view tag.