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:
PreparePayload
The prepared payload to send a transaction to the ERC-6538 contract and call
registerKeys
on the contract.
Parameters
ERC6538Address
-
Type:
EthAddress
The address of the ERC-6538 Registry contract.
const payload = await stealthClient.prepareRegisterKeys({
ERC6538Address,
schemeId,
stealthMetaAddress,
account,
});
schemeId
-
Type:
bigint
The ID of the stealth address scheme.
const payload = await stealthClient.prepareRegisterKeys({
ERC6538Address,
schemeId,
stealthMetaAddress,
account,
});
stealthMetaAddress
-
Type:
HexString
The stealth meta address of the registrant.
const payload = await stealthClient.prepareRegisterKeys({
ERC6538Address,
schemeId,
stealthMetaAddress,
account,
});
account
-
Type:
EthAddress
The address that will be used to send the transaction.
const payload = await stealthClient.prepareRegisterKeys({
ERC6538Address,
schemeId,
stealthMetaAddress,
account,
});