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

@repux/repux-lib

v0.8.0

Published

RepuX encryption/decryption library

Readme

RepuX Lib

This library helps developers using RepuX protocol. It supports file encryption, decryption and storage (including in-browser uploading and downloading) of files on IPFS.

Quickstart

Installation

npm install @repux/repux-lib

Usage

import IpfsAPI from 'ipfs-api';
import { RepuxLib } from '@repux/repux-lib';
const repux = new RepuxLib(new IpfsAPI({
    host: 'marketplace-ipfs.repux.io',
    port: 443,
    protocol: 'https'
}));
const version = repux.getVersion();
console.log(version);

API Reference

API Reference is available here

How it works

  1. Data seller should generate RSA key pair using RepuxLib.generateAsymmetricKeyPair() function. This key pair should be stored on user local device.
  2. Data seller should generate AES symmetric key using RepuxLib.generateSymmetricKey() function. This key should be generated per file and should be also stored on user local device.
  3. Data seller uploads file using RepuxLib.createFileUploader().upload() function with symmetricKey, publicKey and file in parameters.
    • Library reads file partially encrypts it symmetrically using AES-PCBC algorithm.
    • Library encrypts first 190 bytes of file asymmetrically using seller publicKey.
    • Library uploads all file parts to ipfs storage.
    • Library uploads meta file containing all file parts, size, name and other meta data to ipfs storage.
    • Library emits progress event with uploading progress.
    • Library emits finish event with ipfs hash to meta file after upload is finished.
  4. Data buyer should generate RSA key pair using RepuxLib.generateAsymmetricKeyPair() function. This key pair should be stored on user local device.
  5. Data buyer communicates somehow with data seller and sends him his publicKey.
  6. Data seller re-encrypts first part of file using RepuxLib.createFileReencryptor().reencrypt() function with his privateKey and buyer publicKey and meta file hash.
    • Library fetches meta file.
    • Library fetches first file part.
    • Library decrypts first file part using seller privateKey.
    • Library encrypts first file part using buyer publicKey.
    • Library uploads new meta file (with changed first part) to ipfs and emits progress and finish events as uploadFile function.
  7. Data seller encrypts file symmetricKey using buyer publicKey.
  8. Data seller communicates somehow with data buyer and sends him re-encrypted file meta hash and encrypted file symmetricKey
  9. Data buyer decrypts file symmetricKey with his privateKey.
  10. Data buyer downloads file using RepuxLib.createFileDownloader().download() function with symmetricKey, privateKey and re-encrypted file meta hash.
    • Library downloads meta file
    • Library downloads first file part, decrypts it using buyer privateKey and after that using symmetricKey
    • Library downloads other file part and decrypts them using symmetricKey
    • Library emits progress event with downloading progress.
    • Library joins all file parts into one file and exposes url to file in finish event.

Browser compatibility

| Browser | Type | Is supported | Max file size | Notes | | ------- | ------- |:------------:| -----------------------:| ----- | | Chrome | Desktop | ✓ | 100GB | Access to the WebCrypto API is restricted to secure origins (which is to say https:// pages). | | Firefox | Desktop | ✓ | 2GB(64-bit) 1GB(32-bit) | | | Safari | Desktop | ✓ | 2GB(64-bit) 1GB(32-bit) | | | Opera | Desktop | ✓ | 100GB | | | Brave | Desktop | ✓ | 100GB | | | IE | Desktop | ✗ | - | Web Crypto API must be prefixed, needs async/await polyfill | | Edge | Desktop | ✗ | - | Web Crypto API is not supported insize a Web Worker (https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7607496/), needs TextEncryptor/TextDecryptor polyfill | | Chrome | Mobile | ✓ | 100MB | Access to the WebCrypto API is restricted to secure origins (which is to say https:// pages). | | Firefox | Mobile | ✓ | 100MB | | | Safari | Mobile | Not tested | - | |

Want to help?

Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing