@orderly.network/types 2.1.3 → 2.2.0

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
@@ -8,7 +8,7 @@ declare global {
8
8
  };
9
9
  }
10
10
  }
11
- declare const _default: "2.1.3";
11
+ declare const _default: "2.2.0";
12
12
 
13
13
  declare enum AccountStatusEnum {
14
14
  EnableTradingWithoutConnected = -1,
@@ -36,8 +36,12 @@ declare enum NetworkStatusEnum {
36
36
  }
37
37
  declare const ARBITRUM_TESTNET_CHAINID = 421614;
38
38
  declare const SOLANA_TESTNET_CHAINID = 901901901;
39
+ declare const SOLANA_MAINNET_CHAINID = 900900900;
39
40
  declare const STORY_TESTNET_CHAINID = 1516;
40
41
  declare const MONAD_TESTNET_CHAINID = 10143;
42
+ declare const ABSTRACT_TESTNET_CHAINID = 11124;
43
+ declare const ABSTRACT_MAINNET_CHAINID = 2741;
44
+ declare const ABSTRACT_CHAIN_ID_MAP: Set<number>;
41
45
  declare const ARBITRUM_TESTNET_CHAINID_HEX = "0x66EEE";
42
46
  declare const MANTLE_TESTNET_CHAINID = 5003;
43
47
  declare const MANTLE_TESTNET_CHAINID_HEX = "0x138b";
@@ -60,6 +64,23 @@ declare const ArbitrumSepoliaChainInfo: {
60
64
  explorer_base_url: string;
61
65
  vault_address: string;
62
66
  };
67
+ declare const AbstractTestnetChainInfo: {
68
+ name: string;
69
+ public_rpc_url: string;
70
+ chain_id: string;
71
+ currency_symbol: string;
72
+ currency_decimal: number;
73
+ explorer_base_url: string;
74
+ vault_address: string;
75
+ };
76
+ declare const AbstractTestnetTokenInfo: {
77
+ chain_id: string;
78
+ contract_address: string;
79
+ decimals: number;
80
+ withdrawal_fee: number;
81
+ cross_chain_withdrawal_fee: number;
82
+ display_name: string;
83
+ };
63
84
  declare const SolanaDevnetChainInfo: {
64
85
  chain_id: string;
65
86
  currency_decimal: number;
@@ -1449,6 +1470,7 @@ declare enum ChainNamespace {
1449
1470
  evm = "EVM",
1450
1471
  solana = "SOL"
1451
1472
  }
1473
+ declare const AbstractChains: Set<number>;
1452
1474
  declare const SolanaChains: Set<number>;
1453
1475
 
1454
1476
  declare enum TrackerEventName {
@@ -1492,6 +1514,7 @@ declare enum WS_WalletStatusEnum {
1492
1514
  declare const LedgerWalletKey = "orderly:ledger-wallet";
1493
1515
  declare const ConnectorKey = "orderly:connectorKey";
1494
1516
  declare const ChainKey = "order:chain";
1517
+ declare const LinkDeviceKey = "orderly_link_device";
1495
1518
 
1496
1519
  declare class ApiError extends Error {
1497
1520
  private readonly code;
@@ -1593,4 +1616,4 @@ declare enum AssetHistoryStatusEnum {
1593
1616
  PENDING_REBALANCE = "PENDING_REBALANCE"
1594
1617
  }
1595
1618
 
1596
- export { API, ARBITRUM_MAINNET_CHAINID, ARBITRUM_MAINNET_CHAINID_HEX, ARBITRUM_TESTNET_CHAINID, ARBITRUM_TESTNET_CHAINID_HEX, AccountStatusEnum, type AlgoOrder, type AlgoOrderChildOrders, type AlgoOrderEntity, AlgoOrderRootType, AlgoOrderType, AnnouncementType, ApiError, Arbitrum, ArbitrumGoerli, ArbitrumSepolia, ArbitrumSepoliaChainInfo, ArbitrumSepoliaTokenInfo, AssetHistoryStatusEnum, Avalanche, BBOOrderType, BNB, Base, type BaseAlgoOrderEntity, type BaseOrder, BaseSepolia, type BracketOrder, type BracketOrderEntry, type Chain, type Chain as ChainConfig, type ChainInfo, ChainKey, ChainNamespace, type ChildOrder, ConnectorKey, type CurrentChain, DEPOSIT_FEE_RATE, Ethereum, ExchangeStatusEnum, Fantom, Fuji, LedgerWalletKey, Linea, MANTLE_TESTNET_CHAINID, MANTLE_TESTNET_CHAINID_HEX, MEDIA_TABLET, MONAD_TESTNET_CHAINID, Mantle, MantleSepolia, MaxUint256, type NativeCurrency, type NetworkId, NetworkStatusEnum, Optimism, OptimismGoerli, OptimismSepolia, type Optional, type OrderEntity, OrderLevel, OrderSide, OrderStatus, OrderType, type OrderlyOrder, Polygon, PolygonAmoy, PolygonzkEVM, PositionSide, type RegularOrder, type RequireKeys, SDKError, SOLANA_TESTNET_CHAINID, STORY_TESTNET_CHAINID, Sei, SolanaChains, SolanaDevnet, SolanaDevnetChainInfo, SolanaDevnetTokenInfo, StoryOdysseyTestnet, StoryTestnet, SystemStateEnum, type TPSLOrderEntry, TesntTokenFallback, TestnetChains, TrackerEventName, TriggerPriceType, WSMessage, WS_WalletStatusEnum, WithdrawStatus, chainsInfoMap, defaultMainnetChains, defaultTestnetChains, definedTypes, isNativeTokenChecker, nativeTokenAddress, _default as version, zkSyncEra };
1619
+ export { ABSTRACT_CHAIN_ID_MAP, ABSTRACT_MAINNET_CHAINID, ABSTRACT_TESTNET_CHAINID, API, ARBITRUM_MAINNET_CHAINID, ARBITRUM_MAINNET_CHAINID_HEX, ARBITRUM_TESTNET_CHAINID, ARBITRUM_TESTNET_CHAINID_HEX, AbstractChains, AbstractTestnetChainInfo, AbstractTestnetTokenInfo, AccountStatusEnum, type AlgoOrder, type AlgoOrderChildOrders, type AlgoOrderEntity, AlgoOrderRootType, AlgoOrderType, AnnouncementType, ApiError, Arbitrum, ArbitrumGoerli, ArbitrumSepolia, ArbitrumSepoliaChainInfo, ArbitrumSepoliaTokenInfo, AssetHistoryStatusEnum, Avalanche, BBOOrderType, BNB, Base, type BaseAlgoOrderEntity, type BaseOrder, BaseSepolia, type BracketOrder, type BracketOrderEntry, type Chain, type Chain as ChainConfig, type ChainInfo, ChainKey, ChainNamespace, type ChildOrder, ConnectorKey, type CurrentChain, DEPOSIT_FEE_RATE, Ethereum, ExchangeStatusEnum, Fantom, Fuji, LedgerWalletKey, Linea, LinkDeviceKey, MANTLE_TESTNET_CHAINID, MANTLE_TESTNET_CHAINID_HEX, MEDIA_TABLET, MONAD_TESTNET_CHAINID, Mantle, MantleSepolia, MaxUint256, type NativeCurrency, type NetworkId, NetworkStatusEnum, Optimism, OptimismGoerli, OptimismSepolia, type Optional, type OrderEntity, OrderLevel, OrderSide, OrderStatus, OrderType, type OrderlyOrder, Polygon, PolygonAmoy, PolygonzkEVM, PositionSide, type RegularOrder, type RequireKeys, SDKError, SOLANA_MAINNET_CHAINID, SOLANA_TESTNET_CHAINID, STORY_TESTNET_CHAINID, Sei, SolanaChains, SolanaDevnet, SolanaDevnetChainInfo, SolanaDevnetTokenInfo, StoryOdysseyTestnet, StoryTestnet, SystemStateEnum, type TPSLOrderEntry, TesntTokenFallback, TestnetChains, TrackerEventName, TriggerPriceType, WSMessage, WS_WalletStatusEnum, WithdrawStatus, chainsInfoMap, defaultMainnetChains, defaultTestnetChains, definedTypes, isNativeTokenChecker, nativeTokenAddress, _default as version, zkSyncEra };
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ declare global {
8
8
  };
9
9
  }
10
10
  }
11
- declare const _default: "2.1.3";
11
+ declare const _default: "2.2.0";
12
12
 
13
13
  declare enum AccountStatusEnum {
14
14
  EnableTradingWithoutConnected = -1,
@@ -36,8 +36,12 @@ declare enum NetworkStatusEnum {
36
36
  }
37
37
  declare const ARBITRUM_TESTNET_CHAINID = 421614;
38
38
  declare const SOLANA_TESTNET_CHAINID = 901901901;
39
+ declare const SOLANA_MAINNET_CHAINID = 900900900;
39
40
  declare const STORY_TESTNET_CHAINID = 1516;
40
41
  declare const MONAD_TESTNET_CHAINID = 10143;
42
+ declare const ABSTRACT_TESTNET_CHAINID = 11124;
43
+ declare const ABSTRACT_MAINNET_CHAINID = 2741;
44
+ declare const ABSTRACT_CHAIN_ID_MAP: Set<number>;
41
45
  declare const ARBITRUM_TESTNET_CHAINID_HEX = "0x66EEE";
42
46
  declare const MANTLE_TESTNET_CHAINID = 5003;
43
47
  declare const MANTLE_TESTNET_CHAINID_HEX = "0x138b";
@@ -60,6 +64,23 @@ declare const ArbitrumSepoliaChainInfo: {
60
64
  explorer_base_url: string;
61
65
  vault_address: string;
62
66
  };
67
+ declare const AbstractTestnetChainInfo: {
68
+ name: string;
69
+ public_rpc_url: string;
70
+ chain_id: string;
71
+ currency_symbol: string;
72
+ currency_decimal: number;
73
+ explorer_base_url: string;
74
+ vault_address: string;
75
+ };
76
+ declare const AbstractTestnetTokenInfo: {
77
+ chain_id: string;
78
+ contract_address: string;
79
+ decimals: number;
80
+ withdrawal_fee: number;
81
+ cross_chain_withdrawal_fee: number;
82
+ display_name: string;
83
+ };
63
84
  declare const SolanaDevnetChainInfo: {
64
85
  chain_id: string;
65
86
  currency_decimal: number;
@@ -1449,6 +1470,7 @@ declare enum ChainNamespace {
1449
1470
  evm = "EVM",
1450
1471
  solana = "SOL"
1451
1472
  }
1473
+ declare const AbstractChains: Set<number>;
1452
1474
  declare const SolanaChains: Set<number>;
1453
1475
 
1454
1476
  declare enum TrackerEventName {
@@ -1492,6 +1514,7 @@ declare enum WS_WalletStatusEnum {
1492
1514
  declare const LedgerWalletKey = "orderly:ledger-wallet";
1493
1515
  declare const ConnectorKey = "orderly:connectorKey";
1494
1516
  declare const ChainKey = "order:chain";
1517
+ declare const LinkDeviceKey = "orderly_link_device";
1495
1518
 
1496
1519
  declare class ApiError extends Error {
1497
1520
  private readonly code;
@@ -1593,4 +1616,4 @@ declare enum AssetHistoryStatusEnum {
1593
1616
  PENDING_REBALANCE = "PENDING_REBALANCE"
1594
1617
  }
1595
1618
 
1596
- export { API, ARBITRUM_MAINNET_CHAINID, ARBITRUM_MAINNET_CHAINID_HEX, ARBITRUM_TESTNET_CHAINID, ARBITRUM_TESTNET_CHAINID_HEX, AccountStatusEnum, type AlgoOrder, type AlgoOrderChildOrders, type AlgoOrderEntity, AlgoOrderRootType, AlgoOrderType, AnnouncementType, ApiError, Arbitrum, ArbitrumGoerli, ArbitrumSepolia, ArbitrumSepoliaChainInfo, ArbitrumSepoliaTokenInfo, AssetHistoryStatusEnum, Avalanche, BBOOrderType, BNB, Base, type BaseAlgoOrderEntity, type BaseOrder, BaseSepolia, type BracketOrder, type BracketOrderEntry, type Chain, type Chain as ChainConfig, type ChainInfo, ChainKey, ChainNamespace, type ChildOrder, ConnectorKey, type CurrentChain, DEPOSIT_FEE_RATE, Ethereum, ExchangeStatusEnum, Fantom, Fuji, LedgerWalletKey, Linea, MANTLE_TESTNET_CHAINID, MANTLE_TESTNET_CHAINID_HEX, MEDIA_TABLET, MONAD_TESTNET_CHAINID, Mantle, MantleSepolia, MaxUint256, type NativeCurrency, type NetworkId, NetworkStatusEnum, Optimism, OptimismGoerli, OptimismSepolia, type Optional, type OrderEntity, OrderLevel, OrderSide, OrderStatus, OrderType, type OrderlyOrder, Polygon, PolygonAmoy, PolygonzkEVM, PositionSide, type RegularOrder, type RequireKeys, SDKError, SOLANA_TESTNET_CHAINID, STORY_TESTNET_CHAINID, Sei, SolanaChains, SolanaDevnet, SolanaDevnetChainInfo, SolanaDevnetTokenInfo, StoryOdysseyTestnet, StoryTestnet, SystemStateEnum, type TPSLOrderEntry, TesntTokenFallback, TestnetChains, TrackerEventName, TriggerPriceType, WSMessage, WS_WalletStatusEnum, WithdrawStatus, chainsInfoMap, defaultMainnetChains, defaultTestnetChains, definedTypes, isNativeTokenChecker, nativeTokenAddress, _default as version, zkSyncEra };
1619
+ export { ABSTRACT_CHAIN_ID_MAP, ABSTRACT_MAINNET_CHAINID, ABSTRACT_TESTNET_CHAINID, API, ARBITRUM_MAINNET_CHAINID, ARBITRUM_MAINNET_CHAINID_HEX, ARBITRUM_TESTNET_CHAINID, ARBITRUM_TESTNET_CHAINID_HEX, AbstractChains, AbstractTestnetChainInfo, AbstractTestnetTokenInfo, AccountStatusEnum, type AlgoOrder, type AlgoOrderChildOrders, type AlgoOrderEntity, AlgoOrderRootType, AlgoOrderType, AnnouncementType, ApiError, Arbitrum, ArbitrumGoerli, ArbitrumSepolia, ArbitrumSepoliaChainInfo, ArbitrumSepoliaTokenInfo, AssetHistoryStatusEnum, Avalanche, BBOOrderType, BNB, Base, type BaseAlgoOrderEntity, type BaseOrder, BaseSepolia, type BracketOrder, type BracketOrderEntry, type Chain, type Chain as ChainConfig, type ChainInfo, ChainKey, ChainNamespace, type ChildOrder, ConnectorKey, type CurrentChain, DEPOSIT_FEE_RATE, Ethereum, ExchangeStatusEnum, Fantom, Fuji, LedgerWalletKey, Linea, LinkDeviceKey, MANTLE_TESTNET_CHAINID, MANTLE_TESTNET_CHAINID_HEX, MEDIA_TABLET, MONAD_TESTNET_CHAINID, Mantle, MantleSepolia, MaxUint256, type NativeCurrency, type NetworkId, NetworkStatusEnum, Optimism, OptimismGoerli, OptimismSepolia, type Optional, type OrderEntity, OrderLevel, OrderSide, OrderStatus, OrderType, type OrderlyOrder, Polygon, PolygonAmoy, PolygonzkEVM, PositionSide, type RegularOrder, type RequireKeys, SDKError, SOLANA_MAINNET_CHAINID, SOLANA_TESTNET_CHAINID, STORY_TESTNET_CHAINID, Sei, SolanaChains, SolanaDevnet, SolanaDevnetChainInfo, SolanaDevnetTokenInfo, StoryOdysseyTestnet, StoryTestnet, SystemStateEnum, type TPSLOrderEntry, TesntTokenFallback, TestnetChains, TrackerEventName, TriggerPriceType, WSMessage, WS_WalletStatusEnum, WithdrawStatus, chainsInfoMap, defaultMainnetChains, defaultTestnetChains, definedTypes, isNativeTokenChecker, nativeTokenAddress, _default as version, zkSyncEra };
package/dist/index.js CHANGED
@@ -30,10 +30,16 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
+ ABSTRACT_CHAIN_ID_MAP: () => ABSTRACT_CHAIN_ID_MAP,
34
+ ABSTRACT_MAINNET_CHAINID: () => ABSTRACT_MAINNET_CHAINID,
35
+ ABSTRACT_TESTNET_CHAINID: () => ABSTRACT_TESTNET_CHAINID,
33
36
  ARBITRUM_MAINNET_CHAINID: () => ARBITRUM_MAINNET_CHAINID,
34
37
  ARBITRUM_MAINNET_CHAINID_HEX: () => ARBITRUM_MAINNET_CHAINID_HEX,
35
38
  ARBITRUM_TESTNET_CHAINID: () => ARBITRUM_TESTNET_CHAINID,
36
39
  ARBITRUM_TESTNET_CHAINID_HEX: () => ARBITRUM_TESTNET_CHAINID_HEX,
40
+ AbstractChains: () => AbstractChains,
41
+ AbstractTestnetChainInfo: () => AbstractTestnetChainInfo,
42
+ AbstractTestnetTokenInfo: () => AbstractTestnetTokenInfo,
37
43
  AccountStatusEnum: () => AccountStatusEnum,
38
44
  AlgoOrderRootType: () => AlgoOrderRootType,
39
45
  AlgoOrderType: () => AlgoOrderType,
@@ -60,6 +66,7 @@ __export(src_exports, {
60
66
  Fuji: () => Fuji,
61
67
  LedgerWalletKey: () => LedgerWalletKey,
62
68
  Linea: () => Linea,
69
+ LinkDeviceKey: () => LinkDeviceKey,
63
70
  MANTLE_TESTNET_CHAINID: () => MANTLE_TESTNET_CHAINID,
64
71
  MANTLE_TESTNET_CHAINID_HEX: () => MANTLE_TESTNET_CHAINID_HEX,
65
72
  MEDIA_TABLET: () => MEDIA_TABLET,
@@ -79,6 +86,7 @@ __export(src_exports, {
79
86
  PolygonAmoy: () => PolygonAmoy,
80
87
  PolygonzkEVM: () => PolygonzkEVM,
81
88
  SDKError: () => SDKError,
89
+ SOLANA_MAINNET_CHAINID: () => SOLANA_MAINNET_CHAINID,
82
90
  SOLANA_TESTNET_CHAINID: () => SOLANA_TESTNET_CHAINID,
83
91
  STORY_TESTNET_CHAINID: () => STORY_TESTNET_CHAINID,
84
92
  Sei: () => Sei,
@@ -110,9 +118,9 @@ module.exports = __toCommonJS(src_exports);
110
118
  // src/version.ts
111
119
  if (typeof window !== "undefined") {
112
120
  window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};
113
- window.__ORDERLY_VERSION__["@orderly.network/types"] = "2.1.3";
121
+ window.__ORDERLY_VERSION__["@orderly.network/types"] = "2.2.0";
114
122
  }
115
- var version_default = "2.1.3";
123
+ var version_default = "2.2.0";
116
124
 
117
125
  // src/constants.ts
118
126
  var AccountStatusEnum = /* @__PURE__ */ ((AccountStatusEnum2) => {
@@ -144,8 +152,15 @@ var NetworkStatusEnum = /* @__PURE__ */ ((NetworkStatusEnum2) => {
144
152
  })(NetworkStatusEnum || {});
145
153
  var ARBITRUM_TESTNET_CHAINID = 421614;
146
154
  var SOLANA_TESTNET_CHAINID = 901901901;
155
+ var SOLANA_MAINNET_CHAINID = 900900900;
147
156
  var STORY_TESTNET_CHAINID = 1516;
148
157
  var MONAD_TESTNET_CHAINID = 10143;
158
+ var ABSTRACT_TESTNET_CHAINID = 11124;
159
+ var ABSTRACT_MAINNET_CHAINID = 2741;
160
+ var ABSTRACT_CHAIN_ID_MAP = /* @__PURE__ */ new Set([
161
+ ABSTRACT_TESTNET_CHAINID,
162
+ ABSTRACT_MAINNET_CHAINID
163
+ ]);
149
164
  var ARBITRUM_TESTNET_CHAINID_HEX = "0x66EEE";
150
165
  var MANTLE_TESTNET_CHAINID = 5003;
151
166
  var MANTLE_TESTNET_CHAINID_HEX = "0x138b";
@@ -167,6 +182,23 @@ var ArbitrumSepoliaChainInfo = {
167
182
  explorer_base_url: "https://sepolia.arbiscan.io",
168
183
  vault_address: "0x0EaC556c0C2321BA25b9DC01e4e3c95aD5CDCd2f"
169
184
  };
185
+ var AbstractTestnetChainInfo = {
186
+ name: "Abstract Testnet",
187
+ public_rpc_url: "https://api.testnet.abs.xyz",
188
+ chain_id: "11124",
189
+ currency_symbol: "ETH",
190
+ currency_decimal: 18,
191
+ explorer_base_url: "https://sepolia.abscan.org",
192
+ vault_address: "0xf14Ff11F3bb1011ff42665Ec869c7827c43745Fd"
193
+ };
194
+ var AbstractTestnetTokenInfo = {
195
+ chain_id: "11124",
196
+ contract_address: "0xa0BB43E2eA7fcE91F07e628d72fD6333e80F47D2",
197
+ decimals: 6,
198
+ withdrawal_fee: 1,
199
+ cross_chain_withdrawal_fee: 2,
200
+ display_name: "USDC"
201
+ };
170
202
  var SolanaDevnetChainInfo = {
171
203
  chain_id: "901901901",
172
204
  currency_decimal: 9,
@@ -952,6 +984,7 @@ var ChainNamespace = /* @__PURE__ */ ((ChainNamespace2) => {
952
984
  ChainNamespace2["solana"] = "SOL";
953
985
  return ChainNamespace2;
954
986
  })(ChainNamespace || {});
987
+ var AbstractChains = /* @__PURE__ */ new Set([2741, 11124]);
955
988
  var SolanaChains = /* @__PURE__ */ new Set([901901901, 900900900]);
956
989
 
957
990
  // src/track.ts
@@ -994,6 +1027,7 @@ var WS_WalletStatusEnum = /* @__PURE__ */ ((WS_WalletStatusEnum2) => {
994
1027
  var LedgerWalletKey = "orderly:ledger-wallet";
995
1028
  var ConnectorKey = "orderly:connectorKey";
996
1029
  var ChainKey = "order:chain";
1030
+ var LinkDeviceKey = "orderly_link_device";
997
1031
 
998
1032
  // src/errors.ts
999
1033
  var ApiError = class extends Error {
@@ -1064,10 +1098,16 @@ var AssetHistoryStatusEnum = /* @__PURE__ */ ((AssetHistoryStatusEnum2) => {
1064
1098
  })(AssetHistoryStatusEnum || {});
1065
1099
  // Annotate the CommonJS export names for ESM import in node:
1066
1100
  0 && (module.exports = {
1101
+ ABSTRACT_CHAIN_ID_MAP,
1102
+ ABSTRACT_MAINNET_CHAINID,
1103
+ ABSTRACT_TESTNET_CHAINID,
1067
1104
  ARBITRUM_MAINNET_CHAINID,
1068
1105
  ARBITRUM_MAINNET_CHAINID_HEX,
1069
1106
  ARBITRUM_TESTNET_CHAINID,
1070
1107
  ARBITRUM_TESTNET_CHAINID_HEX,
1108
+ AbstractChains,
1109
+ AbstractTestnetChainInfo,
1110
+ AbstractTestnetTokenInfo,
1071
1111
  AccountStatusEnum,
1072
1112
  AlgoOrderRootType,
1073
1113
  AlgoOrderType,
@@ -1094,6 +1134,7 @@ var AssetHistoryStatusEnum = /* @__PURE__ */ ((AssetHistoryStatusEnum2) => {
1094
1134
  Fuji,
1095
1135
  LedgerWalletKey,
1096
1136
  Linea,
1137
+ LinkDeviceKey,
1097
1138
  MANTLE_TESTNET_CHAINID,
1098
1139
  MANTLE_TESTNET_CHAINID_HEX,
1099
1140
  MEDIA_TABLET,
@@ -1113,6 +1154,7 @@ var AssetHistoryStatusEnum = /* @__PURE__ */ ((AssetHistoryStatusEnum2) => {
1113
1154
  PolygonAmoy,
1114
1155
  PolygonzkEVM,
1115
1156
  SDKError,
1157
+ SOLANA_MAINNET_CHAINID,
1116
1158
  SOLANA_TESTNET_CHAINID,
1117
1159
  STORY_TESTNET_CHAINID,
1118
1160
  Sei,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/version.ts","../src/constants.ts","../src/types/api.ts","../src/order.ts","../src/withdraw.ts","../src/chains.ts","../src/track.ts","../src/wallet.ts","../src/storageKey.ts","../src/errors.ts","../src/sign.ts","../src/assetHistory.ts"],"sourcesContent":["export { default as version } from \"./version\";\nexport * from \"./constants\";\nexport * from \"./types/api\";\n// export * from \"./order\";\nexport {\n OrderType,\n OrderSide,\n OrderStatus,\n AlgoOrderRootType,\n AlgoOrderType,\n TriggerPriceType,\n BBOOrderType,\n OrderLevel,\n} from \"./order\";\nexport type {\n OrderEntity,\n AlgoOrderEntity,\n TPSLOrderEntry,\n BaseAlgoOrderEntity,\n AlgoOrderChildOrders,\n Optional,\n PositionSide,\n BracketOrderEntry,\n RequireKeys,\n BaseOrder,\n RegularOrder,\n AlgoOrder,\n OrderlyOrder,\n ChildOrder,\n BracketOrder,\n} from \"./order\";\nexport * from \"./withdraw\";\nexport * from \"./chains\";\nexport * from \"./track\";\nexport type { Chain as ChainConfig, ChainInfo, NativeCurrency } from \"./chains\";\nexport * from \"./wallet\";\nexport * from \"./storageKey\";\nexport { ApiError, SDKError } from \"./errors\";\n\nexport { definedTypes } from \"./sign\";\nexport * as superstruct from \"superstruct\";\nexport * from \"./assetHistory\";\n","\ndeclare global {\n interface Window {\n __ORDERLY_VERSION__?: {\n [key: string]: string;\n };\n }\n}\nif(typeof window !== 'undefined') {\n window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};\n window.__ORDERLY_VERSION__[\"@orderly.network/types\"] = \"2.1.3\";\n};\n\nexport default \"2.1.3\";\n","export enum AccountStatusEnum {\n EnableTradingWithoutConnected = -1,\n NotConnected = 0,\n Connected = 1,\n NotSignedIn = 2,\n SignedIn = 3,\n DisabledTrading = 4,\n EnableTrading = 5,\n}\n\nexport enum SystemStateEnum {\n Loading = 0,\n Error = 1,\n Ready = 10,\n}\n\nexport enum ExchangeStatusEnum {\n Normal = 0,\n Maintain = 1,\n}\n\nexport type NetworkId = \"testnet\" | \"mainnet\";\n\nexport enum NetworkStatusEnum {\n unknown = 0,\n unsupported = 1,\n supported = 2,\n}\n\n// Testnet\n// Arbitrum Goerli\n// export const ARBITRUM_TESTNET_CHAINID = 421613;\n// export const ARBITRUM_TESTNET_CHAINID_HEX = \"0x66EED\";\n\n// Arbitrum Sepolia\nexport const ARBITRUM_TESTNET_CHAINID = 421614;\nexport const SOLANA_TESTNET_CHAINID = 901901901;\nexport const STORY_TESTNET_CHAINID = 1516;\nexport const MONAD_TESTNET_CHAINID = 10143;\nexport const ARBITRUM_TESTNET_CHAINID_HEX = \"0x66EEE\";\n\nexport const MANTLE_TESTNET_CHAINID = 5003;\nexport const MANTLE_TESTNET_CHAINID_HEX = \"0x138b\";\n\n// Mainnet\nexport const ARBITRUM_MAINNET_CHAINID = 42161;\nexport const ARBITRUM_MAINNET_CHAINID_HEX = \"0xa4b1\";\n\nexport const MEDIA_TABLET = \"(max-width: 768px)\";\n\nexport const DEPOSIT_FEE_RATE = 1.05;\n\n/**\n * A constant for the maximum value for a ``uint256``.\n */\nexport const MaxUint256: bigint = BigInt(\n \"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"\n);\n\nexport const nativeTokenAddress = \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\";\n\nexport const isNativeTokenChecker = (address: string) =>\n address === nativeTokenAddress;\n\nexport const ArbitrumSepoliaChainInfo = {\n name: \"Arbitrum Sepolia\",\n public_rpc_url: \"https://arbitrum-sepolia.gateway.tenderly.co\",\n chain_id: \"421614\",\n currency_symbol: \"ETH\",\n currency_decimal: 18,\n explorer_base_url: \"https://sepolia.arbiscan.io\",\n vault_address: \"0x0EaC556c0C2321BA25b9DC01e4e3c95aD5CDCd2f\",\n}\nexport const SolanaDevnetChainInfo = {\n chain_id: \"901901901\",\n currency_decimal: 9,\n currency_symbol: \"SOL\",\n explorer_base_url: \"https://explorer.solana.com/?cluster=devnet\",\n name: \"Solana-Devnet\",\n public_rpc_url: \"https://api.devnet.solana.com\",\n vault_address: \"9shwxWDUNhtwkHocsUAmrNAQfBH2DHh4njdAEdHZZkF2\",\n}\n\nexport const SolanaDevnetTokenInfo = {\n chain_id: \"901901901\",\n contract_address: \"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 5,\n display_name: \"USDC\"\n}\nexport const ArbitrumSepoliaTokenInfo = {\n chain_id: \"421614\",\n contract_address: \"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 2,\n display_name: \"USDC\"\n}\n\nexport const TesntTokenFallback = (testnetTokens: any) => [\n {\n token: \"USDC\",\n token_hash: \"0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa\",\n decimals: 6,\n minimum_withdraw_amount: 0.000001,\n chain_details: testnetTokens\n }\n]","import { AlgoOrderRootType, OrderSide, OrderType } from \"../order\";\n\nexport enum AnnouncementType {\n Listing = \"LISTING\",\n Maintenance = \"MAINTENANCE\",\n Delisting = \"DELISTING\",\n}\n\nexport declare namespace API {\n //v1/public/token\n export interface Token {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n chain_details: ChainDetail[];\n }\n\n //v1/public/token\n export interface ChainDetail {\n chain_id: string;\n contract_address: string;\n decimals: number;\n }\n\n // ws market, api v1/public/futures\n export interface MarketInfo {\n symbol: string;\n index_price: number;\n mark_price: number;\n sum_unitary_funding: number;\n est_funding_rate: number;\n last_funding_rate: number;\n next_funding_time: number;\n open_interest: string;\n \"24h_open\": number;\n \"24h_close\": number;\n \"24h_high\": number;\n \"24h_low\": number;\n /**\n * @deprecated\n * spelling mistake, use 24h_volume to instead, will be remove next version\n */\n \"24h_volumn\": number;\n \"24h_volume\": number;\n \"24h_amount\": number;\n }\n\n export interface MarketInfoExt extends MarketInfo {\n change: number;\n \"24h_volume\": number;\n }\n\n export interface Announcement {\n last_updated_time?: number | null;\n rows?: Array<{\n announcement_id: number | string;\n message: string;\n i18n?: Record<PropertyKey, string | null>;\n url?: string | null;\n type?: AnnouncementType | null;\n updated_time?: number | null;\n }>;\n }\n\n /**\n * v1/public/info\n */\n export interface Symbol {\n symbol: string;\n quote_min: number;\n quote_max: number;\n quote_tick: number;\n base_min: number;\n base_max: number;\n base_tick: number;\n min_notional: number;\n price_range: number;\n price_scope: number;\n std_liquidation_fee: number;\n liquidator_fee: number;\n claim_insurance_fund_discount: number;\n funding_period: number;\n cap_funding: number;\n floor_funding: number;\n interest_rate: number;\n created_time: number;\n updated_time: number;\n imr_factor: number;\n base_mmr: number;\n base_imr: number;\n }\n\n export interface TokenItem {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n chain_details: ChainDetail[];\n }\n\n export interface ChainDetail {\n chain_id: string;\n contract_address: string;\n decimals: number;\n withdrawal_fee: number;\n }\n\n export interface SymbolExt extends Symbol {\n base: string;\n base_dp: number;\n\n quote: string;\n quote_dp: number;\n type: string;\n name: string;\n }\n\n export interface Order {\n symbol: string;\n status: string;\n side: string;\n order_id: number;\n algo_order_id?: number;\n user_id: number;\n price: number | null;\n type: string;\n quantity: number;\n amount: null;\n visible: number;\n executed: number;\n total_fee: number;\n fee_asset: string;\n client_order_id: null;\n average_executed_price: number;\n total_executed_quantity: number;\n visible_quantity: number;\n created_time: number;\n updated_time: number;\n reduce_only: boolean;\n trigger_price?: number;\n order_tag?: string;\n }\n\n export interface OrderExt extends Order {\n mark_price: string;\n }\n\n export interface AlgoOrder {\n algo_order_id: number;\n root_algo_order_id: number;\n parent_algo_order_id: number;\n parent_algo_type: AlgoOrderRootType;\n symbol: string;\n algo_type: string;\n child_orders: AlgoOrder[];\n side: string;\n quantity: number;\n is_triggered: boolean;\n is_activated: boolean;\n trigger_price: number;\n trigger_price_type: string;\n type: OrderType;\n root_algo_status: string;\n algo_status: string;\n price?: number;\n total_executed_quantity: number;\n visible_quantity: number;\n total_fee: number;\n fee_asset: string;\n reduce_only: boolean;\n created_time: number;\n updated_time: number;\n order_tag?: string;\n }\n\n export interface AlgoOrderExt extends AlgoOrder {\n mark_price: string;\n position?: Partial<Position>;\n tp_trigger_price?: number;\n sl_trigger_price?: number;\n }\n\n export interface OrderResponse {\n rows: (Order | AlgoOrder)[];\n meta: {\n total: number;\n current_page: number;\n records_per_page: number;\n };\n }\n\n export interface FundingRate {\n symbol: string;\n est_funding_rate: number;\n est_funding_rate_timestamp: number;\n last_funding_rate: number;\n last_funding_rate_timestamp: number;\n next_funding_time: number;\n sum_unitary_funding: number;\n }\n\n export interface FundingPeriodData {\n rate: number;\n positive: number;\n negative: number;\n }\n\n export interface FundingHistory {\n symbol: string;\n data_start_time: string;\n funding: {\n last: FundingPeriodData;\n \"1d\": FundingPeriodData;\n \"3d\": FundingPeriodData;\n \"7d\": FundingPeriodData;\n \"14d\": FundingPeriodData;\n \"30d\": FundingPeriodData;\n \"90d\": FundingPeriodData;\n };\n }\n\n export interface PositionInfo extends PositionAggregated {\n // margin_ratio: number;\n // initial_margin_ratio: number;\n // maintenance_margin_ratio: number;\n // open_margin_ratio: number;\n // current_margin_ratio_with_orders: number;\n // initial_margin_ratio_with_orders: number;\n // maintenance_margin_ratio_with_orders: number;\n // total_collateral_value: number;\n // free_collateral: number;\n rows: Position[];\n // total_pnl_24_h: number;\n }\n\n export interface PositionAggregated {\n margin_ratio: number;\n initial_margin_ratio: number;\n maintenance_margin_ratio: number;\n open_margin_ratio: number;\n current_margin_ratio_with_orders: number;\n initial_margin_ratio_with_orders: number;\n maintenance_margin_ratio_with_orders: number;\n total_collateral_value: number;\n free_collateral: number;\n total_pnl_24_h: number;\n /**\n * @deprecated use total_unreal_pnl instead\n */\n unrealPnL: number;\n total_unreal_pnl: number;\n total_unreal_pnl_index?: number;\n /**\n * @deprecated use total_unsettled_pnl instead\n */\n unsettledPnL: number;\n total_unsettled_pnl: number;\n notional: number;\n unrealPnlROI: number;\n unrealPnlROI_index?: number;\n }\n\n export interface Position {\n symbol: string;\n position_qty: number;\n cost_position: number;\n last_sum_unitary_funding: number;\n pending_long_qty: number;\n pending_short_qty: number;\n settle_price: number;\n average_open_price: number;\n unrealized_pnl: number;\n unrealized_pnl_index?: number;\n unrealized_pnl_ROI: number;\n unsettled_pnl: number;\n unsettled_pnl_ROI: number;\n unrealized_pnl_ROI_index?: number;\n mark_price: number;\n index_price?: number;\n est_liq_price: number | null;\n timestamp: number;\n /**\n * Maintenance margin ratio\n */\n mmr: number;\n imr: number;\n IMR_withdraw_orders: number;\n MMR_with_orders: number;\n pnl_24_h: number;\n fee_24_h: number;\n }\n\n export interface PositionExt extends Position {\n notional: number;\n mm: number;\n }\n\n export interface PositionTPSLExt extends PositionExt {\n tp_trigger_price?: number;\n sl_trigger_price?: number;\n\n // has_position_tp_sl: boolean;\n\n /**\n * related position tp/sl order\n */\n algo_order?: AlgoOrder;\n }\n\n export interface PositionsTPSLExt extends PositionAggregated {\n rows: PositionTPSLExt[];\n }\n\n export interface Trade {\n symbol: Symbol;\n side: OrderSide;\n ts: number;\n executed_price: number;\n executed_quantity: number;\n executed_timestamp: number;\n }\n\n export interface Holding {\n token: string;\n holding: number;\n frozen: number;\n pending_short: number;\n updated_time: number;\n }\n\n export interface AccountInfo {\n account_id: string;\n email: string;\n account_mode: string;\n tier: string;\n futures_tier: string;\n maintenance_cancel_orders: boolean;\n taker_fee_rate: number;\n maker_fee_rate: number;\n max_leverage: number;\n futures_taker_fee_rate: number;\n futures_maker_fee_rate: number;\n imr_factor: { [key: string]: number };\n max_notional: { [key: string]: number };\n }\n\n export interface Chain {\n dexs: string[];\n network_infos: NetworkInfos;\n token_infos: TokenInfo[];\n nativeToken?: TokenInfo;\n // nativeToken\n }\n\n export interface NetworkInfos {\n name: string;\n shortName: string;\n public_rpc_url: string;\n chain_id: number;\n currency_symbol: string;\n bridge_enable: boolean;\n mainnet: boolean;\n est_txn_mins: number | null;\n explorer_base_url: string;\n bridgeless?: boolean;\n withdrawal_fee?: number;\n minimum_withdraw_amount?: number;\n }\n\n export interface TokenInfo {\n address: string;\n symbol: string;\n decimals: number;\n display_name: string;\n precision: number;\n }\n\n export interface Chain {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n chain_details: ChainDetail[];\n }\n\n // export interface Token{\n\n // }\n\n export interface ChainDetail {\n chain_id: string;\n chain_name?: string;\n contract_address: string;\n decimals: number;\n withdrawal_fee: number;\n }\n\n export interface AssetHistory {\n meta: RecordsMeta;\n rows: AssetHistoryRow[];\n }\n\n export interface RecordsMeta {\n total: number;\n records_per_page: number;\n current_page: number;\n }\n\n export interface AssetHistoryRow {\n id: string;\n tx_id: string;\n side: string;\n token: string;\n amount: number;\n fee: number;\n trans_status: string;\n created_time: number;\n updated_time: number;\n chain_id: string;\n }\n\n export interface FundingFeeHistory {\n meta: RecordsMeta;\n rows: FundingFeeRow[];\n }\n\n export interface FundingFeeRow {\n symbol: string;\n funding_rate: number;\n mark_price: number;\n funding_fee: number;\n payment_type: string;\n status: string;\n created_time: number;\n updated_time: number;\n }\n\n export interface DailyRow {\n account_value: number;\n broker_id: string;\n date: string;\n perp_volume: number;\n pnl: number;\n snapshot_time?: number;\n }\n\n export interface PositionHistory {\n position_id: number; // Unique identifier for the position\n liquidation_id?: number; // Unique identifier for the position\n position_status: string; // Status of the position\n type: string; // Type of the position activity\n symbol: string; // Trading pair symbol\n avg_open_price: number; // Average open price of the position\n avg_close_price: number; // Average close price of the position\n max_position_qty: number; // Maximum quantity held in the position\n closed_position_qty: number; // Quantity closed in the position\n side: \"LONG\" | \"SHORT\"; // Side of the position\n trading_fee: number; // Fee charged for trading\n accumulated_funding_fee: number; // Accumulated funding fee for the position\n insurance_fund_fee: number; // Fee contributed to the insurance fund\n liquidator_fee: number; // Fee paid to the liquidator\n realized_pnl: number; // Realized profit and loss\n open_timestamp: number; // Timestamp when the position was opened\n close_timestamp: number; // Timestamp when the position was closed\n last_update_time: number; // Timestamp of the last update to the position\n }\n\n export interface LiquidationPositionByPerp {\n abs_liquidation_fee: number;\n cost_position_transfer: number;\n liquidator_fee: number;\n position_qty: number;\n symbol: string;\n transfer_price: number;\n }\n\n export interface Liquidation {\n liquidation_id: number;\n timestamp: number;\n transfer_amount_to_insurance_fund: number;\n positions_by_perp: LiquidationPositionByPerp[];\n }\n}\n\nexport declare namespace WSMessage {\n export interface Ticker {\n symbol: string;\n open: number;\n close: number;\n high: number;\n low: number;\n volume: number;\n amount: number;\n count: number;\n change: number;\n }\n\n export interface MarkPrice {\n symbol: string;\n price: number;\n }\n\n export interface Position {\n symbol: string;\n positionQty: number;\n costPosition: number;\n lastSumUnitaryFunding: number;\n sumUnitaryFundingVersion: number;\n pendingLongQty: number;\n pendingShortQty: number;\n settlePrice: number;\n averageOpenPrice: number;\n unsettledPnl: number;\n pnl24H: number;\n fee24H: number;\n markPrice: number;\n estLiqPrice: number;\n version: number;\n imr: number;\n imrwithOrders: number;\n mmrwithOrders: number;\n mmr: number;\n }\n\n export interface VaultBalance {\n chain_id: string;\n token: string;\n balance: number;\n }\n\n export interface Order {\n symbol: string;\n clientOrderId: string;\n orderId: number;\n type: string;\n side: string;\n quantity: number;\n price: number;\n tradeId: number;\n executedPrice: number;\n executedQuantity: number;\n fee: number;\n feeAsset: string;\n totalExecutedQuantity: number;\n avgPrice: number;\n status: string;\n reason: string;\n totalFee: number;\n visible: number;\n /**\n * update time\n */\n timestamp: number;\n reduceOnly: boolean;\n maker: boolean;\n }\n\n export interface Holding {\n holding: number;\n frozen: number;\n interest: number;\n pendingShortQty: number;\n pendingExposure: number;\n pendingLongQty: number;\n pendingLongExposure: number;\n version: number;\n staked: number;\n unbonding: number;\n vault: number;\n fee24H: number;\n markPrice: number;\n }\n\n export interface AlgoOrder {\n symbol: string;\n rootAlgoOrderId: number;\n parentAlgoOrderId: number;\n algoOrderId: number;\n status: string;\n algoType: string;\n side: string;\n quantity: number;\n triggerStatus: string;\n price: number;\n type: string;\n triggerTradePrice: number;\n triggerTime: number;\n tradeId: number;\n executedPrice: number;\n executedQuantity: number;\n fee: number;\n feeAsset: string;\n totalExecutedQuantity: number;\n averageExecutedPrice: number;\n totalFee: number;\n timestamp: number;\n visibleQuantity: number;\n reduceOnly: boolean;\n triggered: boolean;\n maker: boolean;\n rootAlgoStatus: string;\n algoStatus: string;\n }\n\n export interface Announcement {\n announcement_id: string;\n message: string;\n i18n: Record<PropertyKey, string | null>;\n url?: string | null;\n type: AnnouncementType | null;\n updated_time: number;\n }\n}\n","/**\n * Supported types for placing an order\n */\nexport enum OrderType {\n LIMIT = \"LIMIT\",\n MARKET = \"MARKET\",\n IOC = \"IOC\",\n FOK = \"FOK\",\n POST_ONLY = \"POST_ONLY\",\n ASK = \"ASK\",\n BID = \"BID\",\n STOP_LIMIT = \"STOP_LIMIT\",\n STOP_MARKET = \"STOP_MARKET\",\n /**\n * Only for POSITIONAL_TP_SL type algo order\n */\n CLOSE_POSITION = \"CLOSE_POSITION\",\n}\n\nexport enum BBOOrderType {\n COUNTERPARTY1 = \"counterparty1\",\n COUNTERPARTY5 = \"counterparty5\",\n QUEUE1 = \"queue1\",\n QUEUE5 = \"queue5\",\n}\n\nexport enum OrderLevel {\n ONE = 0,\n TWO = 1,\n THREE = 2,\n FOUR = 3,\n FIVE = 4,\n}\n\nexport enum AlgoOrderRootType {\n TP_SL = \"TP_SL\",\n POSITIONAL_TP_SL = \"POSITIONAL_TP_SL\",\n STOP = \"STOP\",\n BRACKET = \"BRACKET\",\n}\n\nexport enum TriggerPriceType {\n MARK_PRICE = \"MARK_PRICE\",\n}\n\nexport enum AlgoOrderType {\n TAKE_PROFIT = \"TAKE_PROFIT\",\n STOP_LOSS = \"STOP_LOSS\",\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\",\n}\n\nexport enum PositionSide {\n LONG = \"LONG\",\n SHORT = \"SHORT\",\n}\n\nexport enum OrderStatus {\n /** @deprecated */\n OPEN = \"OPEN\",\n NEW = \"NEW\",\n FILLED = \"FILLED\",\n PARTIAL_FILLED = \"PARTIAL_FILLED\",\n CANCELLED = \"CANCELLED\",\n REPLACED = \"REPLACED\",\n // CANCELLED + FILLED\n COMPLETED = \"COMPLETED\",\n // NEW + PARTIAL_FILLED\n INCOMPLETE = \"INCOMPLETE\",\n REJECTED = \"REJECTED\",\n}\n\nexport interface OrderExt {\n total: string;\n}\n\nexport interface BaseOrder {\n symbol: string;\n order_type: OrderType;\n order_type_ext?: OrderType;\n order_price: string;\n order_quantity: string;\n order_amount?: number;\n visible_quantity: number;\n side: OrderSide;\n reduce_only: boolean;\n slippage: number;\n order_tag: string;\n level: OrderLevel;\n post_only_adjust: boolean;\n}\n\nexport interface RegularOrder extends BaseOrder, OrderExt {\n // symbol: string;\n // client_order_id: string;\n // type: OrderType;\n // price: number;\n // quantity: number;\n}\n\nexport interface AlgoOrder extends BaseOrder, OrderExt {\n // symbol: string;\n quantity: string;\n type: OrderType;\n price: string;\n algo_type: AlgoOrderRootType;\n trigger_price_type: string;\n trigger_price: string;\n child_orders: AlgoOrderChildOrders[];\n}\n\nexport interface BracketOrder extends AlgoOrder, OrderExt {\n /**\n * Computed take profit\n */\n tp_pnl?: string;\n tp_offset?: string;\n tp_offset_percentage?: string;\n tp_ROI?: string;\n tp_trigger_price?: string;\n\n /**\n * Computed stop loss\n */\n sl_pnl?: string;\n sl_offset?: string;\n sl_offset_percentage?: string;\n sl_ROI?: string;\n sl_trigger_price?: string;\n}\n\nexport type OrderlyOrder = RegularOrder & AlgoOrder & BracketOrder;\n\nexport interface AlgoOrderChildOrders {\n symbol: string;\n algo_type: string;\n child_orders: ChildOrder[];\n}\n\nexport interface ChildOrder {\n symbol: string;\n algo_type: AlgoOrderType;\n side: string;\n type: OrderType;\n trigger_price: string;\n\n reduce_only: boolean;\n trigger_price_type?: string;\n}\n\n// export interface OrderEntity {}\n\nexport interface OrderEntity {\n symbol: string;\n order_type: OrderType;\n algo_type?: AlgoOrderRootType;\n order_type_ext?: OrderType;\n order_price?: string;\n order_quantity?: string;\n order_amount?: number;\n // Whether to display in the orderbook, default=order_quantity, not displayed when =0,\n visible_quantity?: number;\n reduce_only?: boolean;\n side: OrderSide;\n broker_id?: string;\n\n // internal fields\n total?: string;\n // hideInOrderbook?: boolean;\n isStopOrder?: boolean;\n trigger_price?: string;\n order_tag?: string;\n level?: OrderLevel;\n}\n\nexport type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\nexport type RequireKeys<T extends object, K extends keyof T> = Required<\n Pick<T, K>\n> &\n Partial<Omit<T, K>>;\n\nexport interface BaseAlgoOrderEntity<T extends AlgoOrderRootType>\n extends OrderEntity {\n algo_type: AlgoOrderRootType;\n child_orders: (Partial<Omit<AlgoOrderEntity<T>, \"algo_type\" | \"type\">> & {\n algo_type: AlgoOrderType;\n type: OrderType;\n child_orders?: BaseAlgoOrderEntity<T>[\"child_orders\"];\n // trigger_price: number | string;\n })[];\n // if update the order, then need to provide the order_id\n algo_order_id?: number;\n client_order_id?: string;\n order_tag?: string;\n price?: number | string;\n quantity: number | string;\n reduce_only?: boolean;\n side: OrderSide;\n symbol: string;\n trigger_price: string;\n trigger_price_type: TriggerPriceType;\n type: OrderType;\n visible_quantity?: number;\n is_activated?: boolean;\n tp_trigger_price?: string | number;\n sl_trigger_price?: string | number;\n}\n\nexport type AlgoOrderEntity<\n T extends AlgoOrderRootType = AlgoOrderRootType.STOP\n> = T extends AlgoOrderRootType.TP_SL\n ? Optional<\n BaseAlgoOrderEntity<T>,\n \"side\" | \"type\" | \"trigger_price\" | \"order_type\"\n >\n : T extends AlgoOrderRootType.POSITIONAL_TP_SL\n ? Optional<\n BaseAlgoOrderEntity<T>,\n \"side\" | \"type\" | \"trigger_price\" | \"order_type\" | \"quantity\"\n >\n : Omit<BaseAlgoOrderEntity<T>, \"child_orders\" | \"order_type\">;\n\nexport type TPSLOrderEntry = Optional<\n AlgoOrderEntity<AlgoOrderRootType.TP_SL>,\n \"side\" | \"type\" | \"trigger_price\"\n>;\n\nexport type BracketOrderEntry = Optional<\n AlgoOrderEntity<AlgoOrderRootType.BRACKET>,\n \"side\"\n>;\n","export enum WithdrawStatus {\n NotSupported = \"NotSupported\",\n NotConnected = \"NotConnected\",\n Unsettle = \"Unsettle\",\n InsufficientBalance = \"InsufficientBalance\",\n Normal = \"Normal\",\n}\n","export interface Chain {\n id: number;\n chainNameShort: string;\n chainLogo: string;\n chainInfo: ChainInfo;\n minGasBalance: number;\n minCrossGasBalance: number;\n maxPrepayCrossGas: number;\n blockExplorerName: string;\n chainName: string;\n requestRpc: string;\n}\n\nexport interface ChainInfo {\n chainId: string;\n chainName: string;\n nativeCurrency: NativeCurrency;\n rpcUrls: string[];\n blockExplorerUrls: string[];\n}\n\nexport interface NativeCurrency {\n name: string;\n symbol: string;\n decimals: number;\n fix: number;\n}\n\nexport const Ethereum = {\n chainNameShort: \"Ethereum\",\n id: 1,\n chainLogo: \"\",\n chainInfo: {\n chainId: `0x${(1).toString(16)}`,\n chainName: \"Ethereum Mainnet\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 8,\n },\n rpcUrls: [\"https://mainnet.infura.io/v3/9155d40884554acdb17699a18a1fe348\"],\n blockExplorerUrls: [\"https://etherscan.io/\"],\n },\n minGasBalance: 0.002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.025,\n blockExplorerName: \"EthScan\",\n chainName: \"Ethereum Mainnet\",\n requestRpc: \"https://rpc.ankr.com/eth\",\n};\n\nexport const Avalanche = {\n id: 43114,\n chainInfo: {\n chainId: `0x${(43114).toString(16)}`, // '0xa86a'\n chainName: \"Avalanche\",\n nativeCurrency: {\n name: \"avax\",\n symbol: \"AVAX\",\n decimals: 18,\n fix: 5,\n },\n rpcUrls: [\"https://api.avax.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://snowtrace.io/\"],\n },\n minGasBalance: 0.05,\n minCrossGasBalance: 0.15,\n maxPrepayCrossGas: 2,\n blockExplorerName: \"Snowtrace\",\n chainName: \"Avalanche\",\n chainNameShort: \"Avalanche\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/avalanche\",\n};\n\nexport const Fuji = {\n id: 43113,\n chainInfo: {\n chainId: `0x${(43113).toString(16)}`, // '0xa86a'\n chainName: \"Avalanche Fuji Testnet\",\n nativeCurrency: {\n name: \"avax\",\n symbol: \"AVAX\",\n decimals: 18,\n fix: 5,\n },\n rpcUrls: [\"https://api.avax.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://snowtrace.io/\"],\n },\n minGasBalance: 0.05,\n minCrossGasBalance: 0.15,\n maxPrepayCrossGas: 2,\n blockExplorerName: \"Snowtrace\",\n chainName: \"Avalanche Fuji\",\n chainNameShort: \"Avalanche Fuji\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/avalanche\",\n};\n\nexport const BNB = {\n id: 56,\n chainInfo: {\n chainId: `0x${(56).toString(16)}`, // 0x38\n chainName: \"BNB Chain\",\n nativeCurrency: {\n name: \"bnb\",\n symbol: \"BNB\",\n decimals: 18,\n fix: 6,\n },\n rpcUrls: [\"https://bsc-dataseed1.binance.org/\"],\n blockExplorerUrls: [\"https://bscscan.com/\"],\n },\n minGasBalance: 0.02,\n minCrossGasBalance: 0.02,\n maxPrepayCrossGas: 0.1,\n blockExplorerName: \"BscScan\",\n chainName: \"Binance Smart Chain\",\n chainNameShort: \"BNB Chain\",\n requestRpc: \"https://rpc.ankr.com/bsc\",\n chainLogo: \"\",\n};\n\nexport const Fantom = {\n id: 250,\n chainInfo: {\n chainId: `0x${(250).toString(16)}`, // 0x38\n chainName: \"Fantom\",\n nativeCurrency: {\n name: \"ftm\",\n symbol: \"FTM\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpcapi.fantom.network\"],\n blockExplorerUrls: [\"https://ftmscan.com/\"],\n },\n minGasBalance: 1,\n minCrossGasBalance: 10,\n maxPrepayCrossGas: 60,\n blockExplorerName: \"FTMScan\",\n chainName: \"Fantom\",\n chainNameShort: \"Fantom\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/fantom\",\n};\n\nexport const Polygon = {\n id: 137,\n chainInfo: {\n chainId: `0x${(137).toString(16)}`,\n chainName: \"Polygon\",\n nativeCurrency: {\n name: \"matic\",\n symbol: \"MATIC\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpc-mainnet.matic.network\"],\n blockExplorerUrls: [\"https://polygonscan.com/\"],\n },\n minGasBalance: 0.1,\n minCrossGasBalance: 1,\n maxPrepayCrossGas: 30,\n blockExplorerName: \"Polygonscan\",\n chainName: \"Polygon\",\n chainNameShort: \"Polygon\",\n requestRpc: \"https://rpc.ankr.com/polygon\",\n chainLogo: \"\",\n};\n\nexport const Arbitrum = {\n id: 42161,\n chainInfo: {\n chainId: `0x${(42161).toString(16)}`,\n chainName: \"Arbitrum\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://arb1.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://arbiscan.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbiscan\",\n chainName: \"Arbitrum\",\n chainNameShort: \"Arbitrum\",\n requestRpc: \"https://arb1.arbitrum.io/rpc\",\n chainLogo: \"\",\n};\n\nexport const Optimism = {\n id: 10,\n chainInfo: {\n chainId: `0x${(10).toString(16)}`,\n chainName: \"Optimism\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://mainnet.optimism.io\"],\n blockExplorerUrls: [\"https://optimistic.etherscan.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism\",\n chainName: \"Optimism\",\n chainNameShort: \"Optimism\",\n requestRpc: \"https://rpc.ankr.com/optimism\",\n chainLogo: \"\",\n};\n\nexport const zkSyncEra = {\n id: 324,\n chainInfo: {\n chainId: `0x${(324).toString(16)}`,\n chainName: \"zkSync Era\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://zksync2-mainnet.zksync.io\"],\n blockExplorerUrls: [\"https://explorer.zksync.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"zkSync Era\",\n chainName: \"zkSync Era\",\n chainNameShort: \"zkSync Era\",\n requestRpc: \"https://zksync2-mainnet.zksync.io/\",\n chainLogo: \"\",\n // blockExplorerName: 'zkSync Era Goerli',\n // chainName: 'zkSync Era Goerli',\n // chainNameShort: 'zkSync Era Goerli',\n // requestRpc: 'https://zksync2-testnet.zksync.dev/',\n // chainLogo: '',\n};\n\nexport const PolygonzkEVM = {\n id: 1101,\n chainInfo: {\n chainId: `0x${(1101).toString(16)}`,\n chainName: \"Polygon zkEVM\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://zkevm-rpc.com\"],\n blockExplorerUrls: [\"https://zkevm.polygonscan.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Polygon zkEVM\",\n chainName: \"Polygon zkEVM\",\n chainNameShort: \"Polygon zkEVM\",\n requestRpc: \"https://zkevm-rpc.com\",\n chainLogo: \"\",\n};\n\nexport const Linea = {\n id: 59144,\n chainInfo: {\n chainId: `0x${(59144).toString(16)}`,\n chainName: \"Linea\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.linea.build\"],\n blockExplorerUrls: [\"https://lineascan.build/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Linea\",\n chainName: \"Linea\",\n chainNameShort: \"Linea\",\n requestRpc: \"https://rpc.linea.build\",\n chainLogo: \"\",\n};\n\nexport const Base = {\n id: 8453,\n chainInfo: {\n chainId: `0x${(8453).toString(16)}`,\n chainName: \"Base Network\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://developer-access-mainnet.base.org/\"],\n blockExplorerUrls: [\"https://basescan.org\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Base\",\n chainName: \"Base\",\n chainNameShort: \"Base\",\n requestRpc: \"https://developer-access-mainnet.base.org/\",\n chainLogo: \"\",\n};\n\nexport const Mantle = {\n id: 5000,\n chainInfo: {\n chainId: `0x${(5000).toString(16)}`,\n chainName: \"Mantle\",\n nativeCurrency: {\n name: \"MNT\",\n symbol: \"MNT\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.mantle.xyz/\"],\n blockExplorerUrls: [\"https://mantlescan.xyz/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Mantle\",\n chainName: \"Mantle\",\n chainNameShort: \"Mantle\",\n requestRpc: \"https://rpc.mantle.xyz/\",\n chainLogo: \"\",\n};\n\nexport const ArbitrumGoerli = {\n id: 421613,\n chainInfo: {\n chainId: `0x${(421613).toString(16)}`,\n chainName: \"Arbitrum Goerli\",\n nativeCurrency: {\n name: \"AGOR\",\n symbol: \"AGOR\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://goerli-rollup.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://goerli-rollup-explorer.arbitrum.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbitrum Goerli\",\n chainName: \"Arbitrum Goerli\",\n chainNameShort: \"Arbitrum Goerli\",\n requestRpc: \"https://goerli-rollup.arbitrum.io/rpc\",\n chainLogo: \"\",\n};\n\nexport const ArbitrumSepolia = {\n id: 421614,\n chainInfo: {\n chainId: `0x${(421614).toString(16)}`,\n chainName: \"Arbitrum Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\"],\n blockExplorerUrls: [\"https://sepolia-explorer.arbitrum.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbitrum Sepolia\",\n chainName: \"Arbitrum Sepolia\",\n chainNameShort: \"Arbitrum Sepolia\",\n requestRpc: \"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\",\n chainLogo: \"\",\n};\n\nexport const OptimismGoerli = {\n id: 420,\n chainInfo: {\n chainId: `0x${(420).toString(16)}`,\n chainName: \"Optimism Goerli\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://optimism-goerli.gateway.tenderly.co\"],\n blockExplorerUrls: [\"https://goerli-optimism.etherscan.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism Goerli\",\n chainName: \"Optimism Goerli\",\n chainNameShort: \"Optimism Goerli\",\n requestRpc: \"https://optimism-goerli.gateway.tenderly.co\",\n chainLogo: \"\",\n};\n\nexport const OptimismSepolia = {\n id: 11155420,\n chainInfo: {\n chainId: `0x${(11155420).toString(16)}`,\n chainName: \"Optimism Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://sepolia.optimism.io\"],\n blockExplorerUrls: [\"https://sepolia-optimistic.etherscan.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism Sepolia\",\n chainName: \"Optimism Sepolia\",\n chainNameShort: \"Optimism Sepolia\",\n requestRpc: \"https://sepolia.optimism.io\",\n chainLogo: \"\",\n};\n\nexport const BaseSepolia = {\n id: 84532,\n chainInfo: {\n chainId: `0x${(84532).toString(16)}`,\n chainName: \"Base Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://base-sepolia-rpc.publicnode.com\"],\n blockExplorerUrls: [\"https://base-sepolia.blockscout.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Base Sepolia\",\n chainName: \"Base Sepolia\",\n chainNameShort: \"Base Sepolia\",\n requestRpc: \"https://base-sepolia-rpc.publicnode.com\",\n chainLogo: \"\",\n};\n\nexport const MantleSepolia = {\n id: 5003,\n chainInfo: {\n chainId: `0x${(5003).toString(16)}`,\n chainName: \"Mantle Sepolia\",\n nativeCurrency: {\n name: \"MNT\",\n symbol: \"MNT\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.sepolia.mantle.xyz/\"],\n blockExplorerUrls: [\"https://sepolia.mantlescan.xyz/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Mantle Sepolia\",\n chainName: \"Mantle Sepolia\",\n chainNameShort: \"Mantle Sepolia\",\n requestRpc: \"https://rpc.sepolia.mantle.xyz/\",\n chainLogo: \"\",\n};\n\nexport const PolygonAmoy = {\n id: 80002,\n chainInfo: {\n chainId: `0x${(80002).toString(16)}`,\n chainName: \"Polygon Amoy\",\n nativeCurrency: {\n name: \"MATIC\",\n symbol: \"MATIC\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc-amoy.polygon.technology/\"],\n blockExplorerUrls: [\"https://www.oklink.com/amoy\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Polygon Amoy\",\n chainName: \"Polygon Amoy\",\n chainNameShort: \"Polygon Amoy\",\n requestRpc: \"https://rpc-amoy.polygon.technology/\",\n chainLogo: \"\",\n};\n\nexport const Sei = {\n id: 1329,\n chainInfo: {\n chainId: `0x${(1329).toString(16)}`,\n chainName: \"Sei Network\",\n nativeCurrency: {\n name: \"SEI\",\n symbol: \"SEI\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://evm-rpc.sei-apis.com\"],\n blockExplorerUrls: [\"https://seitrace.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"SEI\",\n chainName: \"Sei Network\",\n chainNameShort: \"SEI\",\n requestRpc: \"https://evm-rpc.sei-apis.com\",\n chainLogo: \"\",\n};\n\nexport const StoryTestnet = {\n name: \"Story Odyssey Testnet\",\n public_rpc_url: \"https://rpc.odyssey.storyrpc.io/\",\n chain_id: 1516,\n currency_symbol: \"IP\",\n explorer_base_url: \"\",\n vault_address: \"\",\n};\nexport const StoryOdysseyTestnet = {\n id: 1329,\n chainInfo: {\n chainId: `0x${StoryTestnet.chain_id.toString(16)}`,\n chainName: StoryTestnet.name,\n nativeCurrency: {\n name: \"IP\",\n symbol: \"IP\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [StoryTestnet.public_rpc_url],\n blockExplorerUrls: [],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"SEI\",\n chainName: \"Sei Network\",\n chainNameShort: \"SEI\",\n requestRpc: \"https://evm-rpc.sei-apis.com\",\n chainLogo: \"\",\n};\nexport const chainsInfoMap: Map<number, Chain> = new Map([\n [Ethereum.id, Ethereum],\n [Avalanche.id, Avalanche],\n [Fuji.id, Fuji],\n [BNB.id, BNB],\n [Fantom.id, Fantom],\n [Polygon.id, Polygon],\n [Arbitrum.id, Arbitrum],\n [Optimism.id, Optimism],\n [zkSyncEra.id, zkSyncEra],\n [PolygonzkEVM.id, PolygonzkEVM],\n [Linea.id, Linea],\n [Base.id, Base],\n [Mantle.id, Mantle],\n [ArbitrumGoerli.id, ArbitrumGoerli],\n [ArbitrumSepolia.id, ArbitrumSepolia],\n [OptimismGoerli.id, OptimismGoerli],\n [OptimismSepolia.id, OptimismSepolia],\n [BaseSepolia.id, BaseSepolia],\n [MantleSepolia.id, MantleSepolia],\n [PolygonAmoy.id, PolygonAmoy],\n [Sei.id, Sei],\n [StoryOdysseyTestnet.id, StoryOdysseyTestnet],\n]);\n\nexport const SolanaDevnet = {\n id: 901901901,\n chainInfo: {\n name: \"Solana Devnet\",\n public_rpc_url: \"\",\n chainId: 901901901,\n currency_symbol: \"SOL\",\n explorer_base_url: \"\",\n vault_address: \"\",\n },\n} as unknown as typeof Arbitrum;\n\nexport const TestnetChains = [\n {\n network_infos: {\n name: \"Arbitrum Sepolia\",\n shortName: \"Arbitrum Sepolia\",\n public_rpc_url: \"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\",\n chain_id: 421614,\n currency_symbol: \"ETH\",\n bridge_enable: true,\n mainnet: false,\n explorer_base_url: \"https://sepolia.arbiscan.io\",\n est_txn_mins: null,\n },\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d\",\n decimals: 6,\n },\n ],\n },\n {\n network_infos: {\n name: \"Solana Devnet\",\n public_rpc_url: \"\",\n chain_id: 901901901,\n currency_symbol: \"SOL\",\n explorer_base_url: \"\",\n vault_address: \"\",\n },\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU\",\n decimals: 6,\n },\n ],\n },\n {\n network_infos: StoryTestnet,\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"0xF1815bd50389c46847f0Bda824eC8da914045D14\",\n decimals: 6,\n },\n ],\n },\n // {\n // network_infos: {\n // name: \"Mantle Sepolia\",\n // shortName: \"Mantle Sepolia\",\n // public_rpc_url: \"https://rpc.sepolia.mantle.xyz/\",\n // chain_id: 5003,\n // currency_symbol: \"MNT\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://sepolia.mantlescan.xyz/\",\n // est_txn_mins: null,\n // },\n // token_infos: [\n // {\n // symbol: \"USDC\",\n // address: \"0xAcab8129E2cE587fD203FD770ec9ECAFA2C88080\",\n // decimals: 6,\n // display_name: \"USDC.e\",\n // },\n // ],\n // },\n // {\n // network_infos: {\n // name: \"Arbitrum Goerli\",\n // shortName: \"Arbitrum Goerli\",\n // public_rpc_url: \"https://goerli-rollup.arbitrum.io/rpc\",\n // chain_id: 421613,\n // currency_symbol: \"ETH\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://goerli.arbiscan.io/\",\n // est_txn_mins: null,\n // },\n // token_infos: [\n // {\n // symbol: \"USDC\",\n // address: \"0xfd064A18f3BF249cf1f87FC203E90D8f650f2d63\",\n // decimals: 6,\n // },\n // ],\n // },\n // {\n // network_infos: {\n // name: \"Optimism Goerli\",\n // shortName: \"Optimism Goerli\",\n // public_rpc_url: \"https://optimism-goerli.gateway.tenderly.co\",\n // chain_id: 420,\n // currency_symbol: \"ETH\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://goerli-optimism.etherscan.io\",\n // est_txn_mins: null,\n // },\n // },\n];\n\nexport const defaultMainnetChains = [Arbitrum, Base, Optimism];\nexport const defaultTestnetChains = [ArbitrumSepolia];\n\nexport enum ChainNamespace {\n evm = \"EVM\",\n solana = \"SOL\",\n}\n\nexport const SolanaChains = new Set([901901901, 900900900]);\n","export enum TrackerEventName {\n /** virtual event (not send this event name to tracker) */\n trackIdentifyUserId = \"track_identify_user_id\",\n trackIdentify = \"track_identify\",\n trackCustomEvent = \"track_custom_event\",\n\n /** real event name (send this event name to tracker) */\n withdrawSuccess = \"withdraw_request_success\",\n withdrawFailed = \"withdraw_request_failure\",\n depositSuccess = \"deposit_request_success\",\n depositFailed = \"deposit_request_failure\",\n signinSuccess = \"sign_message_success\",\n placeOrderSuccess = \"place_order_success\",\n walletConnect = \"connect_wallet_success\",\n clickLinkDeviceButton = \"click_link_device_button\",\n signLinkDeviceMessageSuccess = \"sign_link_device_message_success\",\n linkDeviceModalClickConfirm = \"link_device_modal_click_confirm\",\n socialLoginSuccess = \"social_login_success\",\n clickSwitchNetwork = \"click_switch_network\",\n clickSwitchWallet = \"click_switch_wallet\",\n switchNetworkSuccess = \"switch_network_success\",\n clickExportPrivateKey = \"click_export_private_key\",\n switchLanguage = \"switch_language\",\n leaderboardCampaignClickTradeNow = \"leaderboard_campaign_click_trade_now\",\n leaderboardCampaignClickLearnMore = \"leaderboard_campaign_click_learn_more\",\n}\n","import { API } from \"./types/api\";\n\n// export type Chain = {\n// id: string;\n// name?: string;\n// };\n\nexport type CurrentChain = {\n id: number;\n info: API.Chain;\n};\n\nexport enum WS_WalletStatusEnum {\n NO = \"NO\",\n FAILED = \"FAILED\",\n PENDING = \"PENDING\",\n PROCESSING = \"PROCESSING\",\n COMPLETED = \"COMPLETED\",\n}\n","export const LedgerWalletKey = \"orderly:ledger-wallet\";\nexport const ConnectorKey = 'orderly:connectorKey';\nexport const ChainKey = 'order:chain';","export class ApiError extends Error {\n constructor(message: string, private readonly code: number) {\n super(message);\n this.name = \"ApiError\";\n }\n}\n\nexport class SDKError extends Error {\n constructor(message: string) {\n super(`[ORDERLY SDK ERROR]:${message}`);\n this.name = \"SDKError\";\n }\n}\n","export const definedTypes = {\n EIP712Domain: [\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" },\n ],\n Registration: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"timestamp\", type: \"uint64\" },\n { name: \"registrationNonce\", type: \"uint256\" },\n ],\n Withdraw: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"receiver\", type: \"address\" },\n { name: \"token\", type: \"string\" },\n { name: \"amount\", type: \"uint256\" },\n { name: \"withdrawNonce\", type: \"uint64\" },\n { name: \"timestamp\", type: \"uint64\" },\n ],\n AddOrderlyKey: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"orderlyKey\", type: \"string\" },\n { name: \"scope\", type: \"string\" },\n { name: \"timestamp\", type: \"uint64\" },\n { name: \"expiration\", type: \"uint64\" },\n ],\n SettlePnl: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"settleNonce\", type: \"uint64\" },\n { name: \"timestamp\", type: \"uint64\" },\n ],\n } as const;","export enum AssetHistoryStatusEnum {\n NEW = \"NEW\",\n CONFIRM = \"CONFIRM\",\n PROCESSING = \"PROCESSING\",\n COMPLETED = \"COMPLETED\",\n FAILED = \"FAILED\",\n PENDING_REBALANCE = \"PENDING_REBALANCE\",\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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AS;AAAA,IACxC,EAAE,MAAM,aAAa,MAAM,SAAS;AAAA,EACtC;AAAA,EACA,eAAe;AAAA,IACb,EAAE,MAAM,YAAY,MAAM,SAAS;AAAA,IACnC,EAAE,MAAM,WAAW,MAAM,UAAU;AAAA,IACnC,EAAE,MAAM,cAAc,MAAM,SAAS;AAAA,IACrC,EAAE,MAAM,SAAS,MAAM,SAAS;AAAA,IAChC,EAAE,MAAM,aAAa,MAAM,SAAS;AAAA,IACpC,EAAE,MAAM,cAAc,MAAM,SAAS;AAAA,EACvC;AAAA,EACA,WAAW;AAAA,IACT,EAAE,MAAM,YAAY,MAAM,SAAS;AAAA,IACnC,EAAE,MAAM,WAAW,MAAM,UAAU;AAAA,IACnC,EAAE,MAAM,eAAe,MAAM,SAAS;AAAA,IACtC,EAAE,MAAM,aAAa,MAAM,SAAS;AAAA,EACtC;AACF;;;AXIF,kBAA6B;;;AYxCtB,IAAK,yBAAL,kBAAKC,4BAAL;AACL,EAAAA,wBAAA,SAAM;AACN,EAAAA,wBAAA,aAAU;AACV,EAAAA,wBAAA,gBAAa;AACb,EAAAA,wBAAA,eAAY;AACZ,EAAAA,wBAAA,YAAS;AACT,EAAAA,wBAAA,uBAAoB;AANV,SAAAA;AAAA,GAAA;","names":["AccountStatusEnum","SystemStateEnum","ExchangeStatusEnum","NetworkStatusEnum","AnnouncementType","OrderType","BBOOrderType","OrderLevel","AlgoOrderRootType","TriggerPriceType","AlgoOrderType","OrderSide","OrderStatus","WithdrawStatus","ChainNamespace","TrackerEventName","WS_WalletStatusEnum","AssetHistoryStatusEnum"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/version.ts","../src/constants.ts","../src/types/api.ts","../src/order.ts","../src/withdraw.ts","../src/chains.ts","../src/track.ts","../src/wallet.ts","../src/storageKey.ts","../src/errors.ts","../src/sign.ts","../src/assetHistory.ts"],"sourcesContent":["export { default as version } from \"./version\";\nexport * from \"./constants\";\nexport * from \"./types/api\";\n// export * from \"./order\";\nexport {\n OrderType,\n OrderSide,\n OrderStatus,\n AlgoOrderRootType,\n AlgoOrderType,\n TriggerPriceType,\n BBOOrderType,\n OrderLevel,\n} from \"./order\";\nexport type {\n OrderEntity,\n AlgoOrderEntity,\n TPSLOrderEntry,\n BaseAlgoOrderEntity,\n AlgoOrderChildOrders,\n Optional,\n PositionSide,\n BracketOrderEntry,\n RequireKeys,\n BaseOrder,\n RegularOrder,\n AlgoOrder,\n OrderlyOrder,\n ChildOrder,\n BracketOrder,\n} from \"./order\";\nexport * from \"./withdraw\";\nexport * from \"./chains\";\nexport * from \"./track\";\nexport type { Chain as ChainConfig, ChainInfo, NativeCurrency } from \"./chains\";\nexport * from \"./wallet\";\nexport * from \"./storageKey\";\nexport { ApiError, SDKError } from \"./errors\";\n\nexport { definedTypes } from \"./sign\";\nexport * as superstruct from \"superstruct\";\nexport * from \"./assetHistory\";\n","\ndeclare global {\n interface Window {\n __ORDERLY_VERSION__?: {\n [key: string]: string;\n };\n }\n}\nif(typeof window !== 'undefined') {\n window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};\n window.__ORDERLY_VERSION__[\"@orderly.network/types\"] = \"2.2.0\";\n};\n\nexport default \"2.2.0\";\n","export enum AccountStatusEnum {\n EnableTradingWithoutConnected = -1,\n NotConnected = 0,\n Connected = 1,\n NotSignedIn = 2,\n SignedIn = 3,\n DisabledTrading = 4,\n EnableTrading = 5,\n}\n\nexport enum SystemStateEnum {\n Loading = 0,\n Error = 1,\n Ready = 10,\n}\n\nexport enum ExchangeStatusEnum {\n Normal = 0,\n Maintain = 1,\n}\n\nexport type NetworkId = \"testnet\" | \"mainnet\";\n\nexport enum NetworkStatusEnum {\n unknown = 0,\n unsupported = 1,\n supported = 2,\n}\n\n// Testnet\n// Arbitrum Goerli\n// export const ARBITRUM_TESTNET_CHAINID = 421613;\n// export const ARBITRUM_TESTNET_CHAINID_HEX = \"0x66EED\";\n\n// Arbitrum Sepolia\nexport const ARBITRUM_TESTNET_CHAINID = 421614;\nexport const SOLANA_TESTNET_CHAINID = 901901901;\nexport const SOLANA_MAINNET_CHAINID = 900900900;\nexport const STORY_TESTNET_CHAINID = 1516;\nexport const MONAD_TESTNET_CHAINID = 10143;\nexport const ABSTRACT_TESTNET_CHAINID = 11124;\nexport const ABSTRACT_MAINNET_CHAINID = 2741;\nexport const ABSTRACT_CHAIN_ID_MAP = new Set([\n ABSTRACT_TESTNET_CHAINID,\n ABSTRACT_MAINNET_CHAINID,\n]);\n\nexport const ARBITRUM_TESTNET_CHAINID_HEX = \"0x66EEE\";\n\nexport const MANTLE_TESTNET_CHAINID = 5003;\nexport const MANTLE_TESTNET_CHAINID_HEX = \"0x138b\";\n\n// Mainnet\nexport const ARBITRUM_MAINNET_CHAINID = 42161;\nexport const ARBITRUM_MAINNET_CHAINID_HEX = \"0xa4b1\";\n\nexport const MEDIA_TABLET = \"(max-width: 768px)\";\n\nexport const DEPOSIT_FEE_RATE = 1.05;\n\n/**\n * A constant for the maximum value for a ``uint256``.\n */\nexport const MaxUint256: bigint = BigInt(\n \"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n);\n\nexport const nativeTokenAddress = \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\";\n\nexport const isNativeTokenChecker = (address: string) =>\n address === nativeTokenAddress;\n\nexport const ArbitrumSepoliaChainInfo = {\n name: \"Arbitrum Sepolia\",\n public_rpc_url: \"https://arbitrum-sepolia.gateway.tenderly.co\",\n chain_id: \"421614\",\n currency_symbol: \"ETH\",\n currency_decimal: 18,\n explorer_base_url: \"https://sepolia.arbiscan.io\",\n vault_address: \"0x0EaC556c0C2321BA25b9DC01e4e3c95aD5CDCd2f\",\n};\nexport const AbstractTestnetChainInfo = {\n name: \"Abstract Testnet\",\n public_rpc_url: \"https://api.testnet.abs.xyz\",\n chain_id: \"11124\",\n currency_symbol: \"ETH\",\n currency_decimal: 18,\n explorer_base_url: \"https://sepolia.abscan.org\",\n vault_address: \"0xf14Ff11F3bb1011ff42665Ec869c7827c43745Fd\",\n};\nexport const AbstractTestnetTokenInfo = {\n chain_id: \"11124\",\n contract_address: \"0xa0BB43E2eA7fcE91F07e628d72fD6333e80F47D2\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 2,\n display_name: \"USDC\",\n};\nexport const SolanaDevnetChainInfo = {\n chain_id: \"901901901\",\n currency_decimal: 9,\n currency_symbol: \"SOL\",\n explorer_base_url: \"https://explorer.solana.com/?cluster=devnet\",\n name: \"Solana-Devnet\",\n public_rpc_url: \"https://api.devnet.solana.com\",\n vault_address: \"9shwxWDUNhtwkHocsUAmrNAQfBH2DHh4njdAEdHZZkF2\",\n};\n\nexport const SolanaDevnetTokenInfo = {\n chain_id: \"901901901\",\n contract_address: \"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 5,\n display_name: \"USDC\",\n};\nexport const ArbitrumSepoliaTokenInfo = {\n chain_id: \"421614\",\n contract_address: \"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 2,\n display_name: \"USDC\",\n};\n\nexport const TesntTokenFallback = (testnetTokens: any) => [\n {\n token: \"USDC\",\n token_hash:\n \"0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa\",\n decimals: 6,\n minimum_withdraw_amount: 0.000001,\n chain_details: testnetTokens,\n },\n];\n","import { AlgoOrderRootType, OrderSide, OrderType } from \"../order\";\n\nexport enum AnnouncementType {\n Listing = \"LISTING\",\n Maintenance = \"MAINTENANCE\",\n Delisting = \"DELISTING\",\n}\n\nexport declare namespace API {\n //v1/public/token\n export interface Token {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n chain_details: ChainDetail[];\n }\n\n //v1/public/token\n export interface ChainDetail {\n chain_id: string;\n contract_address: string;\n decimals: number;\n }\n\n // ws market, api v1/public/futures\n export interface MarketInfo {\n symbol: string;\n index_price: number;\n mark_price: number;\n sum_unitary_funding: number;\n est_funding_rate: number;\n last_funding_rate: number;\n next_funding_time: number;\n open_interest: string;\n \"24h_open\": number;\n \"24h_close\": number;\n \"24h_high\": number;\n \"24h_low\": number;\n /**\n * @deprecated\n * spelling mistake, use 24h_volume to instead, will be remove next version\n */\n \"24h_volumn\": number;\n \"24h_volume\": number;\n \"24h_amount\": number;\n }\n\n export interface MarketInfoExt extends MarketInfo {\n change: number;\n \"24h_volume\": number;\n }\n\n export interface Announcement {\n last_updated_time?: number | null;\n rows?: Array<{\n announcement_id: number | string;\n message: string;\n i18n?: Record<PropertyKey, string | null>;\n url?: string | null;\n type?: AnnouncementType | null;\n updated_time?: number | null;\n }>;\n }\n\n /**\n * v1/public/info\n */\n export interface Symbol {\n symbol: string;\n quote_min: number;\n quote_max: number;\n quote_tick: number;\n base_min: number;\n base_max: number;\n base_tick: number;\n min_notional: number;\n price_range: number;\n price_scope: number;\n std_liquidation_fee: number;\n liquidator_fee: number;\n claim_insurance_fund_discount: number;\n funding_period: number;\n cap_funding: number;\n floor_funding: number;\n interest_rate: number;\n created_time: number;\n updated_time: number;\n imr_factor: number;\n base_mmr: number;\n base_imr: number;\n }\n\n export interface TokenItem {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n chain_details: ChainDetail[];\n }\n\n export interface ChainDetail {\n chain_id: string;\n contract_address: string;\n decimals: number;\n withdrawal_fee: number;\n }\n\n export interface SymbolExt extends Symbol {\n base: string;\n base_dp: number;\n\n quote: string;\n quote_dp: number;\n type: string;\n name: string;\n }\n\n export interface Order {\n symbol: string;\n status: string;\n side: string;\n order_id: number;\n algo_order_id?: number;\n user_id: number;\n price: number | null;\n type: string;\n quantity: number;\n amount: null;\n visible: number;\n executed: number;\n total_fee: number;\n fee_asset: string;\n client_order_id: null;\n average_executed_price: number;\n total_executed_quantity: number;\n visible_quantity: number;\n created_time: number;\n updated_time: number;\n reduce_only: boolean;\n trigger_price?: number;\n order_tag?: string;\n }\n\n export interface OrderExt extends Order {\n mark_price: string;\n }\n\n export interface AlgoOrder {\n algo_order_id: number;\n root_algo_order_id: number;\n parent_algo_order_id: number;\n parent_algo_type: AlgoOrderRootType;\n symbol: string;\n algo_type: string;\n child_orders: AlgoOrder[];\n side: string;\n quantity: number;\n is_triggered: boolean;\n is_activated: boolean;\n trigger_price: number;\n trigger_price_type: string;\n type: OrderType;\n root_algo_status: string;\n algo_status: string;\n price?: number;\n total_executed_quantity: number;\n visible_quantity: number;\n total_fee: number;\n fee_asset: string;\n reduce_only: boolean;\n created_time: number;\n updated_time: number;\n order_tag?: string;\n }\n\n export interface AlgoOrderExt extends AlgoOrder {\n mark_price: string;\n position?: Partial<Position>;\n tp_trigger_price?: number;\n sl_trigger_price?: number;\n }\n\n export interface OrderResponse {\n rows: (Order | AlgoOrder)[];\n meta: {\n total: number;\n current_page: number;\n records_per_page: number;\n };\n }\n\n export interface FundingRate {\n symbol: string;\n est_funding_rate: number;\n est_funding_rate_timestamp: number;\n last_funding_rate: number;\n last_funding_rate_timestamp: number;\n next_funding_time: number;\n sum_unitary_funding: number;\n }\n\n export interface FundingPeriodData {\n rate: number;\n positive: number;\n negative: number;\n }\n\n export interface FundingHistory {\n symbol: string;\n data_start_time: string;\n funding: {\n last: FundingPeriodData;\n \"1d\": FundingPeriodData;\n \"3d\": FundingPeriodData;\n \"7d\": FundingPeriodData;\n \"14d\": FundingPeriodData;\n \"30d\": FundingPeriodData;\n \"90d\": FundingPeriodData;\n };\n }\n\n export interface PositionInfo extends PositionAggregated {\n // margin_ratio: number;\n // initial_margin_ratio: number;\n // maintenance_margin_ratio: number;\n // open_margin_ratio: number;\n // current_margin_ratio_with_orders: number;\n // initial_margin_ratio_with_orders: number;\n // maintenance_margin_ratio_with_orders: number;\n // total_collateral_value: number;\n // free_collateral: number;\n rows: Position[];\n // total_pnl_24_h: number;\n }\n\n export interface PositionAggregated {\n margin_ratio: number;\n initial_margin_ratio: number;\n maintenance_margin_ratio: number;\n open_margin_ratio: number;\n current_margin_ratio_with_orders: number;\n initial_margin_ratio_with_orders: number;\n maintenance_margin_ratio_with_orders: number;\n total_collateral_value: number;\n free_collateral: number;\n total_pnl_24_h: number;\n /**\n * @deprecated use total_unreal_pnl instead\n */\n unrealPnL: number;\n total_unreal_pnl: number;\n total_unreal_pnl_index?: number;\n /**\n * @deprecated use total_unsettled_pnl instead\n */\n unsettledPnL: number;\n total_unsettled_pnl: number;\n notional: number;\n unrealPnlROI: number;\n unrealPnlROI_index?: number;\n }\n\n export interface Position {\n symbol: string;\n position_qty: number;\n cost_position: number;\n last_sum_unitary_funding: number;\n pending_long_qty: number;\n pending_short_qty: number;\n settle_price: number;\n average_open_price: number;\n unrealized_pnl: number;\n unrealized_pnl_index?: number;\n unrealized_pnl_ROI: number;\n unsettled_pnl: number;\n unsettled_pnl_ROI: number;\n unrealized_pnl_ROI_index?: number;\n mark_price: number;\n index_price?: number;\n est_liq_price: number | null;\n timestamp: number;\n /**\n * Maintenance margin ratio\n */\n mmr: number;\n imr: number;\n IMR_withdraw_orders: number;\n MMR_with_orders: number;\n pnl_24_h: number;\n fee_24_h: number;\n }\n\n export interface PositionExt extends Position {\n notional: number;\n mm: number;\n }\n\n export interface PositionTPSLExt extends PositionExt {\n tp_trigger_price?: number;\n sl_trigger_price?: number;\n\n // has_position_tp_sl: boolean;\n\n /**\n * related position tp/sl order\n */\n algo_order?: AlgoOrder;\n }\n\n export interface PositionsTPSLExt extends PositionAggregated {\n rows: PositionTPSLExt[];\n }\n\n export interface Trade {\n symbol: Symbol;\n side: OrderSide;\n ts: number;\n executed_price: number;\n executed_quantity: number;\n executed_timestamp: number;\n }\n\n export interface Holding {\n token: string;\n holding: number;\n frozen: number;\n pending_short: number;\n updated_time: number;\n }\n\n export interface AccountInfo {\n account_id: string;\n email: string;\n account_mode: string;\n tier: string;\n futures_tier: string;\n maintenance_cancel_orders: boolean;\n taker_fee_rate: number;\n maker_fee_rate: number;\n max_leverage: number;\n futures_taker_fee_rate: number;\n futures_maker_fee_rate: number;\n imr_factor: { [key: string]: number };\n max_notional: { [key: string]: number };\n }\n\n export interface Chain {\n dexs: string[];\n network_infos: NetworkInfos;\n token_infos: TokenInfo[];\n nativeToken?: TokenInfo;\n // nativeToken\n }\n\n export interface NetworkInfos {\n name: string;\n shortName: string;\n public_rpc_url: string;\n chain_id: number;\n currency_symbol: string;\n bridge_enable: boolean;\n mainnet: boolean;\n est_txn_mins: number | null;\n explorer_base_url: string;\n bridgeless?: boolean;\n withdrawal_fee?: number;\n minimum_withdraw_amount?: number;\n }\n\n export interface TokenInfo {\n address: string;\n symbol: string;\n decimals: number;\n display_name: string;\n precision: number;\n }\n\n export interface Chain {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n chain_details: ChainDetail[];\n }\n\n // export interface Token{\n\n // }\n\n export interface ChainDetail {\n chain_id: string;\n chain_name?: string;\n contract_address: string;\n decimals: number;\n withdrawal_fee: number;\n }\n\n export interface AssetHistory {\n meta: RecordsMeta;\n rows: AssetHistoryRow[];\n }\n\n export interface RecordsMeta {\n total: number;\n records_per_page: number;\n current_page: number;\n }\n\n export interface AssetHistoryRow {\n id: string;\n tx_id: string;\n side: string;\n token: string;\n amount: number;\n fee: number;\n trans_status: string;\n created_time: number;\n updated_time: number;\n chain_id: string;\n }\n\n export interface FundingFeeHistory {\n meta: RecordsMeta;\n rows: FundingFeeRow[];\n }\n\n export interface FundingFeeRow {\n symbol: string;\n funding_rate: number;\n mark_price: number;\n funding_fee: number;\n payment_type: string;\n status: string;\n created_time: number;\n updated_time: number;\n }\n\n export interface DailyRow {\n account_value: number;\n broker_id: string;\n date: string;\n perp_volume: number;\n pnl: number;\n snapshot_time?: number;\n }\n\n export interface PositionHistory {\n position_id: number; // Unique identifier for the position\n liquidation_id?: number; // Unique identifier for the position\n position_status: string; // Status of the position\n type: string; // Type of the position activity\n symbol: string; // Trading pair symbol\n avg_open_price: number; // Average open price of the position\n avg_close_price: number; // Average close price of the position\n max_position_qty: number; // Maximum quantity held in the position\n closed_position_qty: number; // Quantity closed in the position\n side: \"LONG\" | \"SHORT\"; // Side of the position\n trading_fee: number; // Fee charged for trading\n accumulated_funding_fee: number; // Accumulated funding fee for the position\n insurance_fund_fee: number; // Fee contributed to the insurance fund\n liquidator_fee: number; // Fee paid to the liquidator\n realized_pnl: number; // Realized profit and loss\n open_timestamp: number; // Timestamp when the position was opened\n close_timestamp: number; // Timestamp when the position was closed\n last_update_time: number; // Timestamp of the last update to the position\n }\n\n export interface LiquidationPositionByPerp {\n abs_liquidation_fee: number;\n cost_position_transfer: number;\n liquidator_fee: number;\n position_qty: number;\n symbol: string;\n transfer_price: number;\n }\n\n export interface Liquidation {\n liquidation_id: number;\n timestamp: number;\n transfer_amount_to_insurance_fund: number;\n positions_by_perp: LiquidationPositionByPerp[];\n }\n}\n\nexport declare namespace WSMessage {\n export interface Ticker {\n symbol: string;\n open: number;\n close: number;\n high: number;\n low: number;\n volume: number;\n amount: number;\n count: number;\n change: number;\n }\n\n export interface MarkPrice {\n symbol: string;\n price: number;\n }\n\n export interface Position {\n symbol: string;\n positionQty: number;\n costPosition: number;\n lastSumUnitaryFunding: number;\n sumUnitaryFundingVersion: number;\n pendingLongQty: number;\n pendingShortQty: number;\n settlePrice: number;\n averageOpenPrice: number;\n unsettledPnl: number;\n pnl24H: number;\n fee24H: number;\n markPrice: number;\n estLiqPrice: number;\n version: number;\n imr: number;\n imrwithOrders: number;\n mmrwithOrders: number;\n mmr: number;\n }\n\n export interface VaultBalance {\n chain_id: string;\n token: string;\n balance: number;\n }\n\n export interface Order {\n symbol: string;\n clientOrderId: string;\n orderId: number;\n type: string;\n side: string;\n quantity: number;\n price: number;\n tradeId: number;\n executedPrice: number;\n executedQuantity: number;\n fee: number;\n feeAsset: string;\n totalExecutedQuantity: number;\n avgPrice: number;\n status: string;\n reason: string;\n totalFee: number;\n visible: number;\n /**\n * update time\n */\n timestamp: number;\n reduceOnly: boolean;\n maker: boolean;\n }\n\n export interface Holding {\n holding: number;\n frozen: number;\n interest: number;\n pendingShortQty: number;\n pendingExposure: number;\n pendingLongQty: number;\n pendingLongExposure: number;\n version: number;\n staked: number;\n unbonding: number;\n vault: number;\n fee24H: number;\n markPrice: number;\n }\n\n export interface AlgoOrder {\n symbol: string;\n rootAlgoOrderId: number;\n parentAlgoOrderId: number;\n algoOrderId: number;\n status: string;\n algoType: string;\n side: string;\n quantity: number;\n triggerStatus: string;\n price: number;\n type: string;\n triggerTradePrice: number;\n triggerTime: number;\n tradeId: number;\n executedPrice: number;\n executedQuantity: number;\n fee: number;\n feeAsset: string;\n totalExecutedQuantity: number;\n averageExecutedPrice: number;\n totalFee: number;\n timestamp: number;\n visibleQuantity: number;\n reduceOnly: boolean;\n triggered: boolean;\n maker: boolean;\n rootAlgoStatus: string;\n algoStatus: string;\n }\n\n export interface Announcement {\n announcement_id: string;\n message: string;\n i18n: Record<PropertyKey, string | null>;\n url?: string | null;\n type: AnnouncementType | null;\n updated_time: number;\n }\n}\n","/**\n * Supported types for placing an order\n */\nexport enum OrderType {\n LIMIT = \"LIMIT\",\n MARKET = \"MARKET\",\n IOC = \"IOC\",\n FOK = \"FOK\",\n POST_ONLY = \"POST_ONLY\",\n ASK = \"ASK\",\n BID = \"BID\",\n STOP_LIMIT = \"STOP_LIMIT\",\n STOP_MARKET = \"STOP_MARKET\",\n /**\n * Only for POSITIONAL_TP_SL type algo order\n */\n CLOSE_POSITION = \"CLOSE_POSITION\",\n}\n\nexport enum BBOOrderType {\n COUNTERPARTY1 = \"counterparty1\",\n COUNTERPARTY5 = \"counterparty5\",\n QUEUE1 = \"queue1\",\n QUEUE5 = \"queue5\",\n}\n\nexport enum OrderLevel {\n ONE = 0,\n TWO = 1,\n THREE = 2,\n FOUR = 3,\n FIVE = 4,\n}\n\nexport enum AlgoOrderRootType {\n TP_SL = \"TP_SL\",\n POSITIONAL_TP_SL = \"POSITIONAL_TP_SL\",\n STOP = \"STOP\",\n BRACKET = \"BRACKET\",\n}\n\nexport enum TriggerPriceType {\n MARK_PRICE = \"MARK_PRICE\",\n}\n\nexport enum AlgoOrderType {\n TAKE_PROFIT = \"TAKE_PROFIT\",\n STOP_LOSS = \"STOP_LOSS\",\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\",\n}\n\nexport enum PositionSide {\n LONG = \"LONG\",\n SHORT = \"SHORT\",\n}\n\nexport enum OrderStatus {\n /** @deprecated */\n OPEN = \"OPEN\",\n NEW = \"NEW\",\n FILLED = \"FILLED\",\n PARTIAL_FILLED = \"PARTIAL_FILLED\",\n CANCELLED = \"CANCELLED\",\n REPLACED = \"REPLACED\",\n // CANCELLED + FILLED\n COMPLETED = \"COMPLETED\",\n // NEW + PARTIAL_FILLED\n INCOMPLETE = \"INCOMPLETE\",\n REJECTED = \"REJECTED\",\n}\n\nexport interface OrderExt {\n total: string;\n}\n\nexport interface BaseOrder {\n symbol: string;\n order_type: OrderType;\n order_type_ext?: OrderType;\n order_price: string;\n order_quantity: string;\n order_amount?: number;\n visible_quantity: number;\n side: OrderSide;\n reduce_only: boolean;\n slippage: number;\n order_tag: string;\n level: OrderLevel;\n post_only_adjust: boolean;\n}\n\nexport interface RegularOrder extends BaseOrder, OrderExt {\n // symbol: string;\n // client_order_id: string;\n // type: OrderType;\n // price: number;\n // quantity: number;\n}\n\nexport interface AlgoOrder extends BaseOrder, OrderExt {\n // symbol: string;\n quantity: string;\n type: OrderType;\n price: string;\n algo_type: AlgoOrderRootType;\n trigger_price_type: string;\n trigger_price: string;\n child_orders: AlgoOrderChildOrders[];\n}\n\nexport interface BracketOrder extends AlgoOrder, OrderExt {\n /**\n * Computed take profit\n */\n tp_pnl?: string;\n tp_offset?: string;\n tp_offset_percentage?: string;\n tp_ROI?: string;\n tp_trigger_price?: string;\n\n /**\n * Computed stop loss\n */\n sl_pnl?: string;\n sl_offset?: string;\n sl_offset_percentage?: string;\n sl_ROI?: string;\n sl_trigger_price?: string;\n}\n\nexport type OrderlyOrder = RegularOrder & AlgoOrder & BracketOrder;\n\nexport interface AlgoOrderChildOrders {\n symbol: string;\n algo_type: string;\n child_orders: ChildOrder[];\n}\n\nexport interface ChildOrder {\n symbol: string;\n algo_type: AlgoOrderType;\n side: string;\n type: OrderType;\n trigger_price: string;\n\n reduce_only: boolean;\n trigger_price_type?: string;\n}\n\n// export interface OrderEntity {}\n\nexport interface OrderEntity {\n symbol: string;\n order_type: OrderType;\n algo_type?: AlgoOrderRootType;\n order_type_ext?: OrderType;\n order_price?: string;\n order_quantity?: string;\n order_amount?: number;\n // Whether to display in the orderbook, default=order_quantity, not displayed when =0,\n visible_quantity?: number;\n reduce_only?: boolean;\n side: OrderSide;\n broker_id?: string;\n\n // internal fields\n total?: string;\n // hideInOrderbook?: boolean;\n isStopOrder?: boolean;\n trigger_price?: string;\n order_tag?: string;\n level?: OrderLevel;\n}\n\nexport type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\nexport type RequireKeys<T extends object, K extends keyof T> = Required<\n Pick<T, K>\n> &\n Partial<Omit<T, K>>;\n\nexport interface BaseAlgoOrderEntity<T extends AlgoOrderRootType>\n extends OrderEntity {\n algo_type: AlgoOrderRootType;\n child_orders: (Partial<Omit<AlgoOrderEntity<T>, \"algo_type\" | \"type\">> & {\n algo_type: AlgoOrderType;\n type: OrderType;\n child_orders?: BaseAlgoOrderEntity<T>[\"child_orders\"];\n // trigger_price: number | string;\n })[];\n // if update the order, then need to provide the order_id\n algo_order_id?: number;\n client_order_id?: string;\n order_tag?: string;\n price?: number | string;\n quantity: number | string;\n reduce_only?: boolean;\n side: OrderSide;\n symbol: string;\n trigger_price: string;\n trigger_price_type: TriggerPriceType;\n type: OrderType;\n visible_quantity?: number;\n is_activated?: boolean;\n tp_trigger_price?: string | number;\n sl_trigger_price?: string | number;\n}\n\nexport type AlgoOrderEntity<\n T extends AlgoOrderRootType = AlgoOrderRootType.STOP\n> = T extends AlgoOrderRootType.TP_SL\n ? Optional<\n BaseAlgoOrderEntity<T>,\n \"side\" | \"type\" | \"trigger_price\" | \"order_type\"\n >\n : T extends AlgoOrderRootType.POSITIONAL_TP_SL\n ? Optional<\n BaseAlgoOrderEntity<T>,\n \"side\" | \"type\" | \"trigger_price\" | \"order_type\" | \"quantity\"\n >\n : Omit<BaseAlgoOrderEntity<T>, \"child_orders\" | \"order_type\">;\n\nexport type TPSLOrderEntry = Optional<\n AlgoOrderEntity<AlgoOrderRootType.TP_SL>,\n \"side\" | \"type\" | \"trigger_price\"\n>;\n\nexport type BracketOrderEntry = Optional<\n AlgoOrderEntity<AlgoOrderRootType.BRACKET>,\n \"side\"\n>;\n","export enum WithdrawStatus {\n NotSupported = \"NotSupported\",\n NotConnected = \"NotConnected\",\n Unsettle = \"Unsettle\",\n InsufficientBalance = \"InsufficientBalance\",\n Normal = \"Normal\",\n}\n","export interface Chain {\n id: number;\n chainNameShort: string;\n chainLogo: string;\n chainInfo: ChainInfo;\n minGasBalance: number;\n minCrossGasBalance: number;\n maxPrepayCrossGas: number;\n blockExplorerName: string;\n chainName: string;\n requestRpc: string;\n}\n\nexport interface ChainInfo {\n chainId: string;\n chainName: string;\n nativeCurrency: NativeCurrency;\n rpcUrls: string[];\n blockExplorerUrls: string[];\n}\n\nexport interface NativeCurrency {\n name: string;\n symbol: string;\n decimals: number;\n fix: number;\n}\n\nexport const Ethereum = {\n chainNameShort: \"Ethereum\",\n id: 1,\n chainLogo: \"\",\n chainInfo: {\n chainId: `0x${(1).toString(16)}`,\n chainName: \"Ethereum Mainnet\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 8,\n },\n rpcUrls: [\"https://mainnet.infura.io/v3/9155d40884554acdb17699a18a1fe348\"],\n blockExplorerUrls: [\"https://etherscan.io/\"],\n },\n minGasBalance: 0.002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.025,\n blockExplorerName: \"EthScan\",\n chainName: \"Ethereum Mainnet\",\n requestRpc: \"https://rpc.ankr.com/eth\",\n};\n\nexport const Avalanche = {\n id: 43114,\n chainInfo: {\n chainId: `0x${(43114).toString(16)}`, // '0xa86a'\n chainName: \"Avalanche\",\n nativeCurrency: {\n name: \"avax\",\n symbol: \"AVAX\",\n decimals: 18,\n fix: 5,\n },\n rpcUrls: [\"https://api.avax.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://snowtrace.io/\"],\n },\n minGasBalance: 0.05,\n minCrossGasBalance: 0.15,\n maxPrepayCrossGas: 2,\n blockExplorerName: \"Snowtrace\",\n chainName: \"Avalanche\",\n chainNameShort: \"Avalanche\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/avalanche\",\n};\n\nexport const Fuji = {\n id: 43113,\n chainInfo: {\n chainId: `0x${(43113).toString(16)}`, // '0xa86a'\n chainName: \"Avalanche Fuji Testnet\",\n nativeCurrency: {\n name: \"avax\",\n symbol: \"AVAX\",\n decimals: 18,\n fix: 5,\n },\n rpcUrls: [\"https://api.avax.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://snowtrace.io/\"],\n },\n minGasBalance: 0.05,\n minCrossGasBalance: 0.15,\n maxPrepayCrossGas: 2,\n blockExplorerName: \"Snowtrace\",\n chainName: \"Avalanche Fuji\",\n chainNameShort: \"Avalanche Fuji\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/avalanche\",\n};\n\nexport const BNB = {\n id: 56,\n chainInfo: {\n chainId: `0x${(56).toString(16)}`, // 0x38\n chainName: \"BNB Chain\",\n nativeCurrency: {\n name: \"bnb\",\n symbol: \"BNB\",\n decimals: 18,\n fix: 6,\n },\n rpcUrls: [\"https://bsc-dataseed1.binance.org/\"],\n blockExplorerUrls: [\"https://bscscan.com/\"],\n },\n minGasBalance: 0.02,\n minCrossGasBalance: 0.02,\n maxPrepayCrossGas: 0.1,\n blockExplorerName: \"BscScan\",\n chainName: \"Binance Smart Chain\",\n chainNameShort: \"BNB Chain\",\n requestRpc: \"https://rpc.ankr.com/bsc\",\n chainLogo: \"\",\n};\n\nexport const Fantom = {\n id: 250,\n chainInfo: {\n chainId: `0x${(250).toString(16)}`, // 0x38\n chainName: \"Fantom\",\n nativeCurrency: {\n name: \"ftm\",\n symbol: \"FTM\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpcapi.fantom.network\"],\n blockExplorerUrls: [\"https://ftmscan.com/\"],\n },\n minGasBalance: 1,\n minCrossGasBalance: 10,\n maxPrepayCrossGas: 60,\n blockExplorerName: \"FTMScan\",\n chainName: \"Fantom\",\n chainNameShort: \"Fantom\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/fantom\",\n};\n\nexport const Polygon = {\n id: 137,\n chainInfo: {\n chainId: `0x${(137).toString(16)}`,\n chainName: \"Polygon\",\n nativeCurrency: {\n name: \"matic\",\n symbol: \"MATIC\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpc-mainnet.matic.network\"],\n blockExplorerUrls: [\"https://polygonscan.com/\"],\n },\n minGasBalance: 0.1,\n minCrossGasBalance: 1,\n maxPrepayCrossGas: 30,\n blockExplorerName: \"Polygonscan\",\n chainName: \"Polygon\",\n chainNameShort: \"Polygon\",\n requestRpc: \"https://rpc.ankr.com/polygon\",\n chainLogo: \"\",\n};\n\nexport const Arbitrum = {\n id: 42161,\n chainInfo: {\n chainId: `0x${(42161).toString(16)}`,\n chainName: \"Arbitrum\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://arb1.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://arbiscan.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbiscan\",\n chainName: \"Arbitrum\",\n chainNameShort: \"Arbitrum\",\n requestRpc: \"https://arb1.arbitrum.io/rpc\",\n chainLogo: \"\",\n};\n\nexport const Optimism = {\n id: 10,\n chainInfo: {\n chainId: `0x${(10).toString(16)}`,\n chainName: \"Optimism\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://mainnet.optimism.io\"],\n blockExplorerUrls: [\"https://optimistic.etherscan.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism\",\n chainName: \"Optimism\",\n chainNameShort: \"Optimism\",\n requestRpc: \"https://rpc.ankr.com/optimism\",\n chainLogo: \"\",\n};\n\nexport const zkSyncEra = {\n id: 324,\n chainInfo: {\n chainId: `0x${(324).toString(16)}`,\n chainName: \"zkSync Era\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://zksync2-mainnet.zksync.io\"],\n blockExplorerUrls: [\"https://explorer.zksync.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"zkSync Era\",\n chainName: \"zkSync Era\",\n chainNameShort: \"zkSync Era\",\n requestRpc: \"https://zksync2-mainnet.zksync.io/\",\n chainLogo: \"\",\n // blockExplorerName: 'zkSync Era Goerli',\n // chainName: 'zkSync Era Goerli',\n // chainNameShort: 'zkSync Era Goerli',\n // requestRpc: 'https://zksync2-testnet.zksync.dev/',\n // chainLogo: '',\n};\n\nexport const PolygonzkEVM = {\n id: 1101,\n chainInfo: {\n chainId: `0x${(1101).toString(16)}`,\n chainName: \"Polygon zkEVM\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://zkevm-rpc.com\"],\n blockExplorerUrls: [\"https://zkevm.polygonscan.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Polygon zkEVM\",\n chainName: \"Polygon zkEVM\",\n chainNameShort: \"Polygon zkEVM\",\n requestRpc: \"https://zkevm-rpc.com\",\n chainLogo: \"\",\n};\n\nexport const Linea = {\n id: 59144,\n chainInfo: {\n chainId: `0x${(59144).toString(16)}`,\n chainName: \"Linea\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.linea.build\"],\n blockExplorerUrls: [\"https://lineascan.build/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Linea\",\n chainName: \"Linea\",\n chainNameShort: \"Linea\",\n requestRpc: \"https://rpc.linea.build\",\n chainLogo: \"\",\n};\n\nexport const Base = {\n id: 8453,\n chainInfo: {\n chainId: `0x${(8453).toString(16)}`,\n chainName: \"Base Network\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://developer-access-mainnet.base.org/\"],\n blockExplorerUrls: [\"https://basescan.org\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Base\",\n chainName: \"Base\",\n chainNameShort: \"Base\",\n requestRpc: \"https://developer-access-mainnet.base.org/\",\n chainLogo: \"\",\n};\n\nexport const Mantle = {\n id: 5000,\n chainInfo: {\n chainId: `0x${(5000).toString(16)}`,\n chainName: \"Mantle\",\n nativeCurrency: {\n name: \"MNT\",\n symbol: \"MNT\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.mantle.xyz/\"],\n blockExplorerUrls: [\"https://mantlescan.xyz/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Mantle\",\n chainName: \"Mantle\",\n chainNameShort: \"Mantle\",\n requestRpc: \"https://rpc.mantle.xyz/\",\n chainLogo: \"\",\n};\n\nexport const ArbitrumGoerli = {\n id: 421613,\n chainInfo: {\n chainId: `0x${(421613).toString(16)}`,\n chainName: \"Arbitrum Goerli\",\n nativeCurrency: {\n name: \"AGOR\",\n symbol: \"AGOR\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://goerli-rollup.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://goerli-rollup-explorer.arbitrum.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbitrum Goerli\",\n chainName: \"Arbitrum Goerli\",\n chainNameShort: \"Arbitrum Goerli\",\n requestRpc: \"https://goerli-rollup.arbitrum.io/rpc\",\n chainLogo: \"\",\n};\n\nexport const ArbitrumSepolia = {\n id: 421614,\n chainInfo: {\n chainId: `0x${(421614).toString(16)}`,\n chainName: \"Arbitrum Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\"],\n blockExplorerUrls: [\"https://sepolia-explorer.arbitrum.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbitrum Sepolia\",\n chainName: \"Arbitrum Sepolia\",\n chainNameShort: \"Arbitrum Sepolia\",\n requestRpc: \"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\",\n chainLogo: \"\",\n};\n\nexport const OptimismGoerli = {\n id: 420,\n chainInfo: {\n chainId: `0x${(420).toString(16)}`,\n chainName: \"Optimism Goerli\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://optimism-goerli.gateway.tenderly.co\"],\n blockExplorerUrls: [\"https://goerli-optimism.etherscan.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism Goerli\",\n chainName: \"Optimism Goerli\",\n chainNameShort: \"Optimism Goerli\",\n requestRpc: \"https://optimism-goerli.gateway.tenderly.co\",\n chainLogo: \"\",\n};\n\nexport const OptimismSepolia = {\n id: 11155420,\n chainInfo: {\n chainId: `0x${(11155420).toString(16)}`,\n chainName: \"Optimism Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://sepolia.optimism.io\"],\n blockExplorerUrls: [\"https://sepolia-optimistic.etherscan.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism Sepolia\",\n chainName: \"Optimism Sepolia\",\n chainNameShort: \"Optimism Sepolia\",\n requestRpc: \"https://sepolia.optimism.io\",\n chainLogo: \"\",\n};\n\nexport const BaseSepolia = {\n id: 84532,\n chainInfo: {\n chainId: `0x${(84532).toString(16)}`,\n chainName: \"Base Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://base-sepolia-rpc.publicnode.com\"],\n blockExplorerUrls: [\"https://base-sepolia.blockscout.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Base Sepolia\",\n chainName: \"Base Sepolia\",\n chainNameShort: \"Base Sepolia\",\n requestRpc: \"https://base-sepolia-rpc.publicnode.com\",\n chainLogo: \"\",\n};\n\nexport const MantleSepolia = {\n id: 5003,\n chainInfo: {\n chainId: `0x${(5003).toString(16)}`,\n chainName: \"Mantle Sepolia\",\n nativeCurrency: {\n name: \"MNT\",\n symbol: \"MNT\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.sepolia.mantle.xyz/\"],\n blockExplorerUrls: [\"https://sepolia.mantlescan.xyz/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Mantle Sepolia\",\n chainName: \"Mantle Sepolia\",\n chainNameShort: \"Mantle Sepolia\",\n requestRpc: \"https://rpc.sepolia.mantle.xyz/\",\n chainLogo: \"\",\n};\n\nexport const PolygonAmoy = {\n id: 80002,\n chainInfo: {\n chainId: `0x${(80002).toString(16)}`,\n chainName: \"Polygon Amoy\",\n nativeCurrency: {\n name: \"MATIC\",\n symbol: \"MATIC\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc-amoy.polygon.technology/\"],\n blockExplorerUrls: [\"https://www.oklink.com/amoy\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Polygon Amoy\",\n chainName: \"Polygon Amoy\",\n chainNameShort: \"Polygon Amoy\",\n requestRpc: \"https://rpc-amoy.polygon.technology/\",\n chainLogo: \"\",\n};\n\nexport const Sei = {\n id: 1329,\n chainInfo: {\n chainId: `0x${(1329).toString(16)}`,\n chainName: \"Sei Network\",\n nativeCurrency: {\n name: \"SEI\",\n symbol: \"SEI\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://evm-rpc.sei-apis.com\"],\n blockExplorerUrls: [\"https://seitrace.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"SEI\",\n chainName: \"Sei Network\",\n chainNameShort: \"SEI\",\n requestRpc: \"https://evm-rpc.sei-apis.com\",\n chainLogo: \"\",\n};\n\nexport const StoryTestnet = {\n name: \"Story Odyssey Testnet\",\n public_rpc_url: \"https://rpc.odyssey.storyrpc.io/\",\n chain_id: 1516,\n currency_symbol: \"IP\",\n explorer_base_url: \"\",\n vault_address: \"\",\n};\nexport const StoryOdysseyTestnet = {\n id: 1329,\n chainInfo: {\n chainId: `0x${StoryTestnet.chain_id.toString(16)}`,\n chainName: StoryTestnet.name,\n nativeCurrency: {\n name: \"IP\",\n symbol: \"IP\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [StoryTestnet.public_rpc_url],\n blockExplorerUrls: [],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"SEI\",\n chainName: \"Sei Network\",\n chainNameShort: \"SEI\",\n requestRpc: \"https://evm-rpc.sei-apis.com\",\n chainLogo: \"\",\n};\nexport const chainsInfoMap: Map<number, Chain> = new Map([\n [Ethereum.id, Ethereum],\n [Avalanche.id, Avalanche],\n [Fuji.id, Fuji],\n [BNB.id, BNB],\n [Fantom.id, Fantom],\n [Polygon.id, Polygon],\n [Arbitrum.id, Arbitrum],\n [Optimism.id, Optimism],\n [zkSyncEra.id, zkSyncEra],\n [PolygonzkEVM.id, PolygonzkEVM],\n [Linea.id, Linea],\n [Base.id, Base],\n [Mantle.id, Mantle],\n [ArbitrumGoerli.id, ArbitrumGoerli],\n [ArbitrumSepolia.id, ArbitrumSepolia],\n [OptimismGoerli.id, OptimismGoerli],\n [OptimismSepolia.id, OptimismSepolia],\n [BaseSepolia.id, BaseSepolia],\n [MantleSepolia.id, MantleSepolia],\n [PolygonAmoy.id, PolygonAmoy],\n [Sei.id, Sei],\n [StoryOdysseyTestnet.id, StoryOdysseyTestnet],\n]);\n\nexport const SolanaDevnet = {\n id: 901901901,\n chainInfo: {\n name: \"Solana Devnet\",\n public_rpc_url: \"\",\n chainId: 901901901,\n currency_symbol: \"SOL\",\n explorer_base_url: \"\",\n vault_address: \"\",\n },\n} as unknown as typeof Arbitrum;\n\nexport const TestnetChains = [\n {\n network_infos: {\n name: \"Arbitrum Sepolia\",\n shortName: \"Arbitrum Sepolia\",\n public_rpc_url: \"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\",\n chain_id: 421614,\n currency_symbol: \"ETH\",\n bridge_enable: true,\n mainnet: false,\n explorer_base_url: \"https://sepolia.arbiscan.io\",\n est_txn_mins: null,\n },\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d\",\n decimals: 6,\n },\n ],\n },\n {\n network_infos: {\n name: \"Solana Devnet\",\n public_rpc_url: \"\",\n chain_id: 901901901,\n currency_symbol: \"SOL\",\n explorer_base_url: \"\",\n vault_address: \"\",\n },\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU\",\n decimals: 6,\n },\n ],\n },\n {\n network_infos: StoryTestnet,\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"0xF1815bd50389c46847f0Bda824eC8da914045D14\",\n decimals: 6,\n },\n ],\n },\n // {\n // network_infos: {\n // name: \"Mantle Sepolia\",\n // shortName: \"Mantle Sepolia\",\n // public_rpc_url: \"https://rpc.sepolia.mantle.xyz/\",\n // chain_id: 5003,\n // currency_symbol: \"MNT\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://sepolia.mantlescan.xyz/\",\n // est_txn_mins: null,\n // },\n // token_infos: [\n // {\n // symbol: \"USDC\",\n // address: \"0xAcab8129E2cE587fD203FD770ec9ECAFA2C88080\",\n // decimals: 6,\n // display_name: \"USDC.e\",\n // },\n // ],\n // },\n // {\n // network_infos: {\n // name: \"Arbitrum Goerli\",\n // shortName: \"Arbitrum Goerli\",\n // public_rpc_url: \"https://goerli-rollup.arbitrum.io/rpc\",\n // chain_id: 421613,\n // currency_symbol: \"ETH\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://goerli.arbiscan.io/\",\n // est_txn_mins: null,\n // },\n // token_infos: [\n // {\n // symbol: \"USDC\",\n // address: \"0xfd064A18f3BF249cf1f87FC203E90D8f650f2d63\",\n // decimals: 6,\n // },\n // ],\n // },\n // {\n // network_infos: {\n // name: \"Optimism Goerli\",\n // shortName: \"Optimism Goerli\",\n // public_rpc_url: \"https://optimism-goerli.gateway.tenderly.co\",\n // chain_id: 420,\n // currency_symbol: \"ETH\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://goerli-optimism.etherscan.io\",\n // est_txn_mins: null,\n // },\n // },\n];\n\nexport const defaultMainnetChains = [Arbitrum, Base, Optimism];\nexport const defaultTestnetChains = [ArbitrumSepolia];\n\nexport enum ChainNamespace {\n evm = \"EVM\",\n solana = \"SOL\",\n}\n\nexport const AbstractChains = new Set([2741, 11124]);\nexport const SolanaChains = new Set([901901901, 900900900]);\n","export enum TrackerEventName {\n /** virtual event (not send this event name to tracker) */\n trackIdentifyUserId = \"track_identify_user_id\",\n trackIdentify = \"track_identify\",\n trackCustomEvent = \"track_custom_event\",\n\n /** real event name (send this event name to tracker) */\n withdrawSuccess = \"withdraw_request_success\",\n withdrawFailed = \"withdraw_request_failure\",\n depositSuccess = \"deposit_request_success\",\n depositFailed = \"deposit_request_failure\",\n signinSuccess = \"sign_message_success\",\n placeOrderSuccess = \"place_order_success\",\n walletConnect = \"connect_wallet_success\",\n clickLinkDeviceButton = \"click_link_device_button\",\n signLinkDeviceMessageSuccess = \"sign_link_device_message_success\",\n linkDeviceModalClickConfirm = \"link_device_modal_click_confirm\",\n socialLoginSuccess = \"social_login_success\",\n clickSwitchNetwork = \"click_switch_network\",\n clickSwitchWallet = \"click_switch_wallet\",\n switchNetworkSuccess = \"switch_network_success\",\n clickExportPrivateKey = \"click_export_private_key\",\n switchLanguage = \"switch_language\",\n leaderboardCampaignClickTradeNow = \"leaderboard_campaign_click_trade_now\",\n leaderboardCampaignClickLearnMore = \"leaderboard_campaign_click_learn_more\",\n}\n","import { API } from \"./types/api\";\n\n// export type Chain = {\n// id: string;\n// name?: string;\n// };\n\nexport type CurrentChain = {\n id: number;\n info: API.Chain;\n};\n\nexport enum WS_WalletStatusEnum {\n NO = \"NO\",\n FAILED = \"FAILED\",\n PENDING = \"PENDING\",\n PROCESSING = \"PROCESSING\",\n COMPLETED = \"COMPLETED\",\n}\n","export const LedgerWalletKey = \"orderly:ledger-wallet\";\nexport const ConnectorKey = \"orderly:connectorKey\";\nexport const ChainKey = \"order:chain\";\nexport const LinkDeviceKey = \"orderly_link_device\";\n","export class ApiError extends Error {\n constructor(message: string, private readonly code: number) {\n super(message);\n this.name = \"ApiError\";\n }\n}\n\nexport class SDKError extends Error {\n constructor(message: string) {\n super(`[ORDERLY SDK ERROR]:${message}`);\n this.name = \"SDKError\";\n }\n}\n","export const definedTypes = {\n EIP712Domain: [\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" },\n ],\n Registration: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"timestamp\", type: \"uint64\" },\n { name: \"registrationNonce\", type: \"uint256\" },\n ],\n Withdraw: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"receiver\", type: \"address\" },\n { name: \"token\", type: \"string\" },\n { name: \"amount\", type: \"uint256\" },\n { name: \"withdrawNonce\", type: \"uint64\" },\n { name: \"timestamp\", type: \"uint64\" },\n ],\n AddOrderlyKey: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"orderlyKey\", type: \"string\" },\n { name: \"scope\", type: \"string\" },\n { name: \"timestamp\", type: \"uint64\" },\n { name: \"expiration\", type: \"uint64\" },\n ],\n SettlePnl: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"settleNonce\", type: \"uint64\" },\n { name: \"timestamp\", type: \"uint64\" },\n ],\n } as const;","export enum AssetHistoryStatusEnum {\n NEW = \"NEW\",\n CONFIRM = \"CONFIRM\",\n PROCESSING = \"PROCESSING\",\n COMPLETED = \"COMPLETED\",\n FAILED = \"FAILED\",\n PENDING_REBALANCE = \"PENDING_REBALANCE\",\n}\n"],"mappings":";;;;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EACtC;AACF;;;AXIF,kBAA6B;;;AYxCtB,IAAK,yBAAL,kBAAKC,4BAAL;AACL,EAAAA,wBAAA,SAAM;AACN,EAAAA,wBAAA,aAAU;AACV,EAAAA,wBAAA,gBAAa;AACb,EAAAA,wBAAA,eAAY;AACZ,EAAAA,wBAAA,YAAS;AACT,EAAAA,wBAAA,uBAAoB;AANV,SAAAA;AAAA,GAAA;","names":["AccountStatusEnum","SystemStateEnum","ExchangeStatusEnum","NetworkStatusEnum","AnnouncementType","OrderType","BBOOrderType","OrderLevel","AlgoOrderRootType","TriggerPriceType","AlgoOrderType","OrderSide","OrderStatus","WithdrawStatus","ChainNamespace","TrackerEventName","WS_WalletStatusEnum","AssetHistoryStatusEnum"]}
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  // src/version.ts
2
2
  if (typeof window !== "undefined") {
3
3
  window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};
4
- window.__ORDERLY_VERSION__["@orderly.network/types"] = "2.1.3";
4
+ window.__ORDERLY_VERSION__["@orderly.network/types"] = "2.2.0";
5
5
  }
6
- var version_default = "2.1.3";
6
+ var version_default = "2.2.0";
7
7
 
8
8
  // src/constants.ts
9
9
  var AccountStatusEnum = /* @__PURE__ */ ((AccountStatusEnum2) => {
@@ -35,8 +35,15 @@ var NetworkStatusEnum = /* @__PURE__ */ ((NetworkStatusEnum2) => {
35
35
  })(NetworkStatusEnum || {});
36
36
  var ARBITRUM_TESTNET_CHAINID = 421614;
37
37
  var SOLANA_TESTNET_CHAINID = 901901901;
38
+ var SOLANA_MAINNET_CHAINID = 900900900;
38
39
  var STORY_TESTNET_CHAINID = 1516;
39
40
  var MONAD_TESTNET_CHAINID = 10143;
41
+ var ABSTRACT_TESTNET_CHAINID = 11124;
42
+ var ABSTRACT_MAINNET_CHAINID = 2741;
43
+ var ABSTRACT_CHAIN_ID_MAP = /* @__PURE__ */ new Set([
44
+ ABSTRACT_TESTNET_CHAINID,
45
+ ABSTRACT_MAINNET_CHAINID
46
+ ]);
40
47
  var ARBITRUM_TESTNET_CHAINID_HEX = "0x66EEE";
41
48
  var MANTLE_TESTNET_CHAINID = 5003;
42
49
  var MANTLE_TESTNET_CHAINID_HEX = "0x138b";
@@ -58,6 +65,23 @@ var ArbitrumSepoliaChainInfo = {
58
65
  explorer_base_url: "https://sepolia.arbiscan.io",
59
66
  vault_address: "0x0EaC556c0C2321BA25b9DC01e4e3c95aD5CDCd2f"
60
67
  };
68
+ var AbstractTestnetChainInfo = {
69
+ name: "Abstract Testnet",
70
+ public_rpc_url: "https://api.testnet.abs.xyz",
71
+ chain_id: "11124",
72
+ currency_symbol: "ETH",
73
+ currency_decimal: 18,
74
+ explorer_base_url: "https://sepolia.abscan.org",
75
+ vault_address: "0xf14Ff11F3bb1011ff42665Ec869c7827c43745Fd"
76
+ };
77
+ var AbstractTestnetTokenInfo = {
78
+ chain_id: "11124",
79
+ contract_address: "0xa0BB43E2eA7fcE91F07e628d72fD6333e80F47D2",
80
+ decimals: 6,
81
+ withdrawal_fee: 1,
82
+ cross_chain_withdrawal_fee: 2,
83
+ display_name: "USDC"
84
+ };
61
85
  var SolanaDevnetChainInfo = {
62
86
  chain_id: "901901901",
63
87
  currency_decimal: 9,
@@ -843,6 +867,7 @@ var ChainNamespace = /* @__PURE__ */ ((ChainNamespace2) => {
843
867
  ChainNamespace2["solana"] = "SOL";
844
868
  return ChainNamespace2;
845
869
  })(ChainNamespace || {});
870
+ var AbstractChains = /* @__PURE__ */ new Set([2741, 11124]);
846
871
  var SolanaChains = /* @__PURE__ */ new Set([901901901, 900900900]);
847
872
 
848
873
  // src/track.ts
@@ -885,6 +910,7 @@ var WS_WalletStatusEnum = /* @__PURE__ */ ((WS_WalletStatusEnum2) => {
885
910
  var LedgerWalletKey = "orderly:ledger-wallet";
886
911
  var ConnectorKey = "orderly:connectorKey";
887
912
  var ChainKey = "order:chain";
913
+ var LinkDeviceKey = "orderly_link_device";
888
914
 
889
915
  // src/errors.ts
890
916
  var ApiError = class extends Error {
@@ -954,10 +980,16 @@ var AssetHistoryStatusEnum = /* @__PURE__ */ ((AssetHistoryStatusEnum2) => {
954
980
  return AssetHistoryStatusEnum2;
955
981
  })(AssetHistoryStatusEnum || {});
956
982
  export {
983
+ ABSTRACT_CHAIN_ID_MAP,
984
+ ABSTRACT_MAINNET_CHAINID,
985
+ ABSTRACT_TESTNET_CHAINID,
957
986
  ARBITRUM_MAINNET_CHAINID,
958
987
  ARBITRUM_MAINNET_CHAINID_HEX,
959
988
  ARBITRUM_TESTNET_CHAINID,
960
989
  ARBITRUM_TESTNET_CHAINID_HEX,
990
+ AbstractChains,
991
+ AbstractTestnetChainInfo,
992
+ AbstractTestnetTokenInfo,
961
993
  AccountStatusEnum,
962
994
  AlgoOrderRootType,
963
995
  AlgoOrderType,
@@ -984,6 +1016,7 @@ export {
984
1016
  Fuji,
985
1017
  LedgerWalletKey,
986
1018
  Linea,
1019
+ LinkDeviceKey,
987
1020
  MANTLE_TESTNET_CHAINID,
988
1021
  MANTLE_TESTNET_CHAINID_HEX,
989
1022
  MEDIA_TABLET,
@@ -1003,6 +1036,7 @@ export {
1003
1036
  PolygonAmoy,
1004
1037
  PolygonzkEVM,
1005
1038
  SDKError,
1039
+ SOLANA_MAINNET_CHAINID,
1006
1040
  SOLANA_TESTNET_CHAINID,
1007
1041
  STORY_TESTNET_CHAINID,
1008
1042
  Sei,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/version.ts","../src/constants.ts","../src/types/api.ts","../src/order.ts","../src/withdraw.ts","../src/chains.ts","../src/track.ts","../src/wallet.ts","../src/storageKey.ts","../src/errors.ts","../src/sign.ts","../src/index.ts","../src/assetHistory.ts"],"sourcesContent":["\ndeclare global {\n interface Window {\n __ORDERLY_VERSION__?: {\n [key: string]: string;\n };\n }\n}\nif(typeof window !== 'undefined') {\n window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};\n window.__ORDERLY_VERSION__[\"@orderly.network/types\"] = \"2.1.3\";\n};\n\nexport default \"2.1.3\";\n","export enum AccountStatusEnum {\n EnableTradingWithoutConnected = -1,\n NotConnected = 0,\n Connected = 1,\n NotSignedIn = 2,\n SignedIn = 3,\n DisabledTrading = 4,\n EnableTrading = 5,\n}\n\nexport enum SystemStateEnum {\n Loading = 0,\n Error = 1,\n Ready = 10,\n}\n\nexport enum ExchangeStatusEnum {\n Normal = 0,\n Maintain = 1,\n}\n\nexport type NetworkId = \"testnet\" | \"mainnet\";\n\nexport enum NetworkStatusEnum {\n unknown = 0,\n unsupported = 1,\n supported = 2,\n}\n\n// Testnet\n// Arbitrum Goerli\n// export const ARBITRUM_TESTNET_CHAINID = 421613;\n// export const ARBITRUM_TESTNET_CHAINID_HEX = \"0x66EED\";\n\n// Arbitrum Sepolia\nexport const ARBITRUM_TESTNET_CHAINID = 421614;\nexport const SOLANA_TESTNET_CHAINID = 901901901;\nexport const STORY_TESTNET_CHAINID = 1516;\nexport const MONAD_TESTNET_CHAINID = 10143;\nexport const ARBITRUM_TESTNET_CHAINID_HEX = \"0x66EEE\";\n\nexport const MANTLE_TESTNET_CHAINID = 5003;\nexport const MANTLE_TESTNET_CHAINID_HEX = \"0x138b\";\n\n// Mainnet\nexport const ARBITRUM_MAINNET_CHAINID = 42161;\nexport const ARBITRUM_MAINNET_CHAINID_HEX = \"0xa4b1\";\n\nexport const MEDIA_TABLET = \"(max-width: 768px)\";\n\nexport const DEPOSIT_FEE_RATE = 1.05;\n\n/**\n * A constant for the maximum value for a ``uint256``.\n */\nexport const MaxUint256: bigint = BigInt(\n \"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"\n);\n\nexport const nativeTokenAddress = \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\";\n\nexport const isNativeTokenChecker = (address: string) =>\n address === nativeTokenAddress;\n\nexport const ArbitrumSepoliaChainInfo = {\n name: \"Arbitrum Sepolia\",\n public_rpc_url: \"https://arbitrum-sepolia.gateway.tenderly.co\",\n chain_id: \"421614\",\n currency_symbol: \"ETH\",\n currency_decimal: 18,\n explorer_base_url: \"https://sepolia.arbiscan.io\",\n vault_address: \"0x0EaC556c0C2321BA25b9DC01e4e3c95aD5CDCd2f\",\n}\nexport const SolanaDevnetChainInfo = {\n chain_id: \"901901901\",\n currency_decimal: 9,\n currency_symbol: \"SOL\",\n explorer_base_url: \"https://explorer.solana.com/?cluster=devnet\",\n name: \"Solana-Devnet\",\n public_rpc_url: \"https://api.devnet.solana.com\",\n vault_address: \"9shwxWDUNhtwkHocsUAmrNAQfBH2DHh4njdAEdHZZkF2\",\n}\n\nexport const SolanaDevnetTokenInfo = {\n chain_id: \"901901901\",\n contract_address: \"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 5,\n display_name: \"USDC\"\n}\nexport const ArbitrumSepoliaTokenInfo = {\n chain_id: \"421614\",\n contract_address: \"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 2,\n display_name: \"USDC\"\n}\n\nexport const TesntTokenFallback = (testnetTokens: any) => [\n {\n token: \"USDC\",\n token_hash: \"0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa\",\n decimals: 6,\n minimum_withdraw_amount: 0.000001,\n chain_details: testnetTokens\n }\n]","import { AlgoOrderRootType, OrderSide, OrderType } from \"../order\";\n\nexport enum AnnouncementType {\n Listing = \"LISTING\",\n Maintenance = \"MAINTENANCE\",\n Delisting = \"DELISTING\",\n}\n\nexport declare namespace API {\n //v1/public/token\n export interface Token {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n chain_details: ChainDetail[];\n }\n\n //v1/public/token\n export interface ChainDetail {\n chain_id: string;\n contract_address: string;\n decimals: number;\n }\n\n // ws market, api v1/public/futures\n export interface MarketInfo {\n symbol: string;\n index_price: number;\n mark_price: number;\n sum_unitary_funding: number;\n est_funding_rate: number;\n last_funding_rate: number;\n next_funding_time: number;\n open_interest: string;\n \"24h_open\": number;\n \"24h_close\": number;\n \"24h_high\": number;\n \"24h_low\": number;\n /**\n * @deprecated\n * spelling mistake, use 24h_volume to instead, will be remove next version\n */\n \"24h_volumn\": number;\n \"24h_volume\": number;\n \"24h_amount\": number;\n }\n\n export interface MarketInfoExt extends MarketInfo {\n change: number;\n \"24h_volume\": number;\n }\n\n export interface Announcement {\n last_updated_time?: number | null;\n rows?: Array<{\n announcement_id: number | string;\n message: string;\n i18n?: Record<PropertyKey, string | null>;\n url?: string | null;\n type?: AnnouncementType | null;\n updated_time?: number | null;\n }>;\n }\n\n /**\n * v1/public/info\n */\n export interface Symbol {\n symbol: string;\n quote_min: number;\n quote_max: number;\n quote_tick: number;\n base_min: number;\n base_max: number;\n base_tick: number;\n min_notional: number;\n price_range: number;\n price_scope: number;\n std_liquidation_fee: number;\n liquidator_fee: number;\n claim_insurance_fund_discount: number;\n funding_period: number;\n cap_funding: number;\n floor_funding: number;\n interest_rate: number;\n created_time: number;\n updated_time: number;\n imr_factor: number;\n base_mmr: number;\n base_imr: number;\n }\n\n export interface TokenItem {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n chain_details: ChainDetail[];\n }\n\n export interface ChainDetail {\n chain_id: string;\n contract_address: string;\n decimals: number;\n withdrawal_fee: number;\n }\n\n export interface SymbolExt extends Symbol {\n base: string;\n base_dp: number;\n\n quote: string;\n quote_dp: number;\n type: string;\n name: string;\n }\n\n export interface Order {\n symbol: string;\n status: string;\n side: string;\n order_id: number;\n algo_order_id?: number;\n user_id: number;\n price: number | null;\n type: string;\n quantity: number;\n amount: null;\n visible: number;\n executed: number;\n total_fee: number;\n fee_asset: string;\n client_order_id: null;\n average_executed_price: number;\n total_executed_quantity: number;\n visible_quantity: number;\n created_time: number;\n updated_time: number;\n reduce_only: boolean;\n trigger_price?: number;\n order_tag?: string;\n }\n\n export interface OrderExt extends Order {\n mark_price: string;\n }\n\n export interface AlgoOrder {\n algo_order_id: number;\n root_algo_order_id: number;\n parent_algo_order_id: number;\n parent_algo_type: AlgoOrderRootType;\n symbol: string;\n algo_type: string;\n child_orders: AlgoOrder[];\n side: string;\n quantity: number;\n is_triggered: boolean;\n is_activated: boolean;\n trigger_price: number;\n trigger_price_type: string;\n type: OrderType;\n root_algo_status: string;\n algo_status: string;\n price?: number;\n total_executed_quantity: number;\n visible_quantity: number;\n total_fee: number;\n fee_asset: string;\n reduce_only: boolean;\n created_time: number;\n updated_time: number;\n order_tag?: string;\n }\n\n export interface AlgoOrderExt extends AlgoOrder {\n mark_price: string;\n position?: Partial<Position>;\n tp_trigger_price?: number;\n sl_trigger_price?: number;\n }\n\n export interface OrderResponse {\n rows: (Order | AlgoOrder)[];\n meta: {\n total: number;\n current_page: number;\n records_per_page: number;\n };\n }\n\n export interface FundingRate {\n symbol: string;\n est_funding_rate: number;\n est_funding_rate_timestamp: number;\n last_funding_rate: number;\n last_funding_rate_timestamp: number;\n next_funding_time: number;\n sum_unitary_funding: number;\n }\n\n export interface FundingPeriodData {\n rate: number;\n positive: number;\n negative: number;\n }\n\n export interface FundingHistory {\n symbol: string;\n data_start_time: string;\n funding: {\n last: FundingPeriodData;\n \"1d\": FundingPeriodData;\n \"3d\": FundingPeriodData;\n \"7d\": FundingPeriodData;\n \"14d\": FundingPeriodData;\n \"30d\": FundingPeriodData;\n \"90d\": FundingPeriodData;\n };\n }\n\n export interface PositionInfo extends PositionAggregated {\n // margin_ratio: number;\n // initial_margin_ratio: number;\n // maintenance_margin_ratio: number;\n // open_margin_ratio: number;\n // current_margin_ratio_with_orders: number;\n // initial_margin_ratio_with_orders: number;\n // maintenance_margin_ratio_with_orders: number;\n // total_collateral_value: number;\n // free_collateral: number;\n rows: Position[];\n // total_pnl_24_h: number;\n }\n\n export interface PositionAggregated {\n margin_ratio: number;\n initial_margin_ratio: number;\n maintenance_margin_ratio: number;\n open_margin_ratio: number;\n current_margin_ratio_with_orders: number;\n initial_margin_ratio_with_orders: number;\n maintenance_margin_ratio_with_orders: number;\n total_collateral_value: number;\n free_collateral: number;\n total_pnl_24_h: number;\n /**\n * @deprecated use total_unreal_pnl instead\n */\n unrealPnL: number;\n total_unreal_pnl: number;\n total_unreal_pnl_index?: number;\n /**\n * @deprecated use total_unsettled_pnl instead\n */\n unsettledPnL: number;\n total_unsettled_pnl: number;\n notional: number;\n unrealPnlROI: number;\n unrealPnlROI_index?: number;\n }\n\n export interface Position {\n symbol: string;\n position_qty: number;\n cost_position: number;\n last_sum_unitary_funding: number;\n pending_long_qty: number;\n pending_short_qty: number;\n settle_price: number;\n average_open_price: number;\n unrealized_pnl: number;\n unrealized_pnl_index?: number;\n unrealized_pnl_ROI: number;\n unsettled_pnl: number;\n unsettled_pnl_ROI: number;\n unrealized_pnl_ROI_index?: number;\n mark_price: number;\n index_price?: number;\n est_liq_price: number | null;\n timestamp: number;\n /**\n * Maintenance margin ratio\n */\n mmr: number;\n imr: number;\n IMR_withdraw_orders: number;\n MMR_with_orders: number;\n pnl_24_h: number;\n fee_24_h: number;\n }\n\n export interface PositionExt extends Position {\n notional: number;\n mm: number;\n }\n\n export interface PositionTPSLExt extends PositionExt {\n tp_trigger_price?: number;\n sl_trigger_price?: number;\n\n // has_position_tp_sl: boolean;\n\n /**\n * related position tp/sl order\n */\n algo_order?: AlgoOrder;\n }\n\n export interface PositionsTPSLExt extends PositionAggregated {\n rows: PositionTPSLExt[];\n }\n\n export interface Trade {\n symbol: Symbol;\n side: OrderSide;\n ts: number;\n executed_price: number;\n executed_quantity: number;\n executed_timestamp: number;\n }\n\n export interface Holding {\n token: string;\n holding: number;\n frozen: number;\n pending_short: number;\n updated_time: number;\n }\n\n export interface AccountInfo {\n account_id: string;\n email: string;\n account_mode: string;\n tier: string;\n futures_tier: string;\n maintenance_cancel_orders: boolean;\n taker_fee_rate: number;\n maker_fee_rate: number;\n max_leverage: number;\n futures_taker_fee_rate: number;\n futures_maker_fee_rate: number;\n imr_factor: { [key: string]: number };\n max_notional: { [key: string]: number };\n }\n\n export interface Chain {\n dexs: string[];\n network_infos: NetworkInfos;\n token_infos: TokenInfo[];\n nativeToken?: TokenInfo;\n // nativeToken\n }\n\n export interface NetworkInfos {\n name: string;\n shortName: string;\n public_rpc_url: string;\n chain_id: number;\n currency_symbol: string;\n bridge_enable: boolean;\n mainnet: boolean;\n est_txn_mins: number | null;\n explorer_base_url: string;\n bridgeless?: boolean;\n withdrawal_fee?: number;\n minimum_withdraw_amount?: number;\n }\n\n export interface TokenInfo {\n address: string;\n symbol: string;\n decimals: number;\n display_name: string;\n precision: number;\n }\n\n export interface Chain {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n chain_details: ChainDetail[];\n }\n\n // export interface Token{\n\n // }\n\n export interface ChainDetail {\n chain_id: string;\n chain_name?: string;\n contract_address: string;\n decimals: number;\n withdrawal_fee: number;\n }\n\n export interface AssetHistory {\n meta: RecordsMeta;\n rows: AssetHistoryRow[];\n }\n\n export interface RecordsMeta {\n total: number;\n records_per_page: number;\n current_page: number;\n }\n\n export interface AssetHistoryRow {\n id: string;\n tx_id: string;\n side: string;\n token: string;\n amount: number;\n fee: number;\n trans_status: string;\n created_time: number;\n updated_time: number;\n chain_id: string;\n }\n\n export interface FundingFeeHistory {\n meta: RecordsMeta;\n rows: FundingFeeRow[];\n }\n\n export interface FundingFeeRow {\n symbol: string;\n funding_rate: number;\n mark_price: number;\n funding_fee: number;\n payment_type: string;\n status: string;\n created_time: number;\n updated_time: number;\n }\n\n export interface DailyRow {\n account_value: number;\n broker_id: string;\n date: string;\n perp_volume: number;\n pnl: number;\n snapshot_time?: number;\n }\n\n export interface PositionHistory {\n position_id: number; // Unique identifier for the position\n liquidation_id?: number; // Unique identifier for the position\n position_status: string; // Status of the position\n type: string; // Type of the position activity\n symbol: string; // Trading pair symbol\n avg_open_price: number; // Average open price of the position\n avg_close_price: number; // Average close price of the position\n max_position_qty: number; // Maximum quantity held in the position\n closed_position_qty: number; // Quantity closed in the position\n side: \"LONG\" | \"SHORT\"; // Side of the position\n trading_fee: number; // Fee charged for trading\n accumulated_funding_fee: number; // Accumulated funding fee for the position\n insurance_fund_fee: number; // Fee contributed to the insurance fund\n liquidator_fee: number; // Fee paid to the liquidator\n realized_pnl: number; // Realized profit and loss\n open_timestamp: number; // Timestamp when the position was opened\n close_timestamp: number; // Timestamp when the position was closed\n last_update_time: number; // Timestamp of the last update to the position\n }\n\n export interface LiquidationPositionByPerp {\n abs_liquidation_fee: number;\n cost_position_transfer: number;\n liquidator_fee: number;\n position_qty: number;\n symbol: string;\n transfer_price: number;\n }\n\n export interface Liquidation {\n liquidation_id: number;\n timestamp: number;\n transfer_amount_to_insurance_fund: number;\n positions_by_perp: LiquidationPositionByPerp[];\n }\n}\n\nexport declare namespace WSMessage {\n export interface Ticker {\n symbol: string;\n open: number;\n close: number;\n high: number;\n low: number;\n volume: number;\n amount: number;\n count: number;\n change: number;\n }\n\n export interface MarkPrice {\n symbol: string;\n price: number;\n }\n\n export interface Position {\n symbol: string;\n positionQty: number;\n costPosition: number;\n lastSumUnitaryFunding: number;\n sumUnitaryFundingVersion: number;\n pendingLongQty: number;\n pendingShortQty: number;\n settlePrice: number;\n averageOpenPrice: number;\n unsettledPnl: number;\n pnl24H: number;\n fee24H: number;\n markPrice: number;\n estLiqPrice: number;\n version: number;\n imr: number;\n imrwithOrders: number;\n mmrwithOrders: number;\n mmr: number;\n }\n\n export interface VaultBalance {\n chain_id: string;\n token: string;\n balance: number;\n }\n\n export interface Order {\n symbol: string;\n clientOrderId: string;\n orderId: number;\n type: string;\n side: string;\n quantity: number;\n price: number;\n tradeId: number;\n executedPrice: number;\n executedQuantity: number;\n fee: number;\n feeAsset: string;\n totalExecutedQuantity: number;\n avgPrice: number;\n status: string;\n reason: string;\n totalFee: number;\n visible: number;\n /**\n * update time\n */\n timestamp: number;\n reduceOnly: boolean;\n maker: boolean;\n }\n\n export interface Holding {\n holding: number;\n frozen: number;\n interest: number;\n pendingShortQty: number;\n pendingExposure: number;\n pendingLongQty: number;\n pendingLongExposure: number;\n version: number;\n staked: number;\n unbonding: number;\n vault: number;\n fee24H: number;\n markPrice: number;\n }\n\n export interface AlgoOrder {\n symbol: string;\n rootAlgoOrderId: number;\n parentAlgoOrderId: number;\n algoOrderId: number;\n status: string;\n algoType: string;\n side: string;\n quantity: number;\n triggerStatus: string;\n price: number;\n type: string;\n triggerTradePrice: number;\n triggerTime: number;\n tradeId: number;\n executedPrice: number;\n executedQuantity: number;\n fee: number;\n feeAsset: string;\n totalExecutedQuantity: number;\n averageExecutedPrice: number;\n totalFee: number;\n timestamp: number;\n visibleQuantity: number;\n reduceOnly: boolean;\n triggered: boolean;\n maker: boolean;\n rootAlgoStatus: string;\n algoStatus: string;\n }\n\n export interface Announcement {\n announcement_id: string;\n message: string;\n i18n: Record<PropertyKey, string | null>;\n url?: string | null;\n type: AnnouncementType | null;\n updated_time: number;\n }\n}\n","/**\n * Supported types for placing an order\n */\nexport enum OrderType {\n LIMIT = \"LIMIT\",\n MARKET = \"MARKET\",\n IOC = \"IOC\",\n FOK = \"FOK\",\n POST_ONLY = \"POST_ONLY\",\n ASK = \"ASK\",\n BID = \"BID\",\n STOP_LIMIT = \"STOP_LIMIT\",\n STOP_MARKET = \"STOP_MARKET\",\n /**\n * Only for POSITIONAL_TP_SL type algo order\n */\n CLOSE_POSITION = \"CLOSE_POSITION\",\n}\n\nexport enum BBOOrderType {\n COUNTERPARTY1 = \"counterparty1\",\n COUNTERPARTY5 = \"counterparty5\",\n QUEUE1 = \"queue1\",\n QUEUE5 = \"queue5\",\n}\n\nexport enum OrderLevel {\n ONE = 0,\n TWO = 1,\n THREE = 2,\n FOUR = 3,\n FIVE = 4,\n}\n\nexport enum AlgoOrderRootType {\n TP_SL = \"TP_SL\",\n POSITIONAL_TP_SL = \"POSITIONAL_TP_SL\",\n STOP = \"STOP\",\n BRACKET = \"BRACKET\",\n}\n\nexport enum TriggerPriceType {\n MARK_PRICE = \"MARK_PRICE\",\n}\n\nexport enum AlgoOrderType {\n TAKE_PROFIT = \"TAKE_PROFIT\",\n STOP_LOSS = \"STOP_LOSS\",\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\",\n}\n\nexport enum PositionSide {\n LONG = \"LONG\",\n SHORT = \"SHORT\",\n}\n\nexport enum OrderStatus {\n /** @deprecated */\n OPEN = \"OPEN\",\n NEW = \"NEW\",\n FILLED = \"FILLED\",\n PARTIAL_FILLED = \"PARTIAL_FILLED\",\n CANCELLED = \"CANCELLED\",\n REPLACED = \"REPLACED\",\n // CANCELLED + FILLED\n COMPLETED = \"COMPLETED\",\n // NEW + PARTIAL_FILLED\n INCOMPLETE = \"INCOMPLETE\",\n REJECTED = \"REJECTED\",\n}\n\nexport interface OrderExt {\n total: string;\n}\n\nexport interface BaseOrder {\n symbol: string;\n order_type: OrderType;\n order_type_ext?: OrderType;\n order_price: string;\n order_quantity: string;\n order_amount?: number;\n visible_quantity: number;\n side: OrderSide;\n reduce_only: boolean;\n slippage: number;\n order_tag: string;\n level: OrderLevel;\n post_only_adjust: boolean;\n}\n\nexport interface RegularOrder extends BaseOrder, OrderExt {\n // symbol: string;\n // client_order_id: string;\n // type: OrderType;\n // price: number;\n // quantity: number;\n}\n\nexport interface AlgoOrder extends BaseOrder, OrderExt {\n // symbol: string;\n quantity: string;\n type: OrderType;\n price: string;\n algo_type: AlgoOrderRootType;\n trigger_price_type: string;\n trigger_price: string;\n child_orders: AlgoOrderChildOrders[];\n}\n\nexport interface BracketOrder extends AlgoOrder, OrderExt {\n /**\n * Computed take profit\n */\n tp_pnl?: string;\n tp_offset?: string;\n tp_offset_percentage?: string;\n tp_ROI?: string;\n tp_trigger_price?: string;\n\n /**\n * Computed stop loss\n */\n sl_pnl?: string;\n sl_offset?: string;\n sl_offset_percentage?: string;\n sl_ROI?: string;\n sl_trigger_price?: string;\n}\n\nexport type OrderlyOrder = RegularOrder & AlgoOrder & BracketOrder;\n\nexport interface AlgoOrderChildOrders {\n symbol: string;\n algo_type: string;\n child_orders: ChildOrder[];\n}\n\nexport interface ChildOrder {\n symbol: string;\n algo_type: AlgoOrderType;\n side: string;\n type: OrderType;\n trigger_price: string;\n\n reduce_only: boolean;\n trigger_price_type?: string;\n}\n\n// export interface OrderEntity {}\n\nexport interface OrderEntity {\n symbol: string;\n order_type: OrderType;\n algo_type?: AlgoOrderRootType;\n order_type_ext?: OrderType;\n order_price?: string;\n order_quantity?: string;\n order_amount?: number;\n // Whether to display in the orderbook, default=order_quantity, not displayed when =0,\n visible_quantity?: number;\n reduce_only?: boolean;\n side: OrderSide;\n broker_id?: string;\n\n // internal fields\n total?: string;\n // hideInOrderbook?: boolean;\n isStopOrder?: boolean;\n trigger_price?: string;\n order_tag?: string;\n level?: OrderLevel;\n}\n\nexport type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\nexport type RequireKeys<T extends object, K extends keyof T> = Required<\n Pick<T, K>\n> &\n Partial<Omit<T, K>>;\n\nexport interface BaseAlgoOrderEntity<T extends AlgoOrderRootType>\n extends OrderEntity {\n algo_type: AlgoOrderRootType;\n child_orders: (Partial<Omit<AlgoOrderEntity<T>, \"algo_type\" | \"type\">> & {\n algo_type: AlgoOrderType;\n type: OrderType;\n child_orders?: BaseAlgoOrderEntity<T>[\"child_orders\"];\n // trigger_price: number | string;\n })[];\n // if update the order, then need to provide the order_id\n algo_order_id?: number;\n client_order_id?: string;\n order_tag?: string;\n price?: number | string;\n quantity: number | string;\n reduce_only?: boolean;\n side: OrderSide;\n symbol: string;\n trigger_price: string;\n trigger_price_type: TriggerPriceType;\n type: OrderType;\n visible_quantity?: number;\n is_activated?: boolean;\n tp_trigger_price?: string | number;\n sl_trigger_price?: string | number;\n}\n\nexport type AlgoOrderEntity<\n T extends AlgoOrderRootType = AlgoOrderRootType.STOP\n> = T extends AlgoOrderRootType.TP_SL\n ? Optional<\n BaseAlgoOrderEntity<T>,\n \"side\" | \"type\" | \"trigger_price\" | \"order_type\"\n >\n : T extends AlgoOrderRootType.POSITIONAL_TP_SL\n ? Optional<\n BaseAlgoOrderEntity<T>,\n \"side\" | \"type\" | \"trigger_price\" | \"order_type\" | \"quantity\"\n >\n : Omit<BaseAlgoOrderEntity<T>, \"child_orders\" | \"order_type\">;\n\nexport type TPSLOrderEntry = Optional<\n AlgoOrderEntity<AlgoOrderRootType.TP_SL>,\n \"side\" | \"type\" | \"trigger_price\"\n>;\n\nexport type BracketOrderEntry = Optional<\n AlgoOrderEntity<AlgoOrderRootType.BRACKET>,\n \"side\"\n>;\n","export enum WithdrawStatus {\n NotSupported = \"NotSupported\",\n NotConnected = \"NotConnected\",\n Unsettle = \"Unsettle\",\n InsufficientBalance = \"InsufficientBalance\",\n Normal = \"Normal\",\n}\n","export interface Chain {\n id: number;\n chainNameShort: string;\n chainLogo: string;\n chainInfo: ChainInfo;\n minGasBalance: number;\n minCrossGasBalance: number;\n maxPrepayCrossGas: number;\n blockExplorerName: string;\n chainName: string;\n requestRpc: string;\n}\n\nexport interface ChainInfo {\n chainId: string;\n chainName: string;\n nativeCurrency: NativeCurrency;\n rpcUrls: string[];\n blockExplorerUrls: string[];\n}\n\nexport interface NativeCurrency {\n name: string;\n symbol: string;\n decimals: number;\n fix: number;\n}\n\nexport const Ethereum = {\n chainNameShort: \"Ethereum\",\n id: 1,\n chainLogo: \"\",\n chainInfo: {\n chainId: `0x${(1).toString(16)}`,\n chainName: \"Ethereum Mainnet\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 8,\n },\n rpcUrls: [\"https://mainnet.infura.io/v3/9155d40884554acdb17699a18a1fe348\"],\n blockExplorerUrls: [\"https://etherscan.io/\"],\n },\n minGasBalance: 0.002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.025,\n blockExplorerName: \"EthScan\",\n chainName: \"Ethereum Mainnet\",\n requestRpc: \"https://rpc.ankr.com/eth\",\n};\n\nexport const Avalanche = {\n id: 43114,\n chainInfo: {\n chainId: `0x${(43114).toString(16)}`, // '0xa86a'\n chainName: \"Avalanche\",\n nativeCurrency: {\n name: \"avax\",\n symbol: \"AVAX\",\n decimals: 18,\n fix: 5,\n },\n rpcUrls: [\"https://api.avax.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://snowtrace.io/\"],\n },\n minGasBalance: 0.05,\n minCrossGasBalance: 0.15,\n maxPrepayCrossGas: 2,\n blockExplorerName: \"Snowtrace\",\n chainName: \"Avalanche\",\n chainNameShort: \"Avalanche\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/avalanche\",\n};\n\nexport const Fuji = {\n id: 43113,\n chainInfo: {\n chainId: `0x${(43113).toString(16)}`, // '0xa86a'\n chainName: \"Avalanche Fuji Testnet\",\n nativeCurrency: {\n name: \"avax\",\n symbol: \"AVAX\",\n decimals: 18,\n fix: 5,\n },\n rpcUrls: [\"https://api.avax.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://snowtrace.io/\"],\n },\n minGasBalance: 0.05,\n minCrossGasBalance: 0.15,\n maxPrepayCrossGas: 2,\n blockExplorerName: \"Snowtrace\",\n chainName: \"Avalanche Fuji\",\n chainNameShort: \"Avalanche Fuji\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/avalanche\",\n};\n\nexport const BNB = {\n id: 56,\n chainInfo: {\n chainId: `0x${(56).toString(16)}`, // 0x38\n chainName: \"BNB Chain\",\n nativeCurrency: {\n name: \"bnb\",\n symbol: \"BNB\",\n decimals: 18,\n fix: 6,\n },\n rpcUrls: [\"https://bsc-dataseed1.binance.org/\"],\n blockExplorerUrls: [\"https://bscscan.com/\"],\n },\n minGasBalance: 0.02,\n minCrossGasBalance: 0.02,\n maxPrepayCrossGas: 0.1,\n blockExplorerName: \"BscScan\",\n chainName: \"Binance Smart Chain\",\n chainNameShort: \"BNB Chain\",\n requestRpc: \"https://rpc.ankr.com/bsc\",\n chainLogo: \"\",\n};\n\nexport const Fantom = {\n id: 250,\n chainInfo: {\n chainId: `0x${(250).toString(16)}`, // 0x38\n chainName: \"Fantom\",\n nativeCurrency: {\n name: \"ftm\",\n symbol: \"FTM\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpcapi.fantom.network\"],\n blockExplorerUrls: [\"https://ftmscan.com/\"],\n },\n minGasBalance: 1,\n minCrossGasBalance: 10,\n maxPrepayCrossGas: 60,\n blockExplorerName: \"FTMScan\",\n chainName: \"Fantom\",\n chainNameShort: \"Fantom\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/fantom\",\n};\n\nexport const Polygon = {\n id: 137,\n chainInfo: {\n chainId: `0x${(137).toString(16)}`,\n chainName: \"Polygon\",\n nativeCurrency: {\n name: \"matic\",\n symbol: \"MATIC\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpc-mainnet.matic.network\"],\n blockExplorerUrls: [\"https://polygonscan.com/\"],\n },\n minGasBalance: 0.1,\n minCrossGasBalance: 1,\n maxPrepayCrossGas: 30,\n blockExplorerName: \"Polygonscan\",\n chainName: \"Polygon\",\n chainNameShort: \"Polygon\",\n requestRpc: \"https://rpc.ankr.com/polygon\",\n chainLogo: \"\",\n};\n\nexport const Arbitrum = {\n id: 42161,\n chainInfo: {\n chainId: `0x${(42161).toString(16)}`,\n chainName: \"Arbitrum\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://arb1.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://arbiscan.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbiscan\",\n chainName: \"Arbitrum\",\n chainNameShort: \"Arbitrum\",\n requestRpc: \"https://arb1.arbitrum.io/rpc\",\n chainLogo: \"\",\n};\n\nexport const Optimism = {\n id: 10,\n chainInfo: {\n chainId: `0x${(10).toString(16)}`,\n chainName: \"Optimism\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://mainnet.optimism.io\"],\n blockExplorerUrls: [\"https://optimistic.etherscan.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism\",\n chainName: \"Optimism\",\n chainNameShort: \"Optimism\",\n requestRpc: \"https://rpc.ankr.com/optimism\",\n chainLogo: \"\",\n};\n\nexport const zkSyncEra = {\n id: 324,\n chainInfo: {\n chainId: `0x${(324).toString(16)}`,\n chainName: \"zkSync Era\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://zksync2-mainnet.zksync.io\"],\n blockExplorerUrls: [\"https://explorer.zksync.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"zkSync Era\",\n chainName: \"zkSync Era\",\n chainNameShort: \"zkSync Era\",\n requestRpc: \"https://zksync2-mainnet.zksync.io/\",\n chainLogo: \"\",\n // blockExplorerName: 'zkSync Era Goerli',\n // chainName: 'zkSync Era Goerli',\n // chainNameShort: 'zkSync Era Goerli',\n // requestRpc: 'https://zksync2-testnet.zksync.dev/',\n // chainLogo: '',\n};\n\nexport const PolygonzkEVM = {\n id: 1101,\n chainInfo: {\n chainId: `0x${(1101).toString(16)}`,\n chainName: \"Polygon zkEVM\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://zkevm-rpc.com\"],\n blockExplorerUrls: [\"https://zkevm.polygonscan.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Polygon zkEVM\",\n chainName: \"Polygon zkEVM\",\n chainNameShort: \"Polygon zkEVM\",\n requestRpc: \"https://zkevm-rpc.com\",\n chainLogo: \"\",\n};\n\nexport const Linea = {\n id: 59144,\n chainInfo: {\n chainId: `0x${(59144).toString(16)}`,\n chainName: \"Linea\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.linea.build\"],\n blockExplorerUrls: [\"https://lineascan.build/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Linea\",\n chainName: \"Linea\",\n chainNameShort: \"Linea\",\n requestRpc: \"https://rpc.linea.build\",\n chainLogo: \"\",\n};\n\nexport const Base = {\n id: 8453,\n chainInfo: {\n chainId: `0x${(8453).toString(16)}`,\n chainName: \"Base Network\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://developer-access-mainnet.base.org/\"],\n blockExplorerUrls: [\"https://basescan.org\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Base\",\n chainName: \"Base\",\n chainNameShort: \"Base\",\n requestRpc: \"https://developer-access-mainnet.base.org/\",\n chainLogo: \"\",\n};\n\nexport const Mantle = {\n id: 5000,\n chainInfo: {\n chainId: `0x${(5000).toString(16)}`,\n chainName: \"Mantle\",\n nativeCurrency: {\n name: \"MNT\",\n symbol: \"MNT\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.mantle.xyz/\"],\n blockExplorerUrls: [\"https://mantlescan.xyz/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Mantle\",\n chainName: \"Mantle\",\n chainNameShort: \"Mantle\",\n requestRpc: \"https://rpc.mantle.xyz/\",\n chainLogo: \"\",\n};\n\nexport const ArbitrumGoerli = {\n id: 421613,\n chainInfo: {\n chainId: `0x${(421613).toString(16)}`,\n chainName: \"Arbitrum Goerli\",\n nativeCurrency: {\n name: \"AGOR\",\n symbol: \"AGOR\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://goerli-rollup.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://goerli-rollup-explorer.arbitrum.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbitrum Goerli\",\n chainName: \"Arbitrum Goerli\",\n chainNameShort: \"Arbitrum Goerli\",\n requestRpc: \"https://goerli-rollup.arbitrum.io/rpc\",\n chainLogo: \"\",\n};\n\nexport const ArbitrumSepolia = {\n id: 421614,\n chainInfo: {\n chainId: `0x${(421614).toString(16)}`,\n chainName: \"Arbitrum Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\"],\n blockExplorerUrls: [\"https://sepolia-explorer.arbitrum.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbitrum Sepolia\",\n chainName: \"Arbitrum Sepolia\",\n chainNameShort: \"Arbitrum Sepolia\",\n requestRpc: \"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\",\n chainLogo: \"\",\n};\n\nexport const OptimismGoerli = {\n id: 420,\n chainInfo: {\n chainId: `0x${(420).toString(16)}`,\n chainName: \"Optimism Goerli\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://optimism-goerli.gateway.tenderly.co\"],\n blockExplorerUrls: [\"https://goerli-optimism.etherscan.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism Goerli\",\n chainName: \"Optimism Goerli\",\n chainNameShort: \"Optimism Goerli\",\n requestRpc: \"https://optimism-goerli.gateway.tenderly.co\",\n chainLogo: \"\",\n};\n\nexport const OptimismSepolia = {\n id: 11155420,\n chainInfo: {\n chainId: `0x${(11155420).toString(16)}`,\n chainName: \"Optimism Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://sepolia.optimism.io\"],\n blockExplorerUrls: [\"https://sepolia-optimistic.etherscan.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism Sepolia\",\n chainName: \"Optimism Sepolia\",\n chainNameShort: \"Optimism Sepolia\",\n requestRpc: \"https://sepolia.optimism.io\",\n chainLogo: \"\",\n};\n\nexport const BaseSepolia = {\n id: 84532,\n chainInfo: {\n chainId: `0x${(84532).toString(16)}`,\n chainName: \"Base Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://base-sepolia-rpc.publicnode.com\"],\n blockExplorerUrls: [\"https://base-sepolia.blockscout.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Base Sepolia\",\n chainName: \"Base Sepolia\",\n chainNameShort: \"Base Sepolia\",\n requestRpc: \"https://base-sepolia-rpc.publicnode.com\",\n chainLogo: \"\",\n};\n\nexport const MantleSepolia = {\n id: 5003,\n chainInfo: {\n chainId: `0x${(5003).toString(16)}`,\n chainName: \"Mantle Sepolia\",\n nativeCurrency: {\n name: \"MNT\",\n symbol: \"MNT\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.sepolia.mantle.xyz/\"],\n blockExplorerUrls: [\"https://sepolia.mantlescan.xyz/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Mantle Sepolia\",\n chainName: \"Mantle Sepolia\",\n chainNameShort: \"Mantle Sepolia\",\n requestRpc: \"https://rpc.sepolia.mantle.xyz/\",\n chainLogo: \"\",\n};\n\nexport const PolygonAmoy = {\n id: 80002,\n chainInfo: {\n chainId: `0x${(80002).toString(16)}`,\n chainName: \"Polygon Amoy\",\n nativeCurrency: {\n name: \"MATIC\",\n symbol: \"MATIC\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc-amoy.polygon.technology/\"],\n blockExplorerUrls: [\"https://www.oklink.com/amoy\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Polygon Amoy\",\n chainName: \"Polygon Amoy\",\n chainNameShort: \"Polygon Amoy\",\n requestRpc: \"https://rpc-amoy.polygon.technology/\",\n chainLogo: \"\",\n};\n\nexport const Sei = {\n id: 1329,\n chainInfo: {\n chainId: `0x${(1329).toString(16)}`,\n chainName: \"Sei Network\",\n nativeCurrency: {\n name: \"SEI\",\n symbol: \"SEI\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://evm-rpc.sei-apis.com\"],\n blockExplorerUrls: [\"https://seitrace.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"SEI\",\n chainName: \"Sei Network\",\n chainNameShort: \"SEI\",\n requestRpc: \"https://evm-rpc.sei-apis.com\",\n chainLogo: \"\",\n};\n\nexport const StoryTestnet = {\n name: \"Story Odyssey Testnet\",\n public_rpc_url: \"https://rpc.odyssey.storyrpc.io/\",\n chain_id: 1516,\n currency_symbol: \"IP\",\n explorer_base_url: \"\",\n vault_address: \"\",\n};\nexport const StoryOdysseyTestnet = {\n id: 1329,\n chainInfo: {\n chainId: `0x${StoryTestnet.chain_id.toString(16)}`,\n chainName: StoryTestnet.name,\n nativeCurrency: {\n name: \"IP\",\n symbol: \"IP\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [StoryTestnet.public_rpc_url],\n blockExplorerUrls: [],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"SEI\",\n chainName: \"Sei Network\",\n chainNameShort: \"SEI\",\n requestRpc: \"https://evm-rpc.sei-apis.com\",\n chainLogo: \"\",\n};\nexport const chainsInfoMap: Map<number, Chain> = new Map([\n [Ethereum.id, Ethereum],\n [Avalanche.id, Avalanche],\n [Fuji.id, Fuji],\n [BNB.id, BNB],\n [Fantom.id, Fantom],\n [Polygon.id, Polygon],\n [Arbitrum.id, Arbitrum],\n [Optimism.id, Optimism],\n [zkSyncEra.id, zkSyncEra],\n [PolygonzkEVM.id, PolygonzkEVM],\n [Linea.id, Linea],\n [Base.id, Base],\n [Mantle.id, Mantle],\n [ArbitrumGoerli.id, ArbitrumGoerli],\n [ArbitrumSepolia.id, ArbitrumSepolia],\n [OptimismGoerli.id, OptimismGoerli],\n [OptimismSepolia.id, OptimismSepolia],\n [BaseSepolia.id, BaseSepolia],\n [MantleSepolia.id, MantleSepolia],\n [PolygonAmoy.id, PolygonAmoy],\n [Sei.id, Sei],\n [StoryOdysseyTestnet.id, StoryOdysseyTestnet],\n]);\n\nexport const SolanaDevnet = {\n id: 901901901,\n chainInfo: {\n name: \"Solana Devnet\",\n public_rpc_url: \"\",\n chainId: 901901901,\n currency_symbol: \"SOL\",\n explorer_base_url: \"\",\n vault_address: \"\",\n },\n} as unknown as typeof Arbitrum;\n\nexport const TestnetChains = [\n {\n network_infos: {\n name: \"Arbitrum Sepolia\",\n shortName: \"Arbitrum Sepolia\",\n public_rpc_url: \"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\",\n chain_id: 421614,\n currency_symbol: \"ETH\",\n bridge_enable: true,\n mainnet: false,\n explorer_base_url: \"https://sepolia.arbiscan.io\",\n est_txn_mins: null,\n },\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d\",\n decimals: 6,\n },\n ],\n },\n {\n network_infos: {\n name: \"Solana Devnet\",\n public_rpc_url: \"\",\n chain_id: 901901901,\n currency_symbol: \"SOL\",\n explorer_base_url: \"\",\n vault_address: \"\",\n },\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU\",\n decimals: 6,\n },\n ],\n },\n {\n network_infos: StoryTestnet,\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"0xF1815bd50389c46847f0Bda824eC8da914045D14\",\n decimals: 6,\n },\n ],\n },\n // {\n // network_infos: {\n // name: \"Mantle Sepolia\",\n // shortName: \"Mantle Sepolia\",\n // public_rpc_url: \"https://rpc.sepolia.mantle.xyz/\",\n // chain_id: 5003,\n // currency_symbol: \"MNT\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://sepolia.mantlescan.xyz/\",\n // est_txn_mins: null,\n // },\n // token_infos: [\n // {\n // symbol: \"USDC\",\n // address: \"0xAcab8129E2cE587fD203FD770ec9ECAFA2C88080\",\n // decimals: 6,\n // display_name: \"USDC.e\",\n // },\n // ],\n // },\n // {\n // network_infos: {\n // name: \"Arbitrum Goerli\",\n // shortName: \"Arbitrum Goerli\",\n // public_rpc_url: \"https://goerli-rollup.arbitrum.io/rpc\",\n // chain_id: 421613,\n // currency_symbol: \"ETH\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://goerli.arbiscan.io/\",\n // est_txn_mins: null,\n // },\n // token_infos: [\n // {\n // symbol: \"USDC\",\n // address: \"0xfd064A18f3BF249cf1f87FC203E90D8f650f2d63\",\n // decimals: 6,\n // },\n // ],\n // },\n // {\n // network_infos: {\n // name: \"Optimism Goerli\",\n // shortName: \"Optimism Goerli\",\n // public_rpc_url: \"https://optimism-goerli.gateway.tenderly.co\",\n // chain_id: 420,\n // currency_symbol: \"ETH\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://goerli-optimism.etherscan.io\",\n // est_txn_mins: null,\n // },\n // },\n];\n\nexport const defaultMainnetChains = [Arbitrum, Base, Optimism];\nexport const defaultTestnetChains = [ArbitrumSepolia];\n\nexport enum ChainNamespace {\n evm = \"EVM\",\n solana = \"SOL\",\n}\n\nexport const SolanaChains = new Set([901901901, 900900900]);\n","export enum TrackerEventName {\n /** virtual event (not send this event name to tracker) */\n trackIdentifyUserId = \"track_identify_user_id\",\n trackIdentify = \"track_identify\",\n trackCustomEvent = \"track_custom_event\",\n\n /** real event name (send this event name to tracker) */\n withdrawSuccess = \"withdraw_request_success\",\n withdrawFailed = \"withdraw_request_failure\",\n depositSuccess = \"deposit_request_success\",\n depositFailed = \"deposit_request_failure\",\n signinSuccess = \"sign_message_success\",\n placeOrderSuccess = \"place_order_success\",\n walletConnect = \"connect_wallet_success\",\n clickLinkDeviceButton = \"click_link_device_button\",\n signLinkDeviceMessageSuccess = \"sign_link_device_message_success\",\n linkDeviceModalClickConfirm = \"link_device_modal_click_confirm\",\n socialLoginSuccess = \"social_login_success\",\n clickSwitchNetwork = \"click_switch_network\",\n clickSwitchWallet = \"click_switch_wallet\",\n switchNetworkSuccess = \"switch_network_success\",\n clickExportPrivateKey = \"click_export_private_key\",\n switchLanguage = \"switch_language\",\n leaderboardCampaignClickTradeNow = \"leaderboard_campaign_click_trade_now\",\n leaderboardCampaignClickLearnMore = \"leaderboard_campaign_click_learn_more\",\n}\n","import { API } from \"./types/api\";\n\n// export type Chain = {\n// id: string;\n// name?: string;\n// };\n\nexport type CurrentChain = {\n id: number;\n info: API.Chain;\n};\n\nexport enum WS_WalletStatusEnum {\n NO = \"NO\",\n FAILED = \"FAILED\",\n PENDING = \"PENDING\",\n PROCESSING = \"PROCESSING\",\n COMPLETED = \"COMPLETED\",\n}\n","export const LedgerWalletKey = \"orderly:ledger-wallet\";\nexport const ConnectorKey = 'orderly:connectorKey';\nexport const ChainKey = 'order:chain';","export class ApiError extends Error {\n constructor(message: string, private readonly code: number) {\n super(message);\n this.name = \"ApiError\";\n }\n}\n\nexport class SDKError extends Error {\n constructor(message: string) {\n super(`[ORDERLY SDK ERROR]:${message}`);\n this.name = \"SDKError\";\n }\n}\n","export const definedTypes = {\n EIP712Domain: [\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" },\n ],\n Registration: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"timestamp\", type: \"uint64\" },\n { name: \"registrationNonce\", type: \"uint256\" },\n ],\n Withdraw: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"receiver\", type: \"address\" },\n { name: \"token\", type: \"string\" },\n { name: \"amount\", type: \"uint256\" },\n { name: \"withdrawNonce\", type: \"uint64\" },\n { name: \"timestamp\", type: \"uint64\" },\n ],\n AddOrderlyKey: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"orderlyKey\", type: \"string\" },\n { name: \"scope\", type: \"string\" },\n { name: \"timestamp\", type: \"uint64\" },\n { name: \"expiration\", type: \"uint64\" },\n ],\n SettlePnl: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"settleNonce\", type: \"uint64\" },\n { name: \"timestamp\", type: \"uint64\" },\n ],\n } as const;","export { default as version } from \"./version\";\nexport * from \"./constants\";\nexport * from \"./types/api\";\n// export * from \"./order\";\nexport {\n OrderType,\n OrderSide,\n OrderStatus,\n AlgoOrderRootType,\n AlgoOrderType,\n TriggerPriceType,\n BBOOrderType,\n OrderLevel,\n} from \"./order\";\nexport type {\n OrderEntity,\n AlgoOrderEntity,\n TPSLOrderEntry,\n BaseAlgoOrderEntity,\n AlgoOrderChildOrders,\n Optional,\n PositionSide,\n BracketOrderEntry,\n RequireKeys,\n BaseOrder,\n RegularOrder,\n AlgoOrder,\n OrderlyOrder,\n ChildOrder,\n BracketOrder,\n} from \"./order\";\nexport * from \"./withdraw\";\nexport * from \"./chains\";\nexport * from \"./track\";\nexport type { Chain as ChainConfig, ChainInfo, NativeCurrency } from \"./chains\";\nexport * from \"./wallet\";\nexport * from \"./storageKey\";\nexport { ApiError, SDKError } from \"./errors\";\n\nexport { definedTypes } from \"./sign\";\nexport * as superstruct from \"superstruct\";\nexport * from \"./assetHistory\";\n","export enum AssetHistoryStatusEnum {\n NEW = \"NEW\",\n CONFIRM = \"CONFIRM\",\n PROCESSING = \"PROCESSING\",\n COMPLETED = \"COMPLETED\",\n FAILED = \"FAILED\",\n PENDING_REBALANCE = \"PENDING_REBALANCE\",\n}\n"],"mappings":";AAQA,IAAG,OAAO,WAAW,aAAa;AAC9B,SAAO,sBAAsB,OAAO,uBAAuB,CAAC;AAC5D,SAAO,oBAAoB,wBAAwB,IAAI;AAC3D;AAEA,IAAO,kBAAQ;;;ACbR,IAAK,oBAAL,kBAAKA,uBAAL;AACL,EAAAA,sCAAA,mCAAgC,MAAhC;AACA,EAAAA,sCAAA,kBAAe,KAAf;AACA,EAAAA,sCAAA,eAAY,KAAZ;AACA,EAAAA,sCAAA,iBAAc,KAAd;AACA,EAAAA,sCAAA,cAAW,KAAX;AACA,EAAAA,sCAAA,qBAAkB,KAAlB;AACA,EAAAA,sCAAA,mBAAgB,KAAhB;AAPU,SAAAA;AAAA,GAAA;AAUL,IAAK,kBAAL,kBAAKC,qBAAL;AACL,EAAAA,kCAAA,aAAU,KAAV;AACA,EAAAA,kCAAA,WAAQ,KAAR;AACA,EAAAA,kCAAA,WAAQ,MAAR;AAHU,SAAAA;AAAA,GAAA;AAML,IAAK,qBAAL,kBAAKC,wBAAL;AACL,EAAAA,wCAAA,YAAS,KAAT;AACA,EAAAA,wCAAA,cAAW,KAAX;AAFU,SAAAA;AAAA,GAAA;AAOL,IAAK,oBAAL,kBAAKC,uBAAL;AACL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AAU;AAAA,IACpC,EAAE,MAAM,SAAS,MAAM,SAAS;AAAA,IAChC,EAAE,MAAM,UAAU,MAAM,UAAU;AAAA,IAClC,EAAE,MAAM,iBAAiB,MAAM,SAAS;AAAA,IACxC,EAAE,MAAM,aAAa,MAAM,SAAS;AAAA,EACtC;AAAA,EACA,eAAe;AAAA,IACb,EAAE,MAAM,YAAY,MAAM,SAAS;AAAA,IACnC,EAAE,MAAM,WAAW,MAAM,UAAU;AAAA,IACnC,EAAE,MAAM,cAAc,MAAM,SAAS;AAAA,IACrC,EAAE,MAAM,SAAS,MAAM,SAAS;AAAA,IAChC,EAAE,MAAM,aAAa,MAAM,SAAS;AAAA,IACpC,EAAE,MAAM,cAAc,MAAM,SAAS;AAAA,EACvC;AAAA,EACA,WAAW;AAAA,IACT,EAAE,MAAM,YAAY,MAAM,SAAS;AAAA,IACnC,EAAE,MAAM,WAAW,MAAM,UAAU;AAAA,IACnC,EAAE,MAAM,eAAe,MAAM,SAAS;AAAA,IACtC,EAAE,MAAM,aAAa,MAAM,SAAS;AAAA,EACtC;AACF;;;ACIF,YAAY,iBAAiB;;;ACxCtB,IAAK,yBAAL,kBAAKC,4BAAL;AACL,EAAAA,wBAAA,SAAM;AACN,EAAAA,wBAAA,aAAU;AACV,EAAAA,wBAAA,gBAAa;AACb,EAAAA,wBAAA,eAAY;AACZ,EAAAA,wBAAA,YAAS;AACT,EAAAA,wBAAA,uBAAoB;AANV,SAAAA;AAAA,GAAA;","names":["AccountStatusEnum","SystemStateEnum","ExchangeStatusEnum","NetworkStatusEnum","AnnouncementType","OrderType","BBOOrderType","OrderLevel","AlgoOrderRootType","TriggerPriceType","AlgoOrderType","OrderSide","OrderStatus","WithdrawStatus","ChainNamespace","TrackerEventName","WS_WalletStatusEnum","AssetHistoryStatusEnum"]}
1
+ {"version":3,"sources":["../src/version.ts","../src/constants.ts","../src/types/api.ts","../src/order.ts","../src/withdraw.ts","../src/chains.ts","../src/track.ts","../src/wallet.ts","../src/storageKey.ts","../src/errors.ts","../src/sign.ts","../src/index.ts","../src/assetHistory.ts"],"sourcesContent":["\ndeclare global {\n interface Window {\n __ORDERLY_VERSION__?: {\n [key: string]: string;\n };\n }\n}\nif(typeof window !== 'undefined') {\n window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};\n window.__ORDERLY_VERSION__[\"@orderly.network/types\"] = \"2.2.0\";\n};\n\nexport default \"2.2.0\";\n","export enum AccountStatusEnum {\n EnableTradingWithoutConnected = -1,\n NotConnected = 0,\n Connected = 1,\n NotSignedIn = 2,\n SignedIn = 3,\n DisabledTrading = 4,\n EnableTrading = 5,\n}\n\nexport enum SystemStateEnum {\n Loading = 0,\n Error = 1,\n Ready = 10,\n}\n\nexport enum ExchangeStatusEnum {\n Normal = 0,\n Maintain = 1,\n}\n\nexport type NetworkId = \"testnet\" | \"mainnet\";\n\nexport enum NetworkStatusEnum {\n unknown = 0,\n unsupported = 1,\n supported = 2,\n}\n\n// Testnet\n// Arbitrum Goerli\n// export const ARBITRUM_TESTNET_CHAINID = 421613;\n// export const ARBITRUM_TESTNET_CHAINID_HEX = \"0x66EED\";\n\n// Arbitrum Sepolia\nexport const ARBITRUM_TESTNET_CHAINID = 421614;\nexport const SOLANA_TESTNET_CHAINID = 901901901;\nexport const SOLANA_MAINNET_CHAINID = 900900900;\nexport const STORY_TESTNET_CHAINID = 1516;\nexport const MONAD_TESTNET_CHAINID = 10143;\nexport const ABSTRACT_TESTNET_CHAINID = 11124;\nexport const ABSTRACT_MAINNET_CHAINID = 2741;\nexport const ABSTRACT_CHAIN_ID_MAP = new Set([\n ABSTRACT_TESTNET_CHAINID,\n ABSTRACT_MAINNET_CHAINID,\n]);\n\nexport const ARBITRUM_TESTNET_CHAINID_HEX = \"0x66EEE\";\n\nexport const MANTLE_TESTNET_CHAINID = 5003;\nexport const MANTLE_TESTNET_CHAINID_HEX = \"0x138b\";\n\n// Mainnet\nexport const ARBITRUM_MAINNET_CHAINID = 42161;\nexport const ARBITRUM_MAINNET_CHAINID_HEX = \"0xa4b1\";\n\nexport const MEDIA_TABLET = \"(max-width: 768px)\";\n\nexport const DEPOSIT_FEE_RATE = 1.05;\n\n/**\n * A constant for the maximum value for a ``uint256``.\n */\nexport const MaxUint256: bigint = BigInt(\n \"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n);\n\nexport const nativeTokenAddress = \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\";\n\nexport const isNativeTokenChecker = (address: string) =>\n address === nativeTokenAddress;\n\nexport const ArbitrumSepoliaChainInfo = {\n name: \"Arbitrum Sepolia\",\n public_rpc_url: \"https://arbitrum-sepolia.gateway.tenderly.co\",\n chain_id: \"421614\",\n currency_symbol: \"ETH\",\n currency_decimal: 18,\n explorer_base_url: \"https://sepolia.arbiscan.io\",\n vault_address: \"0x0EaC556c0C2321BA25b9DC01e4e3c95aD5CDCd2f\",\n};\nexport const AbstractTestnetChainInfo = {\n name: \"Abstract Testnet\",\n public_rpc_url: \"https://api.testnet.abs.xyz\",\n chain_id: \"11124\",\n currency_symbol: \"ETH\",\n currency_decimal: 18,\n explorer_base_url: \"https://sepolia.abscan.org\",\n vault_address: \"0xf14Ff11F3bb1011ff42665Ec869c7827c43745Fd\",\n};\nexport const AbstractTestnetTokenInfo = {\n chain_id: \"11124\",\n contract_address: \"0xa0BB43E2eA7fcE91F07e628d72fD6333e80F47D2\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 2,\n display_name: \"USDC\",\n};\nexport const SolanaDevnetChainInfo = {\n chain_id: \"901901901\",\n currency_decimal: 9,\n currency_symbol: \"SOL\",\n explorer_base_url: \"https://explorer.solana.com/?cluster=devnet\",\n name: \"Solana-Devnet\",\n public_rpc_url: \"https://api.devnet.solana.com\",\n vault_address: \"9shwxWDUNhtwkHocsUAmrNAQfBH2DHh4njdAEdHZZkF2\",\n};\n\nexport const SolanaDevnetTokenInfo = {\n chain_id: \"901901901\",\n contract_address: \"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 5,\n display_name: \"USDC\",\n};\nexport const ArbitrumSepoliaTokenInfo = {\n chain_id: \"421614\",\n contract_address: \"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 2,\n display_name: \"USDC\",\n};\n\nexport const TesntTokenFallback = (testnetTokens: any) => [\n {\n token: \"USDC\",\n token_hash:\n \"0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa\",\n decimals: 6,\n minimum_withdraw_amount: 0.000001,\n chain_details: testnetTokens,\n },\n];\n","import { AlgoOrderRootType, OrderSide, OrderType } from \"../order\";\n\nexport enum AnnouncementType {\n Listing = \"LISTING\",\n Maintenance = \"MAINTENANCE\",\n Delisting = \"DELISTING\",\n}\n\nexport declare namespace API {\n //v1/public/token\n export interface Token {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n chain_details: ChainDetail[];\n }\n\n //v1/public/token\n export interface ChainDetail {\n chain_id: string;\n contract_address: string;\n decimals: number;\n }\n\n // ws market, api v1/public/futures\n export interface MarketInfo {\n symbol: string;\n index_price: number;\n mark_price: number;\n sum_unitary_funding: number;\n est_funding_rate: number;\n last_funding_rate: number;\n next_funding_time: number;\n open_interest: string;\n \"24h_open\": number;\n \"24h_close\": number;\n \"24h_high\": number;\n \"24h_low\": number;\n /**\n * @deprecated\n * spelling mistake, use 24h_volume to instead, will be remove next version\n */\n \"24h_volumn\": number;\n \"24h_volume\": number;\n \"24h_amount\": number;\n }\n\n export interface MarketInfoExt extends MarketInfo {\n change: number;\n \"24h_volume\": number;\n }\n\n export interface Announcement {\n last_updated_time?: number | null;\n rows?: Array<{\n announcement_id: number | string;\n message: string;\n i18n?: Record<PropertyKey, string | null>;\n url?: string | null;\n type?: AnnouncementType | null;\n updated_time?: number | null;\n }>;\n }\n\n /**\n * v1/public/info\n */\n export interface Symbol {\n symbol: string;\n quote_min: number;\n quote_max: number;\n quote_tick: number;\n base_min: number;\n base_max: number;\n base_tick: number;\n min_notional: number;\n price_range: number;\n price_scope: number;\n std_liquidation_fee: number;\n liquidator_fee: number;\n claim_insurance_fund_discount: number;\n funding_period: number;\n cap_funding: number;\n floor_funding: number;\n interest_rate: number;\n created_time: number;\n updated_time: number;\n imr_factor: number;\n base_mmr: number;\n base_imr: number;\n }\n\n export interface TokenItem {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n chain_details: ChainDetail[];\n }\n\n export interface ChainDetail {\n chain_id: string;\n contract_address: string;\n decimals: number;\n withdrawal_fee: number;\n }\n\n export interface SymbolExt extends Symbol {\n base: string;\n base_dp: number;\n\n quote: string;\n quote_dp: number;\n type: string;\n name: string;\n }\n\n export interface Order {\n symbol: string;\n status: string;\n side: string;\n order_id: number;\n algo_order_id?: number;\n user_id: number;\n price: number | null;\n type: string;\n quantity: number;\n amount: null;\n visible: number;\n executed: number;\n total_fee: number;\n fee_asset: string;\n client_order_id: null;\n average_executed_price: number;\n total_executed_quantity: number;\n visible_quantity: number;\n created_time: number;\n updated_time: number;\n reduce_only: boolean;\n trigger_price?: number;\n order_tag?: string;\n }\n\n export interface OrderExt extends Order {\n mark_price: string;\n }\n\n export interface AlgoOrder {\n algo_order_id: number;\n root_algo_order_id: number;\n parent_algo_order_id: number;\n parent_algo_type: AlgoOrderRootType;\n symbol: string;\n algo_type: string;\n child_orders: AlgoOrder[];\n side: string;\n quantity: number;\n is_triggered: boolean;\n is_activated: boolean;\n trigger_price: number;\n trigger_price_type: string;\n type: OrderType;\n root_algo_status: string;\n algo_status: string;\n price?: number;\n total_executed_quantity: number;\n visible_quantity: number;\n total_fee: number;\n fee_asset: string;\n reduce_only: boolean;\n created_time: number;\n updated_time: number;\n order_tag?: string;\n }\n\n export interface AlgoOrderExt extends AlgoOrder {\n mark_price: string;\n position?: Partial<Position>;\n tp_trigger_price?: number;\n sl_trigger_price?: number;\n }\n\n export interface OrderResponse {\n rows: (Order | AlgoOrder)[];\n meta: {\n total: number;\n current_page: number;\n records_per_page: number;\n };\n }\n\n export interface FundingRate {\n symbol: string;\n est_funding_rate: number;\n est_funding_rate_timestamp: number;\n last_funding_rate: number;\n last_funding_rate_timestamp: number;\n next_funding_time: number;\n sum_unitary_funding: number;\n }\n\n export interface FundingPeriodData {\n rate: number;\n positive: number;\n negative: number;\n }\n\n export interface FundingHistory {\n symbol: string;\n data_start_time: string;\n funding: {\n last: FundingPeriodData;\n \"1d\": FundingPeriodData;\n \"3d\": FundingPeriodData;\n \"7d\": FundingPeriodData;\n \"14d\": FundingPeriodData;\n \"30d\": FundingPeriodData;\n \"90d\": FundingPeriodData;\n };\n }\n\n export interface PositionInfo extends PositionAggregated {\n // margin_ratio: number;\n // initial_margin_ratio: number;\n // maintenance_margin_ratio: number;\n // open_margin_ratio: number;\n // current_margin_ratio_with_orders: number;\n // initial_margin_ratio_with_orders: number;\n // maintenance_margin_ratio_with_orders: number;\n // total_collateral_value: number;\n // free_collateral: number;\n rows: Position[];\n // total_pnl_24_h: number;\n }\n\n export interface PositionAggregated {\n margin_ratio: number;\n initial_margin_ratio: number;\n maintenance_margin_ratio: number;\n open_margin_ratio: number;\n current_margin_ratio_with_orders: number;\n initial_margin_ratio_with_orders: number;\n maintenance_margin_ratio_with_orders: number;\n total_collateral_value: number;\n free_collateral: number;\n total_pnl_24_h: number;\n /**\n * @deprecated use total_unreal_pnl instead\n */\n unrealPnL: number;\n total_unreal_pnl: number;\n total_unreal_pnl_index?: number;\n /**\n * @deprecated use total_unsettled_pnl instead\n */\n unsettledPnL: number;\n total_unsettled_pnl: number;\n notional: number;\n unrealPnlROI: number;\n unrealPnlROI_index?: number;\n }\n\n export interface Position {\n symbol: string;\n position_qty: number;\n cost_position: number;\n last_sum_unitary_funding: number;\n pending_long_qty: number;\n pending_short_qty: number;\n settle_price: number;\n average_open_price: number;\n unrealized_pnl: number;\n unrealized_pnl_index?: number;\n unrealized_pnl_ROI: number;\n unsettled_pnl: number;\n unsettled_pnl_ROI: number;\n unrealized_pnl_ROI_index?: number;\n mark_price: number;\n index_price?: number;\n est_liq_price: number | null;\n timestamp: number;\n /**\n * Maintenance margin ratio\n */\n mmr: number;\n imr: number;\n IMR_withdraw_orders: number;\n MMR_with_orders: number;\n pnl_24_h: number;\n fee_24_h: number;\n }\n\n export interface PositionExt extends Position {\n notional: number;\n mm: number;\n }\n\n export interface PositionTPSLExt extends PositionExt {\n tp_trigger_price?: number;\n sl_trigger_price?: number;\n\n // has_position_tp_sl: boolean;\n\n /**\n * related position tp/sl order\n */\n algo_order?: AlgoOrder;\n }\n\n export interface PositionsTPSLExt extends PositionAggregated {\n rows: PositionTPSLExt[];\n }\n\n export interface Trade {\n symbol: Symbol;\n side: OrderSide;\n ts: number;\n executed_price: number;\n executed_quantity: number;\n executed_timestamp: number;\n }\n\n export interface Holding {\n token: string;\n holding: number;\n frozen: number;\n pending_short: number;\n updated_time: number;\n }\n\n export interface AccountInfo {\n account_id: string;\n email: string;\n account_mode: string;\n tier: string;\n futures_tier: string;\n maintenance_cancel_orders: boolean;\n taker_fee_rate: number;\n maker_fee_rate: number;\n max_leverage: number;\n futures_taker_fee_rate: number;\n futures_maker_fee_rate: number;\n imr_factor: { [key: string]: number };\n max_notional: { [key: string]: number };\n }\n\n export interface Chain {\n dexs: string[];\n network_infos: NetworkInfos;\n token_infos: TokenInfo[];\n nativeToken?: TokenInfo;\n // nativeToken\n }\n\n export interface NetworkInfos {\n name: string;\n shortName: string;\n public_rpc_url: string;\n chain_id: number;\n currency_symbol: string;\n bridge_enable: boolean;\n mainnet: boolean;\n est_txn_mins: number | null;\n explorer_base_url: string;\n bridgeless?: boolean;\n withdrawal_fee?: number;\n minimum_withdraw_amount?: number;\n }\n\n export interface TokenInfo {\n address: string;\n symbol: string;\n decimals: number;\n display_name: string;\n precision: number;\n }\n\n export interface Chain {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n chain_details: ChainDetail[];\n }\n\n // export interface Token{\n\n // }\n\n export interface ChainDetail {\n chain_id: string;\n chain_name?: string;\n contract_address: string;\n decimals: number;\n withdrawal_fee: number;\n }\n\n export interface AssetHistory {\n meta: RecordsMeta;\n rows: AssetHistoryRow[];\n }\n\n export interface RecordsMeta {\n total: number;\n records_per_page: number;\n current_page: number;\n }\n\n export interface AssetHistoryRow {\n id: string;\n tx_id: string;\n side: string;\n token: string;\n amount: number;\n fee: number;\n trans_status: string;\n created_time: number;\n updated_time: number;\n chain_id: string;\n }\n\n export interface FundingFeeHistory {\n meta: RecordsMeta;\n rows: FundingFeeRow[];\n }\n\n export interface FundingFeeRow {\n symbol: string;\n funding_rate: number;\n mark_price: number;\n funding_fee: number;\n payment_type: string;\n status: string;\n created_time: number;\n updated_time: number;\n }\n\n export interface DailyRow {\n account_value: number;\n broker_id: string;\n date: string;\n perp_volume: number;\n pnl: number;\n snapshot_time?: number;\n }\n\n export interface PositionHistory {\n position_id: number; // Unique identifier for the position\n liquidation_id?: number; // Unique identifier for the position\n position_status: string; // Status of the position\n type: string; // Type of the position activity\n symbol: string; // Trading pair symbol\n avg_open_price: number; // Average open price of the position\n avg_close_price: number; // Average close price of the position\n max_position_qty: number; // Maximum quantity held in the position\n closed_position_qty: number; // Quantity closed in the position\n side: \"LONG\" | \"SHORT\"; // Side of the position\n trading_fee: number; // Fee charged for trading\n accumulated_funding_fee: number; // Accumulated funding fee for the position\n insurance_fund_fee: number; // Fee contributed to the insurance fund\n liquidator_fee: number; // Fee paid to the liquidator\n realized_pnl: number; // Realized profit and loss\n open_timestamp: number; // Timestamp when the position was opened\n close_timestamp: number; // Timestamp when the position was closed\n last_update_time: number; // Timestamp of the last update to the position\n }\n\n export interface LiquidationPositionByPerp {\n abs_liquidation_fee: number;\n cost_position_transfer: number;\n liquidator_fee: number;\n position_qty: number;\n symbol: string;\n transfer_price: number;\n }\n\n export interface Liquidation {\n liquidation_id: number;\n timestamp: number;\n transfer_amount_to_insurance_fund: number;\n positions_by_perp: LiquidationPositionByPerp[];\n }\n}\n\nexport declare namespace WSMessage {\n export interface Ticker {\n symbol: string;\n open: number;\n close: number;\n high: number;\n low: number;\n volume: number;\n amount: number;\n count: number;\n change: number;\n }\n\n export interface MarkPrice {\n symbol: string;\n price: number;\n }\n\n export interface Position {\n symbol: string;\n positionQty: number;\n costPosition: number;\n lastSumUnitaryFunding: number;\n sumUnitaryFundingVersion: number;\n pendingLongQty: number;\n pendingShortQty: number;\n settlePrice: number;\n averageOpenPrice: number;\n unsettledPnl: number;\n pnl24H: number;\n fee24H: number;\n markPrice: number;\n estLiqPrice: number;\n version: number;\n imr: number;\n imrwithOrders: number;\n mmrwithOrders: number;\n mmr: number;\n }\n\n export interface VaultBalance {\n chain_id: string;\n token: string;\n balance: number;\n }\n\n export interface Order {\n symbol: string;\n clientOrderId: string;\n orderId: number;\n type: string;\n side: string;\n quantity: number;\n price: number;\n tradeId: number;\n executedPrice: number;\n executedQuantity: number;\n fee: number;\n feeAsset: string;\n totalExecutedQuantity: number;\n avgPrice: number;\n status: string;\n reason: string;\n totalFee: number;\n visible: number;\n /**\n * update time\n */\n timestamp: number;\n reduceOnly: boolean;\n maker: boolean;\n }\n\n export interface Holding {\n holding: number;\n frozen: number;\n interest: number;\n pendingShortQty: number;\n pendingExposure: number;\n pendingLongQty: number;\n pendingLongExposure: number;\n version: number;\n staked: number;\n unbonding: number;\n vault: number;\n fee24H: number;\n markPrice: number;\n }\n\n export interface AlgoOrder {\n symbol: string;\n rootAlgoOrderId: number;\n parentAlgoOrderId: number;\n algoOrderId: number;\n status: string;\n algoType: string;\n side: string;\n quantity: number;\n triggerStatus: string;\n price: number;\n type: string;\n triggerTradePrice: number;\n triggerTime: number;\n tradeId: number;\n executedPrice: number;\n executedQuantity: number;\n fee: number;\n feeAsset: string;\n totalExecutedQuantity: number;\n averageExecutedPrice: number;\n totalFee: number;\n timestamp: number;\n visibleQuantity: number;\n reduceOnly: boolean;\n triggered: boolean;\n maker: boolean;\n rootAlgoStatus: string;\n algoStatus: string;\n }\n\n export interface Announcement {\n announcement_id: string;\n message: string;\n i18n: Record<PropertyKey, string | null>;\n url?: string | null;\n type: AnnouncementType | null;\n updated_time: number;\n }\n}\n","/**\n * Supported types for placing an order\n */\nexport enum OrderType {\n LIMIT = \"LIMIT\",\n MARKET = \"MARKET\",\n IOC = \"IOC\",\n FOK = \"FOK\",\n POST_ONLY = \"POST_ONLY\",\n ASK = \"ASK\",\n BID = \"BID\",\n STOP_LIMIT = \"STOP_LIMIT\",\n STOP_MARKET = \"STOP_MARKET\",\n /**\n * Only for POSITIONAL_TP_SL type algo order\n */\n CLOSE_POSITION = \"CLOSE_POSITION\",\n}\n\nexport enum BBOOrderType {\n COUNTERPARTY1 = \"counterparty1\",\n COUNTERPARTY5 = \"counterparty5\",\n QUEUE1 = \"queue1\",\n QUEUE5 = \"queue5\",\n}\n\nexport enum OrderLevel {\n ONE = 0,\n TWO = 1,\n THREE = 2,\n FOUR = 3,\n FIVE = 4,\n}\n\nexport enum AlgoOrderRootType {\n TP_SL = \"TP_SL\",\n POSITIONAL_TP_SL = \"POSITIONAL_TP_SL\",\n STOP = \"STOP\",\n BRACKET = \"BRACKET\",\n}\n\nexport enum TriggerPriceType {\n MARK_PRICE = \"MARK_PRICE\",\n}\n\nexport enum AlgoOrderType {\n TAKE_PROFIT = \"TAKE_PROFIT\",\n STOP_LOSS = \"STOP_LOSS\",\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\",\n}\n\nexport enum PositionSide {\n LONG = \"LONG\",\n SHORT = \"SHORT\",\n}\n\nexport enum OrderStatus {\n /** @deprecated */\n OPEN = \"OPEN\",\n NEW = \"NEW\",\n FILLED = \"FILLED\",\n PARTIAL_FILLED = \"PARTIAL_FILLED\",\n CANCELLED = \"CANCELLED\",\n REPLACED = \"REPLACED\",\n // CANCELLED + FILLED\n COMPLETED = \"COMPLETED\",\n // NEW + PARTIAL_FILLED\n INCOMPLETE = \"INCOMPLETE\",\n REJECTED = \"REJECTED\",\n}\n\nexport interface OrderExt {\n total: string;\n}\n\nexport interface BaseOrder {\n symbol: string;\n order_type: OrderType;\n order_type_ext?: OrderType;\n order_price: string;\n order_quantity: string;\n order_amount?: number;\n visible_quantity: number;\n side: OrderSide;\n reduce_only: boolean;\n slippage: number;\n order_tag: string;\n level: OrderLevel;\n post_only_adjust: boolean;\n}\n\nexport interface RegularOrder extends BaseOrder, OrderExt {\n // symbol: string;\n // client_order_id: string;\n // type: OrderType;\n // price: number;\n // quantity: number;\n}\n\nexport interface AlgoOrder extends BaseOrder, OrderExt {\n // symbol: string;\n quantity: string;\n type: OrderType;\n price: string;\n algo_type: AlgoOrderRootType;\n trigger_price_type: string;\n trigger_price: string;\n child_orders: AlgoOrderChildOrders[];\n}\n\nexport interface BracketOrder extends AlgoOrder, OrderExt {\n /**\n * Computed take profit\n */\n tp_pnl?: string;\n tp_offset?: string;\n tp_offset_percentage?: string;\n tp_ROI?: string;\n tp_trigger_price?: string;\n\n /**\n * Computed stop loss\n */\n sl_pnl?: string;\n sl_offset?: string;\n sl_offset_percentage?: string;\n sl_ROI?: string;\n sl_trigger_price?: string;\n}\n\nexport type OrderlyOrder = RegularOrder & AlgoOrder & BracketOrder;\n\nexport interface AlgoOrderChildOrders {\n symbol: string;\n algo_type: string;\n child_orders: ChildOrder[];\n}\n\nexport interface ChildOrder {\n symbol: string;\n algo_type: AlgoOrderType;\n side: string;\n type: OrderType;\n trigger_price: string;\n\n reduce_only: boolean;\n trigger_price_type?: string;\n}\n\n// export interface OrderEntity {}\n\nexport interface OrderEntity {\n symbol: string;\n order_type: OrderType;\n algo_type?: AlgoOrderRootType;\n order_type_ext?: OrderType;\n order_price?: string;\n order_quantity?: string;\n order_amount?: number;\n // Whether to display in the orderbook, default=order_quantity, not displayed when =0,\n visible_quantity?: number;\n reduce_only?: boolean;\n side: OrderSide;\n broker_id?: string;\n\n // internal fields\n total?: string;\n // hideInOrderbook?: boolean;\n isStopOrder?: boolean;\n trigger_price?: string;\n order_tag?: string;\n level?: OrderLevel;\n}\n\nexport type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\nexport type RequireKeys<T extends object, K extends keyof T> = Required<\n Pick<T, K>\n> &\n Partial<Omit<T, K>>;\n\nexport interface BaseAlgoOrderEntity<T extends AlgoOrderRootType>\n extends OrderEntity {\n algo_type: AlgoOrderRootType;\n child_orders: (Partial<Omit<AlgoOrderEntity<T>, \"algo_type\" | \"type\">> & {\n algo_type: AlgoOrderType;\n type: OrderType;\n child_orders?: BaseAlgoOrderEntity<T>[\"child_orders\"];\n // trigger_price: number | string;\n })[];\n // if update the order, then need to provide the order_id\n algo_order_id?: number;\n client_order_id?: string;\n order_tag?: string;\n price?: number | string;\n quantity: number | string;\n reduce_only?: boolean;\n side: OrderSide;\n symbol: string;\n trigger_price: string;\n trigger_price_type: TriggerPriceType;\n type: OrderType;\n visible_quantity?: number;\n is_activated?: boolean;\n tp_trigger_price?: string | number;\n sl_trigger_price?: string | number;\n}\n\nexport type AlgoOrderEntity<\n T extends AlgoOrderRootType = AlgoOrderRootType.STOP\n> = T extends AlgoOrderRootType.TP_SL\n ? Optional<\n BaseAlgoOrderEntity<T>,\n \"side\" | \"type\" | \"trigger_price\" | \"order_type\"\n >\n : T extends AlgoOrderRootType.POSITIONAL_TP_SL\n ? Optional<\n BaseAlgoOrderEntity<T>,\n \"side\" | \"type\" | \"trigger_price\" | \"order_type\" | \"quantity\"\n >\n : Omit<BaseAlgoOrderEntity<T>, \"child_orders\" | \"order_type\">;\n\nexport type TPSLOrderEntry = Optional<\n AlgoOrderEntity<AlgoOrderRootType.TP_SL>,\n \"side\" | \"type\" | \"trigger_price\"\n>;\n\nexport type BracketOrderEntry = Optional<\n AlgoOrderEntity<AlgoOrderRootType.BRACKET>,\n \"side\"\n>;\n","export enum WithdrawStatus {\n NotSupported = \"NotSupported\",\n NotConnected = \"NotConnected\",\n Unsettle = \"Unsettle\",\n InsufficientBalance = \"InsufficientBalance\",\n Normal = \"Normal\",\n}\n","export interface Chain {\n id: number;\n chainNameShort: string;\n chainLogo: string;\n chainInfo: ChainInfo;\n minGasBalance: number;\n minCrossGasBalance: number;\n maxPrepayCrossGas: number;\n blockExplorerName: string;\n chainName: string;\n requestRpc: string;\n}\n\nexport interface ChainInfo {\n chainId: string;\n chainName: string;\n nativeCurrency: NativeCurrency;\n rpcUrls: string[];\n blockExplorerUrls: string[];\n}\n\nexport interface NativeCurrency {\n name: string;\n symbol: string;\n decimals: number;\n fix: number;\n}\n\nexport const Ethereum = {\n chainNameShort: \"Ethereum\",\n id: 1,\n chainLogo: \"\",\n chainInfo: {\n chainId: `0x${(1).toString(16)}`,\n chainName: \"Ethereum Mainnet\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 8,\n },\n rpcUrls: [\"https://mainnet.infura.io/v3/9155d40884554acdb17699a18a1fe348\"],\n blockExplorerUrls: [\"https://etherscan.io/\"],\n },\n minGasBalance: 0.002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.025,\n blockExplorerName: \"EthScan\",\n chainName: \"Ethereum Mainnet\",\n requestRpc: \"https://rpc.ankr.com/eth\",\n};\n\nexport const Avalanche = {\n id: 43114,\n chainInfo: {\n chainId: `0x${(43114).toString(16)}`, // '0xa86a'\n chainName: \"Avalanche\",\n nativeCurrency: {\n name: \"avax\",\n symbol: \"AVAX\",\n decimals: 18,\n fix: 5,\n },\n rpcUrls: [\"https://api.avax.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://snowtrace.io/\"],\n },\n minGasBalance: 0.05,\n minCrossGasBalance: 0.15,\n maxPrepayCrossGas: 2,\n blockExplorerName: \"Snowtrace\",\n chainName: \"Avalanche\",\n chainNameShort: \"Avalanche\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/avalanche\",\n};\n\nexport const Fuji = {\n id: 43113,\n chainInfo: {\n chainId: `0x${(43113).toString(16)}`, // '0xa86a'\n chainName: \"Avalanche Fuji Testnet\",\n nativeCurrency: {\n name: \"avax\",\n symbol: \"AVAX\",\n decimals: 18,\n fix: 5,\n },\n rpcUrls: [\"https://api.avax.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://snowtrace.io/\"],\n },\n minGasBalance: 0.05,\n minCrossGasBalance: 0.15,\n maxPrepayCrossGas: 2,\n blockExplorerName: \"Snowtrace\",\n chainName: \"Avalanche Fuji\",\n chainNameShort: \"Avalanche Fuji\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/avalanche\",\n};\n\nexport const BNB = {\n id: 56,\n chainInfo: {\n chainId: `0x${(56).toString(16)}`, // 0x38\n chainName: \"BNB Chain\",\n nativeCurrency: {\n name: \"bnb\",\n symbol: \"BNB\",\n decimals: 18,\n fix: 6,\n },\n rpcUrls: [\"https://bsc-dataseed1.binance.org/\"],\n blockExplorerUrls: [\"https://bscscan.com/\"],\n },\n minGasBalance: 0.02,\n minCrossGasBalance: 0.02,\n maxPrepayCrossGas: 0.1,\n blockExplorerName: \"BscScan\",\n chainName: \"Binance Smart Chain\",\n chainNameShort: \"BNB Chain\",\n requestRpc: \"https://rpc.ankr.com/bsc\",\n chainLogo: \"\",\n};\n\nexport const Fantom = {\n id: 250,\n chainInfo: {\n chainId: `0x${(250).toString(16)}`, // 0x38\n chainName: \"Fantom\",\n nativeCurrency: {\n name: \"ftm\",\n symbol: \"FTM\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpcapi.fantom.network\"],\n blockExplorerUrls: [\"https://ftmscan.com/\"],\n },\n minGasBalance: 1,\n minCrossGasBalance: 10,\n maxPrepayCrossGas: 60,\n blockExplorerName: \"FTMScan\",\n chainName: \"Fantom\",\n chainNameShort: \"Fantom\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/fantom\",\n};\n\nexport const Polygon = {\n id: 137,\n chainInfo: {\n chainId: `0x${(137).toString(16)}`,\n chainName: \"Polygon\",\n nativeCurrency: {\n name: \"matic\",\n symbol: \"MATIC\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpc-mainnet.matic.network\"],\n blockExplorerUrls: [\"https://polygonscan.com/\"],\n },\n minGasBalance: 0.1,\n minCrossGasBalance: 1,\n maxPrepayCrossGas: 30,\n blockExplorerName: \"Polygonscan\",\n chainName: \"Polygon\",\n chainNameShort: \"Polygon\",\n requestRpc: \"https://rpc.ankr.com/polygon\",\n chainLogo: \"\",\n};\n\nexport const Arbitrum = {\n id: 42161,\n chainInfo: {\n chainId: `0x${(42161).toString(16)}`,\n chainName: \"Arbitrum\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://arb1.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://arbiscan.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbiscan\",\n chainName: \"Arbitrum\",\n chainNameShort: \"Arbitrum\",\n requestRpc: \"https://arb1.arbitrum.io/rpc\",\n chainLogo: \"\",\n};\n\nexport const Optimism = {\n id: 10,\n chainInfo: {\n chainId: `0x${(10).toString(16)}`,\n chainName: \"Optimism\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://mainnet.optimism.io\"],\n blockExplorerUrls: [\"https://optimistic.etherscan.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism\",\n chainName: \"Optimism\",\n chainNameShort: \"Optimism\",\n requestRpc: \"https://rpc.ankr.com/optimism\",\n chainLogo: \"\",\n};\n\nexport const zkSyncEra = {\n id: 324,\n chainInfo: {\n chainId: `0x${(324).toString(16)}`,\n chainName: \"zkSync Era\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://zksync2-mainnet.zksync.io\"],\n blockExplorerUrls: [\"https://explorer.zksync.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"zkSync Era\",\n chainName: \"zkSync Era\",\n chainNameShort: \"zkSync Era\",\n requestRpc: \"https://zksync2-mainnet.zksync.io/\",\n chainLogo: \"\",\n // blockExplorerName: 'zkSync Era Goerli',\n // chainName: 'zkSync Era Goerli',\n // chainNameShort: 'zkSync Era Goerli',\n // requestRpc: 'https://zksync2-testnet.zksync.dev/',\n // chainLogo: '',\n};\n\nexport const PolygonzkEVM = {\n id: 1101,\n chainInfo: {\n chainId: `0x${(1101).toString(16)}`,\n chainName: \"Polygon zkEVM\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://zkevm-rpc.com\"],\n blockExplorerUrls: [\"https://zkevm.polygonscan.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Polygon zkEVM\",\n chainName: \"Polygon zkEVM\",\n chainNameShort: \"Polygon zkEVM\",\n requestRpc: \"https://zkevm-rpc.com\",\n chainLogo: \"\",\n};\n\nexport const Linea = {\n id: 59144,\n chainInfo: {\n chainId: `0x${(59144).toString(16)}`,\n chainName: \"Linea\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.linea.build\"],\n blockExplorerUrls: [\"https://lineascan.build/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Linea\",\n chainName: \"Linea\",\n chainNameShort: \"Linea\",\n requestRpc: \"https://rpc.linea.build\",\n chainLogo: \"\",\n};\n\nexport const Base = {\n id: 8453,\n chainInfo: {\n chainId: `0x${(8453).toString(16)}`,\n chainName: \"Base Network\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://developer-access-mainnet.base.org/\"],\n blockExplorerUrls: [\"https://basescan.org\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Base\",\n chainName: \"Base\",\n chainNameShort: \"Base\",\n requestRpc: \"https://developer-access-mainnet.base.org/\",\n chainLogo: \"\",\n};\n\nexport const Mantle = {\n id: 5000,\n chainInfo: {\n chainId: `0x${(5000).toString(16)}`,\n chainName: \"Mantle\",\n nativeCurrency: {\n name: \"MNT\",\n symbol: \"MNT\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.mantle.xyz/\"],\n blockExplorerUrls: [\"https://mantlescan.xyz/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Mantle\",\n chainName: \"Mantle\",\n chainNameShort: \"Mantle\",\n requestRpc: \"https://rpc.mantle.xyz/\",\n chainLogo: \"\",\n};\n\nexport const ArbitrumGoerli = {\n id: 421613,\n chainInfo: {\n chainId: `0x${(421613).toString(16)}`,\n chainName: \"Arbitrum Goerli\",\n nativeCurrency: {\n name: \"AGOR\",\n symbol: \"AGOR\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://goerli-rollup.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://goerli-rollup-explorer.arbitrum.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbitrum Goerli\",\n chainName: \"Arbitrum Goerli\",\n chainNameShort: \"Arbitrum Goerli\",\n requestRpc: \"https://goerli-rollup.arbitrum.io/rpc\",\n chainLogo: \"\",\n};\n\nexport const ArbitrumSepolia = {\n id: 421614,\n chainInfo: {\n chainId: `0x${(421614).toString(16)}`,\n chainName: \"Arbitrum Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\"],\n blockExplorerUrls: [\"https://sepolia-explorer.arbitrum.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbitrum Sepolia\",\n chainName: \"Arbitrum Sepolia\",\n chainNameShort: \"Arbitrum Sepolia\",\n requestRpc: \"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\",\n chainLogo: \"\",\n};\n\nexport const OptimismGoerli = {\n id: 420,\n chainInfo: {\n chainId: `0x${(420).toString(16)}`,\n chainName: \"Optimism Goerli\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://optimism-goerli.gateway.tenderly.co\"],\n blockExplorerUrls: [\"https://goerli-optimism.etherscan.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism Goerli\",\n chainName: \"Optimism Goerli\",\n chainNameShort: \"Optimism Goerli\",\n requestRpc: \"https://optimism-goerli.gateway.tenderly.co\",\n chainLogo: \"\",\n};\n\nexport const OptimismSepolia = {\n id: 11155420,\n chainInfo: {\n chainId: `0x${(11155420).toString(16)}`,\n chainName: \"Optimism Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://sepolia.optimism.io\"],\n blockExplorerUrls: [\"https://sepolia-optimistic.etherscan.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism Sepolia\",\n chainName: \"Optimism Sepolia\",\n chainNameShort: \"Optimism Sepolia\",\n requestRpc: \"https://sepolia.optimism.io\",\n chainLogo: \"\",\n};\n\nexport const BaseSepolia = {\n id: 84532,\n chainInfo: {\n chainId: `0x${(84532).toString(16)}`,\n chainName: \"Base Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://base-sepolia-rpc.publicnode.com\"],\n blockExplorerUrls: [\"https://base-sepolia.blockscout.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Base Sepolia\",\n chainName: \"Base Sepolia\",\n chainNameShort: \"Base Sepolia\",\n requestRpc: \"https://base-sepolia-rpc.publicnode.com\",\n chainLogo: \"\",\n};\n\nexport const MantleSepolia = {\n id: 5003,\n chainInfo: {\n chainId: `0x${(5003).toString(16)}`,\n chainName: \"Mantle Sepolia\",\n nativeCurrency: {\n name: \"MNT\",\n symbol: \"MNT\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.sepolia.mantle.xyz/\"],\n blockExplorerUrls: [\"https://sepolia.mantlescan.xyz/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Mantle Sepolia\",\n chainName: \"Mantle Sepolia\",\n chainNameShort: \"Mantle Sepolia\",\n requestRpc: \"https://rpc.sepolia.mantle.xyz/\",\n chainLogo: \"\",\n};\n\nexport const PolygonAmoy = {\n id: 80002,\n chainInfo: {\n chainId: `0x${(80002).toString(16)}`,\n chainName: \"Polygon Amoy\",\n nativeCurrency: {\n name: \"MATIC\",\n symbol: \"MATIC\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc-amoy.polygon.technology/\"],\n blockExplorerUrls: [\"https://www.oklink.com/amoy\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Polygon Amoy\",\n chainName: \"Polygon Amoy\",\n chainNameShort: \"Polygon Amoy\",\n requestRpc: \"https://rpc-amoy.polygon.technology/\",\n chainLogo: \"\",\n};\n\nexport const Sei = {\n id: 1329,\n chainInfo: {\n chainId: `0x${(1329).toString(16)}`,\n chainName: \"Sei Network\",\n nativeCurrency: {\n name: \"SEI\",\n symbol: \"SEI\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://evm-rpc.sei-apis.com\"],\n blockExplorerUrls: [\"https://seitrace.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"SEI\",\n chainName: \"Sei Network\",\n chainNameShort: \"SEI\",\n requestRpc: \"https://evm-rpc.sei-apis.com\",\n chainLogo: \"\",\n};\n\nexport const StoryTestnet = {\n name: \"Story Odyssey Testnet\",\n public_rpc_url: \"https://rpc.odyssey.storyrpc.io/\",\n chain_id: 1516,\n currency_symbol: \"IP\",\n explorer_base_url: \"\",\n vault_address: \"\",\n};\nexport const StoryOdysseyTestnet = {\n id: 1329,\n chainInfo: {\n chainId: `0x${StoryTestnet.chain_id.toString(16)}`,\n chainName: StoryTestnet.name,\n nativeCurrency: {\n name: \"IP\",\n symbol: \"IP\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [StoryTestnet.public_rpc_url],\n blockExplorerUrls: [],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"SEI\",\n chainName: \"Sei Network\",\n chainNameShort: \"SEI\",\n requestRpc: \"https://evm-rpc.sei-apis.com\",\n chainLogo: \"\",\n};\nexport const chainsInfoMap: Map<number, Chain> = new Map([\n [Ethereum.id, Ethereum],\n [Avalanche.id, Avalanche],\n [Fuji.id, Fuji],\n [BNB.id, BNB],\n [Fantom.id, Fantom],\n [Polygon.id, Polygon],\n [Arbitrum.id, Arbitrum],\n [Optimism.id, Optimism],\n [zkSyncEra.id, zkSyncEra],\n [PolygonzkEVM.id, PolygonzkEVM],\n [Linea.id, Linea],\n [Base.id, Base],\n [Mantle.id, Mantle],\n [ArbitrumGoerli.id, ArbitrumGoerli],\n [ArbitrumSepolia.id, ArbitrumSepolia],\n [OptimismGoerli.id, OptimismGoerli],\n [OptimismSepolia.id, OptimismSepolia],\n [BaseSepolia.id, BaseSepolia],\n [MantleSepolia.id, MantleSepolia],\n [PolygonAmoy.id, PolygonAmoy],\n [Sei.id, Sei],\n [StoryOdysseyTestnet.id, StoryOdysseyTestnet],\n]);\n\nexport const SolanaDevnet = {\n id: 901901901,\n chainInfo: {\n name: \"Solana Devnet\",\n public_rpc_url: \"\",\n chainId: 901901901,\n currency_symbol: \"SOL\",\n explorer_base_url: \"\",\n vault_address: \"\",\n },\n} as unknown as typeof Arbitrum;\n\nexport const TestnetChains = [\n {\n network_infos: {\n name: \"Arbitrum Sepolia\",\n shortName: \"Arbitrum Sepolia\",\n public_rpc_url: \"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\",\n chain_id: 421614,\n currency_symbol: \"ETH\",\n bridge_enable: true,\n mainnet: false,\n explorer_base_url: \"https://sepolia.arbiscan.io\",\n est_txn_mins: null,\n },\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d\",\n decimals: 6,\n },\n ],\n },\n {\n network_infos: {\n name: \"Solana Devnet\",\n public_rpc_url: \"\",\n chain_id: 901901901,\n currency_symbol: \"SOL\",\n explorer_base_url: \"\",\n vault_address: \"\",\n },\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU\",\n decimals: 6,\n },\n ],\n },\n {\n network_infos: StoryTestnet,\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"0xF1815bd50389c46847f0Bda824eC8da914045D14\",\n decimals: 6,\n },\n ],\n },\n // {\n // network_infos: {\n // name: \"Mantle Sepolia\",\n // shortName: \"Mantle Sepolia\",\n // public_rpc_url: \"https://rpc.sepolia.mantle.xyz/\",\n // chain_id: 5003,\n // currency_symbol: \"MNT\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://sepolia.mantlescan.xyz/\",\n // est_txn_mins: null,\n // },\n // token_infos: [\n // {\n // symbol: \"USDC\",\n // address: \"0xAcab8129E2cE587fD203FD770ec9ECAFA2C88080\",\n // decimals: 6,\n // display_name: \"USDC.e\",\n // },\n // ],\n // },\n // {\n // network_infos: {\n // name: \"Arbitrum Goerli\",\n // shortName: \"Arbitrum Goerli\",\n // public_rpc_url: \"https://goerli-rollup.arbitrum.io/rpc\",\n // chain_id: 421613,\n // currency_symbol: \"ETH\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://goerli.arbiscan.io/\",\n // est_txn_mins: null,\n // },\n // token_infos: [\n // {\n // symbol: \"USDC\",\n // address: \"0xfd064A18f3BF249cf1f87FC203E90D8f650f2d63\",\n // decimals: 6,\n // },\n // ],\n // },\n // {\n // network_infos: {\n // name: \"Optimism Goerli\",\n // shortName: \"Optimism Goerli\",\n // public_rpc_url: \"https://optimism-goerli.gateway.tenderly.co\",\n // chain_id: 420,\n // currency_symbol: \"ETH\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://goerli-optimism.etherscan.io\",\n // est_txn_mins: null,\n // },\n // },\n];\n\nexport const defaultMainnetChains = [Arbitrum, Base, Optimism];\nexport const defaultTestnetChains = [ArbitrumSepolia];\n\nexport enum ChainNamespace {\n evm = \"EVM\",\n solana = \"SOL\",\n}\n\nexport const AbstractChains = new Set([2741, 11124]);\nexport const SolanaChains = new Set([901901901, 900900900]);\n","export enum TrackerEventName {\n /** virtual event (not send this event name to tracker) */\n trackIdentifyUserId = \"track_identify_user_id\",\n trackIdentify = \"track_identify\",\n trackCustomEvent = \"track_custom_event\",\n\n /** real event name (send this event name to tracker) */\n withdrawSuccess = \"withdraw_request_success\",\n withdrawFailed = \"withdraw_request_failure\",\n depositSuccess = \"deposit_request_success\",\n depositFailed = \"deposit_request_failure\",\n signinSuccess = \"sign_message_success\",\n placeOrderSuccess = \"place_order_success\",\n walletConnect = \"connect_wallet_success\",\n clickLinkDeviceButton = \"click_link_device_button\",\n signLinkDeviceMessageSuccess = \"sign_link_device_message_success\",\n linkDeviceModalClickConfirm = \"link_device_modal_click_confirm\",\n socialLoginSuccess = \"social_login_success\",\n clickSwitchNetwork = \"click_switch_network\",\n clickSwitchWallet = \"click_switch_wallet\",\n switchNetworkSuccess = \"switch_network_success\",\n clickExportPrivateKey = \"click_export_private_key\",\n switchLanguage = \"switch_language\",\n leaderboardCampaignClickTradeNow = \"leaderboard_campaign_click_trade_now\",\n leaderboardCampaignClickLearnMore = \"leaderboard_campaign_click_learn_more\",\n}\n","import { API } from \"./types/api\";\n\n// export type Chain = {\n// id: string;\n// name?: string;\n// };\n\nexport type CurrentChain = {\n id: number;\n info: API.Chain;\n};\n\nexport enum WS_WalletStatusEnum {\n NO = \"NO\",\n FAILED = \"FAILED\",\n PENDING = \"PENDING\",\n PROCESSING = \"PROCESSING\",\n COMPLETED = \"COMPLETED\",\n}\n","export const LedgerWalletKey = \"orderly:ledger-wallet\";\nexport const ConnectorKey = \"orderly:connectorKey\";\nexport const ChainKey = \"order:chain\";\nexport const LinkDeviceKey = \"orderly_link_device\";\n","export class ApiError extends Error {\n constructor(message: string, private readonly code: number) {\n super(message);\n this.name = \"ApiError\";\n }\n}\n\nexport class SDKError extends Error {\n constructor(message: string) {\n super(`[ORDERLY SDK ERROR]:${message}`);\n this.name = \"SDKError\";\n }\n}\n","export const definedTypes = {\n EIP712Domain: [\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" },\n ],\n Registration: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"timestamp\", type: \"uint64\" },\n { name: \"registrationNonce\", type: \"uint256\" },\n ],\n Withdraw: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"receiver\", type: \"address\" },\n { name: \"token\", type: \"string\" },\n { name: \"amount\", type: \"uint256\" },\n { name: \"withdrawNonce\", type: \"uint64\" },\n { name: \"timestamp\", type: \"uint64\" },\n ],\n AddOrderlyKey: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"orderlyKey\", type: \"string\" },\n { name: \"scope\", type: \"string\" },\n { name: \"timestamp\", type: \"uint64\" },\n { name: \"expiration\", type: \"uint64\" },\n ],\n SettlePnl: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"settleNonce\", type: \"uint64\" },\n { name: \"timestamp\", type: \"uint64\" },\n ],\n } as const;","export { default as version } from \"./version\";\nexport * from \"./constants\";\nexport * from \"./types/api\";\n// export * from \"./order\";\nexport {\n OrderType,\n OrderSide,\n OrderStatus,\n AlgoOrderRootType,\n AlgoOrderType,\n TriggerPriceType,\n BBOOrderType,\n OrderLevel,\n} from \"./order\";\nexport type {\n OrderEntity,\n AlgoOrderEntity,\n TPSLOrderEntry,\n BaseAlgoOrderEntity,\n AlgoOrderChildOrders,\n Optional,\n PositionSide,\n BracketOrderEntry,\n RequireKeys,\n BaseOrder,\n RegularOrder,\n AlgoOrder,\n OrderlyOrder,\n ChildOrder,\n BracketOrder,\n} from \"./order\";\nexport * from \"./withdraw\";\nexport * from \"./chains\";\nexport * from \"./track\";\nexport type { Chain as ChainConfig, ChainInfo, NativeCurrency } from \"./chains\";\nexport * from \"./wallet\";\nexport * from \"./storageKey\";\nexport { ApiError, SDKError } from \"./errors\";\n\nexport { definedTypes } from \"./sign\";\nexport * as superstruct from \"superstruct\";\nexport * from \"./assetHistory\";\n","export enum AssetHistoryStatusEnum {\n NEW = \"NEW\",\n CON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AAU;AAAA,EAC/C;AAAA,EACA,UAAU;AAAA,IACR,EAAE,MAAM,YAAY,MAAM,SAAS;AAAA,IACnC,EAAE,MAAM,WAAW,MAAM,UAAU;AAAA,IACnC,EAAE,MAAM,YAAY,MAAM,UAAU;AAAA,IACpC,EAAE,MAAM,SAAS,MAAM,SAAS;AAAA,IAChC,EAAE,MAAM,UAAU,MAAM,UAAU;AAAA,IAClC,EAAE,MAAM,iBAAiB,MAAM,SAAS;AAAA,IACxC,EAAE,MAAM,aAAa,MAAM,SAAS;AAAA,EACtC;AAAA,EACA,eAAe;AAAA,IACb,EAAE,MAAM,YAAY,MAAM,SAAS;AAAA,IACnC,EAAE,MAAM,WAAW,MAAM,UAAU;AAAA,IACnC,EAAE,MAAM,cAAc,MAAM,SAAS;AAAA,IACrC,EAAE,MAAM,SAAS,MAAM,SAAS;AAAA,IAChC,EAAE,MAAM,aAAa,MAAM,SAAS;AAAA,IACpC,EAAE,MAAM,cAAc,MAAM,SAAS;AAAA,EACvC;AAAA,EACA,WAAW;AAAA,IACT,EAAE,MAAM,YAAY,MAAM,SAAS;AAAA,IACnC,EAAE,MAAM,WAAW,MAAM,UAAU;AAAA,IACnC,EAAE,MAAM,eAAe,MAAM,SAAS;AAAA,IACtC,EAAE,MAAM,aAAa,MAAM,SAAS;AAAA,EACtC;AACF;;;ACIF,YAAY,iBAAiB;;;ACxCtB,IAAK,yBAAL,kBAAKC,4BAAL;AACL,EAAAA,wBAAA,SAAM;AACN,EAAAA,wBAAA,aAAU;AACV,EAAAA,wBAAA,gBAAa;AACb,EAAAA,wBAAA,eAAY;AACZ,EAAAA,wBAAA,YAAS;AACT,EAAAA,wBAAA,uBAAoB;AANV,SAAAA;AAAA,GAAA;","names":["AccountStatusEnum","SystemStateEnum","ExchangeStatusEnum","NetworkStatusEnum","AnnouncementType","OrderType","BBOOrderType","OrderLevel","AlgoOrderRootType","TriggerPriceType","AlgoOrderType","OrderSide","OrderStatus","WithdrawStatus","ChainNamespace","TrackerEventName","WS_WalletStatusEnum","AssetHistoryStatusEnum"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orderly.network/types",
3
- "version": "2.1.3",
3
+ "version": "2.2.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -18,7 +18,7 @@
18
18
  "jest": "^29.6.1",
19
19
  "tsup": "^7.1.0",
20
20
  "typedoc": "^0.26.5",
21
- "tsconfig": "0.4.3"
21
+ "tsconfig": "0.5.0"
22
22
  },
23
23
  "publishConfig": {
24
24
  "access": "public"