import { OpcatState, ByteString } from './types/primitives.js'; import { Artifact } from './types/artifact.js'; /** * Serializes contract state into a ByteString format. * @ignore * @param artifact - The contract artifact containing ABI definitions * @param stateType - The name of the state struct to serialize * @param state - The state object to be serialized * @returns ByteString representation of the serialized state * @throws Error if state struct is not found, has too many fields, or contains unflattened structs */ export declare function serializeState(artifact: Artifact, stateType: string, state: OpcatState): ByteString; /** * Deserializes a contract state from a byte string into a structured object. * @ignore * @template T - The type of the deserialized state object * @param artifact - The contract artifact containing ABI definitions * @param stateType - The name of the state struct type to deserialize * @param serializedState - The byte string containing serialized state data * @returns The deserialized state object of type T * @throws Error if the specified state struct is not found in the artifact * @throws AssertionError if the state hash check fails or data is incomplete */ export declare function deserializeState(artifact: Artifact, stateType: string, serializedState: ByteString): T; //# sourceMappingURL=stateSerializer.d.ts.map