prepareRegisterKeys
Prepares the payload for registering a stealth meta-address (keys) in the ERC-6538 registry 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.prepareRegisterKeys({
ERC6538Address,
schemeId,
stealthMetaAddress,
account,
});
/* { account, data, to, value } */Return Value
-
Type:
PreparePayloadThe prepared payload to send a transaction to the ERC-6538 contract and call
registerKeyson the contract.
Parameters
ERC6538Address
-
Type:
EthAddressThe address of the ERC-6538 Registry contract.
const payload = await stealthClient.prepareRegisterKeys({
ERC6538Address,
schemeId,
stealthMetaAddress,
account,
});schemeId
-
Type:
bigintThe ID of the stealth address scheme.
const payload = await stealthClient.prepareRegisterKeys({
ERC6538Address,
schemeId,
stealthMetaAddress,
account,
});stealthMetaAddress
-
Type:
HexStringThe stealth meta address of the registrant.
const payload = await stealthClient.prepareRegisterKeys({
ERC6538Address,
schemeId,
stealthMetaAddress,
account,
});account
-
Type:
EthAddressThe address that will be used to send the transaction.
const payload = await stealthClient.prepareRegisterKeys({
ERC6538Address,
schemeId,
stealthMetaAddress,
account,
});