React native wrapper for circom-witnesscalc library intended for zero knowledge proof witness calculation.
npm install react-native-circom-witnesscalc
import {calculateWitness} from 'react-native-circom-witnesscalc';
// ...
const inputs = RNFS.readFile('path/to/inputs.json', 'utf8');
const graph = RNFS.readFile('path/to/graph.wcd', "base64");
const result = await calculateWitness(inputs, graph);
const bytes = base64ToArrayBuffer(result);
CircomWitnesscalc is part of the iden3 project and licensed under MIT and APACHE 2.0 licences. Please check the LICENSE-MIT and LICENSE-APACHE files for more details.