{"id":50496063,"url":"https://github.com/0xfnzero/sol-parser-sdk-nodejs","last_synced_at":"2026-06-02T07:03:09.332Z","repository":{"id":349402207,"uuid":"1202141170","full_name":"0xfnzero/sol-parser-sdk-nodejs","owner":"0xfnzero","description":"High-performance Node.js/TypeScript library for parsing Solana DEX events in real-time via Yellowstone gRPC","archived":false,"fork":false,"pushed_at":"2026-06-01T06:48:04.000Z","size":618,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-01T08:24:25.682Z","etag":null,"topics":["bonk","copy-trading-bot","fnzero","grpc","jito","letsbonk","pumpfun","pumpswap","raydium","raydium-launchlab","raydium-launchpad","shreds","shredstream","sniper","streaming","swqos","yellowstone","yellowstonegrpc"],"latest_commit_sha":null,"homepage":"https://fnzero.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xfnzero.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-05T16:47:48.000Z","updated_at":"2026-06-01T06:48:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/0xfnzero/sol-parser-sdk-nodejs","commit_stats":null,"previous_names":["0xfnzero/sol-parser-sdk-nodejs"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/0xfnzero/sol-parser-sdk-nodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfnzero%2Fsol-parser-sdk-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfnzero%2Fsol-parser-sdk-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfnzero%2Fsol-parser-sdk-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfnzero%2Fsol-parser-sdk-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xfnzero","download_url":"https://codeload.github.com/0xfnzero/sol-parser-sdk-nodejs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfnzero%2Fsol-parser-sdk-nodejs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33810343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bonk","copy-trading-bot","fnzero","grpc","jito","letsbonk","pumpfun","pumpswap","raydium","raydium-launchlab","raydium-launchpad","shreds","shredstream","sniper","streaming","swqos","yellowstone","yellowstonegrpc"],"created_at":"2026-06-02T07:03:08.372Z","updated_at":"2026-06-02T07:03:09.325Z","avatar_url":"https://github.com/0xfnzero.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003e⚡ Sol Parser SDK - Node.js\u003c/h1\u003e\n    \u003ch3\u003e\u003cem\u003eHigh-performance Solana DEX event parser for Node.js/TypeScript\u003c/em\u003e\u003c/h3\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.npmjs.com/package/sol-parser-sdk-nodejs\"\u003e\u003cimg src=\"https://img.shields.io/badge/npm-sol--parser--sdk--nodejs-red.svg\" alt=\"npm\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/0xfnzero/sol-parser-sdk-nodejs/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"./README_CN.md\"\u003e中文\u003c/a\u003e |\n    \u003ca href=\"./README.md\"\u003eEnglish\u003c/a\u003e |\n    \u003ca href=\"https://fnzero.dev/\"\u003eWebsite\u003c/a\u003e |\n    \u003ca href=\"https://t.me/fnzero_group\"\u003eTelegram\u003c/a\u003e |\n    \u003ca href=\"https://discord.gg/vuazbGkqQE\"\u003eDiscord\u003c/a\u003e\n\u003c/p\u003e\n\n\u003e ☕ **Support This Project**\n\u003e\n\u003e This SDK is completely free and open source. However, maintaining and continuously updating it requires significant AI computing resources and token consumption. If this SDK helps with your development, consider making a monthly SOL donation — any amount is appreciated and helps keep this project alive!\n\u003e\n\u003e **Donation Wallet:** `6oW7AXz1yRb57pYSxysuXnMs2aR1ha5rzGzReZ1MjPV8`\n\n---\n\n## Other language SDKs\n\n| Language | Repository |\n|----------|------------|\n| Rust | [sol-parser-sdk](https://github.com/0xfnzero/sol-parser-sdk) |\n| Node.js | [sol-parser-sdk-nodejs](https://github.com/0xfnzero/sol-parser-sdk-nodejs) |\n| Python | [sol-parser-sdk-python](https://github.com/0xfnzero/sol-parser-sdk-python) |\n| Go | [sol-parser-sdk-golang](https://github.com/0xfnzero/sol-parser-sdk-golang) |\n\n---\n\n## Release notes\n\n### v0.5.6\n\n- Adds Meteora DBC log parsing with program-context routing and filter parity.\n- Adds Raydium CLMM/CPMM and Orca account parsers and exports.\n- Preserves RPC block transaction indexes and active program context for log parsing.\n- Skips ShredStream instruction parsing early for account-only or empty include-only filters.\n- Tightens ShredStream/RPC filter behavior to match Rust/Python/Go low-latency paths.\n\n### v0.5.5\n\n- Aligns ShredStream parsing with Rust/Python/Go for low-latency static-account paths.\n- Uses default pubkey placeholders for V0 ALT-loaded instruction accounts instead of dropping the instruction.\n- Adds discriminator fallback when the ShredStream outer program id is ALT-loaded.\n- Improves Pump.fun v2 short-account parsing, create/create_v2 handling, and event-type filter parity.\n- Refreshes multi-protocol routing for Pump.fun, PumpSwap, Pump Fees, Raydium, Orca, and Meteora paths.\n\n---\n\n## How to use\n\n### 1. Install\n\n**From npm**\n\n```bash\nnpm install sol-parser-sdk-nodejs@0.5.6\n```\n\n**From source** (folder may be named `sol-parser-sdk-ts` in a monorepo)\n\n```bash\ngit clone https://github.com/0xfnzero/sol-parser-sdk-nodejs\ncd sol-parser-sdk-nodejs\nnpm install\n# npm run build   # only if you import from dist/ instead of examples/tsx → src\n```\n\n### 2. Environment (Yellowstone gRPC examples)\n\nAt the **package root** (next to `package.json`):\n\n```bash\ncp .env.example .env\n# Set GRPC_URL and GRPC_TOKEN\n```\n\nRun examples from that directory so `.env` is picked up.\n\n### 3. Smoke test\n\n```bash\nnpx tsx scripts/test-grpc-ts.ts\n```\n\nRequires `GRPC_URL` and `GRPC_TOKEN`. See `.env.example` for optional vars (`MAX_EVENTS`, `TIMEOUT_MS`, etc.).\n\n### 4. Minimal gRPC subscribe + parse\n\n```typescript\nimport {\n  YellowstoneGrpc,\n  parseDexEventsFromGrpcTransactionInfo,\n  dexEventToJsonString,\n} from \"sol-parser-sdk-nodejs\";\n\nconst ENDPOINT = process.env.GRPC_URL?.trim() ?? \"\";\nconst X_TOKEN = process.env.GRPC_TOKEN?.trim() ?? \"\";\nif (!ENDPOINT || !X_TOKEN) throw new Error(\"GRPC_URL and GRPC_TOKEN are required\");\n\nconst client = new YellowstoneGrpc(ENDPOINT, X_TOKEN);\n\nconst filter = {\n  account_include: [\n    \"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P\", // PumpFun\n    \"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA\", // PumpSwap\n  ],\n  account_exclude: [],\n  account_required: [],\n  vote: false,\n  failed: false,\n};\n\nconst sub = await client.subscribeTransactions(filter, {\n  onUpdate: (update) =\u003e {\n    const txInfo = update.transaction?.transaction;\n    if (!txInfo?.transactionRaw || !txInfo.metaRaw) return;\n    const slot = update.transaction!.slot;\n    const events = parseDexEventsFromGrpcTransactionInfo(txInfo, slot, undefined);\n    for (const ev of events) console.log(dexEventToJsonString(ev, 2));\n  },\n  onError: (err) =\u003e console.error(err.message),\n  onEnd: () =\u003e {},\n});\n\nconsole.log(\"subscribed\", sub.id);\n```\n\n**Lighter path:** `parseLogsOnly(logs, signature, slot, …)` — no `transactionRaw`; use `applyAccountFillsToLogEvents` if you need filled accounts without full gRPC meta.\n\n### 5. ShredStream (HTTP — not Yellowstone gRPC)\n\nUses **`SHREDSTREAM_URL`** or **`SHRED_URL`** (default `http://127.0.0.1:10800`), or CLI **`--url`**. Not `GRPC_URL`.\n\nThe client decodes gRPC `entries` bytes in **TypeScript** (same layout as the Go `shredstream/entries_decode` path) and deserializes wire transactions with `@solana/web3.js` — **no WebAssembly or wasm-pack build**.\n\n```bash\nnpx tsx examples/shredstream_example.ts -- --url=http://127.0.0.1:10800\n```\n\nWithout RPC, V0 ALT-loaded account indexes are represented with default pubkey placeholders and parsed best-effort. `shredstream_pumpfun_json.ts` can also use Solana **`RPC_URL`** (or `--rpc`) to expand ALTs when exact loaded-account fields are required.\n\n---\n\n## Examples\n\nFrom the **package root** after `npm install`. Examples use `npx tsx` and load `src/` directly — **no `npm run build` required** for examples. **Source** is one file per row (click to open on GitHub or npm).\n\n| Description | Run command | Source |\n|-------------|-------------|--------|\n| **Scripts** | | |\n| gRPC integration test (PumpFun + PumpSwap, account-filled `DexEvent`) | `npx tsx scripts/test-grpc-ts.ts` | [test-grpc-ts.ts](https://github.com/0xfnzero/sol-parser-sdk-nodejs/blob/main/scripts/test-grpc-ts.ts) |\n| Debug: print `metaRaw` / log structure | `npx tsx scripts/debug-grpc-ts.ts` | [debug-grpc-ts.ts](https://github.com/0xfnzero/sol-parser-sdk-nodejs/blob/main/scripts/debug-grpc-ts.ts) |\n| **PumpFun** | | |\n| Pretty-print full JSON `DexEvent` over gRPC | `npx tsx examples/pumpfun_grpc_json.ts` | [pumpfun_grpc_json.ts](https://github.com/0xfnzero/sol-parser-sdk-nodejs/blob/main/examples/pumpfun_grpc_json.ts) |\n| PumpFun events + metrics | `npx tsx examples/pumpfun_with_metrics.ts` | [pumpfun_with_metrics.ts](https://github.com/0xfnzero/sol-parser-sdk-nodejs/blob/main/examples/pumpfun_with_metrics.ts) |\n| PumpFun trade filter | `npx tsx examples/pumpfun_trade_filter.ts` | [pumpfun_trade_filter.ts](https://github.com/0xfnzero/sol-parser-sdk-nodejs/blob/main/examples/pumpfun_trade_filter.ts) |\n| Quick PumpFun connection test | `npx tsx examples/pumpfun_quick_test.ts` | [pumpfun_quick_test.ts](https://github.com/0xfnzero/sol-parser-sdk-nodejs/blob/main/examples/pumpfun_quick_test.ts) |\n| **PumpSwap** | | |\n| Pretty-print full JSON `DexEvent` over gRPC | `npx tsx examples/pumpswap_grpc_json.ts` | [pumpswap_grpc_json.ts](https://github.com/0xfnzero/sol-parser-sdk-nodejs/blob/main/examples/pumpswap_grpc_json.ts) |\n| PumpSwap events + metrics | `npx tsx examples/pumpswap_with_metrics.ts` | [pumpswap_with_metrics.ts](https://github.com/0xfnzero/sol-parser-sdk-nodejs/blob/main/examples/pumpswap_with_metrics.ts) |\n| PumpSwap ultra-low latency | `npx tsx examples/pumpswap_low_latency.ts` | [pumpswap_low_latency.ts](https://github.com/0xfnzero/sol-parser-sdk-nodejs/blob/main/examples/pumpswap_low_latency.ts) |\n| **Meteora DAMM** | | |\n| Meteora DAMM V2 events | `npx tsx examples/meteora_damm_grpc.ts` | [meteora_damm_grpc.ts](https://github.com/0xfnzero/sol-parser-sdk-nodejs/blob/main/examples/meteora_damm_grpc.ts) |\n| **ShredStream** (HTTP, not Yellowstone gRPC; see **step 5** above) | | |\n| Ultra-low-latency subscribe + queue / latency stats. URL: `--url` / `SHREDSTREAM_URL` / `.env` (default `http://127.0.0.1:10800`). | `npx tsx examples/shredstream_example.ts` | [shredstream_example.ts](https://github.com/0xfnzero/sol-parser-sdk-nodejs/blob/main/examples/shredstream_example.ts) |\n| PumpFun `DexEvent` JSON from ShredStream; static ALT fallback works without RPC, and Solana **RPC** (`RPC_URL` or `--rpc`) expands full ALT accounts when needed. | `npx tsx examples/shredstream_pumpfun_json.ts` | [shredstream_pumpfun_json.ts](https://github.com/0xfnzero/sol-parser-sdk-nodejs/blob/main/examples/shredstream_pumpfun_json.ts) |\n| **Multi-protocol** | | |\n| Subscribe to all DEX protocols | `npx tsx examples/multi_protocol_grpc.ts` | [multi_protocol_grpc.ts](https://github.com/0xfnzero/sol-parser-sdk-nodejs/blob/main/examples/multi_protocol_grpc.ts) |\n| **Utility** | | |\n| Verify `onUpdate` sync errors do not kill the gRPC stream | `npx tsx examples/grpc_onupdate_error_test.ts` | [grpc_onupdate_error_test.ts](https://github.com/0xfnzero/sol-parser-sdk-nodejs/blob/main/examples/grpc_onupdate_error_test.ts) |\n| Parse tx by signature (`parseTransactionFromRpc`; not gRPC). Set `TX_SIGNATURE` in `.env` or env. | `npx tsx examples/parse_tx_by_signature.ts` | [parse_tx_by_signature.ts](https://github.com/0xfnzero/sol-parser-sdk-nodejs/blob/main/examples/parse_tx_by_signature.ts) |\n\n**`npm run` aliases** (same source files as the ShredStream rows above):\n\n- `npm run example:shredstream` → [shredstream_example.ts](https://github.com/0xfnzero/sol-parser-sdk-nodejs/blob/main/examples/shredstream_example.ts)\n- `npm run example:shredstream:subscribe` → [shredstream_example.ts](https://github.com/0xfnzero/sol-parser-sdk-nodejs/blob/main/examples/shredstream_example.ts)\n- `npm run example:shredstream:pumpfun-json` → [shredstream_pumpfun_json.ts](https://github.com/0xfnzero/sol-parser-sdk-nodejs/blob/main/examples/shredstream_pumpfun_json.ts)\n\n**Env:** gRPC examples need **`GRPC_URL`** + **`GRPC_TOKEN`**. ShredStream uses **`SHREDSTREAM_URL`** / **`SHRED_URL`** or **`--url`**; `shredstream_pumpfun_json` also needs **`RPC_URL`** / **`--rpc`**. See **`.env.example`**.\n\n---\n\n## Protocols\n\nPumpFun, PumpSwap, Raydium AMM V4 / CLMM / CPMM, Orca Whirlpool, Meteora DAMM V2 / DLMM, Raydium LaunchLab (see `src/instr/`).\n\n---\n\n## Useful exports\n\n- `parseDexEventsFromGrpcTransactionInfo` — needs `transactionRaw` + `metaRaw` (Rust gRPC parity).\n- `parseRpcTransaction` / `parseTransactionFromRpc` — HTTP RPC path.\n- `dexEventToJsonString` — BigInt-safe JSON.\n\n---\n\n## Development\n\n```bash\nnpm run build\nnpm run check:migration   # parity checks; needs build\n```\n\n---\n\n## License\n\nMIT — https://github.com/0xfnzero/sol-parser-sdk-nodejs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xfnzero%2Fsol-parser-sdk-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xfnzero%2Fsol-parser-sdk-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xfnzero%2Fsol-parser-sdk-nodejs/lists"}