⚠️ Deprecation Notice
ModuleSDK was developed by Rhinestone and is no longer actively supported. For new projects, we recommend using the Rhinestone SDK instead.
getHandleAcceptanceAction
Generate the transaction data needed to process a guardian's acceptance email and set up their email authentication.
Usage
const action = await getHandleAcceptanceAction({
client: publicClient,
emailAuthMsg: {
proof: {
accountSalt: '0x...',
emailNullifier: '0x...',
isCodeExist: true
},
commandParams: ['0x...'],
templateId: '0x...'
},
templateIdx: 0n
})Parameters
client
- Type:
PublicClient
The public client instance used to interact with the blockchain.
emailAuthMsg
- Type:
EmailAuthMsg
The email authentication message containing:
proof: Object with account salt, email nullifier, and code existence flagcommandParams: Array of command parameters from the emailtemplateId: ID of the command template used
templateIdx
- Type:
bigint
Index of the acceptance command template that matches the email message.
Returns
action
- Type:
Promise<Execution>
Returns an execution object containing:
to: Email recovery module contract addresstarget: Email recovery module contract addressvalue: Amount of native tokens to send (0)callData: Encoded function datadata: Encoded function data