serializeValidationConfig
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.
Import
import { serializeValidationConfig } from "@account-kit/smart-contracts";
Usage
import { serializeValidationConfig } from "@account-kit/smart-contracts";
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
config
ValidationConfig
The validation configuration object containing details to serialize
Returns
Hex
A hexadecimal string representing the serialized configuration