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

@cubid/browser

v0.2.1

Published

Headless browser helpers for Cubid OTP, hosted verification, approval, and allow flows.

Readme

@cubid/browser

Headless browser helpers for Cubid hosted verification, OTP, Allow Page, ClearPass Verify, and provider handoff flows.

When To Choose This Package

Use @cubid/browser when you need Cubid's browser-safe helper layer but do not want a React dependency. Choose @cubid/react only when you need React components or hooks on top of this package.

Install

npm install @cubid/browser

Registry Availability

  • npm: supported
  • JSR: not published by policy

API Reference

  • JSON reference: ../../docs/reference/api/browser.json
  • Package matrix: ../../README.md

Basic Usage

import { createCubidWeb2Client } from "@cubid/browser"
import { createCubidApiClient } from "@cubid/core"

const apiClient = createCubidApiClient({
  apiKey: process.env.CUBID_API_KEY!,
  dappId: process.env.CUBID_DAPP_ID!,
})

const browserClient = createCubidWeb2Client(apiClient)

This package is headless by design. It does not ship React components and does not require a root provider.

Hosted Flow Helpers

@cubid/browser keeps browser-safe hosted helpers out of @cubid/core and out of React-specific packages. Today that includes:

  • Allow Page URL helpers
  • OTP flow orchestration
  • hosted verification URL builders
  • ClearPass Verify URL builders
  • hosted SIWC approval/rejection request descriptors
  • hosted paytag action opener

Use this package when your app needs browser-facing Cubid flow helpers but should not embed Cubid API keys, server credentials, or private approval logic in the browser bundle.

Hosted SIWC Approval Descriptors

Passkey-approved wallet creation and signing approval remain Passport-hosted. @cubid/browser now exposes descriptor builders for those hosted approval and rejection routes:

import {
  buildHostedSiwcAccountRequestAction,
  buildHostedSiwcSigningRequestAction,
} from "@cubid/browser"

const approveAccount = buildHostedSiwcAccountRequestAction({
  accountRequestId: "siwc_acct_req_123",
  decision: "approve",
})

const rejectSigning = buildHostedSiwcSigningRequestAction({
  decision: "reject",
  signingRequestId: "siwc_req_456",
})

Each helper returns a launcher-ready descriptor with:

  • url
  • method
  • credentials
  • headers
  • body

The descriptor currently sets credentials: "include" so a browser fetch call will send the authenticated Passport session cookie during the hosted approval or rejection step.

These helpers are intentionally thin. They prepare the browser-safe request shape for Passport-hosted approval flows, but they do not bypass Passport user authentication, fresh passkey step-up, or app policy checks.

Use them only in environments where the authenticated Passport user session is already expected to perform the approval or rejection step.

Hosted Paytag Actions

@cubid/browser exposes openHostedPaytagAction(...) for server-created Cubid hosted paytag action URLs returned by @cubid/core's startHostedPaytagAction(...).

import { openHostedPaytagAction } from "@cubid/browser"

openHostedPaytagAction(action.hostedUrl)

The helper only opens /pay-to/actions/complete URLs that already include a server-created action_token, and it rejects URL query parameters that look like dapp API keys. It never creates action tokens and does not accept dapp API keys. Create hosted paytag actions server-side through @cubid/core. The /pay-to/actions/complete path is backend wire compatibility; the public browser SDK API is Paytag-only.

Signed-in owner-management wrappers for paytag stamp and grant routes remain deferred until the SDK has a Cubid-authenticated user-session pattern ready for bearer-token calls.