Logo
Infrastructure

Custom NPM Packages Development

Open source NPM packages for blockchain development including Indexed Merkle Tree, SnarkJS to Solana, and Sparse Merkle Tree implementations.

Client: 7Block LabsAugust 1, 20254 min read

Key Outcomes

3

Packages Published

Open Source

License

ZK + Blockchain

Focus Area

Active

Maintenance

Project Overview

As part of our commitment to the blockchain ecosystem, we develop and maintain open source NPM packages that solve common challenges in ZK and blockchain development. These packages are used in production by our own projects and are available for the community.

Packages

1. Indexed Merkle Tree

Repository: github.com/jayanth-kumar-morem/indexed-merkle-tree

A TypeScript implementation of Indexed Merkle Trees, providing efficient key-value storage with cryptographic proofs of inclusion and non-inclusion.

TypeScriptNode.jsPoseidon HashMerkle Trees

Features:

  • Insert, update, and delete operations with proof generation
  • Non-membership proofs for key absence verification
  • Configurable tree depth and hash functions
  • Optimized for ZK circuit compatibility

Use Cases:

  • State management in ZK rollups
  • Efficient blockchain light clients
  • Privacy-preserving data structures
  • Membership verification systems

Indexed Merkle Trees enable efficient proofs of both inclusion AND non-inclusion, making them ideal for nullifier-based systems like voting and token transfers.

Installation:

npm install indexed-merkle-tree

2. SnarkJS to Solana

Repository: github.com/jayanth-kumar-morem/snarkjs-to-solana

A utility library that bridges SnarkJS proof generation with Solana's on-chain verification, enabling ZK proof verification in Solana programs.

TypeScriptSnarkJSSolanaGroth16

Features:

  • Convert SnarkJS proofs to Solana-compatible format
  • Generate verification key constants for Solana programs
  • Support for Groth16 proof system
  • TypeScript and Rust code generation

The Problem: SnarkJS generates proofs in a format optimized for EVM verification. Solana uses a different field representation and proof format. Manual conversion is error-prone and time-consuming.

The Solution: Our library handles the conversion automatically:

import { convertProof, generateVerificationKey } from 'snarkjs-to-solana';

// Convert proof for Solana
const solanaProof = convertProof(snarkjsProof);

// Generate Rust verification key
const rustCode = generateVerificationKey(vkey);

Use Cases:

  • ZK voting systems on Solana
  • Private transactions
  • Identity verification
  • Cross-chain bridges with ZK verification

This package powers the ZK verification in both Cloak Minster Ballot and Meridian Link, demonstrating its production readiness.

Installation:

npm install snarkjs-to-solana

3. Sparse Merkle Tree

Repository: github.com/jayanth-kumar-morem/sparse-merkle-tree

A high-performance Sparse Merkle Tree implementation optimized for blockchain applications with support for various hash functions.

TypeScriptNode.jsPoseidon HashSHA256Keccak256

Features:

  • Efficient storage for sparse data
  • Multiple hash function support (Poseidon, SHA256, Keccak)
  • Inclusion and non-inclusion proofs
  • Batch operations for gas optimization
  • Persistent storage backends

Why Sparse Merkle Trees?

Standard Merkle trees are inefficient for sparse data—most leaves are empty. Sparse Merkle Trees use a clever optimization:

Tree TypeEmpty StorageProof Size
Standard MerkleO(2^n)O(n)
Sparse MerkleO(k)O(n)

Where n is tree depth and k is number of non-empty leaves.

Use Cases:

  • Blockchain state commitments
  • Nullifier tracking in privacy protocols
  • Efficient set membership proofs
  • Account balance trees

Installation:

npm install sparse-merkle-tree

Why We Build Open Source

Our open source work serves multiple purposes:

  1. Ecosystem Contribution: Give back to the community that supports blockchain development
  2. Quality Assurance: Public code undergoes community review and battle-testing
  3. Hiring Pipeline: Demonstrates our technical capabilities to potential clients and team members
  4. Internal Efficiency: Building reusable tools accelerates our own project development

Package Quality Standards

All our packages follow strict quality guidelines:

  • 100% TypeScript: Full type safety and IDE support
  • Comprehensive Tests: Unit and integration test coverage
  • Documentation: README, API docs, and usage examples
  • Semantic Versioning: Predictable version management
  • Continuous Integration: Automated testing on every commit
  • Security Audits: Regular dependency and code audits

Results & Impact

Our NPM packages represent our commitment to advancing blockchain infrastructure:

  • Production Tested: Used in our own deployed applications
  • Community Adoption: Downloaded and used by other developers
  • Active Maintenance: Regular updates and bug fixes
  • Responsive Support: GitHub issues addressed promptly

These packages demonstrate our deep understanding of cryptographic primitives and blockchain development patterns, making them a foundation for our client projects.

See More Projects Like This

Got a project in mind?

Let us help build the technologies around your needs.

Contact us
7BlockLabs

Full-stack blockchain product studio: DeFi, dApps, audits, integrations.

7Block Labs is a trading name of JAYANTH TECHNOLOGIES LIMITED.

Registered in England and Wales (Company No. 16589283).

Registered Office address: Office 13536, 182-184 High Street North, East Ham, London, E6 2JA.

© 2025 7BlockLabs. All rights reserved.