/* tslint:disable */
/* eslint-disable */

type EquityType = "unweighted" | "weighted_initial" | "weighted_maintenance";

type MarginType = "initial" | "maintenance";

type OrderType = "limit" | "post_only" | "fill_or_kill" | "immediate_or_cancel" | "post_only_slide" | "post_only_front";

type Side = "bid" | "ask";

export class BulletWasm {
    free(): void;
    [Symbol.dispose](): void;
    static calculate_account_equity(user_account: any, conservative: boolean, equity_type: EquityType, risk_engine: any): string;
    static calculate_account_leverage(user_account: any, risk_engine: any): string;
    static calculate_account_summary_batch(user_accounts: any, risk_engine: any, use_weighted_equity: boolean): any;
    static calculate_available_margin(user_account: any, conservative: boolean, margin_type: MarginType, risk_engine: any): string;
    static calculate_borrow_lend_additional_metadata(borrow_lend_market: any): any;
    static calculate_estimated_liquidation_price(user_account: any, market_id: number, base_asset_id: number, risk_engine: any): string;
    static calculate_force_cancel_risk_percentage(user_account: any, risk_engine: any): string;
    static calculate_liquidation_risk_percentage(user_account: any, risk_engine: any): string;
    static calculate_margin_balance(user_account: any, risk_engine: any): any;
    /**
     * Calculates the maximum amount that can be borrowed for a given asset
     * @param initial_liability_weight The initial liability weight for the market must be passed in separately since the user may not have a spot ledger for this asset yet
     */
    static calculate_max_borrow_amount(asset_id: number, user_account: any, risk_engine: any): string;
    static calculate_max_order_size(market_id: number, price: string, side: Side, order_type: OrderType, reduce_only: boolean, user_account: any, risk_engine: any, orderbook: any, n_iterations: number, error_tolerance: string): string;
    static calculate_positions_additional_metadata(user_account: any, risk_engine: any, exchange_info: any): any;
    static calculate_total_notional_assets(user_account: any, risk_engine: any): string;
    static calculate_total_notional_liabilities(user_account: any, risk_engine: any): string;
    static calculate_total_perp_margin_requirement(user_account: any, margin_type: MarginType, withdrawal: boolean, risk_engine: any): string;
    static calculate_total_perp_unrealized_pnl(user_account: any, risk_engine: any): string;
    static calculate_used_margin(user_account: any, withdrawal: boolean, margin_type: MarginType, risk_engine: any): string;
    static calculate_used_perp_margin(user_account: any, margin_type: MarginType, risk_engine: any): string;
    static calculate_used_spot_margin(user_account: any, margin_type: MarginType, risk_engine: any): string;
    static calculate_withdrawable_amount_of_asset(asset_id: number, for_transfer_spot_collateral: boolean, user_account: any, risk_engine: any, exchange_info: any): string;
    static convert_rust_decimal_to_json(decimal_str: string): any;
    static convert_token_id_to_bytes(token_id: string): Uint8Array;
    static dummy(a: number): number;
    constructor();
    static simulate_estimated_liquidation_price_on_order(market_id: number, new_order_args: any, base_asset_id: number, user_account: any, risk_engine: any, orderbook: any): any;
    static simulate_used_margin_on_borrow(asset_id: number, borrow_amount: string, user_account: any, margin_type: MarginType, risk_engine: any): any;
    static simulate_used_margin_on_order(market_id: number, new_order_args: any, user_account: any, risk_engine: any, orderbook: any): any;
}
