sol-parser-sdk 0.5.13 → 0.5.15

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.
@@ -26,6 +26,8 @@ function emptyTradeTail() {
26
26
  virtual_quote_reserves: 0n,
27
27
  can_boost: false,
28
28
  base_supply: 0n,
29
+ holder_rewards_bps: 0n,
30
+ holder_rewards: 0n,
29
31
  };
30
32
  }
31
33
  function parseTradeTail(data) {
@@ -55,6 +57,12 @@ function parseTradeTail(data) {
55
57
  return null;
56
58
  tail.can_boost = canBoost === 1;
57
59
  tail.base_supply = bn64((0, binary_js_1.readU64LE)(data, 49));
60
+ if (data.length !== 57 && data.length < 73)
61
+ return null;
62
+ if (data.length >= 73) {
63
+ tail.holder_rewards_bps = bn64((0, binary_js_1.readU64LE)(data, 57));
64
+ tail.holder_rewards = bn64((0, binary_js_1.readU64LE)(data, 65));
65
+ }
58
66
  return tail;
59
67
  }
60
68
  function readStrictBorshString(data, offset) {
@@ -188,6 +196,8 @@ function parseBuyFromData(data, metadata) {
188
196
  virtual_quote_reserves: tail.virtual_quote_reserves,
189
197
  can_boost: tail.can_boost,
190
198
  base_supply: tail.base_supply,
199
+ holder_rewards_bps: tail.holder_rewards_bps,
200
+ holder_rewards: tail.holder_rewards,
191
201
  is_pump_pool: false,
192
202
  base_mint: ZP,
193
203
  quote_mint: ZP,
@@ -286,6 +296,8 @@ function parseSellFromData(data, metadata) {
286
296
  virtual_quote_reserves: tail.virtual_quote_reserves,
287
297
  can_boost: tail.can_boost,
288
298
  base_supply: tail.base_supply,
299
+ holder_rewards_bps: tail.holder_rewards_bps,
300
+ holder_rewards: tail.holder_rewards,
289
301
  is_pump_pool: false,
290
302
  base_mint: ZP,
291
303
  quote_mint: ZP,
@@ -299,9 +311,11 @@ function parseSellFromData(data, metadata) {
299
311
  return { PumpSwapSell: ev };
300
312
  }
301
313
  function parseCreatePoolFromData(data, metadata) {
302
- const REQUIRED = 8 + 2 + 32 * 6 + 2 + 8 * 7 + 1;
314
+ const REQUIRED = 326;
303
315
  if (data.length < REQUIRED)
304
316
  return null;
317
+ if (data.length !== REQUIRED && data.length < 335)
318
+ return null;
305
319
  let o = 0;
306
320
  const timestamp = bnI64((0, binary_js_1.readI64LE)(data, o));
307
321
  o += 8;
@@ -344,6 +358,9 @@ function parseCreatePoolFromData(data, metadata) {
344
358
  const coin_creator = (0, binary_js_1.readPubkey)(data, o);
345
359
  o += 32;
346
360
  const is_mayhem_mode = data.length > 325 && (0, binary_js_1.readBool)(data, 325) === true;
361
+ const creator_fee_bps = data.length >= 334 ? bn64((0, binary_js_1.readU64LE)(data, 326)) : 0n;
362
+ const can_edit_creator_fee = data.length > 334 && (0, binary_js_1.readBool)(data, 334) === true;
363
+ const is_holder_reward = data.length > 335 && (0, binary_js_1.readBool)(data, 335) === true;
347
364
  const ev = {
348
365
  metadata,
349
366
  timestamp,
@@ -367,6 +384,10 @@ function parseCreatePoolFromData(data, metadata) {
367
384
  user_quote_token_account,
368
385
  coin_creator,
369
386
  is_mayhem_mode,
387
+ is_cashback_coin: false,
388
+ creator_fee_bps,
389
+ can_edit_creator_fee,
390
+ is_holder_reward,
370
391
  };
371
392
  return { PumpSwapCreatePool: ev };
372
393
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sol-parser-sdk",
3
- "version": "0.5.13",
3
+ "version": "0.5.15",
4
4
  "description": "High-performance Solana DEX event parser for Node.js/TypeScript (Yellowstone gRPC, log parsing)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "homepage": "https://github.com/0xfnzero/sol-parser-sdk-nodejs#readme",
22
22
  "engines": {
23
- "node": ">=18"
23
+ "node": ">=20.18.0"
24
24
  },
25
25
  "scripts": {
26
26
  "build": "tsc && mkdir -p dist/shredstream && cp src/shredstream/shredstream.proto dist/shredstream/",
@@ -58,7 +58,7 @@
58
58
  "@grpc/grpc-js": "^1.12.4",
59
59
  "@grpc/proto-loader": "^0.7.13",
60
60
  "@solana/web3.js": "^1.95.4",
61
- "@triton-one/yellowstone-grpc": "^1.0.0",
61
+ "@triton-one/yellowstone-grpc": "7.0.0",
62
62
  "bs58": "^6.0.0"
63
63
  }
64
64
  }