Skip to content
Lattice

ERC5564AnnouncerLib

Git Source

Title: ERC5564AnnouncerLib

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)

Library implementing the ERC-5564 stealth-address announcer.

Stateless apart from one ERC-165 flag — announce only emits IERC5564Announcer.Announcement.

Functions

__ERC5564Announcer_init

Initializes the ERC5564Announcer module.

Must be called inside a pre/postInitializer block. Registers IERC5564Announcer for ERC-165.

function __ERC5564Announcer_init() internal;

registerInterface

Registers support for the IERC5564Announcer interface via ERC-165.

function registerInterface() internal;

announce

Emits an IERC5564Announcer.Announcement; caller is forced to msg.sender.

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

Parameters

NameTypeDescription
schemeIduint256The stealth-address scheme id.
stealthAddressaddressThe destination stealth address.
ephemeralPubKeybytesThe sender's ephemeral public key.
metadatabytesScheme-specific metadata.