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

@elacity-js/crypto-protocol

v1.0.14

Published

Cryptographic Protocol packaged as Webassembly

Readme

elacity-drm-cryptographyic-protocol

CI npm version

Cryptographic Protocol to manage key exchanges with smart contracts

Development notes

What we are building here is a wasm-based component, debugging it or even testing as wasm compiled program is quite tricky, so for develoment we will use HTTP and keep all the core decoupled from its output (normal binary for HTTP and wasm for the final output)

Though you can find samples in ./samples and serve the folder as static webserver with

python -m SimpleHTTPServer 8000

Then go to http://localhost:8000

cd samples & mkdir -p video

# not make sure to add a video in video folder
# fragment it
mp4fragment video/<source> video/frag.sample.mp4

# then encrypt

mp4dash \
-v -d --force \
--use-segment-list \
--use-segment-timeline \
--subtitles --clearkey \
--encryption-cenc-scheme=cenc \
--encryption-args="--global-option mpeg-cenc.eme-pssh:true --pssh bf8ef85d2c54475d8c1ee27db60332a2:pssh.json" \
--encryption-key=1064dbc48cc35c7fa724f6e723e73e49:933ea3404d78463c86fcbd1913323389 \
video/frag.sample.mp4 -o video/output

Not here we have a new system Id bf8ef85d-2c54-475d-8c1e-e27db60332a2 where we set PSSH information. This key system is not natively suported by any browser but the dash manifest and media controller can handle it through EME encrypted event as a Common Encryption derivated. The most important is that we can register it during encryption and set it in media header as PSSH Box, we can trigger our own flow from it and use thes specific data from the box to secure the license exchange flow with the wasm component we are building here.

{
  "protectionType": "cenc:web3-drm-v1",
  "variant": "eth.web3.keystore",
  "ciphersuite": "e8582013",
  "data": {
    "authority": "0x1A8A4b017B32292c4e5ADcAeE48311c5c1A373bF",
    "chainId": 21,
    "rpc": "https://api-testnet.elastos.io/eth",
    "keystoreUrl": "https://staging.ela.city/api/2.0/keystore"
  }
}