2

Just looking at jupiter's documentation. I notice it has /swap and /swap-instructions It appears that /swap-instructions gives you an instruction payload with which to utilise transactions in a solana VersionedTransaction, as opposed to using /swap to pass through your quote.

Is there any benefit to doing this? Would it result in a faster creation of VersionedTransaction or is the difference negligible to the point that the use case is for something else?

1 Answer 1

3

Performance-wise, it doesn't change anything (after all /swap is just a Transaction/VersionTransaction populated with the contents of /swap-instructions). The reason this endpoint exists is for composability with other programs, i.e. you want to add other instructions before and/or after your swap in the same transaction.

3
  • Hi, I want to use feepayer account to another wallet. Is this possible in Jupiter as Jupiter signed the versioned transaction?
    – Bobz
    Commented Jul 10 at 12:44
  • I suggest opening another question for this as this isn't directly related to this question.
    – McBain
    Commented Jul 11 at 9:11
  • solana.stackexchange.com/questions/15165/…
    – Bobz
    Commented Jul 12 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.