Commit Graph

396 Commits

Author SHA1 Message Date
Wood 1be1674bf3 update gas fee strategy support data size limit settings 2025-11-09 21:20:55 +08:00
ysq 4f315187f3 feat: upgrade to v3.2.1 2025-11-07 17:04:36 +08:00
ysq c5a55b1c14 feat: refactor seed optimization to global configuration in v3.2.0
- Remove open_seed_optimize parameter from TradeBuyParams and TradeSellParams structs
- Add global use_seed_optimize configuration in TradeConfig with default value true
- Add create_wsol_ata_on_startup configuration in TradeConfig with default value true
- Implement automatic WSOL ATA creation and verification on SDK initialization
- Add with_wsol_ata_config() builder method to TradeConfig for custom WSOL settings
- Update all examples to remove open_seed_optimize parameter usage
- Update documentation (README, TRADING_PARAMETERS) to reflect new configuration approach
- Upgrade package version from 3.1.7 to 3.2.0

Breaking Changes:
- open_seed_optimize parameter removed from trade parameters (now global setting)
- Seed optimization is now enabled by default for all operations
2025-11-07 16:57:28 +08:00
ysq 9824576164 feat: upgrade to v3.1.6 2025-11-06 10:02:17 +08:00
ysq 428e272623 feat: upgrade to v3.1.6 2025-11-04 23:58:11 +08:00
ysq ea3d36aa87 feat: upgrade to v3.1.5 2025-10-30 22:29:52 +08:00
ysq 06e36584f7 chore: update LP fee basis points from 20 to 25 2025-10-30 22:29:06 +08:00
ysq d5834e056f feat: add transaction simulation support and close_mint_token_ata parameter
- Add `simulate` parameter to TradeBuyParams and TradeSellParams for transaction simulation
- Add `close_mint_token_ata` parameter to TradeSellParams for closing mint token ATA
- Implement simulate_transaction function to validate transactions without blockchain submission
- Update all examples to include new parameters (simulate: false, close_mint_token_ata: false)
- Add comprehensive documentation for transaction simulation feature
- Show detailed simulation output including logs, compute units, and errors
- Print timing metrics in English for better international compatibility
2025-10-30 22:11:55 +08:00
ysq 11383a0492 feat: add close_mint_token_ata support for sell transactions 2025-10-26 23:55:28 +08:00
Wood 2bf43fc99f upgrade solana-client version 2025-10-25 22:46:36 +08:00
ysq d843f978af feat: upgrade to v3.1.3 2025-10-23 00:32:21 +08:00
ysq c6e2254729 feat: upgrade to v3.1.2 2025-10-16 22:20:06 +08:00
Wood 9aaf52b22f Merge branch 'main' of github.com:0xfnzero/sol-trade-sdk 2025-10-14 17:33:41 +08:00
Wood 2eea6d25e1 fix build errors for syscall_bypass.rs 2025-10-14 17:33:13 +08:00
ysq 86d64811ad feat: require durable_nonce for multiple swqos transactions 2025-10-12 20:30:33 +08:00
ysq aa1ebc48c4 Merge commit 'ce1dc2b185679fbdfe8c46835ce1346e0c00904f' 2025-10-12 20:25:07 +08:00
sgxiang ce1dc2b185 Merge pull request #44 from tommggo/feat/support-usdc-quote
feat: Add USDC quote support for swap protocols (fixes #38)
2025-10-12 17:23:00 +08:00
tommggo c3852ccb7a Merge branch 'main' into feat/support-usdc-quote
# Conflicts:
#	examples/pumpswap_trading/src/main.rs
#	examples/raydium_cpmm_trading/src/main.rs
#	src/trading/core/executor.rs
2025-10-12 15:39:43 +08:00
tommggo 163882c7f3 feat: add USDC quote support for swap protocols 2025-10-12 12:01:21 +08:00
0xfnzero 28cfef62db Update README_CN.md 2025-10-08 22:58:03 +08:00
0xfnzero 1ceabda9db Update README.md 2025-10-08 22:57:38 +08:00
tommggo d567477bdb Revert "feat: swap support usdc quote"
This reverts commit 9bb08bd567.
2025-10-08 21:04:50 +08:00
tommggo 9bb08bd567 feat: swap support usdc quote 2025-10-08 20:08:19 +08:00
ysq cf030cec49 feat: upgrade to v3.1.0 2025-10-07 23:48:09 +08:00
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