TransactionParser
    Preparing search index...

    Class TransactionPackage

    The TransactionPackage class represents a transaction file that can contain multiple transactions.

    Create a new Transaction Package and load data from a (binary) file:

    const tp: TransactionPackage = new TransactionPackage('path/to/copybook'); // Creates new (empty) transaction package
    tp.loadFile('path/to/data/file'); // Load file and create transactions

    console.log(tp.transactions); // Logs all transaction in package

    Implements

    Index

    Constructors

    Properties

    Instance of CopybookParser that is used to parse the copybook used by this transaction package

    transactions: ITransaction[]

    Array of ITransaction objects representing the transactions within the current transaction package

    Methods

    • Load transaction(s) from a buffer

      Parameters

      • data: Buffer

        Transaction data

      Returns void

      The buffer can represent multiple transactions. Based on the length of the copybook, the buffer will be split