Registry / blockchain / laserstream-core-proto-js

laserstream-core-proto-js

JSON →
library9.0.2jsnpmunverified

Protocol buffer type definitions and generated TypeScript types for the LaserStream gRPC API, which is compatible with Yellowstone Geyser. Version 9.0.2 provides protobuf bindings for Solana blockchain data streaming, including accounts, transactions, slots, and preprocessed transaction support. Published by Helius Labs, this package is the canonical way to interact with LaserStream's streaming endpoints from Node.js/browser environments. It is fully generated from Rust protobuf definitions and ships TypeScript declarations. Release cadence follows the Rust crate laserstream-core-proto on GitHub, with semver compatibility guarantees. Key differentiators: full Yellowstone schema compatibility, preprocessed transaction format, and first-class TypeScript support with no runtime dependencies.

npm install laserstream-core-proto-js
INSTALL
IMPORT
SIG · LASERSTREAM-CORE-P
L
laserstream-core-proto-js
blockchainjavascriptv9.0.2
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.

geyser
import { geyser } from 'laserstream-core-proto-js'
const geyser = require('laserstream-core-proto-js')
The package is ESM-only. CommonJS require will fail. Use the named import for all generated protobuf types.
SubscribeRequest
import { geyser } from 'laserstream-core-proto-js'; const req: geyser.SubscribeRequest = {}
import { SubscribeRequest } from 'laserstream-core-proto-js'
SubscribeRequest is a nested type under the geyser namespace. Direct named import does not exist.
SubscribeUpdate
import { geyser } from 'laserstream-core-proto-js'; const update: geyser.SubscribeUpdate = {}
import { geyser } from 'laserstream-core-proto-js'; const update = new geyser.SubscribeUpdate()
All types are plain TypeScript interfaces, not classes. Do not use 'new'.

Demonstrates importing the geyser namespace and constructing a SubscribeRequest object for subscribing to account updates, slots, and transactions.

import { geyser } from 'laserstream-core-proto-js'; import { createGrpcTransport } from '@protobuf-ts/grpc-transport'; import type { GrpcTransport } from '@protobuf-ts/grpc-transport'; async function subscribe() { const transport: GrpcTransport = createGrpcTransport({ baseUrl: process.env.GRPC_URL ?? 'http://localhost:10000', }); // Use the generated types to construct a request const request: geyser.SubscribeRequest = { accounts: { account: { account: ['*'], owner: [], filters: [], }, }, slots: {}, transactions: { transaction: { accountInclude: ['*'], accountExclude: [], accountRequired: [], }, }, }; console.log('Request:', request); } subscribe().catch(console.error);
Debug
Known issues
breakingMajor version 9 changed the namespace from 'yellowstone' to 'geyser' and restructured all types.
fix
Replace all imports and references: import { geyser } from 'laserstream-core-proto-js' and use geyser.SubscribeRequest instead of yellowstone.SubscribeRequest.
affects: >=9.0.0
deprecatedImporting from 'laserstream-core-proto-js/yellowstone' is deprecated in v9. All types are now under the 'geyser' namespace.
fix
Use 'import { geyser } from 'laserstream-core-proto-js'' instead.
affects: >=9.0.0
gotchaSubscribeRequest, SubscribeUpdate etc. are TypeScript interfaces, not classes. Attempting to instantiate them with 'new' results in a TypeScript error.
fix
Use plain object literals that conform to the interface; do not use 'new'.
affects: *
breakingIn v8, the package exported types from 'laserstream-core-proto-js' directly (e.g., 'SubscribeRequest' as a top-level export). v9 moved them under the geyser namespace.
fix
Change imports: import { geyser } from 'laserstream-core-proto-js' and access types as geyser.SubscribeRequest.
affects: >=9.0.0
gotchaThe package is ESM-only. Using require('laserstream-core-proto-js') will throw a runtime error.
fix
Use import statements or dynamic import(). For CommonJS projects, consider using dynamic import inside an async function.
affects: >=9.0.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM: require() of ES Module laserstream-core-proto-js from not supported
The package is ESM-only, but the importing project uses CommonJS require().
fix
Replace require() with import or enable ESM in your project.
Module '"laserstream-core-proto-js"' has no exported member 'SubscribeRequest'.
Importing SubscribeRequest directly instead of as a nested type under geyser.
fix
Use 'import { geyser } from 'laserstream-core-proto-js'' and then 'geyser.SubscribeRequest'.
'geyser' only refers to a type, but is being used as a value here.
Attempting to use geyser as a runtime value (e.g., new geyser.SubscribeRequest()) since interfaces are compile-time only.
fix
Treat geyser as a namespace for types only; use object literals matching the interface.
Type 'typeof import("laserstream-core-proto-js")' is not callable.
Trying to import the module as a default export or call it as a function.
fix
Use named import: import { geyser } from 'laserstream-core-proto-js'.
Upgrade
Version history
9.0.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
39 hits · last 30 days
node
32
Amazon
1
OpenAI (training)
1
Resources
laserstream-core-proto-js — npm install laserstream-core-proto-js · libregistry