Class: Audit

Audit

Represents a streaming audit challenge generator

new Audit(audits)

Parameters:
Name Type Description
audits number Total number of challenges to generate
Source:

Methods


<static> fromRecords(challenges, tree)

Returns a new instance from the predefined challenges and tree
Parameters:
Name Type Description
challenges array The precomputed challenges
tree array The bottom leaves of the existing merkle tree
Source:
Returns:
Type
Audit

getPrivateRecord()

Returns the challenges, the tree depth, and merkle root
Source:
Returns:
challenge - Private audit record with challenges
Type
Object

getPublicRecord()

Returns the bottom leaves of the merkle tree for sending to farmer
Source:
Returns:
leaves - Bottom merkle leaves of audit tree
Type
Array