@0dotxyz/p0-ts-sdk 2.5.5-alpha.7 → 2.5.5-alpha.8

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.d.cts CHANGED
@@ -3267,6 +3267,10 @@ interface BridgedTxResult {
3267
3267
  quoteResponse: SwapQuoteResult | undefined;
3268
3268
  /** The bridge token's mint — set only when the bridged double-hop path was used. */
3269
3269
  bridgeMint?: PublicKey;
3270
+ /** true → send as ONE atomic Jito bundle (bridged legs are one operation / integration
3271
+ * refreshes go stale within a slot); false → sequential sends are safe (cranked oracles
3272
+ * allow ≥ ~1 min staleness). */
3273
+ mustBeAtomicBundle: boolean;
3270
3274
  }
3271
3275
  /** A mint's token program: the cache (seedable by the caller), else the mint account's owner. */
3272
3276
  declare function resolveTokenProgramForMint(mint: PublicKey, connection: Connection, tokenProgramCacheByMint: Map<string, PublicKey>): Promise<PublicKey>;
@@ -3663,6 +3667,9 @@ declare function makeLoopTx(params: MakeLoopTxParams): Promise<{
3663
3667
  transactions: ExtendedV0Transaction[];
3664
3668
  actionTxIndex: number;
3665
3669
  quoteResponse: SwapQuoteResult | undefined;
3670
+ /** true → send as ONE atomic Jito bundle (integration refreshes go stale within a slot);
3671
+ * false → sequential sends are safe (cranked oracles allow ≥ ~1 min staleness). */
3672
+ mustBeAtomicBundle: boolean;
3666
3673
  }>;
3667
3674
  interface MakeBridgedLoopTxParams extends MakeLoopTxParams {
3668
3675
  bridgeOpts?: BridgeOpts;
@@ -3736,6 +3743,7 @@ declare function makeRepayWithCollatTx(params: MakeRepayWithCollatTxParams): Pro
3736
3743
  transactions: ExtendedV0Transaction[];
3737
3744
  swapQuote: SwapQuoteResult | undefined;
3738
3745
  amountToRepay: number;
3746
+ mustBeAtomicBundle: boolean;
3739
3747
  }>;
3740
3748
 
3741
3749
  declare function makeBeginFlashLoanIx(program: MarginfiProgram, marginfiAccountPk: PublicKey, endIndex: number, authority?: PublicKey, isSync?: boolean): Promise<InstructionsWrapper>;
@@ -3765,6 +3773,9 @@ declare function makeSwapCollateralTx(params: MakeSwapCollateralTxParams): Promi
3765
3773
  transactions: ExtendedV0Transaction[];
3766
3774
  actionTxIndex: number;
3767
3775
  quoteResponse: SwapQuoteResult | undefined;
3776
+ /** true → send as ONE atomic Jito bundle (integration refreshes go stale within a slot);
3777
+ * false → sequential sends are safe (cranked oracles allow ≥ ~1 min staleness). */
3778
+ mustBeAtomicBundle: boolean;
3768
3779
  }>;
3769
3780
  interface MakeBridgedSwapCollateralTxParams extends MakeSwapCollateralTxParams {
3770
3781
  bridgeOpts?: BridgeOpts;
@@ -3799,6 +3810,9 @@ declare function makeSwapDebtTx(params: MakeSwapDebtTxParams): Promise<{
3799
3810
  transactions: ExtendedV0Transaction[];
3800
3811
  actionTxIndex: number;
3801
3812
  quoteResponse: SwapQuoteResult | undefined;
3813
+ /** true → send as ONE atomic Jito bundle (integration refreshes go stale within a slot);
3814
+ * false → sequential sends are safe (cranked oracles allow ≥ ~1 min staleness). */
3815
+ mustBeAtomicBundle: boolean;
3802
3816
  }>;
3803
3817
  interface MakeBridgedSwapDebtTxParams extends MakeSwapDebtTxParams {
3804
3818
  bridgeOpts?: BridgeOpts;
@@ -5905,6 +5919,9 @@ declare class MarginfiAccount implements MarginfiAccountType {
5905
5919
  transactions: ExtendedV0Transaction[];
5906
5920
  actionTxIndex: number;
5907
5921
  quoteResponse: SwapQuoteResult | undefined;
5922
+ /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
5923
+ * false → sequential sends are safe. */
5924
+ mustBeAtomicBundle: boolean;
5908
5925
  }>;
5909
5926
  /**
5910
5927
  * Atomically move a selected set of positions from this account to a destination account
@@ -5995,6 +6012,9 @@ declare class MarginfiAccount implements MarginfiAccountType {
5995
6012
  transactions: ExtendedV0Transaction[];
5996
6013
  swapQuote: SwapQuoteResult | undefined;
5997
6014
  amountToRepay: number;
6015
+ /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6016
+ * false → sequential sends are safe. */
6017
+ mustBeAtomicBundle: boolean;
5998
6018
  }>;
5999
6019
  /**
6000
6020
  * Creates a transaction to swap one collateral position to another using a flash loan.
@@ -6029,6 +6049,9 @@ declare class MarginfiAccount implements MarginfiAccountType {
6029
6049
  transactions: ExtendedV0Transaction[];
6030
6050
  actionTxIndex: number;
6031
6051
  quoteResponse: SwapQuoteResult | undefined;
6052
+ /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6053
+ * false → sequential sends are safe. */
6054
+ mustBeAtomicBundle: boolean;
6032
6055
  }>;
6033
6056
  /**
6034
6057
  * Creates a transaction to roll a matured Exponent PT collateral position into its
@@ -6075,6 +6098,9 @@ declare class MarginfiAccount implements MarginfiAccountType {
6075
6098
  transactions: ExtendedV0Transaction[];
6076
6099
  actionTxIndex: number;
6077
6100
  quoteResponse: SwapQuoteResult | undefined;
6101
+ /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6102
+ * false → sequential sends are safe. */
6103
+ mustBeAtomicBundle: boolean;
6078
6104
  }>;
6079
6105
  /**
6080
6106
  * Creates a deposit transaction.
@@ -6435,6 +6461,9 @@ declare class MarginfiAccountWrapper {
6435
6461
  transactions: ExtendedV0Transaction[];
6436
6462
  actionTxIndex: number;
6437
6463
  quoteResponse: SwapQuoteResult | undefined;
6464
+ /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6465
+ * false → sequential sends are safe. */
6466
+ mustBeAtomicBundle: boolean;
6438
6467
  }>;
6439
6468
  /**
6440
6469
  * Atomically move a selected set of positions from this account to a destination account with
@@ -6455,6 +6484,9 @@ declare class MarginfiAccountWrapper {
6455
6484
  transactions: ExtendedV0Transaction[];
6456
6485
  swapQuote: SwapQuoteResult | undefined;
6457
6486
  amountToRepay: number;
6487
+ /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6488
+ * false → sequential sends are safe. */
6489
+ mustBeAtomicBundle: boolean;
6458
6490
  }>;
6459
6491
  /**
6460
6492
  * Creates a swap collateral transaction with auto-injected client data.
@@ -6470,6 +6502,9 @@ declare class MarginfiAccountWrapper {
6470
6502
  transactions: ExtendedV0Transaction[];
6471
6503
  actionTxIndex: number;
6472
6504
  quoteResponse: SwapQuoteResult | undefined;
6505
+ /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6506
+ * false → sequential sends are safe. */
6507
+ mustBeAtomicBundle: boolean;
6473
6508
  }>;
6474
6509
  /**
6475
6510
  * Rolls a matured Exponent PT collateral position into its next-maturity PT, with
@@ -6499,6 +6534,9 @@ declare class MarginfiAccountWrapper {
6499
6534
  transactions: ExtendedV0Transaction[];
6500
6535
  actionTxIndex: number;
6501
6536
  quoteResponse: SwapQuoteResult | undefined;
6537
+ /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6538
+ * false → sequential sends are safe. */
6539
+ mustBeAtomicBundle: boolean;
6502
6540
  }>;
6503
6541
  /**
6504
6542
  * Creates a loop (leverage) transaction with a transparent bridged (double-hop) fallback and
package/dist/index.d.ts CHANGED
@@ -3267,6 +3267,10 @@ interface BridgedTxResult {
3267
3267
  quoteResponse: SwapQuoteResult | undefined;
3268
3268
  /** The bridge token's mint — set only when the bridged double-hop path was used. */
3269
3269
  bridgeMint?: PublicKey;
3270
+ /** true → send as ONE atomic Jito bundle (bridged legs are one operation / integration
3271
+ * refreshes go stale within a slot); false → sequential sends are safe (cranked oracles
3272
+ * allow ≥ ~1 min staleness). */
3273
+ mustBeAtomicBundle: boolean;
3270
3274
  }
3271
3275
  /** A mint's token program: the cache (seedable by the caller), else the mint account's owner. */
3272
3276
  declare function resolveTokenProgramForMint(mint: PublicKey, connection: Connection, tokenProgramCacheByMint: Map<string, PublicKey>): Promise<PublicKey>;
@@ -3663,6 +3667,9 @@ declare function makeLoopTx(params: MakeLoopTxParams): Promise<{
3663
3667
  transactions: ExtendedV0Transaction[];
3664
3668
  actionTxIndex: number;
3665
3669
  quoteResponse: SwapQuoteResult | undefined;
3670
+ /** true → send as ONE atomic Jito bundle (integration refreshes go stale within a slot);
3671
+ * false → sequential sends are safe (cranked oracles allow ≥ ~1 min staleness). */
3672
+ mustBeAtomicBundle: boolean;
3666
3673
  }>;
3667
3674
  interface MakeBridgedLoopTxParams extends MakeLoopTxParams {
3668
3675
  bridgeOpts?: BridgeOpts;
@@ -3736,6 +3743,7 @@ declare function makeRepayWithCollatTx(params: MakeRepayWithCollatTxParams): Pro
3736
3743
  transactions: ExtendedV0Transaction[];
3737
3744
  swapQuote: SwapQuoteResult | undefined;
3738
3745
  amountToRepay: number;
3746
+ mustBeAtomicBundle: boolean;
3739
3747
  }>;
3740
3748
 
3741
3749
  declare function makeBeginFlashLoanIx(program: MarginfiProgram, marginfiAccountPk: PublicKey, endIndex: number, authority?: PublicKey, isSync?: boolean): Promise<InstructionsWrapper>;
@@ -3765,6 +3773,9 @@ declare function makeSwapCollateralTx(params: MakeSwapCollateralTxParams): Promi
3765
3773
  transactions: ExtendedV0Transaction[];
3766
3774
  actionTxIndex: number;
3767
3775
  quoteResponse: SwapQuoteResult | undefined;
3776
+ /** true → send as ONE atomic Jito bundle (integration refreshes go stale within a slot);
3777
+ * false → sequential sends are safe (cranked oracles allow ≥ ~1 min staleness). */
3778
+ mustBeAtomicBundle: boolean;
3768
3779
  }>;
3769
3780
  interface MakeBridgedSwapCollateralTxParams extends MakeSwapCollateralTxParams {
3770
3781
  bridgeOpts?: BridgeOpts;
@@ -3799,6 +3810,9 @@ declare function makeSwapDebtTx(params: MakeSwapDebtTxParams): Promise<{
3799
3810
  transactions: ExtendedV0Transaction[];
3800
3811
  actionTxIndex: number;
3801
3812
  quoteResponse: SwapQuoteResult | undefined;
3813
+ /** true → send as ONE atomic Jito bundle (integration refreshes go stale within a slot);
3814
+ * false → sequential sends are safe (cranked oracles allow ≥ ~1 min staleness). */
3815
+ mustBeAtomicBundle: boolean;
3802
3816
  }>;
3803
3817
  interface MakeBridgedSwapDebtTxParams extends MakeSwapDebtTxParams {
3804
3818
  bridgeOpts?: BridgeOpts;
@@ -5905,6 +5919,9 @@ declare class MarginfiAccount implements MarginfiAccountType {
5905
5919
  transactions: ExtendedV0Transaction[];
5906
5920
  actionTxIndex: number;
5907
5921
  quoteResponse: SwapQuoteResult | undefined;
5922
+ /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
5923
+ * false → sequential sends are safe. */
5924
+ mustBeAtomicBundle: boolean;
5908
5925
  }>;
5909
5926
  /**
5910
5927
  * Atomically move a selected set of positions from this account to a destination account
@@ -5995,6 +6012,9 @@ declare class MarginfiAccount implements MarginfiAccountType {
5995
6012
  transactions: ExtendedV0Transaction[];
5996
6013
  swapQuote: SwapQuoteResult | undefined;
5997
6014
  amountToRepay: number;
6015
+ /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6016
+ * false → sequential sends are safe. */
6017
+ mustBeAtomicBundle: boolean;
5998
6018
  }>;
5999
6019
  /**
6000
6020
  * Creates a transaction to swap one collateral position to another using a flash loan.
@@ -6029,6 +6049,9 @@ declare class MarginfiAccount implements MarginfiAccountType {
6029
6049
  transactions: ExtendedV0Transaction[];
6030
6050
  actionTxIndex: number;
6031
6051
  quoteResponse: SwapQuoteResult | undefined;
6052
+ /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6053
+ * false → sequential sends are safe. */
6054
+ mustBeAtomicBundle: boolean;
6032
6055
  }>;
6033
6056
  /**
6034
6057
  * Creates a transaction to roll a matured Exponent PT collateral position into its
@@ -6075,6 +6098,9 @@ declare class MarginfiAccount implements MarginfiAccountType {
6075
6098
  transactions: ExtendedV0Transaction[];
6076
6099
  actionTxIndex: number;
6077
6100
  quoteResponse: SwapQuoteResult | undefined;
6101
+ /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6102
+ * false → sequential sends are safe. */
6103
+ mustBeAtomicBundle: boolean;
6078
6104
  }>;
6079
6105
  /**
6080
6106
  * Creates a deposit transaction.
@@ -6435,6 +6461,9 @@ declare class MarginfiAccountWrapper {
6435
6461
  transactions: ExtendedV0Transaction[];
6436
6462
  actionTxIndex: number;
6437
6463
  quoteResponse: SwapQuoteResult | undefined;
6464
+ /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6465
+ * false → sequential sends are safe. */
6466
+ mustBeAtomicBundle: boolean;
6438
6467
  }>;
6439
6468
  /**
6440
6469
  * Atomically move a selected set of positions from this account to a destination account with
@@ -6455,6 +6484,9 @@ declare class MarginfiAccountWrapper {
6455
6484
  transactions: ExtendedV0Transaction[];
6456
6485
  swapQuote: SwapQuoteResult | undefined;
6457
6486
  amountToRepay: number;
6487
+ /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6488
+ * false → sequential sends are safe. */
6489
+ mustBeAtomicBundle: boolean;
6458
6490
  }>;
6459
6491
  /**
6460
6492
  * Creates a swap collateral transaction with auto-injected client data.
@@ -6470,6 +6502,9 @@ declare class MarginfiAccountWrapper {
6470
6502
  transactions: ExtendedV0Transaction[];
6471
6503
  actionTxIndex: number;
6472
6504
  quoteResponse: SwapQuoteResult | undefined;
6505
+ /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6506
+ * false → sequential sends are safe. */
6507
+ mustBeAtomicBundle: boolean;
6473
6508
  }>;
6474
6509
  /**
6475
6510
  * Rolls a matured Exponent PT collateral position into its next-maturity PT, with
@@ -6499,6 +6534,9 @@ declare class MarginfiAccountWrapper {
6499
6534
  transactions: ExtendedV0Transaction[];
6500
6535
  actionTxIndex: number;
6501
6536
  quoteResponse: SwapQuoteResult | undefined;
6537
+ /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6538
+ * false → sequential sends are safe. */
6539
+ mustBeAtomicBundle: boolean;
6502
6540
  }>;
6503
6541
  /**
6504
6542
  * Creates a loop (leverage) transaction with a transparent bridged (double-hop) fallback and
package/dist/index.js CHANGED
@@ -66393,7 +66393,12 @@ async function makeRepayWithCollatTx(params) {
66393
66393
  );
66394
66394
  }
66395
66395
  const transactions = [...additionalTxs, flashloanTx];
66396
- return { transactions, swapQuote, amountToRepay };
66396
+ return {
66397
+ transactions,
66398
+ swapQuote,
66399
+ amountToRepay,
66400
+ mustBeAtomicBundle: refreshIntegrationIxs.instructions.length > 0
66401
+ };
66397
66402
  }
66398
66403
  async function buildRepayWithCollatFlashloanTx({
66399
66404
  program,
@@ -68578,7 +68583,8 @@ async function makeSwapDebtTx(params) {
68578
68583
  return {
68579
68584
  transactions,
68580
68585
  actionTxIndex: transactions.length - 1,
68581
- quoteResponse: swapQuote
68586
+ quoteResponse: swapQuote,
68587
+ mustBeAtomicBundle: refreshIntegrationIxs.instructions.length > 0
68582
68588
  };
68583
68589
  }
68584
68590
  async function buildSwapDebtFlashloanTx({
@@ -68845,7 +68851,8 @@ async function tryBridgedDebtSwap(params, bridgeOpts) {
68845
68851
  transactions: result.transactions,
68846
68852
  actionTxIndex: result.transactions.length - 1,
68847
68853
  quoteResponse: mergeBridgeQuotesDebt(result.firstLegQuote, result.secondLegQuote),
68848
- bridgeMint: bridgeBank.mint
68854
+ bridgeMint: bridgeBank.mint,
68855
+ mustBeAtomicBundle: true
68849
68856
  };
68850
68857
  }
68851
68858
  });
@@ -68954,7 +68961,8 @@ async function makeLoopTx(params) {
68954
68961
  return {
68955
68962
  transactions,
68956
68963
  actionTxIndex: transactions.length - 1,
68957
- quoteResponse: swapQuote
68964
+ quoteResponse: swapQuote,
68965
+ mustBeAtomicBundle: refreshIntegrationIxs.instructions.length > 0
68958
68966
  };
68959
68967
  }
68960
68968
  async function buildLoopFlashloanTx(params) {
@@ -69347,7 +69355,8 @@ async function tryBridgedLoop(params, bridgeOpts) {
69347
69355
  transactions: result.transactions,
69348
69356
  actionTxIndex: result.transactions.length - 1,
69349
69357
  quoteResponse: mergeBridgeQuotesLoop(result.firstLegQuote, result.secondLegQuote),
69350
- bridgeMint: bridgeBank.mint
69358
+ bridgeMint: bridgeBank.mint,
69359
+ mustBeAtomicBundle: true
69351
69360
  };
69352
69361
  }
69353
69362
  });
@@ -69443,7 +69452,8 @@ async function makeSwapCollateralTx(params) {
69443
69452
  return {
69444
69453
  transactions,
69445
69454
  actionTxIndex: transactions.length - 1,
69446
- quoteResponse: swapQuote
69455
+ quoteResponse: swapQuote,
69456
+ mustBeAtomicBundle: refreshIntegrationIxs.instructions.length > 0
69447
69457
  };
69448
69458
  }
69449
69459
  async function buildSwapCollateralFlashloanTx({
@@ -69857,7 +69867,8 @@ async function tryBridgedCollateralSwap(params, bridgeOpts) {
69857
69867
  transactions: result.transactions,
69858
69868
  actionTxIndex: result.transactions.length - 1,
69859
69869
  quoteResponse: mergeBridgeQuotes(result.firstLegQuote, result.secondLegQuote),
69860
- bridgeMint: bridgeBank.mint
69870
+ bridgeMint: bridgeBank.mint,
69871
+ mustBeAtomicBundle: true
69861
69872
  };
69862
69873
  }
69863
69874
  });