Registry / iot / meshblu-verifier-websocket

meshblu-verifier-websocket

JSON →
library3.0.1jsnpmunverified

Meshblu WebSocket verification library for authenticating and verifying Meshblu devices over WebSocket connections. Version 3.0.1 is the latest stable release, with low release cadence. It provides a simple API to generate and verify authentication tokens for Meshblu's WebSocket-based IoT messaging. Differentiator: tight integration with Meshblu ecosystem, minimal dependencies.

npm install meshblu-verifier-websocket
INSTALL
IMPORT
SIG · MESHBLU-VERIFIER-W
M
meshblu-verifier-websocket
iotjavascriptv3.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MeshbluVerifierWebSocket
import MeshbluVerifierWebSocket from 'meshblu-verifier-websocket'
const MeshbluVerifierWebSocket = require('meshblu-verifier-websocket')
ESM-only since v2; CommonJS require will result in undefined.
MeshbluVerifierWebSocket
import { MeshbluVerifierWebSocket } from 'meshblu-verifier-websocket'
import MeshbluVerifierWebSocket from 'meshblu-verifier-websocket'
Named export was introduced in v3.0.0; default export is deprecated.
createVerifier
import { createVerifier } from 'meshblu-verifier-websocket'
Factory function to create verifier instance; available since v2.1.0.

Creates a verifier instance, performs WebSocket handshake and token verification, then closes connection.

import { createVerifier } from 'meshblu-verifier-websocket'; const verifier = createVerifier({ server: 'wss://meshblu.example.com', uuid: process.env.MESHBLU_UUID ?? 'device-uuid', token: process.env.MESHBLU_TOKEN ?? 'device-token', }); try { const isVerified = await verifier.verify(); console.log('Verification result:', isVerified); } catch (error) { console.error('Verification failed:', error.message); } finally { verifier.close(); }
Debug
Known issues
breakingESM-only since v2.0.0; require() returns undefined.
fix
Switch to ES module imports (import ... from) or downgrade to v1.x (unmaintained).
affects: >=2.0.0
breakingDefault export removed in v3.0.0; only named exports are available.
fix
Use named imports: import { MeshbluVerifierWebSocket } from 'meshblu-verifier-websocket' or import { createVerifier } from 'meshblu-verifier-websocket'.
affects: >=3.0.0
gotchaWebSocket server must be Meshblu-compatible; generic WebSocket servers will fail verification.
fix
Ensure server URL points to a valid Meshblu WebSocket endpoint (e.g., wss://my-instance.meshblu.com).
affects: *
Errors
Common errors & fixes
TypeError: MeshbluVerifierWebSocket is not a constructor
Using require() with v2+ (ESM-only) or default import with v3+.
fix
Use named import: import { MeshbluVerifierWebSocket } from 'meshblu-verifier-websocket'.
Error: Unable to verify WebSocket connection: Unexpected server response: 401
Invalid UUID or token provided to verifier.
fix
Check that MESHBLU_UUID and MESHBLU_TOKEN environment variables are correct and device is active.
Upgrade
Version history
3.0.1latest on npm
Audit
Dependencies
wsrequiredWebSocket client for verification
Agent activity
21 hits · last 30 days
node
16
Amazon
1
OpenAI (training)
1
Resources
meshblu-verifier-websocket — npm install meshblu-verifier-websocket · libregistry