New:Socket for Asana Is Now Available.Learn more
Get Started

@bolyra/circuits

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bolyra/circuits

Prebuilt Circom circuit artifacts for the Bolyra ZKP identity protocol

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@bolyra/circuits

Prebuilt Circom circuit artifacts for the Bolyra ZKP identity protocol.

Ships .wasm witness calculators, .zkey proving keys (Groth16), and .vkey.json verification keys for all three production circuits:

  • HumanUniqueness -- Semaphore v4-style enrollment proof
  • AgentPolicy -- EdDSA-signed agent credential proof
  • Delegation -- One-way scope-narrowing delegation proof

Install

npm install @bolyra/circuits

Usage

import {
  getCircuitArtifacts,
  getArtifactsDir,
  getVerificationKey,
  listAvailableCircuits,
} from '@bolyra/circuits';

// Get artifact paths for a circuit
const { wasm, zkey, vkey } = getCircuitArtifacts('HumanUniqueness');

// Use with snarkjs
const { proof, publicSignals } = await snarkjs.groth16.fullProve(
  input,
  wasm,
  zkey,
);

// Get the verification key as parsed JSON
const vkeyJson = getVerificationKey('HumanUniqueness');
const valid = await snarkjs.groth16.verify(vkeyJson, publicSignals, proof);

// List all available circuit/system combinations
const available = listAvailableCircuits();
// [{ circuit: 'HumanUniqueness', system: 'groth16' }, ...]

// Get the artifacts directory (useful for @bolyra/sdk integration)
const dir = getArtifactsDir();

Available Circuits

CircuitGroth16Notes
HumanUniquenessYesReuses Semaphore v4 ceremony (depth 20)
AgentPolicyYesProject-specific Phase 2 ceremony
DelegationYesProject-specific Phase 2 ceremony

Trusted Setup Provenance

  • HumanUniqueness (Groth16): Reuses the Semaphore v4 Phase 2 ceremony at depth 20. No project-specific trusted setup required.
  • AgentPolicy (Groth16): Project-specific Phase 2 ceremony using pot16.ptau (Hermez Cryptographic Ceremony, 2^16 powers).
  • Delegation (Groth16): Same as AgentPolicy.

Package Size

~29 MB (Groth16 artifacts only). PLONK proving keys (~146 MB each) are excluded. PLONK verification keys are included for verification-only use cases.

Integration with @bolyra/sdk

Note: The SDK does not yet auto-resolve artifacts from this package. Pass the artifacts directory to the SDK config manually: { circuitDir: require('@bolyra/circuits').getArtifactsDir() }. Auto-resolution is planned for a future SDK release.

License

Apache-2.0

Keywords

zkp

FAQs

Package last updated on 20 Jun 2026

Related posts