@myx-trade/sdk 1.0.4-beta.2 → 1.0.4-beta.3

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/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as viem from 'viem';
2
- import { zeroAddress, Address as Address$2, Account as Account$1, WalletClient, PublicClient, Abi } from 'viem';
2
+ import { zeroAddress, Address as Address$2, WalletClient, PublicClient, Abi } from 'viem';
3
3
  export { parseUnits } from 'viem';
4
4
  import { Options, Event } from 'reconnecting-websocket';
5
5
  import { WretchOptions } from 'wretch/types';
@@ -1316,17 +1316,11 @@ interface MyxClientConfig {
1316
1316
  chainId: number;
1317
1317
  /** ethers v5/v6 Signer, viem WalletClient, or ISigner. Use walletClient when app uses viem to avoid ethers in bundle. */
1318
1318
  signer?: SignerLike;
1319
- seamlessAccount?: {
1320
- masterAddress: string;
1321
- wallet: Account$1 | null;
1322
- authorized: boolean;
1323
- };
1324
1319
  walletClient?: WalletClient;
1325
1320
  brokerAddress: string;
1326
1321
  isTestnet?: boolean;
1327
1322
  isBetaMode?: boolean;
1328
1323
  poolingInterval?: number;
1329
- seamlessMode?: boolean;
1330
1324
  socketConfig?: Partial<Omit<WebSocketConfig, "url">>;
1331
1325
  logLevel?: LogLevel;
1332
1326
  getAccessToken?: (() => Promise<AccessTokenResponse | undefined>) | (() => AccessTokenResponse | undefined);
@@ -1345,12 +1339,6 @@ declare class ConfigManager {
1345
1339
  getSignerAddress(chainId: number): Promise<string>;
1346
1340
  /** Returns viem WalletClient for the chain (for readContract/writeContract). Use when SDK uses viem. */
1347
1341
  getViemWalletClient(chainId: number): Promise<WalletClient>;
1348
- startSeamlessMode(open: boolean): Promise<MyxClientConfig>;
1349
- updateSeamlessWallet({ wallet, authorized, masterAddress, }: {
1350
- wallet?: Account$1 | null;
1351
- authorized?: boolean;
1352
- masterAddress?: string;
1353
- }): void;
1354
1342
  updateClientChainId(chainId: number, brokerAddress: string): void;
1355
1343
  auth(params: Pick<MyxClientConfig, "signer" | "walletClient" | "getAccessToken">): void;
1356
1344
  private validateConfig;
@@ -1502,7 +1490,7 @@ declare class Utils {
1502
1490
  code: number;
1503
1491
  message: string;
1504
1492
  }>;
1505
- getUserTradingFeeRate(assetClass: number, riskTier: number, chainId: number): Promise<{
1493
+ getUserTradingFeeRate(assetClass: number, riskTier: number, chainId: number, userAddress?: string): Promise<{
1506
1494
  code: 0;
1507
1495
  data: {
1508
1496
  takerFeeRate: string;
@@ -1533,7 +1521,6 @@ declare class Utils {
1533
1521
  }[]>;
1534
1522
  transferKlineResolutionToInterval(resolution: KlineResolution): HttpKlineIntervalEnum;
1535
1523
  getErrorMessage(error: any, fallbackErrorMessage?: string): Promise<any>;
1536
- checkSeamlessGas(userAddress: string, chainId: number): Promise<boolean>;
1537
1524
  getLiquidityInfo({ chainId, poolId, marketPrice, }: {
1538
1525
  chainId: number;
1539
1526
  poolId: string;
@@ -1890,13 +1877,6 @@ declare class Api extends Request {
1890
1877
  getHistoryOrders({ accessToken, address, ...params }: GetHistoryOrdersParams & AccessTokenRequest): Promise<ApiResponse<HistoryOrderItem[]>>;
1891
1878
  getPositionHistory({ accessToken, address, ...params }: GetHistoryOrdersParams & AccessTokenRequest): Promise<ApiResponse<PositionHistoryItem[]>>;
1892
1879
  getMarketList(): Promise<ApiResponse<MarketInfo[]>>;
1893
- getAccountVipInfo({ address, accessToken, chainId, deadline, nonce, }: {
1894
- address: string;
1895
- accessToken: string;
1896
- chainId: number;
1897
- deadline: number;
1898
- nonce: string;
1899
- }): Promise<ApiResponse<any>>;
1900
1880
  /**
1901
1881
  * appeal module start ------>
1902
1882
  */
@@ -2020,10 +2000,6 @@ declare class Account {
2020
2000
  data: any;
2021
2001
  }>;
2022
2002
  updateAndWithdraw(receiver: string, poolId: string, isQuoteToken: boolean, amount: string, chainId: number): Promise<{
2023
- code: number;
2024
- message: string;
2025
- data: ApiResponse<any>;
2026
- } | {
2027
2003
  code: number;
2028
2004
  data: viem.TransactionReceipt;
2029
2005
  message?: undefined;
@@ -2037,10 +2013,6 @@ declare class Account {
2037
2013
  tokenAddress: string;
2038
2014
  chainId: number;
2039
2015
  }): Promise<{
2040
- code: number;
2041
- message: string;
2042
- data: ApiResponse<any>;
2043
- } | {
2044
2016
  code: number;
2045
2017
  data: viem.TransactionReceipt;
2046
2018
  message?: undefined;
@@ -2078,15 +2050,6 @@ declare class Account {
2078
2050
  message: string;
2079
2051
  data?: undefined;
2080
2052
  }>;
2081
- getAccountVipInfoByBackend(address: string, chainId: number, deadline: number, nonce: string): Promise<{
2082
- code: number;
2083
- data: any;
2084
- message?: undefined;
2085
- } | {
2086
- code: number;
2087
- message: string;
2088
- data?: undefined;
2089
- }>;
2090
2053
  setUserFeeData(address: string, chainId: number, deadline: number, params: {
2091
2054
  tier: number;
2092
2055
  referrer: string;
@@ -2094,10 +2057,6 @@ declare class Account {
2094
2057
  referrerRebatePct: number;
2095
2058
  nonce: string;
2096
2059
  }, signature: string): Promise<{
2097
- code: number;
2098
- data: ApiResponse<any>;
2099
- message?: undefined;
2100
- } | {
2101
2060
  code: number;
2102
2061
  data: viem.TransactionReceipt;
2103
2062
  message?: undefined;
@@ -2126,7 +2085,7 @@ declare class Seamless {
2126
2085
  r: `0x${string}`;
2127
2086
  s: `0x${string}`;
2128
2087
  }[]>;
2129
- forwarderTx({ from, to, value, gas, deadline, data, nonce, }: {
2088
+ forwarderTx({ from, to, value, gas, deadline, data, nonce, forwardFeeToken, }: {
2130
2089
  from: string;
2131
2090
  to: string;
2132
2091
  value: string;
@@ -2134,11 +2093,13 @@ declare class Seamless {
2134
2093
  deadline: number;
2135
2094
  data: string;
2136
2095
  nonce: string;
2096
+ forwardFeeToken: string;
2137
2097
  }, chainId: number, walletClient?: Awaited<ReturnType<typeof getWalletClient>>): Promise<ApiResponse<any>>;
2138
- authorizeSeamlessAccount({ approve, seamlessAddress, chainId }: {
2098
+ authorizeSeamlessAccount({ approve, seamlessAddress, chainId, forwardFeeToken }: {
2139
2099
  approve: boolean;
2140
2100
  seamlessAddress: string;
2141
2101
  chainId: number;
2102
+ forwardFeeToken: string;
2142
2103
  }): Promise<{
2143
2104
  code: number;
2144
2105
  data: {
@@ -2151,66 +2112,6 @@ declare class Seamless {
2151
2112
  data: null;
2152
2113
  message: string;
2153
2114
  }>;
2154
- unLockSeamlessWallet({ masterAddress, password, apiKey, chainId }: {
2155
- masterAddress: string;
2156
- password: string;
2157
- apiKey: string;
2158
- chainId: number;
2159
- }): Promise<{
2160
- code: number;
2161
- data: {
2162
- masterAddress: string;
2163
- seamlessAccount: `0x${string}`;
2164
- authorized: any;
2165
- };
2166
- }>;
2167
- exportSeamlessPrivateKey({ password, apiKey }: {
2168
- password: string;
2169
- apiKey: string;
2170
- }): Promise<{
2171
- code: number;
2172
- data: {
2173
- privateKey: string;
2174
- };
2175
- }>;
2176
- importSeamlessPrivateKey({ privateKey, password, chainId }: {
2177
- privateKey: string;
2178
- password: string;
2179
- chainId: number;
2180
- }): Promise<{
2181
- code: number;
2182
- data: {
2183
- masterAddress: any;
2184
- seamlessAccount: `0x${string}`;
2185
- authorized: any;
2186
- apiKey: string;
2187
- };
2188
- }>;
2189
- startSeamlessMode({ open }: {
2190
- open: boolean;
2191
- }): Promise<{
2192
- code: number;
2193
- data: {
2194
- open: boolean;
2195
- };
2196
- }>;
2197
- createSeamless({ password, chainId }: {
2198
- password: string;
2199
- chainId: number;
2200
- }): Promise<{
2201
- code: number;
2202
- data: {
2203
- masterAddress: `0x${string}`;
2204
- seamlessAccount: `0x${string}`;
2205
- authorized: any;
2206
- apiKey: string;
2207
- };
2208
- message?: undefined;
2209
- } | {
2210
- code: number;
2211
- message: string;
2212
- data?: undefined;
2213
- }>;
2214
2115
  }
2215
2116
 
2216
2117
  declare class Position {
@@ -2242,10 +2143,6 @@ declare class Position {
2242
2143
  chainId: number;
2243
2144
  address: string;
2244
2145
  }): Promise<{
2245
- code: number;
2246
- message: string;
2247
- data: ApiResponse<any>;
2248
- } | {
2249
2146
  code: number;
2250
2147
  data: {
2251
2148
  hash: any;
@@ -2283,10 +2180,6 @@ declare class Order {
2283
2180
  private api;
2284
2181
  constructor(configManager: ConfigManager, logger: Logger, utils: Utils, seamless: Seamless, account: Account, api: Api);
2285
2182
  createIncreaseOrder(params: PlaceOrderParams, tradingFee: string, marketId: string): Promise<{
2286
- code: number;
2287
- message: string;
2288
- data: ApiResponse<any>;
2289
- } | {
2290
2183
  code: number;
2291
2184
  message: string;
2292
2185
  data: {
@@ -2305,17 +2198,6 @@ declare class Order {
2305
2198
  data?: undefined;
2306
2199
  }>;
2307
2200
  closeAllPositions(chainId: number, params: PlaceOrderParams[]): Promise<{
2308
- code: number;
2309
- message: string;
2310
- data: ApiResponse<any>;
2311
- transactionHash?: undefined;
2312
- blockNumber?: undefined;
2313
- gasUsed?: undefined;
2314
- status?: undefined;
2315
- confirmations?: undefined;
2316
- timestamp?: undefined;
2317
- receipt?: undefined;
2318
- } | {
2319
2201
  code: number;
2320
2202
  message: string;
2321
2203
  transactionHash: any;
@@ -2325,11 +2207,9 @@ declare class Order {
2325
2207
  confirmations: number;
2326
2208
  timestamp: number;
2327
2209
  receipt: viem.TransactionReceipt;
2328
- data?: undefined;
2329
2210
  } | {
2330
2211
  code: number;
2331
2212
  message: any;
2332
- data?: undefined;
2333
2213
  transactionHash?: undefined;
2334
2214
  blockNumber?: undefined;
2335
2215
  gasUsed?: undefined;
@@ -2339,10 +2219,6 @@ declare class Order {
2339
2219
  receipt?: undefined;
2340
2220
  }>;
2341
2221
  createDecreaseOrder(params: PlaceOrderParams): Promise<{
2342
- code: number;
2343
- message: string;
2344
- data: ApiResponse<any>;
2345
- } | {
2346
2222
  code: number;
2347
2223
  message: string;
2348
2224
  data: {
@@ -2361,10 +2237,6 @@ declare class Order {
2361
2237
  data?: undefined;
2362
2238
  }>;
2363
2239
  createPositionTpSlOrder(params: PositionTpSlOrderParams): Promise<{
2364
- code: number;
2365
- message: string;
2366
- data: ApiResponse<any>;
2367
- } | {
2368
2240
  code: number;
2369
2241
  message: string;
2370
2242
  data: {
@@ -2383,37 +2255,18 @@ declare class Order {
2383
2255
  data?: undefined;
2384
2256
  }>;
2385
2257
  cancelAllOrders(orderIds: string[], chainId: ChainId): Promise<{
2386
- code: number;
2387
- message: string;
2388
- data: ApiResponse<any>;
2389
- } | {
2390
2258
  code: number;
2391
2259
  message: any;
2392
- data?: undefined;
2393
2260
  }>;
2394
2261
  cancelOrder(orderId: string, chainId: ChainId): Promise<{
2395
- code: number;
2396
- message: string;
2397
- data: ApiResponse<any>;
2398
- } | {
2399
2262
  code: number;
2400
2263
  message: any;
2401
- data?: undefined;
2402
2264
  }>;
2403
2265
  cancelOrders(orderIds: string[], chainId: ChainId): Promise<{
2404
- code: number;
2405
- message: string;
2406
- data: ApiResponse<any>;
2407
- } | {
2408
2266
  code: number;
2409
2267
  message: any;
2410
- data?: undefined;
2411
2268
  }>;
2412
2269
  updateOrderTpSl(params: UpdateOrderParams, quoteAddress: string, chainId: number, address: string, marketId: string, isTpSlOrder?: boolean): Promise<{
2413
- code: number;
2414
- message: string;
2415
- data: ApiResponse<any>;
2416
- } | {
2417
2270
  code: number;
2418
2271
  data: viem.TransactionReceipt;
2419
2272
  message: string;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as viem from 'viem';
2
- import { zeroAddress, Address as Address$2, Account as Account$1, WalletClient, PublicClient, Abi } from 'viem';
2
+ import { zeroAddress, Address as Address$2, WalletClient, PublicClient, Abi } from 'viem';
3
3
  export { parseUnits } from 'viem';
4
4
  import { Options, Event } from 'reconnecting-websocket';
5
5
  import { WretchOptions } from 'wretch/types';
@@ -1316,17 +1316,11 @@ interface MyxClientConfig {
1316
1316
  chainId: number;
1317
1317
  /** ethers v5/v6 Signer, viem WalletClient, or ISigner. Use walletClient when app uses viem to avoid ethers in bundle. */
1318
1318
  signer?: SignerLike;
1319
- seamlessAccount?: {
1320
- masterAddress: string;
1321
- wallet: Account$1 | null;
1322
- authorized: boolean;
1323
- };
1324
1319
  walletClient?: WalletClient;
1325
1320
  brokerAddress: string;
1326
1321
  isTestnet?: boolean;
1327
1322
  isBetaMode?: boolean;
1328
1323
  poolingInterval?: number;
1329
- seamlessMode?: boolean;
1330
1324
  socketConfig?: Partial<Omit<WebSocketConfig, "url">>;
1331
1325
  logLevel?: LogLevel;
1332
1326
  getAccessToken?: (() => Promise<AccessTokenResponse | undefined>) | (() => AccessTokenResponse | undefined);
@@ -1345,12 +1339,6 @@ declare class ConfigManager {
1345
1339
  getSignerAddress(chainId: number): Promise<string>;
1346
1340
  /** Returns viem WalletClient for the chain (for readContract/writeContract). Use when SDK uses viem. */
1347
1341
  getViemWalletClient(chainId: number): Promise<WalletClient>;
1348
- startSeamlessMode(open: boolean): Promise<MyxClientConfig>;
1349
- updateSeamlessWallet({ wallet, authorized, masterAddress, }: {
1350
- wallet?: Account$1 | null;
1351
- authorized?: boolean;
1352
- masterAddress?: string;
1353
- }): void;
1354
1342
  updateClientChainId(chainId: number, brokerAddress: string): void;
1355
1343
  auth(params: Pick<MyxClientConfig, "signer" | "walletClient" | "getAccessToken">): void;
1356
1344
  private validateConfig;
@@ -1502,7 +1490,7 @@ declare class Utils {
1502
1490
  code: number;
1503
1491
  message: string;
1504
1492
  }>;
1505
- getUserTradingFeeRate(assetClass: number, riskTier: number, chainId: number): Promise<{
1493
+ getUserTradingFeeRate(assetClass: number, riskTier: number, chainId: number, userAddress?: string): Promise<{
1506
1494
  code: 0;
1507
1495
  data: {
1508
1496
  takerFeeRate: string;
@@ -1533,7 +1521,6 @@ declare class Utils {
1533
1521
  }[]>;
1534
1522
  transferKlineResolutionToInterval(resolution: KlineResolution): HttpKlineIntervalEnum;
1535
1523
  getErrorMessage(error: any, fallbackErrorMessage?: string): Promise<any>;
1536
- checkSeamlessGas(userAddress: string, chainId: number): Promise<boolean>;
1537
1524
  getLiquidityInfo({ chainId, poolId, marketPrice, }: {
1538
1525
  chainId: number;
1539
1526
  poolId: string;
@@ -1890,13 +1877,6 @@ declare class Api extends Request {
1890
1877
  getHistoryOrders({ accessToken, address, ...params }: GetHistoryOrdersParams & AccessTokenRequest): Promise<ApiResponse<HistoryOrderItem[]>>;
1891
1878
  getPositionHistory({ accessToken, address, ...params }: GetHistoryOrdersParams & AccessTokenRequest): Promise<ApiResponse<PositionHistoryItem[]>>;
1892
1879
  getMarketList(): Promise<ApiResponse<MarketInfo[]>>;
1893
- getAccountVipInfo({ address, accessToken, chainId, deadline, nonce, }: {
1894
- address: string;
1895
- accessToken: string;
1896
- chainId: number;
1897
- deadline: number;
1898
- nonce: string;
1899
- }): Promise<ApiResponse<any>>;
1900
1880
  /**
1901
1881
  * appeal module start ------>
1902
1882
  */
@@ -2020,10 +2000,6 @@ declare class Account {
2020
2000
  data: any;
2021
2001
  }>;
2022
2002
  updateAndWithdraw(receiver: string, poolId: string, isQuoteToken: boolean, amount: string, chainId: number): Promise<{
2023
- code: number;
2024
- message: string;
2025
- data: ApiResponse<any>;
2026
- } | {
2027
2003
  code: number;
2028
2004
  data: viem.TransactionReceipt;
2029
2005
  message?: undefined;
@@ -2037,10 +2013,6 @@ declare class Account {
2037
2013
  tokenAddress: string;
2038
2014
  chainId: number;
2039
2015
  }): Promise<{
2040
- code: number;
2041
- message: string;
2042
- data: ApiResponse<any>;
2043
- } | {
2044
2016
  code: number;
2045
2017
  data: viem.TransactionReceipt;
2046
2018
  message?: undefined;
@@ -2078,15 +2050,6 @@ declare class Account {
2078
2050
  message: string;
2079
2051
  data?: undefined;
2080
2052
  }>;
2081
- getAccountVipInfoByBackend(address: string, chainId: number, deadline: number, nonce: string): Promise<{
2082
- code: number;
2083
- data: any;
2084
- message?: undefined;
2085
- } | {
2086
- code: number;
2087
- message: string;
2088
- data?: undefined;
2089
- }>;
2090
2053
  setUserFeeData(address: string, chainId: number, deadline: number, params: {
2091
2054
  tier: number;
2092
2055
  referrer: string;
@@ -2094,10 +2057,6 @@ declare class Account {
2094
2057
  referrerRebatePct: number;
2095
2058
  nonce: string;
2096
2059
  }, signature: string): Promise<{
2097
- code: number;
2098
- data: ApiResponse<any>;
2099
- message?: undefined;
2100
- } | {
2101
2060
  code: number;
2102
2061
  data: viem.TransactionReceipt;
2103
2062
  message?: undefined;
@@ -2126,7 +2085,7 @@ declare class Seamless {
2126
2085
  r: `0x${string}`;
2127
2086
  s: `0x${string}`;
2128
2087
  }[]>;
2129
- forwarderTx({ from, to, value, gas, deadline, data, nonce, }: {
2088
+ forwarderTx({ from, to, value, gas, deadline, data, nonce, forwardFeeToken, }: {
2130
2089
  from: string;
2131
2090
  to: string;
2132
2091
  value: string;
@@ -2134,11 +2093,13 @@ declare class Seamless {
2134
2093
  deadline: number;
2135
2094
  data: string;
2136
2095
  nonce: string;
2096
+ forwardFeeToken: string;
2137
2097
  }, chainId: number, walletClient?: Awaited<ReturnType<typeof getWalletClient>>): Promise<ApiResponse<any>>;
2138
- authorizeSeamlessAccount({ approve, seamlessAddress, chainId }: {
2098
+ authorizeSeamlessAccount({ approve, seamlessAddress, chainId, forwardFeeToken }: {
2139
2099
  approve: boolean;
2140
2100
  seamlessAddress: string;
2141
2101
  chainId: number;
2102
+ forwardFeeToken: string;
2142
2103
  }): Promise<{
2143
2104
  code: number;
2144
2105
  data: {
@@ -2151,66 +2112,6 @@ declare class Seamless {
2151
2112
  data: null;
2152
2113
  message: string;
2153
2114
  }>;
2154
- unLockSeamlessWallet({ masterAddress, password, apiKey, chainId }: {
2155
- masterAddress: string;
2156
- password: string;
2157
- apiKey: string;
2158
- chainId: number;
2159
- }): Promise<{
2160
- code: number;
2161
- data: {
2162
- masterAddress: string;
2163
- seamlessAccount: `0x${string}`;
2164
- authorized: any;
2165
- };
2166
- }>;
2167
- exportSeamlessPrivateKey({ password, apiKey }: {
2168
- password: string;
2169
- apiKey: string;
2170
- }): Promise<{
2171
- code: number;
2172
- data: {
2173
- privateKey: string;
2174
- };
2175
- }>;
2176
- importSeamlessPrivateKey({ privateKey, password, chainId }: {
2177
- privateKey: string;
2178
- password: string;
2179
- chainId: number;
2180
- }): Promise<{
2181
- code: number;
2182
- data: {
2183
- masterAddress: any;
2184
- seamlessAccount: `0x${string}`;
2185
- authorized: any;
2186
- apiKey: string;
2187
- };
2188
- }>;
2189
- startSeamlessMode({ open }: {
2190
- open: boolean;
2191
- }): Promise<{
2192
- code: number;
2193
- data: {
2194
- open: boolean;
2195
- };
2196
- }>;
2197
- createSeamless({ password, chainId }: {
2198
- password: string;
2199
- chainId: number;
2200
- }): Promise<{
2201
- code: number;
2202
- data: {
2203
- masterAddress: `0x${string}`;
2204
- seamlessAccount: `0x${string}`;
2205
- authorized: any;
2206
- apiKey: string;
2207
- };
2208
- message?: undefined;
2209
- } | {
2210
- code: number;
2211
- message: string;
2212
- data?: undefined;
2213
- }>;
2214
2115
  }
2215
2116
 
2216
2117
  declare class Position {
@@ -2242,10 +2143,6 @@ declare class Position {
2242
2143
  chainId: number;
2243
2144
  address: string;
2244
2145
  }): Promise<{
2245
- code: number;
2246
- message: string;
2247
- data: ApiResponse<any>;
2248
- } | {
2249
2146
  code: number;
2250
2147
  data: {
2251
2148
  hash: any;
@@ -2283,10 +2180,6 @@ declare class Order {
2283
2180
  private api;
2284
2181
  constructor(configManager: ConfigManager, logger: Logger, utils: Utils, seamless: Seamless, account: Account, api: Api);
2285
2182
  createIncreaseOrder(params: PlaceOrderParams, tradingFee: string, marketId: string): Promise<{
2286
- code: number;
2287
- message: string;
2288
- data: ApiResponse<any>;
2289
- } | {
2290
2183
  code: number;
2291
2184
  message: string;
2292
2185
  data: {
@@ -2305,17 +2198,6 @@ declare class Order {
2305
2198
  data?: undefined;
2306
2199
  }>;
2307
2200
  closeAllPositions(chainId: number, params: PlaceOrderParams[]): Promise<{
2308
- code: number;
2309
- message: string;
2310
- data: ApiResponse<any>;
2311
- transactionHash?: undefined;
2312
- blockNumber?: undefined;
2313
- gasUsed?: undefined;
2314
- status?: undefined;
2315
- confirmations?: undefined;
2316
- timestamp?: undefined;
2317
- receipt?: undefined;
2318
- } | {
2319
2201
  code: number;
2320
2202
  message: string;
2321
2203
  transactionHash: any;
@@ -2325,11 +2207,9 @@ declare class Order {
2325
2207
  confirmations: number;
2326
2208
  timestamp: number;
2327
2209
  receipt: viem.TransactionReceipt;
2328
- data?: undefined;
2329
2210
  } | {
2330
2211
  code: number;
2331
2212
  message: any;
2332
- data?: undefined;
2333
2213
  transactionHash?: undefined;
2334
2214
  blockNumber?: undefined;
2335
2215
  gasUsed?: undefined;
@@ -2339,10 +2219,6 @@ declare class Order {
2339
2219
  receipt?: undefined;
2340
2220
  }>;
2341
2221
  createDecreaseOrder(params: PlaceOrderParams): Promise<{
2342
- code: number;
2343
- message: string;
2344
- data: ApiResponse<any>;
2345
- } | {
2346
2222
  code: number;
2347
2223
  message: string;
2348
2224
  data: {
@@ -2361,10 +2237,6 @@ declare class Order {
2361
2237
  data?: undefined;
2362
2238
  }>;
2363
2239
  createPositionTpSlOrder(params: PositionTpSlOrderParams): Promise<{
2364
- code: number;
2365
- message: string;
2366
- data: ApiResponse<any>;
2367
- } | {
2368
2240
  code: number;
2369
2241
  message: string;
2370
2242
  data: {
@@ -2383,37 +2255,18 @@ declare class Order {
2383
2255
  data?: undefined;
2384
2256
  }>;
2385
2257
  cancelAllOrders(orderIds: string[], chainId: ChainId): Promise<{
2386
- code: number;
2387
- message: string;
2388
- data: ApiResponse<any>;
2389
- } | {
2390
2258
  code: number;
2391
2259
  message: any;
2392
- data?: undefined;
2393
2260
  }>;
2394
2261
  cancelOrder(orderId: string, chainId: ChainId): Promise<{
2395
- code: number;
2396
- message: string;
2397
- data: ApiResponse<any>;
2398
- } | {
2399
2262
  code: number;
2400
2263
  message: any;
2401
- data?: undefined;
2402
2264
  }>;
2403
2265
  cancelOrders(orderIds: string[], chainId: ChainId): Promise<{
2404
- code: number;
2405
- message: string;
2406
- data: ApiResponse<any>;
2407
- } | {
2408
2266
  code: number;
2409
2267
  message: any;
2410
- data?: undefined;
2411
2268
  }>;
2412
2269
  updateOrderTpSl(params: UpdateOrderParams, quoteAddress: string, chainId: number, address: string, marketId: string, isTpSlOrder?: boolean): Promise<{
2413
- code: number;
2414
- message: string;
2415
- data: ApiResponse<any>;
2416
- } | {
2417
2270
  code: number;
2418
2271
  data: viem.TransactionReceipt;
2419
2272
  message: string;