feat: deprecate legacy utility functions and bump version to 0.6.7

- Add deprecation warnings to PumpFun and PumpSwap utility functions
- Update version from 0.6.6 to 0.6.7 in Cargo.toml and documentation
- Add .claude/ directory to .gitignore
- Mark legacy price calculation and data retrieval functions as deprecated
This commit is contained in:
ysq
2025-09-11 17:17:58 +08:00
parent fce043f087
commit 40b4541036
5 changed files with 13 additions and 5 deletions
+1
View File
@@ -26,4 +26,5 @@ tmp_*.rs
tmp_*.log
.claude/
.serena/
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "sol-trade-sdk"
version = "0.6.6"
version = "0.6.7"
edition = "2021"
authors = [
"William <byteblock6@gmail.com>",
+2 -2
View File
@@ -89,14 +89,14 @@ Add the dependency to your `Cargo.toml`:
```toml
# Add to your Cargo.toml
sol-trade-sdk = { path = "./sol-trade-sdk", version = "0.6.6" }
sol-trade-sdk = { path = "./sol-trade-sdk", version = "0.6.7" }
```
### Use crates.io
```toml
# Add to your Cargo.toml
sol-trade-sdk = "0.6.6"
sol-trade-sdk = "0.6.7"
```
## 🛠️ Usage Examples
+2 -2
View File
@@ -89,14 +89,14 @@ git clone https://github.com/0xfnzero/sol-trade-sdk
```toml
# 添加到您的 Cargo.toml
sol-trade-sdk = { path = "./sol-trade-sdk", version = "0.6.6" }
sol-trade-sdk = { path = "./sol-trade-sdk", version = "0.6.7" }
```
### 使用 crates.io
```toml
# 添加到您的 Cargo.toml
sol-trade-sdk = "0.6.6"
sol-trade-sdk = "0.6.7"
```
## 🛠️ 使用示例
+7
View File
@@ -60,11 +60,13 @@ impl SolanaTrade {
// -------------------------------- PumpFun --------------------------------
#[deprecated(since = "0.6.7", note = "This function is deprecated and will be removed in a future version")]
#[inline]
pub fn get_pumpfun_token_buy_price(&self, amount: u64, trade_info: &PumpFunTradeEvent) -> u64 {
crate::instruction::utils::pumpfun::get_buy_price(amount, trade_info)
}
#[deprecated(since = "0.6.7", note = "This function is deprecated and will be removed in a future version")]
#[inline]
pub async fn get_pumpfun_token_current_price(
&self,
@@ -80,6 +82,7 @@ impl SolanaTrade {
Ok(price::pumpfun::price_token_in_sol(virtual_sol_reserves, virtual_token_reserves))
}
#[deprecated(since = "0.6.7", note = "This function is deprecated and will be removed in a future version")]
#[inline]
pub async fn get_pumpfun_token_real_sol_reserves(
&self,
@@ -94,6 +97,7 @@ impl SolanaTrade {
Ok(actual_sol_reserves)
}
#[deprecated(since = "0.6.7", note = "This function is deprecated and will be removed in a future version")]
#[inline]
pub async fn get_pumpfun_token_creator(&self, mint: &Pubkey) -> Result<Pubkey, anyhow::Error> {
let (bonding_curve, _) =
@@ -107,6 +111,7 @@ impl SolanaTrade {
// -------------------------------- PumpSwap --------------------------------
#[deprecated(since = "0.6.7", note = "This function is deprecated and will be removed in a future version")]
#[inline]
pub async fn get_pumpswap_token_current_price(
&self,
@@ -128,6 +133,7 @@ impl SolanaTrade {
Ok(price)
}
#[deprecated(since = "0.6.7", note = "This function is deprecated and will be removed in a future version")]
#[inline]
pub async fn get_pumpswap_token_real_sol_reserves(
&self,
@@ -141,6 +147,7 @@ impl SolanaTrade {
Ok(quote_amount)
}
#[deprecated(since = "0.6.7", note = "This function is deprecated and will be removed in a future version")]
#[inline]
pub async fn get_pumpswap_payer_token_balance(
&self,