23 Commits

Author SHA1 Message Date
0xfnzero b09902c527 feat: harden trading SDK examples 2026-07-12 14:35:58 +08:00
0xfnzero 05ac079d6d release: update DEX protocol support for v4.0.9
Sync supported DEX IDLs from bitquery/solana-idl-lib, upgrade protocol builders, and keep trade submission hot paths free of RPC query calls.

Include exact-output coverage, token-account setup fixes for WSOL and stable pairs, and low-latency transaction build improvements.
2026-05-16 06:42:50 +08:00
0xfnzero 06ef2fed84 feat(swqos): align endpoint tables with SwqosRegion and document fallbacks
- Extend SWQOS regional constants to 10 entries (Dublin, Singapore, Default)
  so indices match SwqosRegion 0..9 everywhere
- Document geographic nearest-fill among published PoPs; call out Default and
  single-PoP provider constraints in comments
- Fix Node1 QUIC Default endpoint to match HTTP; tune ZeroSlot/Blox/Speedlanding
  regional mappings where a closer published PoP exists
- Add unit tests for table length and Astralane/Node1 cross-table consistency
- Update SwqosRegion rustdoc, README, and trading_client example accordingly

Made-with: Cursor
2026-04-14 02:13:42 +08:00
0xfnzero 971ef41fad feat: add global MEV protection and refactor TradeConfig to builder pattern
- Add `mev_protection: bool` to `TradeConfig` and `InfrastructureConfig` (default: false)
  - Astralane QUIC: switches to port 9000 (MEV-protected endpoint) when enabled
  - BlockRazor HTTP: uses `mode=sandwichMitigation` query param when enabled
  - BlockRazor gRPC: uses `mode=sandwichMitigation` when enabled
- Add `SWQOS_ENDPOINTS_ASTRALANE_QUIC_MEV` constants (port 9000) to `constants/swqos.rs`
- Fix `astralane_quic.rs` IP candidates to use the actual port from the address (supports both 7000 and 9000)
- Refactor `TradeConfig` to builder pattern via `TradeConfig::builder()`
  - Introduce `TradeConfigBuilder` with all optional fields and clear defaults
  - `TradeConfig::new()` kept as a shortcut (calls `builder().build()`) for backward compatibility
  - Remove old `with_wsol_ata_config` / `with_check_min_tip` / `with_swqos_cores_from_end` / `with_mev_protection` chain methods
- Update all 16 examples to use `TradeConfig::builder()` with commented-out options so users can discover all available settings at a glance
- Update README.md and README_CN.md code snippets to use builder pattern

🤖 Generated with [Qoder][https://qoder.com]
2026-04-08 02:13:37 +08:00
hookenful 2abcf3839e style: run rustfmt 2026-03-14 18:16:55 +02:00
Wood d7b0985844 Release v3.6.2: Node1 QUIC, Speedlanding reliability, version bump
- Add Node1 QUIC transport (UUID auth, bincode tx, region endpoints)
- Speedlanding: ensure_connected, connect/send timeouts, lock on reconnect, SNI from endpoint host
- Bump version to 3.6.2; update README(s) and add release notes

Made-with: Cursor
2026-03-12 15:40:56 +08:00
Wood a003fd4d2f feat: Astralane QUIC, code review fixes, README & example updates
- Add Astralane QUIC client (astralane_quic.rs) and SwqosTransport::Quic
- README: Astralane QUIC usage, remove third-party doc links, add QUIC to examples
- Code review: API key not in logs, PumpSwap no clone, PDA Result, SELL_DISCRIMINATOR, ensure_wsol_ata refactor, tracing in astralane, only supports fix
- instruction/utils: pumpfun/pumpswap PDA & discriminator unit tests
- trading_client example: SwqosTransport, Astralane QUIC in config
- cli_trading: fix all unused variable warnings (_prefix)
- Add docs/CODE_REVIEW_REPORT.md

Made-with: Cursor
2026-03-07 10:47:31 +08:00
Wood 0cd276d6cb feat: Helius Sender SWQOS support and global check_min_tip option
- Add Helius Sender client (helius.rs) with dual routing and swqos_only mode
- Helius min tip: 0.0002 SOL default, 0.000005 SOL when swqos_only=true
- Add TradeConfig.check_min_tip (default false) to skip min-tip validation for lower latency
- Thread check_min_tip through SwapParams and execute_parallel; only call min_tip_sol when enabled
- Add SWQOS_ENDPOINTS_HELIUS and HELIUS_TIP_ACCOUNTS in constants
- Extend SwqosConfig/SwqosType for Helius; add Helius to get_endpoint and get_swqos_client
- Update trading_client, shared_infrastructure and middleware_system examples

Made-with: Cursor
2026-02-27 15:00:13 +08:00
vibes d78856718e Add shared_infrastructure example and update docs
- Add new `shared_infrastructure` example demonstrating multi-wallet
  resource sharing pattern
- Update `trading_client` example to show both initialization methods
- Update README with:
  - New feature: "Shared Infrastructure" in features list
  - Both methods (simple and shared) in TradingClient creation section
  - New example in examples summary table
- Add `shared_infrastructure` to workspace members

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 21:26:21 +00:00
Wood 2c3d617c6e feat(swqos): add SWQOS provider blacklist configuration
- Add SWQOS_BLACKLIST constant for disabling specific providers
- Add SwqosConfig::is_blacklisted() method to check blacklist status
- Skip blacklisted providers during client initialization with warning
- Remove NextBlock references from README, README_CN and examples
- NextBlock is blacklisted by default, can be enabled by removing from SWQOS_BLACKLIST
2025-12-20 16:45:29 +08:00
ysq 85154f6c01 refactor: Update GasFeeStrategy to instance-based API and update docs 2025-10-07 23:12: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 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 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 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 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 48a6c6283a refactor: optimize trading execution architecture and add wSOL management
- Simplify TradeExecutor interface by integrating middleware and swqos clients into params
- Refactor parallel execution module with dedicated buy/sell execute functions
- Add SOL wrapping/unwrapping functionality for wSOL management
- Remove redundant parameter passing in sell operations
- Delete example main.rs file
- Optimize transaction building with integrated parameter structures

BREAKING CHANGE: TradeExecutor interface simplified, middleware and swqos_clients now passed through params
2025-09-09 17:02:24 +08:00
wei df00d3f26a feat: add Astralane 2025-09-07 15:22:06 +08:00
wei fdb9adfe5b feat:each SWQOS service now supports an optional custom URL parameter: 2025-09-06 21:52:06 +08:00
wei 9f8278f109 feat: add BlockRazor 2025-09-06 21:24:38 +08:00
ysq c10406915c feat: add examples and enhance MEV protection services
This commit adds comprehensive examples for various trading operations including:
- PumpFun copy and sniper trading
- Bonk copy and sniper trading
- PumpSwap trading
- Raydium CPMM and AMM V4 trading
- Middleware system demonstration
- Event subscription

Enhanced MEV protection services with FlashBlock and Node1 integration.
Updated instruction modules for bonk, pumpswap, and raydium_cpmm.
Improved SWQOS modules for better transaction handling.
2025-08-25 00:21:15 +08:00