- Preparing search index...
- The search index is not available
snarky-smt
Methods
Static
checkMemebership
- checkMemebership<K, V>(proof: CompactSparseMerkleProof, 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
checkNonMemebership
- checkNonMemebership<K, V>(proof: CompactSparseMerkleProof, expectedRoot: Field, key: K, keyType: Provable<K>, options??: {
hashKey: boolean;
hasher: Hasher;
}): boolean
-
Parameters
-
-
expectedRoot: Field
-
key: K
-
keyType: Provable<K>
-
Optional
options: {
hashKey: boolean;
hasher: Hasher;
} = ...
Returns boolean
Static
verifyCompactProof
- verifyCompactProof<K, V>(cproof: CSparseCompactMerkleProof, 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: CompactSparseMerkleProof, root: Field, key: K, keyType: Provable<K>, value?: V, valueType?: Provable<V>, options??: {
hashKey: boolean;
hashValue: boolean;
hasher: Hasher;
}): boolean
-
Parameters
-
-
root: 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
verifyProofWithUpdates
- verifyProofWithUpdates<K, V>(proof: CompactSparseMerkleProof, expectedRoot: Field, key: K, keyType: Provable<K>, value?: V, valueType?: Provable<V>, options??: {
hashKey: boolean;
hashValue: boolean;
hasher: Hasher;
}): {
ok: boolean;
updates: null | [Field, Field[]][];
}
-
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 {
ok: boolean;
updates: null | [Field, Field[]][];
}
-
ok: boolean
-
updates: null | [Field, Field[]][]
Collection of utility functions for compact sparse merkle tree