npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

genetrust-sdk

v1.0.0

Published

SDK for interacting with the GeneTrust privacy-preserving genetic data marketplace on Stacks/Bitcoin

Readme

genetrust-sdk

JavaScript/TypeScript SDK for the GeneTrust privacy-preserving genetic data marketplace on the Stacks blockchain (L2 on Bitcoin).

Features

  • Contract clients — interact with GeneTrust Clarity smart contracts (dataset registry, marketplace, verification, compliance)
  • Zero-knowledge proofs — generate and verify gene-presence, gene-variant, and aggregate proofs without revealing raw genetic data
  • Encrypted storage — AES-GCM multi-tier encryption with IPFS-backed decentralized storage
  • Browser SDK — wallet-connected browser API via @stacks/connect
  • Utilities — cryptographic helpers, data formatters (VCF, FASTA, JSON-LD), performance profiler

Installation

npm install genetrust-sdk

Quick Start

Node.js (server-side)

import { GeneTrust } from 'genetrust-sdk';

const sdk = GeneTrust.create();

// Initialize with your Stacks API adapter and contract addresses
await sdk.initialize(stacksApiAdapter, {
  geneticData: { address: 'SP...', name: 'genetic-data' },
  marketplace: { address: 'SP...', name: 'exchange' },
  verification: { address: 'SP...', name: 'attestations' },
  compliance: { address: 'SP...', name: 'data-governance' },
});

// Store encrypted genetic data
const result = await sdk.storeGeneticData(
  { variants: [...], genes: [...] },
  'your-password',
  { generateProofs: true, registerOnChain: true }
);

// Purchase data from the marketplace
const purchase = await sdk.purchaseGeneticData(listingId, 1, buyerAddress);

Browser (wallet-connected)

import { geneTrust } from 'genetrust-sdk/browser';

await geneTrust.initialize({
  stacksNode: 'https://api.testnet.hiro.so',
  contracts: {
    datasetRegistry: { address: 'SP...', name: 'genetic-data' },
    exchange: { address: 'SP...', name: 'exchange' },
  },
  userAddress: 'SP...',
});

// Registers dataset on-chain via wallet (Hiro, Xverse, etc.)
await geneTrust.registerDataset({
  dataId: 12345,
  price: 1000000, // microSTX
  accessLevel: 1,
  storageUrl: 'ipfs://...',
  description: 'BRCA1 variant data',
});

Module Exports

| Import path | Exports | |---|---| | genetrust-sdk | GeneTrust, all classes | | genetrust-sdk/browser | geneTrust (browser SDK) | | genetrust-sdk/contracts | ContractFactory, GeneticDataClient, MarketplaceClient, VerificationClient, ComplianceClient | | genetrust-sdk/storage | StorageFactory, StorageManager, EncryptionManager, IPFSClient | | genetrust-sdk/zk-proofs | ZKProofFactory, GenePresenceProofGenerator, GeneVariantProofGenerator, AggregateProofGenerator, ProofVerifier, ProofUtils | | genetrust-sdk/utils | CryptoUtils, DataFormatter, PerformanceProfiler, profiler, sanitize | | genetrust-sdk/config | Phase2Config, PerformanceConfig |

Zero-Knowledge Proofs

import { ZKProofFactory } from 'genetrust-sdk/zk-proofs';

// Prove a gene is present without revealing the full dataset
const generator = ZKProofFactory.createGenerator('gene-presence');
const proof = await generator.generatePresenceProof(geneticData, 'BRCA1');

// Verify a proof
const verifier = ZKProofFactory.createVerifier();
const result = await verifier.verifyProof(proof, { targetGene: 'BRCA1' });
console.log(result.valid); // true

Supported proof types: gene-presence, gene-variant, aggregate

Encrypted Storage

import { StorageFactory } from 'genetrust-sdk/storage';

const stack = StorageFactory.createGeneticDataStack({
  ipfs: { host: 'localhost', port: 5001 },
  encryption: { keyDerivationIterations: 100000 },
});

// Store with 3-tier access control (basic / detailed / full)
const stored = await stack.storage.storeGeneticData(data, password);

// Retrieve with access level 1 (basic metadata only)
const retrieved = await stack.storage.retrieveGeneticData(stored.storageUrl, password, 1);

Configuration

import { Phase2Config } from 'genetrust-sdk/config';

// Load from environment variables (NODE_ENV, IPFS_HOST, IPFS_PORT)
const config = Phase2Config.fromEnvironment();

// Or create for a specific environment
const prodConfig = Phase2Config.forEnvironment('production');

License

MIT © Deborah Olaboye