> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rhinestone.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# setSubValidator

> Set a sub-validator (multi-factor)

## Import

```ts theme={null}
import { setSubValidator } from '@rhinestone/sdk/actions/mfa'
```

## Usage

```ts theme={null}
// Requires sponsorship enabled for your project.
const transaction = await account.prepareTransaction({
  destination: {
    chain,
    calls: [setSubValidator(id, validator)],
  },
  sponsored: true,
})
```

## Parameters

<ParamField path="id" type="number | `0x${string}`" required>
  Validator ID
</ParamField>

<ParamField path="validator" type="MfaFactor" required>
  Validator module
</ParamField>

<ParamField path="moduleAddress" type="`0x${string}`">
  Multi-factor module to update. Defaults to the legacy module.
  Default: `MULTI_FACTOR_VALIDATOR_ADDRESS`.
</ParamField>

## Returns

<ResponseField name="call" type="CalldataInput">
  Call to set the sub-validator
</ResponseField>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.