@pokapali/snapshot
v0.1.0-alpha.3
Published
```sh npm install @pokapali/snapshot ```
Readme
@pokapali/snapshot
npm install @pokapali/snapshotSnapshot encoding, decoding, verification, and chain
walking for Pokapali's IPFS persistence layer. Each
snapshot is a DAG-CBOR block containing the full encrypted
state of every subdocument, linked into an append-only
chain via prev CID pointers. Snapshots are signed with
Ed25519 for structural validation by pinners.
Key Exports
encodeSnapshot(plaintext, readKey, prev, seq, ts, signingKey)— encrypts subdoc state and produces a signed DAG-CBOR blockdecodeSnapshot(bytes)— parses a block into aSnapshotNodedecryptSnapshot(node, readKey)— decrypts the subdoc payloadsvalidateStructure(block)— verifies CBOR schema and Ed25519 signature (no key authorization check)walkChain(tipCid, getter)— async iterator that followsprevlinksSnapshotNode— interface:subdocs,prev,seq,ts,signature,publicKey
Also re-exports CID, sha256, and dagCborCode for
convenience.
