- Preparing search index...
- The search index is not available
snarky-smt
Methods
Static
checkMembership
- checkMembership<K, V>(proof: SparseMerkleProof, expectedRoot: Field, key: K, keyType: Provable<K>, value: V, valueType: Provable<V>, options??: {
hashKey: boolean;
hashValue: boolean;
hasher: Hasher;
}): boolean
-
Parameters
-
-
expectedRoot: Field
-
key: K
-
keyType: Provable<K>
-
value: V
-
valueType: Provable<V>
-
Optional
options: {
hashKey: boolean;
hashValue: boolean;
hasher: Hasher;
} = ...
-
hashKey: boolean
-
hashValue: boolean
-
Returns boolean
Static
checkNonMembership
- checkNonMembership<K, V>(proof: SparseMerkleProof, expectedRoot: Field, key: K, keyType: Provable<K>, options??: {
hashKey: boolean;
hashValue: boolean;
hasher: Hasher;
}): boolean
-
Parameters
-
-
expectedRoot: Field
-
key: K
-
keyType: Provable<K>
-
Optional
options: {
hashKey: boolean;
hashValue: boolean;
hasher: Hasher;
} = ...
-
hashKey: boolean
-
hashValue: boolean
-
Returns boolean
Static
computeRoot
- computeRoot<K, V>(sideNodes: Field[], key: K, keyType: Provable<K>, value?: V, valueType?: Provable<V>, options??: {
hashKey: boolean;
hashValue: boolean;
hasher: Hasher;
}): Field
-
Parameters
-
sideNodes: Field[]
-
key: K
-
keyType: Provable<K>
-
Optional
value: V
-
Optional
valueType: Provable<V>
-
Optional
options: {
hashKey: boolean;
hashValue: boolean;
hasher: Hasher;
} = ...
-
hashKey: boolean
-
hashValue: boolean
-
Returns Field
Static
jsonToSparseCompactMerkleProof
Static
sparseCompactMerkleProofToJson
Static
verifyCompactProof
- verifyCompactProof<K, V>(cproof: SparseCompactMerkleProof, expectedRoot: Field, key: K, keyType: Provable<K>, value?: V, valueType?: Provable<V>, options??: {
hashKey: boolean;
hashValue: boolean;
hasher: Hasher;
}): boolean
-
Parameters
-
-
expectedRoot: Field
-
key: K
-
keyType: Provable<K>
-
Optional
value: V
-
Optional
valueType: Provable<V>
-
Optional
options: {
hashKey: boolean;
hashValue: boolean;
hasher: Hasher;
} = ...
-
hashKey: boolean
-
hashValue: boolean
-
Returns boolean
Static
verifyProof
- verifyProof<K, V>(proof: SparseMerkleProof, expectedRoot: Field, key: K, keyType: Provable<K>, value?: V, valueType?: Provable<V>, options??: {
hashKey: boolean;
hashValue: boolean;
hasher: Hasher;
}): boolean
-
Parameters
-
-
expectedRoot: Field
-
key: K
-
keyType: Provable<K>
-
Optional
value: V
-
Optional
valueType: Provable<V>
-
Optional
options: {
hashKey: boolean;
hashValue: boolean;
hasher: Hasher;
} = ...
-
hashKey: boolean
-
hashValue: boolean
-
Returns boolean
Collection of utility functions for sparse merkle tree