zk-expo
v0.8.4
Published
Expo Module to create Zero-Knowledge Proofs for Groth16 & Noir on iOS and Android.
Maintainers
Readme
zk-expo
Expo Module to create Zero-Knowledge Proofs for Groth16 on iOS and Android. Supports RN >= 0.74, New Architecture and arm64 only.
Documentation : https://docs.omnid.io/
Installation in managed Expo projects
bunx expo install zk-expoBackwards Compatibility
| zk-expo Version | Expo Version | RN Version | ABI | |----------------- |--------------|-------------|-------------| | zk-expo@^0.6 | 52 | >=RN 0.74 | Only arm64 | | zk-expo@^0.3 | 51 | >=RN 0.74 | Only arm64 | | zk-expo@^0.3 | 51 | >=RN 0.74 | Only arm64 | | zk-expo@^0.2.3 | 51 | >=RN 0.74 | All ABIs | | [email protected] | 50 | <RN 0.74 | All ABIs |
Supported Backends
- Iden3's Circom - https://github.com/iden3/circom
Graph format
Witness calculation runs on a precompiled circuit graph. zk-expo reads all three formats and picks the right one from the file's magic bytes, so swapping a graph is a drop-in asset change — same zkey, same proofs, no JS changes:
| magic | notes |
| ---------------- | ----- |
| wtns.graph.001 | legacy build-circuit output |
| wtns.graph.002 | length-delimited protobuf node records |
| wtns.graph.003 | default — fixed-width node records + constants table; no per-node varint parsing |
v3 is the default for this repo. On the bundled loginProof circuit it
roughly halves witness-calculation time (~0.85ms → ~0.42ms) for ~15% more bytes
on disk.
Regenerate a graph (v3 unless you pass --v2):
npm run graph -- <circuit.circom> <out.graph>
npm run b64 # refresh example/b64TestData.ts from example/publicBoth need a build-circuit binary; set BUILD_CIRCUIT if it is not at
../circom-witnesscalc/target/release/build-circuit.
