Skip to content

Modules

View Markdown

ZeroJ is split into small modules so you only pull in what you use. All published artifacts share the Maven group org.zeroj, and every Java package starts with org.zeroj. (Releases up to 0.1.0-pre11 used com.bloxbean.cardano; see Migration notes.)

There are three kinds of published module:

  • Core modules are version-aligned by the BOM org.zeroj:zeroj-bom-core. Import the BOM once and omit versions.
  • Opt-in modules are published but deliberately left out of the BOM. Declare them with an explicit version. “Opt-in” means they’re not in the default dependency graph and have their own maturity; it doesn’t mean untested.
  • Support, assurance and benchmark projects are never published.

Maturity labels come from the support matrix on Status & maturity. “Beta” means feature-complete and correctness-tested but not externally audited and not for value-bearing or mainnet use.

build.gradle
dependencies {
implementation platform('org.zeroj:zeroj-bom-core:0.1.0-pre12')
implementation 'org.zeroj:zeroj-circuit-dsl' // core: version from the BOM
implementation 'org.zeroj:zeroj-crypto'
implementation 'org.zeroj:zeroj-verifier-groth16'
implementation 'org.zeroj:zeroj-bbs:0.1.0-pre12' // opt-in: explicit version
}
pom.xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.zeroj</groupId>
<artifactId>zeroj-bom-core</artifactId>
<version>0.1.0-pre12</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
ArtifactPurposeMaturityStart with
zeroj-apiProof model and shared policy types. No dependencies.BetaZkProofEnvelope, PublicInputs, VerificationKeyRef, VerificationMaterial, VerificationResult, CircuitId, CurveId, ProofSystemId, TrustedSetupPolicy, LegacyCurvePolicy
zeroj-codecsnarkjs JSON parsing, CBOR envelopes, canonical hashingBetaSnarkjsJsonCodec, CborEnvelopeCodec, CanonicalHash, EnvelopeValidator
zeroj-backend-spiVerifier SPI, key registry, routingBetaZkVerifier, BackendDescriptor, VerificationKeyRegistry, InMemoryVerificationKeyRegistry, VerifierRegistry, VerifierOrchestrator
zeroj-verifier-groth16Groth16 BLS12-381 verificationBetaGroth16BLS12381PureJavaVerifier (pure Java), Groth16BLS12381Verifier (blst-backed)
zeroj-bls12381Pure-Java BLS12-381 fields, curves and pairingBeta (verification-grade)BLS12381Pairing, G1Point, G2Point, Bls12381Provider
zeroj-blstNative BLS12-381 via blst: FFM MSM binding with a source-built, bundled libblst, plus pairingBeta, opt-in native codeBlstBls12381Provider, BlstPairing, ffm.BlstFfm
zeroj-cryptoThe pure-Java prover: Groth16 setup, proving, key stores, ceremony import, snarkjs exportBeta (Groth16); PlonK classes are experimentalGroth16Keys, Groth16Pipeline, Groth16ProverBLS381, Groth16SetupBLS381, PowersOfTauBLS381, ZkeyImporterBLS381, ZkeyPkStoreImporter, SnarkjsGroth16Json
zeroj-crypto-blstOpt-in blst MSM backend for the Groth16 prover; bit-identical proofsBeta, opt-inBlstProverBackend
zeroj-circuit-dslJava circuit DSL; compiles to R1CSBetaCircuitBuilder, CircuitSpec, SignalBuilder, Signal
zeroj-circuit-libGadget library: Poseidon, Merkle, comparators, binary, mux, Blake2b/SHA-512/HMAC, Ed25519/BIP32/CIP-1852…Beta, per-gadget statusPoseidonParamsBLS12_381T3, see Gadgets
zeroj-circuit-annotation-api@ZKCircuit symbolic annotations and Zk* typesBeta@ZKCircuit, @Prove, @Public, @Secret, ZkField, ZkBool, ZkContext, ZkInputMap
zeroj-circuit-annotation-processorAnnotation processor that generates a <Name>Circuit companion classBetaAdd as annotationProcessor
zeroj-onchain-julcPlutus V3 validators and codecs, compiled with JuLCGroth16: Beta, testnet only. PlonK validators: Experimental. BBS on-chain libraries: working for one fixed disclosure profile, not separately rated in the support matrixgroth16.validator.Groth16BLS12381Verifier, Groth16BLS12381TxOutRefBindingVerifier (reference example only), Groth16BLS12381Lib, ProverToCardano, SnarkjsToCardano, ScriptBudgetEstimator
zeroj-toolsCeremony tooling and the zeroj-ceremony CLI (snarkjs-compatible phase-2 contributions)Not separately rated; the ceremony design record is still ProposedZkeyContributor, SnarkjsHashToG2, CeremonyCli
zeroj-bom-coreThe BOM for all of the above—platform('org.zeroj:zeroj-bom-core:…')
ArtifactPurposeMaturityStart with
zeroj-verifier-plonkPlonK BLS12-381 verification (structured snarkjs/ZeroJ JSON)ExperimentalPlonkBLS12381Verifier
zeroj-bbsCFRG BBS draft-10 signatures and selective disclosureVerification: Beta. Issuance: Beta with caveat (use the blst provider for issuer keys)BbsService, BbsPresentationCodec, BbsToCardano, BbsZkVerifier
zeroj-mpf-poseidonPoseidon-rooted MPF adapter over Cardano Client Lib plus operation-specific circuitsExperimentalPoseidonMpfTrie, PoseidonMpfCircuitTemplates, PoseidonMpfBranchWitness
zeroj-jmt-poseidonPoseidon-rooted JMT profile over Cardano Client Lib plus operation-specific circuitsExperimentalPoseidonJmtTree, PoseidonJmtCircuitTemplates, PoseidonJmtInclusionWitness

Legacy BN254 classes still exist in some modules for old off-chain experiments. They are disabled unless you set -Dzeroj.allowLegacyBn254=true, are not registered with ServiceLoader, and BN254 is not a Cardano curve.

You rarely need to list every module. Typical sets:

You want to…Declare
Write and prove circuitszeroj-circuit-dsl (+ zeroj-circuit-lib), zeroj-crypto; for annotations also zeroj-circuit-annotation-api and annotationProcessor 'org.zeroj:zeroj-circuit-annotation-processor'
Verify proofs in a servicezeroj-verifier-groth16, zeroj-codec
Verify on Cardanozeroj-onchain-julc (+ JuLC’s julc-cardano-client-lib to load scripts)
Faster proving on big machinesadd zeroj-crypto-blst and benchmark first
Credentialszeroj-bbs (explicit version), optionally zeroj-blst

These live in the repository for testing, assurance and benchmarking. You can’t depend on them.

ProjectWhat it isHow to build
zeroj-test-vectorsShared fixtures: pre-generated proofs and VKsDefault build
zeroj-integration-testsCross-module regressions: Groth16 end-to-end, tampering, invalid witness, snarkjs interop, JuLC VM and Yaci DevKit./gradlew :zeroj-integration-tests:test, :e2eTest
assurance/zeroj-bls12381-wasmzkcrypto BLS12-381 compiled to WASM, an independent differential oracle (needs Rust)-PincludeAssurance
assurance/zeroj-bbs-wasmzkryptium BBS compiled to WASM, an independent differential oracle (needs Rust)-PincludeAssurance
assurance/gnark-fixturesPinned gnark fixture generator for the committed PlonK vectors (needs Go)make (not a Gradle project)
benchmarks/zeroj-mpf-poseidon-loadRocksDB load, proof and Cardano-artifact benchmark tool for MPF-PincludeBenchmarks
benchmarks/zeroj-jmt-poseidon-loadDurable, versioned JMT load and benchmark tool-PincludeBenchmarks

See Configuration for the build flags.