{"_id":"@dariolol/export-ton-verifier","name":"@dariolol/export-ton-verifier","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@dariolol/export-ton-verifier","version":"2.0.0","description":"Tool for generating Groth16 and PLONK verifier code for the TON blockchain from SnarkJS .zkey files.","homepage":"https://github.com/dariotarantini/export-ton-verifier#readme","bugs":{"url":"https://github.com/dariotarantini/export-ton-verifier/issues"},"repository":{"type":"git","url":"git+https://github.com/dariotarantini/export-ton-verifier.git"},"keywords":["zksnark","groth16","plonk","ton","func","tact","tolk","zero","knowledge","circuit"],"license":"MIT","author":{"name":"white_coon"},"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"bin":{"export-ton-verifier":"dist/cli.js"},"scripts":{"build":"npx tsup && npm pack"},"dependencies":{"@ton/core":"~0","ejs":"^4.0.1","ffjavascript":"^0.3.1","snarkjs":"^0.7.6"},"devDependencies":{"tsup":"^8.5.1","typescript":"^6.0.2"},"gitHead":"dc4f8851b74b490b253e2bd0ebe409d91d4f25c1","_id":"@dariolol/export-ton-verifier@2.0.0","_nodeVersion":"22.14.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-Ko6mOMFJELHU5/mLBDmScM3N2bKfBXQsNbi0Ag1EUO/nK+MSuYTYbNvLDx2LVBeHaSCGCjdV8wZJ/tvrxRY3zw==","shasum":"9b121fc10e4307e6c51d6d5f321179b8ba4b3e34","tarball":"https://registry.npmjs.org/@dariolol/export-ton-verifier/-/export-ton-verifier-2.0.0.tgz","fileCount":25,"unpackedSize":176623,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCXS3ilUWJ0A45kRBRrJOBwAbcDjpqWoPhdr6XrTKG/AAIhAKsP6olqVAQC8iwDMKIuOBUeDjPMTIKY16uMIWNV4ms2"}]},"_npmUser":{"name":"dariolol","email":"dariotarantinimail@gmail.com"},"directories":{},"maintainers":[{"name":"dariolol","email":"dariotarantinimail@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/export-ton-verifier_2.0.0_1775825567257_0.44251166102575534"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-10T12:52:47.153Z","2.0.0":"2026-04-10T12:52:47.436Z","modified":"2026-04-10T12:52:47.585Z"},"maintainers":[{"name":"dariolol","email":"dariotarantinimail@gmail.com"}],"description":"Tool for generating Groth16 and PLONK verifier code for the TON blockchain from SnarkJS .zkey files.","homepage":"https://github.com/dariotarantini/export-ton-verifier#readme","keywords":["zksnark","groth16","plonk","ton","func","tact","tolk","zero","knowledge","circuit"],"repository":{"type":"git","url":"git+https://github.com/dariotarantini/export-ton-verifier.git"},"author":{"name":"white_coon"},"bugs":{"url":"https://github.com/dariotarantini/export-ton-verifier/issues"},"license":"MIT","readme":"# Export TON Verifier\n\n**Export TON Verifier** is a CLI tool and JavaScript library for generating **Groth16** and **PLONK** (experimental, **Circom**) smart contract verifiers for the TON blockchain from `.zkey` or `.json` verification key files.\n\nIt integrates with the **snarkjs** library and supports circuits built with **Circom**, **Noname**, **Gnark**, and **Arkworks** (via `verification_key.json`).\nThe protocol (Groth16 or PLONK) is auto-detected from the `.zkey` file.\n\nVerifier code can be generated for three TON languages: **FunC**, **Tolk**, and **Tact** (selected via the `--func`, `--tolk`, or `--tact` flags). TypeScript wrapper templates are available per protocol (`--groth16` / `--plonk` for `import-wrapper` and `--wrapper-dest`).\n\n## Installation\n\n```bash\nnpm install export-ton-verifier\n\n# Help\nnpx export-ton-verifier --help\n```\n\n## Import as a library\n\n```ts\nimport {\n  dictFromInputList,\n  groth16CompressProof,\n  generateVerifier,\n  zkeyExportPlonkVerificationKey,\n  exportPlonkFuncCalldata,\n  calldataToTupleItems,\n} from \"export-ton-verifier\";\n```\n\n## Usage CLI\n\n```sh\n# From .zkey, FunC by default:\nnpx export-ton-verifier ./circuits/verifier.zkey ./verifier.fc\n\n# From verification_key.json (auto-detected by .json):\nnpx export-ton-verifier ./circuits/verification_key.json ./verifier.fc\n\n# Force JSON mode (even if extension is not .json):\nnpx export-ton-verifier ./vk.txt ./verifier.tolk --tolk --vk\n\n# Generate Tact verifier:\nnpx export-ton-verifier ./circuits/verifier.zkey ./verifier.tact --tact\n\n# Generate and also drop the TypeScript wrapper:\nnpx export-ton-verifier ./circuits/verification_key.json ./verifier.fc --func --wrapper-dest ./wrappers/ --force\n\n# Only copy the TypeScript wrapper (specify protocol):\nnpx export-ton-verifier import-wrapper ./wrappers/ --groth16 --force\nnpx export-ton-verifier import-wrapper ./wrappers/ --plonk --force\n```\n\n## References\n\n- [TON Documentation](https://docs.ton.org/contract-dev/zero-knowledge)\n- [Tact Documentation](https://docs.tact-lang.org/cookbook/zk-proofs/)\n- Examples\n  - [zk-examples/zk-ton-examples (Groth16)](https://github.com/zk-examples/zk-ton-examples)\n  - [zk-examples/zk-ton-plonk (PLONK)](https://github.com/zk-examples/zk-ton-plonk)\n  - [zk-examples/zkJetton](https://github.com/zk-examples/zkJetton)\n- Export of proof and verification key in JSON format compatible with snarkjs\n  - [gnark-to-snarkjs](https://github.com/mysteryon88/gnark-to-snarkjs)\n  - [ark-snarkjs](https://github.com/mysteryon88/ark-snarkjs)\n- Frameworks verified for compatibility\n  - [Circom](https://docs.circom.io/)\n  - [Noname](https://github.com/zksecurity/noname)\n  - [Gnark](https://github.com/Consensys/gnark)\n  - [Arkworks](https://github.com/arkworks-rs)\n","readmeFilename":"README.md","_rev":"1-226e11f7741d95c01f3b99d73cc0ddbb"}