import { type Hex } from "viem"; import type { ValidationConfig, HookConfig, ModuleEntity } from "./types"; /** * 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 "@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 * }); * ``` * @param {ValidationConfig} config The validation configuration object containing details to serialize * @returns {Hex} A hexadecimal string representing the serialized configuration */ export declare function serializeValidationConfig(config: ValidationConfig): Hex; /** * Serializes a `HookConfig` object into a `Hex` format by encoding the hook type, presence of post/pre hooks, address, and entity ID. * * @example * ```ts * import { type HookType, serializeHookConfig } from "@account-kit/smart-contracts"; * import { Address } from "viem"; * * const moduleAddress: Address = "0x1234"; * const entityId: number = 1234; * const hookType: HookType = HookType.Validation; * const hasPostHooks: boolean = false; * const hasPreHooks: boolean = true; * * const hookConfigHex = serializeHookConfig({ * moduleAddress, * entityId * hookType, * hasPostHooks, * hasPreHooks * }); * ``` * * @param {HookConfig} config The hook configuration containing address, entity ID, hook type, and post/pre hook indicators * @returns {Hex} The serialized hook configuration in hexadecimal format */ export declare function serializeHookConfig(config: HookConfig): Hex; /** * Serializes a module entity into a hexadecimal format by concatenating the module address and entity ID. * * @example * ```ts * import { serializeModuleEntity } from "@account-kit/smart-contracts"; * import { Address } from "viem"; * * const moduleAddress: Address = "0x1234"; * const entityId: number = 1234; * * const moduleEntityHex = serializeModuleEntity({ * moduleAddress, * entityId * }); * ``` * * @param {ModuleEntity} config The module entity configuration containing the module address and entity ID * @returns {Hex} A hexadecimal string representation of the serialized module entity */ export declare function serializeModuleEntity(config: ModuleEntity): Hex;