feat(buy-sol) PR 6: document native SOL buys for solvers and colocated drivers - #4994
Closed
squadgazzz wants to merge 1 commit into
Conversation
|
Reminder: Please consider backward compatibility when modifying the API specification.
Caused by: |
squadgazzz
deleted the
solana-driver/document-native-sol-buys-for-solvers
branch
September 29, 2026 11:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Stacked on #4986.
Colocated drivers and external solvers learn the wire contract from the driver's
openapi.ymland the solver DTOs, and neither covers native SOL buys. The openapi still describesbuyTokenAccountas a token account the settlement never creates. For a native buy,buyTokenis the System Program ID andbuyTokenAccountis a wallet, which the payout creates when it's missing.Solvers see a native buy as a wSOL buy into the taker's wSOL ATA (#4985). The route has to leave that ATA open, because the settlement closes it after the swap to unwrap the payouts (#4986). A route that unwraps on its own, like Jupiter with
wrapAndUnwrapSol: true, closes the ATA first, and then the settlement'sCloseAccountreverts. Our Jupiter solver setswrap_and_unwrap_sol: false, so only external solvers can trip over this.#4982 rewrites the same
buyTokenAccountdescription, so whichever PR lands second gets one small conflict.Changes
buyTokenandbuyTokenAccountbuyDestinationdocs in both solver DTOs name the wSOL ATA and require the route to leave it openHow to test
Doc change only.