@pwngh/economy-lab
    Preparing search index...

    Function verifyExport

    • Runs the full offline verification: re-prove every account's chain from the file's links, then check the embedded checkpoint's root and signature against the supplied public keys. The checkpoint verifies against the exported tip, so a checkpoint sealed before the last postings reports as unverified until the ledger is exported right after a seal.

      Parameters

      • lines: Iterable<string>
      • publicKeysHex: readonly string[]
      • digest: Digest = ...

      Returns Promise<VerifyReport>

      import { readFileSync } from 'node:fs';
      const lines = readFileSync('ledger-export.jsonl', 'utf8').split('\n');
      const report = await verifyExport(lines, [publishedSigningKeyHex]);
      if (!report.chainIntact) throw new Error('export chain broken');