@meteora-ag/dlmm 1.0.39-rc.7 → 1.0.39-rc.9
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.ts +1 -1
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -5316,7 +5316,7 @@ declare class DLMM {
|
|
|
5316
5316
|
* @returns {Promise<Transaction>}
|
|
5317
5317
|
*/
|
|
5318
5318
|
syncWithMarketPrice(marketPrice: number, owner: PublicKey): Promise<Transaction>;
|
|
5319
|
-
getLastPrice(minPrice: string): Promise<
|
|
5319
|
+
getLastPrice(minPrice: string): Promise<number>;
|
|
5320
5320
|
/** Private static method */
|
|
5321
5321
|
private static getBinArrays;
|
|
5322
5322
|
private static getClaimableLMReward;
|
package/dist/index.js
CHANGED
|
@@ -9912,15 +9912,13 @@ var DLMM = class {
|
|
|
9912
9912
|
const binArray = binArrays[count];
|
|
9913
9913
|
if (binArray) {
|
|
9914
9914
|
const bins = binArray.account.bins;
|
|
9915
|
-
if (bins
|
|
9915
|
+
if (bins.every(({ liquiditySupply }) => !liquiditySupply.isZero())) {
|
|
9916
9916
|
count++;
|
|
9917
9917
|
} else {
|
|
9918
9918
|
const lastBinWithLiquidityIndex = bins.findIndex(
|
|
9919
9919
|
({ liquiditySupply }) => liquiditySupply.isZero()
|
|
9920
9920
|
);
|
|
9921
9921
|
console.log(
|
|
9922
|
-
bins[lastBinWithLiquidityIndex].amountX.toString(),
|
|
9923
|
-
bins[lastBinWithLiquidityIndex].amountY.toString(),
|
|
9924
9922
|
bins[lastBinWithLiquidityIndex - 1].amountX.toString(),
|
|
9925
9923
|
bins[lastBinWithLiquidityIndex - 1].amountY.toString()
|
|
9926
9924
|
);
|
|
@@ -9929,7 +9927,7 @@ var DLMM = class {
|
|
|
9929
9927
|
}
|
|
9930
9928
|
}
|
|
9931
9929
|
}
|
|
9932
|
-
return binPriceWithLastLiquidity;
|
|
9930
|
+
return Number(binPriceWithLastLiquidity) / (2 ** 64 - 1);
|
|
9933
9931
|
}
|
|
9934
9932
|
/** Private static method */
|
|
9935
9933
|
static async getBinArrays(program, lbPairPubkey) {
|