@crypticdot/defituna-core 3.3.3 → 3.3.5

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.
@@ -849,6 +849,8 @@ export interface DecreaseSpotPositionQuoteResult {
849
849
  decreasePercent: number;
850
850
  requiredSwapAmount: bigint;
851
851
  estimatedAmount: bigint;
852
+ estimatedPayableDebt: bigint;
853
+ estimatedCollateralToBeWithdrawn: bigint;
852
854
  priceImpact: number;
853
855
  jupiterSwapIx: SwapInstruction | undefined;
854
856
  }
@@ -1818,12 +1818,12 @@ export function solana_program_init() {
1818
1818
  wasm.solana_program_init();
1819
1819
  }
1820
1820
 
1821
- function __wasm_bindgen_func_elem_3203(arg0, arg1, arg2) {
1822
- wasm.__wasm_bindgen_func_elem_3203(arg0, arg1, addHeapObject(arg2));
1821
+ function __wasm_bindgen_func_elem_3103(arg0, arg1) {
1822
+ wasm.__wasm_bindgen_func_elem_3103(arg0, arg1);
1823
1823
  }
1824
1824
 
1825
- function __wasm_bindgen_func_elem_3097(arg0, arg1) {
1826
- wasm.__wasm_bindgen_func_elem_3097(arg0, arg1);
1825
+ function __wasm_bindgen_func_elem_3312(arg0, arg1, arg2) {
1826
+ wasm.__wasm_bindgen_func_elem_3312(arg0, arg1, addHeapObject(arg2));
1827
1827
  }
1828
1828
 
1829
1829
  function __wasm_bindgen_func_elem_480(arg0, arg1, arg2, arg3) {
@@ -3246,9 +3246,9 @@ export function __wbindgen_cast_4625c577ab2ec9ee(arg0) {
3246
3246
  return addHeapObject(ret);
3247
3247
  };
3248
3248
 
3249
- export function __wbindgen_cast_7f6d2ab049d5d8fd(arg0, arg1) {
3250
- // Cast intrinsic for `Closure(Closure { dtor_idx: 334, function: Function { arguments: [], shim_idx: 335, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3251
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3093, __wasm_bindgen_func_elem_3097);
3249
+ export function __wbindgen_cast_829978f7e672581b(arg0, arg1) {
3250
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 337, function: Function { arguments: [], shim_idx: 338, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3251
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3099, __wasm_bindgen_func_elem_3103);
3252
3252
  return addHeapObject(ret);
3253
3253
  };
3254
3254
 
@@ -3258,12 +3258,6 @@ export function __wbindgen_cast_9ae0607507abb057(arg0) {
3258
3258
  return addHeapObject(ret);
3259
3259
  };
3260
3260
 
3261
- export function __wbindgen_cast_b2b7ff753c8c06bb(arg0, arg1) {
3262
- // Cast intrinsic for `Closure(Closure { dtor_idx: 366, function: Function { arguments: [Externref], shim_idx: 361, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3263
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3222, __wasm_bindgen_func_elem_3203);
3264
- return addHeapObject(ret);
3265
- };
3266
-
3267
3261
  export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
3268
3262
  // Cast intrinsic for `F64 -> Externref`.
3269
3263
  const ret = arg0;
@@ -3276,6 +3270,12 @@ export function __wbindgen_cast_e7b45dd881f38ce3(arg0, arg1) {
3276
3270
  return addHeapObject(ret);
3277
3271
  };
3278
3272
 
3273
+ export function __wbindgen_cast_e9643297b4d6a498(arg0, arg1) {
3274
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 372, function: Function { arguments: [Externref], shim_idx: 383, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3275
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3285, __wasm_bindgen_func_elem_3312);
3276
+ return addHeapObject(ret);
3277
+ };
3278
+
3279
3279
  export function __wbindgen_object_clone_ref(arg0) {
3280
3280
  const ret = getObject(arg0);
3281
3281
  return addHeapObject(ret);
@@ -1,14 +1,14 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
+ export const _INVALID_ARGUMENTS: (a: number) => void;
5
+ export const _JUPITER_QUOTE_REQUEST_ERROR: (a: number) => void;
6
+ export const _JUPITER_SWAP_INSTRUCTIONS_REQUEST_ERROR: (a: number) => void;
4
7
  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;
5
8
  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;
6
9
  export const getLiquidationPrice: (a: number, b: number, c: number, d: number, e: number) => void;
7
10
  export const getTradableAmount: (a: number, b: number, c: bigint, d: number, e: number, f: bigint, g: number, h: number, i: number, j: number) => void;
8
11
  export const calculateTunaProtocolFee: (a: number, b: number, c: bigint, d: bigint, e: number, f: number) => number;
9
- export const _INVALID_ARGUMENTS: (a: number) => void;
10
- export const _JUPITER_QUOTE_REQUEST_ERROR: (a: number) => void;
11
- export const _JUPITER_SWAP_INSTRUCTIONS_REQUEST_ERROR: (a: number) => void;
12
12
  export const __wbg_transaction_free: (a: number, b: number) => void;
13
13
  export const transaction_constructor: (a: number, b: number) => number;
14
14
  export const transaction_message: (a: number) => number;
@@ -136,10 +136,10 @@ export const limitOrderQuoteByInputToken: (a: number, b: bigint, c: number, d: n
136
136
  export const limitOrderQuoteByOutputToken: (a: number, b: bigint, c: number, d: number, e: number) => void;
137
137
  export const limitOrderRewardByOutputToken: (a: number, b: bigint, c: number, d: number) => void;
138
138
  export const decreaseLimitOrderQuote: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: number) => void;
139
- export const __wasm_bindgen_func_elem_3203: (a: number, b: number, c: number) => void;
140
- export const __wasm_bindgen_func_elem_3222: (a: number, b: number) => void;
141
- export const __wasm_bindgen_func_elem_3097: (a: number, b: number) => void;
142
- export const __wasm_bindgen_func_elem_3093: (a: number, b: number) => void;
139
+ export const __wasm_bindgen_func_elem_3103: (a: number, b: number) => void;
140
+ export const __wasm_bindgen_func_elem_3099: (a: number, b: number) => void;
141
+ export const __wasm_bindgen_func_elem_3312: (a: number, b: number, c: number) => void;
142
+ export const __wasm_bindgen_func_elem_3285: (a: number, b: number) => void;
143
143
  export const __wasm_bindgen_func_elem_480: (a: number, b: number, c: number, d: number) => void;
144
144
  export const __wbindgen_export: (a: number, b: number) => number;
145
145
  export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
@@ -849,6 +849,8 @@ export interface DecreaseSpotPositionQuoteResult {
849
849
  decreasePercent: number;
850
850
  requiredSwapAmount: bigint;
851
851
  estimatedAmount: bigint;
852
+ estimatedPayableDebt: bigint;
853
+ estimatedCollateralToBeWithdrawn: bigint;
852
854
  priceImpact: number;
853
855
  jupiterSwapIx: SwapInstruction | undefined;
854
856
  }
@@ -1808,12 +1808,12 @@ exports.solana_program_init = function() {
1808
1808
  wasm.solana_program_init();
1809
1809
  };
1810
1810
 
1811
- function __wasm_bindgen_func_elem_3097(arg0, arg1) {
1812
- wasm.__wasm_bindgen_func_elem_3097(arg0, arg1);
1811
+ function __wasm_bindgen_func_elem_3103(arg0, arg1) {
1812
+ wasm.__wasm_bindgen_func_elem_3103(arg0, arg1);
1813
1813
  }
1814
1814
 
1815
- function __wasm_bindgen_func_elem_3203(arg0, arg1, arg2) {
1816
- wasm.__wasm_bindgen_func_elem_3203(arg0, arg1, addHeapObject(arg2));
1815
+ function __wasm_bindgen_func_elem_3312(arg0, arg1, arg2) {
1816
+ wasm.__wasm_bindgen_func_elem_3312(arg0, arg1, addHeapObject(arg2));
1817
1817
  }
1818
1818
 
1819
1819
  function __wasm_bindgen_func_elem_480(arg0, arg1, arg2, arg3) {
@@ -3252,9 +3252,9 @@ exports.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
3252
3252
  return addHeapObject(ret);
3253
3253
  };
3254
3254
 
3255
- exports.__wbindgen_cast_7f6d2ab049d5d8fd = function(arg0, arg1) {
3256
- // Cast intrinsic for `Closure(Closure { dtor_idx: 334, function: Function { arguments: [], shim_idx: 335, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3257
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3093, __wasm_bindgen_func_elem_3097);
3255
+ exports.__wbindgen_cast_829978f7e672581b = function(arg0, arg1) {
3256
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 337, function: Function { arguments: [], shim_idx: 338, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3257
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3099, __wasm_bindgen_func_elem_3103);
3258
3258
  return addHeapObject(ret);
3259
3259
  };
3260
3260
 
@@ -3264,12 +3264,6 @@ exports.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
3264
3264
  return addHeapObject(ret);
3265
3265
  };
3266
3266
 
3267
- exports.__wbindgen_cast_b2b7ff753c8c06bb = function(arg0, arg1) {
3268
- // Cast intrinsic for `Closure(Closure { dtor_idx: 366, function: Function { arguments: [Externref], shim_idx: 361, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3269
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3222, __wasm_bindgen_func_elem_3203);
3270
- return addHeapObject(ret);
3271
- };
3272
-
3273
3267
  exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
3274
3268
  // Cast intrinsic for `F64 -> Externref`.
3275
3269
  const ret = arg0;
@@ -3282,6 +3276,12 @@ exports.__wbindgen_cast_e7b45dd881f38ce3 = function(arg0, arg1) {
3282
3276
  return addHeapObject(ret);
3283
3277
  };
3284
3278
 
3279
+ exports.__wbindgen_cast_e9643297b4d6a498 = function(arg0, arg1) {
3280
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 372, function: Function { arguments: [Externref], shim_idx: 383, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3281
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3285, __wasm_bindgen_func_elem_3312);
3282
+ return addHeapObject(ret);
3283
+ };
3284
+
3285
3285
  exports.__wbindgen_object_clone_ref = function(arg0) {
3286
3286
  const ret = getObject(arg0);
3287
3287
  return addHeapObject(ret);
@@ -1,14 +1,14 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
+ export const _INVALID_ARGUMENTS: (a: number) => void;
5
+ export const _JUPITER_QUOTE_REQUEST_ERROR: (a: number) => void;
6
+ export const _JUPITER_SWAP_INSTRUCTIONS_REQUEST_ERROR: (a: number) => void;
4
7
  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;
5
8
  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;
6
9
  export const getLiquidationPrice: (a: number, b: number, c: number, d: number, e: number) => void;
7
10
  export const getTradableAmount: (a: number, b: number, c: bigint, d: number, e: number, f: bigint, g: number, h: number, i: number, j: number) => void;
8
11
  export const calculateTunaProtocolFee: (a: number, b: number, c: bigint, d: bigint, e: number, f: number) => number;
9
- export const _INVALID_ARGUMENTS: (a: number) => void;
10
- export const _JUPITER_QUOTE_REQUEST_ERROR: (a: number) => void;
11
- export const _JUPITER_SWAP_INSTRUCTIONS_REQUEST_ERROR: (a: number) => void;
12
12
  export const __wbg_transaction_free: (a: number, b: number) => void;
13
13
  export const transaction_constructor: (a: number, b: number) => number;
14
14
  export const transaction_message: (a: number) => number;
@@ -136,10 +136,10 @@ export const limitOrderQuoteByInputToken: (a: number, b: bigint, c: number, d: n
136
136
  export const limitOrderQuoteByOutputToken: (a: number, b: bigint, c: number, d: number, e: number) => void;
137
137
  export const limitOrderRewardByOutputToken: (a: number, b: bigint, c: number, d: number) => void;
138
138
  export const decreaseLimitOrderQuote: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: number) => void;
139
- export const __wasm_bindgen_func_elem_3097: (a: number, b: number) => void;
140
- export const __wasm_bindgen_func_elem_3093: (a: number, b: number) => void;
141
- export const __wasm_bindgen_func_elem_3203: (a: number, b: number, c: number) => void;
142
- export const __wasm_bindgen_func_elem_3222: (a: number, b: number) => void;
139
+ export const __wasm_bindgen_func_elem_3103: (a: number, b: number) => void;
140
+ export const __wasm_bindgen_func_elem_3099: (a: number, b: number) => void;
141
+ export const __wasm_bindgen_func_elem_3312: (a: number, b: number, c: number) => void;
142
+ export const __wasm_bindgen_func_elem_3285: (a: number, b: number) => void;
143
143
  export const __wasm_bindgen_func_elem_480: (a: number, b: number, c: number, d: number) => void;
144
144
  export const __wbindgen_export: (a: number, b: number) => number;
145
145
  export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
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.3.3",
4
+ "version": "3.3.5",
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.3.3"
26
+ "@crypticdot/defituna-rust-core": "3.3.5"
27
27
  },
28
28
  "license": "SEE LICENSE IN LICENSE",
29
29
  "keywords": [