Class: Proof

Proof

Provides interface for proving possession of a file for an AuditStream

new Proof(merkleLeaves, hexChallenge)

Parameters:
Name Type Description
merkleLeaves Array.<string> Bottom leaves of the audit merkle tree
hexChallenge string | buffer The challenge data in hex to prepend to shard
Source:

Methods


<static> verify(proof, root, depth)

Verifies the proof given the merkle root and tree depth
Parameters:
Name Type Description
proof * Compact proof result
root string Merkle tree root from audit leaves
depth number Depth of the merkle tree
Source:
Returns:
Type
Array.<string>

getProofResult()

Returns the generated proof structure
Source:
Returns:
Type
array