prepareRegisterKeysOnBehalf
Prepares the payload for registering a stealth meta-address (keys) in the ERC-6538 registry contract on behalf of another account.
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.prepareRegisterKeysOnBehalf({
ERC6538Address,
args,
account,
});
/* { account, data, to, value } */
Return Value
-
Type:
PreparePayload
The prepared payload to send a transaction to the ERC-6538 contract and call
registerKeysOnBehalf
on the contract.
Parameters
ERC6538Address
-
Type:
EthAddress
The address of the ERC-6538 Registry contract.
const payload = await stealthClient.prepareRegisterKeysOnBehalf({
ERC6538Address,
args,
account,
});
args
-
Type:
RegisterKeysOnBehalfArgs
The arguments for registering the stealth meta address.
Includes the stealth meta address, scheme ID, the registrant's address, and the registrant's signature authorizing the registration.
const payload = await stealthClient.prepareRegisterKeysOnBehalf({
ERC6538Address,
args,
account,
});
account
-
Type:
HexString
The address that will be used to send the transaction.
const payload = await stealthClient.prepareRegisterKeysOnBehalf({
ERC6538Address,
args,
account,
});