diff --git a/README.md b/README.md index 058cc02..8fc0642 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,12 @@ A comprehensive Rust SDK for seamless interaction with the PumpFun Solana progra This repository is forked from [https://github.com/nhuxhr/pumpfun-rs](https://github.com/nhuxhr/pumpfun-rs). 1. Change `PumpFun<'a>` to `PumpFun`, and `payer: &'a Keypair` to `payer: Arc`. -2. Add `logs_filter` and `logs_paser` to parse the logs of the PumpFun program. +2. Add `logs_filters` and `logs_paser` to parse the logs of the PumpFun program. 3. Add `logs_data` to define the data structure of the logs. +4. Add `logs_subscribe` to subscribe the logs of the PumpFun program. +5. Add `logs_events` to define the event of the logs. +6. Add `logs_parser` to parse the logs. +7. Add `logs_process` to process the logs. ## Table of Contents diff --git a/crates/pumpfun/Cargo.toml b/crates/pumpfun/Cargo.toml index 90daa1b..3c6a60c 100644 --- a/crates/pumpfun/Cargo.toml +++ b/crates/pumpfun/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mai3-pumpfun-sdk" -version = "2.2.1" +version = "2.2.2" edition = "2021" authors = ["William "] repository = "https://github.com/MiracleAI-Labs/pumpfun-sdk" @@ -23,6 +23,7 @@ serde = { version = "1.0.215", features = ["derive"] } serde_json = "1.0.132" solana-sdk = "1.18.26" tokio = "1.42.0" -futures-util = "0.3.29" +futures = "0.3.31" +futures-util = "0.3.31" base64 = "0.22.1" bs58 = "0.5.1" diff --git a/crates/pumpfun/src/instruction/logs_event.rs b/crates/pumpfun/src/instruction/logs_events.rs similarity index 100% rename from crates/pumpfun/src/instruction/logs_event.rs rename to crates/pumpfun/src/instruction/logs_events.rs diff --git a/crates/pumpfun/src/instruction/logs_filter.rs b/crates/pumpfun/src/instruction/logs_filters.rs similarity index 100% rename from crates/pumpfun/src/instruction/logs_filter.rs rename to crates/pumpfun/src/instruction/logs_filters.rs diff --git a/crates/pumpfun/src/instruction/logs_process.rs b/crates/pumpfun/src/instruction/logs_process.rs index f30d9c7..e89a5a9 100644 --- a/crates/pumpfun/src/instruction/logs_process.rs +++ b/crates/pumpfun/src/instruction/logs_process.rs @@ -1,5 +1,5 @@ use crate::error::ClientResult; -use crate::instruction::logs_filter::{LogFilter, DexInstruction}; +use crate::instruction::logs_filters::{LogFilter, DexInstruction}; pub async fn process_logs( signature: &str, diff --git a/crates/pumpfun/src/instruction/logs_subscribe.rs b/crates/pumpfun/src/instruction/logs_subscribe.rs index e74078b..ef39a8c 100644 --- a/crates/pumpfun/src/instruction/logs_subscribe.rs +++ b/crates/pumpfun/src/instruction/logs_subscribe.rs @@ -8,7 +8,7 @@ use anchor_client::solana_sdk::commitment_config::CommitmentConfig; use std::sync::Arc; use tokio::sync::mpsc; use tokio::task::JoinHandle; -use futures_util::StreamExt; +use futures::{future::BoxFuture, Future, StreamExt}; /// 订阅结果,包含订阅任务和取消订阅逻辑 pub struct SubscriptionHandle { diff --git a/crates/pumpfun/src/instruction/mod.rs b/crates/pumpfun/src/instruction/mod.rs index af0ca95..e7b7c8f 100644 --- a/crates/pumpfun/src/instruction/mod.rs +++ b/crates/pumpfun/src/instruction/mod.rs @@ -12,15 +12,15 @@ pub mod logs_data; pub mod logs_parser; -pub mod logs_filter; -pub mod logs_event; +pub mod logs_filters; +pub mod logs_events; pub mod logs_process; pub mod logs_subscribe; pub use logs_data::*; pub use logs_parser::*; -pub use logs_filter::*; -pub use logs_event::*; +pub use logs_filters::*; +pub use logs_events::*; pub use logs_process::*; pub use logs_subscribe::*;