@cubexch/health
Advanced tools
Comparing version 0.1.1 to 0.1.3
@@ -265,3 +265,2 @@ let wasm; | ||
* @param {bigint} contract_id | ||
* @param {bigint} contract_price9 | ||
* @param {bigint} units | ||
@@ -271,6 +270,6 @@ * @param {HealthValue} cost_basis | ||
*/ | ||
export function contract_unrealized_pnl(contract_id, contract_price9, units, cost_basis) { | ||
export function contract_unrealized_pnl(contract_id, units, cost_basis) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.contract_unrealized_pnl(retptr, contract_id, contract_price9, units, addHeapObject(cost_basis)); | ||
wasm.contract_unrealized_pnl(retptr, contract_id, units, addHeapObject(cost_basis)); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
@@ -368,3 +367,2 @@ var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
* @param {bigint} contract_id | ||
* @param {bigint} contract_price9 | ||
* @param {bigint} units | ||
@@ -374,6 +372,6 @@ * @param {HealthValue} quote | ||
*/ | ||
export function liquidation_price(health, contract_id, contract_price9, units, quote) { | ||
export function liquidation_price(health, contract_id, units, quote) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-32); | ||
wasm.liquidation_price(retptr, addHeapObject(health), contract_id, contract_price9, units, addHeapObject(quote)); | ||
wasm.liquidation_price(retptr, addHeapObject(health), contract_id, units, addHeapObject(quote)); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
@@ -395,3 +393,2 @@ var r2 = getBigInt64Memory0()[retptr / 8 + 1]; | ||
* @param {bigint} contract_id | ||
* @param {bigint} contract_price9 | ||
* @param {bigint} units | ||
@@ -401,6 +398,6 @@ * @param {HealthValue} quote | ||
*/ | ||
export function bankruptcy_price(health, contract_id, contract_price9, units, quote) { | ||
export function bankruptcy_price(health, contract_id, units, quote) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-32); | ||
wasm.bankruptcy_price(retptr, addHeapObject(health), contract_id, contract_price9, units, addHeapObject(quote)); | ||
wasm.bankruptcy_price(retptr, addHeapObject(health), contract_id, units, addHeapObject(quote)); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
@@ -476,3 +473,3 @@ var r2 = getBigInt64Memory0()[retptr / 8 + 1]; | ||
export function __wbg_debug_4175e0b5a528c458(arg0, arg1) { | ||
export function __wbg_debug_77322e7a322aca53(arg0, arg1) { | ||
console.debug(getStringFromWasm0(arg0, arg1)); | ||
@@ -479,0 +476,0 @@ }; |
@@ -31,3 +31,2 @@ /* tslint:disable */ | ||
* @param {bigint} contract_id | ||
* @param {bigint} contract_price9 | ||
* @param {bigint} units | ||
@@ -37,3 +36,3 @@ * @param {HealthValue} cost_basis | ||
*/ | ||
export function contract_unrealized_pnl(contract_id: bigint, contract_price9: bigint, units: bigint, cost_basis: HealthValue): HealthValue; | ||
export function contract_unrealized_pnl(contract_id: bigint, units: bigint, cost_basis: HealthValue): HealthValue; | ||
/** | ||
@@ -66,3 +65,2 @@ * @returns {Health} | ||
* @param {bigint} contract_id | ||
* @param {bigint} contract_price9 | ||
* @param {bigint} units | ||
@@ -72,7 +70,6 @@ * @param {HealthValue} quote | ||
*/ | ||
export function liquidation_price(health: Health, contract_id: bigint, contract_price9: bigint, units: bigint, quote: HealthValue): bigint | undefined; | ||
export function liquidation_price(health: Health, contract_id: bigint, units: bigint, quote: HealthValue): bigint | undefined; | ||
/** | ||
* @param {Health} health | ||
* @param {bigint} contract_id | ||
* @param {bigint} contract_price9 | ||
* @param {bigint} units | ||
@@ -82,3 +79,3 @@ * @param {HealthValue} quote | ||
*/ | ||
export function bankruptcy_price(health: Health, contract_id: bigint, contract_price9: bigint, units: bigint, quote: HealthValue): bigint | undefined; | ||
export function bankruptcy_price(health: Health, contract_id: bigint, units: bigint, quote: HealthValue): bigint | undefined; | ||
export interface ModuleState { | ||
@@ -94,2 +91,4 @@ initialized: boolean; | ||
askInitialMarginLimit: HealthValue; | ||
bidQuantityLimit: RawUnits; | ||
askQuantityLimit: RawUnits; | ||
} | ||
@@ -100,2 +99,4 @@ | ||
remainingInitialMargin: HealthValue; | ||
maxLeverage: number; | ||
minLeverage: number; | ||
} | ||
@@ -102,0 +103,0 @@ |
{ | ||
"name": "@cubexch/health", | ||
"version": "0.1.1", | ||
"version": "0.1.3", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "index_bg.wasm", |
Sorry, the diff of this file is not supported yet
187298
735