Audit Store
Create an Audit Store
Section titled “Create an Audit Store”import { verify } from '@brivora/verify';
// In-memory storeconst store = verify.createAuditStore({ type: 'memory' });
// File-based storeconst store = verify.createAuditStore({ type: 'file', path: './audit' });Save and Retrieve
Section titled “Save and Retrieve”await store.save(result.proof);
// List all stored proofsconst proofs = await store.list();
// Retrieve a specific proof by hashconst proof = await store.load(proofHash);Chain Retrieval
Section titled “Chain Retrieval”// Get all proofs in a chain starting from a specific proofconst chain = await store.chain({ from: startHash });Custom Adapters
Section titled “Custom Adapters”const store = verify.createAuditStore({ type: 'custom', adapter: { save: async (proof) => { /* your storage logic */ }, load: async (hash) => { /* your retrieval logic */ }, list: async (options) => { /* your listing logic */ }, chain: async (options) => { /* your chain logic */ }, },});