@0dotxyz/p0-ts-sdk 2.3.0-alpha.6 → 2.3.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -61394,6 +61394,12 @@ async function buildCandidates2(req, apiConfig) {
61394
61394
  transaction: {
61395
61395
  userPublicKey: req.taker.toBytes(),
61396
61396
  outputAccount: req.destinationTokenAccount.toBytes(),
61397
+ // Keep a wSOL output wrapped in the destination ATA (the analog of
61398
+ // Jupiter's `wrapAndUnwrapSol: false`). Our flashloan flows consume the
61399
+ // output with a subsequent marginfi ix built with `wrapAndUnwrapSol:
61400
+ // false`, so the wSOL must NOT be unwrapped to native lamports. Ignored
61401
+ // by Titan when the output mint isn't wSOL.
61402
+ outputWsol: true,
61397
61403
  titanSwapVersion: 3 /* V3 */,
61398
61404
  ...fee !== void 0 && feeAccount ? { feeBps: fee, feeAccount: new PublicKey(feeAccount).toBytes() } : {}
61399
61405
  },
@@ -61774,7 +61780,7 @@ async function buildRepayWithCollatFlashloanTx({
61774
61780
  const swapNeeded = !repayOpts.repayBank.mint.equals(withdrawOpts.withdrawBank.mint);
61775
61781
  let amountToRepay = swapNeeded ? 0 : withdrawOpts.withdrawAmount;
61776
61782
  let swapInstructions = [];
61777
- const setupInstructions = [];
61783
+ let setupInstructions = [];
61778
61784
  let swapLookupTables = [];
61779
61785
  let swapQuote;
61780
61786
  let sizeConstraintUsed = 0;
@@ -61987,6 +61993,7 @@ async function buildRepayWithCollatFlashloanTx({
61987
61993
  );
61988
61994
  amountToRepay = outAmount > repayOpts.totalPositionAmount ? repayOpts.totalPositionAmount : outAmountThreshold;
61989
61995
  swapInstructions = engineResult.swapInstructions;
61996
+ setupInstructions = engineResult.setupInstructions;
61990
61997
  swapLookupTables = engineResult.swapLuts;
61991
61998
  swapQuote = engineResult.quoteResponse;
61992
61999
  }