Constructors
constructor
- new TreeHasher<K, V>(hasher?, keyType?, valueType?): TreeHasher<K, V>
Parameters
Optional
hasher: Hasher = PoseidonHasherFuncOptional
keyType: Provable<K>Optional
valueType: Provable<V>
Properties
Private
Optional
valueType
Methods
digestLeaf
- digestLeaf(path, leafData): {
hash: Field;
value: Field[];
} Parameters
- path: Field
- leafData: Field
Returns {
hash: Field;
value: Field[];
}
hash: Field
value: Field[]
digestNode
- digestNode(leftData, rightData): {
hash: Field;
value: Field[];
} Parameters
- leftData: Field
- rightData: Field
Returns {
hash: Field;
value: Field[];
}
hash: Field
value: Field[]
digestValue
- digestValue(value): Field
Returns Field
emptyData
- emptyData(): Field[]
Returns Field[]
isEmptyData
- isEmptyData(data): boolean
Returns boolean
isEmptyDataInCircuit
- isEmptyDataInCircuit(data): Bool
Returns Bool
isLeaf
- isLeaf(data): boolean
Returns boolean
parseLeaf
- parseLeaf(data): {
leaf: Field;
path: Field;
} Returns {
leaf: Field;
path: Field;
}
parseNode
- parseNode(data): {
leftNode: Field;
rightNode: Field;
} Returns {
leftNode: Field;
rightNode: Field;
}
leftNode: Field
rightNode: Field
path
- path(k): Field
Returns Field
Static
poseidon
- poseidon<K, V>(keyType?, valueType?): TreeHasher<K, V>
Parameters
Optional
keyType: Provable<K>Optional
valueType: Provable<V>
{TreeHasher<K, V>}
Tree Hasher
TreeHasher