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

sealx-sdk

v1.0.32

Published

JavaScript/TypeScript SDK for interacting with the SealX browser extension

Readme

sealx-sdk

JavaScript/TypeScript SDK for interacting with the SealX browser extension.

Installation

npm install sealx-sdk

Usage

import { initSealx, bindSealx, signBySealx, isSealxActive } from 'sealx-sdk';

// Check if extension is active
const isActive = await isSealxActive();
if (!isActive) {
  console.warn('SealX extension is not available');
  return;
}

// Initialize session
await initSealx('user-123');

// Bind public key
const publicKey = await bindSealx();

// Sign a document
const signature = await signBySealx({
  taskId: 'doc-123',
  data: 'document content',
});

Side Panel Gesture Relay

sealx-component is an HTML boolean attribute that enables buttons to trigger signing operations from within Chrome's Side Panel mode.

Why? In Chrome Side Panel mode, signBySealx() internally calls sidePanel.open() to open the side panel — this step requires a real user click (browser gesture verification). If you invoke signBySealx() purely via JavaScript, the browser will refuse to open the side panel. Adding the sealx-component attribute to your button lets the SDK automatically bridge the click event, ensuring the sign request carries a valid user gesture.

How? Just add the sealx-component attribute to your existing sign button:

<button sealx-component onclick="handleSign()">Sign</button>

The sealx-component attribute only enables gesture relay — it does not dictate how you bind the click handler. You can use onclick, addEventListener, or framework-specific event binding (React onClick, Vue @click, etc.).

The SDK handles the rest automatically:

  • Scans all elements with the sealx-component attribute on page load and attaches gesture bridge markers
  • Uses MutationObserver to continuously watch for dynamically added elements (e.g. from React/Vue render)
  • No manual initialization required
import { signBySealx } from 'sealx-sdk';

// Signing must be triggered by a user click on a sealx-component button
async function handleSign() {
  const signature = await signBySealx({
    taskId: 'doc-456',
    data: 'document content',
  });
  console.log('Signing complete:', signature);
}

Note: The attribute name must be exactly sealx-component. It is a boolean attribute — do NOT assign a value. Writing <button sealx-component="true"> is misleading, and <button sealx-component="false"> will still activate it because any non-empty value makes the attribute present. Always use <button sealx-component>.

Browser Extension Integration

The SealX browser extension must be installed for this SDK to work.

Message Channels

  • MessageChannel.BACKGROUND - Background script communication
  • MessageChannel.POPUP - Popup window communication
  • MessageChannel.CONTENT - Content script communication

API Reference

Initialization Functions

  • isSealxActive() - Check if extension is installed and active
  • initSealx(userId) - Initialize session with user ID
  • connectSealx(userId?) - Connect/reconnect to extension
  • checkSealx() - Health check extension status

Signing Functions

  • bindSealx(userId?) - Bind public key to account
  • signBySealx(task, userId?) - Sign single task
  • signBySealx(tasks[], userId?) - Batch sign (returns AsyncGenerator)
  • sendSignResponse(taskId, error?) - Send sign response
  • onSign(callback, taskId?) - Listen for sign responses

Utility Functions

  • isSessionAvailable() - Check if valid session exists
  • closeSealx() - Close extension connection
  • checkSealxActive(callback) - Monitor activation status
  • registerLocatableKeys(keys) - Register locatable keys
  • onLocateElement(callback?) - Listen for element location requests
  • setupSealxActions() - Scan and bridge sealx-component elements for gesture relay

Types

  • SealxSignTask - Task data structure
  • SealxProvider - Window provider for extension communication

License

MIT