forked from helius-labs/laserstream-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.mjs
More file actions
20 lines (16 loc) · 831 Bytes
/
Copy pathindex.mjs
File metadata and controls
20 lines (16 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// ES Module wrapper for LaserStream client
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
// Import everything from the CommonJS client
const clientModule = require('./client.js');
const indexModule = require('./index.js');
// Export clean API for ES modules
export const subscribe = clientModule.subscribe;
export const CommitmentLevel = clientModule.CommitmentLevel;
export const initProtobuf = clientModule.initProtobuf;
export const decodeSubscribeUpdate = clientModule.decodeSubscribeUpdate;
// Export utility functions
export const shutdownAllStreams = indexModule.shutdownAllStreams;
export const getActiveStreamCount = indexModule.getActiveStreamCount;
// Export types (these are just for TypeScript, no runtime effect)
// The actual type definitions will come from index.d.ts