import type { Address, AssetId, FeeTier, MarketId, SpotCollateralTransferDirection, TokenId } from "./types";
type ExactlyOne<T, Keys extends keyof T = keyof T> = {
    [K in Keys]: {
        [P in K]: T[P];
    } & {
        [P in Exclude<Keys, K>]?: never;
    };
}[Keys];
type TpslOrder = {
    order_price: number;
    trigger_price: number;
    price_condition: string;
    order_type: string;
};
type TpslPair = {
    tp: TpslOrder | null;
    sl: TpslOrder | null;
};
type PendingTpslPair = {
    tpsl_pair: TpslPair;
    dynamic_size: boolean;
};
type NewOrderArgs = {
    price: number;
    size: number;
    side: string;
    order_type: string;
    reduce_only: boolean;
    client_order_id: string | null;
    pending_tpsl_pair: PendingTpslPair | null;
};
type CancelOrderArgs = {
    order_id: string | null;
    client_order_id: string | null;
};
type AmendOrderArgs = {
    cancel: CancelOrderArgs;
    place: NewOrderArgs;
};
type NewTriggerOrderArgs = {
    side: string;
    order_price: number;
    trigger_price: number;
    trigger_direction: string;
    price_condition: string;
    size: number | null;
    order_type: string;
};
type BackstopLiquidatePerpPositionArgs = {
    market_id: MarketId;
    size: number;
};
type BankCallMessage = {
    transfer: {
        to: Address;
        coins: {
            amount: string;
            token_id: TokenId;
        };
    };
    mint: {
        mint_to_address: Address;
        coins: {
            amount: string;
            token_id: TokenId;
        };
    };
    create_token: {
        token_name: string;
        token_decimals: number | null;
        initial_balance: string;
        mint_to_address: Address;
        admins: Address[];
        supply_cap: string | null;
    };
};
type WarpCallMessage = {
    register: {
        admin: {
            InsecureOwner: Address;
        };
        token_source: {
            Synthetic: {
                remote_token_id: string;
                local_decimals: number;
                remote_decimals: number;
            };
        };
        ism: {
            MessageIdMultisig: {
                threshold: number;
                validators: string[];
            };
        };
        remote_routers: [number, string][];
        inbound_transferrable_tokens_limit: string;
        inbound_limit_replenishment_per_slot: string;
        outbound_transferrable_tokens_limit: string;
        outbound_limit_replenishment_per_slot: string;
    };
    update: {
        warp_route: string;
        admin: {
            InsecureOwner: Address;
        } | null;
        ism: {
            MessageIdMultisig: {
                threshold: number;
                validators: string[];
            };
        } | null;
        inbound_transferrable_tokens_limit: string | null;
        inbound_limit_replenishment_per_slot: string | null;
        outbound_transferrable_tokens_limit: string | null;
        outbound_limit_replenishment_per_slot: string | null;
    };
    enroll_remote_router: {
        warp_route: string;
        remote_domain: number;
        remote_router_address: string;
    };
    un_enroll_remote_router: {
        warp_route: string;
        remote_domain: number;
    };
    transfer_remote: {
        amount: number;
        destination_domain: number;
        gas_payment_limit: number;
        recipient: string;
        relayer: {
            Standard?: string;
            Vm?: string;
        } | null;
        warp_route: string;
    };
};
type InterchainGasPaymasterCallMessage = {
    set_relayer_config: {
        domain_oracle_data: {
            domain: number;
            data_value: {
                gas_price: number;
                token_exchange_rate: number;
            };
        }[];
        domain_default_gas: {
            domain: number;
            default_gas: number;
        }[];
        default_gas: number;
        beneficiary: string | null;
    };
};
type UserAction = {
    deposit: {
        asset_id: AssetId;
        amount: number;
    };
    withdraw: {
        asset_id: AssetId;
        amount: number;
    };
    deposit_spot_collateral: {
        asset_id: AssetId;
        amount: number;
    };
    withdraw_spot_collateral: {
        asset_id: AssetId;
        amount: number;
    };
    transfer_spot_collateral: {
        asset_id: AssetId;
        amount: number;
        direction: SpotCollateralTransferDirection;
        sub_account_index: number | null;
    };
    borrow_spot: {
        asset_id: AssetId;
        amount: number;
        sub_account_index: number | null;
    };
    create_sub_account: {
        index: number;
    };
    transfer_to_sub_account: {
        asset_id: AssetId;
        amount: number;
        sub_account_index: number;
        to_sub_account: boolean;
    };
    delegate_user: {
        delegate: Address;
        name: string;
    };
    revoke_delegation: {
        delegate: Address;
    };
    update_max_leverage: {
        market_id: MarketId;
        max_leverage: number;
        sub_account_index: number | null;
    };
    claim_referral_rewards: {
        asset_id: AssetId;
    };
    place_orders: {
        market_id: MarketId;
        orders: NewOrderArgs[];
        replace: boolean;
        sub_account_index: number | null;
    };
    amend_orders: {
        market_id: MarketId;
        orders: AmendOrderArgs[];
        sub_account_index: number | null;
    };
    cancel_orders: {
        market_id: MarketId;
        orders: CancelOrderArgs[];
        sub_account_index: number | null;
    };
    cancel_market_orders: {
        market_id: MarketId;
        sub_account_index: number | null;
    };
    create_trigger_orders: {
        market_id: MarketId;
        trigger_orders: NewTriggerOrderArgs[];
        sub_account_index: number | null;
    };
    create_position_tpsl: {
        market_id: MarketId;
        tpsl_pair: TpslPair;
        size: number | null;
        sub_account_index: number | null;
    };
    cancel_trigger_orders: {
        market_id: MarketId;
        trigger_order_ids: string[];
        sub_account_index: number | null;
    };
    create_twap_order: {
        market_id: MarketId;
        twap_order_args: {
            side: string;
            total_size: number;
            reduce_only: boolean;
            total_duration_seconds: number;
        };
        sub_account_index: number | null;
    };
    cancel_twap_order: {
        market_id: MarketId;
        twap_id: string;
        sub_account_index: number | null;
    };
    cancel_all_orders: {
        sub_account_index: number | null;
    };
    deposit_to_pnl_pool: {
        usdc_amount: number;
    };
    settle_from_pnl_pool: {
        sub_account_index: number | null;
    };
    deposit_to_insurance_fund: {
        usdc_amount: number;
    };
    deposit_to_treasury: {
        asset_id: AssetId;
        amount: number;
    };
    claim_borrow_lend_fees: Record<string, never>;
    create_vault: {
        args: {
            name: string;
            description: string;
            leader: Address;
            deposit_asset_ids: AssetId[];
            withdraw_asset_id: AssetId;
            withdraw_lockup_period_hours: number;
            whitelist_deposits: boolean;
            profit_share_percentage: number;
            withdrawal_fee_bps: number;
            deposit_limit: number;
        };
    };
    deposit_to_vault: {
        vault_address: Address;
        asset_id: AssetId;
        amount: number;
    };
    queue_withdrawal: {
        vault_address: Address;
        shares: number;
    };
    cancel_queued_withdrawal: {
        vault_address: Address;
    };
    force_withdraw_vault: {
        vault_address: Address;
        shares: number;
    };
    backstop_liquidate_perp_positions: {
        address: Address;
        positions: BackstopLiquidatePerpPositionArgs[] | null;
        sub_account_index: number | null;
    };
    liquidate_borrow_lend_liability: {
        liquidatee_address: Address;
        liability_asset_id: AssetId;
        collateral_asset_id: AssetId;
        liability_amount: number;
        sub_account_index: number | null;
    };
};
type VaultAction = {
    update_vault_config: {
        vault_address: Address;
        args: {
            deposit_limit: number | null;
            withdraw_lockup_period_hours: number | null;
            profit_share_percentage: number | null;
        };
    };
    process_withdrawal_queue: {
        vault_address: Address;
    };
    whitelist_depositor: {
        vault_address: Address;
        user_address: Address;
    };
    unwhitelist_depositor: {
        vault_address: Address;
        user_address: Address;
    };
    delegate_vault_user: {
        vault_address: Address;
        delegate: Address;
        name: string;
    };
    revoke_vault_delegation: {
        vault_address: Address;
        delegate: Address;
    };
};
type KeeperAction = {
    update_oracle_prices: {
        prices: {
            asset_id: AssetId;
            oracle_price: number;
        }[];
        publish_timestamp: number;
    };
    update_mark_prices: {
        prices: {
            market_id: MarketId;
            median_cex_price: number;
            diff_ema: number;
        }[];
        publish_timestamp: number;
    };
    update_premium_indexes: {
        market_ids: MarketId[];
    };
    update_funding: {
        market_ids: MarketId[];
    };
    add_trading_credits: {
        user_address: Address;
        amount: number;
    };
    remove_trading_credits: {
        user_address: Address;
        amount: number;
    };
    update_user_fee_tier: {
        address: Address;
        fee_tier: FeeTier;
    };
    update_user_fee_discount_bps: {
        address: Address;
        fee_discount_bps: number;
    };
    set_cumulative_referral_rewards: {
        address: Address;
        asset_id: AssetId;
        amount: number;
    };
};
type PublicAction = {
    liquidate_perp_positions: {
        address: Address;
    };
    force_cancel_orders: {
        user_address: Address;
    };
    execute_trigger_orders: {
        market_id: MarketId;
    };
    apply_funding: {
        addresses: Address[];
    };
    accrue_borrow_lend_interest: Record<string, never>;
    execute_twap_orders: {
        market_id: MarketId;
    };
    activate_twap_orders: {
        market_ids: MarketId[];
    };
};
type AdminAction = {
    init_perp_market: {
        args: {
            market_id: MarketId;
            base_asset_id: AssetId;
            name: string;
            trading_mode: string;
            min_tick_size: number;
            min_lot_size: number;
            max_orders_per_side: number;
            max_orders_per_user: number;
            max_trigger_orders_per_user: number;
            min_interest_rate_clamp: number;
            max_interest_rate_clamp: number;
            min_funding_rate_clamp: number;
            max_funding_rate_clamp: number;
            max_oi_notional: number;
            max_order_to_mark_price_deviation_ratio: number;
            max_trigger_to_comparison_price_deviation_ratio: number;
            max_order_to_trigger_price_deviation_ratio: number;
            impact_margin: number;
            interest_rate: number;
            leverage_table_args: {
                table: Record<string, number>;
            };
            taker_fees_tenth_bps: number[];
            maker_fees_tenth_bps: number[];
        };
    };
    update_perp_market: {
        args: {
            market_id: MarketId;
            min_tick_size: number | null;
            min_lot_size: number | null;
            max_oi_notional: number | null;
            max_orders_per_side: number | null;
            max_orders_per_user: number | null;
            max_trigger_orders_per_user: number | null;
            min_interest_rate_clamp: number | null;
            max_interest_rate_clamp: number | null;
            min_funding_rate_clamp: number | null;
            max_funding_rate_clamp: number | null;
            impact_margin: number | null;
            interest_rate: number | null;
            taker_fees_tenth_bps: number[] | null;
            maker_fees_tenth_bps: number[] | null;
            max_order_to_mark_price_deviation_ratio: number | null;
            max_trigger_to_comparison_price_deviation_ratio: number | null;
            max_order_to_trigger_price_deviation_ratio: number | null;
            leverage_table_args: {
                table: Record<string, number>;
            } | null;
        };
    };
    init_spot_market: {
        args: {
            market_id: MarketId;
            base_asset_id: AssetId;
            quote_asset_id: AssetId;
            base_min_lot_size: number;
            quote_min_lot_size: number;
            max_orders_per_side: number;
            max_orders_per_user: number;
            max_trigger_orders_per_user: number;
            taker_fees_tenth_bps: number[];
            maker_fees_tenth_bps: number[];
            max_order_to_trigger_price_deviation_ratio: number;
            name: string;
        };
    };
    update_spot_market: {
        args: {
            market_id: MarketId;
            base_min_lot_size: number | null;
            quote_min_lot_size: number | null;
            max_orders_per_side: number | null;
            max_orders_per_user: number | null;
            max_trigger_orders_per_user: number | null;
            taker_fees_tenth_bps: number[] | null;
            maker_fees_tenth_bps: number[] | null;
            max_order_to_trigger_price_deviation_ratio: number | null;
        };
    };
    halt_perp_market: {
        market_id: MarketId;
        settlement_price: number;
    };
    unhalt_perp_market: {
        market_id: MarketId;
    };
    halt_spot_market: {
        market_id: MarketId;
    };
    unhalt_spot_market: {
        market_id: MarketId;
    };
    prune_market: {
        market_id: MarketId;
    };
    delete_market: {
        market_id: MarketId;
    };
    cleanup_user_market_state: {
        market_id: MarketId;
        users: Address[];
    };
    update_perp_leverage_table: {
        market_id: MarketId;
        args: {
            table: Record<string, number>;
        };
    };
    delete_asset: {
        asset_id: AssetId;
    };
    init_asset_info: {
        args: {
            asset_id: AssetId;
            asset_name: string;
            token_id: TokenId | null;
            decimals: number;
            withdraw_fee: number;
        };
    };
    update_asset_info: {
        args: {
            asset_id: AssetId;
            withdraw_fee: number;
        };
    };
    init_borrow_lend_pool: {
        args: {
            asset_id: AssetId;
            optimal_utilization_rate: number;
            min_borrow_rate: number;
            max_borrow_rate: number;
            optimal_borrow_rate: number;
            asset_weight: number;
            initial_liability_weight: number;
            maintenance_liability_weight: number;
            deposit_limit: number;
            borrow_limit: number;
            max_utilization_rate: number;
            liquidation_total_reward_ratio: number;
            protocol_reward_ratio: number;
            liability_liquidation_limit_ratio: number;
            interest_fee_tenth_bps: number;
        };
    };
    update_borrow_lend_pool: {
        args: {
            asset_id: AssetId;
            optimal_utilization_rate: number | null;
            min_borrow_rate: number | null;
            max_borrow_rate: number | null;
            optimal_borrow_rate: number | null;
            asset_weight: number | null;
            initial_liability_weight: number | null;
            maintenance_liability_weight: number | null;
            deposit_limit: number | null;
            borrow_limit: number | null;
            max_utilization_rate: number | null;
            liquidation_total_reward_ratio: number | null;
            protocol_reward_ratio: number | null;
            liability_liquidation_limit_ratio: number | null;
            interest_fee_tenth_bps: number | null;
        };
    };
    halt_borrow_lend_pool: {
        asset_id: AssetId;
    };
    unhalt_borrow_lend_pool: {
        asset_id: AssetId;
    };
    update_global_config: {
        args: {
            max_orders_per_user: number | null;
            max_trigger_orders_per_user: number | null;
            max_orders_per_batch_msg: number | null;
            max_trigger_orders_to_execute_per_msg: number | null;
            min_notional_twap_value: number | null;
            min_notional_twap_value_per_order: number | null;
            twap_execution_interval_seconds: number | null;
            deposit_limits_per_user: [AssetId, number][] | null;
            whitelisted_users_for_deposit: Address[] | null;
        };
    };
    update_perp_liquidation_config: {
        args: {
            liquidation_fee: number | null;
            liquidation_ioc_buffer: number | null;
            backstop_liquidation_threshold: number | null;
            liquidation_protocol_reward_ratio: number | null;
        };
    };
    update_global_vault_config: {
        args: {
            leader_minimum_holding_percentage: number | null;
            creation_fee_usdc: number | null;
            min_deposit_value: number | null;
        };
    };
    update_admin: {
        admin_type: string;
        new_admin: Address;
    };
    withdraw_from_treasury: {
        asset_id: AssetId;
        amount: number;
        to: Address;
    };
    cancel_orders: {
        cancels: [MarketId, string, Address][];
    };
    cancel_trigger_orders: {
        cancels: [MarketId, string, Address][];
    };
    force_settle_perp_position: {
        market_id: MarketId;
        users: Address[];
    };
    auto_deleverage: {
        counterparty_a: Address;
        counterparty_a_sub_account_index: number | null;
        counterparty_b: Address;
        counterparty_b_sub_account_index: number | null;
        market_id: MarketId;
        size: number | null;
        settlement_price: number;
    };
    deposit: {
        user_address: Address;
        asset_id: AssetId;
        amount: number;
    };
    force_remove_delegate: {
        delegator: Address;
        delegate: Address;
    };
};
type ExchangeCallMessage = ExactlyOne<{
    user: ExactlyOne<UserAction>;
    vault: ExactlyOne<VaultAction>;
    keeper: ExactlyOne<KeeperAction>;
    public: ExactlyOne<PublicAction>;
    admin: ExactlyOne<AdminAction>;
}>;
export type RuntimeCall = ExactlyOne<{
    exchange: ExchangeCallMessage;
    bank: ExactlyOne<BankCallMessage>;
    warp: ExactlyOne<WarpCallMessage>;
    interchain_gas_paymaster: ExactlyOne<InterchainGasPaymasterCallMessage>;
}>;
export {};
//# sourceMappingURL=rollupTypes.d.ts.map