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
↓ 2 callers
Method
indexOf
(leaf: any)
src/IncrementalMerkleTree.ts:141
↓ 2 callers
Method
isUnevenTree
(treeLayers?: any[])
src/MerkleTree.ts:1437
↓ 2 callers
Method
isValidLeafIndex
(idx: number)
src/MerkleTree.ts:1446
↓ 2 callers
Function
marshalLeaves
(leaves: LeafData[])
src/functional.ts:353
↓ 2 callers
Method
marshalProof
* marshalProof * @desc Returns proof array as JSON string. * @param {String[]|Object[]} proof - Merkle tree proof array * @return {String} -
src/MerkleTree.ts:743
↓ 2 callers
Method
marshalTree
(tree: MerkleTree)
src/MerkleTree.ts:804
↓ 2 callers
Function
parseInput
(value)
example/main.js:76
↓ 2 callers
Method
resetTree
* resetTree * @desc Resets the tree by clearing the leaves and layers. * @example *```js *tree.resetTree() *```
src/MerkleTree.ts:1384
↓ 2 callers
Function
setInputValue
(value, onlySave)
example/main.js:172
↓ 2 callers
Function
setOptionValue
(key, enabled, onlySave)
example/main.js:211
↓ 2 callers
Function
setProof
(value)
example/main.js:238
↓ 2 callers
Function
setVerifyLeaf
(value, onlySave)
example/main.js:253
↓ 2 callers
Function
setVerifyProof
(value, onlySave)
example/main.js:242
↓ 2 callers
Function
setVerifyRoot
(value, onlySave)
example/main.js:264
↓ 2 callers
Method
sum
(arr: BigInt[])
src/MerkleSumTree.ts:134
↓ 2 callers
Function
toggleFillDefaultHashView
()
example/main.js:275
↓ 2 callers
Function
treeHashFn
(hashFn: HashFunction)
src/UnifiedBinaryTree.ts:75
↓ 2 callers
Method
unmarshalLeaves
* unmarshalLeaves * @desc Returns array of leaves of Merkle Tree as a Buffers. * @param {String|Object} - JSON stringified leaves * @return {
src/MerkleTree.ts:412
↓ 2 callers
Method
unmarshalProof
* unmarshalProof * @desc Returns the proof for a target leaf as a list of Buffers. * @param {String|Object} - Merkle tree leaves * @return {S
src/MerkleTree.ts:772
↓ 2 callers
Method
unmarshalTree
(jsonStr: string | object, hashFn = SHA256, options: Options = {})
src/MerkleTree.ts:818
↓ 2 callers
Function
updateProof
(index)
example/main.js:97
↓ 2 callers
Method
verifyMultiProofWithFlags
( root: Buffer | string, leaves: TLeaf[], proofs: Buffer[] | string[], proofFlag: boolean[]
src/MerkleTree.ts:1253
↓ 2 callers
Function
verifyProof
( proof: Proof | HexProof, leaf: LeafData, root: string | Buffer, hashFn: HashFunction = defaultHashFn
src/functional.ts:119
↓ 1 callers
Method
_getOrCreateNode
* @desc It returns the hash value of the node for the index. * If the hash already exists it simply returns the stored value. On the other han
src/MerkleMountainRange.ts:476
↓ 1 callers
Method
bitsToBytes
* Converts an array of bits back into a Buffer of bytes. * This is the inverse operation of bytesToBits. * Processes bits in groups of 8, mainta
src/UnifiedBinaryTree.ts:560
↓ 1 callers
Method
calculateRootForUnevenTree
(leafIndices: number[], leafHashes: any[], totalLeavesCount: number, proofHashes: any[])
src/MerkleTree.ts:1450
↓ 1 callers
Method
checkConsecutive
(leaves: Leaf[])
src/MerkleSumTree.ts:111
↓ 1 callers
Method
createHashes
(nodes: any[])
src/MerkleTree.ts:160
↓ 1 callers
Method
deserialize
* Reconstructs a BinaryTree from its serialized form. * This is the inverse operation of serialize(). * * Expected input format: * ```json
src/UnifiedBinaryTree.ts:828
↓ 1 callers
Function
getDefaultFillHashInput
()
example/main.js:139
↓ 1 callers
Function
getDepth
(tree: MerkleTree)
src/functional.ts:282
↓ 1 callers
Function
getHexLayers
(tree: MerkleTree)
src/functional.ts:300
↓ 1 callers
Function
getHexLayersFlat
(tree: MerkleTree)
src/functional.ts:318
↓ 1 callers
Function
getHexLeaf
(tree: MerkleTree, index: number)
src/functional.ts:153
↓ 1 callers
Function
getHexMultiProof
(tree: MerkleTree, indices: number[])
src/functional.ts:246
↓ 1 callers
Function
getHexProof
( tree: MerkleTree, leaf: LeafData, index?: number )
src/functional.ts:102
↓ 1 callers
Function
getHexProofs
(tree: MerkleTree)
src/functional.ts:226
↓ 1 callers
Function
getInputValue
(value)
example/main.js:143
↓ 1 callers
Function
getLayers
(tree: MerkleTree)
src/functional.ts:291
↓ 1 callers
Method
getLayersAsObject
()
src/IncrementalMerkleTree.ts:200
↓ 1 callers
Function
getLayersFlat
(tree: MerkleTree)
src/functional.ts:309
↓ 1 callers
Function
getLeafIndex
(tree: MerkleTree, leaf: LeafData)
src/functional.ts:182
↓ 1 callers
Method
getLeafIndex
(width: number)
src/MerkleMountainRange.ts:97
↓ 1 callers
Function
getLeaves
(tree: MerkleTree)
src/functional.ts:134
↓ 1 callers
Method
getMerkleProof
* @desc It returns a merkle proof for a leaf. Note that the index starts from 1.
src/MerkleMountainRange.ts:239
↓ 1 callers
Function
getMultiProof
(tree: MerkleTree, indices: number[])
src/functional.ts:236
↓ 1 callers
Method
getMultiProofForUnevenTree
(tree?: any[], indices?: any[])
src/MerkleTree.ts:994
↓ 1 callers
Method
getPeaks
()
src/MerkleMountainRange.ts:88
↓ 1 callers
Method
getPositionalHexProof
* getPositionalHexProof * @desc Returns the proof for a target leaf as hex strings and the position in binary (left == 0). * @param {Buffer} leaf
src/MerkleTree.ts:724
↓ 1 callers
Method
getProofIndicesForUnevenTree
(sortedLeafIndices: number[], leavesCount: number)
src/MerkleTree.ts:883
↓ 1 callers
Function
getProofs
(tree: MerkleTree)
src/functional.ts:217
↓ 1 callers
Method
getProofsDFS
* getProofsDFS * @desc Get all proofs through single traverse * @param {Number} currentLayer - Current layer index in traverse. * @param {Num
src/MerkleTree.ts:670
↓ 1 callers
Method
getRoot
* @desc It returns the root value of the tree.
src/MerkleMountainRange.ts:171
↓ 1 callers
Method
getRoot
()
src/IncrementalMerkleTree.ts:54
↓ 1 callers
Function
getTreeKeyForCodeChunk
( address: Address32, chunkId: number, hashFn: HashFunction )
src/UnifiedBinaryTree.ts:219
↓ 1 callers
Function
getTreeKeyForStorageSlot
( address: Address32, storageKey: number, hashFn: HashFunction )
src/UnifiedBinaryTree.ts:180
↓ 1 callers
Function
getVerifyLeaf
()
example/main.js:151
↓ 1 callers
Function
getVerifyProof
()
example/main.js:147
↓ 1 callers
Function
getVerifyRoot
()
example/main.js:155
↓ 1 callers
Method
insertBatch
* Performs a batch insertion of key-value pairs. * * @param entries - An array of objects with 'key' and 'value' properties.
src/UnifiedBinaryTree.ts:723
↓ 1 callers
Method
insertRecursive
* Recursively inserts a key-value pair into the tree. * This method handles three cases: * 1. Empty node: Creates a new leaf node * 2. Stem n
src/UnifiedBinaryTree.ts:453
↓ 1 callers
Function
intTo32LE
(i)
test/UnifiedBinaryTree.test.js:248
↓ 1 callers
Method
isLeaf
* @desc It returns whether the index is the leaf node or not
src/MerkleMountainRange.ts:219
↓ 1 callers
Method
isPowOf2
(v: number)
src/MerkleTree.ts:1442
↓ 1 callers
Method
linearSearch
* linearSearch * @desc Returns the first index of which given item is found in array using linear search. * @param {Buffer[]} array - Array of i
src/Base.ts:123
↓ 1 callers
Function
load
()
example/main.js:363
↓ 1 callers
Function
main
()
example/main.js:425
↓ 1 callers
Function
main
()
test/UnifiedBinaryTree.test.js:417
↓ 1 callers
Function
marshalProof
(proof: Proof | HexProof)
src/functional.ts:371
↓ 1 callers
Function
marshalTree
(tree: MerkleTree)
src/functional.ts:389
↓ 1 callers
Method
mountainHeight
* @desc It returns the height of the highest peak.
src/MerkleMountainRange.ts:189
↓ 1 callers
Method
peakMapToPeaks
(width: number, peakMap: any)
src/MerkleMountainRange.ts:393
↓ 1 callers
Method
peakUpdate
(width: number, prevPeakMap: any, itemHash: any)
src/MerkleMountainRange.ts:410
↓ 1 callers
Method
peaksToPeakMap
(width: number, peaks: any[])
src/MerkleMountainRange.ts:370
↓ 1 callers
Function
removeLeaf
(tree: MerkleTree, index: number)
src/functional.ts:192
↓ 1 callers
Function
resetTree
(tree: MerkleTree)
src/functional.ts:326
↓ 1 callers
Method
rollUp
(root: any, width: number, peaks: any[], itemHashes: any[])
src/MerkleMountainRange.ts:454
↓ 1 callers
Method
serialize
* Serializes the entire tree structure into a JSON Buffer. * Converts the tree into a format that can be stored or transmitted, * preserving the
src/UnifiedBinaryTree.ts:763
↓ 1 callers
Function
setFlatLayersValue
(value)
example/main.js:195
↓ 1 callers
Function
setHashType
(value)
example/main.js:161
↓ 1 callers
Function
setHashValue
(value)
example/main.js:203
↓ 1 callers
Function
setLayersValue
(value)
example/main.js:191
↓ 1 callers
Function
setLeavesValue
(value)
example/main.js:187
↓ 1 callers
Function
setRootValue
(value)
example/main.js:183
↓ 1 callers
Function
setTreeValue
(value)
example/main.js:199
↓ 1 callers
Method
splitLeaf
* Splits a leaf node when inserting a new key with a different stem. * This method handles two cases: * 1. Matching bits at current depth: Conti
src/UnifiedBinaryTree.ts:894
↓ 1 callers
Method
toTreeString
* toTreeString * @desc Returns a visual representation of the merkle tree as a string. * @return {String} * @example *```js *console.lo
src/MerkleTree.ts:1420
↓ 1 callers
Method
toTreeString
()
src/IncrementalMerkleTree.ts:304
↓ 1 callers
Function
treeToString
(tree: MerkleTree)
src/functional.ts:344
↓ 1 callers
Function
unmarshalLeaves
(jsonStr: string | object)
src/functional.ts:362
↓ 1 callers
Function
unmarshalProof
(jsonStr: string | object)
src/functional.ts:380
↓ 1 callers
Function
unmarshalTree
( jsonStr: string | object, hashFn: HashFunction = defaultHashFn, options: Options = {} )
src/functional.ts:400
↓ 1 callers
Method
update
(index: number, newLeaf: any)
src/IncrementalMerkleTree.ts:99
↓ 1 callers
Function
updateLeaf
( tree: MerkleTree, index: number, value: LeafData, options: { shouldHash?: boolean } = {} )
src/functional.ts:203
↓ 1 callers
Function
updateLeaveOptions
(leaves)
example/main.js:87
↓ 1 callers
Function
verify
()
example/main.js:116
↓ 1 callers
Function
verifyMultiProof
( root: string | Buffer, proofIndices: number[], proofLeaves: LeafData[], leavesCount: number, proof
src/functional.ts:261
↓ 1 callers
Method
verifyMultiProofForUnevenTree
(root: Buffer | string, indices: number[], leaves: Buffer[] | string[], leavesCount: number, proof: Buffer[] |
src/MerkleTree.ts:1278
Function
bufferifyCryptoJS
test/MerkleTree.test.js:569
Method
computeMerkle
(node: BinaryTreeNode | null)
src/UnifiedBinaryTree.ts:654
← previous
next →
101–200 of 237, ranked by callers