Persist a blob received from author at their authoredAt.
The store computes the hash and stores if the distribution policy's
willStore applies.
the hash if stored, or null if not
stored (the policy declined it, or it exceeds the maximum blob size)
Get a blob by its hash and author.
The blob's hash
Author of the blob
Blobs by author with authoredAt < before, ascending by authoredAt.
(historical segment)
Blobs by author with authoredAt >= since, ascending by authoredAt.
(recent delta)
The author's most recently authored blob this node holds,
or undefined if none is held.
Subscribe to locally authored blobs
a function that removes the subscription
Author a local blob: hash it, assign a monotonic authoredAt from the
store's clock, persist it under author, and notify
onAuthored subscribers.
the blob's hash
Interface that a data store needs to implement to manage blobs by their hashes.
The store is the sole owner of the content-hash algorithm and the monotonic authoring clock. Local authoring goes through store, blobs received from peers through accept.