Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement Rust consumer SDK for Pyth Lazer #2308

Closed
wants to merge 6 commits into from

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Rust Consumer SDK for Pyth Lazer

This PR implements a Rust consumer SDK for Pyth Lazer that allows subscribing to Lazer WebSocket feeds and receiving price updates. The implementation follows similar patterns to the existing JavaScript SDK and includes redundant WebSocket connection pooling for reliability.

Features

  • Redundant WebSocket connection pool with automatic reconnection
  • Subscription management (subscribe/unsubscribe/update)
  • Message deduplication using TTL cache
  • Stream-based API for consuming updates
  • Configurable connection parameters (timeout, number of connections)

Implementation Details

  • Uses tokio for async runtime and WebSocket handling
  • Implements connection pool similar to RedundantBinanceStream
  • Leverages protocol types from lazer/sdk/rust/protocol
  • Supports multiple price feed IDs and properties
  • Handles connection lifecycle and error recovery

Link to Devin run: https://app.devin.ai/sessions/e40b4723277c4c6da3c06e03b9e95205

devin-ai-integration bot and others added 5 commits January 30, 2025 18:44
- Implement RedundantLazerClient with multiple WebSocket connections
- Add subscription management with deduplication
- Support dynamic subscription updates
- Provide channel-based API for price feed updates
- Handle reconnections and message parsing

Co-Authored-By: Tejas Badadare <[email protected]>
Co-Authored-By: Tejas Badadare <[email protected]>
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link

vercel bot commented Jan 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 30, 2025 7:15pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 30, 2025 7:15pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 30, 2025 7:15pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
component-library ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2025 7:15pm
entropy-debugger ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2025 7:15pm
insights ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2025 7:15pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant