MCPcopy Create free account

hub / github.com/merkletreejs/merkletreejs / functions

Functions237 in github.com/merkletreejs/merkletreejs

↓ 2 callersMethodindexOf
(leaf: any)
src/IncrementalMerkleTree.ts:141
↓ 2 callersMethodisUnevenTree
(treeLayers?: any[])
src/MerkleTree.ts:1437
↓ 2 callersMethodisValidLeafIndex
(idx: number)
src/MerkleTree.ts:1446
↓ 2 callersFunctionmarshalLeaves
(leaves: LeafData[])
src/functional.ts:353
↓ 2 callersMethodmarshalProof
* marshalProof * @desc Returns proof array as JSON string. * @param {String[]|Object[]} proof - Merkle tree proof array * @return {String} -
src/MerkleTree.ts:743
↓ 2 callersMethodmarshalTree
(tree: MerkleTree)
src/MerkleTree.ts:804
↓ 2 callersFunctionparseInput
(value)
example/main.js:76
↓ 2 callersMethodresetTree
* resetTree * @desc Resets the tree by clearing the leaves and layers. * @example *```js *tree.resetTree() *```
src/MerkleTree.ts:1384
↓ 2 callersFunctionsetInputValue
(value, onlySave)
example/main.js:172
↓ 2 callersFunctionsetOptionValue
(key, enabled, onlySave)
example/main.js:211
↓ 2 callersFunctionsetProof
(value)
example/main.js:238
↓ 2 callersFunctionsetVerifyLeaf
(value, onlySave)
example/main.js:253
↓ 2 callersFunctionsetVerifyProof
(value, onlySave)
example/main.js:242
↓ 2 callersFunctionsetVerifyRoot
(value, onlySave)
example/main.js:264
↓ 2 callersMethodsum
(arr: BigInt[])
src/MerkleSumTree.ts:134
↓ 2 callersFunctiontoggleFillDefaultHashView
()
example/main.js:275
↓ 2 callersFunctiontreeHashFn
(hashFn: HashFunction)
src/UnifiedBinaryTree.ts:75
↓ 2 callersMethodunmarshalLeaves
* unmarshalLeaves * @desc Returns array of leaves of Merkle Tree as a Buffers. * @param {String|Object} - JSON stringified leaves * @return {
src/MerkleTree.ts:412
↓ 2 callersMethodunmarshalProof
* 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 callersMethodunmarshalTree
(jsonStr: string | object, hashFn = SHA256, options: Options = {})
src/MerkleTree.ts:818
↓ 2 callersFunctionupdateProof
(index)
example/main.js:97
↓ 2 callersMethodverifyMultiProofWithFlags
( root: Buffer | string, leaves: TLeaf[], proofs: Buffer[] | string[], proofFlag: boolean[]
src/MerkleTree.ts:1253
↓ 2 callersFunctionverifyProof
( proof: Proof | HexProof, leaf: LeafData, root: string | Buffer, hashFn: HashFunction = defaultHashFn
src/functional.ts:119
↓ 1 callersMethod_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 callersMethodbitsToBytes
* 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 callersMethodcalculateRootForUnevenTree
(leafIndices: number[], leafHashes: any[], totalLeavesCount: number, proofHashes: any[])
src/MerkleTree.ts:1450
↓ 1 callersMethodcheckConsecutive
(leaves: Leaf[])
src/MerkleSumTree.ts:111
↓ 1 callersMethodcreateHashes
(nodes: any[])
src/MerkleTree.ts:160
↓ 1 callersMethoddeserialize
* Reconstructs a BinaryTree from its serialized form. * This is the inverse operation of serialize(). * * Expected input format: * ```json
src/UnifiedBinaryTree.ts:828
↓ 1 callersFunctiongetDefaultFillHashInput
()
example/main.js:139
↓ 1 callersFunctiongetDepth
(tree: MerkleTree)
src/functional.ts:282
↓ 1 callersFunctiongetHexLayers
(tree: MerkleTree)
src/functional.ts:300
↓ 1 callersFunctiongetHexLayersFlat
(tree: MerkleTree)
src/functional.ts:318
↓ 1 callersFunctiongetHexLeaf
(tree: MerkleTree, index: number)
src/functional.ts:153
↓ 1 callersFunctiongetHexMultiProof
(tree: MerkleTree, indices: number[])
src/functional.ts:246
↓ 1 callersFunctiongetHexProof
( tree: MerkleTree, leaf: LeafData, index?: number )
src/functional.ts:102
↓ 1 callersFunctiongetHexProofs
(tree: MerkleTree)
src/functional.ts:226
↓ 1 callersFunctiongetInputValue
(value)
example/main.js:143
↓ 1 callersFunctiongetLayers
(tree: MerkleTree)
src/functional.ts:291
↓ 1 callersMethodgetLayersAsObject
()
src/IncrementalMerkleTree.ts:200
↓ 1 callersFunctiongetLayersFlat
(tree: MerkleTree)
src/functional.ts:309
↓ 1 callersFunctiongetLeafIndex
(tree: MerkleTree, leaf: LeafData)
src/functional.ts:182
↓ 1 callersMethodgetLeafIndex
(width: number)
src/MerkleMountainRange.ts:97
↓ 1 callersFunctiongetLeaves
(tree: MerkleTree)
src/functional.ts:134
↓ 1 callersMethodgetMerkleProof
* @desc It returns a merkle proof for a leaf. Note that the index starts from 1.
src/MerkleMountainRange.ts:239
↓ 1 callersFunctiongetMultiProof
(tree: MerkleTree, indices: number[])
src/functional.ts:236
↓ 1 callersMethodgetMultiProofForUnevenTree
(tree?: any[], indices?: any[])
src/MerkleTree.ts:994
↓ 1 callersMethodgetPeaks
()
src/MerkleMountainRange.ts:88
↓ 1 callersMethodgetPositionalHexProof
* 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 callersMethodgetProofIndicesForUnevenTree
(sortedLeafIndices: number[], leavesCount: number)
src/MerkleTree.ts:883
↓ 1 callersFunctiongetProofs
(tree: MerkleTree)
src/functional.ts:217
↓ 1 callersMethodgetProofsDFS
* getProofsDFS * @desc Get all proofs through single traverse * @param {Number} currentLayer - Current layer index in traverse. * @param {Num
src/MerkleTree.ts:670
↓ 1 callersMethodgetRoot
* @desc It returns the root value of the tree.
src/MerkleMountainRange.ts:171
↓ 1 callersMethodgetRoot
()
src/IncrementalMerkleTree.ts:54
↓ 1 callersFunctiongetTreeKeyForCodeChunk
( address: Address32, chunkId: number, hashFn: HashFunction )
src/UnifiedBinaryTree.ts:219
↓ 1 callersFunctiongetTreeKeyForStorageSlot
( address: Address32, storageKey: number, hashFn: HashFunction )
src/UnifiedBinaryTree.ts:180
↓ 1 callersFunctiongetVerifyLeaf
()
example/main.js:151
↓ 1 callersFunctiongetVerifyProof
()
example/main.js:147
↓ 1 callersFunctiongetVerifyRoot
()
example/main.js:155
↓ 1 callersMethodinsertBatch
* Performs a batch insertion of key-value pairs. * * @param entries - An array of objects with 'key' and 'value' properties.
src/UnifiedBinaryTree.ts:723
↓ 1 callersMethodinsertRecursive
* 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 callersFunctionintTo32LE
(i)
test/UnifiedBinaryTree.test.js:248
↓ 1 callersMethodisLeaf
* @desc It returns whether the index is the leaf node or not
src/MerkleMountainRange.ts:219
↓ 1 callersMethodisPowOf2
(v: number)
src/MerkleTree.ts:1442
↓ 1 callersMethodlinearSearch
* 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 callersFunctionload
()
example/main.js:363
↓ 1 callersFunctionmain
()
example/main.js:425
↓ 1 callersFunctionmain
()
test/UnifiedBinaryTree.test.js:417
↓ 1 callersFunctionmarshalProof
(proof: Proof | HexProof)
src/functional.ts:371
↓ 1 callersFunctionmarshalTree
(tree: MerkleTree)
src/functional.ts:389
↓ 1 callersMethodmountainHeight
* @desc It returns the height of the highest peak.
src/MerkleMountainRange.ts:189
↓ 1 callersMethodpeakMapToPeaks
(width: number, peakMap: any)
src/MerkleMountainRange.ts:393
↓ 1 callersMethodpeakUpdate
(width: number, prevPeakMap: any, itemHash: any)
src/MerkleMountainRange.ts:410
↓ 1 callersMethodpeaksToPeakMap
(width: number, peaks: any[])
src/MerkleMountainRange.ts:370
↓ 1 callersFunctionremoveLeaf
(tree: MerkleTree, index: number)
src/functional.ts:192
↓ 1 callersFunctionresetTree
(tree: MerkleTree)
src/functional.ts:326
↓ 1 callersMethodrollUp
(root: any, width: number, peaks: any[], itemHashes: any[])
src/MerkleMountainRange.ts:454
↓ 1 callersMethodserialize
* 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 callersFunctionsetFlatLayersValue
(value)
example/main.js:195
↓ 1 callersFunctionsetHashType
(value)
example/main.js:161
↓ 1 callersFunctionsetHashValue
(value)
example/main.js:203
↓ 1 callersFunctionsetLayersValue
(value)
example/main.js:191
↓ 1 callersFunctionsetLeavesValue
(value)
example/main.js:187
↓ 1 callersFunctionsetRootValue
(value)
example/main.js:183
↓ 1 callersFunctionsetTreeValue
(value)
example/main.js:199
↓ 1 callersMethodsplitLeaf
* 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 callersMethodtoTreeString
* toTreeString * @desc Returns a visual representation of the merkle tree as a string. * @return {String} * @example *```js *console.lo
src/MerkleTree.ts:1420
↓ 1 callersMethodtoTreeString
()
src/IncrementalMerkleTree.ts:304
↓ 1 callersFunctiontreeToString
(tree: MerkleTree)
src/functional.ts:344
↓ 1 callersFunctionunmarshalLeaves
(jsonStr: string | object)
src/functional.ts:362
↓ 1 callersFunctionunmarshalProof
(jsonStr: string | object)
src/functional.ts:380
↓ 1 callersFunctionunmarshalTree
( jsonStr: string | object, hashFn: HashFunction = defaultHashFn, options: Options = {} )
src/functional.ts:400
↓ 1 callersMethodupdate
(index: number, newLeaf: any)
src/IncrementalMerkleTree.ts:99
↓ 1 callersFunctionupdateLeaf
( tree: MerkleTree, index: number, value: LeafData, options: { shouldHash?: boolean } = {} )
src/functional.ts:203
↓ 1 callersFunctionupdateLeaveOptions
(leaves)
example/main.js:87
↓ 1 callersFunctionverify
()
example/main.js:116
↓ 1 callersFunctionverifyMultiProof
( root: string | Buffer, proofIndices: number[], proofLeaves: LeafData[], leavesCount: number, proof
src/functional.ts:261
↓ 1 callersMethodverifyMultiProofForUnevenTree
(root: Buffer | string, indices: number[], leaves: Buffer[] | string[], leavesCount: number, proof: Buffer[] |
src/MerkleTree.ts:1278
FunctionbufferifyCryptoJS
test/MerkleTree.test.js:569
MethodcomputeMerkle
(node: BinaryTreeNode | null)
src/UnifiedBinaryTree.ts:654
← previousnext →101–200 of 237, ranked by callers