sol-parser-sdk-python 0.5.13__py3-none-any.whl → 0.5.14__py3-none-any.whl

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.
sol_parser/event_types.py CHANGED
@@ -1821,7 +1821,8 @@ def to_typed_event(event: dict) -> Optional[TypedDexEvent]:
1821
1821
  return PumpRouteIntentEvent(metadata=meta,kind=data['kind'],program=data['program'],
1822
1822
  instruction_index=int(data['instruction_index']),user=data['user'],input_account=data['input_account'],output_account=data['output_account'],
1823
1823
  amount_in=None if data.get('amount_in') is None else int(data['amount_in']),min_amount_out=None if data.get('min_amount_out') is None else int(data['min_amount_out']),
1824
- hops=[PumpRouteHop(**h) for h in data['hops']],instruction_data=list(data['instruction_data']))
1824
+ hops=[PumpRouteHop(**h) for h in data['hops']],instruction_data=list(data['instruction_data']),
1825
+ is_buy=data.get('is_buy'),ix_name=data.get('ix_name'))
1825
1826
 
1826
1827
  # PumpFun events
1827
1828
  if event_type in (EventType.PUMP_FUN_TRADE, EventType.PUMP_FUN_BUY,
sol_parser/pump_routes.py CHANGED
@@ -38,6 +38,10 @@ class PumpRouteIntentEvent(DexEventBase):
38
38
  min_amount_out: Optional[int] = None
39
39
  hops: list[PumpRouteHop] = field(default_factory=list)
40
40
  instruction_data: list[int] = field(default_factory=list)
41
+ # Intended direction relative to the wrapper hop's base mint, not a fill.
42
+ is_buy: Optional[bool] = None
43
+ # Official underlying instruction name encoded in the wrapper; unknown is None.
44
+ ix_name: Optional[str] = None
41
45
 
42
46
 
43
47
  def allows_route(filter, program):
@@ -86,4 +90,7 @@ def parse_route(program,data,a,metadata,index,filter=None):
86
90
  kind,fixed,user,source,dest,amount,minimum='BuyPumpDelta',0,0,16,15,None,None
87
91
  if amount==0:return None
88
92
  hops=[PumpRouteHop(*a[i:i+5]) for i in range(fixed,len(a),5)] if fixed else [PumpRouteHop(*(a[i] for i in ((7,2,16,17,18) if program==RAPID else (2,3,11,12,13))))]
89
- return DexEvent(EventType.PUMP_ROUTE_INTENT,PumpRouteIntentEvent(metadata,kind,program,index,a[user],a[source],a[dest],amount,minimum,hops,list(data)))
93
+ return DexEvent(EventType.PUMP_ROUTE_INTENT,PumpRouteIntentEvent(
94
+ metadata,kind,program,index,a[user],a[source],a[dest],amount,minimum,hops,list(data),
95
+ is_buy=True if kind in ('RapidBuy', 'BuyPumpDelta') else None,
96
+ ix_name='buy_exact_quote_in_v2' if kind == 'RapidBuy' else None))
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: sol-parser-sdk-python
3
- Version: 0.5.13
3
+ Version: 0.5.14
4
4
  Summary: Solana DEX program log parsing (pure Python, API aligned with sol-parser-sdk)
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: base58>=2.0
@@ -60,15 +60,21 @@ Parser SDK language versions and related Rust SDKs:
60
60
 
61
61
  | Language | Repository | Description | Version |
62
62
  |----------|------------|-------------|---------|
63
- | Rust | [sol-parser-sdk](https://github.com/0xfnzero/sol-parser-sdk) | Solana DEX transaction and account event parsing | `v0.7.14` |
64
- | Node.js | [sol-parser-sdk-nodejs](https://github.com/0xfnzero/sol-parser-sdk-nodejs) | TypeScript/JavaScript for Node.js | `v0.5.20` |
65
- | Python | [sol-parser-sdk-python](https://github.com/0xfnzero/sol-parser-sdk-python) | Async/await native support | `v0.5.13` |
66
- | Go | [sol-parser-sdk-golang](https://github.com/0xfnzero/sol-parser-sdk-golang) | Go transaction and account event parsing | `v0.5.13` |
67
- | **Rust** | [sol-shred-sdk](https://github.com/0xfnzero/sol-shred-sdk) | Raw Solana shred decoding and ShredStream DEX event parsing | `v4.0.5` |
63
+ | Rust | [sol-parser-sdk](https://github.com/0xfnzero/sol-parser-sdk) | Solana DEX transaction and account event parsing | `v0.7.15` |
64
+ | Node.js | [sol-parser-sdk-nodejs](https://github.com/0xfnzero/sol-parser-sdk-nodejs) | TypeScript/JavaScript for Node.js | `v0.5.21` |
65
+ | Python | [sol-parser-sdk-python](https://github.com/0xfnzero/sol-parser-sdk-python) | Async/await native support | `v0.5.14` |
66
+ | Go | [sol-parser-sdk-golang](https://github.com/0xfnzero/sol-parser-sdk-golang) | Go transaction and account event parsing | `v0.5.14` |
67
+ | **Rust** | [sol-shred-sdk](https://github.com/0xfnzero/sol-shred-sdk) | Raw Solana shred decoding and ShredStream DEX event parsing | `v4.0.6` |
68
68
  | **Rust** | [sol-trade-sdk](https://github.com/0xfnzero/sol-trade-sdk) | Solana DEX trade construction and transaction execution | `v6.0.2` |
69
69
 
70
70
  ---
71
71
 
72
+ ## v0.5.14 — Pump route direction and instruction names
73
+
74
+ Route intents now expose `is_buy` and `ix_name`, following existing trade field names and official IDL instruction names. RapidBuy reports a buy intent and `buy_exact_quote_in_v2`; BuyPumpDelta reports only a buy intent. Multi-hop direction and unknown methods remain null. Read currencies from `hops[].base_mint` / `quote_mint`. These hints do not confirm execution, and filters do not convert intents into trades.
75
+
76
+ Older JSON without the fields remains readable as unknown. Rust struct literals must supply the new fields; Go uses pointers and Node.js/Python use null/None for unknown values. Streamer now forwards `DexEvent::PumpRouteIntentEvent` with protocol and event filtering.
77
+
72
78
  ## v0.5.13 — Pump routes and offline replay
73
79
 
74
80
  Adds native Pump route-intent parsing for official multi-hop instructions and the exact RapidBuy/BuyPumpDelta wrapper layouts captured in reported transactions. Adds locally cached ALT resolution and rejects unresolved account identities by default, with explicit best-effort compatibility APIs where supported. Route intents expose instruction constraints and hop identities; confirmed execution amounts require execution metadata.
@@ -150,7 +156,7 @@ This is the Python implementation of the FnZero Solana DEX parser SDK for asynci
150
156
  **From PyPI**
151
157
 
152
158
  ```bash
153
- pip install sol-parser-sdk-python==0.5.13
159
+ pip install sol-parser-sdk-python==0.5.14
154
160
  ```
155
161
 
156
162
  **From source**
@@ -266,18 +272,18 @@ From the **package root** after `pip install -e .`. Run with `python examples/<f
266
272
  | Description | Run command | Source |
267
273
  |-------------|-------------|--------|
268
274
  | **PumpFun** | | |
269
- | PumpFun trade filtering | `python examples/pumpfun_trade_filter.py` | [pumpfun_trade_filter.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/pumpfun_trade_filter.py) | `v0.5.13` |
270
- | PumpFun events + metrics | `python examples/pumpfun_with_metrics.py` | [pumpfun_with_metrics.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/pumpfun_with_metrics.py) | `v0.5.13` |
271
- | Quick PumpFun connection test | `python examples/pumpfun_quick_test.py` | [pumpfun_quick_test.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/pumpfun_quick_test.py) | `v0.5.13` |
275
+ | PumpFun trade filtering | `python examples/pumpfun_trade_filter.py` | [pumpfun_trade_filter.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/pumpfun_trade_filter.py) | `v0.5.14` |
276
+ | PumpFun events + metrics | `python examples/pumpfun_with_metrics.py` | [pumpfun_with_metrics.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/pumpfun_with_metrics.py) | `v0.5.14` |
277
+ | Quick PumpFun connection test | `python examples/pumpfun_quick_test.py` | [pumpfun_quick_test.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/pumpfun_quick_test.py) | `v0.5.14` |
272
278
  | **PumpSwap** | | |
273
- | PumpSwap ultra-low latency | `python examples/pumpswap_low_latency.py` | [pumpswap_low_latency.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/pumpswap_low_latency.py) | `v0.5.13` |
274
- | PumpSwap events + metrics | `python examples/pumpswap_with_metrics.py` | [pumpswap_with_metrics.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/pumpswap_with_metrics.py) | `v0.5.13` |
279
+ | PumpSwap ultra-low latency | `python examples/pumpswap_low_latency.py` | [pumpswap_low_latency.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/pumpswap_low_latency.py) | `v0.5.14` |
280
+ | PumpSwap events + metrics | `python examples/pumpswap_with_metrics.py` | [pumpswap_with_metrics.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/pumpswap_with_metrics.py) | `v0.5.14` |
275
281
  | **Meteora DAMM** | | |
276
- | Meteora DAMM V2 events | `python examples/meteora_damm_grpc.py` | [meteora_damm_grpc.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/meteora_damm_grpc.py) | `v0.5.13` |
282
+ | Meteora DAMM V2 events | `python examples/meteora_damm_grpc.py` | [meteora_damm_grpc.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/meteora_damm_grpc.py) | `v0.5.14` |
277
283
  | **Multi-protocol** | | |
278
- | Subscribe to every program in Rust `Protocol` / `program_ids` | `python examples/multi_protocol_grpc.py` | [multi_protocol_grpc.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/multi_protocol_grpc.py) | `v0.5.13` |
284
+ | Subscribe to every program in Rust `Protocol` / `program_ids` | `python examples/multi_protocol_grpc.py` | [multi_protocol_grpc.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/multi_protocol_grpc.py) | `v0.5.14` |
279
285
  | **Utility** | | |
280
- | Parse tx by signature (HTTP RPC; not gRPC). `TX_SIGNATURE` / `RPC_URL` or `SOLANA_RPC_URL` in `.env` or `--sig` / `--rpc`. | `python examples/parse_tx_by_signature.py` | [parse_tx_by_signature.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/parse_tx_by_signature.py) | `v0.5.13` |
286
+ | Parse tx by signature (HTTP RPC; not gRPC). `TX_SIGNATURE` / `RPC_URL` or `SOLANA_RPC_URL` in `.env` or `--sig` / `--rpc`. | `python examples/parse_tx_by_signature.py` | [parse_tx_by_signature.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/parse_tx_by_signature.py) | `v0.5.14` |
281
287
 
282
288
  **Env:** gRPC examples need **`GRPC_URL`** or **`GRPC_ENDPOINT`**, plus **`GRPC_AUTH_TOKEN`** or **`GRPC_TOKEN`** (or legacy `GEYSER_*`). See **`.env.example`**.
283
289
 
@@ -7,7 +7,7 @@ sol_parser/dex_parsers.py,sha256=eOigBKLpMQGZT_3dJwq18niDhY0fSGJrULDx_TGNC8Q,146
7
7
  sol_parser/entries_decode.py,sha256=MOhGadNxWLerxBhGvuNatoWa2hzw2MXVz9NmNUhWvS8,3665
8
8
  sol_parser/env_config.py,sha256=Lw0SdZuy_MvUaVkyFxS0qPBgMzR9UBbxbN0CVz8nxg4,7296
9
9
  sol_parser/event_type_parity.py,sha256=mD9Lg43aPzJGvz0Ft94NxKw6XnpgBio5yL2xin9Wfdg,4521
10
- sol_parser/event_types.py,sha256=S7rKiHkAcws42R27f9MaUMJwnJcK7xEeaKibB7tUauA,98320
10
+ sol_parser/event_types.py,sha256=m63dNNVxjx9baTSsKIcwZXK1EAlx4cdh2Vy0TBrAq0o,98387
11
11
  sol_parser/geyser_pb2.py,sha256=Hq66wmWxXD2jSbSVQW7vmBRB7nWmR1DuYDMQ6nKgl3o,20123
12
12
  sol_parser/geyser_pb2_grpc.py,sha256=ASPmZsCNvyCzt_j4IrhKjSacWUNLVuAiLfpjmyd-2Qc,15322
13
13
  sol_parser/grpc_client.py,sha256=fusMuSJsTPEUxgobdeimQ7s3Hu9n0bD8pIH7rEL40jM,37370
@@ -23,7 +23,7 @@ sol_parser/market.py,sha256=p_N6n3b4hEtUjHAQQyGSnrKdHYmkHdY1hXXObHRKc0Y,1858
23
23
  sol_parser/merger.py,sha256=hVIeocXYnLTP5qtXb4lZtED5EteE_g3a84ZeUwUmda0,13498
24
24
  sol_parser/order_buffer.py,sha256=f3yvvYglHX800hyF8JhFbjb1VoNtOvrqUR8lm3lvF-Y,7874
25
25
  sol_parser/parser.py,sha256=aSDbsbnUqBHEJ6UMdnZIuR-01fWs4_GxUwTJ3vQ0GXU,11906
26
- sol_parser/pump_routes.py,sha256=BT7QlzCxqpunz7HDTucts-8zOrLc1u3xnnPZyJgFoIE,4485
26
+ sol_parser/pump_routes.py,sha256=U7FWxZYyP860jUZh5F8YKAoauki-hgmfu2DNDjEcplM,4868
27
27
  sol_parser/pump_upgrade.py,sha256=BnVB8PVHfPtILBOlI29nbXABihVuXZUO82Yw6upFhRM,5212
28
28
  sol_parser/pumpfun_fee_enrich.py,sha256=NHC_chCv2wuaOW5taYG8R6M1bu8cmdxcLf8cjSfo7Kc,4688
29
29
  sol_parser/rpc_parser.py,sha256=Ft1VSBk66RLbwURKIoGtsRFDwjorh4EE6Gdqkil5tHY,25871
@@ -59,7 +59,7 @@ sol_parser/grpc/subscribe_builder.py,sha256=xH9NZ1Lp-7AQKcgxoqyE0PrB3vdOqnScm_Ht
59
59
  sol_parser/grpc/transaction_meta.py,sha256=NmIffIQ1_OIfWGjy6JY-f8pIK5ucjDZXXJryjnlgoQs,5894
60
60
  sol_parser/instr/__init__.py,sha256=0_Ky8KpVEoXzxszHcHLTuY2SDsJwu0uAF2Q0wMY1e-c,503
61
61
  sol_parser/logs/__init__.py,sha256=e1cbhbCNeXy-NZvVsYCpGksBpZf4NJBLmdlky06og-U,349
62
- sol_parser_sdk_python-0.5.13.dist-info/METADATA,sha256=BP18H7b5D3mDvlRc-DEQc0uOxUt1uXFIokHY9XmZ6JY,20000
63
- sol_parser_sdk_python-0.5.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
64
- sol_parser_sdk_python-0.5.13.dist-info/entry_points.txt,sha256=ZGXRb-2jBdc56d8PCAZFiJBLTAzUKFeHPohysJnKVbA,206
65
- sol_parser_sdk_python-0.5.13.dist-info/RECORD,,
62
+ sol_parser_sdk_python-0.5.14.dist-info/METADATA,sha256=SruOAOSNW0NilLlGbiS2CnYu4M19rLdyl5Q2H8iM9Gc,20745
63
+ sol_parser_sdk_python-0.5.14.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
64
+ sol_parser_sdk_python-0.5.14.dist-info/entry_points.txt,sha256=ZGXRb-2jBdc56d8PCAZFiJBLTAzUKFeHPohysJnKVbA,206
65
+ sol_parser_sdk_python-0.5.14.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.27.0
2
+ Generator: hatchling 1.32.4
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any