Tooling
Module SDK
Modules
computeEmailAuthAddress

⚠️ Deprecation Notice

ModuleSDK was developed by Rhinestone and is no longer actively supported. For new projects, we recommend using the Rhinestone SDK instead.

Rhinestone SDK Documentation (opens in a new tab)

computeEmailAuthAddress

Compute the deterministic address for an email authentication contract using CREATE2.

Usage

const emailAuthAddress = await computeEmailAuthAddress({
  client: publicClient,
  recoveredAccount: '0x123...',
  accountSalt: '0x...'
})

Parameters

client

  • Type: PublicClient

The public client instance used to interact with the blockchain.

recoveredAccount

The address of the account to be recovered.

accountSalt

A 32-byte salt value derived from the guardian's email address and account code. This ensures uniqueness for each guardian-account pair.

Returns

emailAuthAddress

  • Type: Promise<Address>

Returns the computed address where the EmailAuth contract will be deployed using CREATE2.

If the contract call fails, returns the zero address (0x0000000000000000000000000000000000000000).