@bulletxyz/bullet-sdk 0.22.1-rc.2 → 0.23.0-rc.0

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.
@@ -1,6 +1,6 @@
1
1
  import Decimal from "decimal.js";
2
2
  import { type EquityType, type MarginType } from "./bullet-wasm";
3
- import type { Asset, AssetId, OrderType, PlaceOrderArgs, Side } from "./types";
3
+ import type { Asset, OrderType, PlaceOrderArgs, Side } from "./types";
4
4
  import type { BorrowLendMarket, BorrowLendRiskWeights, MarginConfig, OraclePrices, OrderbookL2, PerpMarket, PerpPrices, UserAccount } from "./zod-types/rest";
5
5
  export declare function calculateOrderbookMidpoint(orderbook: OrderbookL2): Decimal | undefined;
6
6
  export declare function calculateEntryPrice(asset: Asset, userAccount: UserAccount): Decimal;
@@ -14,13 +14,13 @@ export declare function calculateAccountEquity(equityType: EquityType, conservat
14
14
  export declare function calculateAccountLeverage(userAccount: UserAccount, MarginCalculationState: MarginCalculationState): Decimal;
15
15
  export declare function calculateAvailableMargin(marginType: MarginType, conservative: boolean, userAccount: UserAccount, MarginCalculationState: MarginCalculationState): Decimal;
16
16
  export declare function calculateUsedMargin(marginType: MarginType, userAccount: UserAccount, MarginCalculationState: MarginCalculationState): Decimal;
17
- export declare function calculateWithdrawableAmountOfAsset(asset_id: AssetId, userAccount: UserAccount, MarginCalculationState: MarginCalculationState): Decimal;
18
- export declare function calculateEstimatedLiquidationPrice(asset_id: AssetId, userAccount: UserAccount, MarginCalculationState: MarginCalculationState): Decimal;
17
+ export declare function calculateWithdrawableAmountOfAsset(asset: Asset, userAccount: UserAccount, MarginCalculationState: MarginCalculationState): Decimal;
18
+ export declare function calculateEstimatedLiquidationPrice(asset: Asset, userAccount: UserAccount, MarginCalculationState: MarginCalculationState): Decimal;
19
19
  export declare function calculateLiquidationRiskPercentage(userAccount: UserAccount, MarginCalculationState: MarginCalculationState): Decimal;
20
20
  export declare function calculateForceCancelRiskPercentage(userAccount: UserAccount, MarginCalculationState: MarginCalculationState): Decimal;
21
- export declare function calculateMaxBorrowAmount(asset_id: AssetId, initialLiabilityWeight: Decimal, userAccount: UserAccount, MarginCalculationState: MarginCalculationState): Decimal;
21
+ export declare function calculateMaxBorrowAmount(asset: Asset, initialLiabilityWeight: Decimal, userAccount: UserAccount, MarginCalculationState: MarginCalculationState): Decimal;
22
22
  export declare function calculateMaxOrderSize(asset: Asset, price: Decimal, side: Side, order_type: OrderType, reduce_only: boolean, userAccount: UserAccount, MarginCalculationState: MarginCalculationState, orderbook: OrderbookL2, n_iterations?: number, error_tolerance?: Decimal): Decimal;
23
- export declare function simulateUsedMarginOnBorrow(asset_id: AssetId, borrowAmount: Decimal, borrowLendRiskWeights: BorrowLendRiskWeights, userAccount: UserAccount, marginType: MarginType, MarginCalculationState: MarginCalculationState): {
23
+ export declare function simulateUsedMarginOnBorrow(asset: Asset, borrowAmount: Decimal, borrowLendRiskWeights: BorrowLendRiskWeights, userAccount: UserAccount, marginType: MarginType, MarginCalculationState: MarginCalculationState): {
24
24
  current: Decimal;
25
25
  updated: Decimal;
26
26
  };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/zetamarkets/bullet-sdk.git"
6
6
  },
7
- "version": "0.22.1-rc.2",
7
+ "version": "0.23.0-rc.0",
8
8
  "description": "Bullet SDK",
9
9
  "author": "@bulletxyz",
10
10
  "license": "Apache-2.0",