• Calculate the storage fee for a TLSNotary proof

    Fee structure:

    • 1 DEM base fee
    • 1 DEM per KB of proof data

    Parameters

    • proofSizeKB: number

      Size of proof in kilobytes

    Returns number

    Total fee in DEM

    import { calculateStorageFee } from '@kynesyslabs/demosdk/tlsnotary';

    const proofSize = Math.ceil(proof.length / 1024);
    const fee = calculateStorageFee(proofSize); // e.g., 6 DEM for 5KB