 (defprotocol BlockStore
   "Protocol for content-addressable storage keyed by multihash identifiers."
 
+  (stat
+    [store id]
+    "Returns a map with an `:id` and `:size` but no content. The returned map
+    may contain additional data like the date stored. Returns nil if the store
+    does not contain the identified block.")
+
   (-list
     [store opts]
     "Enumerates the ids of the stored blocks with some filtering options. See

    multihash.core.Multihash))


;; ## Block Functions

(defn with-stats
  "Adds stat information to a block's metadata."
  [block stats]
  (vary-meta block assoc :block/stats stats))


(defn meta-stats
  "Returns stat information from a block's metadata, if present."
  [block]
  (:block/stats (meta block)))


(defn open


  (delete!
    [store id]
    "Removes a block from the store. Returns true if the block was stored."))


; TODO: BlockEnumerator
; Protocol which returns a lazy sequence of every block in the store, along with
; an opaque marker which can be used to resume the stream in the same position.
; Blocks are explicitly **not** returned in any defined order; it is assumed the
; store will enumerate them in the most efficient order available.

