@bulletxyz/bullet-sdk 0.17.3-rc.3 → 0.17.3-rc.4
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/browser/index.js +10 -0
- package/dist/browser/index.js.map +2 -2
- package/dist/node/index.js +10 -0
- package/dist/node/index.js.map +2 -2
- package/dist/types/calc.d.ts +1 -0
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -9362,6 +9362,15 @@ function calculateLiquidationRiskPercentage(userAccount, marginContext) {
|
|
|
9362
9362
|
);
|
|
9363
9363
|
return new decimal_default(result);
|
|
9364
9364
|
}
|
|
9365
|
+
function calculateForceCloseRiskPercentage(userAccount, marginContext) {
|
|
9366
|
+
const userAccountObject = serialize(userAccount);
|
|
9367
|
+
const marginContextObject = serialize(marginContext);
|
|
9368
|
+
const result = BulletWasm.calculate_force_close_risk_percentage(
|
|
9369
|
+
userAccountObject,
|
|
9370
|
+
marginContextObject
|
|
9371
|
+
);
|
|
9372
|
+
return new decimal_default(result);
|
|
9373
|
+
}
|
|
9365
9374
|
function calculateMaxBorrowAmount(assetId, userAccount, marginContext) {
|
|
9366
9375
|
const userAccountObject = serialize(userAccount);
|
|
9367
9376
|
const marginContextObject = serialize(marginContext);
|
|
@@ -9474,6 +9483,7 @@ export {
|
|
|
9474
9483
|
calculateBorrowLendMarketAdditionalMetadata,
|
|
9475
9484
|
calculateEntryPrice,
|
|
9476
9485
|
calculateEstimatedLiquidationPrice,
|
|
9486
|
+
calculateForceCloseRiskPercentage,
|
|
9477
9487
|
calculateLiquidationRiskPercentage,
|
|
9478
9488
|
calculateMaxBorrowAmount,
|
|
9479
9489
|
calculateMaxOrderSize,
|