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

@choppu/shelljs-web-hid

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

@choppu/shelljs-web-hid

Keycard Shell WebHID implementation of the communication layer

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

ShellJS Web HID

ShellJS Web HID is an implementation of the communication layer.

Installation

npm install @choppu/shelljs-web-hid

Usage example

import TransportWebHID from "shelljs-web-hid";
...
let transport: any;
transport = await TransportWebHID.create();
...

Live Demo

You can check a demo at Shell Web HID Example Page.

Support status

WebUSB is currently only supported on Google Chrome / Chromium DEV version and by explicitly enabling chrome://flags/#enable-experimental-web-platform-features

API

Table of Contents

TransportWebHID

Extends Transport

WebHID Transport implementation

Parameters

  • device HIDDevice

close

Release the transport device

Returns Promise<void>

exchange

Exchange with the device using APDU protocol.

Parameters

Returns Promise<Buffer> a promise of apdu response

isSupported

Check if WebUSB transport is supported.

list

List the WebUSB devices that was previously authorized by the user.

listen

Actively listen to WebUSB devices and emit ONE device that was either accepted before, if not it will trigger the native permission UI.

Important: it must be called in the context of a UI click!

Parameters
  • observer Observer<DescriptorEvent<HIDDevice>>

Returns Subscription

request

Similar to create() except it will always display the device permission (even if some devices are already accepted).

openConnected

Similar to create() except it will never display the device permission (it returns a Promise<?Transport>, null if it fails to find a device).

open

Create a Shell transport with a HIDDevice

Parameters
  • device HIDDevice

FAQs

Package last updated on 28 Oct 2025

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