kevinheavey / solders

A high-performance Python toolkit for Solana, written in Rust
https://kevinheavey.github.io/solders/
Apache License 2.0
245 stars 28 forks source link

Support for custom Notifications? #120

Open zakajd opened 1 month ago

zakajd commented 1 month ago

Hi, thanks for amazing library

I'm using Helius RPC provider and they implemented a custom "transactionSubscribe" websocket message. https://docs.helius.dev/webhooks-and-websockets/enhanced-websockets#standard-websockets

But I couldn't find a way to properly patch the python parser to handle those messages. Maybe provide a way to define custom classes as addition to standard Notification's?

Morgandri1 commented 2 weeks ago

Hey @zakajd Because Helius is its own entity seperate from the remainder of the network, it doesn't necessarily make sense to implement their custom messages in this library. however, there are 2 good options for implementation i see:

  1. if @kevinheavey wants, i'd be more than happy to open a quick PR with a rust feature flag for Helius messages, although i'm not sure how that translates to python packages.
  2. other option is to fork the solders repo and just add the messages, then you'll have essentially a full Helius SDK in python.
kevinheavey commented 2 weeks ago

Yeah I don't think it's a good idea to open the can of worms that is adding third party types. Maybe just parse it with the Python json module?