Skip to main content

Module store

Module store 

Source
Expand description

Content-addressed object store โ€” the foundation of NEDB v2.

Every document version is stored as an immutable, encrypted, BLAKE2b-hashed object at objects/{hash[0:2]}/{hash[2:]}. Once written, objects never change.

Uncorruptable by design:

  • Writes are atomic (write to .tmp โ†’ rename)
  • Every read verifies the BLAKE2b hash of the content
  • A partial write leaves a .tmp file that is ignored on startup
  • There is no single mutable file that can be partially overwritten

Structsยง

Dek
Encryption key material (AES-256-GCM). In v1 this was called DEK; the structure is the same.
Node
A single versioned document node in the DAG.
ObjectStore
Content-addressed, encrypted, tamper-evident object store.