@orderly.network/types 2.5.1 → 2.5.2

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.5.1";
11
+ declare const _default: "2.5.2";
12
12
 
13
13
  declare enum AccountStatusEnum {
14
14
  EnableTradingWithoutConnected = -1,
@@ -505,6 +505,37 @@ declare namespace API {
505
505
  positive: number;
506
506
  negative: number;
507
507
  }
508
+ interface FundingDetails {
509
+ symbol: string;
510
+ quote_min: number;
511
+ quote_max: number;
512
+ quote_tick: number;
513
+ base_min: number;
514
+ base_max: number;
515
+ base_tick: number;
516
+ min_notional: number;
517
+ price_range: number;
518
+ price_scope: number;
519
+ std_liquidation_fee: number;
520
+ liquidator_fee: number;
521
+ claim_insurance_fund_discount: number;
522
+ funding_period: number;
523
+ cap_funding: number;
524
+ floor_funding: number;
525
+ interest_rate: number;
526
+ created_time: number;
527
+ updated_time: number;
528
+ liquidation_tier: number;
529
+ cap_ir: number;
530
+ floor_ir: number;
531
+ mark_index_price_deviation_floor: number;
532
+ mark_index_price_deviation_cap: number;
533
+ global_max_oi_cap: number;
534
+ base_mmr: number;
535
+ base_imr: number;
536
+ imr_factor: number;
537
+ deviation_factor: number;
538
+ }
508
539
  interface FundingHistory {
509
540
  symbol: string;
510
541
  data_start_time: string;
@@ -1614,6 +1645,7 @@ declare const LedgerWalletKey = "orderly:ledger-wallet";
1614
1645
  declare const ConnectorKey = "orderly:connectorKey";
1615
1646
  declare const ChainKey = "order:chain";
1616
1647
  declare const LinkDeviceKey = "orderly_link_device";
1648
+ declare const TradingviewFullscreenKey = "orderly:tradingview-fullscreen";
1617
1649
 
1618
1650
  declare class ApiError extends Error {
1619
1651
  private readonly code;
@@ -1715,4 +1747,4 @@ declare enum AssetHistoryStatusEnum {
1715
1747
  PENDING_REBALANCE = "PENDING_REBALANCE"
1716
1748
  }
1717
1749
 
1718
- 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, BSC_TESTNET_CHAINID, 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, DistributionType, 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, nativeETHAddress, nativeTokenAddress, _default as version, zkSyncEra };
1750
+ 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, BSC_TESTNET_CHAINID, 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, DistributionType, 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, TradingviewFullscreenKey, TriggerPriceType, WSMessage, WS_WalletStatusEnum, WithdrawStatus, chainsInfoMap, defaultMainnetChains, defaultTestnetChains, definedTypes, isNativeTokenChecker, nativeETHAddress, 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.5.1";
11
+ declare const _default: "2.5.2";
12
12
 
13
13
  declare enum AccountStatusEnum {
14
14
  EnableTradingWithoutConnected = -1,
@@ -505,6 +505,37 @@ declare namespace API {
505
505
  positive: number;
506
506
  negative: number;
507
507
  }
508
+ interface FundingDetails {
509
+ symbol: string;
510
+ quote_min: number;
511
+ quote_max: number;
512
+ quote_tick: number;
513
+ base_min: number;
514
+ base_max: number;
515
+ base_tick: number;
516
+ min_notional: number;
517
+ price_range: number;
518
+ price_scope: number;
519
+ std_liquidation_fee: number;
520
+ liquidator_fee: number;
521
+ claim_insurance_fund_discount: number;
522
+ funding_period: number;
523
+ cap_funding: number;
524
+ floor_funding: number;
525
+ interest_rate: number;
526
+ created_time: number;
527
+ updated_time: number;
528
+ liquidation_tier: number;
529
+ cap_ir: number;
530
+ floor_ir: number;
531
+ mark_index_price_deviation_floor: number;
532
+ mark_index_price_deviation_cap: number;
533
+ global_max_oi_cap: number;
534
+ base_mmr: number;
535
+ base_imr: number;
536
+ imr_factor: number;
537
+ deviation_factor: number;
538
+ }
508
539
  interface FundingHistory {
509
540
  symbol: string;
510
541
  data_start_time: string;
@@ -1614,6 +1645,7 @@ declare const LedgerWalletKey = "orderly:ledger-wallet";
1614
1645
  declare const ConnectorKey = "orderly:connectorKey";
1615
1646
  declare const ChainKey = "order:chain";
1616
1647
  declare const LinkDeviceKey = "orderly_link_device";
1648
+ declare const TradingviewFullscreenKey = "orderly:tradingview-fullscreen";
1617
1649
 
1618
1650
  declare class ApiError extends Error {
1619
1651
  private readonly code;
@@ -1715,4 +1747,4 @@ declare enum AssetHistoryStatusEnum {
1715
1747
  PENDING_REBALANCE = "PENDING_REBALANCE"
1716
1748
  }
1717
1749
 
1718
- 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, BSC_TESTNET_CHAINID, 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, DistributionType, 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, nativeETHAddress, nativeTokenAddress, _default as version, zkSyncEra };
1750
+ 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, BSC_TESTNET_CHAINID, 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, DistributionType, 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, TradingviewFullscreenKey, TriggerPriceType, WSMessage, WS_WalletStatusEnum, WithdrawStatus, chainsInfoMap, defaultMainnetChains, defaultTestnetChains, definedTypes, isNativeTokenChecker, nativeETHAddress, nativeTokenAddress, _default as version, zkSyncEra };
package/dist/index.js CHANGED
@@ -102,6 +102,7 @@ __export(src_exports, {
102
102
  TesntTokenFallback: () => TesntTokenFallback,
103
103
  TestnetChains: () => TestnetChains,
104
104
  TrackerEventName: () => TrackerEventName,
105
+ TradingviewFullscreenKey: () => TradingviewFullscreenKey,
105
106
  TriggerPriceType: () => TriggerPriceType,
106
107
  WS_WalletStatusEnum: () => WS_WalletStatusEnum,
107
108
  WithdrawStatus: () => WithdrawStatus,
@@ -121,9 +122,9 @@ module.exports = __toCommonJS(src_exports);
121
122
  // src/version.ts
122
123
  if (typeof window !== "undefined") {
123
124
  window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};
124
- window.__ORDERLY_VERSION__["@orderly.network/types"] = "2.5.1";
125
+ window.__ORDERLY_VERSION__["@orderly.network/types"] = "2.5.2";
125
126
  }
126
- var version_default = "2.5.1";
127
+ var version_default = "2.5.2";
127
128
 
128
129
  // src/constants.ts
129
130
  var AccountStatusEnum = /* @__PURE__ */ ((AccountStatusEnum2) => {
@@ -1041,6 +1042,7 @@ var LedgerWalletKey = "orderly:ledger-wallet";
1041
1042
  var ConnectorKey = "orderly:connectorKey";
1042
1043
  var ChainKey = "order:chain";
1043
1044
  var LinkDeviceKey = "orderly_link_device";
1045
+ var TradingviewFullscreenKey = "orderly:tradingview-fullscreen";
1044
1046
 
1045
1047
  // src/errors.ts
1046
1048
  var ApiError = class extends Error {
@@ -1183,6 +1185,7 @@ var AssetHistoryStatusEnum = /* @__PURE__ */ ((AssetHistoryStatusEnum2) => {
1183
1185
  TesntTokenFallback,
1184
1186
  TestnetChains,
1185
1187
  TrackerEventName,
1188
+ TradingviewFullscreenKey,
1186
1189
  TriggerPriceType,
1187
1190
  WS_WalletStatusEnum,
1188
1191
  WithdrawStatus,
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 DistributionType,\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.5.1\";\n};\n\nexport default \"2.5.1\";\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 BSC_TESTNET_CHAINID = 97;\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 nativeETHAddress = \"0x0000000000000000000000000000000000000000\";\n\nexport const isNativeTokenChecker = (address: string) =>\n address === nativeTokenAddress || address === nativeETHAddress;\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","/* eslint-disable @typescript-eslint/no-namespace */\nimport { 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/auto_convert_threshold\n export interface ConvertThreshold {\n ltv_threshold: number;\n negative_usdc_threshold: number;\n }\n\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?: string;\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 client_order_id?: 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 account_id?: string;\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 fundingFee?: 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 address?: string;\n symbol?: string;\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 vault_address: string;\n\n cross_chain_router: string;\n depositor: string;\n }\n\n export interface TokenInfo {\n address?: string;\n base_weight: number;\n decimals?: number;\n /** token decimals */\n token_decimal?: number;\n discount_factor?: number | null;\n display_name?: string;\n haircut: number;\n is_collateral: boolean;\n symbol?: string;\n user_max_qty: number;\n precision?: number;\n minimum_withdraw_amount: number;\n swap_enable?: boolean;\n }\n\n export interface Chain {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n base_weight: number;\n discount_factor?: number | null;\n haircut: number;\n user_max_qty: number;\n is_collateral: boolean;\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 cross_chain_withdrawal_fee: number;\n display_name: string;\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 TransferHistoryRow {\n amount: number;\n created_time: number;\n from_account_id: string;\n id: string;\n status: \"CREATED\" | \"PENDING\" | \"COMPLETED\" | \"FAILED\";\n to_account_id: string;\n token: string;\n updated_time: number;\n }\n\n export interface TransferHistory {\n meta: RecordsMeta;\n rows: TransferHistoryRow[];\n }\n\n export interface TransferHistoryRow {\n amount: number;\n created_time: number;\n from_account_id: string;\n id: string;\n status: \"CREATED\" | \"PENDING\" | \"COMPLETED\" | \"FAILED\";\n to_account_id: string;\n token: string;\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 export interface VaultBalance {\n chain_id: string;\n token: string;\n balance: number;\n pending_rebalance: number;\n }\n\n export interface RestrictedAreas {\n invalid_web_country: string;\n invalid_web_city: string;\n }\n\n export interface IpInfo {\n ip: string;\n city: string;\n region: string;\n checked: boolean;\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 open_interest?: number;\n index_price?: 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 pending_rebalance: 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 * Scaled order\n */\n SCALED = \"SCALED\",\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 /** custom order id, it is used to identify the order from ws */\n client_order_id: string;\n}\n\n/** Scaled order fields */\nexport interface ScaledOrder {\n /** upper price */\n max_price?: string;\n /** lower price */\n min_price?: string;\n /** total orders */\n total_orders?: number;\n /** quantity distribution type */\n distribution_type?: DistributionType;\n /** the ratio between upper and lower price. */\n skew?: number;\n}\n\nexport interface RegularOrder extends BaseOrder, OrderExt, ScaledOrder {\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\nexport interface OrderEntity extends ScaledOrder {\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 slippage?: number;\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 enum DistributionType {\n // enum value need to use lowercase to match the track params\n FLAT = \"flat\",\n ASCENDING = \"ascending\",\n DESCENDING = \"descending\",\n CUSTOM = \"custom\",\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACQA,IAAG,OAAO,WAAW,aAA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OrderLevel","AlgoOrderRootType","TriggerPriceType","AlgoOrderType","OrderSide","OrderStatus","DistributionType","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 DistributionType,\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.5.2\";\n};\n\nexport default \"2.5.2\";\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 BSC_TESTNET_CHAINID = 97;\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 nativeETHAddress = \"0x0000000000000000000000000000000000000000\";\n\nexport const isNativeTokenChecker = (address: string) =>\n address === nativeTokenAddress || address === nativeETHAddress;\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","/* eslint-disable @typescript-eslint/no-namespace */\nimport { 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/auto_convert_threshold\n export interface ConvertThreshold {\n ltv_threshold: number;\n negative_usdc_threshold: number;\n }\n\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?: string;\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 client_order_id?: 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 FundingDetails {\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 liquidation_tier: number;\n cap_ir: number;\n floor_ir: number;\n mark_index_price_deviation_floor: number;\n mark_index_price_deviation_cap: number;\n global_max_oi_cap: number;\n base_mmr: number;\n base_imr: number;\n imr_factor: number;\n deviation_factor: 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 account_id?: string;\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 fundingFee?: 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 address?: string;\n symbol?: string;\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 vault_address: string;\n\n cross_chain_router: string;\n depositor: string;\n }\n\n export interface TokenInfo {\n address?: string;\n base_weight: number;\n decimals?: number;\n /** token decimals */\n token_decimal?: number;\n discount_factor?: number | null;\n display_name?: string;\n haircut: number;\n is_collateral: boolean;\n symbol?: string;\n user_max_qty: number;\n precision?: number;\n minimum_withdraw_amount: number;\n swap_enable?: boolean;\n }\n\n export interface Chain {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n base_weight: number;\n discount_factor?: number | null;\n haircut: number;\n user_max_qty: number;\n is_collateral: boolean;\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 cross_chain_withdrawal_fee: number;\n display_name: string;\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 TransferHistoryRow {\n amount: number;\n created_time: number;\n from_account_id: string;\n id: string;\n status: \"CREATED\" | \"PENDING\" | \"COMPLETED\" | \"FAILED\";\n to_account_id: string;\n token: string;\n updated_time: number;\n }\n\n export interface TransferHistory {\n meta: RecordsMeta;\n rows: TransferHistoryRow[];\n }\n\n export interface TransferHistoryRow {\n amount: number;\n created_time: number;\n from_account_id: string;\n id: string;\n status: \"CREATED\" | \"PENDING\" | \"COMPLETED\" | \"FAILED\";\n to_account_id: string;\n token: string;\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 export interface VaultBalance {\n chain_id: string;\n token: string;\n balance: number;\n pending_rebalance: number;\n }\n\n export interface RestrictedAreas {\n invalid_web_country: string;\n invalid_web_city: string;\n }\n\n export interface IpInfo {\n ip: string;\n city: string;\n region: string;\n checked: boolean;\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 open_interest?: number;\n index_price?: 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 pending_rebalance: 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 * Scaled order\n */\n SCALED = \"SCALED\",\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 /** custom order id, it is used to identify the order from ws */\n client_order_id: string;\n}\n\n/** Scaled order fields */\nexport interface ScaledOrder {\n /** upper price */\n max_price?: string;\n /** lower price */\n min_price?: string;\n /** total orders */\n total_orders?: number;\n /** quantity distribution type */\n distribution_type?: DistributionType;\n /** the ratio between upper and lower price. */\n skew?: number;\n}\n\nexport interface RegularOrder extends BaseOrder, OrderExt, ScaledOrder {\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\nexport interface OrderEntity extends ScaledOrder {\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 slippage?: number;\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 enum DistributionType {\n // enum value need to use lowercase to match the track params\n FLAT = \"flat\",\n ASCENDING = \"ascending\",\n DESCENDING = \"descending\",\n CUSTOM = \"custom\",\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\";\nexport const TradingviewFullscreenKey = \"orderly:tradingview-fullscreen\";\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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,MAAM,eAAe,MAAM,SAAS;AAAA,IACtC,EAAE,MAAM,aAAa,MAAM,SAAS;AAAA,EACtC;AACF;;;AXKF,kBAA6B;;;AYzCtB,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","DistributionType","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.5.1";
4
+ window.__ORDERLY_VERSION__["@orderly.network/types"] = "2.5.2";
5
5
  }
6
- var version_default = "2.5.1";
6
+ var version_default = "2.5.2";
7
7
 
8
8
  // src/constants.ts
9
9
  var AccountStatusEnum = /* @__PURE__ */ ((AccountStatusEnum2) => {
@@ -921,6 +921,7 @@ var LedgerWalletKey = "orderly:ledger-wallet";
921
921
  var ConnectorKey = "orderly:connectorKey";
922
922
  var ChainKey = "order:chain";
923
923
  var LinkDeviceKey = "orderly_link_device";
924
+ var TradingviewFullscreenKey = "orderly:tradingview-fullscreen";
924
925
 
925
926
  // src/errors.ts
926
927
  var ApiError = class extends Error {
@@ -1062,6 +1063,7 @@ export {
1062
1063
  TesntTokenFallback,
1063
1064
  TestnetChains,
1064
1065
  TrackerEventName,
1066
+ TradingviewFullscreenKey,
1065
1067
  TriggerPriceType,
1066
1068
  WS_WalletStatusEnum,
1067
1069
  WithdrawStatus,
@@ -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.5.1\";\n};\n\nexport default \"2.5.1\";\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 BSC_TESTNET_CHAINID = 97;\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 nativeETHAddress = \"0x0000000000000000000000000000000000000000\";\n\nexport const isNativeTokenChecker = (address: string) =>\n address === nativeTokenAddress || address === nativeETHAddress;\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","/* eslint-disable @typescript-eslint/no-namespace */\nimport { 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/auto_convert_threshold\n export interface ConvertThreshold {\n ltv_threshold: number;\n negative_usdc_threshold: number;\n }\n\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?: string;\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 client_order_id?: 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 account_id?: string;\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 fundingFee?: 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 address?: string;\n symbol?: string;\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 vault_address: string;\n\n cross_chain_router: string;\n depositor: string;\n }\n\n export interface TokenInfo {\n address?: string;\n base_weight: number;\n decimals?: number;\n /** token decimals */\n token_decimal?: number;\n discount_factor?: number | null;\n display_name?: string;\n haircut: number;\n is_collateral: boolean;\n symbol?: string;\n user_max_qty: number;\n precision?: number;\n minimum_withdraw_amount: number;\n swap_enable?: boolean;\n }\n\n export interface Chain {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n base_weight: number;\n discount_factor?: number | null;\n haircut: number;\n user_max_qty: number;\n is_collateral: boolean;\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 cross_chain_withdrawal_fee: number;\n display_name: string;\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 TransferHistoryRow {\n amount: number;\n created_time: number;\n from_account_id: string;\n id: string;\n status: \"CREATED\" | \"PENDING\" | \"COMPLETED\" | \"FAILED\";\n to_account_id: string;\n token: string;\n updated_time: number;\n }\n\n export interface TransferHistory {\n meta: RecordsMeta;\n rows: TransferHistoryRow[];\n }\n\n export interface TransferHistoryRow {\n amount: number;\n created_time: number;\n from_account_id: string;\n id: string;\n status: \"CREATED\" | \"PENDING\" | \"COMPLETED\" | \"FAILED\";\n to_account_id: string;\n token: string;\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 export interface VaultBalance {\n chain_id: string;\n token: string;\n balance: number;\n pending_rebalance: number;\n }\n\n export interface RestrictedAreas {\n invalid_web_country: string;\n invalid_web_city: string;\n }\n\n export interface IpInfo {\n ip: string;\n city: string;\n region: string;\n checked: boolean;\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 open_interest?: number;\n index_price?: 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 pending_rebalance: 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 * Scaled order\n */\n SCALED = \"SCALED\",\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 /** custom order id, it is used to identify the order from ws */\n client_order_id: string;\n}\n\n/** Scaled order fields */\nexport interface ScaledOrder {\n /** upper price */\n max_price?: string;\n /** lower price */\n min_price?: string;\n /** total orders */\n total_orders?: number;\n /** quantity distribution type */\n distribution_type?: DistributionType;\n /** the ratio between upper and lower price. */\n skew?: number;\n}\n\nexport interface RegularOrder extends BaseOrder, OrderExt, ScaledOrder {\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\nexport interface OrderEntity extends ScaledOrder {\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 slippage?: number;\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 enum DistributionType {\n // enum value need to use lowercase to match the track params\n FLAT = \"flat\",\n ASCENDING = \"ascending\",\n DESCENDING = \"descending\",\n CUSTOM = \"custom\",\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 DistributionType,\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,kBAAK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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;;;ACKF,YAAY,iBAAiB;;;ACzCtB,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","DistributionType","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.5.2\";\n};\n\nexport default \"2.5.2\";\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 BSC_TESTNET_CHAINID = 97;\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 nativeETHAddress = \"0x0000000000000000000000000000000000000000\";\n\nexport const isNativeTokenChecker = (address: string) =>\n address === nativeTokenAddress || address === nativeETHAddress;\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","/* eslint-disable @typescript-eslint/no-namespace */\nimport { 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/auto_convert_threshold\n export interface ConvertThreshold {\n ltv_threshold: number;\n negative_usdc_threshold: number;\n }\n\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?: string;\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 client_order_id?: 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 FundingDetails {\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 liquidation_tier: number;\n cap_ir: number;\n floor_ir: number;\n mark_index_price_deviation_floor: number;\n mark_index_price_deviation_cap: number;\n global_max_oi_cap: number;\n base_mmr: number;\n base_imr: number;\n imr_factor: number;\n deviation_factor: 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 account_id?: string;\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 fundingFee?: 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 address?: string;\n symbol?: string;\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 vault_address: string;\n\n cross_chain_router: string;\n depositor: string;\n }\n\n export interface TokenInfo {\n address?: string;\n base_weight: number;\n decimals?: number;\n /** token decimals */\n token_decimal?: number;\n discount_factor?: number | null;\n display_name?: string;\n haircut: number;\n is_collateral: boolean;\n symbol?: string;\n user_max_qty: number;\n precision?: number;\n minimum_withdraw_amount: number;\n swap_enable?: boolean;\n }\n\n export interface Chain {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n base_weight: number;\n discount_factor?: number | null;\n haircut: number;\n user_max_qty: number;\n is_collateral: boolean;\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 cross_chain_withdrawal_fee: number;\n display_name: string;\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 TransferHistoryRow {\n amount: number;\n created_time: number;\n from_account_id: string;\n id: string;\n status: \"CREATED\" | \"PENDING\" | \"COMPLETED\" | \"FAILED\";\n to_account_id: string;\n token: string;\n updated_time: number;\n }\n\n export interface TransferHistory {\n meta: RecordsMeta;\n rows: TransferHistoryRow[];\n }\n\n export interface TransferHistoryRow {\n amount: number;\n created_time: number;\n from_account_id: string;\n id: string;\n status: \"CREATED\" | \"PENDING\" | \"COMPLETED\" | \"FAILED\";\n to_account_id: string;\n token: string;\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 export interface VaultBalance {\n chain_id: string;\n token: string;\n balance: number;\n pending_rebalance: number;\n }\n\n export interface RestrictedAreas {\n invalid_web_country: string;\n invalid_web_city: string;\n }\n\n export interface IpInfo {\n ip: string;\n city: string;\n region: string;\n checked: boolean;\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 open_interest?: number;\n index_price?: 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 pending_rebalance: 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 * Scaled order\n */\n SCALED = \"SCALED\",\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 /** custom order id, it is used to identify the order from ws */\n client_order_id: string;\n}\n\n/** Scaled order fields */\nexport interface ScaledOrder {\n /** upper price */\n max_price?: string;\n /** lower price */\n min_price?: string;\n /** total orders */\n total_orders?: number;\n /** quantity distribution type */\n distribution_type?: DistributionType;\n /** the ratio between upper and lower price. */\n skew?: number;\n}\n\nexport interface RegularOrder extends BaseOrder, OrderExt, ScaledOrder {\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\nexport interface OrderEntity extends ScaledOrder {\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 slippage?: number;\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 enum DistributionType {\n // enum value need to use lowercase to match the track params\n FLAT = \"flat\",\n ASCENDING = \"ascending\",\n DESCENDING = \"descending\",\n CUSTOM = \"custom\",\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\";\nexport const TradingviewFullscreenKey = \"orderly:tradingview-fullscreen\";\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 DistributionType,\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,EAAAA,sCAAA,aAAU,KAAV;AACA,EAAAA,sCAAA,iBAAc,KAAd;AACA,EAAAA,sCAAA,eAAY,KAAZ;AAHU,SAAAA;AAAA,GAAA;AAYL,IAAM,2BAA2B;AACjC,IAAM,yBAAyB;AAC/B,IAAM,yBAAy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,aAAa,MAAM,SAAS;AAAA,EACtC;AACF;;;ACKF,YAAY,iBAAiB;;;ACzCtB,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","DistributionType","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.5.1",
3
+ "version": "2.5.2",
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.8.1"
21
+ "tsconfig": "0.8.2"
22
22
  },
23
23
  "publishConfig": {
24
24
  "access": "public"