@validators-dao/solana-stream-sdk 0.11.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +26 -8
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -27,6 +27,12 @@ Solana Stream SDK by Validators DAO - A TypeScript SDK for streaming Solana bloc
27
27
  <img src="https://storage.slv.dev/PoweredBySolana.svg" alt="Powered By Solana" width="200px" height="95px">
28
28
  </a>
29
29
 
30
+ ## What's New in v1.0.0
31
+
32
+ - Yellowstone Geyser gRPC connection upgraded to an NAPI-RS-powered client for better backpressure
33
+ - Improved backpressure handling and up to 4x streaming efficiency (400% improvement)
34
+ - Faster real-time Geyser streams for TypeScript clients with lower overhead
35
+
30
36
  ## Installation
31
37
 
32
38
  ```bash
@@ -117,16 +123,15 @@ const geyser = async () => {
117
123
  const maxRetries = 2000000
118
124
 
119
125
  const createClient = () => {
120
- const token = process.env.X_TOKEN || ''
121
- console.log('X_TOKEN:', token)
122
- if (token === '') {
123
- throw new Error('X_TOKEN environment variable is not set')
126
+ const token = process.env.X_TOKEN?.trim()
127
+ if (!token) {
128
+ console.warn('X_TOKEN not set. Connecting without auth.')
124
129
  }
125
130
  const endpoint = `https://grpc-ams-3.erpc.global`
126
131
  console.log('Connecting to', endpoint)
127
132
 
128
133
  // @ts-ignore ignore
129
- return new GeyserClient(endpoint, token, undefined)
134
+ return new GeyserClient(endpoint, token || undefined, undefined)
130
135
  }
131
136
 
132
137
  const connect = async (retries: number = 0): Promise<void> => {
@@ -136,6 +141,7 @@ const geyser = async () => {
136
141
 
137
142
  try {
138
143
  const client = createClient()
144
+ await client.connect()
139
145
  const version = await client.getVersion()
140
146
  console.log('version: ', version)
141
147
  const stream = await client.subscribe()
@@ -200,7 +206,7 @@ const main = async () => {
200
206
  main()
201
207
  ```
202
208
 
203
- Please ensure you have the `X_TOKEN` environment variable set with your gRPC token for authentication.
209
+ If your endpoint requires authentication, set the `X_TOKEN` environment variable with your gRPC token.
204
210
 
205
211
  Please note that the url endpoint in the example is for demonstration purposes. You should replace it with the actual endpoint you are using.
206
212
 
@@ -266,7 +272,7 @@ Ensure the environment variable `SHREDS_ENDPOINT` is set correctly.
266
272
 
267
273
  ## Features
268
274
 
269
- - **Geyser Client**: Direct access to Triton's Yellowstone gRPC client for real-time Solana data streaming
275
+ - **Geyser Client**: Direct access to the Yellowstone gRPC client for real-time Solana data streaming
270
276
  - **Shredstream Client**: Real-time entry streaming and decoding from Solana Shreds
271
277
  - **TypeScript Types**: Comprehensive TypeScript types for all filter and subscription interfaces
272
278
  - **Utilities**: Includes bs58 for Solana address and data encoding/decoding, gRPC utilities, and entry decoding functions
@@ -298,7 +304,7 @@ Ensure the environment variable `SHREDS_ENDPOINT` is set correctly.
298
304
 
299
305
  ## Dependencies
300
306
 
301
- - `@triton-one/yellowstone-grpc`: For gRPC streaming capabilities
307
+ - Yellowstone gRPC client: For gRPC streaming capabilities
302
308
  - `bs58`: For base58 encoding/decoding
303
309
  - `@validators-dao/solana-entry-decoder`: Utility for decoding Solana shred entries.
304
310
  - `@validators-dao/solana-shreds-client`: Solana Shreds Client for Scale. (NAPI-RS)
@@ -316,6 +322,18 @@ Other reports and suggestions are also highly appreciated.
316
322
  You can also join discussions or share feedback on Validators DAO's Discord community:
317
323
  https://discord.gg/C7ZQSrCkYR
318
324
 
325
+ ## Shreds UDP configuration (Rust client)
326
+
327
+ - Load base config via `SHREDS_UDP_CONFIG=/path/to/config.{json,toml}`; env vars then override it.
328
+ - Core envs:
329
+ - `SOLANA_RPC_ENDPOINT`
330
+ - Logs: `SHREDS_UDP_LOG_RAW`, `SHREDS_UDP_LOG_SHREDS`, `SHREDS_UDP_LOG_ENTRIES`, `SHREDS_UDP_LOG_WATCH_HITS`, `SHREDS_UDP_LOG_DEFER`
331
+ - Watch lists: `SHREDS_UDP_WATCH_PROGRAM_IDS`, `SHREDS_UDP_WATCH_AUTHORITIES` (defaults to pump.fun program/authority)
332
+ - Hardening: `SHREDS_UDP_REQUIRE_CODE_MATCH`, `SHREDS_UDP_STRICT_FEC`, `SHREDS_UDP_STRICT_NUM_DATA`, `SHREDS_UDP_STRICT_NUM_CODING`
333
+ - Slot window: `SHREDS_UDP_ROOT_SLOT`, `SHREDS_UDP_MAX_FUTURE` (default 512)
334
+ - TTLs: `SHREDS_UDP_COMPLETED_TTL_MS` (default 30s), `SHREDS_UDP_EVICT_COOLDOWN_MS` (default 300ms), `SHREDS_UDP_WARN_ONCE` (default true)
335
+ - Pump.fun: program and mint-authority pubkeys are fixed; token mint addresses are discovered per transaction at runtime (not hardcoded).
336
+
319
337
  ## Repository
320
338
 
321
339
  This package is part of the [Solana Stream](https://github.com/ValidatorsDAO/solana-stream) monorepo.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@validators-dao/solana-stream-sdk",
3
3
  "description": "Solana Stream SDK by Validators DAO",
4
- "version": "0.11.0",
4
+ "version": "1.0.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -24,10 +24,10 @@
24
24
  "LICENSE"
25
25
  ],
26
26
  "dependencies": {
27
- "@triton-one/yellowstone-grpc": "4.0.2",
27
+ "@triton-one/yellowstone-grpc": "5.0.1",
28
28
  "bs58": "6.0.0",
29
29
  "@validators-dao/solana-entry-decoder": "2.3.0",
30
- "@validators-dao/solana-shreds-client": "1.1.0"
30
+ "@validators-dao/solana-shreds-client": "1.2.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/node": "22.15.27",