@0dotxyz/p0-ts-sdk 3.0.0-next.1 → 3.0.0-next.2

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.cjs CHANGED
@@ -18243,7 +18243,6 @@ function deserializeJupiterInstruction(instruction) {
18243
18243
  function toJupiterConfig(apiConfig) {
18244
18244
  if (!apiConfig) return void 0;
18245
18245
  return {
18246
- basePath: apiConfig.basePath,
18247
18246
  apiKey: apiConfig.apiKey,
18248
18247
  headers: apiConfig.headers
18249
18248
  };
@@ -20191,14 +20190,16 @@ async function simulateAccountHealthCacheWithFallback(params) {
20191
20190
  marginfiAccount,
20192
20191
  bankIntegrationMap
20193
20192
  });
20194
- marginfiAccount = parseMarginfiAccountRaw(params.marginfiAccount.address, {
20195
- ...simulatedAccount,
20193
+ const simulated = parseMarginfiAccountRaw(params.marginfiAccount.address, simulatedAccount);
20194
+ marginfiAccount = {
20195
+ ...simulated,
20196
20196
  healthCache: {
20197
- ...simulatedAccount.healthCache,
20198
- assetValueEquity: bigNumberToWrappedI80F48(assetValueEquity),
20199
- liabilityValueEquity: bigNumberToWrappedI80F48(liabilityValueEquity)
20197
+ ...simulated.healthCache,
20198
+ assetValueEquity,
20199
+ liabilityValueEquity,
20200
+ simulationStatus: 1 /* ONCHAIN */
20200
20201
  }
20201
- });
20202
+ };
20202
20203
  } catch (e) {
20203
20204
  const { assets: assetValueMaint, liabilities: liabilityValueMaint } = computeHealthComponentsFromBalances({
20204
20205
  activeBalances,
@@ -24696,7 +24697,7 @@ var MarginfiAccountWrapper = class {
24696
24697
  }
24697
24698
  /**
24698
24699
  * Withdraw instructions for `amount` (UI units) from `bankAddress`; `withdrawAll` closes the
24699
- * balance.
24700
+ * balance. `opts.groupRateLimiterEnabled` defaults to the group's limiter state.
24700
24701
  * @throws Error if `amount` isn't positive without `withdrawAll`
24701
24702
  */
24702
24703
  async makeWithdrawIx(bankAddress, amount, withdrawAll = false, opts = {}) {
@@ -24707,7 +24708,10 @@ var MarginfiAccountWrapper = class {
24707
24708
  ...await this.lendingContext(bankAddress),
24708
24709
  amount,
24709
24710
  withdrawAll,
24710
- opts
24711
+ opts: {
24712
+ groupRateLimiterEnabled: isGroupRateLimiterEnabled(this.client.group.rateLimiter),
24713
+ ...opts
24714
+ }
24711
24715
  });
24712
24716
  }
24713
24717
  /**
@@ -24737,14 +24741,17 @@ var MarginfiAccountWrapper = class {
24737
24741
  }
24738
24742
  /**
24739
24743
  * Withdraw transaction for `amount` (UI units) from `bankAddress`; `withdrawAll` closes the
24740
- * balance.
24744
+ * balance. `opts.groupRateLimiterEnabled` defaults to the group's limiter state.
24741
24745
  */
24742
24746
  async makeWithdrawTx(bankAddress, amount, withdrawAll = false, opts = {}) {
24743
24747
  return this.account.makeWithdrawTx({
24744
24748
  ...await this.lendingContext(bankAddress),
24745
24749
  amount,
24746
24750
  withdrawAll,
24747
- opts
24751
+ opts: {
24752
+ groupRateLimiterEnabled: isGroupRateLimiterEnabled(this.client.group.rateLimiter),
24753
+ ...opts
24754
+ }
24748
24755
  });
24749
24756
  }
24750
24757
  /** Borrow transaction for `amount` (UI units) from `bankAddress`. */