⚠️ Deprecation Notice
ModuleSDK was developed by Rhinestone and is no longer actively supported. For new projects, we recommend using the Rhinestone SDK instead.
getAllowValidatorRecoveryAction
Generate the transaction data needed to allow a validator to perform recovery actions. This configures which validator and function selector can be used for account recovery.
Usage
const action = await getAllowValidatorRecoveryAction({
client: publicClient,
validator: '0x123...',
isInstalledContext: '0x...',
recoverySelector: '0x...'
})Parameters
client
- Type:
PublicClient
The public client instance used to interact with the blockchain.
validator
The address of the validator to authorize.
isInstalledContext
- Type:
Hex(opens in a new tab)
Additional context data that the smart account uses to verify if the module is installed.
recoverySelector
- Type:
Hex(opens in a new tab)
The 4-byte function selector that will be allowed for recovery operations by this validator.
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