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

@cognitiveproof/softbinding-api-plugin-vsmark

v1.0.0

Published

Variation-selector text watermarking soft binding extractor for the C2PA Soft Binding Resolution API server

Readme

@cognitiveproof/softbinding-api-plugin-vsmark

Text-watermarking Extractor for @cognitiveproof/softbinding-api-server — the C2PA Soft Binding Resolution API server.

Hides a soft binding value inside plain-text or HTML content using invisible Unicode variation selectors. The carrier text displays unchanged (variation selectors are invisible to renderers and ignored by most text processing), but a watermarked copy can be traced back to the original binding even after metadata is stripped.

Install

npm install @cognitiveproof/softbinding-api-server @cognitiveproof/softbinding-api-plugin-vsmark

Usage

Register vsmarkExtractor so the server can recover binding values from watermarked text assets via POST /v1/matches/byContent and POST /v1/matches/byReference:

import { createServer } from '@cognitiveproof/softbinding-api-server';
import { vsmarkExtractor, VSMARK_ALGORITHM } from '@cognitiveproof/softbinding-api-plugin-vsmark';

const app = createServer({
  extractors: { [VSMARK_ALGORITHM]: vsmarkExtractor },
});

When publishing an asset, embed the manifest's binding value into its text using encode():

import { encode } from '@cognitiveproof/softbinding-api-plugin-vsmark';

const watermarkedArticle = encode(bindingValue, articleText);

decode() is also exported directly, for recovering a hidden value outside of createServer():

import { decode } from '@cognitiveproof/softbinding-api-plugin-vsmark';

const bindingValue = decode(watermarkedArticle); // string | undefined

API

| Export | Description | | ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | vsmarkExtractor | An Extractor ((buffer, mimeType) => Promise<string \| null>). Decodes buffer as UTF-8 and returns the hidden binding value, or null if the asset isn't text or contains no watermark. | | VSMARK_ALGORITHM | The algorithm name 'com.cognitiveproof.vsmark.v1', for use as a key in createServer({ extractors }) and reflected in GET /v1/services/supportedAlgorithms. | | encode(secretMessage, carrierText) | Returns carrierText with secretMessage hidden inside it via invisible variation selectors. | | decode(text) | Returns the hidden message previously embedded with encode(), or undefined if none is found. |

How it works

Each byte of the message is encoded as one of 256 Unicode variation selectors (U+FE00–U+FE0F and U+E0100–U+E01EF) inserted after a character of the carrier text. The hidden payload is wrapped in a small framed format — a "VSR1" magic number, version byte, length-prefixed UTF-8 payload, and a CRC32 checksum — so decode() can reliably locate and validate the hidden data even if it's embedded partway through a larger text.

License

MIT