@dhedge/v2-sdk 2.1.6 → 2.1.8

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.
package/dist/config.d.ts CHANGED
@@ -2,6 +2,7 @@ import { AddressNetworkMap, Network, AddressDappNetworkMap, LyraNetworkMap } fro
2
2
  import { NetworkChainIdMap } from ".";
3
3
  export declare const factoryAddress: AddressNetworkMap;
4
4
  export declare const routerAddress: AddressDappNetworkMap;
5
+ export declare const gpv2SettlementAddress: Partial<Record<Network, string>>;
5
6
  export declare const dappFactoryAddress: AddressDappNetworkMap;
6
7
  export declare const stakingAddress: AddressDappNetworkMap;
7
8
  export declare const aaveAddressProvider: AddressDappNetworkMap;
@@ -598,6 +598,17 @@ export declare class Pool {
598
598
  * @returns {Promise<any>} Transaction
599
599
  */
600
600
  perpToSpotHyperliquid(dexId: number, amount: BigNumber | string, options?: any, sdkOptions?: SDKOptions): Promise<any>;
601
+ /** Move USDC from HyperCore spot wallet to a trading dex.
602
+ *
603
+ * @param {number} dexId Destination dex ID where USDC will be moved to
604
+ * - 0: Core Perp dex (standard perps like BTC, ETH)
605
+ * - 1: xyz HIP-3 dex (builder perps like TSLA, GOLD)
606
+ * @param {BigNumber | string} amount USDC amount to transfer (6 decimals, e.g. "1000000" = 1 USDC)
607
+ * @param {any} options Transaction options
608
+ * @param {SDKOptions} sdkOptions SDK options including estimateGas
609
+ * @returns {Promise<any>} Transaction
610
+ */
611
+ spotToPerpHyperliquid(dexId: number, amount: BigNumber | string, options?: any, sdkOptions?: SDKOptions): Promise<any>;
601
612
  /** Withdraw USDC from Hyperliquid Spot wallet back to EVM.
602
613
  * USDC must be in the Spot wallet first — use perpToSpotHyperliquid() to move it from a trading dex.
603
614
  *
@@ -0,0 +1,10 @@
1
+ import { ethers } from "ethers";
2
+ import { Pool } from "../../entities";
3
+ export declare const KIND_SELL: string;
4
+ export declare const KIND_BUY: string;
5
+ export declare const BALANCE_ERC20: string;
6
+ export declare function getCowSwapTxData(pool: Pool, assetFrom: string, assetTo: string, amountIn: ethers.BigNumber | string, slippage: number, kind?: "sell" | "buy"): Promise<{
7
+ encodedTypedData: string;
8
+ preSignTxData: string;
9
+ minAmountOut: string;
10
+ }>;
@@ -1,6 +1,6 @@
1
1
  import { ethers } from "ethers";
2
2
  export declare const getDepositHyperliquidTxData: (dexId: number, amount: ethers.BigNumber | string) => string;
3
3
  export declare const getWithdrawSpotHyperliquidTxData: (amount: ethers.BigNumber | string) => string;
4
- export declare const getPerpToSpotHyperliquidTxData: (dexId: number, receiver: string, amount: ethers.BigNumber | string) => string;
4
+ export declare const getSendAssetHyperliquidTxData: (sourceDex: number, destinationDex: number, receiver: string, amount: ethers.BigNumber | string) => string;
5
5
  export declare const getLimitOrderHyperliquidTxData: (assetId: number, isLong: boolean, changeAmount: number, slippage: number) => Promise<string>;
6
6
  export declare const getClosePositionHyperliquidTxData: (assetId: number, percentageToClose: number, slippage: number, poolAddress: string) => Promise<string>;
package/dist/types.d.ts CHANGED
@@ -33,7 +33,8 @@ export declare enum Dapp {
33
33
  ODOS = "odos",
34
34
  PENDLE = "pendle",
35
35
  KYBERSWAP = "kyberswap",
36
- HYPERLIQUID = "hyperliquid"
36
+ HYPERLIQUID = "hyperliquid",
37
+ COWSWAP = "cowswap"
37
38
  }
38
39
  export declare enum Transaction {
39
40
  SWAP = "swapExactTokensForTokens",