Commit Graph

372 Commits

Author SHA1 Message Date
ysq ea3c971868 Merge commit '85154f6c01689759fdae09e4c1d1efeaba937a93' 2025-10-07 23:45:17 +08:00
ysq 85154f6c01 refactor: Update GasFeeStrategy to instance-based API and update docs 2025-10-07 23:12:37 +08:00
ysq e13c891cc9 refactor: Simplify nonce management by replacing global cache with direct fetch
Remove NonceCache singleton pattern and replace with fetch_nonce_info function
that directly fetches nonce information from RPC. This simplifies the API by
eliminating cache initialization and state management, making it easier for
users to manage durable nonces.
2025-10-07 21:20:00 +08:00
ysq 2d9976368b refactor: Replace global address lookup table cache with direct fetch approach
Replace the global AddressLookupTableCache with a direct fetch function to simplify address lookup table management. This change improves code maintainability by removing global state and makes the API more explicit.

Key changes:
- Remove AddressLookupTableCache and AddressLookupManager
- Add new fetch_address_lookup_table_account function
- Update TradeBuyParams and TradeSellParams to use AddressLookupTableAccount instead of Pubkey
- Update all examples to use the new direct fetch approach
- Update documentation to reflect the simplified workflow
2025-10-07 20:56:02 +08:00
ysq 2e7b9819d3 perf: Add cross-platform architecture support and remove test code 2025-10-07 13:27:08 +08:00
Wood 657d6bc83e Fix concurrency-related memory safety issues. 2025-10-07 00:48:33 +08:00
Wood ffc71cc1d8 performance optimization 2025-10-07 00:08:41 +08:00
Wood f9492b2c3a peformance optimization 2025-10-06 23:41:12 +08:00
Wood 0a0340a46f peformance optimization 2025-10-06 23:40:27 +08:00
ysq 2f5a63ed55 feat: add Meteora DAMM V2 support and bump to v3.0.1
Add Meteora DAMM V2 trading protocol with instruction builder, type definitions, and fixed_output_token_amount parameter for precise output control. Update all examples and documentation.
2025-10-05 22:27:04 +08:00
ysq 30a7d570fa refactor: remove solana-streamer-sdk dependency and migrate type definitions locally
This refactoring migrates protocol-related type definitions from solana-streamer-sdk to local modules:

- Add local type files: bonk_types.rs, pumpswap_types.rs, raydium_amm_v4_types.rs, raydium_cpmm_types.rs
- Add BorshDeserialize support for all types
- Refactor BondingCurveAccount to support Borsh deserialization
- Update import paths across all protocol utility modules (bonk, pumpfun, pumpswap, raydium)
- Refactor trade parameter construction methods from event objects to individual parameters for better flexibility
- Fix nonce_cache import path to use local SolanaRpcClient
2025-10-03 17:02:37 +08:00
ysq a7f673b43d feat: upgrade to v2.0.0 with major dependency updates
- Upgrade Solana dependencies from 2.3.x to 3.0.0 series
  - Upgrade solana-streamer-sdk from 0.4.13 to 0.5.0
  - Upgrade yellowstone-grpc from 8.0.0 to 9.0.0
  - Add new SPL token utility modules (spl_token.rs, spl_token_2022.rs,
  spl_associated_token_account.rs)
  - Remove deprecated gRPC protocol definitions (protos/ directory)
  - Remove event_subscription example and update all example dependencies
  - Update README documentation to reflect v2.0.0 changes
  - Refactor imports to use new dependency structure across examples

  BREAKING CHANGES:
  - Solana SDK upgraded to 3.0.0 with API changes
  - Removed gRPC protocol definitions
  - Updated import paths for SPL token operations
2025-09-27 14:24:41 +08:00
ysq e75b0c9480 feat: upgrade to v1.2.3 2025-09-27 11:32:32 +08:00
ysq 2c52306a79 feat: refactor GasFeeStrategy API and bump version to 1.2.2 2025-09-26 00:07:39 +08:00
ysq 54434b7217 Merge commit '3495eade2cc23a33d0d5d76197e070be8c1ad2fb' 2025-09-25 21:39:35 +08:00
ysq 3962a278b9 feat: refactor trade API to return execution status with signature
- Bump version from 1.2.0 to 1.2.1
- Change trade methods return type from Signature to (bool, Signature)
- Improve parallel execution error handling and status tracking
- Update CLI examples to match new API interface
- Enhance transaction success/failure reporting capabilities

Breaking Change: Trade API now returns tuple (success_status, signature)
2025-09-25 21:39:14 +08:00
0xfnzero 3495eade2c Update README_CN.md 2025-09-25 01:39:58 +08:00
0xfnzero c49b79f830 Update README.md 2025-09-25 01:39:34 +08:00
ysq ce5243702c feat: refactor trading API and add multi-token type support (v1.2.0)
- Bump version to 1.2.0
- Remove TradeSwapParams to simplify API structure
- Add TradeTokenType enum supporting SOL/WSOL/USD1 tokens
- Standardize parameter naming: sol_amount → input_token_amount, token_amount → input_token_amount
- Refactor account management parameters: create_wsol_ata → create_input_token_ata etc.
- Update all example code to use new API
- Synchronize English and Chinese documentation

BREAKING CHANGE:
- Removed TradeSwapParams struct
- Modified field names in TradeBuyParams and TradeSellParams
- Existing code needs migration to use new parameter structure
2025-09-22 23:18:53 +08:00
ysq 020187a57a feat: add trade type parameter and bump version to 1.1.1 2025-09-22 01:25:32 +08:00
ysq 334e685104 feat: upgrade to v1.1.0 and add universal token swap functionality
- Version bump: upgrade from 1.0.2 to 1.1.0
- Add TradeSwapParams struct for universal token-to-token swapping
- Update bonk_copy_trading example to use new swap method instead of buy/sell
- Expand trading parameters documentation with TradeSwapParams details
- Fix SOL_TOKEN_ACCOUNT constant definition
- Add USD1 token support (Bonk protocol only)
- Enhance account management and optimization options for token swaps
2025-09-22 01:09:41 +08:00
ysq 4780e71c11 refactor: unify trading parameters and add USD1 token pool support
- Merge BuyParams and SellParams into unified SwapParams structure
- Add USD1 token pool support with related constants and configurations
- Refactor trade executor by combining buy_with_tip and sell_with_tip into swap method
- Update all protocol instruction builders to support new parameter structure
- Standardize ATA creation/closing parameter naming conventions
- Update example code to use new API interfaces
- Optimize trading logic with automatic direction detection based on input token type
2025-09-22 00:05:20 +08:00
ysq f8891f3147 refactor: simplify trading parameters API and nonce handling
- Change recent_blockhash from required to optional parameter
- Replace separate nonce_account and current_nonce with unified durable_nonce
- Update all examples and documentation to reflect API changes
- Improve nonce cache usage pattern for better developer experience

BREAKING CHANGE: TradeBuyParams and TradeSellParams API has changed
- recent_blockhash is now Option<Hash> instead of Hash
- nonce_account and current_nonce fields replaced with durable_nonce: Option<DurableNonceInfo>
2025-09-21 21:56:17 +08:00
ysq b4769749f5 Merge commit 'dbde80b4282767f219bac2b92ece85e0e747ce42' 2025-09-21 21:35:04 +08:00
ysq 9ba8e3b3e7 refactor(gas-fee): Refactor Gas Fee Strategy API
- Rename add_* methods to set_* for clarity
- Simplify normal strategy API (remove TradeType param)
- Expose set/del methods for flexible strategy management
- Update docs and examples to match new API

BREAKING CHANGE: Method names changed for Gas Fee Strategy
2025-09-21 21:34:19 +08:00
wood dbde80b428 update dedicated tip account for temporal 2025-09-21 20:47:36 +08:00
wood 0ac710ce75 fix build warn 2025-09-21 02:56:02 +08:00
wood b46582a273 rebuild nonce and swqos strategy 2025-09-20 14:00:45 +08:00
ysq 4df22f2057 feat: upgrade to v1.0.2 2025-09-20 00:52:37 +08:00
ysq afc34f57fc Merge commit 'd1c001df368e2ecf517e3ff7b8a8f5c46d7b8ad7' 2025-09-20 00:27:28 +08:00
ysq d1c001df36 refactor: move set_global_gas_fee_strategy to GasFeeStrategy struct 2025-09-19 23:59:52 +08:00
ysq e4a6b49aab refactor(gas-fee): replace init_builtin_fee_strategies with set_global_strategy
- Add customizable cu_limit, cu_price, buy_tip, sell_tip parameters
- Update all examples and documentation
- Simplify strategy configuration API
2025-09-19 23:31:41 +08:00
ysq 4907aafead feat: add flexible nonce parameter support
- Add nonce_account and current_nonce to trade parameters
- Remove hardcoded NonceCache dependency from nonce_manager
- Update examples and documentation for new nonce usage
- Fix nonce documentation errors and improve clarity
2025-09-19 18:02:11 +08:00
ysq a53038855e feat: add gas fee strategy system with examples
- Add GasFeeStrategy module supporting normal and high-low fee strategies
- Initialize gas fee strategies in all examples
- Update documentation and README with gas fee strategy configuration
- Improve nonce cache documentation emphasizing latest nonce usage
- Adjust default gas fee configuration parameters
- Remove duplicate imports and unused constant references
2025-09-19 15:46:51 +08:00
ysq e8abb65e2e refactor: simplify GasFeeStrategy from singleton to static methods
- Replace OnceLock singleton pattern with LazyLock static storage
- Convert instance methods to static methods for better performance
- Remove enabled/disabled strategy type management complexity
- Update parallel execution to use new static API
2025-09-19 11:35:13 +08:00
ysq 006686e8a3 feat: major gas fee strategy and documentation overhaul
- feat(gas): add comprehensive gas fee strategy management system
  * Implement GasFeeStrategyType with Default/LowTipHighCuPrice/HighTipLowCuPrice strategies
  * Add dynamic gas fee configuration per SWQOS service and trade type
  * Integrate arc-swap for thread-safe strategy updates

- docs: restructure documentation with dedicated guides
  * Add ADDRESS_LOOKUP_TABLE.md/CN.md for lookup table configuration
  * Add NONCE_CACHE.md/CN.md for nonce management documentation
  * Add TRADING_PARAMETERS.md/CN.md for comprehensive parameter guides
  * Simplify main README.md with focused overview

- refactor: update all examples with new gas fee strategy integration
  * Modernize 14 trading examples with consistent parameter handling
  * Improve error handling and configuration management
  * Enhance parallel trading implementation
2025-09-19 00:49:45 +08:00
ysq fad343ffbf Rollback 2025-09-17 11:14:15 +08:00
ysq da28f40889 feat: v1.0.1 - add custom compute unit limit support
Add custom_cu_limit parameter to parallel trading functions, allowing users to override default compute unit limits for both buy and sell operations.
2025-09-17 00:26:51 +08:00
ysq c5ff7c1cbb refactor: Refactor SDK core architecture and trading parameter system
- Refactor SolanaTrade main class structure with improved modular design
- Refactor trading parameter system: BuyParams/SellParams -> InternalBuyParams/InternalSellParams
- Remove deprecated PriorityFee and related utility functions
- Add SwqosSettings to replace legacy SwqosConfig
- Add comprehensive technical documentation:
  • Address Lookup Table usage guide (EN/CN)
  • Nonce Cache mechanism documentation (EN/CN)
  • Trading Parameters documentation (EN/CN)
- Refactor all example code to adapt to new API interfaces
- Optimize public API design and code comments
- Clean up redundant utility functions and type definitions

Impact: 43 files changed, 2013 insertions(+), 1735 deletions(-)
2025-09-17 00:10:33 +08:00
ysq 943c2627f3 feat: upgrade to v0.6.15 2025-09-15 22:47:07 +08:00
ysq 558188bb38 feat: Add CLI trading tool with multi-DEX support 2025-09-15 21:12:42 +08:00
ysq 8aecc039b1 feat: upgrade to v0.6.13 2025-09-15 00:02:21 +08:00
ysq 1192730e22 feat: upgrade to v0.6.12 2025-09-14 23:28:45 +08:00
ysq 206baca025 feat: bump to v0.6.11 with dependency updates
- Update solana-streamer-sdk to 0.4.9
- Increase transaction confirmation timeout to 10s
- Update documentation version references
2025-09-14 01:21:28 +08:00
sgxiang e52841dc73 Update README.md 2025-09-13 21:09:18 +08:00
ysq f273cf2c82 feat: upgrade to v0.6.10 2025-09-13 17:12:03 +08:00
ysq a1895b1ac2 feat: upgrade to v0.6.9 2025-09-13 00:15:18 +08:00
ysq bbad566c3b fixed 2025-09-12 10:13:21 +08:00
wood 008694daf8 fix swqos tips index errors 2025-09-12 04:29:47 +08:00
ysq 40b4541036 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
2025-09-11 17:17:58 +08:00