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

@super-protocol/sp-nvtrust-wrapper

v2.7.0

Published

NodeJS wrapper for nvtrust

Readme

sp-nvtrust-wrapper

A Node.js wrapper for the nvtrust library, designed to enable attestation for NVIDIA Confidential Computing.

📦 Build Instructions

The package supports CPython 3.11 and 3.12 on Linux amd64 with glibc 2.28 or newer. Other Python versions, operating systems, architectures, and musl-based distributions such as Alpine Linux are not supported by postinstall.

To build the project, run:

npm install
npm run postinstall
npm run build

Multi-GPU and NVSwitch attestation

As described by NVIDIA's Blackwell multi-GPU attestation guide, Blackwell systems use the regular GPU flow. The SDK automatically collects evidence for every GPU and returns one EAT bundle containing a GPU-0, GPU-1, ... detached token for each device. Blackwell NVLink fabric is not attested as a separate switch entity, so nvswitchCount is zero even when the platform contains QM3 NVSwitch hardware and CX7 management PFs.

import {
  defaultGPUpolicy,
  NvidiaDeviceType,
  NvtrustWrapper,
} from '@super-protocol/sp-nvtrust-wrapper';

const wrapper = new NvtrustWrapper();
const nonce = NvtrustWrapper.generateNonce();
const topology = await wrapper.getGPUTopology();
const token = await wrapper.getNvidiaToken({
  device: NvidiaDeviceType.GPU,
  nonce,
  ppcieMode: false,
});
await wrapper.validateToken({
  device: NvidiaDeviceType.GPU,
  token,
  policy: defaultGPUpolicy,
});

Hopper/PPCIE systems expose attestable LS10 switches through NSCQ. When nvswitchCount is greater than zero, obtain and validate their separate EAT bundle with the NVIDIA v4 switch policy. The Python SDK requires ppcieMode: false for this standalone evidence-collection call, including on a system whose GPUs and switches are configured in PPCIE/TNVL mode.

import {
  defaultNVSwitchPolicy,
  NvidiaDeviceType,
  NvtrustWrapper,
} from '@super-protocol/sp-nvtrust-wrapper';

const wrapper = new NvtrustWrapper();
const topology = await wrapper.getGPUTopology();
if (topology.nvswitchCount > 0) {
  const token = await wrapper.getNvidiaToken({
    device: NvidiaDeviceType.SWITCH,
    nonce: NvtrustWrapper.generateNonce(),
    ppcieMode: false,
  });
  await wrapper.validateToken({
    device: NvidiaDeviceType.SWITCH,
    token,
    policy: defaultNVSwitchPolicy,
  });
}

nvswitchCount is specifically the number of LS10 switches that can supply attestation evidence through NSCQ. It is not a count of all physical fabric components across NVIDIA architectures.

Certificate GPU interconnect information

After processing the client interconnect metadata and validating the NVIDIA tokens, a relying party can build the protobuf value intended for the GPU interconnect certificate extension:

import {
  NvidiaGpuInterconnectStatus,
  NvtrustWrapper,
} from '@super-protocol/sp-nvtrust-wrapper';

// switchToken has already passed defaultNVSwitchPolicy validation.
const switches = switchToken
  ? NvtrustWrapper.extractNVSwitchInfoFromToken(switchToken)
  : [];
const interconnectInfo = NvtrustWrapper.createNvidiaGpuInterconnectInfo(
  NvidiaGpuInterconnectStatus
    .NVIDIA_GPU_INTERCONNECT_NVLINK_SWITCH_ATTESTATION_VERIFIED,
  switches,
);

extractNVSwitchInfoFromToken() only decodes claims; it does not verify JWT signatures. Use it only after successful validation with defaultNVSwitchPolicy. createNvidiaGpuInterconnectInfo() ensures that switch details are present only for the verified LS10 status. The relying party chooses the final status from client-provided topology metadata and the token validation results; the wrapper does not treat NVML topology as an NVIDIA attested claim. The certificate issuer should omit the interconnect extension for a single GPU. For multiple GPUs, use DISCONNECTED when NVML reports no peer path, DIRECT_UNVERIFIED for a test-policy direct path, NVLINK_SWITCH_ATTESTATION_NOT_APPLICABLE for Blackwell, and NVLINK_SWITCH_ATTESTATION_VERIFIED only after LS10 token validation.

postinstall selects the lock file for the active Python minor version and installs only the exact wheel and SHA-256 hash recorded for every direct and transitive dependency.

Updating Python dependencies

Edit the direct dependencies in py/requirements.in, then regenerate both locks in the manylinux 2.28 image:

docker run --rm --platform linux/amd64 --user "$(id -u):$(id -g)" --env HOME=/tmp \
  -v "$PWD:/work" -w /work \
  quay.io/pypa/manylinux_2_28_x86_64 \
  /opt/python/cp311-cp311/bin/python tools/generate_python_lock.py

docker run --rm --platform linux/amd64 --user "$(id -u):$(id -g)" --env HOME=/tmp \
  -v "$PWD:/work" -w /work \
  quay.io/pypa/manylinux_2_28_x86_64 \
  /opt/python/cp312-cp312/bin/python tools/generate_python_lock.py

Validate the generated files before committing them:

python3 tools/verify_python_locks.py