@meteora-ag/dlmm 1.0.39-rc.24 → 1.0.39-rc.26
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 +12 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9903,6 +9903,16 @@ var DLMM = class {
|
|
|
9903
9903
|
const sortedBinArrays = _binArrays.sort(
|
|
9904
9904
|
({ account: { index: indexA } }, { account: { index: indexB } }) => indexA.toNumber() - indexB.toNumber()
|
|
9905
9905
|
);
|
|
9906
|
+
console.log(
|
|
9907
|
+
"\u{1F680} ~ binArrays:",
|
|
9908
|
+
sortedBinArrays?.flatMap(
|
|
9909
|
+
({ account: { bins } }) => bins.map(({ amountX, amountY, price }) => ({
|
|
9910
|
+
amountX: amountX.toString(),
|
|
9911
|
+
amountY: amountY.toString(),
|
|
9912
|
+
price: this.fromPricePerLamport(Number(price) / (2 ** 64 - 1))
|
|
9913
|
+
}))
|
|
9914
|
+
)
|
|
9915
|
+
);
|
|
9906
9916
|
let count = sortedBinArrays.length - 1;
|
|
9907
9917
|
let binPriceWithLastLiquidity;
|
|
9908
9918
|
while (count >= 0) {
|
|
@@ -9920,6 +9930,7 @@ var DLMM = class {
|
|
|
9920
9930
|
}
|
|
9921
9931
|
}
|
|
9922
9932
|
}
|
|
9933
|
+
console.log(binPriceWithLastLiquidity);
|
|
9923
9934
|
return this.fromPricePerLamport(
|
|
9924
9935
|
Number(binPriceWithLastLiquidity) / (2 ** 64 - 1)
|
|
9925
9936
|
);
|