merkletreejs › Globals › "src/MerkleTree" › Options
- Options
- complete
- concatenator
- duplicateOdd
- fillDefaultHash
- hashLeaves
- isBitcoinTree
- sort
- sortLeaves
- sortPairs
• complete? : boolean
If set to true
, the resulting tree will be a complete tree. Recommended for use of multiProofs.
• concatenator? : function
▸ (inputs
: Buffer[]): Buffer | Buffer[] | BigInt[]
Parameters:
Name | Type |
---|---|
inputs |
Buffer[] |
• duplicateOdd? : boolean
If set to true
, an odd node will be duplicated and combined to make a pair to generate the layer hash.
• fillDefaultHash? : TFillDefaultHash | Buffer | string
If defined, the resulting hash of this function will be used to fill in odd numbered layers.
• hashLeaves? : boolean
If set to true
, the leaves will hashed using the set hashing algorithms.
• 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.
• sort? : boolean
If set to true
, the leaves and hashing pairs will be sorted.
• sortLeaves? : boolean
If set to true
, the leaves will be sorted. Recommended for use of multiProofs.
• sortPairs? : boolean
If set to true
, the hashing pairs will be sorted.