@crypticdot/defituna-core 3.4.3 → 3.4.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.
@@ -695,14 +695,14 @@ export function getDecreaseSpotPositionQuote(decrease_amount: bigint, collateral
695
695
  *
696
696
  * # Parameters
697
697
  * - `position_token`: Token of the position
698
- * - `amount`: Position total size (decimal)
699
- * - `debt`: Position total debt (decimal)
700
- * - `liquidation_threshold`: Liquidation threshold of the market (decimal)
698
+ * - `amount`: Position total size
699
+ * - `debt`: Position total debt
700
+ * - `liquidation_threshold`: Liquidation threshold of a market
701
701
  *
702
702
  * # Returns
703
703
  * - `f64`: Decimal liquidation price
704
704
  */
705
- export function getSpotPositionLiquidationPrice(position_token: number, amount: number, debt: number, liquidation_threshold: number): number;
705
+ export function getSpotPositionLiquidationPrice(position_token: number, amount: bigint, debt: bigint, liquidation_threshold: number): number;
706
706
  /**
707
707
  * Calculates the maximum tradable amount in the collateral token.
708
708
  *
@@ -1813,9 +1813,9 @@ export function getDecreaseSpotPositionQuote(decrease_amount, collateral_token,
1813
1813
  *
1814
1814
  * # Parameters
1815
1815
  * - `position_token`: Token of the position
1816
- * - `amount`: Position total size (decimal)
1817
- * - `debt`: Position total debt (decimal)
1818
- * - `liquidation_threshold`: Liquidation threshold of the market (decimal)
1816
+ * - `amount`: Position total size
1817
+ * - `debt`: Position total debt
1818
+ * - `liquidation_threshold`: Liquidation threshold of a market
1819
1819
  *
1820
1820
  * # Returns
1821
1821
  * - `f64`: Decimal liquidation price
@@ -1922,14 +1922,14 @@ export function solana_program_init() {
1922
1922
  wasm.solana_program_init();
1923
1923
  }
1924
1924
 
1925
- function __wasm_bindgen_func_elem_3207(arg0, arg1) {
1926
- wasm.__wasm_bindgen_func_elem_3207(arg0, arg1);
1927
- }
1928
-
1929
1925
  function __wasm_bindgen_func_elem_2634(arg0, arg1, arg2) {
1930
1926
  wasm.__wasm_bindgen_func_elem_2634(arg0, arg1, addHeapObject(arg2));
1931
1927
  }
1932
1928
 
1929
+ function __wasm_bindgen_func_elem_3207(arg0, arg1) {
1930
+ wasm.__wasm_bindgen_func_elem_3207(arg0, arg1);
1931
+ }
1932
+
1933
1933
  function __wasm_bindgen_func_elem_495(arg0, arg1, arg2, arg3) {
1934
1934
  wasm.__wasm_bindgen_func_elem_495(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1935
1935
  }
@@ -10,7 +10,7 @@ export const _HUNDRED_PERCENT: () => number;
10
10
  export const _COMPUTED_AMOUNT: () => bigint;
11
11
  export const getIncreaseSpotPositionQuote: (a: bigint, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => number;
12
12
  export const getDecreaseSpotPositionQuote: (a: bigint, b: number, c: number, d: number, e: number, f: bigint, g: bigint, h: number, i: number, j: number, k: number) => number;
13
- export const getSpotPositionLiquidationPrice: (a: number, b: number, c: number, d: number, e: number) => void;
13
+ export const getSpotPositionLiquidationPrice: (a: number, b: number, c: bigint, d: bigint, e: number) => void;
14
14
  export const getTradableAmount: (a: number, b: number, c: bigint, d: number, e: number, f: bigint, g: number, h: number, i: number, j: number) => void;
15
15
  export const calculateTunaSpotPositionProtocolFee: (a: number, b: number, c: bigint, d: bigint, e: number, f: number) => number;
16
16
  export const calculateTunaProtocolFee: (a: bigint, b: bigint, c: number, d: number) => bigint;
@@ -142,10 +142,10 @@ export const limitOrderQuoteByInputToken: (a: number, b: bigint, c: number, d: n
142
142
  export const limitOrderQuoteByOutputToken: (a: number, b: bigint, c: number, d: number, e: number) => void;
143
143
  export const limitOrderRewardByOutputToken: (a: number, b: bigint, c: number, d: number) => void;
144
144
  export const decreaseLimitOrderQuote: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: number) => void;
145
- export const __wasm_bindgen_func_elem_3207: (a: number, b: number) => void;
146
- export const __wasm_bindgen_func_elem_3203: (a: number, b: number) => void;
147
145
  export const __wasm_bindgen_func_elem_2634: (a: number, b: number, c: number) => void;
148
146
  export const __wasm_bindgen_func_elem_2653: (a: number, b: number) => void;
147
+ export const __wasm_bindgen_func_elem_3207: (a: number, b: number) => void;
148
+ export const __wasm_bindgen_func_elem_3203: (a: number, b: number) => void;
149
149
  export const __wasm_bindgen_func_elem_495: (a: number, b: number, c: number, d: number) => void;
150
150
  export const __wbindgen_export: (a: number, b: number) => number;
151
151
  export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
@@ -695,14 +695,14 @@ export function getDecreaseSpotPositionQuote(decrease_amount: bigint, collateral
695
695
  *
696
696
  * # Parameters
697
697
  * - `position_token`: Token of the position
698
- * - `amount`: Position total size (decimal)
699
- * - `debt`: Position total debt (decimal)
700
- * - `liquidation_threshold`: Liquidation threshold of the market (decimal)
698
+ * - `amount`: Position total size
699
+ * - `debt`: Position total debt
700
+ * - `liquidation_threshold`: Liquidation threshold of a market
701
701
  *
702
702
  * # Returns
703
703
  * - `f64`: Decimal liquidation price
704
704
  */
705
- export function getSpotPositionLiquidationPrice(position_token: number, amount: number, debt: number, liquidation_threshold: number): number;
705
+ export function getSpotPositionLiquidationPrice(position_token: number, amount: bigint, debt: bigint, liquidation_threshold: number): number;
706
706
  /**
707
707
  * Calculates the maximum tradable amount in the collateral token.
708
708
  *
@@ -1803,9 +1803,9 @@ exports.getDecreaseSpotPositionQuote = function(decrease_amount, collateral_toke
1803
1803
  *
1804
1804
  * # Parameters
1805
1805
  * - `position_token`: Token of the position
1806
- * - `amount`: Position total size (decimal)
1807
- * - `debt`: Position total debt (decimal)
1808
- * - `liquidation_threshold`: Liquidation threshold of the market (decimal)
1806
+ * - `amount`: Position total size
1807
+ * - `debt`: Position total debt
1808
+ * - `liquidation_threshold`: Liquidation threshold of a market
1809
1809
  *
1810
1810
  * # Returns
1811
1811
  * - `f64`: Decimal liquidation price
@@ -10,7 +10,7 @@ export const _HUNDRED_PERCENT: () => number;
10
10
  export const _COMPUTED_AMOUNT: () => bigint;
11
11
  export const getIncreaseSpotPositionQuote: (a: bigint, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => number;
12
12
  export const getDecreaseSpotPositionQuote: (a: bigint, b: number, c: number, d: number, e: number, f: bigint, g: bigint, h: number, i: number, j: number, k: number) => number;
13
- export const getSpotPositionLiquidationPrice: (a: number, b: number, c: number, d: number, e: number) => void;
13
+ export const getSpotPositionLiquidationPrice: (a: number, b: number, c: bigint, d: bigint, e: number) => void;
14
14
  export const getTradableAmount: (a: number, b: number, c: bigint, d: number, e: number, f: bigint, g: number, h: number, i: number, j: number) => void;
15
15
  export const calculateTunaSpotPositionProtocolFee: (a: number, b: number, c: bigint, d: bigint, e: number, f: number) => number;
16
16
  export const calculateTunaProtocolFee: (a: bigint, b: bigint, c: number, d: number) => bigint;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@crypticdot/defituna-core",
3
3
  "description": "DefiTuna core typescript package.",
4
- "version": "3.4.3",
4
+ "version": "3.4.4",
5
5
  "main": "./dist/nodejs/defituna_core_js_bindings.js",
6
6
  "types": "./dist/nodejs/defituna_core_js_bindings.d.ts",
7
7
  "browser": "./dist/browser/defituna_core_js_bindings.js",
@@ -23,7 +23,7 @@
23
23
  "@crypticdot/typescript-config": "^1.0.0",
24
24
  "typescript": "^5.8.3",
25
25
  "wasm-pack": "^0.13.1",
26
- "@crypticdot/defituna-rust-core": "3.4.3"
26
+ "@crypticdot/defituna-rust-core": "3.4.4"
27
27
  },
28
28
  "license": "SEE LICENSE IN LICENSE",
29
29
  "keywords": [