Inspiration
The idea for HydraJTS was born while reflecting on two things:
The multi-headed nature of Hydra on Cardano — a metaphor for scaling and parallelism.
The DOM (Document Object Model) in web development is where multiple elements and instances can coexist and update dynamically.
I realized that Zero-Knowledge Proofs (ZKProofs) on Midnight were being executed in a synchronous, one-by-one manner, much like waiting in a single-file line. Yet the proof server itself was capable of handling multiple incoming requests.
The thought struck me: What if we could replicate DOM-like instance behavior for proofs? By canceling out repetitive objects and managing state more intelligently, we could achieve true asynchronicity without bloating resources. From that seed, HydraJTS emerged.
What it does
HydraJTS enables truly asynchronous Zero-Knowledge Proof calls on Midnight. Instead of blocking the UI while each proof resolves sequentially, developers can now:
Launch multiple proofs in parallel.
Keep the UI responsive while proofs return in the background.
Manage proof state dynamically, cancel redundant calls, and integrate results seamlessly.
The result: fluid, modern DApps that feel fast and scalable, even when running many proofs at once.
How we built it
Compact was used for proof logic and circuits.
Node.js + React/JavaScript for the front end.
A multi-instance proof manager that orchestrates proof calls to the Midnight proof server.
DOM-like replication principles: only keep unique, necessary objects, cancel duplicates, and merge results back smoothly.
Challenges we ran into
Concurrency management: avoiding race conditions when multiple proofs returned simultaneously.
State pruning: ensuring lightweight handling of replicated objects without memory bloat.
Developer abstraction: making HydraJTS easy to use without forcing developers to adopt a whole new model.
Accomplishments that we're proud of
Built a working demo showing the difference between the old locked-in way and the HydraJTS asynchronous way.
Reduced proof execution time from cumulative (sum of all proofs) to parallel (maximum of proof times).
Created a new protocol pattern that can be adopted across multiple Midnight DApps.
What we learned
User experience matters: Even small proof delays can make an app feel clunky.
Proof servers are capable of more — it’s about how you structure calls, not just raw computation.
Parallelism unlocks creativity: Developers can now design richer, multi-proof interactions without worrying about freezes.
What's next for HydraJTS Protocol
Open-sourcing the library for other Midnight developers.
Building developer tools and documentation to simplify adoption.
Exploring multi-proof orchestration patterns — e.g., dependency chaining, proof cancellation, and batching strategies.
Integration with real-world DApps like identity, finance, and gaming to showcase speed and scalability.
Log in or sign up for Devpost to join the conversation.