MCPcopy Create free account

hub / github.com/merkletreejs/merkletreejs / functions

Functions237 in github.com/merkletreejs/merkletreejs

MethodcomputeRoot
()
src/IncrementalMerkleTree.ts:228
Methodconstructor
* Creates a new StemNode with the given stem. * * @param stem - The 31-byte stem for this node.
src/UnifiedBinaryTree.ts:328
Methodconstructor
* Creates a new BinaryTree instance with the given hash function. * * @param hashFn - The hash function to use for key derivation.
src/UnifiedBinaryTree.ts:388
Methodconstructor
(size: BigInt | number, hashed: Buffer)
src/MerkleSumTree.ts:15
Methodconstructor
(hashFn: THashFn, rng: (number | BigInt)[], data: Buffer | null)
src/MerkleSumTree.ts:31
Methodconstructor
(bucket: Bucket, right: boolean)
src/MerkleSumTree.ts:52
Methodconstructor
(leaves: Leaf[], hashFn: THashFn)
src/MerkleSumTree.ts:64
Methodconstructor
(hashFn = SHA256, leaves: any[] = [], hashLeafFn?: any, peakBaggingFn?: any, hashBranchFn?: any)
src/MerkleMountainRange.ts:20
Methodconstructor
* @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
Methodconstructor
(hashFn: any, options: Options)
src/IncrementalMerkleTree.ts:20
Methodconstructor
(key = '', value = null, hashFn: THashFn)
src/MerkleRadixTree.ts:22
Methodconstructor
(hashFn: THashFn)
src/MerkleRadixTree.ts:50
MethoddeserializeNode
* Helper function to recursively deserialize nodes * Converts hex strings back to Buffers and reconstructs the tree structure * * @para
src/UnifiedBinaryTree.ts:839
MethodeqChecker
(buffer1, buffer2)
src/Base.ts:38
MethodgetDepth
()
src/IncrementalMerkleTree.ts:129
MethodgetHexLayers
()
src/IncrementalMerkleTree.ts:188
MethodgetHexRoot
()
src/MerkleMountainRange.ts:175
MethodgetHexRoot
()
src/IncrementalMerkleTree.ts:58
MethodgetLayerCount
* getLayerCount * @desc Returns the total number of layers. * @return {number} * @example *```js *const count = tree.getLayerCount()
src/MerkleTree.ts:514
MethodgetLeaves
()
src/IncrementalMerkleTree.ts:145
MethodgetNode
* @dev It returns the hash value of a node for the given position. Note that the index starts from 1.
src/MerkleMountainRange.ts:182
FunctiongetOptions
(tree: MerkleTree)
src/functional.ts:335
MethodgetProof
(index: number | BigInt)
src/MerkleSumTree.ts:122
MethodgetProof
(index: number)
src/IncrementalMerkleTree.ts:253
FunctionhashBranch
(index, left, right)
test/MerkleMountainRange.test.js:21
FunctionhashLeaf
(index, dataHash)
test/MerkleMountainRange.test.js:8
MethodhexZeroPad
(hexStr: string, length: number)
src/Base.ts:413
Methodinsert
(leaf: any)
src/IncrementalMerkleTree.ts:62
FunctionpeakBagging
(size, peaks)
test/MerkleMountainRange.test.js:13
Methodprint
* print * @desc Prints out a visual representation of the merkle tree. * @example *```js *tree.print() *```
src/Base.ts:13
MethodserializeNode
* Helper function to recursively serialize each node in the tree * Converts Buffer data to hex strings for JSON compatibility * * @para
src/UnifiedBinaryTree.ts:771
Functionsha256
(data)
test/MerkleSumTree.test.js:5
Functionsha256
(data)
test/MerkleRadixTree.test.js:13
MethodtoString
()
src/IncrementalMerkleTree.ts:300
Methodverify
* @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
Methodverify
(proof: any)
src/IncrementalMerkleTree.ts:286
MethodverifyProof
(proof: ProofItem[], rootHash: Buffer)
src/MerkleRadixTree.ts:178
← previous201–237 of 237, ranked by callers