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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@shutter-network/shutter-sdk

v0.0.2

Published

TypeScript SDK for interacting with the Shutter crypto library, providing encryption, decryption, and utilities.

Readme

Shutter SDK

Description

This is the Shutter SDK for the Shutter Network. It is a TypeScript library that provides functions for encrypting and decrypting data using the Shutter Network's encryption protocol.

Installation

npm install @shutter-network/shutter-sdk

⚠️ Asset Placement (Required for Browser Usage)

If you're using this SDK in a browser environment (e.g., React, Next.js, etc), the SDK dynamically loads blst.js and blst.wasm files. You must make these files available to the browser by placing them in your public/static directory:

my-app/
├── public/
│   ├── blst.js
│   └── blst.wasm

Both these files are available in the sdk under src/crypto/blst. Copy it from there.

To avoid manually copying the blst.js and blst.wasm files, you can add a postinstall script in your project's package.json:

{
  "scripts": {
    "postinstall": "cp node_modules/@shutter-network/shutter-sdk/dist/blst.js public/blst.js && cp node_modules/@shutter-network/shutter-sdk/dist/blst.wasm public/blst.wasm"
  }
}

Run the following command to trigger the script: npm install

Vite-Specific Optimization issue

If you're using Vite and encounter errors like:

The dependency might be incompatible with the dep optimizer. Try adding it to optimizeDeps.exclude.

You may need to exclude the SDK from optimization. Add this to your vite.config.ts:

export default defineConfig({
  ...
  optimizeDeps: {
    exclude: ['@shutter-network/shutter-sdk'],
  },
});

Encryption

import { encryptData } from "@shutter-network/shutter-sdk";

const msgHex = "0x1c";
const eonKeyHex = "0x8b36251faf28be849a2ca9212ae7ceeb6b6848d58a3d5d77e1629c9d7ebdee3dad594c6af6b66e7a6e4b27e54778b8fd1491868c2938c93285be79168c0210d632a2a553f6b03940dd08312d32ea718e0f8c4488f39e6f34e27add4506631ddb";
const identityPreimageHex = "0x8c4e6301fba207fb2375d2fda9f2ebe1142d07d1954d871e2d71b3d93534380793b99fb184f7526012a49ac1a22300fac22dc1d7";
const sigmaHex = "0x312c10b186086d502ba683cffc2ae650d53b508904b3c430df8e7d5aa336c0f5";

// Call encryptData function
const encryptedData = await encryptData(msgHex, identityPreimageHex, eonKeyHex, sigmaHex);
console.log("Encryption successful:", encryptedData);

Decryption

import { decrypt } from "@shutter-network/shutter-sdk";

const encryptedData = "0x03a975256b0098bc981da31762a73e50a07c79f5bf3e17c44121b9567033cedaf9e203f0300b709dec3458a88baa18963c0e503f437bff7adb31231941585ea1bb14e8ce98c7dc1471666e4b07c592cbeda30acc22f23dcb84d58d41848e72af0804d348d5c5cb65a52dc3b697ea4caae9679b97e395a30807f9657ebc85bbf2fcadaa9a458a86bffb78dde89f7626a26eb84f4781d3b6759c06629ea321a8b757"
const decryptionKey = "0x81cfcfceebfc69b3cb3fe074f4b3751e7844f6d62b3040563ccb3a2430110f259d109519c73682735f4c02651492c740"

// Call decrypt function
const decryptedData = await decrypt(encryptedData, decryptionKey);
console.log("Decryption successful:", decryptedData);

Test

npm run test

Build

npm run build

Support

Feel free to open an issue on GitHub