SDK
Actions
prepareAnnounce

prepareAnnounce

Prepares the payload for announcing a stealth address from the ERC-5564 contract.

This function simulates the contract call to generate the necessary transaction payload without sending a transaction.

The resulting payload can then be used for sending a transaction.

Usage

import { stealthClient } from "./client";
 
const payload = await stealthClient.prepareAnnounce({
  account,
  args: {
    schemeId,
    stealthAddress,
    ephemeralPublicKey,
    metadata
  },
  ERC5564Address
});
 
/* { account, data, to, value } */

Return Value

  • Type: PreparePayload

    The prepared payload to send a transaction to the ERC-5564 contract and call announce on the contract.

Parameters

account

  • Type: EthAddress

    The address of the account making the announcement.

const payload = await prepareAnnounce({
  account,
  args: {
    schemeId,
    stealthAddress,
    ephemeralPublicKey,
    metadata,
  },
  ERC5564Address,
});

args

  • Type: PrepareAnnounceArgs

    The details of the announcement, including the scheme ID, stealth address, ephemeral public key, and metadata.

const payload = await prepareAnnounce({
  account,
  args: {
    schemeId,
    stealthAddress,
    ephemeralPublicKey,
    metadata,
  },
  ERC5564Address,
});

ERC5564Address

  • Type: EthAddress

    The address of the ERC5564 Announcer contract.

const payload = await prepareAnnounce({
  account,
  args: {
    schemeId,
    stealthAddress,
    ephemeralPublicKey,
    metadata,
  },
  ERC5564Address,
});