@myx-trade/sdk 1.0.8-beta.9 → 1.0.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.
@@ -0,0 +1,749 @@
1
+ import * as viem from 'viem';
2
+ import { zeroAddress } from 'viem';
3
+
4
+ type Address$1 = `0x${string}` | typeof zeroAddress;
5
+ declare enum ChainId {
6
+ LINEA_SEPOLIA = 59141,
7
+ LINEA_MAINNET = 59144,
8
+ ARB_TESTNET = 421614,
9
+ ARB_MAINNET = 42161,
10
+ BSC_TESTNET = 97,
11
+ BSC_MAINNET = 56
12
+ }
13
+ interface ContractAddress {
14
+ readonly USDC: Address$1;
15
+ readonly Account: Address$1;
16
+ readonly POOL_MANAGER: Address$1;
17
+ readonly POSITION_MANAGER: Address$1;
18
+ readonly ORDER_MANAGER: Address$1;
19
+ readonly PYTH: Address$1;
20
+ readonly ERC20: Address$1;
21
+ readonly LIQUIDITY_ROUTER: Address$1;
22
+ readonly BASE_POOL: Address$1;
23
+ readonly QUOTE_POOL: Address$1;
24
+ readonly ORACLE: Address$1;
25
+ readonly EIP7702Delegation: Address$1;
26
+ readonly MARKET_MANAGER: Address$1;
27
+ readonly DATA_PROVIDER: Address$1;
28
+ readonly ORACLE_RESERVE: Address$1;
29
+ readonly FORWARDER: Address$1;
30
+ readonly REIMBURSEMENT: Address$1;
31
+ readonly DISPUTE_COURT: Address$1;
32
+ readonly TRADING_ROUTER: Address$1;
33
+ }
34
+
35
+ interface CreatePoolRequest {
36
+ chainId: ChainId;
37
+ baseToken: `0x${string}`;
38
+ marketId: string;
39
+ }
40
+ declare enum PoolType {
41
+ Base = 0,
42
+ Quote = 1
43
+ }
44
+ declare enum TriggerType$1 {
45
+ TP = 1,
46
+ SL = 2
47
+ }
48
+ interface TpSl {
49
+ amount: number;
50
+ triggerPrice: number;
51
+ triggerType: TriggerType$1;
52
+ }
53
+ interface TpSLParams {
54
+ amount: bigint;
55
+ triggerPrice: bigint;
56
+ triggerType: bigint;
57
+ minQuoteOut: bigint;
58
+ }
59
+ interface AddTpSLParams {
60
+ slippage: number;
61
+ chainId: ChainId;
62
+ poolId: string;
63
+ poolType: PoolType;
64
+ tpsl: TpSl[];
65
+ }
66
+ interface CancelTpSLParams {
67
+ chainId: ChainId;
68
+ orderId: string;
69
+ }
70
+
71
+ /**
72
+ * Trading related types and enums
73
+ */
74
+ declare const OrderType: {
75
+ readonly MARKET: 0;
76
+ readonly LIMIT: 1;
77
+ readonly STOP: 2;
78
+ readonly CONDITIONAL: 3;
79
+ };
80
+ type OrderType = (typeof OrderType)[keyof typeof OrderType];
81
+ declare const TriggerType: {
82
+ readonly NONE: 0;
83
+ readonly GTE: 1;
84
+ readonly LTE: 2;
85
+ };
86
+ type TriggerType = (typeof TriggerType)[keyof typeof TriggerType];
87
+ declare const OperationType: {
88
+ readonly INCREASE: 0;
89
+ readonly DECREASE: 1;
90
+ };
91
+ type OperationType = (typeof OperationType)[keyof typeof OperationType];
92
+ declare const Direction: {
93
+ readonly LONG: 0;
94
+ readonly SHORT: 1;
95
+ };
96
+ type Direction = (typeof Direction)[keyof typeof Direction];
97
+ declare const TimeInForce: {
98
+ readonly IOC: 0;
99
+ };
100
+ type TimeInForce = (typeof TimeInForce)[keyof typeof TimeInForce];
101
+ interface Position {
102
+ positionId: string;
103
+ poolId: string;
104
+ direction: Direction;
105
+ size: string;
106
+ collateral: string;
107
+ leverage: number;
108
+ entryPrice: string;
109
+ markPrice: string;
110
+ pnl: string;
111
+ unrealizedPnl: string;
112
+ liquidationPrice: string;
113
+ marginRatio: string;
114
+ timestamp: number;
115
+ }
116
+ interface Order {
117
+ orderId: string;
118
+ poolId: string;
119
+ positionId: string;
120
+ orderType: OrderType;
121
+ triggerType: TriggerType;
122
+ operation: OperationType;
123
+ direction: Direction;
124
+ size: string;
125
+ collateralAmount: string;
126
+ orderPrice?: string;
127
+ triggerPrice?: string;
128
+ timeInForce: TimeInForce;
129
+ postOnly: boolean;
130
+ slippagePct: string;
131
+ leverage: number;
132
+ status: OrderStatus;
133
+ createdAt: number;
134
+ updatedAt: number;
135
+ }
136
+ declare const OrderStatus: {
137
+ readonly PENDING: 0;
138
+ readonly PARTIAL: 1;
139
+ readonly FILLED: 2;
140
+ readonly CANCELLED: 3;
141
+ readonly REJECTED: 4;
142
+ readonly EXPIRED: 5;
143
+ };
144
+ type OrderStatus = (typeof OrderStatus)[keyof typeof OrderStatus];
145
+ interface PlaceOrderParams {
146
+ chainId: number;
147
+ address: string;
148
+ poolId: string;
149
+ positionId: string;
150
+ orderType: OrderType;
151
+ triggerType: TriggerType;
152
+ direction: Direction;
153
+ collateralAmount: string;
154
+ size: string;
155
+ price: string;
156
+ timeInForce: TimeInForce;
157
+ postOnly: boolean;
158
+ slippagePct: string;
159
+ executionFeeToken: string;
160
+ leverage: number;
161
+ tpSize?: string;
162
+ tpPrice?: string;
163
+ slSize?: string;
164
+ slPrice?: string;
165
+ }
166
+ interface PositionTpSlOrderParams {
167
+ chainId: number;
168
+ address: string;
169
+ poolId: string;
170
+ positionId: string;
171
+ executionFeeToken: string;
172
+ tpTriggerType: TriggerType;
173
+ slTriggerType: TriggerType;
174
+ direction: Direction;
175
+ leverage: number;
176
+ tpSize?: string;
177
+ tpPrice?: string;
178
+ slSize?: string;
179
+ slPrice?: string;
180
+ slippagePct: string;
181
+ }
182
+ interface TradingResult {
183
+ success: boolean;
184
+ orderId?: string;
185
+ transactionHash: string;
186
+ gasUsed?: string;
187
+ error?: string;
188
+ }
189
+ interface UpdateOrderTpSlParams {
190
+ orderId: string;
191
+ tpSize: string;
192
+ tpPrice: string;
193
+ slSize: string;
194
+ slPrice: string;
195
+ address: string;
196
+ executionFeeToken: string;
197
+ }
198
+
199
+ interface ObjectType<T> {
200
+ [key: string]: T;
201
+ }
202
+ type Address = `0x${string}`;
203
+ type NetWorkFee = {
204
+ paymentType: number;
205
+ volScale: number;
206
+ };
207
+ declare enum ErrorCode {
208
+ SUCCESS = 9200,
209
+ SUCCESS_ORIGIN = 0,
210
+ IDENTITY_VERIFICATION_FAILED = 9401,
211
+ PERMISSION_DENIED = 9403,
212
+ NOT_EXIST = 9404,
213
+ REQUEST_LIMIT = 9429,
214
+ SERVICE_ERROR = 9500,
215
+ MISS_REQUESTED_PARAMETER = 9900,
216
+ INVALID_PARAMETER = 9901,
217
+ NETWORK_ERROR = "ERR_NETWORK"
218
+ }
219
+ interface BaseResponse<T = any> {
220
+ code: ErrorCode;
221
+ msg: string | null;
222
+ data?: T;
223
+ }
224
+ type DashboardType = {
225
+ lpAsset: string;
226
+ cumTradeAmount: string;
227
+ cumEarnings: string;
228
+ accountCount: number;
229
+ positionAmount: string;
230
+ positionAmountRate: string | number;
231
+ accountCountRate: string | number;
232
+ tradeAmountRate: number | string;
233
+ lpAssetRate: string | number;
234
+ earningsRate: string | number;
235
+ };
236
+ interface StatDashBoardResponse extends BaseResponse {
237
+ data: DashboardType;
238
+ }
239
+ type AccessTokenType = {
240
+ accessToken: string;
241
+ expireAt: number;
242
+ allowAccount: string;
243
+ appId: string;
244
+ };
245
+ interface AccessTokenResponse extends BaseResponse {
246
+ data: AccessTokenType;
247
+ }
248
+ declare enum MarketPoolState {
249
+ Cook = 0,// Market created
250
+ Primed = 1,// Fee charged, waiting for oracle initialization
251
+ Trench = 2,// Trading enabled
252
+ PreBench = 3,// Pending delisting
253
+ Bench = 4
254
+ }
255
+ type MarketPool = {
256
+ chainId: number;
257
+ marketId: string;
258
+ poolId: string;
259
+ oracleId?: number | null;
260
+ globalId: number;
261
+ state: MarketPoolState;
262
+ baseSymbol: string;
263
+ quoteSymbol: string;
264
+ baseDecimals: number;
265
+ quoteDecimals: number;
266
+ baseToken: string;
267
+ quoteToken: string;
268
+ basePoolToken: string;
269
+ quotePoolToken: string;
270
+ oracleType?: number | null;
271
+ feedId?: number | null;
272
+ activeTime: number;
273
+ poolPreTime: number;
274
+ };
275
+ interface MarketPoolResponse extends BaseResponse {
276
+ data: MarketPool[];
277
+ }
278
+ interface PoolResponse extends BaseResponse {
279
+ data: MarketPool;
280
+ }
281
+ declare enum OracleType {
282
+ Chainlink = 1,
283
+ Pyth = 2
284
+ }
285
+ type PriceType = {
286
+ oracleId: number;
287
+ price: string;
288
+ vaa: string;
289
+ publishTime: number;
290
+ oracleType?: OracleType;
291
+ nativeFee?: number | string;
292
+ poolId: string;
293
+ };
294
+ interface PriceResponse extends BaseResponse {
295
+ data: PriceType[];
296
+ }
297
+ interface ApiResponse<T = Record<string, any>> extends BaseResponse {
298
+ data: T;
299
+ }
300
+ interface PositionType {
301
+ chainId: number;
302
+ poolId: string;
303
+ positionId: string;
304
+ direction: Direction;
305
+ entryPrice: string;
306
+ size: string;
307
+ collateralAmount: string;
308
+ fundingRateIndex: string;
309
+ riskTier: number;
310
+ txTime: number;
311
+ broker: string;
312
+ userLeverage: number;
313
+ baseSymbol: string;
314
+ quoteSymbol: string;
315
+ earlyClosePrice: string;
316
+ tradingFee: string;
317
+ tokenId: string | null;
318
+ freeAmount: string;
319
+ lockedAmount: string;
320
+ }
321
+ interface PositionResponse extends BaseResponse {
322
+ data: PositionType[];
323
+ }
324
+ interface OrderItem {
325
+ baseSymbol: string;
326
+ chainId: number;
327
+ collateralAmount: string;
328
+ direction: Direction;
329
+ executionFeeAmount: string;
330
+ executionFeeToken: string | null;
331
+ filledAmount: string;
332
+ filledSize: string;
333
+ operation: OperationType;
334
+ orderId: number;
335
+ orderType: OrderType;
336
+ poolId: string;
337
+ positionId: string;
338
+ postOnly: 0 | 1;
339
+ price: string;
340
+ quoteSymbol: string;
341
+ size: string;
342
+ slPrice: string | null;
343
+ slSize: string | null;
344
+ slippagePct: number;
345
+ tif: TimeInForce;
346
+ tpPrice: string | null;
347
+ tpSize: string | null;
348
+ triggerType: TriggerType$1;
349
+ txHash: string;
350
+ txTime: number;
351
+ user: string;
352
+ useLeverage: number;
353
+ }
354
+ interface OrderResponse extends BaseResponse {
355
+ data: OrderItem[];
356
+ }
357
+ interface PoolOpenOrder {
358
+ amount: string;
359
+ chainId: number;
360
+ minQuoteOut: string;
361
+ orderId: number;
362
+ poolId: string;
363
+ poolType: PoolType;
364
+ triggerPrice: string;
365
+ triggerType: TriggerType$1;
366
+ txTime: number;
367
+ user: string;
368
+ }
369
+ interface PoolOpenOrdersResponse extends BaseResponse {
370
+ data: PoolOpenOrder[];
371
+ }
372
+ interface AccessTokenRequest {
373
+ accessToken: string;
374
+ address: string;
375
+ }
376
+ interface HttpEnvParams {
377
+ isProd?: boolean;
378
+ }
379
+ declare enum HttpKlineIntervalEnum {
380
+ Minute1 = 1,
381
+ Minute5 = 5,
382
+ Minute15 = 15,
383
+ Minute30 = 30,
384
+ Hour1 = 60,
385
+ Hour4 = 240,
386
+ Day1 = 1440,
387
+ Week1 = 10080,
388
+ Month1 = 40320
389
+ }
390
+ interface KlineDataItemType {
391
+ time: number;
392
+ open: string;
393
+ close: string;
394
+ high: string;
395
+ low: string;
396
+ }
397
+ interface TickerDataItem {
398
+ chainId: ChainId;
399
+ poolId: string;
400
+ oracleId: number;
401
+ price: string;
402
+ change: string;
403
+ high: string;
404
+ low: string;
405
+ volume: string;
406
+ turnover: string;
407
+ }
408
+ declare enum MarketType {
409
+ Contract = 1,
410
+ Cook = 2,
411
+ Earn = 3
412
+ }
413
+ declare enum SearchTypeEnum {
414
+ All = 0,
415
+ Contract = 1,
416
+ Cook = 2,
417
+ Earn = 3
418
+ }
419
+ declare enum MarketCapType {
420
+ BlueChips = 1,
421
+ Alpha = 2
422
+ }
423
+ declare enum SearchSecondTypeEnum {
424
+ BlueChips = 1,
425
+ Alpha = 2,
426
+ Favorite = 3
427
+ }
428
+ interface ChainIdRequest {
429
+ chainId: ChainId;
430
+ }
431
+ type FavoritesType = -1 | 1;
432
+ interface SearchResultContractItem {
433
+ chainId: ChainId;
434
+ poolId: string;
435
+ baseQuoteSymbol: string;
436
+ symbolName: string;
437
+ baseToken: Address;
438
+ tokenIcon: string;
439
+ type: MarketType;
440
+ capType: MarketCapType;
441
+ favorites: FavoritesType;
442
+ volume: string;
443
+ liquidity: string;
444
+ basePrice: string;
445
+ priceChange: string;
446
+ tvl: string;
447
+ marketCap: string;
448
+ globalId: number;
449
+ baseSymbol: string;
450
+ quoteSymbol: string;
451
+ }
452
+ interface SearchResultCookItem {
453
+ chainId: ChainId;
454
+ poolId: string;
455
+ mBaseQuoteSymbol: string;
456
+ symbolName: string;
457
+ baseToken: Address;
458
+ tokenIcon: string;
459
+ type: MarketType;
460
+ state: MarketPoolState;
461
+ tvl: string;
462
+ marketCap: string;
463
+ lpPrice: string;
464
+ lpPriceChange: string;
465
+ globalId: number;
466
+ }
467
+ interface SearchResultEarnItem {
468
+ chainId: ChainId;
469
+ poolId: string;
470
+ mQuoteBaseSymbol: string;
471
+ symbolName: string;
472
+ baseToken: Address;
473
+ tokenIcon: string;
474
+ type: MarketType;
475
+ state: MarketPoolState;
476
+ rating: string;
477
+ tvl: string;
478
+ marketCap: string;
479
+ apr: string;
480
+ globalId: number;
481
+ }
482
+ interface SearchResultResponse {
483
+ earnInfo: {
484
+ list: SearchResultEarnItem[];
485
+ total: number;
486
+ };
487
+ cookInfo: {
488
+ list: SearchResultCookItem[];
489
+ total: number;
490
+ };
491
+ contractInfo: {
492
+ list: SearchResultContractItem[];
493
+ total: number;
494
+ };
495
+ }
496
+ interface FavoritesListItem {
497
+ ChainId: ChainId;
498
+ poolId: string;
499
+ symbolName: string;
500
+ tokenIcon: string;
501
+ capType: MarketCapType;
502
+ baseToken: Address;
503
+ basePrice: string;
504
+ priceChange: string;
505
+ volume: string;
506
+ marketCap: string;
507
+ baseQuoteSymbol: string;
508
+ favorites: FavoritesType;
509
+ }
510
+ interface BaseDetailResponse {
511
+ totalSupply: string;
512
+ circulation: string;
513
+ marketCap: string;
514
+ fdv: string;
515
+ holders: number;
516
+ traders: number;
517
+ liquidity: string;
518
+ volume: string;
519
+ longPosition: number;
520
+ shortPosition: number;
521
+ fundingRate: string;
522
+ tokenIcon: string;
523
+ poolId: string;
524
+ mSymbol: string;
525
+ symbolName: string;
526
+ lpPriceChange: string;
527
+ chainId: number;
528
+ tokenCreateTime: number;
529
+ baseToken: Address;
530
+ marketId: string;
531
+ basePrice: string;
532
+ tvl: string;
533
+ apr: string;
534
+ }
535
+ interface MarketDetailResponse {
536
+ chainId: number;
537
+ marketId: string;
538
+ poolId: string;
539
+ oracleId: number;
540
+ globalId: number;
541
+ state: MarketPoolState;
542
+ baseSymbol: string;
543
+ quoteSymbol: string;
544
+ baseDecimals: number;
545
+ quoteDecimals: number;
546
+ baseToken: Address;
547
+ quoteToken: Address;
548
+ basePoolToken: Address;
549
+ quotePoolToken: Address;
550
+ oracleType: OracleType;
551
+ feedId: string;
552
+ activeTime: number;
553
+ capType: MarketCapType;
554
+ baseReserveRatio: string;
555
+ quoteReserveRatio: string;
556
+ }
557
+ interface MarketInfo {
558
+ chainId: number;
559
+ marketId: string;
560
+ poolId: string;
561
+ quoteSymbol: string;
562
+ quoteDecimals: number;
563
+ quoteToken: string;
564
+ baseReserveRatio: number;
565
+ quoteReserveRatio: number;
566
+ oracleFeeUsd: number;
567
+ oracleRefundFeeUsd: number;
568
+ poolPrimeThreshold: number;
569
+ decimals: number;
570
+ }
571
+
572
+ type DepositTpSl = Pick<TpSl, 'triggerType' | 'triggerPrice'>;
573
+ interface Deposit {
574
+ chainId: ChainId;
575
+ poolId: string;
576
+ decimals?: number;
577
+ amount: number;
578
+ slippage: number;
579
+ tpsl?: DepositTpSl[];
580
+ }
581
+ interface WithdrawParams {
582
+ chainId: ChainId;
583
+ poolId: string;
584
+ amount: number;
585
+ slippage: number;
586
+ }
587
+ interface RewardsParams {
588
+ chainId: ChainId;
589
+ poolId: string;
590
+ account: string;
591
+ }
592
+ interface ClaimParams {
593
+ chainId: ChainId;
594
+ poolId: string;
595
+ }
596
+ interface ClaimRebatesParams {
597
+ chainId: ChainId;
598
+ poolIds: string[];
599
+ }
600
+ interface PreviewWithdrawDataParams {
601
+ chainId: ChainId;
602
+ poolId: string;
603
+ account: string;
604
+ amount: string | number;
605
+ }
606
+
607
+ declare const claimBasePoolRebate: (params: ClaimParams) => Promise<any>;
608
+ declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<viem.TransactionReceipt | undefined>;
609
+
610
+ declare const deposit$1: (params: Deposit) => Promise<viem.TransactionReceipt | undefined>;
611
+
612
+ declare const withdrawableLpAmount$1: (params: {
613
+ chainId: ChainId;
614
+ poolId: string;
615
+ price?: bigint;
616
+ }) => Promise<any>;
617
+ declare const withdraw$1: (params: WithdrawParams) => Promise<viem.TransactionReceipt>;
618
+
619
+ declare const getRewards$1: (params: RewardsParams) => Promise<{
620
+ rebates: any;
621
+ genesisRebates: any;
622
+ } | undefined>;
623
+
624
+ declare const previewUserWithdrawData: ({ chainId, account, poolId, amount }: PreviewWithdrawDataParams) => Promise<{
625
+ baseAmountOut: any;
626
+ rebateAmount: any;
627
+ } | undefined>;
628
+
629
+ declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<any>;
630
+
631
+ declare const index$2_claimBasePoolRebate: typeof claimBasePoolRebate;
632
+ declare const index$2_claimBasePoolRebates: typeof claimBasePoolRebates;
633
+ declare const index$2_previewUserWithdrawData: typeof previewUserWithdrawData;
634
+ declare namespace index$2 {
635
+ export { index$2_claimBasePoolRebate as claimBasePoolRebate, index$2_claimBasePoolRebates as claimBasePoolRebates, deposit$1 as deposit, getLpPrice$1 as getLpPrice, getRewards$1 as getRewards, index$2_previewUserWithdrawData as previewUserWithdrawData, withdraw$1 as withdraw, withdrawableLpAmount$1 as withdrawableLpAmount };
636
+ }
637
+
638
+ declare const deposit: (params: Deposit) => Promise<viem.TransactionReceipt | undefined>;
639
+
640
+ declare const withdrawableLpAmount: (params: {
641
+ chainId: ChainId;
642
+ poolId: string;
643
+ price?: bigint;
644
+ }) => Promise<any>;
645
+ declare const withdraw: (params: WithdrawParams) => Promise<viem.TransactionReceipt>;
646
+
647
+ declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<viem.TransactionReceipt | null>;
648
+
649
+ declare const getRewards: (params: RewardsParams) => Promise<any>;
650
+
651
+ declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<any>;
652
+ declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<viem.TransactionReceipt | undefined>;
653
+
654
+ declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<any>;
655
+
656
+ declare const index$1_claimQuotePoolRebate: typeof claimQuotePoolRebate;
657
+ declare const index$1_claimQuotePoolRebates: typeof claimQuotePoolRebates;
658
+ declare const index$1_deposit: typeof deposit;
659
+ declare const index$1_getLpPrice: typeof getLpPrice;
660
+ declare const index$1_getRewards: typeof getRewards;
661
+ declare const index$1_transfer: typeof transfer;
662
+ declare const index$1_withdraw: typeof withdraw;
663
+ declare const index$1_withdrawableLpAmount: typeof withdrawableLpAmount;
664
+ declare namespace index$1 {
665
+ export { index$1_claimQuotePoolRebate as claimQuotePoolRebate, index$1_claimQuotePoolRebates as claimQuotePoolRebates, index$1_deposit as deposit, index$1_getLpPrice as getLpPrice, index$1_getRewards as getRewards, index$1_transfer as transfer, index$1_withdraw as withdraw, index$1_withdrawableLpAmount as withdrawableLpAmount };
666
+ }
667
+
668
+ declare const getMarket: (chainId: ChainId, marketId: string) => Promise<any>;
669
+
670
+ declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<any>;
671
+
672
+ declare const index_getMarket: typeof getMarket;
673
+ declare const index_getOracleFee: typeof getOracleFee;
674
+ declare namespace index {
675
+ export { index_getMarket as getMarket, index_getOracleFee as getOracleFee };
676
+ }
677
+
678
+ declare const getPricesData: (chainId: ChainId, poolIds: string[]) => Promise<{
679
+ poolId: string;
680
+ price: string;
681
+ value: bigint;
682
+ publishTime: number;
683
+ oracleType: OracleType;
684
+ vaa: string;
685
+ }[] | undefined>;
686
+ declare const getPriceData: (chainId: ChainId, poolId: string) => Promise<{
687
+ poolId: string;
688
+ price: string;
689
+ value: bigint;
690
+ publishTime: number;
691
+ oracleType: OracleType;
692
+ vaa: string;
693
+ } | undefined>;
694
+
695
+ declare const COMMON_PRICE_DECIMALS = 30;
696
+ declare const COMMON_LP_AMOUNT_DECIMALS = 18;
697
+
698
+ declare const pool: {
699
+ createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<any>;
700
+ getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<any>;
701
+ getMarketPools: (chainId: ChainId) => Promise<any>;
702
+ getPoolInfo: (chainId: ChainId, poolId: string, marketPrice?: bigint) => Promise<{
703
+ quotePool: {
704
+ poolToken: any;
705
+ exchangeRate: any;
706
+ poolTokenPrice: any;
707
+ poolTokenSupply: any;
708
+ totalDebt: any;
709
+ baseCollateral: any;
710
+ };
711
+ basePool: {
712
+ poolToken: any;
713
+ exchangeRate: any;
714
+ poolTokenPrice: any;
715
+ poolTokenSupply: any;
716
+ totalDebt: any;
717
+ baseCollateral: any;
718
+ };
719
+ reserveInfo: {
720
+ baseTotalAmount: any;
721
+ baseReservedAmount: any;
722
+ quoteTotalAmount: any;
723
+ quoteReservedAmount: any;
724
+ };
725
+ fundingInfo: {
726
+ nextFundingRate: any;
727
+ lastFundingFeeTracker: any;
728
+ nextEpochTime: any;
729
+ };
730
+ ioTracker: {
731
+ tracker: any;
732
+ longSize: any;
733
+ shortSize: any;
734
+ poolEntryPrice: any;
735
+ };
736
+ liquidityInfo: {
737
+ windowCaps: any;
738
+ openInterest: any;
739
+ };
740
+ }>;
741
+ getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<any>;
742
+ addTpSl: (params: AddTpSLParams) => Promise<viem.TransactionReceipt>;
743
+ cancelTpSl: (params: CancelTpSLParams) => Promise<viem.TransactionReceipt>;
744
+ reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<viem.TransactionReceipt>;
745
+ getPoolDetail: (chainId: ChainId, poolId: string) => Promise<MarketPool | undefined>;
746
+ getOpenOrders: (chainId: ChainId, address: string) => Promise<PoolOpenOrder[]>;
747
+ };
748
+
749
+ export { MarketCapType as $, type ApiResponse as A, type BaseResponse as B, ChainId as C, COMMON_LP_AMOUNT_DECIMALS as D, getPricesData as E, type FavoritesListItem as F, getPriceData as G, HttpKlineIntervalEnum as H, type ObjectType as I, ErrorCode as J, type KlineDataItemType as K, type DashboardType as L, type MarketDetailResponse as M, type NetWorkFee as N, OracleType as O, type PriceResponse as P, type StatDashBoardResponse as Q, type AccessTokenType as R, SearchTypeEnum as S, type TickerDataItem as T, type AccessTokenResponse as U, MarketPoolState as V, type MarketPool as W, type MarketPoolResponse as X, type PriceType as Y, type PoolOpenOrder as Z, MarketType as _, SearchSecondTypeEnum as a, type ChainIdRequest as a0, type FavoritesType as a1, type SearchResultContractItem as a2, type SearchResultCookItem as a3, type SearchResultEarnItem as a4, OrderType as a5, TriggerType as a6, OperationType as a7, Direction as a8, TimeInForce as a9, type Position as aa, type Order as ab, OrderStatus as ac, type TradingResult as ad, type UpdateOrderTpSlParams as ae, type PoolResponse as b, type PoolOpenOrdersResponse as c, type HttpEnvParams as d, type BaseDetailResponse as e, type MarketInfo as f, type AccessTokenRequest as g, type PositionResponse as h, type OrderResponse as i, type SearchResultResponse as j, type PositionType as k, type PlaceOrderParams as l, type PositionTpSlOrderParams as m, type OrderItem as n, type Address as o, type ContractAddress as p, index$2 as q, index$1 as r, pool as s, index as t, type AddTpSLParams as u, type CancelTpSLParams as v, type CreatePoolRequest as w, type TpSLParams as x, type TpSl as y, COMMON_PRICE_DECIMALS as z };