mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-21 12:58:11 +00:00
update version
This commit is contained in:
@@ -20,7 +20,7 @@ Add the following to your `Cargo.toml`:
|
|||||||
|
|
||||||
```toml
|
```toml
|
||||||
[dependencies]
|
[dependencies]
|
||||||
mai3-pumpfun-sdk = "2.4.2"
|
mai3-pumpfun-sdk = "2.4.3"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "mai3-pumpfun-sdk"
|
name = "mai3-pumpfun-sdk"
|
||||||
version = "2.4.2"
|
version = "2.4.3"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["William <william@mai3.io>"]
|
authors = ["William <william@mai3.io>"]
|
||||||
repository = "https://github.com/MiracleAI-Labs/pumpfun-sdk"
|
repository = "https://github.com/MiracleAI-Labs/pumpfun-sdk"
|
||||||
|
|||||||
@@ -48,6 +48,10 @@ pub enum ClientError {
|
|||||||
/// Rate limit exceeded
|
/// Rate limit exceeded
|
||||||
RateLimitExceeded,
|
RateLimitExceeded,
|
||||||
|
|
||||||
|
ExternalService(String),
|
||||||
|
|
||||||
|
Redis(String),
|
||||||
|
|
||||||
Solana(String, String),
|
Solana(String, String),
|
||||||
|
|
||||||
Parse(String, String),
|
Parse(String, String),
|
||||||
@@ -62,6 +66,12 @@ pub enum ClientError {
|
|||||||
|
|
||||||
Other(String),
|
Other(String),
|
||||||
|
|
||||||
|
InvalidData(String),
|
||||||
|
|
||||||
|
PumpFunBuy(String),
|
||||||
|
|
||||||
|
PumpFunSell(String),
|
||||||
|
|
||||||
Timeout(String, String),
|
Timeout(String, String),
|
||||||
|
|
||||||
Duplicate(String),
|
Duplicate(String),
|
||||||
@@ -83,14 +93,19 @@ impl std::fmt::Display for ClientError {
|
|||||||
Self::InvalidInput(msg) => write!(f, "Invalid input: {}", msg),
|
Self::InvalidInput(msg) => write!(f, "Invalid input: {}", msg),
|
||||||
Self::InsufficientFunds => write!(f, "Insufficient funds for transaction"),
|
Self::InsufficientFunds => write!(f, "Insufficient funds for transaction"),
|
||||||
Self::SimulationError(msg) => write!(f, "Transaction simulation failed: {}", msg),
|
Self::SimulationError(msg) => write!(f, "Transaction simulation failed: {}", msg),
|
||||||
|
Self::ExternalService(msg) => write!(f, "External service error: {}", msg),
|
||||||
Self::RateLimitExceeded => write!(f, "Rate limit exceeded"),
|
Self::RateLimitExceeded => write!(f, "Rate limit exceeded"),
|
||||||
Self::Solana(msg, details) => write!(f, "Solana error: {}, details: {}", msg, details),
|
Self::Solana(msg, details) => write!(f, "Solana error: {}, details: {}", msg, details),
|
||||||
Self::Parse(msg, details) => write!(f, "Parse error: {}, details: {}", msg, details),
|
Self::Parse(msg, details) => write!(f, "Parse error: {}, details: {}", msg, details),
|
||||||
Self::Jito(msg, details) => write!(f, "Jito error: {}, details: {}", msg, details),
|
Self::Jito(msg, details) => write!(f, "Jito error: {}, details: {}", msg, details),
|
||||||
|
Self::Redis(msg) => write!(f, "Redis error: {}", msg),
|
||||||
Self::Join(msg) => write!(f, "Task join error: {}", msg),
|
Self::Join(msg) => write!(f, "Task join error: {}", msg),
|
||||||
Self::Subscribe(msg, details) => write!(f, "Subscribe error: {}, details: {}", msg, details),
|
Self::Subscribe(msg, details) => write!(f, "Subscribe error: {}, details: {}", msg, details),
|
||||||
Self::Send(msg, details) => write!(f, "Send error: {}, details: {}", msg, details),
|
Self::Send(msg, details) => write!(f, "Send error: {}, details: {}", msg, details),
|
||||||
Self::Other(msg) => write!(f, "Other error: {}", msg),
|
Self::Other(msg) => write!(f, "Other error: {}", msg),
|
||||||
|
Self::PumpFunBuy(msg) => write!(f, "PumpFun buy error: {}", msg),
|
||||||
|
Self::PumpFunSell(msg) => write!(f, "PumpFun sell error: {}", msg),
|
||||||
|
Self::InvalidData(msg) => write!(f, "Invalid data: {}", msg),
|
||||||
Self::Timeout(msg, details) => write!(f, "Operation timed out: {}, details: {}", msg, details),
|
Self::Timeout(msg, details) => write!(f, "Operation timed out: {}, details: {}", msg, details),
|
||||||
Self::Duplicate(msg) => write!(f, "Duplicate event: {}", msg),
|
Self::Duplicate(msg) => write!(f, "Duplicate event: {}", msg),
|
||||||
Self::InvalidEventType => write!(f, "Invalid event type"),
|
Self::InvalidEventType => write!(f, "Invalid event type"),
|
||||||
@@ -98,7 +113,6 @@ impl std::fmt::Display for ClientError {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl std::error::Error for ClientError {
|
impl std::error::Error for ClientError {
|
||||||
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
|
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
|
||||||
match self {
|
match self {
|
||||||
@@ -106,6 +120,21 @@ impl std::error::Error for ClientError {
|
|||||||
Self::SolanaClientError(err) => Some(err),
|
Self::SolanaClientError(err) => Some(err),
|
||||||
Self::UploadMetadataError(err) => Some(err.as_ref()),
|
Self::UploadMetadataError(err) => Some(err.as_ref()),
|
||||||
Self::AnchorClientError(err) => Some(err),
|
Self::AnchorClientError(err) => Some(err),
|
||||||
|
Self::ExternalService(_) => None,
|
||||||
|
Self::Redis(_) => None,
|
||||||
|
Self::Solana(_, _) => None,
|
||||||
|
Self::Parse(_, _) => None,
|
||||||
|
Self::Jito(_, _) => None,
|
||||||
|
Self::Join(_) => None,
|
||||||
|
Self::Subscribe(_, _) => None,
|
||||||
|
Self::Send(_, _) => None,
|
||||||
|
Self::Other(_) => None,
|
||||||
|
Self::PumpFunBuy(_) => None,
|
||||||
|
Self::PumpFunSell(_) => None,
|
||||||
|
Self::Timeout(_, _) => None,
|
||||||
|
Self::Duplicate(_) => None,
|
||||||
|
Self::InvalidEventType => None,
|
||||||
|
Self::ChannelClosed => None,
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user