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

@pacrypto55/privy-2fa

v1.1.0

Published

Privy TOTP two-factor authentication for Orderly DEXes. Lets a connected user enable/disable 2FA (QR enrollment + verification code) and auto-triggers Privy's MFA challenge right after login. Adds itself as a row in the shared @pacrypto55/wallet-menu 'Pri

Readme

@pacrypto55/privy-2fa

Privy TOTP two-factor authentication for Orderly Network DEXes. Lets a connected user enable/disable 2FA (QR code enrollment + verification code) and auto-triggers Privy's own MFA challenge right after login. Adds itself as a row in the shared @pacrypto55/wallet-menu "Privy Wallet" button — installing this plugin alone is enough, it registers the host automatically if it isn't already.

Install

npm install @pacrypto55/privy-2fa
# or
pnpm add @pacrypto55/privy-2fa
# or
yarn add @pacrypto55/privy-2fa

Peer dependencies: react, react-dom, @privy-io/react-auth, @orderly.network/plugin-core, @orderly.network/ui, @orderly.network/ui-scaffold, and @pacrypto55/wallet-menu (all installed automatically alongside it). QR code rendering (qrcode.react) is bundled into this package directly rather than left as a peer dependency, so it can't be shadowed by an unrelated, incompatible version another package in your app happens to pull in.

Usage

import { registerPrivy2faPlugin } from "@pacrypto55/privy-2fa";

<OrderlyAppProvider
  plugins={[registerPrivy2faPlugin() /* , ...your other plugins */]}
  // ...
>
  {/* your app */}
</OrderlyAppProvider>;

That's it — no manual wiring needed. The "Privy Wallet" button appears in the top nav bar the first time any plugin that depends on it (this one, or @pacrypto55/privy-onramp) is registered.

With custom options

registerPrivy2faPlugin({
  enableLabel: "Enable 2FA",
  disableLabel: "Disable 2FA",
  disableWarning: "Are you sure you want to disable two-factor authentication? This will make your account less secure.",
  signMessage: "Sign this message for 2FA verification", // signed right after login to establish the MFA session
})

What it does

  • Enable/Disable 2FA row in the Privy Wallet menu: walks the user through TOTP enrollment (QR code + manual key + 6-digit verification) via Privy's useMfaEnrollment(), or unenrolls with a confirmation step.
  • Post-login MFA trigger: right after a user with 2FA already enabled logs in, silently requests a personal_sign from their embedded wallet to establish the MFA session before any other dialog can open — this is what makes Privy's own MFA popup work reliably instead of racing with other UI.

API

registerPrivy2faPlugin(options?)

| Property | Type | Default | Description | |---|---|---|---| | enableLabel | string | "Enable 2FA" | Row label when 2FA is not yet enabled. | | disableLabel | string | "Disable 2FA" | Row label (and dialog title) when 2FA is already enabled. | | disableWarning | string | see above | Confirmation copy shown before disabling. | | signMessage | string | "Sign this message for 2FA verification" | Message signed by the embedded wallet right after login to establish the MFA session. |

Development

npm install
npm run dev         # tsup --watch
npm run build
npm run typecheck

License

MIT