getAddGuardianAction
Generate the transaction data needed to add a new guardian to an account.
Usage
const action = await getAddGuardianAction({
client: publicClient,
guardian: '0x123...',
weight: 1n
})Parameters
client
- Type:
PublicClient
The public client instance used to interact with the blockchain.
guardian
The address of the guardian to add. Cannot be zero address or the account itself.
weight
- Type:
bigint
The voting weight to assign to the guardian. Must be greater than 0.
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