(** Transaction operations with phantom types for mode safety *) (** Transaction handle parameterized by mode ('mode = ro | rw) *) type 'mode t (** Get the root bucket *) val root : 'mode t -> ('mode Bucket.t, Error.t) result (** Get transaction state *) val state : 'mode t -> Types.txn_state (** Commit a read-write transaction *) val commit : Types.rw t -> (unit, Error.t) result (** Rollback a transaction *) val rollback : 'mode t -> unit