How 0xbow-io/privacy-pools-core works
Project type and purpose
• This is a monorepo implementing a blockchain privacy protocol (“Privacy Pool”) that combines zero‑knowledge circuits, on‑chain smart contracts, a middleware relayer, and a TypeScript SDK.
• Its goal is to let users deposit assets publicly, then withdraw them privately by proving membership in an approved set via ZK proofs.
File structure
• Top‑level: GitHub workflows, docs, ops/Helm‑chart, Yarn workspace packages.
• packages/circuits: Circom circuits that define ZK proof logic, builds to WASM, R1CS, zKeys.
• packages/contracts: Solidity smart contracts (managed with Foundry), deployable on EVM.
• packages/relayer: Node/TypeScript service exposing HTTP endpoints, holds a lightweight DB (SQLite), submits proofs & txns to chain.
• packages/sdk: TypeScript client library; wraps circuits, web3 provider, and contract ABI calls.
• ops/chart: Helm chart for deploying relayer (or other services) to Kubernetes.
• docs/: Static documentation site (Docusaurus).
README for additional insights
• Confirms four core logical layers: Circuits, Contracts, Relayer, SDK.
• Mentions support for native & ERC20 assets, an approved‐address set, and compliance.
Elements
• UI → SDK → Circuits → SDK → (Relayer or direct) → Contracts → Blockchain.
• Contracts → Events → Relayer → SDK → UI.
• Middleware (Relayer + DB) in another.
• On‑chain (Contracts + Blockchain) in a third.
• Deployment/infrastructure (Helm, Kubernetes) in a fourth.