import { Contract, ethers, Wallet, BigNumber, BigNumberish } from "ethers"; import { Dapp, FundComposition, AssetEnabled, Network, LyraOptionMarket, LyraOptionType, LyraTradeType, LyraPosition, SDKOptions, LimitOrderInfo } from "../types"; import { Utils } from "./utils"; import { TrackedAsset } from "../services/toros/completeWithdrawal"; export declare class Pool { readonly poolLogic: Contract; readonly managerLogic: Contract; readonly factory: Contract; readonly signer: Wallet; readonly address: string; readonly utils: Utils; readonly network: Network; readonly isDhedge: boolean; constructor(network: Network, signer: Wallet, poolLogic: Contract, mangerLogic: Contract, utils: Utils, factory: Contract, isDhedge?: boolean); /** * Return the assets with balances and deposit info of a pool * @returns {Promise} Composition of assets with balance, deposit info */ getComposition(): Promise; /** * Approve the asset that can be deposited into a pool * @param {string} asset Address of deposit asset * @param {BigNumber | string} amount Amount to be approved * @param {any} options Transaction options * @param {boolean} estimateGas Simulate/estimate gas * @returns {Promise} Transaction */ approveDeposit(asset: string, amount: BigNumber | string, options?: any, estimateGas?: boolean): Promise; /** * Deposit asset into a pool * @param {string} asset Address of asset * @param {BigNumber | string} amount Amount to be deposited * @param {any} options Transaction options * @param {boolean} estimateGas Simulate/estimate gas * @returns {Promise} Transaction */ deposit(asset: string, amount: string | BigNumber, options?: any, estimateGas?: boolean): Promise; /** * Withdraw assets from a pool * @param fundTokenAmount Amount of pool tokens to be withdrawn * @param {any} options Transaction options * @param {boolean} estimateGas Simulate/estimate gas * @returns {Promise} Transaction */ withdraw(fundTokenAmount: string | BigNumber, options?: any, estimateGas?: boolean): Promise; /** * Approve the asset for trading and providing liquidity * @param {Dapp} dapp Platform like Sushiswap or Uniswap * @param {string} asset Address of asset * @param {BigNumber | string} Amount to be approved * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ approve(dapp: Dapp, asset: string, amount: BigNumber | string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Approve the liquidity pool token for staking * @param {Dapp} dapp Platform like Sushiswap or Uniswap * @param {string} asset Address of liquidity pool token * @param {BigNumber | string} amount Amount to be approved * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ approveStaking(dapp: Dapp, asset: string, amount: BigNumber | string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Approve an asset for the Uniswap V3 NonfungiblePositionManager * (used before mint/increase liquidity calls) * @param {string} asset Address of asset to approve * @param {BigNumber | string} amount Amount to be approved * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ approveUniswapV3Liquidity(asset: string, amount: BigNumber | string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Approve the asset for provided spender address * @param {string} spender Spender address * @param {string} asset Address of asset * @param {BigNumber | string} amount to be approved * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ approveSpender(spender: string, asset: string, amount: BigNumber | string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Approve NFT for provided spender address * @param {string} spender Spender address * @param {string} asset Address of asset * @param {string} tokenId NFT id * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ approveSpenderNFT(spender: string, asset: string, tokenId: string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Trade an asset into another asset * @param {Dapp} dapp Platform like Sushiswap or Uniswap * @param {string} assetFrom Asset to trade from * @param {string} assetTo Asset to trade into * @param {BigNumber | string} amountIn Amount * @param {number} slippage Slippage tolerance in % * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ trade(dapp: Dapp, assetFrom: string, assetTo: string, amountIn: BigNumber | string, slippage?: number, options?: any, sdkOptions?: SDKOptions): Promise; /** * Add liquidity to a liquidity pool * @param {Dapp} dapp Platform like Sushiswap or Uniswap * @param {string} assetA First asset * @param {string} assetB Second asset * @param {BigNumber | string} amountA Amount first asset * @param {BigNumber | string} amountB Amount second asset * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ addLiquidity(dapp: Dapp, assetA: string, assetB: string, amountA: BigNumber | string, amountB: BigNumber | string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Remove liquidity from a liquidity pool * @param {Dapp} dapp Platform like Sushiswap or Uniswap * @param {string} assetA First asset * @param {string} assetB Second asset * @param {BigNumber | string} amount Amount of liquidity pool tokens * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ removeLiquidity(dapp: Dapp, assetA: string, assetB: string, amount: string | BigNumber, options?: any, sdkOptions?: SDKOptions): Promise; /** * Stake liquidity pool tokens in a yield farm * @param {Dapp} dapp Platform like Sushiswap or Uniswap * @param {string} asset Liquidity pool token * @param {BigNumber | string} amount Amount of liquidity pool tokens * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ stake(dapp: Dapp, asset: string, amount: BigNumber | string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Stake liquidity pool tokens in gauge contract * @param {Dapp} dapp Platform like Balancer or Velodrome * @param {string} gauge Gauge contract address * @param {BigNumber | string} amount Amount of liquidity pool tokens or token ID for Velodrome CL * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ stakeInGauge(dapp: Dapp, gauge: string, amount: BigNumber | string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Unstake liquidity pool tokens from a yield farm * @param {Dapp} dapp Platform like Sushiswap or Uniswap * @param {string} asset Liquidity pool token * @param {BigNumber | string} amount Amount of liquidity pool tokens * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ unStake(dapp: Dapp, asset: string, amount: BigNumber | string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Unstake liquidity pool tokens from Velodrome or Balancer gauge * @param {string} gauge Gauge contract address * @param {BigNumber | string} amount Amount of liquidity pool tokens or CL token ID * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ unstakeFromGauge(gauge: string, amount: BigNumber | string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Lend asset to a lending pool * @param {Dapp} dapp Platform like Aave * @param {string} asset Asset * @param {BigNumber | string} amount Amount of asset to lend * @param {number} referralCode Code from Aave referral program * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ lend(dapp: Dapp, asset: string, amount: BigNumber | string, referralCode?: number, options?: any, sdkOptions?: SDKOptions): Promise; /** * Lend asset to a Compound V3 or Fluid lending pool * @param {string} market Address of cToken or fToken * @param {string} asset Asset * @param {BigNumber | string} amount Amount of asset to lend * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ lendCompoundV3(market: string, asset: string, amount: BigNumber | string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Withdraw asset from a lending pool * @param {Dapp} dapp Platform like Aave * @param {string} asset Asset * @param {BigNumber | string} amount Amount of asset to lend * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ withdrawDeposit(dapp: Dapp, asset: string, amount: BigNumber | string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Withdraw asset from a Compound V3 or Fluid lending pool * @param {string} market Address of cToken or fToken * @param {string} asset Asset * @param {BigNumber | string} amount Amount of asset to withdraw * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ withdrawCompoundV3(market: string, asset: string, amount: BigNumber | string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Borrow asset from a lending pool * @param {Dapp} dapp Platform like Aave * @param {string} asset Asset * @param {BigNumber | string} amount Amount of asset to lend * @param {number} referralCode Code from Aave referral program * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ borrow(dapp: Dapp, asset: string, amount: BigNumber | string, referralCode?: number, options?: any, sdkOptions?: SDKOptions): Promise; /** * Repays borrowed asset to a lending pool * @param {Dapp} dapp Platform like Aave * @param {string} asset Asset * @param {BigNumber | string} amount Amount of asset to lend * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ repay(dapp: Dapp, asset: string, amount: BigNumber | string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Claim rewards of staked liquidity pool tokens * @param {Dapp} dapp Platform like Sushiswap or Uniswap * @param {string} asset Liquidity pool token * @param {any} options Transaction option * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ harvestRewards(dapp: Dapp, asset: string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Change enabled pool assets * @param {AssetEnabled[]} assets New pool assets * @param {any} options Transaction options * @param {boolean} estimateGas Simulate/estimate gas * @returns {Promise} Transaction */ changeAssets(assets: AssetEnabled[], options?: any, estimateGas?: boolean): Promise; /** * Set a new trader with trading permissions * @param {string} trader Address trader account * @param {any} options Transaction options * @param {boolean} estimateGas Simulate/estimate gas * @returns {Promise} Transaction */ setTrader(trader: string, options?: any, estimateGas?: boolean): Promise; /** * Sets a pool private or public * @param {boolean} _private True for private, false for public * @param {any} options Transaction options * @param {boolean} estimateGas Simulate/estimate gas * @returns {Promise} Transaction */ setPrivate(_private: boolean, options?: any, estimateGas?: boolean): Promise; /** * Sets max supply cap for a pool * @param {BigNumberish} _maxSupplyCapD18 Max supply cap with 18 decimals * @param {any} options Transaction options * @param {boolean} estimateGas Simulate/estimate gas * @returns {Promise} Transaction */ setMaxCap(_maxSupplyCapD18: BigNumberish, options?: any, estimateGas?: boolean): Promise; /** * Invest into a Balancer pool * @param {string} poolId Balancer pool id * @param {string[] | } assetsIn Array of balancer pool assets * @param {BigNumber[] | string[]} amountsIn Array of maximum amounts to provide to pool * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ joinBalancerPool(poolId: string, assets: string[], amountsIn: string[] | BigNumber[], options?: any, sdkOptions?: SDKOptions): Promise; /** * Exit a Balancer pool * @param {string} poolId Balancer pool id * @param {string[]} assets Array of balancer pool assets * @param {BigNumber | string} amount Amount of pool tokens to withdraw * @param {null | number} singleExitAssetIndex Index of asset to withdraw to * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ exitBalancerPool(poolId: string, assets: string[], amount: string | BigNumber, singleExitAssetIndex?: number | null, options?: any, sdkOptions?: SDKOptions): Promise; /** * Claim rewards from Aave platform * @param {string[]} assets Aave tokens (deposit/debt) hold by pool * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ harvestAaveRewards(assets: string[], options?: any, sdkOptions?: SDKOptions): Promise; /** * Claim rewards from Aave platform * @param {string[]} assets Assets invested in Aave * @param {string} rewardAssets Reward token address * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ harvestAaveV3Rewards(assets: string[], rewardAsset: string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Claim rewards from CompoundV3 * @param {string} asset Compound lending asset * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ harvestCompoundV3Rewards(asset: string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Create UniswapV3 liquidity pool * @param {dapp} Platform UniswapV3, VelodromeCL, AerodromeCL or RamesesCL * @param {string} assetA First asset * @param {string} assetB Second asset * @param {BigNumber | string} amountA Amount first asset * @param {BigNumber | string} amountB Amount second asset * @param { number } minPrice Lower price range (assetB per assetA) * @param { number } maxPrice Upper price range (assetB per assetA) * @param { number } minTick Lower tick range * @param { number } maxTick Upper tick range * @param { number } feeAmountOrTickSpacing Fee tier UniswapV3 or tick spacing VelodromeCL * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ addLiquidityUniswapV3(dapp: Dapp.UNISWAPV3 | Dapp.VELODROMECL | Dapp.AERODROMECL | Dapp.PANCAKECL, assetA: string, assetB: string, amountA: BigNumber | string, amountB: BigNumber | string, minPrice: number | null, maxPrice: number | null, minTick: number | null, maxTick: number | null, feeAmountOrTickSpacing: number, options?: any, sdkOptions?: SDKOptions): Promise; /** * Remove liquidity from an UniswapV3 or Arrakis liquidity pool * @param {Dapp} dapp Platform either UniswapV3 or Arrakis * @param {string} tokenId Token Id of UniswapV3 position * @param {number} amount Amount in percent of assets to be removed * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ decreaseLiquidity(dapp: Dapp, tokenId: string, amount?: number, options?: any, sdkOptions?: SDKOptions): Promise; /** * Increase liquidity of an UniswapV, VelodromeCL or Arrakis liquidity pool * @param {Dapp} dapp Platform either UniswapV3 or Arrakis * @param {string} tokenId Token Id of UniswapV3 position * @param {BigNumber | string} amountA Amount first asset * @param {BigNumber | string} amountB Amount second asset * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ increaseLiquidity(dapp: Dapp, tokenId: string, amountA: BigNumber | string, amountB: BigNumber | string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Claim fees of an UniswapV3 liquidity or Arrakis pool * @param {Dapp} dapp Platform either UniswapV3 or Arrakis * @param {string} tokenId Token Id of UniswapV3 or Gauge address * @param {any} options Transaction option * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ claimFees(dapp: Dapp, tokenId: string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Add liquidity to Velodrome pool * @param {string} assetA First asset * @param {string} assetB Second asset * @param {BigNumber | string} amountA Amount first asset * @param {BigNumber | string} amountB Amount second asset * @param { boolean } isStable Is stable pool * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ addLiquidityVelodrome(assetA: string, assetB: string, amountA: BigNumber | string, amountB: BigNumber | string, isStable: boolean, options?: any, sdkOptions?: SDKOptions): Promise; /** * Remove liquidity from Velodrome pool * @param {string} assetA First asset * @param {string} assetB Second asset * @param {BigNumber | string} amount Amount of LP tokens * @param { boolean } isStable Is stable pool * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ removeLiquidityVelodrome(assetA: string, assetB: string, amount: BigNumber | string, isStable: boolean, options?: any, sdkOptions?: SDKOptions): Promise; /** * Add liquidity to Velodrome V2 pool * @param {string} assetA First asset * @param {string} assetB Second asset * @param {BigNumber | string} amountA Amount first asset * @param {BigNumber | string} amountB Amount second asset * @param { boolean } isStable Is stable pool * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ addLiquidityVelodromeV2(assetA: string, assetB: string, amountA: BigNumber | string, amountB: BigNumber | string, isStable: boolean, options?: any, sdkOptions?: SDKOptions): Promise; /** * Remove liquidity from Velodrome V2 pool * @param {string} assetA First asset * @param {string} assetB Second asset * @param {BigNumber | string} amount Amount of LP tokens * @param { boolean } isStable Is stable pool * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ removeLiquidityVelodromeV2(assetA: string, assetB: string, amount: BigNumber | string, isStable: boolean, options?: any, sdkOptions?: SDKOptions): Promise; /** * Add liquidity to Velodrome V2 or Aerodrome pool * @param {Dapp} dapp VelodromeV2 or Aerodrome * @param {string} assetA First asset * @param {string} assetB Second asset * @param {BigNumber | string} amountA Amount first asset * @param {BigNumber | string} amountB Amount second asset * @param { boolean } isStable Is stable pool * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ addLiquidityV2(dapp: Dapp.VELODROMEV2 | Dapp.AERODROME, assetA: string, assetB: string, amountA: BigNumber | string, amountB: BigNumber | string, isStable: boolean, options?: any, sdkOptions?: SDKOptions): Promise; /** * Remove liquidity from Velodrome V2 or Aerodrome pool * @param {Dapp} dapp VelodromeV2 or Aerodrome * @param {string} assetA First asset * @param {string} assetB Second asset * @param {BigNumber | string} amount Amount of LP tokens * @param { boolean } isStable Is stable pool * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ removeLiquidityV2(dapp: Dapp.VELODROMEV2 | Dapp.AERODROME, assetA: string, assetB: string, amount: BigNumber | string, isStable: boolean, options?: any, sdkOptions?: SDKOptions): Promise; /** * Trade options on lyra * @param {LyraOptionMarket} market Underlying market e.g. eth * @param {number} expiry Expiry timestamp * @param { number} strike Strike price * @param {LyraOptionType} optionType Call or put * @param { LyraTradeType} tradeType By or sell * @param {BigNumber | string } optionAmount Option amount * @param {string } assetIn Asset to invest * @param {BigNumber | string } collateralChangeAmount Collateral amount to add when shorting options and to remove when covering shorts * @param {boolean} isCoveredCall Selling covered call options * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ tradeLyraOption(market: LyraOptionMarket, expiry: number, strike: number, optionType: LyraOptionType, tradeType: LyraTradeType, optionAmount: BigNumber | string, assetIn: string, collateralChangeAmount?: BigNumber | string, isCoveredCall?: boolean, options?: any, sdkOptions?: SDKOptions): Promise; /** * Gets Lyra option positions * @returns {Promise} Transaction */ getLyraPositions(market: LyraOptionMarket): Promise; /** * mintManagerFee * @param {any} options Transaction options * @param {boolean} estimateGas Simulate/estimate gas * @returns {Promise} Transaction */ mintManagerFee(options?: any, estimateGas?: boolean): Promise; /** * getAvailableManagerFee * @returns {Promise} fee */ getAvailableManagerFee(): Promise; /** deposit rETH to mint UNIT via the Flat Money protocol * * @param { BigNumber | string } depositAmount Amount of rETH to deposit * @param { number } slippage slippage, 0.5 represents 0.5% * @param { number | null } maxKeeperFeeInUsd 5 represents $5; null will skip the maxKeeperFee check * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ mintUnitViaFlatMoney(depositAmount: ethers.BigNumber | string, slippage: number | undefined, maxKeeperFeeInUsd: number | null, options?: any, sdkOptions?: SDKOptions): Promise; /** redeem UNIT via the Flat Money protocol * * @param { BigNumber | string } depositAmount Amount of UNIT to withdraw * @param { number } slippage slippage, 0.5 represents 0.5% * @param { number | null } maxKeeperFeeInUsd 5 represents $5; null will skip the maxKeeperFee check * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ redeemUnitViaFlatMoney(withdrawAmount: ethers.BigNumber | string, slippage: number | undefined, maxKeeperFeeInUsd: number | null, options?: any, sdkOptions?: SDKOptions): Promise; /** * Cancel a previously announced FlatMoney order (mint/redeem UNIT) before it executes * @param {any} options Transaction options * @param {boolean} estimateGas Simulate/estimate gas instead of sending * @returns {Promise} Transaction */ cancelOrderViaFlatMoney(options?: any, estimateGas?: boolean): Promise; /** * Complete a Toros withdrawal to a single asset * @param {string} destinationToken Address of destination asset * @param {number} slippage Slippage tolerance in % * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @param {any} trackedAssets Tracked assets information (only for tx data generation) * @returns {Promise} Transaction */ completeTorosWithdrawal(destinationToken: string, slippage?: number, options?: any, sdkOptions?: SDKOptions, trackedAssets?: TrackedAsset[]): Promise; /** * Mint PT and YT tokens on Pendle * @param {string} assetFrom Asset to mint from (only underlying asset) * @param {string} pt PT address * @param {BigNumber | string} amountIn Amount underlying asset * @param {number} slippage Slippage tolerance in % * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ mintPendle(assetFrom: string, pt: string, amountIn: BigNumber | string, slippage?: number, options?: any, sdkOptions?: SDKOptions): Promise; /** Deposit USDC from EVM to a HyperCore trading dex via the CoreDepositWallet. * This bridges USDC on-chain to Hyperliquid for perp/spot trading. * * @param {BigNumber | string} amount USDC amount to deposit (6 decimals, e.g. "1000000" = 1 USDC) * @param {number} dexId Destination dex ID where USDC will be available (default 0) * - 0: Core Perp dex (standard perps like BTC, ETH) * - 1: xyz HIP-3 dex (builder perps like TSLA, GOLD) * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ depositHyperliquid(amount: BigNumber | string, dexId?: number, options?: any, sdkOptions?: SDKOptions): Promise; /** Move USDC from a HyperCore trading dex to the Spot wallet. * Required before calling withdrawHyperliquid() to bridge USDC back to EVM. * * @param {number} dexId Source dex ID where USDC currently sits * - 0: Core Perp dex (standard perps like BTC, ETH) * - 1: xyz HIP-3 dex (builder perps like TSLA, GOLD) * @param {BigNumber | string} amount USDC amount to transfer (6 decimals, e.g. "1000000" = 1 USDC) * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ perpToSpotHyperliquid(dexId: number, amount: BigNumber | string, options?: any, sdkOptions?: SDKOptions): Promise; /** Move USDC from HyperCore spot wallet to a trading dex. * * @param {number} dexId Destination dex ID where USDC will be moved to * - 0: Core Perp dex (standard perps like BTC, ETH) * - 1: xyz HIP-3 dex (builder perps like TSLA, GOLD) * @param {BigNumber | string} amount USDC amount to transfer (6 decimals, e.g. "1000000" = 1 USDC) * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ spotToPerpHyperliquid(dexId: number, amount: BigNumber | string, options?: any, sdkOptions?: SDKOptions): Promise; /** Withdraw USDC from Hyperliquid Spot wallet back to EVM. * USDC must be in the Spot wallet first — use perpToSpotHyperliquid() to move it from a trading dex. * * @param {BigNumber | string} amount USDC amount to withdraw (6 decimals, e.g. "1000000" = 1 USDC) * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ withdrawHyperliquid(amount: BigNumber | string, options?: any, sdkOptions?: SDKOptions): Promise; /** Open a market order on Hyperliquid * @param {number} assetId Asset id * @param {boolean} isLong Long or short (Note: Spot assets only support long positions) * @param {number} value Order value in base asset units (positive for opening/increasing, * negative for closing/reducing or selling spot) * @param {number } slippage Slippage tolerance in % * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ openMarketOrderHyperliquid(assetId: number, isLong: boolean, value: number, slippage?: number, options?: any, sdkOptions?: SDKOptions): Promise; /** Close a position on Hyperliquid * @param {number} assetId Asset id * @param {number} percentageToClose Percentage of position to close (0-100) * @param {number } slippage Slippage tolerance in % * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ closePositionHyperliquid(assetId: number, percentageToClose?: number, slippage?: number, options?: any, sdkOptions?: SDKOptions): Promise; /** * Approve the Toros vault token for the PoolLimitOrderManager * Must be called before createTorosLimitOrder * @param {string} vaultAddress Address of the Toros vault token to approve * @param {BigNumber | string} amount Amount to approve * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ approveTorosLimitOrder(vaultAddress: string, amount: BigNumber | string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Create a Toros limit order (stop-loss / take-profit) * @param {string} vaultAddress Address of the Toros vault token * @param {BigNumber | string} amount Vault token amount (18 decimals) * @param {BigNumber | string | null | undefined} stopLossPriceD18 Stop-loss price in D18 (0 or null/undefined = disabled) * @param {BigNumber | string | null | undefined} takeProfitPriceD18 Take-profit price in D18 (MaxUint256 or null/undefined = disabled) * @param {string} pricingAsset Address of the pricing asset (e.g. USDC) * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ createTorosLimitOrder(vaultAddress: string, amount: BigNumber | string, stopLossPriceD18: BigNumber | string | null | undefined, takeProfitPriceD18: BigNumber | string | null | undefined, pricingAsset: string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Modify an existing Toros limit order * @param {string} vaultAddress Address of the Toros vault token * @param {BigNumber | string} amount New vault token amount (18 decimals) * @param {BigNumber | string | null | undefined} stopLossPriceD18 New stop-loss price in D18 (0 or null/undefined = disabled) * @param {BigNumber | string | null | undefined} takeProfitPriceD18 New take-profit price in D18 (MaxUint256 or null/undefined = disabled) * @param {string} pricingAsset Address of the pricing asset * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ modifyTorosLimitOrder(vaultAddress: string, amount: BigNumber | string, stopLossPriceD18: BigNumber | string | null | undefined, takeProfitPriceD18: BigNumber | string | null | undefined, pricingAsset: string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Delete an existing Toros limit order * @param {string} vaultAddress Address of the Toros vault token * @param {any} options Transaction options * @param {SDKOptions} sdkOptions SDK options including estimateGas * @returns {Promise} Transaction */ deleteTorosLimitOrder(vaultAddress: string, options?: any, sdkOptions?: SDKOptions): Promise; /** * Fetch a Toros limit order for a given user and vault * @param {string} userAddress Address of the order owner (the dHEDGE pool) * @param {string} vaultAddress Address of the Toros vault token * @returns {Promise} Order info, or null if none exists */ getTorosLimitOrder(userAddress: string, vaultAddress: string): Promise; /** * Check whether an active Toros limit order exists for a given user and vault * @param {string} userAddress Address of the order owner (the dHEDGE pool) * @param {string} vaultAddress Address of the Toros vault token * @returns {Promise} */ hasActiveTorosLimitOrder(userAddress: string, vaultAddress: string): Promise; }