import type CodecPort from '../../../ports/CodecPort.ts';
import type CryptoPort from '../../../ports/CryptoPort.ts';
import type { WarpState } from '../JoinReducer.ts';
import { type NodePropertyEntry } from './WarpState.ts';
import type { PropValue } from '../../types/PropValue.ts';
/**
 * State serialization and hashing for the current WARP state
 *
 * Provides visibility predicates for determining what is visible in the graph,
 * canonical state serialization for deterministic hashing, and state hash computation.
 *
 * Current state uses ORSet-based state rather than LWW registers for nodeAlive/edgeAlive.
 *
 * @module StateSerializer
 * @see WARP Spec Section 8.3 (Visibility)
 * @see WARP Spec Section 10.3 (Canonical Serialization)
 */
/**
 * Checks if a node is visible (present in the ORSet).
 */
export declare function nodeVisible(state: WarpState, nodeId: string): boolean;
/**
 * Checks if an edge is visible.
 * Edge is visible if: edge is in ORSet AND both endpoints are visible.
 */
export declare function edgeVisible(state: WarpState, edgeKey: string): boolean;
/**
 * Checks if a property is visible.
 * Property is visible if the owning node is visible.
 * Callers obtain entries from WarpState property iterators — prop existence is implied.
 */
export declare function propertyVisible(state: WarpState, entry: NodePropertyEntry): boolean;
export interface StateProjection {
    nodes: string[];
    edges: Array<{
        from: string;
        to: string;
        label: string;
    }>;
    props: Array<{
        node: string;
        key: string;
        value: PropValue;
    }>;
}
/**
 * Serializes state to canonical CBOR bytes.
 * Only includes VISIBLE projection with stable ordering.
 */
export declare function serializeState(state: WarpState, { codec }?: {
    codec?: CodecPort;
}): Uint8Array;
/**
 * Projects a materialized state into its visible graph projection.
 */
export declare function projectState(state: WarpState): StateProjection;
interface StateHashOptions {
    crypto?: CryptoPort;
    codec?: CodecPort;
}
/**
 * Computes SHA-256 hash of canonical state bytes.
 */
export declare function computeStateHash(state: WarpState, { crypto, codec }?: StateHashOptions): Promise<string>;
/**
 * Deserializes state from CBOR bytes.
 * Note: This reconstructs the visible projection only.
 */
export declare function deserializeState(buffer: Uint8Array, { codec }?: {
    codec?: CodecPort;
}): StateProjection;
export { serializeFullState, deserializeFullState, } from './CheckpointSerializer.ts';
