merkletreejs/docs/interfaces/_src_merkletree_.options.md

2.4 KiB
Raw Blame History

merkletreejs Globals "src/MerkleTree" Options

Interface: Options

Hierarchy

  • Options

Index

Properties

Properties

Optional complete

complete? : boolean

If set to true, the resulting tree will be a complete tree. Recommended for use of multiProofs.


Optional concatenator

concatenator? : any


Optional duplicateOdd

duplicateOdd? : boolean

If set to true, an odd node will be duplicated and combined to make a pair to generate the layer hash.


Optional fillDefaultHash

fillDefaultHash? : TFillDefaultHash | Buffer | string

If defined, the resulting hash of this function will be used to fill in odd numbered layers.


Optional hashLeaves

hashLeaves? : boolean

If set to true, the leaves will hashed using the set hashing algorithms.


Optional isBitcoinTree

isBitcoinTree? : boolean

If set to true, constructs the Merkle Tree using the Bitcoin Merkle Tree implementation. Enable it when you need to replicate Bitcoin constructed Merkle Trees. In Bitcoin Merkle Trees, single nodes are combined with themselves, and each output hash is hashed again.


Optional sort

sort? : boolean

If set to true, the leaves and hashing pairs will be sorted.


Optional sortLeaves

sortLeaves? : boolean

If set to true, the leaves will be sorted. Recommended for use of multiProofs.


Optional sortPairs

sortPairs? : boolean

If set to true, the hashing pairs will be sorted.