Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@bsv/btms-permission-module-ui

Latest version: v1.0.1

Overview

Last scanned
30 Nov 2026
Published
30 Nov 2026
npm package Publisher: braydude, dkellen, johngalt5, loftsteinn, mojaber, tyeverett
9 Stars
30 Forks
2 Versions
247 Downloads
TypeScript Repo language

Scan summary

@bsv/btms-permission-module-ui was last scanned on 30 Nov 2026 at version 1.0.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions; the latest was published on 30 Nov 2026.
  • Findings: No rules fired in version 1.0.1.
  • Downloads: 247 downloads.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.0.1 LATEST 30 Nov 2026 No rules fired
1.0.0 16 Feb 2026 Not shown

No rules fired in 1.0.1

Findings

Findings for v1.0.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.0.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

BTMS Permission Module UI

React/MUI UI components for BTMS token spending authorization.

Overview

This package provides ready-to-use React components with Material-UI styling for the BTMS Permission Module. It works in conjunction with @bsv/btms-permission-module (core package).

Target Audience

This UI package is for wallet developers integrating BTMS token support into BRC-100 wallets via BRC-98/99 hooks, using React/MUI for prompts.

Related Docs

  • Project index: ../README.md
  • Main BTMS API package (@bsv/btms): ../core/README.md
  • Core permission module: ../permission-module/README.md
  • Full wallet integration guide: ../permission-module/INTEGRATION.md
  • Frontend app and live deployment (https://btms.metanet.app): ../frontend/README.md

Installation

npm install @bsv/btms-permission-module-ui
Peer Dependencies
npm install react @mui/material @mui/icons-material @emotion/react @emotion/styled @bsv/uhrp-react

The package supports ESM imports and CommonJS require with TypeScript declarations for each entry point.

Usage

Basic Setup
import { useTokenSpendPrompt } from '@bsv/btms-permission-module-ui'
import { BasicTokenModule } from '@bsv/btms-permission-module'

// Setup the UI hook
const { promptUser, PromptComponent } = useTokenSpendPrompt()

// Create the permission module with the prompt function
const basicTokenModule = new BasicTokenModule(promptUser)

// Render the component
return (
  <>
    {children}
    <PromptComponent />
  </>
)
With Focus Management (Desktop Apps)
import { useTokenSpendPrompt, type FocusHandlers } from '@bsv/btms-permission-module-ui'

const { isFocused, onFocusRequested, onFocusRelinquished } = useContext(UserContext)

const { promptUser, PromptComponent } = useTokenSpendPrompt({
  isFocused,
  onFocusRequested,
  onFocusRelinquished
})

API

useTokenSpendPrompt(focusHandlers?: FocusHandlers)

React hook for managing token usage prompts.

Parameters:

  • focusHandlers (optional): Window focus management functions
    • isFocused: () => Promise<boolean>
    • onFocusRequested: () => Promise<void>
    • onFocusRelinquished: () => Promise<void>

Returns:

  • promptUser: (app: string, message: string) => Promise<boolean> - Function to show prompt
  • PromptComponent: React.ComponentType - Component to render
TokenAccessPrompt

The underlying dialog component (exported as default).

Props:

  • app: string - Application name requesting permission
  • message: string - JSON-encoded token spend information
  • onAllow: () => void - Callback when user approves
  • onDeny: () => void - Callback when user denies

Custom UI Implementation

If you don't want to use MUI, you can implement your own UI by creating a custom prompt function:

import { BasicTokenModule } from '@bsv/btms-permission-module'

const customPrompt = async (app: string, message: string): Promise<boolean> => {
  const spendInfo = JSON.parse(message)

  // Show your custom UI (Vue, Angular, vanilla JS, etc.)
  const result = await showMyCustomDialog({
    app,
    tokenName: spendInfo.tokenName,
    amount: spendInfo.sendAmount,
    assetId: spendInfo.assetId
  })

  return result // true = approved, false = denied
}

const basicTokenModule = new BasicTokenModule(customPrompt)

Message Format

The message parameter contains JSON with:

{
  type: 'btms_spend',
  sendAmount: number,
  tokenName: string,
  assetId: string,
  recipient?: string,
  iconURL?: string,
  changeAmount: number,
  totalInputAmount: number
}

Components

TokenAccessPrompt

Displays a Material-UI dialog with:

  • Token icon and name
  • Application requesting permission
  • Send amount and recipient
  • Change amount
  • Total input amount
  • Approve/Deny buttons

Styling

The component uses Material-UI's theming system. Customize by wrapping your app in a ThemeProvider:

import { ThemeProvider, createTheme } from '@mui/material'

const theme = createTheme({
  // Your theme customization
})

<ThemeProvider theme={theme}>
  <App />
</ThemeProvider>

License

Open BSV

Apache License 2.0

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @bsv/btms-permission-module-ui

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229