Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/merkletreejs/merkletreejs
/ functions
Functions
237 in github.com/merkletreejs/merkletreejs
⨍
Functions
237
◇
Types & classes
28
Method
computeRoot
()
src/IncrementalMerkleTree.ts:228
Method
constructor
* Creates a new StemNode with the given stem. * * @param stem - The 31-byte stem for this node.
src/UnifiedBinaryTree.ts:328
Method
constructor
* Creates a new BinaryTree instance with the given hash function. * * @param hashFn - The hash function to use for key derivation.
src/UnifiedBinaryTree.ts:388
Method
constructor
(size: BigInt | number, hashed: Buffer)
src/MerkleSumTree.ts:15
Method
constructor
(hashFn: THashFn, rng: (number | BigInt)[], data: Buffer | null)
src/MerkleSumTree.ts:31
Method
constructor
(bucket: Bucket, right: boolean)
src/MerkleSumTree.ts:52
Method
constructor
(leaves: Leaf[], hashFn: THashFn)
src/MerkleSumTree.ts:64
Method
constructor
(hashFn = SHA256, leaves: any[] = [], hashLeafFn?: any, peakBaggingFn?: any, hashBranchFn?: any)
src/MerkleMountainRange.ts:20
Method
constructor
* @desc Constructs a Merkle Tree. * All nodes and leaves are stored as Buffers. * Lonely leaf nodes are promoted to the next level up without be
src/MerkleTree.ts:78
Method
constructor
(hashFn: any, options: Options)
src/IncrementalMerkleTree.ts:20
Method
constructor
(key = '', value = null, hashFn: THashFn)
src/MerkleRadixTree.ts:22
Method
constructor
(hashFn: THashFn)
src/MerkleRadixTree.ts:50
Method
deserializeNode
* Helper function to recursively deserialize nodes * Converts hex strings back to Buffers and reconstructs the tree structure * * @para
src/UnifiedBinaryTree.ts:839
Method
eqChecker
(buffer1, buffer2)
src/Base.ts:38
Method
getDepth
()
src/IncrementalMerkleTree.ts:129
Method
getHexLayers
()
src/IncrementalMerkleTree.ts:188
Method
getHexRoot
()
src/MerkleMountainRange.ts:175
Method
getHexRoot
()
src/IncrementalMerkleTree.ts:58
Method
getLayerCount
* getLayerCount * @desc Returns the total number of layers. * @return {number} * @example *```js *const count = tree.getLayerCount()
src/MerkleTree.ts:514
Method
getLeaves
()
src/IncrementalMerkleTree.ts:145
Method
getNode
* @dev It returns the hash value of a node for the given position. Note that the index starts from 1.
src/MerkleMountainRange.ts:182
Function
getOptions
(tree: MerkleTree)
src/functional.ts:335
Method
getProof
(index: number | BigInt)
src/MerkleSumTree.ts:122
Method
getProof
(index: number)
src/IncrementalMerkleTree.ts:253
Function
hashBranch
(index, left, right)
test/MerkleMountainRange.test.js:21
Function
hashLeaf
(index, dataHash)
test/MerkleMountainRange.test.js:8
Method
hexZeroPad
(hexStr: string, length: number)
src/Base.ts:413
Method
insert
(leaf: any)
src/IncrementalMerkleTree.ts:62
Function
peakBagging
(size, peaks)
test/MerkleMountainRange.test.js:13
Method
print
* print * @desc Prints out a visual representation of the merkle tree. * @example *```js *tree.print() *```
src/Base.ts:13
Method
serializeNode
* Helper function to recursively serialize each node in the tree * Converts Buffer data to hex strings for JSON compatibility * * @para
src/UnifiedBinaryTree.ts:771
Function
sha256
(data)
test/MerkleSumTree.test.js:5
Function
sha256
(data)
test/MerkleRadixTree.test.js:13
Method
toString
()
src/IncrementalMerkleTree.ts:300
Method
verify
* @desc It returns true when the given params verifies that the given value exists in the tree or reverts the transaction.
src/MerkleMountainRange.ts:294
Method
verify
(proof: any)
src/IncrementalMerkleTree.ts:286
Method
verifyProof
(proof: ProofItem[], rootHash: Buffer)
src/MerkleRadixTree.ts:178
← previous
201–237 of 237, ranked by callers