mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-06 13:47:44 +00:00
Merge branch 'main' of github.com:0xfnzero/solana-streamer into main
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "solana-streamer"
|
||||
name = "solana-streamer-sdk"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
authors = ["William <byteblock6@gmail.com>", "sgxiang <sgxiang@gmail.com>", "wei <1415121722@qq.com>"]
|
||||
|
||||
@@ -31,13 +31,13 @@ Add the dependency to your `Cargo.toml`:
|
||||
|
||||
```toml
|
||||
# Add to your Cargo.toml
|
||||
solana-streamer = { path = "./solana-streamer", version = "0.1.0" }
|
||||
solana-streamer-sdk = { path = "./solana-streamer", version = "0.1.0" }
|
||||
```
|
||||
|
||||
## Usage Examples
|
||||
|
||||
```rust
|
||||
use solana_streamer::{
|
||||
use solana_streamer_sdk::{
|
||||
match_event,
|
||||
streaming::{
|
||||
event_parser::{
|
||||
@@ -96,7 +96,7 @@ async fn test_shreds() -> Result<(), Box<dyn std::error::Error>> {
|
||||
Protocol::RaydiumCpmm,
|
||||
Protocol::RaydiumClmm,
|
||||
];
|
||||
|
||||
|
||||
println!("Listening for events, press Ctrl+C to stop...");
|
||||
shred_stream
|
||||
.shredstream_subscribe(protocols, None, callback)
|
||||
|
||||
+3
-3
@@ -31,13 +31,13 @@ git clone https://github.com/0xfnzero/solana-streamer
|
||||
|
||||
```toml
|
||||
# 添加到您的 Cargo.toml
|
||||
solana-streamer = { path = "./solana-streamer", version = "0.1.0" }
|
||||
solana-streamer-sdk = { path = "./solana-streamer", version = "0.1.0" }
|
||||
```
|
||||
|
||||
## 使用示例
|
||||
|
||||
```rust
|
||||
use solana_streamer::{
|
||||
use solana_streamer_sdk::{
|
||||
match_event,
|
||||
streaming::{
|
||||
event_parser::{
|
||||
@@ -96,7 +96,7 @@ async fn test_shreds() -> Result<(), Box<dyn std::error::Error>> {
|
||||
Protocol::RaydiumCpmm,
|
||||
Protocol::RaydiumClmm,
|
||||
];
|
||||
|
||||
|
||||
println!("开始监听事件,按 Ctrl+C 停止...");
|
||||
shred_stream
|
||||
.shredstream_subscribe(protocols, None, callback)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
use solana_streamer::{
|
||||
use solana_streamer_sdk::{
|
||||
match_event,
|
||||
streaming::{
|
||||
event_parser::{
|
||||
|
||||
Reference in New Issue
Block a user