Meshpocalypse Semantic
    Preparing search index...

    Class JsonFilePersistenceAdapter

    Filesystem-based ATFPersistenceAdapter for Node.js deployments.

    Writes are atomic: state is written to <filePath>.tmp then renamed to <filePath> to avoid leaving a corrupt file on crash or power loss.

    import { ATFTrustSystem } from '../../security/trust/atf-trust-system.js';
    import { JsonFilePersistenceAdapter } from '../atf/JsonFilePersistenceAdapter.js';

    const adapter = new JsonFilePersistenceAdapter({ filePath: '/data/atf-state.json' });
    const atf = new ATFTrustSystem(undefined, undefined, adapter);
    await atf.hydrate();

    Implements

    Index

    Constructors

    Methods

    Constructors

    Methods