# serializeModuleEntity

> Overview of the serializeModuleEntity 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 serializeModuleEntity(config): `0x${string}`;
```

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

Serializes a module entity into a hexadecimal format by concatenating the module address and entity ID.

## Example

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

const moduleAddress: Address = "0x1234";
const entityId: number = 1234;

const moduleEntityHex = serializeModuleEntity({
  moduleAddress,
  entityId,
});
```

## 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>
        [`ModuleEntity`](../type-aliases/ModuleEntity)
      </td>

      <td>
        The module entity configuration containing the module address and entity ID
      </td>
    </tr>

  </tbody>
</table>

## Returns

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

A hexadecimal string representation of the serialized module entity