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

@opensecret/react

v3.5.2

Published

This repository contains the TypeScript/React and Rust clients used by Maple and OpenSecret's internal applications. Both clients establish attested, end-to-end encrypted sessions with an OpenSecret backend and expose the API surface needed by those appli

Readme

OpenSecret SDKs

This repository contains the TypeScript/React and Rust clients used by Maple and OpenSecret's internal applications. Both clients establish attested, end-to-end encrypted sessions with an OpenSecret backend and expose the API surface needed by those applications.

The developer/platform API remains part of the TypeScript SDK for internal OpenSecret workflows. This repository does not maintain or deploy a separate documentation website; keep behavior documentation close to the exported code and tests.

Repository layout

  • src/ — @opensecret/react, including the React providers, encrypted API client, attestation policy, model/conversation APIs, and internal developer platform client.
  • rust/ — the opensecret crate used by native clients.
  • docs/PLATFORM.md — internal developer/platform API notes.
  • .github/workflows/ — TypeScript and Rust validation.

Security model

For non-local endpoints, both SDKs require HTTPS, verify AWS Nitro attestation, and enforce an environment-scoped PCR0 trust policy before completing key exchange. Official PCR0 histories are signed and bundled with the SDKs.

Mock attestation is limited to exact loopback development endpoints (plus the documented Android emulator alias in the Rust SDK). Do not weaken attestation, PCR0 validation, or encrypted transport to accommodate a caller.

The SDKs use operating-system or Web Crypto randomness for keys, nonces, and session material. Never substitute deterministic or convenience randomness in production paths.

TypeScript/React SDK

Install the package:

bun add @opensecret/react

Wrap the application with OpenSecretProvider and supply the backend URL and client ID:

import { OpenSecretProvider } from "@opensecret/react";
import type { ReactNode } from "react";

export function AppProviders({ children }: { children: ReactNode }) {
  return (
    <OpenSecretProvider
      apiUrl="https://api.example.com"
      clientId="00000000-0000-0000-0000-000000000000"
      pcrConfig={{ environment: "production" }}
    >
      {children}
    </OpenSecretProvider>
  );
}

Use useOpenSecret for authentication, encrypted application APIs, conversations, inference, and account operations. Internal developer tooling uses OpenSecretDeveloper and useOpenSecretDeveloper; preserve that surface when changing the public exports.

Development

Use the pinned Nix shell and Bun version:

nix develop --no-update-lock-file
bun install --frozen-lockfile --ignore-scripts
bun run format:check
bun run build
bun test --timeout 30000

Live integration tests read the variables documented in .env.example. Use disposable test accounts and never commit credentials.

Inspect the publishable npm artifact with:

bun run pack

Only dist/ is included in the package.

Publish a freshly built npm artifact with:

just publish-npm

Rust SDK

Add the crate to a Rust application:

[dependencies]
opensecret = "3"

The primary entry point is OpenSecretClient. See rust/README.md for native client examples and transport details.

Run the Rust validation from the repository root:

nix develop --no-update-lock-file -c bash -lc '
  cd rust
  cargo fmt --all -- --check
  cargo clippy --locked --all-targets --all-features -- -D warnings
  cargo test --locked --all-features
  cargo doc --locked --no-deps --all-features
'

Integration tests use the variables documented in rust/.env.example and are separate from the default local validation path.

Publish the locked Rust crate with:

just publish-cargo

Change discipline

  • Keep the TypeScript and Rust attestation policies aligned intentionally; neither SDK's passing tests prove parity with the other.
  • Treat API compatibility, authentication state, encrypted retry behavior, and PCR policy changes as security-sensitive.
  • Update source comments and focused tests with behavior changes instead of regenerating a standalone documentation site.
  • Validate the built npm package and Rust crate boundary before publishing a release.

License

MIT