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

@vendure/cloud-sealing

v0.7.0

Published

Seals a Vendure Cloud secret to its Cell's key: the sealed-variable v1 format, in Node and in the browser.

Readme

@vendure/cloud-sealing

Seals a Vendure Cloud secret on the machine that holds it, so that Vendure Cloud stores and forwards only ciphertext. A secret is sealed once per purpose: a runtime copy, and for a build-scoped secret also a build copy. The runtime copy is opened only inside the Cell that runs the environment. The build copy is opened only by the build unseal function (vc-sealing-build-unseal) in shared services.

This package holds the sealed-variable v1 format: the HPKE (RFC 9180) construction, the binding of each value to its environment, variable and purpose, the wire shape, and the version tokens a set of sealed values materialises under. The Vendure Cloud CLI, the Vendure Console, the control plane and each Cell's unseal function all use it. It runs in Node and in the browser: its only dependency is hpke, pinned exactly, and every primitive is the platform's WebCrypto.

import {
  SealPurpose,
  SecretPlaintext,
  recipientFromSpki,
  sealValue,
} from "@vendure/cloud-sealing";

// `publicKeySpki` and `fingerprint` come from a sealing key statement the caller has verified.
const recipient = await recipientFromSpki(publicKeySpki, fingerprint);
const sealed = await sealValue({
  recipient,
  environmentId,
  variableKey: "STRIPE_SECRET_KEY",
  purpose: SealPurpose.RUNTIME,
  value: SecretPlaintext.fromString(value),
});

Seal only to a key whose signed statement you have verified for the environment's Cell, with this package's verifySealingKeyStatement and the verifying keys your client ships. A refusal is a SealingKeyStatementRejected whose code (StatementRejection) is stable; its reason is prose.

import {
  parseSignedSealingKeyStatement,
  verifySealingKeyStatement,
} from "@vendure/cloud-sealing";

const verified = await verifySealingKeyStatement(parseSignedSealingKeyStatement(statement), {
  trustedKeys,
  expectedScope: { kind: "cell", cellSlug, accountId, region },
  now: new Date(),
});
const recipient = await recipientFromSpki(verified.publicKeySpki, verified.fingerprint);

vectors/sealed-variable-v1.json is published with the package. Any implementation of the format should open every vector with the recipient key it records, and none under another vector's binding.

@vendure/cloud-sealing/open opens a value whose recipient private key stays in a key service: the caller supplies the ECDH step, such as KMS DeriveSharedSecret, and the opener rebuilds the binding from its own arguments. Vendure Cloud's build unseal function uses it; a client that only seals never imports it.