New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@sovereignbase/hardware-bound

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sovereignbase/hardware-bound

Creates a device-bound browser credential and derives stable entropy bytes from it for bootstrapping local cryptographic state.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

npm version CI codecov license

hardware-bound

Creates a device-bound browser credential and derives stable entropy bytes from it so local-first and zero-knowledge apps can bootstrap cryptographic state without storing their own seed material.

The public API is intentionally tiny:

  • createDeviceBinding(displayName)
  • deriveDeviceEntropy()

Installation

npm install @sovereignbase/hardware-bound
# or
pnpm add @sovereignbase/hardware-bound
# or
yarn add @sovereignbase/hardware-bound
# or
bun add @sovereignbase/hardware-bound
# or
deno add jsr:@sovereignbase/hardware-bound
# or
vlt install jsr:@sovereignbase/hardware-bound

Usage

import {
  createDeviceBinding,
  deriveDeviceEntropy,
} from '@sovereignbase/hardware-bound'

const created = await createDeviceBinding('Ada Lovelace')
if (!created) throw new Error('Device binding failed')

const entropy = await deriveDeviceEntropy()
if (!entropy) throw new Error('Entropy derivation failed')

console.log(entropy)

API

createDeviceBinding(displayName, signal?)

Creates a device binding for the current origin and returns true on success or false on failure.

deriveDeviceEntropy(signal?)

Derives deterministic entropy bytes from the existing device binding and returns either:

  • Uint8Array
  • false

The returned bytes are:

  • credential rawId
  • first PRF output
  • second PRF output

Behavior

  • No storage.
  • No network.
  • No thrown library errors from the two exported functions. Failure is false.
  • Intended as bootstrap material for local cryptographic state, not as a general authentication library.

Tests

  • Unit and integration tests in Node.
  • Browser tests in Playwright.
  • Browser matrix: Chromium, Firefox, WebKit, Pixel 5 emulation, iPhone 12 emulation.

License

Apache-2.0

Keywords

entropy

FAQs

Package last updated on 04 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts