@myx-trade/sdk 0.1.212 → 0.1.213
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 +91 -169
- package/dist/index.d.ts +91 -169
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AddressLike, Signer, ethers as ethers$1 } from 'ethers';
|
|
1
|
+
import { AddressLike, Signer, ethers } from 'ethers';
|
|
3
2
|
export { formatUnits, parseUnits } from 'ethers';
|
|
4
3
|
import { Options, Event } from 'reconnecting-websocket';
|
|
5
|
-
import { WalletClient } from 'viem';
|
|
4
|
+
import { Address as Address$1, WalletClient } from 'viem';
|
|
6
5
|
|
|
7
6
|
declare enum ChainId {
|
|
8
7
|
LINEA_SEPOLIA = 59141,
|
|
@@ -49,49 +48,49 @@ interface CancelTpSLParams {
|
|
|
49
48
|
orderId: string;
|
|
50
49
|
}
|
|
51
50
|
|
|
52
|
-
declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<
|
|
51
|
+
declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<any>;
|
|
53
52
|
|
|
54
|
-
declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<
|
|
55
|
-
declare const getMarketPools: (chainId: ChainId) => Promise<
|
|
53
|
+
declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<any>;
|
|
54
|
+
declare const getMarketPools: (chainId: ChainId) => Promise<any>;
|
|
56
55
|
declare const getPoolInfo$1: (chainId: ChainId, poolId: string, marketPrice?: bigint) => Promise<{
|
|
57
56
|
quotePool: {
|
|
58
|
-
poolToken:
|
|
59
|
-
exchangeRate:
|
|
60
|
-
poolTokenPrice:
|
|
61
|
-
poolTokenSupply:
|
|
57
|
+
poolToken: any;
|
|
58
|
+
exchangeRate: any;
|
|
59
|
+
poolTokenPrice: any;
|
|
60
|
+
poolTokenSupply: any;
|
|
62
61
|
};
|
|
63
62
|
basePool: {
|
|
64
|
-
poolToken:
|
|
65
|
-
exchangeRate:
|
|
66
|
-
poolTokenPrice:
|
|
67
|
-
poolTokenSupply:
|
|
63
|
+
poolToken: any;
|
|
64
|
+
exchangeRate: any;
|
|
65
|
+
poolTokenPrice: any;
|
|
66
|
+
poolTokenSupply: any;
|
|
68
67
|
};
|
|
69
68
|
reserveInfo: {
|
|
70
|
-
baseTotalAmount:
|
|
71
|
-
baseReservedAmount:
|
|
72
|
-
quoteTotalAmount:
|
|
73
|
-
quoteReservedAmount:
|
|
69
|
+
baseTotalAmount: any;
|
|
70
|
+
baseReservedAmount: any;
|
|
71
|
+
quoteTotalAmount: any;
|
|
72
|
+
quoteReservedAmount: any;
|
|
74
73
|
};
|
|
75
74
|
fundingInfo: {
|
|
76
|
-
nextFundingRate:
|
|
77
|
-
lastFundingFeeTracker:
|
|
78
|
-
nextEpochTime:
|
|
75
|
+
nextFundingRate: any;
|
|
76
|
+
lastFundingFeeTracker: any;
|
|
77
|
+
nextEpochTime: any;
|
|
79
78
|
};
|
|
80
79
|
ioTracker: {
|
|
81
|
-
tracker:
|
|
82
|
-
longSize:
|
|
83
|
-
shortSize:
|
|
84
|
-
poolEntryPrice:
|
|
80
|
+
tracker: any;
|
|
81
|
+
longSize: any;
|
|
82
|
+
shortSize: any;
|
|
83
|
+
poolEntryPrice: any;
|
|
85
84
|
};
|
|
86
85
|
}>;
|
|
87
86
|
|
|
88
|
-
declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<
|
|
87
|
+
declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<any>;
|
|
89
88
|
|
|
90
|
-
declare const addTpSl: (params: AddTpSLParams) => Promise<
|
|
89
|
+
declare const addTpSl: (params: AddTpSLParams) => Promise<any>;
|
|
91
90
|
|
|
92
|
-
declare const cancelTpSl: (params: CancelTpSLParams) => Promise<
|
|
91
|
+
declare const cancelTpSl: (params: CancelTpSLParams) => Promise<any>;
|
|
93
92
|
|
|
94
|
-
declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<
|
|
93
|
+
declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<any>;
|
|
95
94
|
|
|
96
95
|
/**
|
|
97
96
|
* Trading related types and enums
|
|
@@ -223,7 +222,7 @@ interface UpdateOrderTpSlParams {
|
|
|
223
222
|
interface ObjectType<T> {
|
|
224
223
|
[key: string]: T;
|
|
225
224
|
}
|
|
226
|
-
type Address
|
|
225
|
+
type Address = `0x${string}`;
|
|
227
226
|
type NetWorkFee = {
|
|
228
227
|
paymentType: number;
|
|
229
228
|
volScale: number;
|
|
@@ -415,7 +414,7 @@ interface SearchResultContractItem {
|
|
|
415
414
|
poolId: string;
|
|
416
415
|
baseQuoteSymbol: string;
|
|
417
416
|
symbolName: string;
|
|
418
|
-
baseToken: Address
|
|
417
|
+
baseToken: Address;
|
|
419
418
|
tokenIcon: string;
|
|
420
419
|
type: MarketType;
|
|
421
420
|
capType: MarketCapType;
|
|
@@ -435,7 +434,7 @@ interface SearchResultCookItem {
|
|
|
435
434
|
poolId: string;
|
|
436
435
|
mBaseQuoteSymbol: string;
|
|
437
436
|
symbolName: string;
|
|
438
|
-
baseToken: Address
|
|
437
|
+
baseToken: Address;
|
|
439
438
|
tokenIcon: string;
|
|
440
439
|
type: MarketType;
|
|
441
440
|
state: MarketPoolState;
|
|
@@ -450,7 +449,7 @@ interface SearchResultEarnItem {
|
|
|
450
449
|
poolId: string;
|
|
451
450
|
mQuoteBaseSymbol: string;
|
|
452
451
|
symbolName: string;
|
|
453
|
-
baseToken: Address
|
|
452
|
+
baseToken: Address;
|
|
454
453
|
tokenIcon: string;
|
|
455
454
|
type: MarketType;
|
|
456
455
|
state: MarketPoolState;
|
|
@@ -480,7 +479,7 @@ interface FavoritesListItem {
|
|
|
480
479
|
symbolName: string;
|
|
481
480
|
tokenIcon: string;
|
|
482
481
|
capType: MarketCapType;
|
|
483
|
-
baseToken: Address
|
|
482
|
+
baseToken: Address;
|
|
484
483
|
basePrice: string;
|
|
485
484
|
priceChange: string;
|
|
486
485
|
volume: string;
|
|
@@ -507,7 +506,7 @@ interface BaseDetailResponse {
|
|
|
507
506
|
lpPriceChange: string;
|
|
508
507
|
chainId: number;
|
|
509
508
|
tokenCreateTime: number;
|
|
510
|
-
baseToken: Address
|
|
509
|
+
baseToken: Address;
|
|
511
510
|
marketId: string;
|
|
512
511
|
basePrice: string;
|
|
513
512
|
tvl: string;
|
|
@@ -524,10 +523,10 @@ interface MarketDetailResponse {
|
|
|
524
523
|
quoteSymbol: string;
|
|
525
524
|
baseDecimals: number;
|
|
526
525
|
quoteDecimals: number;
|
|
527
|
-
baseToken: Address
|
|
528
|
-
quoteToken: Address
|
|
529
|
-
basePoolToken: Address
|
|
530
|
-
quotePoolToken: Address
|
|
526
|
+
baseToken: Address;
|
|
527
|
+
quoteToken: Address;
|
|
528
|
+
basePoolToken: Address;
|
|
529
|
+
quotePoolToken: Address;
|
|
531
530
|
oracleType: OracleType;
|
|
532
531
|
feedId: string;
|
|
533
532
|
activeTime: number;
|
|
@@ -550,17 +549,6 @@ interface MarketInfo {
|
|
|
550
549
|
decimals: number;
|
|
551
550
|
}
|
|
552
551
|
|
|
553
|
-
declare class Address {
|
|
554
|
-
private _addr;
|
|
555
|
-
static ZERO_ADDRESS: Address;
|
|
556
|
-
constructor(addr?: string);
|
|
557
|
-
toString(): string;
|
|
558
|
-
format(): string;
|
|
559
|
-
unmaskFormat(): string;
|
|
560
|
-
static from(addr?: string): Address;
|
|
561
|
-
isEqualTo(otherAddress?: string | Address): boolean;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
552
|
interface GetHistoryOrdersParams {
|
|
565
553
|
limit?: number;
|
|
566
554
|
chainId?: number;
|
|
@@ -636,7 +624,7 @@ interface HistoryOrderItem {
|
|
|
636
624
|
orderStatus: OrderStatusEnum;
|
|
637
625
|
execType: ExecTypeEnum;
|
|
638
626
|
slippagePct: number;
|
|
639
|
-
executionFeeToken: Address;
|
|
627
|
+
executionFeeToken: Address$1;
|
|
640
628
|
executionFeeAmount: string;
|
|
641
629
|
tradingFee: string;
|
|
642
630
|
fundingFee: string;
|
|
@@ -692,12 +680,13 @@ declare enum TradeFlowAccountTypeEnum {
|
|
|
692
680
|
interface TradeFlowItem {
|
|
693
681
|
chainId: number;
|
|
694
682
|
orderId: number;
|
|
695
|
-
user: Address;
|
|
683
|
+
user: Address$1;
|
|
696
684
|
poolId: string;
|
|
697
685
|
fundingFee: string;
|
|
698
686
|
tradingFee: string;
|
|
699
687
|
charge: string;
|
|
700
688
|
collateralAmount: string;
|
|
689
|
+
collateralBase: string;
|
|
701
690
|
txHash: string;
|
|
702
691
|
txTime: number;
|
|
703
692
|
type: TradeFlowTypeEnum;
|
|
@@ -710,6 +699,7 @@ interface TradeFlowItem {
|
|
|
710
699
|
referrerRebate: string;
|
|
711
700
|
referralRebate: string;
|
|
712
701
|
rebateClaimedAmount: string;
|
|
702
|
+
token?: Address$1;
|
|
713
703
|
}
|
|
714
704
|
|
|
715
705
|
type ForwarderTxParams = {
|
|
@@ -900,21 +890,21 @@ interface PreviewWithdrawDataParams {
|
|
|
900
890
|
amount: string | number;
|
|
901
891
|
}
|
|
902
892
|
|
|
903
|
-
declare const claimBasePoolRebate: (params: ClaimParams) => Promise<
|
|
904
|
-
declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<
|
|
893
|
+
declare const claimBasePoolRebate: (params: ClaimParams) => Promise<any>;
|
|
894
|
+
declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
|
|
905
895
|
|
|
906
|
-
declare const deposit$1: (params: Deposit) => Promise<
|
|
896
|
+
declare const deposit$1: (params: Deposit) => Promise<any>;
|
|
907
897
|
|
|
908
|
-
declare const withdraw$1: (params: WithdrawParams) => Promise<
|
|
898
|
+
declare const withdraw$1: (params: WithdrawParams) => Promise<any>;
|
|
909
899
|
|
|
910
|
-
declare const getRewards$1: (params: RewardsParams) => Promise<
|
|
900
|
+
declare const getRewards$1: (params: RewardsParams) => Promise<any>;
|
|
911
901
|
|
|
912
902
|
declare const previewUserWithdrawData: ({ chainId, account, poolId, amount }: PreviewWithdrawDataParams) => Promise<{
|
|
913
|
-
baseAmountOut:
|
|
914
|
-
rebateAmount:
|
|
903
|
+
baseAmountOut: any;
|
|
904
|
+
rebateAmount: any;
|
|
915
905
|
} | undefined>;
|
|
916
906
|
|
|
917
|
-
declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<
|
|
907
|
+
declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<any>;
|
|
918
908
|
|
|
919
909
|
declare const index$2_claimBasePoolRebate: typeof claimBasePoolRebate;
|
|
920
910
|
declare const index$2_claimBasePoolRebates: typeof claimBasePoolRebates;
|
|
@@ -923,18 +913,18 @@ declare namespace index$2 {
|
|
|
923
913
|
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 };
|
|
924
914
|
}
|
|
925
915
|
|
|
926
|
-
declare const deposit: (params: Deposit) => Promise<
|
|
916
|
+
declare const deposit: (params: Deposit) => Promise<any>;
|
|
927
917
|
|
|
928
|
-
declare const withdraw: (params: WithdrawParams) => Promise<
|
|
918
|
+
declare const withdraw: (params: WithdrawParams) => Promise<any>;
|
|
929
919
|
|
|
930
|
-
declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<
|
|
920
|
+
declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<any>;
|
|
931
921
|
|
|
932
|
-
declare const getRewards: (params: RewardsParams) => Promise<
|
|
922
|
+
declare const getRewards: (params: RewardsParams) => Promise<any>;
|
|
933
923
|
|
|
934
|
-
declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<
|
|
935
|
-
declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<
|
|
924
|
+
declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<any>;
|
|
925
|
+
declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
|
|
936
926
|
|
|
937
|
-
declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<
|
|
927
|
+
declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<any>;
|
|
938
928
|
|
|
939
929
|
declare const index$1_claimQuotePoolRebate: typeof claimQuotePoolRebate;
|
|
940
930
|
declare const index$1_claimQuotePoolRebates: typeof claimQuotePoolRebates;
|
|
@@ -947,16 +937,9 @@ declare namespace index$1 {
|
|
|
947
937
|
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 };
|
|
948
938
|
}
|
|
949
939
|
|
|
950
|
-
declare const getMarket: (chainId: ChainId, marketId: string) => Promise<
|
|
951
|
-
quoteToken: string;
|
|
952
|
-
baseReserveRatio: bigint;
|
|
953
|
-
quoteReserveRatio: bigint;
|
|
954
|
-
oracleFeeUsd: bigint;
|
|
955
|
-
oracleRefundFeeUsd: bigint;
|
|
956
|
-
poolPrimeThreshold: bigint;
|
|
957
|
-
}) | undefined>;
|
|
940
|
+
declare const getMarket: (chainId: ChainId, marketId: string) => Promise<any>;
|
|
958
941
|
|
|
959
|
-
declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<
|
|
942
|
+
declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<any>;
|
|
960
943
|
|
|
961
944
|
declare const index_getMarket: typeof getMarket;
|
|
962
945
|
declare const index_getOracleFee: typeof getOracleFee;
|
|
@@ -999,9 +982,9 @@ declare const bigintAmountSlipperCalculator: (amount: bigint, slipper?: Number)
|
|
|
999
982
|
declare const getTokenInfo: (chainId: number, tokenAddress: string, account?: string) => Promise<{
|
|
1000
983
|
balance?: number | undefined;
|
|
1001
984
|
address: string;
|
|
1002
|
-
name:
|
|
1003
|
-
symbol:
|
|
1004
|
-
decimals:
|
|
985
|
+
name: any;
|
|
986
|
+
symbol: any;
|
|
987
|
+
decimals: any;
|
|
1005
988
|
icon: string;
|
|
1006
989
|
totalSupply: number;
|
|
1007
990
|
}>;
|
|
@@ -1215,7 +1198,7 @@ interface MyxClientConfig {
|
|
|
1215
1198
|
signer?: Signer;
|
|
1216
1199
|
seamlessAccount?: {
|
|
1217
1200
|
masterAddress: string;
|
|
1218
|
-
wallet: ethers
|
|
1201
|
+
wallet: ethers.Wallet | null;
|
|
1219
1202
|
authorized: boolean;
|
|
1220
1203
|
};
|
|
1221
1204
|
walletClient?: WalletClient;
|
|
@@ -1235,7 +1218,7 @@ declare class ConfigManager {
|
|
|
1235
1218
|
clear(): void;
|
|
1236
1219
|
startSeamlessMode(open: boolean): MyxClientConfig;
|
|
1237
1220
|
updateSeamlessWallet({ wallet, authorized, masterAddress }: {
|
|
1238
|
-
wallet?: ethers
|
|
1221
|
+
wallet?: ethers.Wallet;
|
|
1239
1222
|
authorized?: boolean;
|
|
1240
1223
|
masterAddress?: string;
|
|
1241
1224
|
}): void;
|
|
@@ -1343,7 +1326,7 @@ declare class Utils {
|
|
|
1343
1326
|
quoteAddress: string;
|
|
1344
1327
|
amount?: string;
|
|
1345
1328
|
spenderAddress?: string;
|
|
1346
|
-
signer?: ethers
|
|
1329
|
+
signer?: ethers.Signer;
|
|
1347
1330
|
}): Promise<{
|
|
1348
1331
|
code: number;
|
|
1349
1332
|
message: any;
|
|
@@ -1386,68 +1369,7 @@ declare class Utils {
|
|
|
1386
1369
|
marketPrice: string;
|
|
1387
1370
|
}): Promise<{
|
|
1388
1371
|
code: number;
|
|
1389
|
-
data:
|
|
1390
|
-
poolToken: string;
|
|
1391
|
-
exchangeRate: bigint;
|
|
1392
|
-
poolTokenPrice: bigint;
|
|
1393
|
-
poolTokenSupply: bigint;
|
|
1394
|
-
}, [string, bigint, bigint, bigint] & {
|
|
1395
|
-
poolToken: string;
|
|
1396
|
-
exchangeRate: bigint;
|
|
1397
|
-
poolTokenPrice: bigint;
|
|
1398
|
-
poolTokenSupply: bigint;
|
|
1399
|
-
}, [bigint, bigint, bigint, bigint] & {
|
|
1400
|
-
baseTotalAmount: bigint;
|
|
1401
|
-
baseReservedAmount: bigint;
|
|
1402
|
-
quoteTotalAmount: bigint;
|
|
1403
|
-
quoteReservedAmount: bigint;
|
|
1404
|
-
}, [bigint, bigint, bigint] & {
|
|
1405
|
-
nextFundingRate: bigint;
|
|
1406
|
-
lastFundingFeeTracker: bigint;
|
|
1407
|
-
nextEpochTime: bigint;
|
|
1408
|
-
}, [bigint, bigint, bigint, bigint] & {
|
|
1409
|
-
tracker: bigint;
|
|
1410
|
-
longSize: bigint;
|
|
1411
|
-
shortSize: bigint;
|
|
1412
|
-
poolEntryPrice: bigint;
|
|
1413
|
-
}, [bigint, bigint] & {
|
|
1414
|
-
windowCaps: bigint;
|
|
1415
|
-
openInterest: bigint;
|
|
1416
|
-
}] & {
|
|
1417
|
-
basePool: [string, bigint, bigint, bigint] & {
|
|
1418
|
-
poolToken: string;
|
|
1419
|
-
exchangeRate: bigint;
|
|
1420
|
-
poolTokenPrice: bigint;
|
|
1421
|
-
poolTokenSupply: bigint;
|
|
1422
|
-
};
|
|
1423
|
-
quotePool: [string, bigint, bigint, bigint] & {
|
|
1424
|
-
poolToken: string;
|
|
1425
|
-
exchangeRate: bigint;
|
|
1426
|
-
poolTokenPrice: bigint;
|
|
1427
|
-
poolTokenSupply: bigint;
|
|
1428
|
-
};
|
|
1429
|
-
reserveInfo: [bigint, bigint, bigint, bigint] & {
|
|
1430
|
-
baseTotalAmount: bigint;
|
|
1431
|
-
baseReservedAmount: bigint;
|
|
1432
|
-
quoteTotalAmount: bigint;
|
|
1433
|
-
quoteReservedAmount: bigint;
|
|
1434
|
-
};
|
|
1435
|
-
fundingInfo: [bigint, bigint, bigint] & {
|
|
1436
|
-
nextFundingRate: bigint;
|
|
1437
|
-
lastFundingFeeTracker: bigint;
|
|
1438
|
-
nextEpochTime: bigint;
|
|
1439
|
-
};
|
|
1440
|
-
oi: [bigint, bigint, bigint, bigint] & {
|
|
1441
|
-
tracker: bigint;
|
|
1442
|
-
longSize: bigint;
|
|
1443
|
-
shortSize: bigint;
|
|
1444
|
-
poolEntryPrice: bigint;
|
|
1445
|
-
};
|
|
1446
|
-
liquidityInfo: [bigint, bigint] & {
|
|
1447
|
-
windowCaps: bigint;
|
|
1448
|
-
openInterest: bigint;
|
|
1449
|
-
};
|
|
1450
|
-
};
|
|
1372
|
+
data: any;
|
|
1451
1373
|
message?: undefined;
|
|
1452
1374
|
} | {
|
|
1453
1375
|
code: number;
|
|
@@ -1662,9 +1584,9 @@ declare class Seamless {
|
|
|
1662
1584
|
private account;
|
|
1663
1585
|
private api;
|
|
1664
1586
|
constructor(configManager: ConfigManager, logger: Logger, utils: Utils, account: Account, api: Api);
|
|
1665
|
-
onCheckRelayer(account: string, relayer: string, chainId: number): Promise<
|
|
1587
|
+
onCheckRelayer(account: string, relayer: string, chainId: number): Promise<any>;
|
|
1666
1588
|
getUSDPermitParams(deadline: number, chainId: number): Promise<{
|
|
1667
|
-
token: string | ethers
|
|
1589
|
+
token: string | ethers.Addressable;
|
|
1668
1590
|
owner: string;
|
|
1669
1591
|
spender: string;
|
|
1670
1592
|
value: bigint;
|
|
@@ -1681,7 +1603,7 @@ declare class Seamless {
|
|
|
1681
1603
|
deadline: number;
|
|
1682
1604
|
data: string;
|
|
1683
1605
|
nonce: string;
|
|
1684
|
-
}, chainId: number, provider?: ethers
|
|
1606
|
+
}, chainId: number, provider?: ethers.Signer): Promise<ApiResponse<any>>;
|
|
1685
1607
|
authorizeSeamlessAccount({ approve, seamlessAddress, chainId }: {
|
|
1686
1608
|
approve: boolean;
|
|
1687
1609
|
seamlessAddress: string;
|
|
@@ -1703,7 +1625,7 @@ declare class Seamless {
|
|
|
1703
1625
|
data: {
|
|
1704
1626
|
masterAddress: string;
|
|
1705
1627
|
seamlessAccount: string;
|
|
1706
|
-
authorized:
|
|
1628
|
+
authorized: any;
|
|
1707
1629
|
};
|
|
1708
1630
|
}>;
|
|
1709
1631
|
exportSeamlessPrivateKey({ password, apiKey }: {
|
|
@@ -1722,9 +1644,9 @@ declare class Seamless {
|
|
|
1722
1644
|
}): Promise<{
|
|
1723
1645
|
code: number;
|
|
1724
1646
|
data: {
|
|
1725
|
-
masterAddress:
|
|
1647
|
+
masterAddress: any;
|
|
1726
1648
|
seamlessAccount: string;
|
|
1727
|
-
authorized:
|
|
1649
|
+
authorized: any;
|
|
1728
1650
|
apiKey: string;
|
|
1729
1651
|
};
|
|
1730
1652
|
}>;
|
|
@@ -1744,7 +1666,7 @@ declare class Seamless {
|
|
|
1744
1666
|
data: {
|
|
1745
1667
|
masterAddress: string;
|
|
1746
1668
|
seamlessAccount: string;
|
|
1747
|
-
authorized:
|
|
1669
|
+
authorized: any;
|
|
1748
1670
|
apiKey: string;
|
|
1749
1671
|
};
|
|
1750
1672
|
message?: undefined;
|
|
@@ -1834,13 +1756,13 @@ declare class Order {
|
|
|
1834
1756
|
message: string;
|
|
1835
1757
|
data: {
|
|
1836
1758
|
success: boolean;
|
|
1837
|
-
transactionHash:
|
|
1838
|
-
blockNumber:
|
|
1839
|
-
gasUsed:
|
|
1759
|
+
transactionHash: any;
|
|
1760
|
+
blockNumber: any;
|
|
1761
|
+
gasUsed: any;
|
|
1840
1762
|
status: string;
|
|
1841
1763
|
confirmations: number;
|
|
1842
1764
|
timestamp: number;
|
|
1843
|
-
receipt:
|
|
1765
|
+
receipt: any;
|
|
1844
1766
|
};
|
|
1845
1767
|
} | {
|
|
1846
1768
|
code: number;
|
|
@@ -1861,13 +1783,13 @@ declare class Order {
|
|
|
1861
1783
|
} | {
|
|
1862
1784
|
code: number;
|
|
1863
1785
|
message: string;
|
|
1864
|
-
transactionHash:
|
|
1865
|
-
blockNumber:
|
|
1866
|
-
gasUsed:
|
|
1786
|
+
transactionHash: any;
|
|
1787
|
+
blockNumber: any;
|
|
1788
|
+
gasUsed: any;
|
|
1867
1789
|
status: string;
|
|
1868
1790
|
confirmations: number;
|
|
1869
1791
|
timestamp: number;
|
|
1870
|
-
receipt:
|
|
1792
|
+
receipt: any;
|
|
1871
1793
|
data?: undefined;
|
|
1872
1794
|
} | {
|
|
1873
1795
|
code: number;
|
|
@@ -1890,13 +1812,13 @@ declare class Order {
|
|
|
1890
1812
|
message: string;
|
|
1891
1813
|
data: {
|
|
1892
1814
|
success: boolean;
|
|
1893
|
-
transactionHash:
|
|
1894
|
-
blockNumber:
|
|
1895
|
-
gasUsed:
|
|
1815
|
+
transactionHash: any;
|
|
1816
|
+
blockNumber: any;
|
|
1817
|
+
gasUsed: any;
|
|
1896
1818
|
status: string;
|
|
1897
1819
|
confirmations: number;
|
|
1898
1820
|
timestamp: number;
|
|
1899
|
-
receipt:
|
|
1821
|
+
receipt: any;
|
|
1900
1822
|
};
|
|
1901
1823
|
} | {
|
|
1902
1824
|
code: number;
|
|
@@ -1912,13 +1834,13 @@ declare class Order {
|
|
|
1912
1834
|
message: string;
|
|
1913
1835
|
data: {
|
|
1914
1836
|
success: boolean;
|
|
1915
|
-
transactionHash:
|
|
1916
|
-
blockNumber:
|
|
1917
|
-
gasUsed:
|
|
1837
|
+
transactionHash: any;
|
|
1838
|
+
blockNumber: any;
|
|
1839
|
+
gasUsed: any;
|
|
1918
1840
|
status: string;
|
|
1919
1841
|
confirmations: number;
|
|
1920
1842
|
timestamp: number;
|
|
1921
|
-
receipt:
|
|
1843
|
+
receipt: any;
|
|
1922
1844
|
};
|
|
1923
1845
|
} | {
|
|
1924
1846
|
code: number;
|
|
@@ -1944,7 +1866,7 @@ declare class Order {
|
|
|
1944
1866
|
}>;
|
|
1945
1867
|
updateOrderTpSl(params: UpdateOrderParams, quoteAddress: string, chainId: number): Promise<{
|
|
1946
1868
|
code: number;
|
|
1947
|
-
data:
|
|
1869
|
+
data: any;
|
|
1948
1870
|
message: string;
|
|
1949
1871
|
} | {
|
|
1950
1872
|
code: number;
|
|
@@ -2003,4 +1925,4 @@ declare class MyxClient {
|
|
|
2003
1925
|
getAccessToken(): Promise<string | null>;
|
|
2004
1926
|
}
|
|
2005
1927
|
|
|
2006
|
-
export { type AccessTokenRequest, type AccessTokenResponse$1 as AccessTokenResponse, type AccessTokenType, type AddFavoriteParams, type Address
|
|
1928
|
+
export { type AccessTokenRequest, type AccessTokenResponse$1 as AccessTokenResponse, type AccessTokenType, type AddFavoriteParams, type Address, type ApiResponse, type BaseDetailResponse, type BaseResponse, COMMON_LP_AMOUNT_DECIMALS, COMMON_PRICE_DECIMALS, ChainId, type ChainIdRequest, CloseTypeEnum, type DashboardType, Direction, DirectionEnum, ErrorCode, ExecTypeEnum, type FavoritesListItem, type FavoritesListParams, type FavoritesTimeInterval, type FavoritesType, type FetchForwarderGetParams, type FetchForwarderGetResponse, type FetchForwarderGetResponseData, ForwarderGetStatus, type ForwarderTxParams, type GetBaseDetailParams, type GetHistoryOrdersParams, type GetKlineDataParams, type GetMarketDetailParams, type GetPoolLevelConfigParams, type GetTickerDataParams, type HistoryOrderItem, type HttpEnvParams, HttpKlineIntervalEnum, type KlineDataItemType, type KlineDataResponse, type KlineResolution, type LevelConfig, MarketCapType, type MarketDetailResponse, type MarketInfo, type MarketPool, type MarketPoolResponse, MarketPoolState, MarketType, MyxClient, type MyxClientConfig, type MyxSubscriptionOptions, type NetWorkFee, type ObjectType, type OnKlineCallback, type OnOrderCallback, type OnPositionCallback, type OnTickersAllCallback, type OnTickersCallback, OperationEnum, OperationType, OracleType, type Order$1 as Order, OrderStatus, OrderStatusEnum, OrderType, OrderTypeEnum, type PlaceOrderParams, type PoolLevelConfig, type PoolOpenOrder, type PoolOpenOrdersResponse, type PoolResponse, type PoolSymbolAllResponse, type Position$1 as Position, type PositionHistoryItem, type PositionResponse, type PositionTpSlOrderParams, type PositionType, type PriceResponse, type PriceType, type RemoveFavoriteParams, type SearchMarketParams, type SearchResultContractItem, type SearchResultCookItem, type SearchResultEarnItem, type SearchResultResponse, SearchSecondTypeEnum, SearchTypeEnum, type StatDashBoardResponse, type TickerDataItem, type TickersDataResponse, TimeInForce, TradeFlowAccountTypeEnum, type TradeFlowItem, TradeFlowTypeEnum, type TradingResult, TriggerType, TriggerTypeEnum, type UpdateOrderTpSlParams, approve, index$2 as base, bigintAmountSlipperCalculator, bigintTradingGasPriceWithRatio, bigintTradingGasToRatioCalculator, getAllowanceApproved, getBalanceOf, getBaseDetail, getBaseUrlByEnv, getForwardUrlByEnv, getMarketDetail, getMarketList, getOraclePrice, getPoolDetail, getPoolList, getPoolOpenOrders, getPriceData, getPricesData, getTickerData, getTokenInfo, index as market, index$3 as pool, index$1 as quote };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AddressLike, Signer, ethers as ethers$1 } from 'ethers';
|
|
1
|
+
import { AddressLike, Signer, ethers } from 'ethers';
|
|
3
2
|
export { formatUnits, parseUnits } from 'ethers';
|
|
4
3
|
import { Options, Event } from 'reconnecting-websocket';
|
|
5
|
-
import { WalletClient } from 'viem';
|
|
4
|
+
import { Address as Address$1, WalletClient } from 'viem';
|
|
6
5
|
|
|
7
6
|
declare enum ChainId {
|
|
8
7
|
LINEA_SEPOLIA = 59141,
|
|
@@ -49,49 +48,49 @@ interface CancelTpSLParams {
|
|
|
49
48
|
orderId: string;
|
|
50
49
|
}
|
|
51
50
|
|
|
52
|
-
declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<
|
|
51
|
+
declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<any>;
|
|
53
52
|
|
|
54
|
-
declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<
|
|
55
|
-
declare const getMarketPools: (chainId: ChainId) => Promise<
|
|
53
|
+
declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<any>;
|
|
54
|
+
declare const getMarketPools: (chainId: ChainId) => Promise<any>;
|
|
56
55
|
declare const getPoolInfo$1: (chainId: ChainId, poolId: string, marketPrice?: bigint) => Promise<{
|
|
57
56
|
quotePool: {
|
|
58
|
-
poolToken:
|
|
59
|
-
exchangeRate:
|
|
60
|
-
poolTokenPrice:
|
|
61
|
-
poolTokenSupply:
|
|
57
|
+
poolToken: any;
|
|
58
|
+
exchangeRate: any;
|
|
59
|
+
poolTokenPrice: any;
|
|
60
|
+
poolTokenSupply: any;
|
|
62
61
|
};
|
|
63
62
|
basePool: {
|
|
64
|
-
poolToken:
|
|
65
|
-
exchangeRate:
|
|
66
|
-
poolTokenPrice:
|
|
67
|
-
poolTokenSupply:
|
|
63
|
+
poolToken: any;
|
|
64
|
+
exchangeRate: any;
|
|
65
|
+
poolTokenPrice: any;
|
|
66
|
+
poolTokenSupply: any;
|
|
68
67
|
};
|
|
69
68
|
reserveInfo: {
|
|
70
|
-
baseTotalAmount:
|
|
71
|
-
baseReservedAmount:
|
|
72
|
-
quoteTotalAmount:
|
|
73
|
-
quoteReservedAmount:
|
|
69
|
+
baseTotalAmount: any;
|
|
70
|
+
baseReservedAmount: any;
|
|
71
|
+
quoteTotalAmount: any;
|
|
72
|
+
quoteReservedAmount: any;
|
|
74
73
|
};
|
|
75
74
|
fundingInfo: {
|
|
76
|
-
nextFundingRate:
|
|
77
|
-
lastFundingFeeTracker:
|
|
78
|
-
nextEpochTime:
|
|
75
|
+
nextFundingRate: any;
|
|
76
|
+
lastFundingFeeTracker: any;
|
|
77
|
+
nextEpochTime: any;
|
|
79
78
|
};
|
|
80
79
|
ioTracker: {
|
|
81
|
-
tracker:
|
|
82
|
-
longSize:
|
|
83
|
-
shortSize:
|
|
84
|
-
poolEntryPrice:
|
|
80
|
+
tracker: any;
|
|
81
|
+
longSize: any;
|
|
82
|
+
shortSize: any;
|
|
83
|
+
poolEntryPrice: any;
|
|
85
84
|
};
|
|
86
85
|
}>;
|
|
87
86
|
|
|
88
|
-
declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<
|
|
87
|
+
declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<any>;
|
|
89
88
|
|
|
90
|
-
declare const addTpSl: (params: AddTpSLParams) => Promise<
|
|
89
|
+
declare const addTpSl: (params: AddTpSLParams) => Promise<any>;
|
|
91
90
|
|
|
92
|
-
declare const cancelTpSl: (params: CancelTpSLParams) => Promise<
|
|
91
|
+
declare const cancelTpSl: (params: CancelTpSLParams) => Promise<any>;
|
|
93
92
|
|
|
94
|
-
declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<
|
|
93
|
+
declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<any>;
|
|
95
94
|
|
|
96
95
|
/**
|
|
97
96
|
* Trading related types and enums
|
|
@@ -223,7 +222,7 @@ interface UpdateOrderTpSlParams {
|
|
|
223
222
|
interface ObjectType<T> {
|
|
224
223
|
[key: string]: T;
|
|
225
224
|
}
|
|
226
|
-
type Address
|
|
225
|
+
type Address = `0x${string}`;
|
|
227
226
|
type NetWorkFee = {
|
|
228
227
|
paymentType: number;
|
|
229
228
|
volScale: number;
|
|
@@ -415,7 +414,7 @@ interface SearchResultContractItem {
|
|
|
415
414
|
poolId: string;
|
|
416
415
|
baseQuoteSymbol: string;
|
|
417
416
|
symbolName: string;
|
|
418
|
-
baseToken: Address
|
|
417
|
+
baseToken: Address;
|
|
419
418
|
tokenIcon: string;
|
|
420
419
|
type: MarketType;
|
|
421
420
|
capType: MarketCapType;
|
|
@@ -435,7 +434,7 @@ interface SearchResultCookItem {
|
|
|
435
434
|
poolId: string;
|
|
436
435
|
mBaseQuoteSymbol: string;
|
|
437
436
|
symbolName: string;
|
|
438
|
-
baseToken: Address
|
|
437
|
+
baseToken: Address;
|
|
439
438
|
tokenIcon: string;
|
|
440
439
|
type: MarketType;
|
|
441
440
|
state: MarketPoolState;
|
|
@@ -450,7 +449,7 @@ interface SearchResultEarnItem {
|
|
|
450
449
|
poolId: string;
|
|
451
450
|
mQuoteBaseSymbol: string;
|
|
452
451
|
symbolName: string;
|
|
453
|
-
baseToken: Address
|
|
452
|
+
baseToken: Address;
|
|
454
453
|
tokenIcon: string;
|
|
455
454
|
type: MarketType;
|
|
456
455
|
state: MarketPoolState;
|
|
@@ -480,7 +479,7 @@ interface FavoritesListItem {
|
|
|
480
479
|
symbolName: string;
|
|
481
480
|
tokenIcon: string;
|
|
482
481
|
capType: MarketCapType;
|
|
483
|
-
baseToken: Address
|
|
482
|
+
baseToken: Address;
|
|
484
483
|
basePrice: string;
|
|
485
484
|
priceChange: string;
|
|
486
485
|
volume: string;
|
|
@@ -507,7 +506,7 @@ interface BaseDetailResponse {
|
|
|
507
506
|
lpPriceChange: string;
|
|
508
507
|
chainId: number;
|
|
509
508
|
tokenCreateTime: number;
|
|
510
|
-
baseToken: Address
|
|
509
|
+
baseToken: Address;
|
|
511
510
|
marketId: string;
|
|
512
511
|
basePrice: string;
|
|
513
512
|
tvl: string;
|
|
@@ -524,10 +523,10 @@ interface MarketDetailResponse {
|
|
|
524
523
|
quoteSymbol: string;
|
|
525
524
|
baseDecimals: number;
|
|
526
525
|
quoteDecimals: number;
|
|
527
|
-
baseToken: Address
|
|
528
|
-
quoteToken: Address
|
|
529
|
-
basePoolToken: Address
|
|
530
|
-
quotePoolToken: Address
|
|
526
|
+
baseToken: Address;
|
|
527
|
+
quoteToken: Address;
|
|
528
|
+
basePoolToken: Address;
|
|
529
|
+
quotePoolToken: Address;
|
|
531
530
|
oracleType: OracleType;
|
|
532
531
|
feedId: string;
|
|
533
532
|
activeTime: number;
|
|
@@ -550,17 +549,6 @@ interface MarketInfo {
|
|
|
550
549
|
decimals: number;
|
|
551
550
|
}
|
|
552
551
|
|
|
553
|
-
declare class Address {
|
|
554
|
-
private _addr;
|
|
555
|
-
static ZERO_ADDRESS: Address;
|
|
556
|
-
constructor(addr?: string);
|
|
557
|
-
toString(): string;
|
|
558
|
-
format(): string;
|
|
559
|
-
unmaskFormat(): string;
|
|
560
|
-
static from(addr?: string): Address;
|
|
561
|
-
isEqualTo(otherAddress?: string | Address): boolean;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
552
|
interface GetHistoryOrdersParams {
|
|
565
553
|
limit?: number;
|
|
566
554
|
chainId?: number;
|
|
@@ -636,7 +624,7 @@ interface HistoryOrderItem {
|
|
|
636
624
|
orderStatus: OrderStatusEnum;
|
|
637
625
|
execType: ExecTypeEnum;
|
|
638
626
|
slippagePct: number;
|
|
639
|
-
executionFeeToken: Address;
|
|
627
|
+
executionFeeToken: Address$1;
|
|
640
628
|
executionFeeAmount: string;
|
|
641
629
|
tradingFee: string;
|
|
642
630
|
fundingFee: string;
|
|
@@ -692,12 +680,13 @@ declare enum TradeFlowAccountTypeEnum {
|
|
|
692
680
|
interface TradeFlowItem {
|
|
693
681
|
chainId: number;
|
|
694
682
|
orderId: number;
|
|
695
|
-
user: Address;
|
|
683
|
+
user: Address$1;
|
|
696
684
|
poolId: string;
|
|
697
685
|
fundingFee: string;
|
|
698
686
|
tradingFee: string;
|
|
699
687
|
charge: string;
|
|
700
688
|
collateralAmount: string;
|
|
689
|
+
collateralBase: string;
|
|
701
690
|
txHash: string;
|
|
702
691
|
txTime: number;
|
|
703
692
|
type: TradeFlowTypeEnum;
|
|
@@ -710,6 +699,7 @@ interface TradeFlowItem {
|
|
|
710
699
|
referrerRebate: string;
|
|
711
700
|
referralRebate: string;
|
|
712
701
|
rebateClaimedAmount: string;
|
|
702
|
+
token?: Address$1;
|
|
713
703
|
}
|
|
714
704
|
|
|
715
705
|
type ForwarderTxParams = {
|
|
@@ -900,21 +890,21 @@ interface PreviewWithdrawDataParams {
|
|
|
900
890
|
amount: string | number;
|
|
901
891
|
}
|
|
902
892
|
|
|
903
|
-
declare const claimBasePoolRebate: (params: ClaimParams) => Promise<
|
|
904
|
-
declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<
|
|
893
|
+
declare const claimBasePoolRebate: (params: ClaimParams) => Promise<any>;
|
|
894
|
+
declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
|
|
905
895
|
|
|
906
|
-
declare const deposit$1: (params: Deposit) => Promise<
|
|
896
|
+
declare const deposit$1: (params: Deposit) => Promise<any>;
|
|
907
897
|
|
|
908
|
-
declare const withdraw$1: (params: WithdrawParams) => Promise<
|
|
898
|
+
declare const withdraw$1: (params: WithdrawParams) => Promise<any>;
|
|
909
899
|
|
|
910
|
-
declare const getRewards$1: (params: RewardsParams) => Promise<
|
|
900
|
+
declare const getRewards$1: (params: RewardsParams) => Promise<any>;
|
|
911
901
|
|
|
912
902
|
declare const previewUserWithdrawData: ({ chainId, account, poolId, amount }: PreviewWithdrawDataParams) => Promise<{
|
|
913
|
-
baseAmountOut:
|
|
914
|
-
rebateAmount:
|
|
903
|
+
baseAmountOut: any;
|
|
904
|
+
rebateAmount: any;
|
|
915
905
|
} | undefined>;
|
|
916
906
|
|
|
917
|
-
declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<
|
|
907
|
+
declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<any>;
|
|
918
908
|
|
|
919
909
|
declare const index$2_claimBasePoolRebate: typeof claimBasePoolRebate;
|
|
920
910
|
declare const index$2_claimBasePoolRebates: typeof claimBasePoolRebates;
|
|
@@ -923,18 +913,18 @@ declare namespace index$2 {
|
|
|
923
913
|
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 };
|
|
924
914
|
}
|
|
925
915
|
|
|
926
|
-
declare const deposit: (params: Deposit) => Promise<
|
|
916
|
+
declare const deposit: (params: Deposit) => Promise<any>;
|
|
927
917
|
|
|
928
|
-
declare const withdraw: (params: WithdrawParams) => Promise<
|
|
918
|
+
declare const withdraw: (params: WithdrawParams) => Promise<any>;
|
|
929
919
|
|
|
930
|
-
declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<
|
|
920
|
+
declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<any>;
|
|
931
921
|
|
|
932
|
-
declare const getRewards: (params: RewardsParams) => Promise<
|
|
922
|
+
declare const getRewards: (params: RewardsParams) => Promise<any>;
|
|
933
923
|
|
|
934
|
-
declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<
|
|
935
|
-
declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<
|
|
924
|
+
declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<any>;
|
|
925
|
+
declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
|
|
936
926
|
|
|
937
|
-
declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<
|
|
927
|
+
declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<any>;
|
|
938
928
|
|
|
939
929
|
declare const index$1_claimQuotePoolRebate: typeof claimQuotePoolRebate;
|
|
940
930
|
declare const index$1_claimQuotePoolRebates: typeof claimQuotePoolRebates;
|
|
@@ -947,16 +937,9 @@ declare namespace index$1 {
|
|
|
947
937
|
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 };
|
|
948
938
|
}
|
|
949
939
|
|
|
950
|
-
declare const getMarket: (chainId: ChainId, marketId: string) => Promise<
|
|
951
|
-
quoteToken: string;
|
|
952
|
-
baseReserveRatio: bigint;
|
|
953
|
-
quoteReserveRatio: bigint;
|
|
954
|
-
oracleFeeUsd: bigint;
|
|
955
|
-
oracleRefundFeeUsd: bigint;
|
|
956
|
-
poolPrimeThreshold: bigint;
|
|
957
|
-
}) | undefined>;
|
|
940
|
+
declare const getMarket: (chainId: ChainId, marketId: string) => Promise<any>;
|
|
958
941
|
|
|
959
|
-
declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<
|
|
942
|
+
declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<any>;
|
|
960
943
|
|
|
961
944
|
declare const index_getMarket: typeof getMarket;
|
|
962
945
|
declare const index_getOracleFee: typeof getOracleFee;
|
|
@@ -999,9 +982,9 @@ declare const bigintAmountSlipperCalculator: (amount: bigint, slipper?: Number)
|
|
|
999
982
|
declare const getTokenInfo: (chainId: number, tokenAddress: string, account?: string) => Promise<{
|
|
1000
983
|
balance?: number | undefined;
|
|
1001
984
|
address: string;
|
|
1002
|
-
name:
|
|
1003
|
-
symbol:
|
|
1004
|
-
decimals:
|
|
985
|
+
name: any;
|
|
986
|
+
symbol: any;
|
|
987
|
+
decimals: any;
|
|
1005
988
|
icon: string;
|
|
1006
989
|
totalSupply: number;
|
|
1007
990
|
}>;
|
|
@@ -1215,7 +1198,7 @@ interface MyxClientConfig {
|
|
|
1215
1198
|
signer?: Signer;
|
|
1216
1199
|
seamlessAccount?: {
|
|
1217
1200
|
masterAddress: string;
|
|
1218
|
-
wallet: ethers
|
|
1201
|
+
wallet: ethers.Wallet | null;
|
|
1219
1202
|
authorized: boolean;
|
|
1220
1203
|
};
|
|
1221
1204
|
walletClient?: WalletClient;
|
|
@@ -1235,7 +1218,7 @@ declare class ConfigManager {
|
|
|
1235
1218
|
clear(): void;
|
|
1236
1219
|
startSeamlessMode(open: boolean): MyxClientConfig;
|
|
1237
1220
|
updateSeamlessWallet({ wallet, authorized, masterAddress }: {
|
|
1238
|
-
wallet?: ethers
|
|
1221
|
+
wallet?: ethers.Wallet;
|
|
1239
1222
|
authorized?: boolean;
|
|
1240
1223
|
masterAddress?: string;
|
|
1241
1224
|
}): void;
|
|
@@ -1343,7 +1326,7 @@ declare class Utils {
|
|
|
1343
1326
|
quoteAddress: string;
|
|
1344
1327
|
amount?: string;
|
|
1345
1328
|
spenderAddress?: string;
|
|
1346
|
-
signer?: ethers
|
|
1329
|
+
signer?: ethers.Signer;
|
|
1347
1330
|
}): Promise<{
|
|
1348
1331
|
code: number;
|
|
1349
1332
|
message: any;
|
|
@@ -1386,68 +1369,7 @@ declare class Utils {
|
|
|
1386
1369
|
marketPrice: string;
|
|
1387
1370
|
}): Promise<{
|
|
1388
1371
|
code: number;
|
|
1389
|
-
data:
|
|
1390
|
-
poolToken: string;
|
|
1391
|
-
exchangeRate: bigint;
|
|
1392
|
-
poolTokenPrice: bigint;
|
|
1393
|
-
poolTokenSupply: bigint;
|
|
1394
|
-
}, [string, bigint, bigint, bigint] & {
|
|
1395
|
-
poolToken: string;
|
|
1396
|
-
exchangeRate: bigint;
|
|
1397
|
-
poolTokenPrice: bigint;
|
|
1398
|
-
poolTokenSupply: bigint;
|
|
1399
|
-
}, [bigint, bigint, bigint, bigint] & {
|
|
1400
|
-
baseTotalAmount: bigint;
|
|
1401
|
-
baseReservedAmount: bigint;
|
|
1402
|
-
quoteTotalAmount: bigint;
|
|
1403
|
-
quoteReservedAmount: bigint;
|
|
1404
|
-
}, [bigint, bigint, bigint] & {
|
|
1405
|
-
nextFundingRate: bigint;
|
|
1406
|
-
lastFundingFeeTracker: bigint;
|
|
1407
|
-
nextEpochTime: bigint;
|
|
1408
|
-
}, [bigint, bigint, bigint, bigint] & {
|
|
1409
|
-
tracker: bigint;
|
|
1410
|
-
longSize: bigint;
|
|
1411
|
-
shortSize: bigint;
|
|
1412
|
-
poolEntryPrice: bigint;
|
|
1413
|
-
}, [bigint, bigint] & {
|
|
1414
|
-
windowCaps: bigint;
|
|
1415
|
-
openInterest: bigint;
|
|
1416
|
-
}] & {
|
|
1417
|
-
basePool: [string, bigint, bigint, bigint] & {
|
|
1418
|
-
poolToken: string;
|
|
1419
|
-
exchangeRate: bigint;
|
|
1420
|
-
poolTokenPrice: bigint;
|
|
1421
|
-
poolTokenSupply: bigint;
|
|
1422
|
-
};
|
|
1423
|
-
quotePool: [string, bigint, bigint, bigint] & {
|
|
1424
|
-
poolToken: string;
|
|
1425
|
-
exchangeRate: bigint;
|
|
1426
|
-
poolTokenPrice: bigint;
|
|
1427
|
-
poolTokenSupply: bigint;
|
|
1428
|
-
};
|
|
1429
|
-
reserveInfo: [bigint, bigint, bigint, bigint] & {
|
|
1430
|
-
baseTotalAmount: bigint;
|
|
1431
|
-
baseReservedAmount: bigint;
|
|
1432
|
-
quoteTotalAmount: bigint;
|
|
1433
|
-
quoteReservedAmount: bigint;
|
|
1434
|
-
};
|
|
1435
|
-
fundingInfo: [bigint, bigint, bigint] & {
|
|
1436
|
-
nextFundingRate: bigint;
|
|
1437
|
-
lastFundingFeeTracker: bigint;
|
|
1438
|
-
nextEpochTime: bigint;
|
|
1439
|
-
};
|
|
1440
|
-
oi: [bigint, bigint, bigint, bigint] & {
|
|
1441
|
-
tracker: bigint;
|
|
1442
|
-
longSize: bigint;
|
|
1443
|
-
shortSize: bigint;
|
|
1444
|
-
poolEntryPrice: bigint;
|
|
1445
|
-
};
|
|
1446
|
-
liquidityInfo: [bigint, bigint] & {
|
|
1447
|
-
windowCaps: bigint;
|
|
1448
|
-
openInterest: bigint;
|
|
1449
|
-
};
|
|
1450
|
-
};
|
|
1372
|
+
data: any;
|
|
1451
1373
|
message?: undefined;
|
|
1452
1374
|
} | {
|
|
1453
1375
|
code: number;
|
|
@@ -1662,9 +1584,9 @@ declare class Seamless {
|
|
|
1662
1584
|
private account;
|
|
1663
1585
|
private api;
|
|
1664
1586
|
constructor(configManager: ConfigManager, logger: Logger, utils: Utils, account: Account, api: Api);
|
|
1665
|
-
onCheckRelayer(account: string, relayer: string, chainId: number): Promise<
|
|
1587
|
+
onCheckRelayer(account: string, relayer: string, chainId: number): Promise<any>;
|
|
1666
1588
|
getUSDPermitParams(deadline: number, chainId: number): Promise<{
|
|
1667
|
-
token: string | ethers
|
|
1589
|
+
token: string | ethers.Addressable;
|
|
1668
1590
|
owner: string;
|
|
1669
1591
|
spender: string;
|
|
1670
1592
|
value: bigint;
|
|
@@ -1681,7 +1603,7 @@ declare class Seamless {
|
|
|
1681
1603
|
deadline: number;
|
|
1682
1604
|
data: string;
|
|
1683
1605
|
nonce: string;
|
|
1684
|
-
}, chainId: number, provider?: ethers
|
|
1606
|
+
}, chainId: number, provider?: ethers.Signer): Promise<ApiResponse<any>>;
|
|
1685
1607
|
authorizeSeamlessAccount({ approve, seamlessAddress, chainId }: {
|
|
1686
1608
|
approve: boolean;
|
|
1687
1609
|
seamlessAddress: string;
|
|
@@ -1703,7 +1625,7 @@ declare class Seamless {
|
|
|
1703
1625
|
data: {
|
|
1704
1626
|
masterAddress: string;
|
|
1705
1627
|
seamlessAccount: string;
|
|
1706
|
-
authorized:
|
|
1628
|
+
authorized: any;
|
|
1707
1629
|
};
|
|
1708
1630
|
}>;
|
|
1709
1631
|
exportSeamlessPrivateKey({ password, apiKey }: {
|
|
@@ -1722,9 +1644,9 @@ declare class Seamless {
|
|
|
1722
1644
|
}): Promise<{
|
|
1723
1645
|
code: number;
|
|
1724
1646
|
data: {
|
|
1725
|
-
masterAddress:
|
|
1647
|
+
masterAddress: any;
|
|
1726
1648
|
seamlessAccount: string;
|
|
1727
|
-
authorized:
|
|
1649
|
+
authorized: any;
|
|
1728
1650
|
apiKey: string;
|
|
1729
1651
|
};
|
|
1730
1652
|
}>;
|
|
@@ -1744,7 +1666,7 @@ declare class Seamless {
|
|
|
1744
1666
|
data: {
|
|
1745
1667
|
masterAddress: string;
|
|
1746
1668
|
seamlessAccount: string;
|
|
1747
|
-
authorized:
|
|
1669
|
+
authorized: any;
|
|
1748
1670
|
apiKey: string;
|
|
1749
1671
|
};
|
|
1750
1672
|
message?: undefined;
|
|
@@ -1834,13 +1756,13 @@ declare class Order {
|
|
|
1834
1756
|
message: string;
|
|
1835
1757
|
data: {
|
|
1836
1758
|
success: boolean;
|
|
1837
|
-
transactionHash:
|
|
1838
|
-
blockNumber:
|
|
1839
|
-
gasUsed:
|
|
1759
|
+
transactionHash: any;
|
|
1760
|
+
blockNumber: any;
|
|
1761
|
+
gasUsed: any;
|
|
1840
1762
|
status: string;
|
|
1841
1763
|
confirmations: number;
|
|
1842
1764
|
timestamp: number;
|
|
1843
|
-
receipt:
|
|
1765
|
+
receipt: any;
|
|
1844
1766
|
};
|
|
1845
1767
|
} | {
|
|
1846
1768
|
code: number;
|
|
@@ -1861,13 +1783,13 @@ declare class Order {
|
|
|
1861
1783
|
} | {
|
|
1862
1784
|
code: number;
|
|
1863
1785
|
message: string;
|
|
1864
|
-
transactionHash:
|
|
1865
|
-
blockNumber:
|
|
1866
|
-
gasUsed:
|
|
1786
|
+
transactionHash: any;
|
|
1787
|
+
blockNumber: any;
|
|
1788
|
+
gasUsed: any;
|
|
1867
1789
|
status: string;
|
|
1868
1790
|
confirmations: number;
|
|
1869
1791
|
timestamp: number;
|
|
1870
|
-
receipt:
|
|
1792
|
+
receipt: any;
|
|
1871
1793
|
data?: undefined;
|
|
1872
1794
|
} | {
|
|
1873
1795
|
code: number;
|
|
@@ -1890,13 +1812,13 @@ declare class Order {
|
|
|
1890
1812
|
message: string;
|
|
1891
1813
|
data: {
|
|
1892
1814
|
success: boolean;
|
|
1893
|
-
transactionHash:
|
|
1894
|
-
blockNumber:
|
|
1895
|
-
gasUsed:
|
|
1815
|
+
transactionHash: any;
|
|
1816
|
+
blockNumber: any;
|
|
1817
|
+
gasUsed: any;
|
|
1896
1818
|
status: string;
|
|
1897
1819
|
confirmations: number;
|
|
1898
1820
|
timestamp: number;
|
|
1899
|
-
receipt:
|
|
1821
|
+
receipt: any;
|
|
1900
1822
|
};
|
|
1901
1823
|
} | {
|
|
1902
1824
|
code: number;
|
|
@@ -1912,13 +1834,13 @@ declare class Order {
|
|
|
1912
1834
|
message: string;
|
|
1913
1835
|
data: {
|
|
1914
1836
|
success: boolean;
|
|
1915
|
-
transactionHash:
|
|
1916
|
-
blockNumber:
|
|
1917
|
-
gasUsed:
|
|
1837
|
+
transactionHash: any;
|
|
1838
|
+
blockNumber: any;
|
|
1839
|
+
gasUsed: any;
|
|
1918
1840
|
status: string;
|
|
1919
1841
|
confirmations: number;
|
|
1920
1842
|
timestamp: number;
|
|
1921
|
-
receipt:
|
|
1843
|
+
receipt: any;
|
|
1922
1844
|
};
|
|
1923
1845
|
} | {
|
|
1924
1846
|
code: number;
|
|
@@ -1944,7 +1866,7 @@ declare class Order {
|
|
|
1944
1866
|
}>;
|
|
1945
1867
|
updateOrderTpSl(params: UpdateOrderParams, quoteAddress: string, chainId: number): Promise<{
|
|
1946
1868
|
code: number;
|
|
1947
|
-
data:
|
|
1869
|
+
data: any;
|
|
1948
1870
|
message: string;
|
|
1949
1871
|
} | {
|
|
1950
1872
|
code: number;
|
|
@@ -2003,4 +1925,4 @@ declare class MyxClient {
|
|
|
2003
1925
|
getAccessToken(): Promise<string | null>;
|
|
2004
1926
|
}
|
|
2005
1927
|
|
|
2006
|
-
export { type AccessTokenRequest, type AccessTokenResponse$1 as AccessTokenResponse, type AccessTokenType, type AddFavoriteParams, type Address
|
|
1928
|
+
export { type AccessTokenRequest, type AccessTokenResponse$1 as AccessTokenResponse, type AccessTokenType, type AddFavoriteParams, type Address, type ApiResponse, type BaseDetailResponse, type BaseResponse, COMMON_LP_AMOUNT_DECIMALS, COMMON_PRICE_DECIMALS, ChainId, type ChainIdRequest, CloseTypeEnum, type DashboardType, Direction, DirectionEnum, ErrorCode, ExecTypeEnum, type FavoritesListItem, type FavoritesListParams, type FavoritesTimeInterval, type FavoritesType, type FetchForwarderGetParams, type FetchForwarderGetResponse, type FetchForwarderGetResponseData, ForwarderGetStatus, type ForwarderTxParams, type GetBaseDetailParams, type GetHistoryOrdersParams, type GetKlineDataParams, type GetMarketDetailParams, type GetPoolLevelConfigParams, type GetTickerDataParams, type HistoryOrderItem, type HttpEnvParams, HttpKlineIntervalEnum, type KlineDataItemType, type KlineDataResponse, type KlineResolution, type LevelConfig, MarketCapType, type MarketDetailResponse, type MarketInfo, type MarketPool, type MarketPoolResponse, MarketPoolState, MarketType, MyxClient, type MyxClientConfig, type MyxSubscriptionOptions, type NetWorkFee, type ObjectType, type OnKlineCallback, type OnOrderCallback, type OnPositionCallback, type OnTickersAllCallback, type OnTickersCallback, OperationEnum, OperationType, OracleType, type Order$1 as Order, OrderStatus, OrderStatusEnum, OrderType, OrderTypeEnum, type PlaceOrderParams, type PoolLevelConfig, type PoolOpenOrder, type PoolOpenOrdersResponse, type PoolResponse, type PoolSymbolAllResponse, type Position$1 as Position, type PositionHistoryItem, type PositionResponse, type PositionTpSlOrderParams, type PositionType, type PriceResponse, type PriceType, type RemoveFavoriteParams, type SearchMarketParams, type SearchResultContractItem, type SearchResultCookItem, type SearchResultEarnItem, type SearchResultResponse, SearchSecondTypeEnum, SearchTypeEnum, type StatDashBoardResponse, type TickerDataItem, type TickersDataResponse, TimeInForce, TradeFlowAccountTypeEnum, type TradeFlowItem, TradeFlowTypeEnum, type TradingResult, TriggerType, TriggerTypeEnum, type UpdateOrderTpSlParams, approve, index$2 as base, bigintAmountSlipperCalculator, bigintTradingGasPriceWithRatio, bigintTradingGasToRatioCalculator, getAllowanceApproved, getBalanceOf, getBaseDetail, getBaseUrlByEnv, getForwardUrlByEnv, getMarketDetail, getMarketList, getOraclePrice, getPoolDetail, getPoolList, getPoolOpenOrders, getPriceData, getPricesData, getTickerData, getTokenInfo, index as market, index$3 as pool, index$1 as quote };
|
package/dist/index.js
CHANGED
|
@@ -1807,7 +1807,7 @@ var RotationProvider = class extends import_providers.BaseProvider {
|
|
|
1807
1807
|
// package.json
|
|
1808
1808
|
var package_default = {
|
|
1809
1809
|
name: "@myx-trade/sdk",
|
|
1810
|
-
version: "0.1.
|
|
1810
|
+
version: "0.1.213",
|
|
1811
1811
|
private: false,
|
|
1812
1812
|
publishConfig: {
|
|
1813
1813
|
access: "public"
|
package/dist/index.mjs
CHANGED
|
@@ -1731,7 +1731,7 @@ var RotationProvider = class extends BaseProvider {
|
|
|
1731
1731
|
// package.json
|
|
1732
1732
|
var package_default = {
|
|
1733
1733
|
name: "@myx-trade/sdk",
|
|
1734
|
-
version: "0.1.
|
|
1734
|
+
version: "0.1.213",
|
|
1735
1735
|
private: false,
|
|
1736
1736
|
publishConfig: {
|
|
1737
1737
|
access: "public"
|