import { SmartContractLib } from '../smartContractLib.js'; import { ByteString, OpcatState } from '../types/primitives.js'; /** * Library for computing the hash of a state. * @category Library * @onchain */ export declare class StateLib extends SmartContractLib { /** * Serializes the given state object into a ByteString using the library's artifact. * @template T - Type of the state object extending OpcatState * @param this - Reference to the StateLib class constructor * @param state - State object to be serialized * @returns Serialized state as ByteString * @throws Error if artifact is not loaded, library not found in artifact, or state type is undefined * @category State */ static serializeState(this: { new (...args: any[]): StateLib; }, state: T): ByteString; /** * Deserializes a state object from its ByteString representation. * * @template T - Type of the state object extending OpcatState * @param this - Reference to the StateLib class constructor * @param serializedState - ByteString containing the serialized state data * @returns The deserialized state object of type T * @throws Error if artifact is not loaded, library is not found, or state type is undefined */ static deserializeState(this: { new (...args: any[]): StateLib; }, serializedState: ByteString): T; /** * Computes the SHA-256 hash of a serialized state object. * @template T - Type extending OpcatState * @param state - The state object to hash * @returns The hash as a ByteString */ static stateHash(this: { new (...args: any[]): StateLib; }, state: T): ByteString; protected __state_lib_dummy_private_field__: ST; } //# sourceMappingURL=stateLib.d.ts.map