Skip to content

0xfnzero/bsc-parser-sdk-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BSC Parser SDK for Node.js

Low-latency BNB Smart Chain transaction and event parsing

A TypeScript parser SDK for BSC calldata, logs, receipts, and provider-neutral real-time streams. Built for trading bots, indexers, copy-trading pipelines, and analytics infrastructure.

English | 中文 | Website | Telegram | Discord

BSC SDK Family

Category Primary repository Alternative or companion
Unified trading bsc-trade-sdk-nodejs bsc-trade-sdk-golang
Transaction parsing bsc-parser-sdk-nodejs bsc-parser-sdk-golang
Protocol SDKs four-trading-sdk pancakeswap-sdk

Installation

npm install @fnzero/bsc-parser-sdk-nodejs

Requires Node.js 18 or newer.

Quick Start

import {
  parseBscReceipt,
  Four,
  Pancake,
  TransactionStreamManager,
  createShredStreamSource
} from '@fnzero/bsc-parser-sdk-nodejs';

The SDK is split from trading code and contains parser infrastructure only:

  • Four.meme TokenManager2 ABI and calldata decoding
  • Four.meme log and receipt parsing
  • PancakeSwap V2 router calldata decoding
  • PancakeSwap V2 pair/factory log parsing
  • Generic WebSocket, HTTP JSON stream, gRPC, and callback adapter infrastructure for low-latency providers
  • Ordered, streaming, and micro-batch buffers for latency vs ordering trade-offs

The gRPC source is provider-adapter based. Pass the generated client or stream from your provider package through streamFactory; the SDK does not vendor a provider-specific proto. For ShredStream/Geyser-style feeds or vendor SDK callbacks, use createShredStreamSource or createAdapterStreamSource and emit raw messages or normalized events.

Use parser hot paths with already-delivered calldata/log payloads. The package does not fetch receipts or query contracts while parsing, so it can sit behind third-party WebSocket, HTTP stream, gRPC, ShredStream/Geyser-style, or in-house block feed adapters.

const decoded = parseBscTransactionData(calldata, {
  to: PANCAKE_ROUTER_V2_ADDRESS,
});

if (decoded?.protocol === 'pancake') {
  console.log(decoded.signature, decoded.args.path);
}

Development

npm install
npm test

Security Boundary

This package parses caller-supplied data and does not sign or submit transactions. Treat decoded stream payloads as untrusted input, validate protocol addresses, and verify transaction intent before passing results to trading systems.

Licensed under the MIT License.

About

Low-latency TypeScript SDK for parsing BSC calldata, logs, receipts, and real-time transaction streams.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors