4.4 Privacyx SDK (JS/TS) - Unifying Interface Layer

The Privacyx SDK is the integration backbone of Privacyx. It provides:

  • a consistent interface for PXP modules,

  • shared proof parsing and validation utilities,

  • event listeners aligned with on-chain semantics,

  • reference backends (Status API server example).

SDK module map

flowchart LR
  SDK[Privacyx SDK] --> M101[PXP-101 Balance Pass Module]
  SDK --> M102[PXP-102 Identity Pass Module]
  SDK --> M103[PXP-103 Reputation Pass Module (future)]
  SDK --> H[ZK Helpers\nGroth16 parsing + pubSignals parsing]
  SDK --> API[Reference Status API\n(PXP-102 server example)]

SDK usage flow (typical integrator)

  • read root + parameters,

  • build or load proof + pubSignals,

  • submit proof,

  • listen to events.

Proof IO parsing helpers (critical)

parseGroth16Proof and parsePubSignals exist to guarantee:

  • stable JSON shape,

  • consistent bigint conversion,

  • predictable ordering of public signals across modules.

This is not cosmetic: inconsistent parsing is one of the most common integration failure points for Groth16 pipelines.

Last updated