Contracts
Contract Interfaces
IERC6538Registry.sol

IERC6538Registry

Interface for calling the ERC6538Registry contract to map accounts to their stealth meta-addresses. See ERC-6538 (opens in a new tab) to learn more.

Code: IERC6538Registry.sol (opens in a new tab)

Functions

registerKeys

function registerKeys(uint256 schemeId, bytes calldata stealthMetaAddress) external

Sets the caller's stealth meta-address for the given scheme ID.

Parameters:

TypeNameDescription
uint256schemeIdIdentifier corresponding to the applied stealth address scheme, e.g., 1 for secp256k1, as specified in ERC-5564 (opens in a new tab).
bytesstealthMetaAddressThe stealth meta-address to register.

registerKeysOnBehalf

function registerKeysOnBehalf(
  address registrant,
  uint256 schemeId,
  bytes memory signature,
  bytes calldata stealthMetaAddress
) external

Sets the registrant's stealth meta-address for the given scheme ID.

Parameters:

TypeNameDescription
addressregistrantAddress of the registrant.
uint256schemeIdIdentifier corresponding to the applied stealth address scheme, e.g., 1 for secp256k1, as specified in ERC-5564 (opens in a new tab).
bytessignatureA signature from the registrant authorizing the registration.
bytesstealthMetaAddressThe stealth meta-address to register.

incrementNonce

function incrementNonce() external

Increments the nonce of the sender to invalidate existing signatures.

DOMAIN_SEPARATOR

function DOMAIN_SEPARATOR() external view returns (bytes32)

Returns the domain separator used in this contract.

stealthMetaAddressOf

function stealthMetaAddressOf(address registrant, uint256 schemeId) external view returns (bytes memory)

Returns the stealth meta-address for the given registrant and schemeId.

Parameters:

TypeNameDescription
addressregistrantThe address of the registrant.
uint256schemeIdIdentifier corresponding to the applied stealth address scheme.

Return Values:

TypeDescription
bytesThe stealth meta-address.

ERC6538REGISTRY_ENTRY_TYPE_HASH

function ERC6538REGISTRY_ENTRY_TYPE_HASH() external view returns (bytes32)

Returns the EIP-712 type hash used in registerKeysOnBehalf.

Return Values:

TypeDescription
bytes32The EIP-712 type hash.

nonceOf

function nonceOf(address registrant) external view returns (uint256)

Returns the nonce of the given registrant.

Parameters:

TypeNameDescription
addressregistrantThe address of the registrant.

Return Values:

TypeDescription
uint256The nonce.

Events

StealthMetaAddressSet

event StealthMetaAddressSet(
  address indexed registrant, uint256 indexed schemeId, bytes stealthMetaAddress
);

Emitted when a registrant updates their stealth meta-address.

Parameters:

TypeNameDescription
addressregistrantThe address of the registrant of the stealth meta-address.
uint256schemeIdIdentifier corresponding to the applied stealth address scheme, e.g., 1 for secp256k1, as specified in ERC-5564 (opens in a new tab).
bytesstealthMetaAddressThe stealth meta-address. Based on ERC-5564 (opens in a new tab).

NonceIncremented

event NonceIncremented(address indexed registrant, uint256 newNonce);

Emitted when a registrant increments their nonce.

Parameters:

TypeNameDescription
addressregistrantThe account that incremented the nonce.
uint256newNonceThe new nonce value.

Errors

ERC6538Registry__InvalidSignature

error ERC6538Registry__InvalidSignature();

Emitted when an invalid signature is provided to registerKeysOnBehalf.