624 Commits

Author SHA1 Message Date
0xfnzero dc3d2b8deb fix(pumpswap): harden quotes and low-latency examples 2026-07-17 03:22:52 +08:00
0xfnzero fb1ff176d0 fix(pumpswap): validate virtual reserve quotes 2026-07-17 02:15:20 +08:00
0xfnzero dd41dd4f87 feat(pumpswap): support virtual quote reserves 2026-07-16 20:58:56 +08:00
Wood 8bef655abb Merge pull request #108 from 0xfnzero/codex/lunar-lander-integration
feat(swqos): default Lunar Lander to QUIC
2026-07-12 18:17:11 +08:00
0xfnzero 8413baa3d9 feat(swqos): default Lunar Lander to QUIC 2026-07-12 18:16:22 +08:00
Wood 100156424c Merge pull request #107 from 0xfnzero/codex/lunar-lander-integration
feat(swqos): integrate Hello Moon Lunar Lander
2026-07-12 18:03:57 +08:00
0xfnzero 1d224770d8 fix: align Lunar Lander with official client 2026-07-12 18:03:08 +08:00
0xfnzero 1c78b3cab2 Merge pull request #96 from joe-hellomoon/feat/add-lunarlander-swqos
# Conflicts:
#	Cargo.toml
#	src/constants/swqos.rs
#	src/swqos/lunarlander.rs
#	src/swqos/mod.rs
2026-07-12 17:55:32 +08:00
0xfnzero ca306172ca Merge pull request #88 from samk-hellomoon/feat/add-lunarlander-swqos
# Conflicts:
#	README.md
#	README_CN.md
#	src/constants/swqos.rs
#	src/swqos/mod.rs
2026-07-12 17:44:05 +08:00
0xfnzero b09902c527 feat: harden trading SDK examples 2026-07-12 14:35:58 +08:00
0xfnzero 47cef59d15 fix: align PumpSwap dynamic fee parameters v4.0.22 2026-06-30 21:40:44 +08:00
0xfnzero 9af86c8397 Update SWQOS submit behavior 2026-06-23 04:32:50 +08:00
0xfnzero 30df893c30 docs: clarify SDK scope and current version 2026-06-20 00:56:14 +08:00
0xfnzero 22c1a149e7 Release v4.0.21 v4.0.21 2026-06-18 01:26:54 +08:00
Wood 8657273ba6 Merge pull request #105 from civa/main
feat(swqos): update Solami endpoints + tip accounts
2026-06-17 13:01:17 +08:00
civa 99fb4ee604 feat(swqos): update Solami endpoints + tip accounts 2026-06-16 18:45:43 +00:00
0xfnzero 3719d4a9f4 Merge pull request #86 from civa/feat/add-solami
# Conflicts:
#	src/constants/swqos.rs
#	src/swqos/mod.rs
2026-06-17 01:16:07 +08:00
0xfnzero d7326b55f4 fix pumpfun native sol quote routing v4.0.20 2026-06-08 03:13:04 +08:00
0xfnzero 7471bcba09 Release v4.0.19 v4.0.19 2026-06-08 00:00:32 +08:00
0xfnzero b8325b2b52 Release v4.0.18 v4.0.18 2026-06-07 22:22:26 +08:00
0xfnzero e459f175f5 Release sol-trade-sdk v4.0.17 v4.0.17 2026-06-07 01:42:08 +08:00
0xfnzero e5e58bef89 Release sol-trade-sdk v4.0.16 v4.0.16 2026-06-06 12:31:08 +08:00
0xfnzero 9874cd5358 Release sol-trade-sdk v4.0.15 v4.0.15 2026-06-01 14:57:49 +08:00
0xfnzero 1d3c0ff5da fix: force Token-2022 for pump suffix mints 2026-05-28 05:21:24 +08:00
Wood 34f400e89d Merge pull request #103 from HelvetiCrypt/wait-for-all-submits
Add SwapParams.wait_for_all_submits to restore all-routes signature collection
2026-05-28 02:46:39 +08:00
HelvetiCrypt bd1772bed2 Add SwapParams.wait_for_all_submits to restore all-routes signature collection
v4.0.11 switched the fast-submit (`wait_tx_confirmed = false`) result loop
from `wait_for_all_submitted` to `wait_for_first_submitted`. The new
function returns as soon as one SWQOS route's HTTP submit completes and
drains whatever signatures are in `ResultCollector.results` at that
moment — slower routes' signatures arrive after the caller has returned.

This is correct for fire-and-forget low-latency submits, but breaks
callers that do their own on-chain confirmation against a pinned durable
nonce. Only one of the submitted txs can land (nonce is consumed by
whichever lands first), but the caller has no way of knowing in advance
which route it will be. Their post-submit logic feeds every returned
signature to `getSignatureStatuses` to find the landed one — with only
the fastest HTTP responder returned (often not the one that lands), the
landed tx isn't in the polled set.

Adds an opt-in `SwapParams.wait_for_all_submits: bool` (default false,
plumbed through `TradeBuyParams` / `TradeSellParams`). When true and
`wait_tx_confirmed = false`, `execute_parallel` uses
`wait_for_all_submitted` (still in the codebase, was
`#[allow(dead_code)]`) so every submitted signature is returned. Zero
behaviour change for current users.
2026-05-27 08:02:49 +00:00
0xfnzero 5449d51591 Release sol-trade-sdk 4.0.14 v4.0.14 2026-05-25 22:01:15 +08:00
0xfnzero b973061f92 Update DEX protocol support for 4.0.13 v4.0.13 2026-05-25 01:47:48 +08:00
0xfnzero 57e4c5d221 Fix PumpFun V2 buyback fee mutability v4.0.12 2026-05-22 08:56:20 +08:00
0xfnzero 8ed2aef931 Fix trade execution correctness and release 4.0.11 v4.0.11 2026-05-21 17:50:06 +08:00
0xfnzero 0cf0064e80 docs: clarify PumpFun V2 configuration 2026-05-21 14:48:43 +08:00
0xfnzero 4968c48a2e Release sol-trade-sdk v4.0.10
Sync Pump program IDLs with the latest definitions.
v4.0.10
2026-05-20 19:41:16 +08:00
0xfnzero 5908c84798 Merge remote-tracking branch 'origin/main' into codex/swqos-dual-fee-mode 2026-05-19 06:21:44 +08:00
0xfnzero 6dab47f8f9 Optimize SWQOS dual fee lane submission 2026-05-19 06:21:37 +08:00
0xfnzero a076e0f8cd chore: flatten synced IDL files
Remove the redundant idl/bitquery source snapshot tree and keep synced Bitquery IDLs only under the SDK's canonical local IDL filenames.
2026-05-16 15:03:10 +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.
v4.0.9
2026-05-16 06:42:50 +08:00
0xfnzero f6db55c874 release: update Pump program metadata for v4.0.8 v4.0.8 2026-05-15 01:08:33 +08:00
0xfnzero 69b4f9bb9f docs: add donation wallet address to README_CN 2026-05-14 19:26:31 +08:00
0xfnzero 532bc1195d docs: add donation wallet address to README 2026-05-14 19:24:53 +08:00
0xfnzero 8944c5455c Refine crate description wording 2026-05-14 00:25:44 +08:00
0xfnzero 0d846930ad fix(pumpswap): use live global fee recipients 2026-05-13 21:16:17 +08:00
0xfnzero 703ae5e4db fix(pumpfun): preserve observed fee recipient 2026-05-12 05:55:45 +08:00
0xfnzero 8e0210af97 fix(swqos): replace non-portable try_from_base58_string with bs58 decode + TryFrom
The patched solana-keypair in the main workspace adds try_from_base58_string,
but sol-safekey and other consumers use the standard crates.io version which
only provides from_base58_string (panics) and TryFrom<&[u8]> (fallible).

Use bs58::decode + Keypair::try_from to keep proper error handling while
remaining compatible with the standard solana-keypair crate.
2026-05-09 15:02:25 +08:00
0xfnzero e605485ecf fix(bonding-curve): tolerate extra trailing bytes in account data
BondingCurveAccount::try_from_slice requires the entire input slice to
be consumed, which fails with "Not all bytes read" when the on-chain
bonding curve account has been extended with new fields (e.g. after a
protocol upgrade). Switch to BorshDeserialize::deserialize which reads
the known fields and silently ignores any trailing bytes.
2026-05-09 14:46:52 +08:00
0xfnzero 8dec2f8d8c fix(sell): trust observed creator_vault directly to prevent Anchor 2006
In build_sell_v1/v2, the creator_vault was previously derived via
effective_creator_for_trade() passed to resolve_creator_vault_for_ix_with_fee_sharing.
When observed_trade_creator differs from bonding_curve.creator (e.g. creator
updated post-deployment), the derived vault PDA mismatches the on-chain
seeds constraint, causing Anchor error 2006 (ConstraintSeeds) on sell.

The pump.fun sell instruction validates creator_vault seeds as
PDA("creator-vault", bonding_curve.creator), but buy does not check seeds,
so buy succeeds while sell fails with 2006.

Fix: when protocol_params.creator_vault is a valid non-default/non-phantom
value (observed from gRPC / update_fee_shares), use it directly without
re-derivation. Only fall back to resolve via bonding_curve.creator when
creator_vault is missing. This ensures the authoritative observed vault
is never overridden by a stale or mismatched creator.
2026-05-09 14:41:22 +08:00
0xfnzero b505bebdac fix(pumpfun): use is_cashback_coin instead of is_mayhem_mode for sell user_volume_accumulator
The Pump.fun IDL explicitly states that user_volume_accumulator is
passed as remaining_accounts[0] for cashback coins during sell.
Using is_mayhem_mode incorrectly omitted the account for cashback
tokens, causing the program to misread bonding_curve_v2 as
user_volume_accumulator and resulting in Custom(6024) Overflow.
2026-05-09 08:18:58 +08:00
0xfnzero 1cc051a874 feat(pumpfun): runtime V2 flag, buyback fee pool fix, legacy ix encoding
- Replace compile-time `pumpfun-v2` feature flag with runtime
  `TradeConfig::use_pumpfun_v2(bool)` for flexible V1/V2 switching
- Fix BUYBACK_FEE_RECIPIENTS pool: replace wrong addresses (was reusing
  standard pool + FEE_CONFIG) with official buyback pool from
  FEE_RECIPIENTS.md
- Fix legacy buy/buy_exact_sol_in ix data encoding: use 2-byte
  Option<bool> (option tag + value) matching official Pump SDK, 26 bytes
  total instead of broken 25
- Add `SwapParams.use_pumpfun_v2` field and wire through TradingClient
  buy/sell paths
- V2 instructions read `quote_mint` from `PumpFunParams` (not
  BondingCurveAccount which lacks the field)
- Fix `fetch_bonding_curve_account` to use BorshDeserialize instead of
  non-existent `decode_from_chain_account_data`
- Update all examples with `use_pumpfun_v2: false` field
- Update README with unified V1/V2 section showing both enabling methods
2026-05-09 07:15:07 +08:00
0xfnzero 0311a0b876 docs(readme): update SWQoS partner list to Jito, Temporal, FlashBlock, BlockRazor, Astralane, SpeedLanding
Remove non-partner services (Nextblock, ZeroSlot, Bloxroute, Node1).
Update code examples to use partner service configs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 00:05:53 +08:00
0xfnzero b49c1c803e fix(pump): restore 26-byte legacy buy instruction data encoding
The refactored ix data encoder was producing 25-byte buy instructions
(1-byte track_volume), but the on-chain Pump program expects Anchor's
2-byte Option<bool> encoding (option tag + value), totaling 26 bytes.
The 1-byte shortfall caused instruction data under-read that manifested
as error 0xbbf (ConstraintOwner) for all legacy buy/buy_exact_sol_in.

Restore the 2-byte encoding: option tag (1u8) followed by the cashback
flag as the bool value, matching the pre-refactoring inline encoder.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 23:37:07 +08:00
0xfnzero ce8fb99626 Revert "fix(pump): default token program to legacy SPL Token instead of Token-2022"
This reverts commit 49843d8a20.
2026-05-08 23:28:21 +08:00