import { type Dot } from "../../crdt/Dot.ts";
import type VersionVector from "../../crdt/VersionVector.ts";
import type ORSetElementState from "../ORSetElementState.ts";
import type CodecPort from "../../../ports/CodecPort.ts";
import type TrieStorePort from "../trie/TrieStorePort.ts";
import PageCache from "../trie/PageCache.ts";
import TrieGeometry from "../trie/TrieGeometry.ts";
import ShadowTrieORSet from "../shadow/ShadowTrieORSet.ts";
import StateSessionCloseResult from "./StateSessionCloseResult.ts";
export type StateSessionOpen = {
    readonly nodeAliveRootOid: string | null;
    readonly edgeAliveRootOid: string | null;
    readonly store: TrieStorePort;
    readonly codec: CodecPort;
    readonly geometry: TrieGeometry;
    readonly pageCache: PageCache;
};
export default class StateSession {
    #private;
    constructor(fields: {
        readonly nodeAlive: ShadowTrieORSet;
        readonly edgeAlive: ShadowTrieORSet;
    });
    static open(init: StateSessionOpen): Promise<StateSession>;
    nodeContains(id: string): Promise<boolean>;
    nodeDots(id: string): Promise<ReadonlySet<string>>;
    nodeElementState(id: string): Promise<ORSetElementState | null>;
    edgeContains(key: string): Promise<boolean>;
    edgeDots(key: string): Promise<ReadonlySet<string>>;
    edgeElementState(key: string): Promise<ORSetElementState | null>;
    addNode(id: string, dot: Dot): Promise<void>;
    addEdge(key: string, dot: Dot): Promise<void>;
    removeNodes(observedDots: ReadonlySet<string>): Promise<void>;
    removeEdges(observedDots: ReadonlySet<string>): Promise<void>;
    scanNodes(): AsyncIterable<string>;
    scanNodeElementStates(): AsyncIterable<ORSetElementState>;
    scanEdges(): AsyncIterable<string>;
    scanEdgeElementStates(): AsyncIterable<ORSetElementState>;
    compact(includedVV: VersionVector): Promise<void>;
    close(): Promise<StateSessionCloseResult>;
}
