Registry / messaging / cryptoscan-provider

cryptoscan-provider

JSON →
library4.3.0jsnpmunverified

WebSocket data provider library for real-time load data to Cryptoscan API. Current stable version is 4.3.0. Designed exclusively for Cryptoscan partners, it establishes WebSocket connections to send structured data objects, automatically extracting schema (keys and types) and appending as query parameters. Key differentiators: automatic schema detection, TypeScript support, environment-based configuration. Release cadence is not publicly documented; use is restricted to partners.

npm install cryptoscan-provider
INSTALL
IMPORT
SIG · CRYPTOSCAN-PROVIDE
C
cryptoscan-provider
messagingjavascriptv4.3.0
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.

createProcessData
import { createProcessData } from 'cryptoscan-provider'
import createProcessData from 'cryptoscan-provider'
Named export only; default import is not available.
DataObject
import type { DataObject } from 'cryptoscan-provider'
import { DataObject } from 'cryptoscan-provider'
DataObject is a TypeScript interface; use type import for better compilation.
cryptoscan-provider (CommonJS)
const { createProcessData } = require('cryptoscan-provider')
const cryptoscanProvider = require('cryptoscan-provider')
CommonJS require must use destructuring to get named exports.

Initializes the provider, processes a data object, and logs the generated ID.

import { createProcessData } from 'cryptoscan-provider'; const processData = createProcessData(); const data = { key: "BTC-USDT", price: 50000, volume: 100.5, timestamp: 1234567890 }; const id = processData(data); console.log('Generated ID:', id);
Debug
Known issues
breakingVersion 4.0.0 changed the signature of createProcessData from accepting a config object to no arguments.
fix
Call createProcessData() with no arguments; configuration is now done via environment variables.
affects: >=4.0.0
deprecatedThe use of WebSocket URL via constructor argument was deprecated in v3.0.0.
fix
Set PROVIDER_API_URL environment variable instead.
affects: >=3.0.0 <4.0.0
gotchaThe library establishes a WebSocket connection only upon first call to processData, not at import time.
fix
Ensure network access is available when processData is first called.
affects: all
gotchaThe environment variable PROVIDER_API_URL must be set; otherwise it defaults to ws://localhost:8080 which is unlikely intended for production.
fix
Always set PROVIDER_API_URL to the correct WebSocket server endpoint.
affects: all
gotchaData objects must include a 'key' field; otherwise processData might behave unexpectedly.
fix
Ensure every data object has a non-empty string 'key' property.
affects: all
Errors
Common errors & fixes
Uncaught TypeError: cryptoscan_provider_1.createProcessData is not a function
Incorrect import: used default import instead of named import.
fix
Use named import: import { createProcessData } from 'cryptoscan-provider'
TypeError: processData is not a function
createProcessData() may have been called with an argument that is not a function or incorrectly initialized.
fix
Call createProcessData() with no arguments, as the library now expects no config object.
Missing required environment variable: PROVIDER_API_URL
The environment variable is not set and no fallback is desired.
fix
Set the PROVIDER_API_URL environment variable to the WebSocket server URL.
Upgrade
Version history
4.3.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
16
Amazon
1
OpenAI (training)
1
Resources
cryptoscan-provider — npm install cryptoscan-provider · libregistry