Commit Graph

201 Commits

Author SHA1 Message Date
ysq aef9fe6b14 feat: add Bonk trading examples and fix function naming
- Add comprehensive Bonk trading examples in README
- Fix function naming consistency (width -> with)
- Enhance BonkParams with from_trade and from_dev_trade methods
- Add amount calculation utilities and tests
2025-07-14 22:26:03 +08:00
wood 1ca0dfdd53 update readme 2025-07-13 13:51:33 +08:00
ysq 461538ad90 refactor: simplify trading API and improve configuration management
- Remove `with_tip` parameter from buy/sell methods, always use tip-enabled transactions
- Fix variable naming inconsistencies (token_amount -> amount_token)
- Add automatic padding logic for buy_tip_fees array to match swqos_configs length
- Update README examples with corrected variable references and API usage
- Fix bug in test_pumpswap() using wrong DexType (PumpFun -> PumpSwap)
- Improve API documentation with clearer parameter descriptions
- Clean up code formatting and remove unnecessary blank lines

Breaking Changes:
- buy() and sell() method signatures changed (removed with_tip parameter)
- Variable naming standardized across codebase
2025-07-12 20:50:13 +08:00
ysq c4bf62be7d feat: optimize Bonk trading instructions and add price calculation
- Optimize sell instruction building, remove redundant code and add account closing
- Add token price calculation function supporting different decimal places
- Clean up debug logs and refactor code structure
2025-07-12 01:14:05 +08:00
ysq 9946637c62 refactor: rename 2025-07-11 16:38:30 +08:00
ysq 2b970698c2 fixed: fix timer 2025-07-11 10:40:04 +08:00
wood 947652db30 update dex_type 2025-07-11 00:02:51 +08:00
wood c66a89cad2 update example 2025-07-10 23:54:49 +08:00
wood c8ff05fb48 update readme 2025-07-10 23:43:40 +08:00
wood 266f5a6d71 update readme 2025-07-10 23:33:06 +08:00
wood e61898803f update readme 2025-07-10 23:28:51 +08:00
wood 36b25c1fbe update readme 2025-07-10 23:27:40 +08:00
wood 42952dfc8b rename protocol to dex_type 2025-07-10 22:15:53 +08:00
ysq 7b1951cf29 refactor: simplify Cargo.toml keywords 2025-07-10 18:31:01 +08:00
ysq b891b2bc27 refactor: Major SDK architecture refactoring and API consolidation
- Consolidate separate buy/sell modules into unified trading interface
- Remove protocol-specific buy/sell files (bonk, pumpfun, pumpswap)
- Add new trading constants and utility functions
- Simplify API with unified buy/sell methods supporting multiple protocols
- Enhance documentation with comprehensive examples and usage guides
- Add balance checking and token account management utilities
- Improve code organization and maintainability
2025-07-10 18:14:21 +08:00
wood 57c2848a57 rename yellowstone 2025-07-10 10:50:12 +08:00
wood 516b682519 rename grpc to streaming 2025-07-10 03:24:13 +08:00
wood f1649ac933 update dir 2025-07-10 02:53:01 +08:00
wood 794207b6c2 update dir 2025-07-10 02:47:52 +08:00
wood 8f79c3bfd9 rebuild sdk dir 2025-07-10 02:38:06 +08:00
wood 1540fb6469 delete constants folder 2025-07-10 02:17:56 +08:00
ysq 756ec6e263 refactor: rename protocol from RaydiumLaunchpad to Bonk
Comprehensive renaming of RaydiumLaunchpad-related modules, structs, event types and constants to Bonk while maintaining functional logic
2025-07-10 00:23:29 +08:00
ysq c0e02381f8 feat: add system transaction subscription module
Add yellow_stone_sub_system module for real-time system program transaction subscription and event handling
2025-07-09 23:58:18 +08:00
ysq 84c0aac079 Merge commit 'e0a47a271f46b5a9e6b6c265518b1f46fff95800' 2025-07-09 22:54:56 +08:00
ysq e0a47a271f feat: add SubscriptionHandle for managing subscription lifecycle
- Add SubscriptionHandle struct to manage async subscription tasks
- Implement graceful shutdown mechanism with unsub_fn callback
- Export new module in common/mod.rs
- Support for proper resource cleanup in subscription management
2025-07-09 22:54:25 +08:00
ysq 44ae51747b feat: refactor event parsing architecture and add Raydium Launchpad support
Major changes:
- Refactor event parsing system: migrate scattered logs_* modules to unified event_parser architecture
- Add unified UnifiedEvent trait and EventParser trait for standardized event parsing interface
- Introduce GenericEventParser and EventParserFactory for plugin-style protocol extension
- Add match_event! macro to simplify event type matching and handling
- Add Raydium Launchpad (Bonk.fun) protocol support:
  - Complete buy/sell trading functionality
  - Pool state management and querying
  - Event parsing and subscription
- Update trading system to support new protocol architecture
- Refactor constants organization, rename raydium to raydium_launchpad
- Update documentation and example code

Technical improvements:
- Unified event interface design for better code maintainability
- Factory pattern implementation for dynamic protocol loading
- Generic event parser to reduce code duplication
- Improved error handling and type safety

Breaking Changes:
- Remove old logs_* modules, use new event_parser system
- Protocol constants path change: raydium -> raydium_launchpad
- Event subscription API updated to unified interface
2025-07-09 22:29:29 +08:00
wood def16e6b92 update swqos config 2025-07-07 03:28:02 +08:00
wood f772e26aa2 add bloxroute 2025-07-07 02:06:52 +08:00
wood 9d30c5e9ad remove define 2025-07-07 01:30:57 +08:00
wood 0ca391ebe2 update swqos 2025-07-07 01:26:24 +08:00
wood 227ee20fb2 update define 2025-07-07 01:24:17 +08:00
wood 7f8f240da1 update define 2025-07-07 01:19:12 +08:00
wood 38a8e2dae4 update jito and nextblock 2025-07-07 01:01:38 +08:00
wood badc8e77d8 update readme 2025-07-07 00:02:24 +08:00
wood 5602be41ff update readme 2025-07-06 23:55:57 +08:00
wood 42daa85d22 update readme 2025-07-06 23:52:55 +08:00
wood 6d9c8ae72a update readme 2025-07-06 23:50:49 +08:00
wood d2f0a8e603 update examples 2025-07-06 23:42:47 +08:00
wood 0da3a3b918 remove use_rpc 2025-07-06 23:38:09 +08:00
wood d13c382a46 update trade config and swqos 2025-07-06 23:36:18 +08:00
wood ecbdbc5890 rebuild code 2025-07-06 22:08:14 +08:00
wood 3ac39508d9 rebuild code 2025-07-06 22:06:44 +08:00
ysq 0e57a7f55c docs: remove token creation sections 2025-07-05 20:48:22 +08:00
wei 9e202a1e5e update README 2025-06-29 19:41:26 +08:00
wei 77e1f9a480 dynamic tip optimization 2025-06-24 23:45:51 +08:00
ysq 6983c7603f Merge commit 'bfd6809855a37a55b852fee18b507640a955bb0d' 2025-06-24 20:56:31 +08:00
ysq bfd6809855 refactor: rename PumpFun to SolanaTrade and improve API consistency
- Rename PumpFun class to SolanaTrade to better reflect its expanded functionality
- Rename copy_buy methods to buy for better API clarity
- Update ShredStream and Yellowstone gRPC subscription examples
- Add bonding_curve parameter to trading methods
- Improve documentation with updated code examples
- Update README files with new features and API changes
2025-06-24 20:56:15 +08:00
ysq 8c5aff6ff6 Merge commit 'a0579a338b2c42e1a2706f7a42550a60e8611a22' 2025-06-23 00:51:03 +08:00
ysq a0579a338b feat(pumpswap): Auto-wrap SOL and enrich gRPC events
This commit introduces two main enhancements:

    1.  Adds an `auto_handle_wsol` parameter to `PumpSwap` buy/sell functions. When enabled, the SDK automatically manages the wrapping of SOL to WSOL and unwrapping back to SOL, simplifying client-side logic.
    2.  Enriches `PumpSwap` gRPC buy/sell events by parsing transaction instructions to include token mints and account addresses, providing more context for event consumers.
2025-06-23 00:50:51 +08:00
ysq 9396871b01 Merge commit 'd8643c8421026f41266e41ac6dde676306a1cb93' into dev 2025-06-22 23:06:57 +08:00