# serializeValidationConfig

> Overview of the serializeValidationConfig function

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

```ts
function serializeValidationConfig(config): `0x${string}`;
```

Defined in: [packages/smart-accounts/src/ma-v2/utils/hooks.ts:30](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/smart-accounts/src/ma-v2/utils/hooks.ts#L30)

Serializes a validation configuration into a hexadecimal string representation. This involves converting boolean flags into bitwise representation and combining them with serialized module entity data.

## Example

```ts
import { serializeValidationConfig } from "@alchemy/smart-accounts";
import { Address } from "viem";

const moduleAddress: Address = "0x1234";
const entityId: number = 1234;
const isGlobal: boolean = true;
const isSignatureValidation: boolean = false;
const isUserOpValidation: boolean = true;

const validationConfigHex = serializeValidationConfig({
  moduleAddress,
  entityId,
  isGlobal,
  isSignatureValidation,
  isUserOpValidation,
});
```

## Parameters

<table>
  <thead>
    <tr>
      <th align="left">Parameter</th>
      <th align="left">Type</th>
      <th align="left">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `config`
      </td>

      <td>
        [`ValidationConfig`](../type-aliases/ValidationConfig)
      </td>

      <td>
        The validation configuration object containing details to serialize
      </td>
    </tr>

  </tbody>
</table>

## Returns

`` `0x${string}` ``

A hexadecimal string representing the serialized configuration