@orderly.network/hooks 1.5.13 → 2.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1371 -0
- package/dist/index.d.ts +1371 -0
- package/dist/index.js +12063 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +11937 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +33 -16
- package/esm/configProvider.d.ts +0 -24
- package/esm/configProvider.d.ts.map +0 -1
- package/esm/configProvider.js +0 -82
- package/esm/configProvider.js.map +0 -1
- package/esm/dataProvider.d.ts +0 -11
- package/esm/dataProvider.d.ts.map +0 -1
- package/esm/dataProvider.js +0 -37
- package/esm/dataProvider.js.map +0 -1
- package/esm/dev/proxyConfigStore.d.ts +0 -15
- package/esm/dev/proxyConfigStore.d.ts.map +0 -1
- package/esm/dev/proxyConfigStore.js +0 -41
- package/esm/dev/proxyConfigStore.js.map +0 -1
- package/esm/index.d.ts +0 -38
- package/esm/index.d.ts.map +0 -1
- package/esm/index.js +0 -37
- package/esm/index.js.map +0 -1
- package/esm/middleware/signatureMiddleware.d.ts +0 -3
- package/esm/middleware/signatureMiddleware.d.ts.map +0 -1
- package/esm/middleware/signatureMiddleware.js +0 -34
- package/esm/middleware/signatureMiddleware.js.map +0 -1
- package/esm/orderly/orderbook.service.d.ts +0 -33
- package/esm/orderly/orderbook.service.d.ts.map +0 -1
- package/esm/orderly/orderbook.service.js +0 -129
- package/esm/orderly/orderbook.service.js.map +0 -1
- package/esm/orderly/orderlyHooks.d.ts +0 -36
- package/esm/orderly/orderlyHooks.d.ts.map +0 -1
- package/esm/orderly/orderlyHooks.js +0 -32
- package/esm/orderly/orderlyHooks.js.map +0 -1
- package/esm/orderly/useAccountInfo.d.ts +0 -3
- package/esm/orderly/useAccountInfo.d.ts.map +0 -1
- package/esm/orderly/useAccountInfo.js +0 -6
- package/esm/orderly/useAccountInfo.js.map +0 -1
- package/esm/orderly/useChain.d.ts +0 -6
- package/esm/orderly/useChain.d.ts.map +0 -1
- package/esm/orderly/useChain.js +0 -29
- package/esm/orderly/useChain.js.map +0 -1
- package/esm/orderly/useChains.d.ts +0 -33
- package/esm/orderly/useChains.d.ts.map +0 -1
- package/esm/orderly/useChains.js +0 -183
- package/esm/orderly/useChains.js.map +0 -1
- package/esm/orderly/useCollateral.d.ts +0 -15
- package/esm/orderly/useCollateral.d.ts.map +0 -1
- package/esm/orderly/useCollateral.js +0 -104
- package/esm/orderly/useCollateral.js.map +0 -1
- package/esm/orderly/useDeposit.d.ts +0 -38
- package/esm/orderly/useDeposit.d.ts.map +0 -1
- package/esm/orderly/useDeposit.js +0 -268
- package/esm/orderly/useDeposit.js.map +0 -1
- package/esm/orderly/useFundingRate.d.ts +0 -11
- package/esm/orderly/useFundingRate.d.ts.map +0 -1
- package/esm/orderly/useFundingRate.js +0 -41
- package/esm/orderly/useFundingRate.js.map +0 -1
- package/esm/orderly/useFundingRates.d.ts +0 -7
- package/esm/orderly/useFundingRates.d.ts.map +0 -1
- package/esm/orderly/useFundingRates.js +0 -22
- package/esm/orderly/useFundingRates.js.map +0 -1
- package/esm/orderly/useHoldingStream.d.ts +0 -7
- package/esm/orderly/useHoldingStream.d.ts.map +0 -1
- package/esm/orderly/useHoldingStream.js +0 -51
- package/esm/orderly/useHoldingStream.js.map +0 -1
- package/esm/orderly/useIndexPrice.d.ts +0 -2
- package/esm/orderly/useIndexPrice.d.ts.map +0 -1
- package/esm/orderly/useIndexPrice.js +0 -19
- package/esm/orderly/useIndexPrice.js.map +0 -1
- package/esm/orderly/useLeverage.d.ts +0 -2
- package/esm/orderly/useLeverage.d.ts.map +0 -1
- package/esm/orderly/useLeverage.js +0 -31
- package/esm/orderly/useLeverage.js.map +0 -1
- package/esm/orderly/useMaintenanceStatus.d.ts +0 -7
- package/esm/orderly/useMaintenanceStatus.d.ts.map +0 -1
- package/esm/orderly/useMaintenanceStatus.js +0 -61
- package/esm/orderly/useMaintenanceStatus.js.map +0 -1
- package/esm/orderly/useMarginRatio.d.ts +0 -7
- package/esm/orderly/useMarginRatio.d.ts.map +0 -1
- package/esm/orderly/useMarginRatio.js +0 -55
- package/esm/orderly/useMarginRatio.js.map +0 -1
- package/esm/orderly/useMarkPrice.d.ts +0 -4
- package/esm/orderly/useMarkPrice.d.ts.map +0 -1
- package/esm/orderly/useMarkPrice.js +0 -35
- package/esm/orderly/useMarkPrice.js.map +0 -1
- package/esm/orderly/useMarkPricesStream.d.ts +0 -2
- package/esm/orderly/useMarkPricesStream.d.ts.map +0 -1
- package/esm/orderly/useMarkPricesStream.js +0 -27
- package/esm/orderly/useMarkPricesStream.js.map +0 -1
- package/esm/orderly/useMarketTradeStream.d.ts +0 -9
- package/esm/orderly/useMarketTradeStream.d.ts.map +0 -1
- package/esm/orderly/useMarketTradeStream.js +0 -66
- package/esm/orderly/useMarketTradeStream.js.map +0 -1
- package/esm/orderly/useMarkets.d.ts +0 -36
- package/esm/orderly/useMarkets.d.ts.map +0 -1
- package/esm/orderly/useMarkets.js +0 -331
- package/esm/orderly/useMarkets.js.map +0 -1
- package/esm/orderly/useMarketsStream.d.ts +0 -5
- package/esm/orderly/useMarketsStream.d.ts.map +0 -1
- package/esm/orderly/useMarketsStream.js +0 -53
- package/esm/orderly/useMarketsStream.js.map +0 -1
- package/esm/orderly/useMaxQty.d.ts +0 -9
- package/esm/orderly/useMaxQty.d.ts.map +0 -1
- package/esm/orderly/useMaxQty.js +0 -109
- package/esm/orderly/useMaxQty.js.map +0 -1
- package/esm/orderly/useOpenInterest.d.ts +0 -2
- package/esm/orderly/useOpenInterest.d.ts.map +0 -1
- package/esm/orderly/useOpenInterest.js +0 -17
- package/esm/orderly/useOpenInterest.js.map +0 -1
- package/esm/orderly/useOrderEntry.d.ts +0 -63
- package/esm/orderly/useOrderEntry.d.ts.map +0 -1
- package/esm/orderly/useOrderEntry.js +0 -544
- package/esm/orderly/useOrderEntry.js.map +0 -1
- package/esm/orderly/useOrderEntryNext/index.d.ts +0 -1
- package/esm/orderly/useOrderEntryNext/index.d.ts.map +0 -1
- package/esm/orderly/useOrderEntryNext/index.js +0 -2
- package/esm/orderly/useOrderEntryNext/index.js.map +0 -1
- package/esm/orderly/useOrderStream/useOrderStream.d.ts +0 -55
- package/esm/orderly/useOrderStream/useOrderStream.d.ts.map +0 -1
- package/esm/orderly/useOrderStream/useOrderStream.js +0 -278
- package/esm/orderly/useOrderStream/useOrderStream.js.map +0 -1
- package/esm/orderly/useOrderbookStream.d.ts +0 -52
- package/esm/orderly/useOrderbookStream.d.ts.map +0 -1
- package/esm/orderly/useOrderbookStream.js +0 -367
- package/esm/orderly/useOrderbookStream.js.map +0 -1
- package/esm/orderly/usePositionStream/usePositionStream.d.ts +0 -42
- package/esm/orderly/usePositionStream/usePositionStream.d.ts.map +0 -1
- package/esm/orderly/usePositionStream/usePositionStream.js +0 -269
- package/esm/orderly/usePositionStream/usePositionStream.js.map +0 -1
- package/esm/orderly/usePositionStream/utils.d.ts +0 -8
- package/esm/orderly/usePositionStream/utils.d.ts.map +0 -1
- package/esm/orderly/usePositionStream/utils.js +0 -34
- package/esm/orderly/usePositionStream/utils.js.map +0 -1
- package/esm/orderly/usePrivateDataObserver.d.ts +0 -5
- package/esm/orderly/usePrivateDataObserver.d.ts.map +0 -1
- package/esm/orderly/usePrivateDataObserver.js +0 -130
- package/esm/orderly/usePrivateDataObserver.js.map +0 -1
- package/esm/orderly/useSettleSubscription.d.ts +0 -4
- package/esm/orderly/useSettleSubscription.d.ts.map +0 -1
- package/esm/orderly/useSettleSubscription.js +0 -22
- package/esm/orderly/useSettleSubscription.js.map +0 -1
- package/esm/orderly/useSymbolLeverage.d.ts +0 -2
- package/esm/orderly/useSymbolLeverage.d.ts.map +0 -1
- package/esm/orderly/useSymbolLeverage.js +0 -31
- package/esm/orderly/useSymbolLeverage.js.map +0 -1
- package/esm/orderly/useSymbolPriceRange.d.ts +0 -13
- package/esm/orderly/useSymbolPriceRange.d.ts.map +0 -1
- package/esm/orderly/useSymbolPriceRange.js +0 -45
- package/esm/orderly/useSymbolPriceRange.js.map +0 -1
- package/esm/orderly/useSymbolsInfo.d.ts +0 -7
- package/esm/orderly/useSymbolsInfo.d.ts.map +0 -1
- package/esm/orderly/useSymbolsInfo.js +0 -35
- package/esm/orderly/useSymbolsInfo.js.map +0 -1
- package/esm/orderly/useTakeProfitAndStopLoss/__test__/useTakeProfitAndStopLoss.test.d.ts +0 -1
- package/esm/orderly/useTakeProfitAndStopLoss/__test__/useTakeProfitAndStopLoss.test.d.ts.map +0 -1
- package/esm/orderly/useTakeProfitAndStopLoss/__test__/utils.test.d.ts +0 -2
- package/esm/orderly/useTakeProfitAndStopLoss/__test__/utils.test.d.ts.map +0 -1
- package/esm/orderly/useTakeProfitAndStopLoss/index.d.ts +0 -30
- package/esm/orderly/useTakeProfitAndStopLoss/index.d.ts.map +0 -1
- package/esm/orderly/useTakeProfitAndStopLoss/index.js +0 -23
- package/esm/orderly/useTakeProfitAndStopLoss/index.js.map +0 -1
- package/esm/orderly/useTakeProfitAndStopLoss/useTPSL.d.ts +0 -57
- package/esm/orderly/useTakeProfitAndStopLoss/useTPSL.d.ts.map +0 -1
- package/esm/orderly/useTakeProfitAndStopLoss/useTPSL.js +0 -211
- package/esm/orderly/useTakeProfitAndStopLoss/useTPSL.js.map +0 -1
- package/esm/orderly/useTakeProfitAndStopLoss/utils.d.ts +0 -70
- package/esm/orderly/useTakeProfitAndStopLoss/utils.d.ts.map +0 -1
- package/esm/orderly/useTakeProfitAndStopLoss/utils.js +0 -239
- package/esm/orderly/useTakeProfitAndStopLoss/utils.js.map +0 -1
- package/esm/orderly/useTickerStream.d.ts +0 -7
- package/esm/orderly/useTickerStream.d.ts.map +0 -1
- package/esm/orderly/useTickerStream.js +0 -83
- package/esm/orderly/useTickerStream.js.map +0 -1
- package/esm/orderly/useWalletSubscription.d.ts +0 -4
- package/esm/orderly/useWalletSubscription.d.ts.map +0 -1
- package/esm/orderly/useWalletSubscription.js +0 -22
- package/esm/orderly/useWalletSubscription.js.map +0 -1
- package/esm/orderly/useWithdraw.d.ts +0 -24
- package/esm/orderly/useWithdraw.d.ts.map +0 -1
- package/esm/orderly/useWithdraw.js +0 -111
- package/esm/orderly/useWithdraw.js.map +0 -1
- package/esm/orderlyContext.d.ts +0 -24
- package/esm/orderlyContext.d.ts.map +0 -1
- package/esm/orderlyContext.js +0 -6
- package/esm/orderlyContext.js.map +0 -1
- package/esm/referral/api.d.ts +0 -87
- package/esm/referral/api.d.ts.map +0 -1
- package/esm/referral/api.js +0 -3
- package/esm/referral/api.js.map +0 -1
- package/esm/referral/format.d.ts +0 -2
- package/esm/referral/format.d.ts.map +0 -1
- package/esm/referral/format.js +0 -8
- package/esm/referral/format.js.map +0 -1
- package/esm/referral/index.d.ts +0 -12
- package/esm/referral/index.d.ts.map +0 -1
- package/esm/referral/index.js +0 -13
- package/esm/referral/index.js.map +0 -1
- package/esm/referral/swr.d.ts +0 -7
- package/esm/referral/swr.d.ts.map +0 -1
- package/esm/referral/swr.js +0 -24
- package/esm/referral/swr.js.map +0 -1
- package/esm/referral/useCheckReferralCode.d.ts +0 -6
- package/esm/referral/useCheckReferralCode.d.ts.map +0 -1
- package/esm/referral/useCheckReferralCode.js +0 -18
- package/esm/referral/useCheckReferralCode.js.map +0 -1
- package/esm/referral/useCommission.d.ts +0 -4
- package/esm/referral/useCommission.d.ts.map +0 -1
- package/esm/referral/useCommission.js +0 -59
- package/esm/referral/useCommission.js.map +0 -1
- package/esm/referral/useDaily.d.ts +0 -9
- package/esm/referral/useDaily.d.ts.map +0 -1
- package/esm/referral/useDaily.js +0 -20
- package/esm/referral/useDaily.js.map +0 -1
- package/esm/referral/useDistribution.d.ts +0 -9
- package/esm/referral/useDistribution.d.ts.map +0 -1
- package/esm/referral/useDistribution.js +0 -53
- package/esm/referral/useDistribution.js.map +0 -1
- package/esm/referral/useGetReferralCode.d.ts +0 -6
- package/esm/referral/useGetReferralCode.d.ts.map +0 -1
- package/esm/referral/useGetReferralCode.js +0 -18
- package/esm/referral/useGetReferralCode.js.map +0 -1
- package/esm/referral/useRefereeHistory.d.ts +0 -9
- package/esm/referral/useRefereeHistory.d.ts.map +0 -1
- package/esm/referral/useRefereeHistory.js +0 -47
- package/esm/referral/useRefereeHistory.js.map +0 -1
- package/esm/referral/useRefereeInfo.d.ts +0 -9
- package/esm/referral/useRefereeInfo.d.ts.map +0 -1
- package/esm/referral/useRefereeInfo.js +0 -47
- package/esm/referral/useRefereeInfo.js.map +0 -1
- package/esm/referral/useRefereeRebateSummary.d.ts +0 -12
- package/esm/referral/useRefereeRebateSummary.d.ts.map +0 -1
- package/esm/referral/useRefereeRebateSummary.js +0 -31
- package/esm/referral/useRefereeRebateSummary.js.map +0 -1
- package/esm/referral/useReferralInfo.d.ts +0 -10
- package/esm/referral/useReferralInfo.d.ts.map +0 -1
- package/esm/referral/useReferralInfo.js +0 -56
- package/esm/referral/useReferralInfo.js.map +0 -1
- package/esm/referral/useReferralRebateSummary.d.ts +0 -9
- package/esm/referral/useReferralRebateSummary.d.ts.map +0 -1
- package/esm/referral/useReferralRebateSummary.js +0 -47
- package/esm/referral/useReferralRebateSummary.js.map +0 -1
- package/esm/services/dataCenter.d.ts +0 -2
- package/esm/services/dataCenter.d.ts.map +0 -1
- package/esm/services/dataCenter.js +0 -15
- package/esm/services/dataCenter.js.map +0 -1
- package/esm/services/orderCreator/__test__/limitOrderCreator.test.d.ts +0 -2
- package/esm/services/orderCreator/__test__/limitOrderCreator.test.d.ts.map +0 -1
- package/esm/services/orderCreator/__test__/orderCreator.test.d.ts +0 -2
- package/esm/services/orderCreator/__test__/orderCreator.test.d.ts.map +0 -1
- package/esm/services/orderCreator/__test__/stopLimitOrderCreator.test.d.ts +0 -2
- package/esm/services/orderCreator/__test__/stopLimitOrderCreator.test.d.ts.map +0 -1
- package/esm/services/orderCreator/__test__/stopMarketOrderCreator.test.d.ts +0 -2
- package/esm/services/orderCreator/__test__/stopMarketOrderCreator.test.d.ts.map +0 -1
- package/esm/services/orderCreator/__test__/tpslOrderCreator.test.d.ts +0 -2
- package/esm/services/orderCreator/__test__/tpslOrderCreator.test.d.ts.map +0 -1
- package/esm/services/orderCreator/__test__/tpslPositionOrderCreator.test.d.ts +0 -2
- package/esm/services/orderCreator/__test__/tpslPositionOrderCreator.test.d.ts.map +0 -1
- package/esm/services/orderCreator/baseAlgoCreator.d.ts +0 -22
- package/esm/services/orderCreator/baseAlgoCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/baseAlgoCreator.js +0 -57
- package/esm/services/orderCreator/baseAlgoCreator.js.map +0 -1
- package/esm/services/orderCreator/baseCreator.d.ts +0 -14
- package/esm/services/orderCreator/baseCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/baseCreator.js +0 -98
- package/esm/services/orderCreator/baseCreator.js.map +0 -1
- package/esm/services/orderCreator/factory.d.ts +0 -7
- package/esm/services/orderCreator/factory.d.ts.map +0 -1
- package/esm/services/orderCreator/factory.js +0 -45
- package/esm/services/orderCreator/factory.js.map +0 -1
- package/esm/services/orderCreator/fokCreator.d.ts +0 -4
- package/esm/services/orderCreator/fokCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/fokCreator.js +0 -5
- package/esm/services/orderCreator/fokCreator.js.map +0 -1
- package/esm/services/orderCreator/generalCreator.d.ts +0 -8
- package/esm/services/orderCreator/generalCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/generalCreator.js +0 -15
- package/esm/services/orderCreator/generalCreator.js.map +0 -1
- package/esm/services/orderCreator/interface.d.ts +0 -23
- package/esm/services/orderCreator/interface.d.ts.map +0 -1
- package/esm/services/orderCreator/interface.js +0 -3
- package/esm/services/orderCreator/interface.js.map +0 -1
- package/esm/services/orderCreator/iocCreator.d.ts +0 -4
- package/esm/services/orderCreator/iocCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/iocCreator.js +0 -5
- package/esm/services/orderCreator/iocCreator.js.map +0 -1
- package/esm/services/orderCreator/limitOrderCreator.d.ts +0 -8
- package/esm/services/orderCreator/limitOrderCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/limitOrderCreator.js +0 -69
- package/esm/services/orderCreator/limitOrderCreator.js.map +0 -1
- package/esm/services/orderCreator/marketOrderCreator.d.ts +0 -24
- package/esm/services/orderCreator/marketOrderCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/marketOrderCreator.js +0 -18
- package/esm/services/orderCreator/marketOrderCreator.js.map +0 -1
- package/esm/services/orderCreator/postOnlyCreator.d.ts +0 -4
- package/esm/services/orderCreator/postOnlyCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/postOnlyCreator.js +0 -5
- package/esm/services/orderCreator/postOnlyCreator.js.map +0 -1
- package/esm/services/orderCreator/stopLimitOrderCreator.d.ts +0 -11
- package/esm/services/orderCreator/stopLimitOrderCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/stopLimitOrderCreator.js +0 -84
- package/esm/services/orderCreator/stopLimitOrderCreator.js.map +0 -1
- package/esm/services/orderCreator/stopMarketOrderCreator.d.ts +0 -30
- package/esm/services/orderCreator/stopMarketOrderCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/stopMarketOrderCreator.js +0 -46
- package/esm/services/orderCreator/stopMarketOrderCreator.js.map +0 -1
- package/esm/services/orderCreator/tpslOrderCreator.d.ts +0 -32
- package/esm/services/orderCreator/tpslOrderCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/tpslOrderCreator.js +0 -88
- package/esm/services/orderCreator/tpslOrderCreator.js.map +0 -1
- package/esm/services/orderCreator/tpslPositionOrderCreator.d.ts +0 -33
- package/esm/services/orderCreator/tpslPositionOrderCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/tpslPositionOrderCreator.js +0 -74
- package/esm/services/orderCreator/tpslPositionOrderCreator.js.map +0 -1
- package/esm/services/orderMerge/algoOrderMergeHandler.d.ts +0 -10
- package/esm/services/orderMerge/algoOrderMergeHandler.d.ts.map +0 -1
- package/esm/services/orderMerge/algoOrderMergeHandler.js +0 -46
- package/esm/services/orderMerge/algoOrderMergeHandler.js.map +0 -1
- package/esm/services/orderMerge/baseMergeHandler.d.ts +0 -23
- package/esm/services/orderMerge/baseMergeHandler.d.ts.map +0 -1
- package/esm/services/orderMerge/baseMergeHandler.js +0 -160
- package/esm/services/orderMerge/baseMergeHandler.js.map +0 -1
- package/esm/services/orderMerge/interface.d.ts +0 -8
- package/esm/services/orderMerge/interface.d.ts.map +0 -1
- package/esm/services/orderMerge/interface.js +0 -3
- package/esm/services/orderMerge/interface.js.map +0 -1
- package/esm/services/orderMerge/regularOrderMergeHandler.d.ts +0 -9
- package/esm/services/orderMerge/regularOrderMergeHandler.d.ts.map +0 -1
- package/esm/services/orderMerge/regularOrderMergeHandler.js +0 -18
- package/esm/services/orderMerge/regularOrderMergeHandler.js.map +0 -1
- package/esm/services/painter/backgroundPaint.d.ts +0 -9
- package/esm/services/painter/backgroundPaint.d.ts.map +0 -1
- package/esm/services/painter/backgroundPaint.js +0 -38
- package/esm/services/painter/backgroundPaint.js.map +0 -1
- package/esm/services/painter/basePaint.d.ts +0 -104
- package/esm/services/painter/basePaint.d.ts.map +0 -1
- package/esm/services/painter/basePaint.js +0 -10
- package/esm/services/painter/basePaint.js.map +0 -1
- package/esm/services/painter/dataPaint.d.ts +0 -20
- package/esm/services/painter/dataPaint.d.ts.map +0 -1
- package/esm/services/painter/dataPaint.js +0 -315
- package/esm/services/painter/dataPaint.js.map +0 -1
- package/esm/services/painter/layout.config.d.ts +0 -3
- package/esm/services/painter/layout.config.d.ts.map +0 -1
- package/esm/services/painter/layout.config.js +0 -59
- package/esm/services/painter/layout.config.js.map +0 -1
- package/esm/services/painter/painter.d.ts +0 -14
- package/esm/services/painter/painter.d.ts.map +0 -1
- package/esm/services/painter/painter.js +0 -48
- package/esm/services/painter/painter.js.map +0 -1
- package/esm/services/painter/qrPaint.d.ts +0 -8
- package/esm/services/painter/qrPaint.d.ts.map +0 -1
- package/esm/services/painter/qrPaint.js +0 -39
- package/esm/services/painter/qrPaint.js.map +0 -1
- package/esm/services/painter/resource.d.ts +0 -7
- package/esm/services/painter/resource.d.ts.map +0 -1
- package/esm/services/painter/resource.js +0 -17
- package/esm/services/painter/resource.js.map +0 -1
- package/esm/statusProvider.d.ts +0 -8
- package/esm/statusProvider.d.ts.map +0 -1
- package/esm/statusProvider.js +0 -15
- package/esm/statusProvider.js.map +0 -1
- package/esm/unuse/apiPrefixMiddleware.d.ts +0 -3
- package/esm/unuse/apiPrefixMiddleware.d.ts.map +0 -1
- package/esm/unuse/apiPrefixMiddleware.js +0 -29
- package/esm/unuse/apiPrefixMiddleware.js.map +0 -1
- package/esm/unuse/fn.d.ts +0 -2
- package/esm/unuse/fn.d.ts.map +0 -1
- package/esm/unuse/fn.js +0 -8
- package/esm/unuse/fn.js.map +0 -1
- package/esm/unuse/useBalance.d.ts +0 -2
- package/esm/unuse/useBalance.d.ts.map +0 -1
- package/esm/unuse/useBalance.js +0 -14
- package/esm/unuse/useBalance.js.map +0 -1
- package/esm/unuse/useFetures.d.ts +0 -11
- package/esm/unuse/useFetures.d.ts.map +0 -1
- package/esm/unuse/useFetures.js +0 -47
- package/esm/unuse/useFetures.js.map +0 -1
- package/esm/unuse/useRunOnce.d.ts +0 -7
- package/esm/unuse/useRunOnce.d.ts.map +0 -1
- package/esm/unuse/useRunOnce.js +0 -20
- package/esm/unuse/useRunOnce.js.map +0 -1
- package/esm/unuse/useSyncEnd.d.ts +0 -2
- package/esm/unuse/useSyncEnd.d.ts.map +0 -1
- package/esm/unuse/useSyncEnd.js +0 -11
- package/esm/unuse/useSyncEnd.js.map +0 -1
- package/esm/unuse/useTokenInfo.d.ts +0 -7
- package/esm/unuse/useTokenInfo.d.ts.map +0 -1
- package/esm/unuse/useTokenInfo.js +0 -22
- package/esm/unuse/useTokenInfo.js.map +0 -1
- package/esm/unuse/useUnsettlementPnL.d.ts +0 -2
- package/esm/unuse/useUnsettlementPnL.d.ts.map +0 -1
- package/esm/unuse/useUnsettlementPnL.js +0 -24
- package/esm/unuse/useUnsettlementPnL.js.map +0 -1
- package/esm/useAccount.d.ts +0 -8
- package/esm/useAccount.d.ts.map +0 -1
- package/esm/useAccount.js +0 -56
- package/esm/useAccount.js.map +0 -1
- package/esm/useAccountInstance.d.ts +0 -3
- package/esm/useAccountInstance.d.ts.map +0 -1
- package/esm/useAccountInstance.js +0 -22
- package/esm/useAccountInstance.js.map +0 -1
- package/esm/useBoolean.d.ts +0 -6
- package/esm/useBoolean.d.ts.map +0 -1
- package/esm/useBoolean.js +0 -17
- package/esm/useBoolean.js.map +0 -1
- package/esm/useConfig.d.ts +0 -4
- package/esm/useConfig.d.ts.map +0 -1
- package/esm/useConfig.js +0 -14
- package/esm/useConfig.js.map +0 -1
- package/esm/useEventEmitter.d.ts +0 -3
- package/esm/useEventEmitter.d.ts.map +0 -1
- package/esm/useEventEmitter.js +0 -14
- package/esm/useEventEmitter.js.map +0 -1
- package/esm/useLazyQuery.d.ts +0 -13
- package/esm/useLazyQuery.d.ts.map +0 -1
- package/esm/useLazyQuery.js +0 -34
- package/esm/useLazyQuery.js.map +0 -1
- package/esm/useLocalStorage.d.ts +0 -2
- package/esm/useLocalStorage.d.ts.map +0 -1
- package/esm/useLocalStorage.js +0 -82
- package/esm/useLocalStorage.js.map +0 -1
- package/esm/useMediaQuery.d.ts +0 -2
- package/esm/useMediaQuery.d.ts.map +0 -1
- package/esm/useMediaQuery.js +0 -38
- package/esm/useMediaQuery.js.map +0 -1
- package/esm/useMutation.d.ts +0 -13
- package/esm/useMutation.d.ts.map +0 -1
- package/esm/useMutation.js +0 -81
- package/esm/useMutation.js.map +0 -1
- package/esm/useObserve.d.ts +0 -6
- package/esm/useObserve.d.ts.map +0 -1
- package/esm/useObserve.js +0 -8
- package/esm/useObserve.js.map +0 -1
- package/esm/useParamsCheck.d.ts +0 -4
- package/esm/useParamsCheck.d.ts.map +0 -1
- package/esm/useParamsCheck.js +0 -12
- package/esm/useParamsCheck.js.map +0 -1
- package/esm/usePoster.d.ts +0 -44
- package/esm/usePoster.d.ts.map +0 -1
- package/esm/usePoster.js +0 -140
- package/esm/usePoster.js.map +0 -1
- package/esm/usePreloadData.d.ts +0 -5
- package/esm/usePreloadData.d.ts.map +0 -1
- package/esm/usePreloadData.js +0 -38
- package/esm/usePreloadData.js.map +0 -1
- package/esm/usePrivateInfiniteQuery.d.ts +0 -5
- package/esm/usePrivateInfiniteQuery.d.ts.map +0 -1
- package/esm/usePrivateInfiniteQuery.js +0 -31
- package/esm/usePrivateInfiniteQuery.js.map +0 -1
- package/esm/usePrivateQuery.d.ts +0 -10
- package/esm/usePrivateQuery.d.ts.map +0 -1
- package/esm/usePrivateQuery.js +0 -33
- package/esm/usePrivateQuery.js.map +0 -1
- package/esm/useQuery.d.ts +0 -10
- package/esm/useQuery.d.ts.map +0 -1
- package/esm/useQuery.js +0 -21
- package/esm/useQuery.js.map +0 -1
- package/esm/useSessionStorage.d.ts +0 -2
- package/esm/useSessionStorage.d.ts.map +0 -1
- package/esm/useSessionStorage.js +0 -69
- package/esm/useSessionStorage.js.map +0 -1
- package/esm/useWS.d.ts +0 -3
- package/esm/useWS.d.ts.map +0 -1
- package/esm/useWS.js +0 -54
- package/esm/useWS.js.map +0 -1
- package/esm/useWsStatus.d.ts +0 -7
- package/esm/useWsStatus.d.ts.map +0 -1
- package/esm/useWsStatus.js +0 -41
- package/esm/useWsStatus.js.map +0 -1
- package/esm/utils/createGetter.d.ts +0 -11
- package/esm/utils/createGetter.d.ts.map +0 -1
- package/esm/utils/createGetter.js +0 -26
- package/esm/utils/createGetter.js.map +0 -1
- package/esm/utils/createOrder.d.ts +0 -2
- package/esm/utils/createOrder.d.ts.map +0 -1
- package/esm/utils/createOrder.js +0 -16
- package/esm/utils/createOrder.js.map +0 -1
- package/esm/utils/dev.d.ts +0 -2
- package/esm/utils/dev.d.ts.map +0 -1
- package/esm/utils/dev.js +0 -21
- package/esm/utils/dev.js.map +0 -1
- package/esm/utils/fetcher.d.ts +0 -6
- package/esm/utils/fetcher.d.ts.map +0 -1
- package/esm/utils/fetcher.js +0 -4
- package/esm/utils/fetcher.js.map +0 -1
- package/esm/utils/fokCreator.d.ts +0 -1
- package/esm/utils/fokCreator.d.ts.map +0 -1
- package/esm/utils/fokCreator.js +0 -2
- package/esm/utils/fokCreator.js.map +0 -1
- package/esm/utils/index.d.ts +0 -6
- package/esm/utils/index.d.ts.map +0 -1
- package/esm/utils/index.js +0 -7
- package/esm/utils/index.js.map +0 -1
- package/esm/utils/json.d.ts +0 -2
- package/esm/utils/json.d.ts.map +0 -1
- package/esm/utils/json.js +0 -9
- package/esm/utils/json.js.map +0 -1
- package/esm/utils/order.d.ts +0 -2
- package/esm/utils/order.d.ts.map +0 -1
- package/esm/utils/order.js +0 -3
- package/esm/utils/order.js.map +0 -1
- package/esm/utils/orderEntryHelper.d.ts +0 -26
- package/esm/utils/orderEntryHelper.d.ts.map +0 -1
- package/esm/utils/orderEntryHelper.js +0 -296
- package/esm/utils/orderEntryHelper.js.map +0 -1
- package/esm/utils/parseHolding.d.ts +0 -9
- package/esm/utils/parseHolding.d.ts.map +0 -1
- package/esm/utils/parseHolding.js +0 -25
- package/esm/utils/parseHolding.js.map +0 -1
- package/esm/utils/swr.d.ts +0 -12
- package/esm/utils/swr.d.ts.map +0 -1
- package/esm/utils/swr.js +0 -239
- package/esm/utils/swr.js.map +0 -1
- package/esm/utils/ws.d.ts +0 -2
- package/esm/utils/ws.d.ts.map +0 -1
- package/esm/utils/ws.js +0 -9
- package/esm/utils/ws.js.map +0 -1
- package/esm/version.d.ts +0 -10
- package/esm/version.d.ts.map +0 -1
- package/esm/version.js +0 -7
- package/esm/version.js.map +0 -1
- package/esm/walletConnectorContext.d.ts +0 -31
- package/esm/walletConnectorContext.d.ts.map +0 -1
- package/esm/walletConnectorContext.js +0 -7
- package/esm/walletConnectorContext.js.map +0 -1
- package/lib/configProvider.d.ts +0 -24
- package/lib/configProvider.d.ts.map +0 -1
- package/lib/configProvider.js +0 -136
- package/lib/configProvider.js.map +0 -1
- package/lib/dataProvider.d.ts +0 -11
- package/lib/dataProvider.d.ts.map +0 -1
- package/lib/dataProvider.js +0 -58
- package/lib/dataProvider.js.map +0 -1
- package/lib/dev/proxyConfigStore.d.ts +0 -15
- package/lib/dev/proxyConfigStore.d.ts.map +0 -1
- package/lib/dev/proxyConfigStore.js +0 -51
- package/lib/dev/proxyConfigStore.js.map +0 -1
- package/lib/index.d.ts +0 -38
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -202
- package/lib/index.js.map +0 -1
- package/lib/middleware/signatureMiddleware.d.ts +0 -3
- package/lib/middleware/signatureMiddleware.d.ts.map +0 -1
- package/lib/middleware/signatureMiddleware.js +0 -44
- package/lib/middleware/signatureMiddleware.js.map +0 -1
- package/lib/orderly/orderbook.service.d.ts +0 -33
- package/lib/orderly/orderbook.service.d.ts.map +0 -1
- package/lib/orderly/orderbook.service.js +0 -147
- package/lib/orderly/orderbook.service.js.map +0 -1
- package/lib/orderly/orderlyHooks.d.ts +0 -36
- package/lib/orderly/orderlyHooks.d.ts.map +0 -1
- package/lib/orderly/orderlyHooks.js +0 -137
- package/lib/orderly/orderlyHooks.js.map +0 -1
- package/lib/orderly/useAccountInfo.d.ts +0 -3
- package/lib/orderly/useAccountInfo.d.ts.map +0 -1
- package/lib/orderly/useAccountInfo.js +0 -16
- package/lib/orderly/useAccountInfo.js.map +0 -1
- package/lib/orderly/useChain.d.ts +0 -6
- package/lib/orderly/useChain.d.ts.map +0 -1
- package/lib/orderly/useChain.js +0 -39
- package/lib/orderly/useChain.js.map +0 -1
- package/lib/orderly/useChains.d.ts +0 -33
- package/lib/orderly/useChains.d.ts.map +0 -1
- package/lib/orderly/useChains.js +0 -209
- package/lib/orderly/useChains.js.map +0 -1
- package/lib/orderly/useCollateral.d.ts +0 -15
- package/lib/orderly/useCollateral.d.ts.map +0 -1
- package/lib/orderly/useCollateral.js +0 -114
- package/lib/orderly/useCollateral.js.map +0 -1
- package/lib/orderly/useDeposit.d.ts +0 -38
- package/lib/orderly/useDeposit.d.ts.map +0 -1
- package/lib/orderly/useDeposit.js +0 -278
- package/lib/orderly/useDeposit.js.map +0 -1
- package/lib/orderly/useFundingRate.d.ts +0 -11
- package/lib/orderly/useFundingRate.d.ts.map +0 -1
- package/lib/orderly/useFundingRate.js +0 -51
- package/lib/orderly/useFundingRate.js.map +0 -1
- package/lib/orderly/useFundingRates.d.ts +0 -7
- package/lib/orderly/useFundingRates.d.ts.map +0 -1
- package/lib/orderly/useFundingRates.js +0 -32
- package/lib/orderly/useFundingRates.js.map +0 -1
- package/lib/orderly/useHoldingStream.d.ts +0 -7
- package/lib/orderly/useHoldingStream.d.ts.map +0 -1
- package/lib/orderly/useHoldingStream.js +0 -66
- package/lib/orderly/useHoldingStream.js.map +0 -1
- package/lib/orderly/useIndexPrice.d.ts +0 -2
- package/lib/orderly/useIndexPrice.d.ts.map +0 -1
- package/lib/orderly/useIndexPrice.js +0 -34
- package/lib/orderly/useIndexPrice.js.map +0 -1
- package/lib/orderly/useLeverage.d.ts +0 -2
- package/lib/orderly/useLeverage.d.ts.map +0 -1
- package/lib/orderly/useLeverage.js +0 -41
- package/lib/orderly/useLeverage.js.map +0 -1
- package/lib/orderly/useMaintenanceStatus.d.ts +0 -7
- package/lib/orderly/useMaintenanceStatus.d.ts.map +0 -1
- package/lib/orderly/useMaintenanceStatus.js +0 -71
- package/lib/orderly/useMaintenanceStatus.js.map +0 -1
- package/lib/orderly/useMarginRatio.d.ts +0 -7
- package/lib/orderly/useMarginRatio.d.ts.map +0 -1
- package/lib/orderly/useMarginRatio.js +0 -65
- package/lib/orderly/useMarginRatio.js.map +0 -1
- package/lib/orderly/useMarkPrice.d.ts +0 -4
- package/lib/orderly/useMarkPrice.d.ts.map +0 -1
- package/lib/orderly/useMarkPrice.js +0 -44
- package/lib/orderly/useMarkPrice.js.map +0 -1
- package/lib/orderly/useMarkPricesStream.d.ts +0 -2
- package/lib/orderly/useMarkPricesStream.d.ts.map +0 -1
- package/lib/orderly/useMarkPricesStream.js +0 -42
- package/lib/orderly/useMarkPricesStream.js.map +0 -1
- package/lib/orderly/useMarketTradeStream.d.ts +0 -9
- package/lib/orderly/useMarketTradeStream.d.ts.map +0 -1
- package/lib/orderly/useMarketTradeStream.js +0 -76
- package/lib/orderly/useMarketTradeStream.js.map +0 -1
- package/lib/orderly/useMarkets.d.ts +0 -36
- package/lib/orderly/useMarkets.d.ts.map +0 -1
- package/lib/orderly/useMarkets.js +0 -349
- package/lib/orderly/useMarkets.js.map +0 -1
- package/lib/orderly/useMarketsStream.d.ts +0 -5
- package/lib/orderly/useMarketsStream.d.ts.map +0 -1
- package/lib/orderly/useMarketsStream.js +0 -68
- package/lib/orderly/useMarketsStream.js.map +0 -1
- package/lib/orderly/useMaxQty.d.ts +0 -9
- package/lib/orderly/useMaxQty.d.ts.map +0 -1
- package/lib/orderly/useMaxQty.js +0 -114
- package/lib/orderly/useMaxQty.js.map +0 -1
- package/lib/orderly/useOpenInterest.d.ts +0 -2
- package/lib/orderly/useOpenInterest.d.ts.map +0 -1
- package/lib/orderly/useOpenInterest.js +0 -32
- package/lib/orderly/useOpenInterest.js.map +0 -1
- package/lib/orderly/useOrderEntry.d.ts +0 -63
- package/lib/orderly/useOrderEntry.d.ts.map +0 -1
- package/lib/orderly/useOrderEntry.js +0 -553
- package/lib/orderly/useOrderEntry.js.map +0 -1
- package/lib/orderly/useOrderEntryNext/index.d.ts +0 -1
- package/lib/orderly/useOrderEntryNext/index.d.ts.map +0 -1
- package/lib/orderly/useOrderEntryNext/index.js +0 -3
- package/lib/orderly/useOrderEntryNext/index.js.map +0 -1
- package/lib/orderly/useOrderStream/useOrderStream.d.ts +0 -55
- package/lib/orderly/useOrderStream/useOrderStream.d.ts.map +0 -1
- package/lib/orderly/useOrderStream/useOrderStream.js +0 -292
- package/lib/orderly/useOrderStream/useOrderStream.js.map +0 -1
- package/lib/orderly/useOrderbookStream.d.ts +0 -52
- package/lib/orderly/useOrderbookStream.d.ts.map +0 -1
- package/lib/orderly/useOrderbookStream.js +0 -385
- package/lib/orderly/useOrderbookStream.js.map +0 -1
- package/lib/orderly/usePositionStream/usePositionStream.d.ts +0 -42
- package/lib/orderly/usePositionStream/usePositionStream.d.ts.map +0 -1
- package/lib/orderly/usePositionStream/usePositionStream.js +0 -287
- package/lib/orderly/usePositionStream/usePositionStream.js.map +0 -1
- package/lib/orderly/usePositionStream/utils.d.ts +0 -8
- package/lib/orderly/usePositionStream/utils.d.ts.map +0 -1
- package/lib/orderly/usePositionStream/utils.js +0 -55
- package/lib/orderly/usePositionStream/utils.js.map +0 -1
- package/lib/orderly/usePrivateDataObserver.d.ts +0 -5
- package/lib/orderly/usePrivateDataObserver.d.ts.map +0 -1
- package/lib/orderly/usePrivateDataObserver.js +0 -140
- package/lib/orderly/usePrivateDataObserver.js.map +0 -1
- package/lib/orderly/useSettleSubscription.d.ts +0 -4
- package/lib/orderly/useSettleSubscription.d.ts.map +0 -1
- package/lib/orderly/useSettleSubscription.js +0 -37
- package/lib/orderly/useSettleSubscription.js.map +0 -1
- package/lib/orderly/useSymbolLeverage.d.ts +0 -2
- package/lib/orderly/useSymbolLeverage.d.ts.map +0 -1
- package/lib/orderly/useSymbolLeverage.js +0 -41
- package/lib/orderly/useSymbolLeverage.js.map +0 -1
- package/lib/orderly/useSymbolPriceRange.d.ts +0 -13
- package/lib/orderly/useSymbolPriceRange.d.ts.map +0 -1
- package/lib/orderly/useSymbolPriceRange.js +0 -49
- package/lib/orderly/useSymbolPriceRange.js.map +0 -1
- package/lib/orderly/useSymbolsInfo.d.ts +0 -7
- package/lib/orderly/useSymbolsInfo.d.ts.map +0 -1
- package/lib/orderly/useSymbolsInfo.js +0 -45
- package/lib/orderly/useSymbolsInfo.js.map +0 -1
- package/lib/orderly/useTakeProfitAndStopLoss/__test__/useTakeProfitAndStopLoss.test.d.ts +0 -1
- package/lib/orderly/useTakeProfitAndStopLoss/__test__/useTakeProfitAndStopLoss.test.d.ts.map +0 -1
- package/lib/orderly/useTakeProfitAndStopLoss/__test__/utils.test.d.ts +0 -2
- package/lib/orderly/useTakeProfitAndStopLoss/__test__/utils.test.d.ts.map +0 -1
- package/lib/orderly/useTakeProfitAndStopLoss/index.d.ts +0 -30
- package/lib/orderly/useTakeProfitAndStopLoss/index.d.ts.map +0 -1
- package/lib/orderly/useTakeProfitAndStopLoss/index.js +0 -33
- package/lib/orderly/useTakeProfitAndStopLoss/index.js.map +0 -1
- package/lib/orderly/useTakeProfitAndStopLoss/useTPSL.d.ts +0 -57
- package/lib/orderly/useTakeProfitAndStopLoss/useTPSL.d.ts.map +0 -1
- package/lib/orderly/useTakeProfitAndStopLoss/useTPSL.js +0 -218
- package/lib/orderly/useTakeProfitAndStopLoss/useTPSL.js.map +0 -1
- package/lib/orderly/useTakeProfitAndStopLoss/utils.d.ts +0 -70
- package/lib/orderly/useTakeProfitAndStopLoss/utils.d.ts.map +0 -1
- package/lib/orderly/useTakeProfitAndStopLoss/utils.js +0 -254
- package/lib/orderly/useTakeProfitAndStopLoss/utils.js.map +0 -1
- package/lib/orderly/useTickerStream.d.ts +0 -7
- package/lib/orderly/useTickerStream.d.ts.map +0 -1
- package/lib/orderly/useTickerStream.js +0 -93
- package/lib/orderly/useTickerStream.js.map +0 -1
- package/lib/orderly/useWalletSubscription.d.ts +0 -4
- package/lib/orderly/useWalletSubscription.d.ts.map +0 -1
- package/lib/orderly/useWalletSubscription.js +0 -37
- package/lib/orderly/useWalletSubscription.js.map +0 -1
- package/lib/orderly/useWithdraw.d.ts +0 -24
- package/lib/orderly/useWithdraw.d.ts.map +0 -1
- package/lib/orderly/useWithdraw.js +0 -121
- package/lib/orderly/useWithdraw.js.map +0 -1
- package/lib/orderlyContext.d.ts +0 -24
- package/lib/orderlyContext.d.ts.map +0 -1
- package/lib/orderlyContext.js +0 -24
- package/lib/orderlyContext.js.map +0 -1
- package/lib/referral/api.d.ts +0 -87
- package/lib/referral/api.d.ts.map +0 -1
- package/lib/referral/api.js +0 -6
- package/lib/referral/api.js.map +0 -1
- package/lib/referral/format.d.ts +0 -2
- package/lib/referral/format.d.ts.map +0 -1
- package/lib/referral/format.js +0 -18
- package/lib/referral/format.js.map +0 -1
- package/lib/referral/index.d.ts +0 -12
- package/lib/referral/index.d.ts.map +0 -1
- package/lib/referral/index.js +0 -68
- package/lib/referral/index.js.map +0 -1
- package/lib/referral/swr.d.ts +0 -7
- package/lib/referral/swr.d.ts.map +0 -1
- package/lib/referral/swr.js +0 -34
- package/lib/referral/swr.js.map +0 -1
- package/lib/referral/useCheckReferralCode.d.ts +0 -6
- package/lib/referral/useCheckReferralCode.d.ts.map +0 -1
- package/lib/referral/useCheckReferralCode.js +0 -28
- package/lib/referral/useCheckReferralCode.js.map +0 -1
- package/lib/referral/useCommission.d.ts +0 -4
- package/lib/referral/useCommission.d.ts.map +0 -1
- package/lib/referral/useCommission.js +0 -69
- package/lib/referral/useCommission.js.map +0 -1
- package/lib/referral/useDaily.d.ts +0 -9
- package/lib/referral/useDaily.d.ts.map +0 -1
- package/lib/referral/useDaily.js +0 -30
- package/lib/referral/useDaily.js.map +0 -1
- package/lib/referral/useDistribution.d.ts +0 -9
- package/lib/referral/useDistribution.d.ts.map +0 -1
- package/lib/referral/useDistribution.js +0 -63
- package/lib/referral/useDistribution.js.map +0 -1
- package/lib/referral/useGetReferralCode.d.ts +0 -6
- package/lib/referral/useGetReferralCode.d.ts.map +0 -1
- package/lib/referral/useGetReferralCode.js +0 -28
- package/lib/referral/useGetReferralCode.js.map +0 -1
- package/lib/referral/useRefereeHistory.d.ts +0 -9
- package/lib/referral/useRefereeHistory.d.ts.map +0 -1
- package/lib/referral/useRefereeHistory.js +0 -57
- package/lib/referral/useRefereeHistory.js.map +0 -1
- package/lib/referral/useRefereeInfo.d.ts +0 -9
- package/lib/referral/useRefereeInfo.d.ts.map +0 -1
- package/lib/referral/useRefereeInfo.js +0 -57
- package/lib/referral/useRefereeInfo.js.map +0 -1
- package/lib/referral/useRefereeRebateSummary.d.ts +0 -12
- package/lib/referral/useRefereeRebateSummary.d.ts.map +0 -1
- package/lib/referral/useRefereeRebateSummary.js +0 -41
- package/lib/referral/useRefereeRebateSummary.js.map +0 -1
- package/lib/referral/useReferralInfo.d.ts +0 -10
- package/lib/referral/useReferralInfo.d.ts.map +0 -1
- package/lib/referral/useReferralInfo.js +0 -66
- package/lib/referral/useReferralInfo.js.map +0 -1
- package/lib/referral/useReferralRebateSummary.d.ts +0 -9
- package/lib/referral/useReferralRebateSummary.d.ts.map +0 -1
- package/lib/referral/useReferralRebateSummary.js +0 -57
- package/lib/referral/useReferralRebateSummary.js.map +0 -1
- package/lib/services/dataCenter.d.ts +0 -2
- package/lib/services/dataCenter.d.ts.map +0 -1
- package/lib/services/dataCenter.js +0 -19
- package/lib/services/dataCenter.js.map +0 -1
- package/lib/services/orderCreator/__test__/limitOrderCreator.test.d.ts +0 -2
- package/lib/services/orderCreator/__test__/limitOrderCreator.test.d.ts.map +0 -1
- package/lib/services/orderCreator/__test__/orderCreator.test.d.ts +0 -2
- package/lib/services/orderCreator/__test__/orderCreator.test.d.ts.map +0 -1
- package/lib/services/orderCreator/__test__/stopLimitOrderCreator.test.d.ts +0 -2
- package/lib/services/orderCreator/__test__/stopLimitOrderCreator.test.d.ts.map +0 -1
- package/lib/services/orderCreator/__test__/stopMarketOrderCreator.test.d.ts +0 -2
- package/lib/services/orderCreator/__test__/stopMarketOrderCreator.test.d.ts.map +0 -1
- package/lib/services/orderCreator/__test__/tpslOrderCreator.test.d.ts +0 -2
- package/lib/services/orderCreator/__test__/tpslOrderCreator.test.d.ts.map +0 -1
- package/lib/services/orderCreator/__test__/tpslPositionOrderCreator.test.d.ts +0 -2
- package/lib/services/orderCreator/__test__/tpslPositionOrderCreator.test.d.ts.map +0 -1
- package/lib/services/orderCreator/baseAlgoCreator.d.ts +0 -22
- package/lib/services/orderCreator/baseAlgoCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/baseAlgoCreator.js +0 -67
- package/lib/services/orderCreator/baseAlgoCreator.js.map +0 -1
- package/lib/services/orderCreator/baseCreator.d.ts +0 -14
- package/lib/services/orderCreator/baseCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/baseCreator.js +0 -108
- package/lib/services/orderCreator/baseCreator.js.map +0 -1
- package/lib/services/orderCreator/factory.d.ts +0 -7
- package/lib/services/orderCreator/factory.d.ts.map +0 -1
- package/lib/services/orderCreator/factory.js +0 -54
- package/lib/services/orderCreator/factory.js.map +0 -1
- package/lib/services/orderCreator/fokCreator.d.ts +0 -4
- package/lib/services/orderCreator/fokCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/fokCreator.js +0 -15
- package/lib/services/orderCreator/fokCreator.js.map +0 -1
- package/lib/services/orderCreator/generalCreator.d.ts +0 -8
- package/lib/services/orderCreator/generalCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/generalCreator.js +0 -25
- package/lib/services/orderCreator/generalCreator.js.map +0 -1
- package/lib/services/orderCreator/interface.d.ts +0 -23
- package/lib/services/orderCreator/interface.d.ts.map +0 -1
- package/lib/services/orderCreator/interface.js +0 -6
- package/lib/services/orderCreator/interface.js.map +0 -1
- package/lib/services/orderCreator/iocCreator.d.ts +0 -4
- package/lib/services/orderCreator/iocCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/iocCreator.js +0 -15
- package/lib/services/orderCreator/iocCreator.js.map +0 -1
- package/lib/services/orderCreator/limitOrderCreator.d.ts +0 -8
- package/lib/services/orderCreator/limitOrderCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/limitOrderCreator.js +0 -79
- package/lib/services/orderCreator/limitOrderCreator.js.map +0 -1
- package/lib/services/orderCreator/marketOrderCreator.d.ts +0 -24
- package/lib/services/orderCreator/marketOrderCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/marketOrderCreator.js +0 -28
- package/lib/services/orderCreator/marketOrderCreator.js.map +0 -1
- package/lib/services/orderCreator/postOnlyCreator.d.ts +0 -4
- package/lib/services/orderCreator/postOnlyCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/postOnlyCreator.js +0 -15
- package/lib/services/orderCreator/postOnlyCreator.js.map +0 -1
- package/lib/services/orderCreator/stopLimitOrderCreator.d.ts +0 -11
- package/lib/services/orderCreator/stopLimitOrderCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/stopLimitOrderCreator.js +0 -93
- package/lib/services/orderCreator/stopLimitOrderCreator.js.map +0 -1
- package/lib/services/orderCreator/stopMarketOrderCreator.d.ts +0 -30
- package/lib/services/orderCreator/stopMarketOrderCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/stopMarketOrderCreator.js +0 -56
- package/lib/services/orderCreator/stopMarketOrderCreator.js.map +0 -1
- package/lib/services/orderCreator/tpslOrderCreator.d.ts +0 -32
- package/lib/services/orderCreator/tpslOrderCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/tpslOrderCreator.js +0 -94
- package/lib/services/orderCreator/tpslOrderCreator.js.map +0 -1
- package/lib/services/orderCreator/tpslPositionOrderCreator.d.ts +0 -33
- package/lib/services/orderCreator/tpslPositionOrderCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/tpslPositionOrderCreator.js +0 -83
- package/lib/services/orderCreator/tpslPositionOrderCreator.js.map +0 -1
- package/lib/services/orderMerge/algoOrderMergeHandler.d.ts +0 -10
- package/lib/services/orderMerge/algoOrderMergeHandler.d.ts.map +0 -1
- package/lib/services/orderMerge/algoOrderMergeHandler.js +0 -56
- package/lib/services/orderMerge/algoOrderMergeHandler.js.map +0 -1
- package/lib/services/orderMerge/baseMergeHandler.d.ts +0 -23
- package/lib/services/orderMerge/baseMergeHandler.d.ts.map +0 -1
- package/lib/services/orderMerge/baseMergeHandler.js +0 -170
- package/lib/services/orderMerge/baseMergeHandler.js.map +0 -1
- package/lib/services/orderMerge/interface.d.ts +0 -8
- package/lib/services/orderMerge/interface.d.ts.map +0 -1
- package/lib/services/orderMerge/interface.js +0 -6
- package/lib/services/orderMerge/interface.js.map +0 -1
- package/lib/services/orderMerge/regularOrderMergeHandler.d.ts +0 -9
- package/lib/services/orderMerge/regularOrderMergeHandler.d.ts.map +0 -1
- package/lib/services/orderMerge/regularOrderMergeHandler.js +0 -28
- package/lib/services/orderMerge/regularOrderMergeHandler.js.map +0 -1
- package/lib/services/painter/backgroundPaint.d.ts +0 -9
- package/lib/services/painter/backgroundPaint.d.ts.map +0 -1
- package/lib/services/painter/backgroundPaint.js +0 -48
- package/lib/services/painter/backgroundPaint.js.map +0 -1
- package/lib/services/painter/basePaint.d.ts +0 -104
- package/lib/services/painter/basePaint.d.ts.map +0 -1
- package/lib/services/painter/basePaint.js +0 -20
- package/lib/services/painter/basePaint.js.map +0 -1
- package/lib/services/painter/dataPaint.d.ts +0 -20
- package/lib/services/painter/dataPaint.d.ts.map +0 -1
- package/lib/services/painter/dataPaint.js +0 -325
- package/lib/services/painter/dataPaint.js.map +0 -1
- package/lib/services/painter/layout.config.d.ts +0 -3
- package/lib/services/painter/layout.config.d.ts.map +0 -1
- package/lib/services/painter/layout.config.js +0 -69
- package/lib/services/painter/layout.config.js.map +0 -1
- package/lib/services/painter/painter.d.ts +0 -14
- package/lib/services/painter/painter.d.ts.map +0 -1
- package/lib/services/painter/painter.js +0 -58
- package/lib/services/painter/painter.js.map +0 -1
- package/lib/services/painter/qrPaint.d.ts +0 -8
- package/lib/services/painter/qrPaint.d.ts.map +0 -1
- package/lib/services/painter/qrPaint.js +0 -49
- package/lib/services/painter/qrPaint.js.map +0 -1
- package/lib/services/painter/resource.d.ts +0 -7
- package/lib/services/painter/resource.d.ts.map +0 -1
- package/lib/services/painter/resource.js +0 -27
- package/lib/services/painter/resource.js.map +0 -1
- package/lib/statusProvider.d.ts +0 -8
- package/lib/statusProvider.d.ts.map +0 -1
- package/lib/statusProvider.js +0 -33
- package/lib/statusProvider.js.map +0 -1
- package/lib/unuse/apiPrefixMiddleware.d.ts +0 -3
- package/lib/unuse/apiPrefixMiddleware.d.ts.map +0 -1
- package/lib/unuse/apiPrefixMiddleware.js +0 -39
- package/lib/unuse/apiPrefixMiddleware.js.map +0 -1
- package/lib/unuse/fn.d.ts +0 -2
- package/lib/unuse/fn.d.ts.map +0 -1
- package/lib/unuse/fn.js +0 -18
- package/lib/unuse/fn.js.map +0 -1
- package/lib/unuse/useBalance.d.ts +0 -2
- package/lib/unuse/useBalance.d.ts.map +0 -1
- package/lib/unuse/useBalance.js +0 -29
- package/lib/unuse/useBalance.js.map +0 -1
- package/lib/unuse/useFetures.d.ts +0 -11
- package/lib/unuse/useFetures.d.ts.map +0 -1
- package/lib/unuse/useFetures.js +0 -56
- package/lib/unuse/useFetures.js.map +0 -1
- package/lib/unuse/useRunOnce.d.ts +0 -7
- package/lib/unuse/useRunOnce.d.ts.map +0 -1
- package/lib/unuse/useRunOnce.js +0 -71
- package/lib/unuse/useRunOnce.js.map +0 -1
- package/lib/unuse/useSyncEnd.d.ts +0 -2
- package/lib/unuse/useSyncEnd.d.ts.map +0 -1
- package/lib/unuse/useSyncEnd.js +0 -21
- package/lib/unuse/useSyncEnd.js.map +0 -1
- package/lib/unuse/useTokenInfo.d.ts +0 -7
- package/lib/unuse/useTokenInfo.d.ts.map +0 -1
- package/lib/unuse/useTokenInfo.js +0 -32
- package/lib/unuse/useTokenInfo.js.map +0 -1
- package/lib/unuse/useUnsettlementPnL.d.ts +0 -2
- package/lib/unuse/useUnsettlementPnL.d.ts.map +0 -1
- package/lib/unuse/useUnsettlementPnL.js +0 -34
- package/lib/unuse/useUnsettlementPnL.js.map +0 -1
- package/lib/useAccount.d.ts +0 -8
- package/lib/useAccount.d.ts.map +0 -1
- package/lib/useAccount.js +0 -66
- package/lib/useAccount.js.map +0 -1
- package/lib/useAccountInstance.d.ts +0 -3
- package/lib/useAccountInstance.d.ts.map +0 -1
- package/lib/useAccountInstance.js +0 -37
- package/lib/useAccountInstance.js.map +0 -1
- package/lib/useBoolean.d.ts +0 -6
- package/lib/useBoolean.d.ts.map +0 -1
- package/lib/useBoolean.js +0 -27
- package/lib/useBoolean.js.map +0 -1
- package/lib/useConfig.d.ts +0 -4
- package/lib/useConfig.d.ts.map +0 -1
- package/lib/useConfig.js +0 -24
- package/lib/useConfig.js.map +0 -1
- package/lib/useEventEmitter.d.ts +0 -3
- package/lib/useEventEmitter.d.ts.map +0 -1
- package/lib/useEventEmitter.js +0 -29
- package/lib/useEventEmitter.js.map +0 -1
- package/lib/useLazyQuery.d.ts +0 -13
- package/lib/useLazyQuery.d.ts.map +0 -1
- package/lib/useLazyQuery.js +0 -44
- package/lib/useLazyQuery.js.map +0 -1
- package/lib/useLocalStorage.d.ts +0 -2
- package/lib/useLocalStorage.d.ts.map +0 -1
- package/lib/useLocalStorage.js +0 -92
- package/lib/useLocalStorage.js.map +0 -1
- package/lib/useMediaQuery.d.ts +0 -2
- package/lib/useMediaQuery.d.ts.map +0 -1
- package/lib/useMediaQuery.js +0 -48
- package/lib/useMediaQuery.js.map +0 -1
- package/lib/useMutation.d.ts +0 -13
- package/lib/useMutation.d.ts.map +0 -1
- package/lib/useMutation.js +0 -94
- package/lib/useMutation.js.map +0 -1
- package/lib/useObserve.d.ts +0 -6
- package/lib/useObserve.d.ts.map +0 -1
- package/lib/useObserve.js +0 -26
- package/lib/useObserve.js.map +0 -1
- package/lib/useParamsCheck.d.ts +0 -4
- package/lib/useParamsCheck.d.ts.map +0 -1
- package/lib/useParamsCheck.js +0 -22
- package/lib/useParamsCheck.js.map +0 -1
- package/lib/usePoster.d.ts +0 -44
- package/lib/usePoster.d.ts.map +0 -1
- package/lib/usePoster.js +0 -138
- package/lib/usePoster.js.map +0 -1
- package/lib/usePreloadData.d.ts +0 -5
- package/lib/usePreloadData.d.ts.map +0 -1
- package/lib/usePreloadData.js +0 -48
- package/lib/usePreloadData.js.map +0 -1
- package/lib/usePrivateInfiniteQuery.d.ts +0 -5
- package/lib/usePrivateInfiniteQuery.d.ts.map +0 -1
- package/lib/usePrivateInfiniteQuery.js +0 -46
- package/lib/usePrivateInfiniteQuery.js.map +0 -1
- package/lib/usePrivateQuery.d.ts +0 -10
- package/lib/usePrivateQuery.d.ts.map +0 -1
- package/lib/usePrivateQuery.js +0 -43
- package/lib/usePrivateQuery.js.map +0 -1
- package/lib/useQuery.d.ts +0 -10
- package/lib/useQuery.d.ts.map +0 -1
- package/lib/useQuery.js +0 -31
- package/lib/useQuery.js.map +0 -1
- package/lib/useSessionStorage.d.ts +0 -2
- package/lib/useSessionStorage.d.ts.map +0 -1
- package/lib/useSessionStorage.js +0 -79
- package/lib/useSessionStorage.js.map +0 -1
- package/lib/useWS.d.ts +0 -3
- package/lib/useWS.d.ts.map +0 -1
- package/lib/useWS.js +0 -69
- package/lib/useWS.js.map +0 -1
- package/lib/useWsStatus.d.ts +0 -7
- package/lib/useWsStatus.d.ts.map +0 -1
- package/lib/useWsStatus.js +0 -59
- package/lib/useWsStatus.js.map +0 -1
- package/lib/utils/createGetter.d.ts +0 -11
- package/lib/utils/createGetter.d.ts.map +0 -1
- package/lib/utils/createGetter.js +0 -35
- package/lib/utils/createGetter.js.map +0 -1
- package/lib/utils/createOrder.d.ts +0 -2
- package/lib/utils/createOrder.d.ts.map +0 -1
- package/lib/utils/createOrder.js +0 -26
- package/lib/utils/createOrder.js.map +0 -1
- package/lib/utils/dev.d.ts +0 -2
- package/lib/utils/dev.d.ts.map +0 -1
- package/lib/utils/dev.js +0 -25
- package/lib/utils/dev.js.map +0 -1
- package/lib/utils/fetcher.d.ts +0 -6
- package/lib/utils/fetcher.d.ts.map +0 -1
- package/lib/utils/fetcher.js +0 -14
- package/lib/utils/fetcher.js.map +0 -1
- package/lib/utils/fokCreator.d.ts +0 -1
- package/lib/utils/fokCreator.d.ts.map +0 -1
- package/lib/utils/fokCreator.js +0 -3
- package/lib/utils/fokCreator.js.map +0 -1
- package/lib/utils/index.d.ts +0 -6
- package/lib/utils/index.d.ts.map +0 -1
- package/lib/utils/index.js +0 -39
- package/lib/utils/index.js.map +0 -1
- package/lib/utils/json.d.ts +0 -2
- package/lib/utils/json.d.ts.map +0 -1
- package/lib/utils/json.js +0 -19
- package/lib/utils/json.js.map +0 -1
- package/lib/utils/order.d.ts +0 -2
- package/lib/utils/order.d.ts.map +0 -1
- package/lib/utils/order.js +0 -6
- package/lib/utils/order.js.map +0 -1
- package/lib/utils/orderEntryHelper.d.ts +0 -26
- package/lib/utils/orderEntryHelper.d.ts.map +0 -1
- package/lib/utils/orderEntryHelper.js +0 -320
- package/lib/utils/orderEntryHelper.js.map +0 -1
- package/lib/utils/parseHolding.d.ts +0 -9
- package/lib/utils/parseHolding.d.ts.map +0 -1
- package/lib/utils/parseHolding.js +0 -35
- package/lib/utils/parseHolding.js.map +0 -1
- package/lib/utils/swr.d.ts +0 -12
- package/lib/utils/swr.d.ts.map +0 -1
- package/lib/utils/swr.js +0 -262
- package/lib/utils/swr.js.map +0 -1
- package/lib/utils/ws.d.ts +0 -2
- package/lib/utils/ws.d.ts.map +0 -1
- package/lib/utils/ws.js +0 -19
- package/lib/utils/ws.js.map +0 -1
- package/lib/version.d.ts +0 -10
- package/lib/version.d.ts.map +0 -1
- package/lib/version.js +0 -17
- package/lib/version.js.map +0 -1
- package/lib/walletConnectorContext.d.ts +0 -31
- package/lib/walletConnectorContext.d.ts.map +0 -1
- package/lib/walletConnectorContext.js +0 -25
- package/lib/walletConnectorContext.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orderly.network/hooks",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.0",
|
|
4
4
|
"description": "",
|
|
5
|
-
"main": "
|
|
6
|
-
"module": "
|
|
7
|
-
"types": "
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"keywords": [],
|
|
8
9
|
"files": [
|
|
9
|
-
"
|
|
10
|
-
"lib"
|
|
10
|
+
"dist"
|
|
11
11
|
],
|
|
12
|
-
"keywords": [],
|
|
13
12
|
"peerDependencies": {
|
|
14
13
|
"react": "^18.2.0"
|
|
15
14
|
},
|
|
@@ -33,7 +32,7 @@
|
|
|
33
32
|
"tsup": "^7.1.0",
|
|
34
33
|
"typedoc": "^0.26.5",
|
|
35
34
|
"typescript": "^5.1.6",
|
|
36
|
-
"tsconfig": "0.3.
|
|
35
|
+
"tsconfig": "0.3.12"
|
|
37
36
|
},
|
|
38
37
|
"dependencies": {
|
|
39
38
|
"@akamfoad/qr": "^0.4.0",
|
|
@@ -41,15 +40,32 @@
|
|
|
41
40
|
"swr": "2.2.4",
|
|
42
41
|
"use-constant": "^1.1.1",
|
|
43
42
|
"use-debounce": "^9.0.4",
|
|
44
|
-
"@orderly.network/
|
|
45
|
-
"@orderly.network/
|
|
46
|
-
"@orderly.network/net": "
|
|
47
|
-
"@orderly.network/
|
|
48
|
-
"@orderly.network/
|
|
43
|
+
"@orderly.network/types": "2.0.0-alpha.0",
|
|
44
|
+
"@orderly.network/core": "2.0.0-alpha.0",
|
|
45
|
+
"@orderly.network/net": "2.0.0-alpha.0",
|
|
46
|
+
"@orderly.network/perp": "4.0.0-alpha.0",
|
|
47
|
+
"@orderly.network/utils": "2.0.0-alpha.0",
|
|
48
|
+
"@orderly.network/default-solana-adapter": "2.0.0-alpha.0",
|
|
49
|
+
"@orderly.network/web3-provider-ethers": "2.0.0-alpha.0",
|
|
50
|
+
"@orderly.network/default-evm-adapter": "2.0.0-alpha.0"
|
|
49
51
|
},
|
|
50
52
|
"publishConfig": {
|
|
51
53
|
"access": "public"
|
|
52
54
|
},
|
|
55
|
+
"browserslist": {
|
|
56
|
+
"production": [
|
|
57
|
+
"chrome >= 67",
|
|
58
|
+
"edge >= 79",
|
|
59
|
+
"firefox >= 68",
|
|
60
|
+
"opera >= 54",
|
|
61
|
+
"safari >= 14"
|
|
62
|
+
],
|
|
63
|
+
"development": [
|
|
64
|
+
"last 1 chrome version",
|
|
65
|
+
"last 1 firefox version",
|
|
66
|
+
"last 1 safari version"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
53
69
|
"scripts": {
|
|
54
70
|
"dev": "tsup --watch --tsconfig tsconfig.build.json",
|
|
55
71
|
"build:tsc": "rimraf -rf dist esm lib && pnpm run build:esm && pnpm run build:cjs",
|
|
@@ -59,9 +75,10 @@
|
|
|
59
75
|
"docs:generate": "typedoc",
|
|
60
76
|
"docs:parse": "@orderly.network/typedoc-json-parser",
|
|
61
77
|
"test": "jest",
|
|
62
|
-
"build": "rimraf -rf dist esm lib && pnpm build:
|
|
63
|
-
"build:swc
|
|
64
|
-
"build:swc:
|
|
78
|
+
"build": "rimraf -rf dist esm lib && pnpm build:tsup",
|
|
79
|
+
"build:swc": "rimraf -rf dist esm lib && pnpm build:swc:esm && pnpm build:swc:cjs",
|
|
80
|
+
"build:swc:esm": "pnpm generateType:esm && swc src -d esm --strip-leading-paths --copy-files",
|
|
81
|
+
"build:swc:cjs": "pnpm generateType:cjs && swc src -d lib --config module.type=commonjs --strip-leading-paths --copy-files",
|
|
65
82
|
"generateType:esm": "tsc --emitDeclarationOnly --project tsconfig.build.json --outDir esm",
|
|
66
83
|
"generateType:cjs": "tsc --emitDeclarationOnly --project tsconfig.build.json --module commonjs --outDir lib"
|
|
67
84
|
}
|
package/esm/configProvider.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { PropsWithChildren } from "react";
|
|
2
|
-
import { ConfigStore, OrderlyKeyStore, getWalletAdapterFunc, IContract } from "@orderly.network/core";
|
|
3
|
-
import { Chain, NetworkId } from "@orderly.network/types";
|
|
4
|
-
type RequireAtLeastOne<T, R extends keyof T = keyof T> = Omit<T, R> & {
|
|
5
|
-
[K in R]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<R, K>>>;
|
|
6
|
-
}[R];
|
|
7
|
-
type filteredChains = {
|
|
8
|
-
mainnet?: Chain[];
|
|
9
|
-
testnet?: Chain[];
|
|
10
|
-
};
|
|
11
|
-
type filterChainsFunc = (config: ConfigStore) => filteredChains;
|
|
12
|
-
export interface ConfigProviderProps {
|
|
13
|
-
configStore?: ConfigStore;
|
|
14
|
-
keyStore?: OrderlyKeyStore;
|
|
15
|
-
contracts?: IContract;
|
|
16
|
-
getWalletAdapter?: getWalletAdapterFunc;
|
|
17
|
-
brokerId: string;
|
|
18
|
-
brokerName?: string;
|
|
19
|
-
networkId: NetworkId;
|
|
20
|
-
chainFilter?: filteredChains | filterChainsFunc;
|
|
21
|
-
}
|
|
22
|
-
export declare const OrderlyConfigProvider: (props: PropsWithChildren<RequireAtLeastOne<ConfigProviderProps, "brokerId" | "configStore">>) => import("react/jsx-runtime").JSX.Element | null;
|
|
23
|
-
export {};
|
|
24
|
-
//# sourceMappingURL=configProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configProvider.d.ts","sourceRoot":"","sources":["../src/configProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAM,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGnD,OAAO,EACL,WAAW,EAGX,eAAe,EACf,oBAAoB,EAMpB,SAAS,EACV,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,KAAK,EACL,SAAS,EAGV,MAAM,wBAAwB,CAAC;AAahC,KAAK,iBAAiB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACjE;KACG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CACnE,CAAC,CAAC,CAAC,CAAC;AAEP,KAAK,cAAc,GAAG;IACpB,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC;CACnB,CAAC;AAEF,KAAK,gBAAgB,GAAG,CAAC,MAAM,EAAE,WAAW,KAAK,cAAc,CAAC;AAEhE,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,SAAS,CAAC;IAErB,WAAW,CAAC,EAAE,cAAc,GAAG,gBAAgB,CAAC;CACjD;AAED,eAAO,MAAM,qBAAqB,UACzB,kBACL,kBAAkB,mBAAmB,EAAE,UAAU,GAAG,aAAa,CAAC,CACnE,mDAmGF,CAAC"}
|
package/esm/configProvider.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import React, { useEffect, useMemo } from "react";
|
|
3
|
-
import { OrderlyProvider } from "./orderlyContext";
|
|
4
|
-
import { // MemoryConfigStore,
|
|
5
|
-
DefaultConfigStore, LocalStorageStore, EtherAdapter, SimpleDI, Account } from "@orderly.network/core";
|
|
6
|
-
import useConstant from "use-constant";
|
|
7
|
-
// import { usePreLoadData } from "./usePreloadData";
|
|
8
|
-
import { DataCenterProvider } from "./dataProvider";
|
|
9
|
-
import { StatusProvider } from "./statusProvider";
|
|
10
|
-
import { SDKError } from "@orderly.network/types";
|
|
11
|
-
import { ProxyConfigStore } from "./dev/proxyConfigStore";
|
|
12
|
-
export const OrderlyConfigProvider = (props)=>{
|
|
13
|
-
const [account, setAccount] = React.useState(null);
|
|
14
|
-
const { configStore, keyStore, getWalletAdapter, brokerId, brokerName, networkId, contracts, chainFilter } = props;
|
|
15
|
-
if (!brokerId && typeof configStore === "undefined") {
|
|
16
|
-
console.error("[OrderlyConfigProvider]: brokerId is required");
|
|
17
|
-
}
|
|
18
|
-
if (typeof configStore !== "undefined" && !configStore.get("brokerId")) {
|
|
19
|
-
// console.error("[OrderlyConfigProvider]: brokerId is required");
|
|
20
|
-
throw new SDKError("if configStore is provided, brokerId is required in configStore");
|
|
21
|
-
}
|
|
22
|
-
const innerConfigStore = useConstant(()=>{
|
|
23
|
-
return new ProxyConfigStore(configStore || new DefaultConfigStore({
|
|
24
|
-
brokerId,
|
|
25
|
-
brokerName,
|
|
26
|
-
networkId
|
|
27
|
-
}));
|
|
28
|
-
});
|
|
29
|
-
const innerKeyStore = useConstant(()=>{
|
|
30
|
-
return keyStore || new LocalStorageStore(networkId);
|
|
31
|
-
});
|
|
32
|
-
const innerGetWalletAdapter = useConstant(()=>{
|
|
33
|
-
return getWalletAdapter || ((options)=>new EtherAdapter(options));
|
|
34
|
-
});
|
|
35
|
-
// check params, if has mismatch, throw warning message to console
|
|
36
|
-
// useParamsCheck({ brokerId: innerConfigStore.get("brokerId") });
|
|
37
|
-
useEffect(()=>{
|
|
38
|
-
let account = SimpleDI.get(Account.instanceName);
|
|
39
|
-
if (!account) {
|
|
40
|
-
account = new Account(innerConfigStore, innerKeyStore, innerGetWalletAdapter, {
|
|
41
|
-
contracts
|
|
42
|
-
});
|
|
43
|
-
SimpleDI.registerByName(Account.instanceName, account);
|
|
44
|
-
}
|
|
45
|
-
setAccount(account);
|
|
46
|
-
}, []);
|
|
47
|
-
const filteredChains = useMemo(()=>{
|
|
48
|
-
if (typeof chainFilter === "function") {
|
|
49
|
-
return chainFilter(innerConfigStore);
|
|
50
|
-
}
|
|
51
|
-
return chainFilter;
|
|
52
|
-
// const { mainnet, testnet } = props.chains || {};
|
|
53
|
-
// return {
|
|
54
|
-
// mainnet: mainnet || defaultMainnetChains,
|
|
55
|
-
// testnet: testnet || defaultTestnetChains,
|
|
56
|
-
// };
|
|
57
|
-
}, [
|
|
58
|
-
props.chainFilter,
|
|
59
|
-
innerConfigStore
|
|
60
|
-
]);
|
|
61
|
-
if (!account) {
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
return /*#__PURE__*/ _jsx(OrderlyProvider, {
|
|
65
|
-
value: {
|
|
66
|
-
configStore: innerConfigStore,
|
|
67
|
-
keyStore: innerKeyStore,
|
|
68
|
-
getWalletAdapter: innerGetWalletAdapter,
|
|
69
|
-
networkId: networkId,
|
|
70
|
-
filteredChains: filteredChains
|
|
71
|
-
},
|
|
72
|
-
children: /*#__PURE__*/ _jsx(StatusProvider, {
|
|
73
|
-
children: /*#__PURE__*/ _jsx(DataCenterProvider, {
|
|
74
|
-
children: props.children
|
|
75
|
-
})
|
|
76
|
-
})
|
|
77
|
-
});
|
|
78
|
-
}; // const DataPreload = () => {
|
|
79
|
-
// const { error, done } = usePreLoadData();
|
|
80
|
-
// };
|
|
81
|
-
|
|
82
|
-
//# sourceMappingURL=configProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/configProvider.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport React, { useEffect, useMemo } from \"react\";\nimport { OrderlyProvider } from \"./orderlyContext\";\nimport {\n ConfigStore,\n // MemoryConfigStore,\n DefaultConfigStore,\n OrderlyKeyStore,\n getWalletAdapterFunc,\n WalletAdapterOptions,\n LocalStorageStore,\n EtherAdapter,\n SimpleDI,\n Account,\n IContract,\n} from \"@orderly.network/core\";\n\nimport useConstant from \"use-constant\";\nimport {\n Chain,\n NetworkId,\n defaultMainnetChains,\n defaultTestnetChains,\n} from \"@orderly.network/types\";\n// import { usePreLoadData } from \"./usePreloadData\";\nimport { DataCenterProvider } from \"./dataProvider\";\nimport { StatusProvider } from \"./statusProvider\";\nimport { SDKError } from \"@orderly.network/types\";\nimport { ProxyConfigStore } from \"./dev/proxyConfigStore\";\n// import { useParamsCheck } from \"./useParamsCheck\";\n\ntype RequireOnlyOne<T, U extends keyof T = keyof T> = Omit<T, U> &\n {\n [K in U]-?: Required<Pick<T, K>> & Partial<Record<Exclude<U, K>, never>>;\n }[U];\n\ntype RequireAtLeastOne<T, R extends keyof T = keyof T> = Omit<T, R> &\n {\n [K in R]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<R, K>>>;\n }[R];\n\ntype filteredChains = {\n mainnet?: Chain[];\n testnet?: Chain[];\n};\n\ntype filterChainsFunc = (config: ConfigStore) => filteredChains;\n\nexport interface ConfigProviderProps {\n configStore?: ConfigStore;\n keyStore?: OrderlyKeyStore;\n contracts?: IContract;\n getWalletAdapter?: getWalletAdapterFunc;\n brokerId: string;\n brokerName?: string;\n networkId: NetworkId;\n\n chainFilter?: filteredChains | filterChainsFunc;\n}\n\nexport const OrderlyConfigProvider = (\n props: PropsWithChildren<\n RequireAtLeastOne<ConfigProviderProps, \"brokerId\" | \"configStore\">\n >\n) => {\n const [account, setAccount] = React.useState<Account | null>(null);\n const {\n configStore,\n keyStore,\n getWalletAdapter,\n brokerId,\n brokerName,\n networkId,\n contracts,\n chainFilter,\n } = props;\n\n if (!brokerId && typeof configStore === \"undefined\") {\n console.error(\"[OrderlyConfigProvider]: brokerId is required\");\n }\n\n if (typeof configStore !== \"undefined\" && !configStore.get(\"brokerId\")) {\n // console.error(\"[OrderlyConfigProvider]: brokerId is required\");\n throw new SDKError(\n \"if configStore is provided, brokerId is required in configStore\"\n );\n }\n\n const innerConfigStore = useConstant<ConfigStore>(() => {\n return new ProxyConfigStore(\n configStore || new DefaultConfigStore({ brokerId, brokerName, networkId })\n );\n });\n\n const innerKeyStore = useConstant<OrderlyKeyStore>(() => {\n return keyStore || new LocalStorageStore(networkId);\n });\n\n const innerGetWalletAdapter = useConstant<getWalletAdapterFunc>(() => {\n return (\n getWalletAdapter ||\n ((options: WalletAdapterOptions) => new EtherAdapter(options))\n );\n });\n\n // check params, if has mismatch, throw warning message to console\n // useParamsCheck({ brokerId: innerConfigStore.get(\"brokerId\") });\n\n useEffect(() => {\n let account = SimpleDI.get<Account>(Account.instanceName);\n\n if (!account) {\n account = new Account(\n innerConfigStore,\n innerKeyStore,\n innerGetWalletAdapter,\n {\n contracts,\n }\n );\n\n SimpleDI.registerByName(Account.instanceName, account);\n }\n\n setAccount(account);\n }, []);\n\n const filteredChains = useMemo(() => {\n if (typeof chainFilter === \"function\") {\n return chainFilter(innerConfigStore);\n }\n\n return chainFilter;\n\n // const { mainnet, testnet } = props.chains || {};\n\n // return {\n // mainnet: mainnet || defaultMainnetChains,\n // testnet: testnet || defaultTestnetChains,\n // };\n }, [props.chainFilter, innerConfigStore]);\n\n if (!account) {\n return null;\n }\n\n return (\n <OrderlyProvider\n value={{\n configStore: innerConfigStore,\n keyStore: innerKeyStore,\n getWalletAdapter: innerGetWalletAdapter,\n networkId: networkId,\n filteredChains: filteredChains,\n // apiBaseUrl,\n }}\n >\n <StatusProvider>\n <DataCenterProvider>{props.children}</DataCenterProvider>\n </StatusProvider>\n </OrderlyProvider>\n );\n};\n\n// const DataPreload = () => {\n// const { error, done } = usePreLoadData();\n// };\n"],"names":["React","useEffect","useMemo","OrderlyProvider","DefaultConfigStore","LocalStorageStore","EtherAdapter","SimpleDI","Account","useConstant","DataCenterProvider","StatusProvider","SDKError","ProxyConfigStore","OrderlyConfigProvider","props","account","setAccount","useState","configStore","keyStore","getWalletAdapter","brokerId","brokerName","networkId","contracts","chainFilter","console","error","get","innerConfigStore","innerKeyStore","innerGetWalletAdapter","options","instanceName","registerByName","filteredChains","value","children"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AACA,OAAOA,SAASC,SAAS,EAAEC,OAAO,QAAQ,QAAQ;AAClD,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAGEC,AADA,qBAAqB;AACrBA,kBAAkB,EAIlBC,iBAAiB,EACjBC,YAAY,EACZC,QAAQ,EACRC,OAAO,QAEF,wBAAwB;AAE/B,OAAOC,iBAAiB,eAAe;AAOvC,qDAAqD;AACrD,SAASC,kBAAkB,QAAQ,iBAAiB;AACpD,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,QAAQ,QAAQ,yBAAyB;AAClD,SAASC,gBAAgB,QAAQ,yBAAyB;AAgC1D,OAAO,MAAMC,wBAAwB,CACnCC;IAIA,MAAM,CAACC,SAASC,WAAW,GAAGjB,MAAMkB,QAAQ,CAAiB;IAC7D,MAAM,EACJC,WAAW,EACXC,QAAQ,EACRC,gBAAgB,EAChBC,QAAQ,EACRC,UAAU,EACVC,SAAS,EACTC,SAAS,EACTC,WAAW,EACZ,GAAGX;IAEJ,IAAI,CAACO,YAAY,OAAOH,gBAAgB,aAAa;QACnDQ,QAAQC,KAAK,CAAC;IAChB;IAEA,IAAI,OAAOT,gBAAgB,eAAe,CAACA,YAAYU,GAAG,CAAC,aAAa;QACtE,kEAAkE;QAClE,MAAM,IAAIjB,SACR;IAEJ;IAEA,MAAMkB,mBAAmBrB,YAAyB;QAChD,OAAO,IAAII,iBACTM,eAAe,IAAIf,mBAAmB;YAAEkB;YAAUC;YAAYC;QAAU;IAE5E;IAEA,MAAMO,gBAAgBtB,YAA6B;QACjD,OAAOW,YAAY,IAAIf,kBAAkBmB;IAC3C;IAEA,MAAMQ,wBAAwBvB,YAAkC;QAC9D,OACEY,oBACC,CAAA,CAACY,UAAkC,IAAI3B,aAAa2B,QAAO;IAEhE;IAEA,kEAAkE;IAClE,kEAAkE;IAElEhC,UAAU;QACR,IAAIe,UAAUT,SAASsB,GAAG,CAAUrB,QAAQ0B,YAAY;QAExD,IAAI,CAAClB,SAAS;YACZA,UAAU,IAAIR,QACZsB,kBACAC,eACAC,uBACA;gBACEP;YACF;YAGFlB,SAAS4B,cAAc,CAAC3B,QAAQ0B,YAAY,EAAElB;QAChD;QAEAC,WAAWD;IACb,GAAG,EAAE;IAEL,MAAMoB,iBAAiBlC,QAAQ;QAC7B,IAAI,OAAOwB,gBAAgB,YAAY;YACrC,OAAOA,YAAYI;QACrB;QAEA,OAAOJ;IAEP,mDAAmD;IAEnD,WAAW;IACX,8CAA8C;IAC9C,8CAA8C;IAC9C,KAAK;IACP,GAAG;QAACX,MAAMW,WAAW;QAAEI;KAAiB;IAExC,IAAI,CAACd,SAAS;QACZ,OAAO;IACT;IAEA,qBACE,KAACb;QACCkC,OAAO;YACLlB,aAAaW;YACbV,UAAUW;YACVV,kBAAkBW;YAClBR,WAAWA;YACXY,gBAAgBA;QAElB;kBAEA,cAAA,KAACzB;sBACC,cAAA,KAACD;0BAAoBK,MAAMuB,QAAQ;;;;AAI3C,EAAE,CAEF,8BAA8B;CAC9B,8CAA8C;CAC9C,KAAK"}
|
package/esm/dataProvider.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren } from "react";
|
|
2
|
-
export type getKeyFunction = (index: number, prevData: any) => string | null;
|
|
3
|
-
interface DataCenterContextState {
|
|
4
|
-
regesterKeyHandler: (key: string, handler: getKeyFunction) => void;
|
|
5
|
-
unregisterKeyHandler: (key: string) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const DataCenterContext: import("react").Context<DataCenterContextState>;
|
|
8
|
-
export declare const useDataCenterContext: () => DataCenterContextState;
|
|
9
|
-
export declare const DataCenterProvider: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=dataProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dataProvider.d.ts","sourceRoot":"","sources":["../src/dataProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAqC,MAAM,OAAO,CAAC;AAI7E,MAAM,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,MAAM,GAAG,IAAI,CAAC;AAE7E,UAAU,sBAAsB;IAK9B,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IACnE,oBAAoB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED,eAAO,MAAM,iBAAiB,iDAE7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,8BAAsC,CAAC;AAExE,eAAO,MAAM,kBAAkB,iBAAkB,iBAAiB,mDAmCjE,CAAC"}
|
package/esm/dataProvider.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, useContext, useRef } from "react";
|
|
3
|
-
import { usePrivateDataObserver } from "./orderly/usePrivateDataObserver";
|
|
4
|
-
import { usePreLoadData } from "./usePreloadData";
|
|
5
|
-
export const DataCenterContext = /*#__PURE__*/ createContext({});
|
|
6
|
-
export const useDataCenterContext = ()=>useContext(DataCenterContext);
|
|
7
|
-
export const DataCenterProvider = ({ children })=>{
|
|
8
|
-
/**
|
|
9
|
-
* preload the required data for the app
|
|
10
|
-
* hidden view while the required data is not ready
|
|
11
|
-
*/ const { error, done } = usePreLoadData();
|
|
12
|
-
const getKeyHandlerMapRef = useRef(new Map());
|
|
13
|
-
usePrivateDataObserver({
|
|
14
|
-
getKeysMap (type) {
|
|
15
|
-
return getKeyHandlerMapRef.current;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
if (error) {
|
|
19
|
-
return /*#__PURE__*/ _jsx("div", {
|
|
20
|
-
children: "Data load failed"
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
if (!done) return null;
|
|
24
|
-
return /*#__PURE__*/ _jsx(DataCenterContext.Provider, {
|
|
25
|
-
value: {
|
|
26
|
-
regesterKeyHandler: (key, fun)=>{
|
|
27
|
-
getKeyHandlerMapRef.current.set(key, fun);
|
|
28
|
-
},
|
|
29
|
-
unregisterKeyHandler: (key)=>{
|
|
30
|
-
getKeyHandlerMapRef.current.delete(key);
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
children: children
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
//# sourceMappingURL=dataProvider.js.map
|
package/esm/dataProvider.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/dataProvider.tsx"],"sourcesContent":["import { PropsWithChildren, createContext, useContext, useRef } from \"react\";\nimport { usePrivateDataObserver } from \"./orderly/usePrivateDataObserver\";\nimport { usePreLoadData } from \"./usePreloadData\";\n\nexport type getKeyFunction = (index: number, prevData: any) => string | null;\n\ninterface DataCenterContextState {\n // orders\n // positions\n // balances\n //\n regesterKeyHandler: (key: string, handler: getKeyFunction) => void;\n unregisterKeyHandler: (key: string) => void;\n}\n\nexport const DataCenterContext = createContext<DataCenterContextState>(\n {} as any\n);\n\nexport const useDataCenterContext = () => useContext(DataCenterContext);\n\nexport const DataCenterProvider = ({ children }: PropsWithChildren) => {\n /**\n * preload the required data for the app\n * hidden view while the required data is not ready\n */\n const { error, done } = usePreLoadData();\n\n const getKeyHandlerMapRef = useRef<Map<string, getKeyFunction>>(new Map());\n\n usePrivateDataObserver({\n getKeysMap(type) {\n return getKeyHandlerMapRef.current;\n },\n });\n\n if (error) {\n return <div>Data load failed</div>;\n }\n\n if (!done) return null;\n\n return (\n <DataCenterContext.Provider\n value={{\n regesterKeyHandler: (key, fun) => {\n getKeyHandlerMapRef.current.set(key, fun);\n },\n unregisterKeyHandler: (key) => {\n getKeyHandlerMapRef.current.delete(key);\n },\n }}\n >\n {children}\n </DataCenterContext.Provider>\n );\n};\n"],"names":["createContext","useContext","useRef","usePrivateDataObserver","usePreLoadData","DataCenterContext","useDataCenterContext","DataCenterProvider","children","error","done","getKeyHandlerMapRef","Map","getKeysMap","type","current","div","Provider","value","regesterKeyHandler","key","fun","set","unregisterKeyHandler","delete"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,SAA4BA,aAAa,EAAEC,UAAU,EAAEC,MAAM,QAAQ,QAAQ;AAC7E,SAASC,sBAAsB,QAAQ,mCAAmC;AAC1E,SAASC,cAAc,QAAQ,mBAAmB;AAalD,OAAO,MAAMC,kCAAoBL,cAC/B,CAAC,GACD;AAEF,OAAO,MAAMM,uBAAuB,IAAML,WAAWI,mBAAmB;AAExE,OAAO,MAAME,qBAAqB,CAAC,EAAEC,QAAQ,EAAqB;IAChE;;;GAGC,GACD,MAAM,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGN;IAExB,MAAMO,sBAAsBT,OAAoC,IAAIU;IAEpET,uBAAuB;QACrBU,YAAWC,IAAI;YACb,OAAOH,oBAAoBI,OAAO;QACpC;IACF;IAEA,IAAIN,OAAO;QACT,qBAAO,KAACO;sBAAI;;IACd;IAEA,IAAI,CAACN,MAAM,OAAO;IAElB,qBACE,KAACL,kBAAkBY,QAAQ;QACzBC,OAAO;YACLC,oBAAoB,CAACC,KAAKC;gBACxBV,oBAAoBI,OAAO,CAACO,GAAG,CAACF,KAAKC;YACvC;YACAE,sBAAsB,CAACH;gBACrBT,oBAAoBI,OAAO,CAACS,MAAM,CAACJ;YACrC;QACF;kBAECZ;;AAGP,EAAE"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ConfigKey, ConfigStore } from "@orderly.network/core";
|
|
2
|
-
export declare class ProxyConfigStore implements ConfigStore {
|
|
3
|
-
private readonly _originConfigStore;
|
|
4
|
-
private _proxyConfigStore?;
|
|
5
|
-
constructor(_originConfigStore: ConfigStore);
|
|
6
|
-
get<T>(key: ConfigKey): T;
|
|
7
|
-
getOr<T>(key: ConfigKey, defaultValue: T): T;
|
|
8
|
-
set<T>(key: ConfigKey, value: T): void;
|
|
9
|
-
clear(): void;
|
|
10
|
-
getFromOrigin<T>(key: ConfigKey): T;
|
|
11
|
-
getOrFromOrigin<T>(key: ConfigKey, defaultValue: T): T;
|
|
12
|
-
setToOrigin<T>(key: ConfigKey, value: T): void;
|
|
13
|
-
clearOrigin(): void;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=proxyConfigStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proxyConfigStore.d.ts","sourceRoot":"","sources":["../../src/dev/proxyConfigStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAG/D,qBAAa,gBAAiB,YAAW,WAAW;IAGtC,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IAF/C,OAAO,CAAC,iBAAiB,CAAC,CAAc;gBAEX,kBAAkB,EAAE,WAAW;IAO5D,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,SAAS,GAAG,CAAC;IAQzB,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC,GAAG,CAAC;IAO5C,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI;IAItC,KAAK,IAAI,IAAI;IAIb,aAAa,CAAC,CAAC,EAAE,GAAG,EAAE,SAAS,GAAG,CAAC;IAInC,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC,GAAG,CAAC;IAItD,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI;IAI9C,WAAW,IAAI,IAAI;CAGpB"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { windowGuard } from "@orderly.network/utils";
|
|
2
|
-
export class ProxyConfigStore {
|
|
3
|
-
_originConfigStore;
|
|
4
|
-
_proxyConfigStore;
|
|
5
|
-
constructor(_originConfigStore){
|
|
6
|
-
this._originConfigStore = _originConfigStore;
|
|
7
|
-
windowGuard(()=>{
|
|
8
|
-
this._proxyConfigStore = window.__ORDERLY_CONFIG_STORE__ || _originConfigStore;
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
get(key) {
|
|
12
|
-
const value = this._proxyConfigStore?.get(key);
|
|
13
|
-
if (typeof value === "undefined") {
|
|
14
|
-
return this._originConfigStore.get(key);
|
|
15
|
-
}
|
|
16
|
-
return value;
|
|
17
|
-
}
|
|
18
|
-
getOr(key, defaultValue) {
|
|
19
|
-
return (this._proxyConfigStore ?? this._originConfigStore).getOr(key, defaultValue);
|
|
20
|
-
}
|
|
21
|
-
set(key, value) {
|
|
22
|
-
(this._proxyConfigStore ?? this._originConfigStore).set(key, value);
|
|
23
|
-
}
|
|
24
|
-
clear() {
|
|
25
|
-
throw new Error("Method not implemented.");
|
|
26
|
-
}
|
|
27
|
-
getFromOrigin(key) {
|
|
28
|
-
return this._originConfigStore.get(key);
|
|
29
|
-
}
|
|
30
|
-
getOrFromOrigin(key, defaultValue) {
|
|
31
|
-
return this._originConfigStore.getOr(key, defaultValue);
|
|
32
|
-
}
|
|
33
|
-
setToOrigin(key, value) {
|
|
34
|
-
this._originConfigStore.set(key, value);
|
|
35
|
-
}
|
|
36
|
-
clearOrigin() {
|
|
37
|
-
this._originConfigStore.clear();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
//# sourceMappingURL=proxyConfigStore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/dev/proxyConfigStore.ts"],"sourcesContent":["import { ConfigKey, ConfigStore } from \"@orderly.network/core\";\nimport { windowGuard } from \"@orderly.network/utils\";\n\nexport class ProxyConfigStore implements ConfigStore {\n private _proxyConfigStore?: ConfigStore;\n\n constructor(private readonly _originConfigStore: ConfigStore) {\n windowGuard(() => {\n this._proxyConfigStore =\n (window as any).__ORDERLY_CONFIG_STORE__ || _originConfigStore;\n });\n }\n\n get<T>(key: ConfigKey): T {\n const value = this._proxyConfigStore?.get(key);\n if (typeof value === \"undefined\") {\n return this._originConfigStore.get(key);\n }\n return value as T;\n }\n\n getOr<T>(key: ConfigKey, defaultValue: T): T {\n return (this._proxyConfigStore ?? this._originConfigStore).getOr(\n key,\n defaultValue\n );\n }\n\n set<T>(key: ConfigKey, value: T): void {\n (this._proxyConfigStore ?? this._originConfigStore).set(key, value);\n }\n\n clear(): void {\n throw new Error(\"Method not implemented.\");\n }\n\n getFromOrigin<T>(key: ConfigKey): T {\n return this._originConfigStore.get(key);\n }\n\n getOrFromOrigin<T>(key: ConfigKey, defaultValue: T): T {\n return this._originConfigStore.getOr(key, defaultValue);\n }\n\n setToOrigin<T>(key: ConfigKey, value: T): void {\n this._originConfigStore.set(key, value);\n }\n\n clearOrigin(): void {\n this._originConfigStore.clear();\n }\n}\n"],"names":["windowGuard","ProxyConfigStore","_proxyConfigStore","constructor","_originConfigStore","window","__ORDERLY_CONFIG_STORE__","get","key","value","getOr","defaultValue","set","clear","Error","getFromOrigin","getOrFromOrigin","setToOrigin","clearOrigin"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AACA,SAASA,WAAW,QAAQ,yBAAyB;AAErD,OAAO,MAAMC;;IACHC,kBAAgC;IAExCC,YAAY,AAAiBC,kBAA+B,CAAE;aAAjCA,qBAAAA;QAC3BJ,YAAY;YACV,IAAI,CAACE,iBAAiB,GACpB,AAACG,OAAeC,wBAAwB,IAAIF;QAChD;IACF;IAEAG,IAAOC,GAAc,EAAK;QACxB,MAAMC,QAAQ,IAAI,CAACP,iBAAiB,EAAEK,IAAIC;QAC1C,IAAI,OAAOC,UAAU,aAAa;YAChC,OAAO,IAAI,CAACL,kBAAkB,CAACG,GAAG,CAACC;QACrC;QACA,OAAOC;IACT;IAEAC,MAASF,GAAc,EAAEG,YAAe,EAAK;QAC3C,OAAO,AAAC,CAAA,IAAI,CAACT,iBAAiB,IAAI,IAAI,CAACE,kBAAkB,AAAD,EAAGM,KAAK,CAC9DF,KACAG;IAEJ;IAEAC,IAAOJ,GAAc,EAAEC,KAAQ,EAAQ;QACpC,CAAA,IAAI,CAACP,iBAAiB,IAAI,IAAI,CAACE,kBAAkB,AAAD,EAAGQ,GAAG,CAACJ,KAAKC;IAC/D;IAEAI,QAAc;QACZ,MAAM,IAAIC,MAAM;IAClB;IAEAC,cAAiBP,GAAc,EAAK;QAClC,OAAO,IAAI,CAACJ,kBAAkB,CAACG,GAAG,CAACC;IACrC;IAEAQ,gBAAmBR,GAAc,EAAEG,YAAe,EAAK;QACrD,OAAO,IAAI,CAACP,kBAAkB,CAACM,KAAK,CAACF,KAAKG;IAC5C;IAEAM,YAAeT,GAAc,EAAEC,KAAQ,EAAQ;QAC7C,IAAI,CAACL,kBAAkB,CAACQ,GAAG,CAACJ,KAAKC;IACnC;IAEAS,cAAoB;QAClB,IAAI,CAACd,kBAAkB,CAACS,KAAK;IAC/B;AACF"}
|
package/esm/index.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export { default as version } from "./version";
|
|
2
|
-
export { useQuery } from "./useQuery";
|
|
3
|
-
export { useLazyQuery } from "./useLazyQuery";
|
|
4
|
-
export { useMutation } from "./useMutation";
|
|
5
|
-
export { usePrivateQuery } from "./usePrivateQuery";
|
|
6
|
-
export { usePrivateInfiniteQuery } from "./usePrivateInfiniteQuery";
|
|
7
|
-
export { useBoolean } from "./useBoolean";
|
|
8
|
-
export { useAccount } from "./useAccount";
|
|
9
|
-
export { useAccountInstance } from "./useAccountInstance";
|
|
10
|
-
export { usePreLoadData } from "./usePreloadData";
|
|
11
|
-
export { useEventEmitter } from "./useEventEmitter";
|
|
12
|
-
export { useSessionStorage } from "./useSessionStorage";
|
|
13
|
-
export { useLocalStorage } from "./useLocalStorage";
|
|
14
|
-
export { parseJSON } from "./utils/json";
|
|
15
|
-
export { default as useConstant } from "use-constant";
|
|
16
|
-
export { useWS } from "./useWS";
|
|
17
|
-
export { useConfig } from "./useConfig";
|
|
18
|
-
export * from "./orderlyContext";
|
|
19
|
-
export * from "./statusProvider";
|
|
20
|
-
export { useWsStatus, WsNetworkStatus } from "./useWsStatus";
|
|
21
|
-
export type { ConfigProviderProps } from "./configProvider";
|
|
22
|
-
export { OrderlyConfigProvider } from "./configProvider";
|
|
23
|
-
export { WalletConnectorContext, useWalletConnector, } from "./walletConnectorContext";
|
|
24
|
-
export * from "./orderly/orderlyHooks";
|
|
25
|
-
import useSWR, { type SWRConfiguration, SWRConfig, useSWRConfig, unstable_serialize } from "swr";
|
|
26
|
-
export { useSWR, SWRConfig, useSWRConfig, type SWRConfiguration, unstable_serialize, };
|
|
27
|
-
export * from "use-debounce";
|
|
28
|
-
export { useMediaQuery } from "./useMediaQuery";
|
|
29
|
-
export { usePoster } from "./usePoster";
|
|
30
|
-
export { DefaultLayoutConfig } from "./services/painter/layout.config";
|
|
31
|
-
export type { PosterLayoutConfig, DrawOptions, } from "./services/painter/basePaint";
|
|
32
|
-
export * from "./orderly/orderlyHooks";
|
|
33
|
-
export { cleanStringStyle } from "./utils/orderEntryHelper";
|
|
34
|
-
export { checkNotional } from "./utils/createOrder";
|
|
35
|
-
export * as utils from "./utils";
|
|
36
|
-
export type { WalletAdapter } from "@orderly.network/core";
|
|
37
|
-
export * from "./referral";
|
|
38
|
-
//# sourceMappingURL=index.d.ts.map
|
package/esm/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC7D,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EACL,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,0BAA0B,CAAC;AAElC,cAAc,wBAAwB,CAAC;AAEvC,OAAO,MAAM,EAAE,EACb,KAAK,gBAAgB,EACrB,SAAS,EACT,YAAY,EACZ,kBAAkB,EACnB,MAAM,KAAK,CAAC;AAEb,OAAO,EACL,MAAM,EACN,SAAS,EACT,YAAY,EACZ,KAAK,gBAAgB,EACrB,kBAAkB,GACnB,CAAC;AAEF,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,YAAY,EACV,kBAAkB,EAClB,WAAW,GACZ,MAAM,8BAA8B,CAAC;AAEtC,cAAc,wBAAwB,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG3D,cAAc,YAAY,CAAC"}
|
package/esm/index.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// import "./utils/dev";
|
|
2
|
-
export { default as version } from "./version";
|
|
3
|
-
export { useQuery } from "./useQuery";
|
|
4
|
-
export { useLazyQuery } from "./useLazyQuery";
|
|
5
|
-
export { useMutation } from "./useMutation";
|
|
6
|
-
export { usePrivateQuery } from "./usePrivateQuery";
|
|
7
|
-
export { usePrivateInfiniteQuery } from "./usePrivateInfiniteQuery";
|
|
8
|
-
export { useBoolean } from "./useBoolean";
|
|
9
|
-
export { useAccount } from "./useAccount";
|
|
10
|
-
export { useAccountInstance } from "./useAccountInstance";
|
|
11
|
-
export { usePreLoadData } from "./usePreloadData";
|
|
12
|
-
export { useEventEmitter } from "./useEventEmitter";
|
|
13
|
-
export { useSessionStorage } from "./useSessionStorage";
|
|
14
|
-
export { useLocalStorage } from "./useLocalStorage";
|
|
15
|
-
export { parseJSON } from "./utils/json";
|
|
16
|
-
export { default as useConstant } from "use-constant";
|
|
17
|
-
export { useWS } from "./useWS";
|
|
18
|
-
export { useConfig } from "./useConfig";
|
|
19
|
-
export * from "./orderlyContext";
|
|
20
|
-
export * from "./statusProvider";
|
|
21
|
-
export { useWsStatus, WsNetworkStatus } from "./useWsStatus";
|
|
22
|
-
export { OrderlyConfigProvider } from "./configProvider";
|
|
23
|
-
export { WalletConnectorContext, useWalletConnector } from "./walletConnectorContext";
|
|
24
|
-
export * from "./orderly/orderlyHooks";
|
|
25
|
-
import useSWR, { SWRConfig, useSWRConfig, unstable_serialize } from "swr";
|
|
26
|
-
export { useSWR, SWRConfig, useSWRConfig, unstable_serialize };
|
|
27
|
-
export * from "use-debounce";
|
|
28
|
-
export { useMediaQuery } from "./useMediaQuery";
|
|
29
|
-
export { usePoster } from "./usePoster";
|
|
30
|
-
export { DefaultLayoutConfig } from "./services/painter/layout.config";
|
|
31
|
-
export * from "./orderly/orderlyHooks";
|
|
32
|
-
export { cleanStringStyle } from "./utils/orderEntryHelper";
|
|
33
|
-
export { checkNotional } from "./utils/createOrder";
|
|
34
|
-
export * as utils from "./utils";
|
|
35
|
-
export * from "./referral";
|
|
36
|
-
|
|
37
|
-
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// import \"./utils/dev\";\n\nexport { default as version } from \"./version\";\n\nexport { useQuery } from \"./useQuery\";\nexport { useLazyQuery } from \"./useLazyQuery\";\nexport { useMutation } from \"./useMutation\";\nexport { usePrivateQuery } from \"./usePrivateQuery\";\nexport { usePrivateInfiniteQuery } from \"./usePrivateInfiniteQuery\";\nexport { useBoolean } from \"./useBoolean\";\n\nexport { useAccount } from \"./useAccount\";\nexport { useAccountInstance } from \"./useAccountInstance\";\n\nexport { usePreLoadData } from \"./usePreloadData\";\n\nexport { useEventEmitter } from \"./useEventEmitter\";\n\nexport { useSessionStorage } from \"./useSessionStorage\";\nexport { useLocalStorage } from \"./useLocalStorage\";\n\nexport { parseJSON } from \"./utils/json\";\n\nexport { default as useConstant } from \"use-constant\";\nexport { useWS } from \"./useWS\";\nexport { useConfig } from \"./useConfig\";\n\nexport * from \"./orderlyContext\";\nexport * from \"./statusProvider\";\nexport { useWsStatus, WsNetworkStatus } from \"./useWsStatus\";\nexport type { ConfigProviderProps } from \"./configProvider\";\nexport { OrderlyConfigProvider } from \"./configProvider\";\n\nexport {\n WalletConnectorContext,\n useWalletConnector,\n} from \"./walletConnectorContext\";\n\nexport * from \"./orderly/orderlyHooks\";\n\nimport useSWR, {\n type SWRConfiguration,\n SWRConfig,\n useSWRConfig,\n unstable_serialize,\n} from \"swr\";\n\nexport {\n useSWR,\n SWRConfig,\n useSWRConfig,\n type SWRConfiguration,\n unstable_serialize,\n};\n\nexport * from \"use-debounce\";\n\nexport { useMediaQuery } from \"./useMediaQuery\";\n\nexport { usePoster } from \"./usePoster\";\nexport { DefaultLayoutConfig } from \"./services/painter/layout.config\";\nexport type {\n PosterLayoutConfig,\n DrawOptions,\n} from \"./services/painter/basePaint\";\n\nexport * from \"./orderly/orderlyHooks\";\n\nexport { cleanStringStyle } from \"./utils/orderEntryHelper\";\nexport { checkNotional } from \"./utils/createOrder\";\n\nexport * as utils from \"./utils\";\n\nexport type { WalletAdapter } from \"@orderly.network/core\";\n\n\nexport * from \"./referral\";"],"names":["default","version","useQuery","useLazyQuery","useMutation","usePrivateQuery","usePrivateInfiniteQuery","useBoolean","useAccount","useAccountInstance","usePreLoadData","useEventEmitter","useSessionStorage","useLocalStorage","parseJSON","useConstant","useWS","useConfig","useWsStatus","WsNetworkStatus","OrderlyConfigProvider","WalletConnectorContext","useWalletConnector","useSWR","SWRConfig","useSWRConfig","unstable_serialize","useMediaQuery","usePoster","DefaultLayoutConfig","cleanStringStyle","checkNotional","utils"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,wBAAwB;AAExB,SAASA,WAAWC,OAAO,QAAQ,YAAY;AAE/C,SAASC,QAAQ,QAAQ,aAAa;AACtC,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,eAAe,QAAQ,oBAAoB;AACpD,SAASC,uBAAuB,QAAQ,4BAA4B;AACpE,SAASC,UAAU,QAAQ,eAAe;AAE1C,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,kBAAkB,QAAQ,uBAAuB;AAE1D,SAASC,cAAc,QAAQ,mBAAmB;AAElD,SAASC,eAAe,QAAQ,oBAAoB;AAEpD,SAASC,iBAAiB,QAAQ,sBAAsB;AACxD,SAASC,eAAe,QAAQ,oBAAoB;AAEpD,SAASC,SAAS,QAAQ,eAAe;AAEzC,SAASd,WAAWe,WAAW,QAAQ,eAAe;AACtD,SAASC,KAAK,QAAQ,UAAU;AAChC,SAASC,SAAS,QAAQ,cAAc;AAExC,cAAc,mBAAmB;AACjC,cAAc,mBAAmB;AACjC,SAASC,WAAW,EAAEC,eAAe,QAAQ,gBAAgB;AAE7D,SAASC,qBAAqB,QAAQ,mBAAmB;AAEzD,SACEC,sBAAsB,EACtBC,kBAAkB,QACb,2BAA2B;AAElC,cAAc,yBAAyB;AAEvC,OAAOC,UAELC,SAAS,EACTC,YAAY,EACZC,kBAAkB,QACb,MAAM;AAEb,SACEH,MAAM,EACNC,SAAS,EACTC,YAAY,EAEZC,kBAAkB,GAClB;AAEF,cAAc,eAAe;AAE7B,SAASC,aAAa,QAAQ,kBAAkB;AAEhD,SAASC,SAAS,QAAQ,cAAc;AACxC,SAASC,mBAAmB,QAAQ,mCAAmC;AAMvE,cAAc,yBAAyB;AAEvC,SAASC,gBAAgB,QAAQ,2BAA2B;AAC5D,SAASC,aAAa,QAAQ,sBAAsB;AAEpD,OAAO,KAAKC,KAAK,MAAM,UAAU;AAKjC,cAAc,aAAa"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"signatureMiddleware.d.ts","sourceRoot":"","sources":["../../src/middleware/signatureMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,UAAU,EAAE,MAAM,KAAK,CAAC;AAK1C,eAAO,MAAM,mBAAmB,EAAE,UAiCjC,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { SimpleDI } from "@orderly.network/core";
|
|
2
|
-
import { useConfig } from "../useConfig";
|
|
3
|
-
import { getTimestamp } from "@orderly.network/utils";
|
|
4
|
-
export const signatureMiddleware = (useSWRNext)=>{
|
|
5
|
-
const apiBaseUrl = useConfig("apiBaseUrl");
|
|
6
|
-
return (key, fetcher, config)=>{
|
|
7
|
-
try {
|
|
8
|
-
const extendedFetcher = async (args)=>{
|
|
9
|
-
let url = Array.isArray(args) ? args[0] : args;
|
|
10
|
-
let account = SimpleDI.get("account");
|
|
11
|
-
let fullUrl = `${apiBaseUrl}${url}`;
|
|
12
|
-
const signer = account.signer;
|
|
13
|
-
const payload = {
|
|
14
|
-
method: "GET",
|
|
15
|
-
url
|
|
16
|
-
};
|
|
17
|
-
const signature = await signer.sign(payload, getTimestamp());
|
|
18
|
-
// @ts-ignore
|
|
19
|
-
return fetcher(fullUrl, {
|
|
20
|
-
headers: {
|
|
21
|
-
...signature,
|
|
22
|
-
"orderly-account-id": account.accountId
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
return useSWRNext(key, extendedFetcher, config);
|
|
27
|
-
} catch (e) {
|
|
28
|
-
console.error("signature error:", e);
|
|
29
|
-
throw e;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
//# sourceMappingURL=signatureMiddleware.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/middleware/signatureMiddleware.ts"],"sourcesContent":["import { SWRHook, Middleware } from \"swr\";\nimport { SimpleDI, Account, MessageFactor } from \"@orderly.network/core\";\nimport { useConfig } from \"../useConfig\";\nimport { getTimestamp } from \"@orderly.network/utils\";\n\nexport const signatureMiddleware: Middleware = (useSWRNext: SWRHook) => {\n const apiBaseUrl = useConfig(\"apiBaseUrl\");\n return (key, fetcher, config) => {\n try {\n const extendedFetcher = async (args: any) => {\n let url = Array.isArray(args) ? args[0] : args;\n\n let account = SimpleDI.get<Account>(\"account\");\n let fullUrl = `${apiBaseUrl}${url}`;\n\n const signer = account.signer;\n\n const payload: MessageFactor = {\n method: \"GET\",\n url,\n };\n\n const signature = await signer.sign(payload, getTimestamp());\n\n // @ts-ignore\n return fetcher(fullUrl, {\n headers: {\n ...signature,\n \"orderly-account-id\": account.accountId,\n },\n });\n };\n return useSWRNext(key, extendedFetcher, config);\n } catch (e) {\n console.error(\"signature error:\", e);\n throw e;\n }\n };\n};\n"],"names":["SimpleDI","useConfig","getTimestamp","signatureMiddleware","useSWRNext","apiBaseUrl","key","fetcher","config","extendedFetcher","args","url","Array","isArray","account","get","fullUrl","signer","payload","method","signature","sign","headers","accountId","e","console","error"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AACA,SAASA,QAAQ,QAAgC,wBAAwB;AACzE,SAASC,SAAS,QAAQ,eAAe;AACzC,SAASC,YAAY,QAAQ,yBAAyB;AAEtD,OAAO,MAAMC,sBAAkC,CAACC;IAC9C,MAAMC,aAAaJ,UAAU;IAC7B,OAAO,CAACK,KAAKC,SAASC;QACpB,IAAI;YACF,MAAMC,kBAAkB,OAAOC;gBAC7B,IAAIC,MAAMC,MAAMC,OAAO,CAACH,QAAQA,IAAI,CAAC,EAAE,GAAGA;gBAE1C,IAAII,UAAUd,SAASe,GAAG,CAAU;gBACpC,IAAIC,UAAU,CAAC,EAAEX,WAAW,EAAEM,IAAI,CAAC;gBAEnC,MAAMM,SAASH,QAAQG,MAAM;gBAE7B,MAAMC,UAAyB;oBAC7BC,QAAQ;oBACRR;gBACF;gBAEA,MAAMS,YAAY,MAAMH,OAAOI,IAAI,CAACH,SAAShB;gBAE7C,aAAa;gBACb,OAAOK,QAAQS,SAAS;oBACtBM,SAAS;wBACP,GAAGF,SAAS;wBACZ,sBAAsBN,QAAQS,SAAS;oBACzC;gBACF;YACF;YACA,OAAOnB,WAAWE,KAAKG,iBAAiBD;QAC1C,EAAE,OAAOgB,GAAG;YACVC,QAAQC,KAAK,CAAC,oBAAoBF;YAClC,MAAMA;QACR;IACF;AACF,EAAE"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export interface RawOrderBook {
|
|
2
|
-
asks: [number, number][];
|
|
3
|
-
bids: [number, number][];
|
|
4
|
-
ts: number;
|
|
5
|
-
}
|
|
6
|
-
export interface RawOrderBookUpdate {
|
|
7
|
-
asks: [number, number][];
|
|
8
|
-
bids: [number, number][];
|
|
9
|
-
prevTs: number;
|
|
10
|
-
ts: number;
|
|
11
|
-
}
|
|
12
|
-
export declare const defaultRawOrderBook: RawOrderBook;
|
|
13
|
-
declare class OrderbookService {
|
|
14
|
-
private static instance;
|
|
15
|
-
private bufferedOrderBookUpdates;
|
|
16
|
-
private rawOrderBook;
|
|
17
|
-
constructor();
|
|
18
|
-
static getInstance(): OrderbookService;
|
|
19
|
-
private sortBufferedOrderBookUpdates;
|
|
20
|
-
private applyUpdateToRawOrderBook;
|
|
21
|
-
private applyBufferedUpdatesToRawOrderBooks;
|
|
22
|
-
private deleteBufferedOrderBookUpdates;
|
|
23
|
-
private commitOrderBook;
|
|
24
|
-
private pushUpdateToBuffer;
|
|
25
|
-
private isValidFullOrderBook;
|
|
26
|
-
setFullOrderbook(symbol: string, rawOrderbook: RawOrderBook): void;
|
|
27
|
-
updateOrderbook(symbol: string, update: RawOrderBookUpdate, callback: () => void): void;
|
|
28
|
-
getRawOrderbook(symbol: string): RawOrderBook;
|
|
29
|
-
resetOrderBook(symbol: string): void;
|
|
30
|
-
}
|
|
31
|
-
declare const orderBookService: OrderbookService;
|
|
32
|
-
export default orderBookService;
|
|
33
|
-
//# sourceMappingURL=orderbook.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orderbook.service.d.ts","sourceRoot":"","sources":["../../src/orderly/orderbook.service.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IACzB,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IACzB,EAAE,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IACzB,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,mBAAmB,EAAE,YAIjC,CAAC;AAEF,cAAM,gBAAgB;IAClB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAmB;IAC1C,OAAO,CAAC,wBAAwB,CAAkD;IAClF,OAAO,CAAC,YAAY,CAA0C;;IAK9D,MAAM,CAAC,WAAW;IAOlB,OAAO,CAAC,4BAA4B;IAIpC,OAAO,CAAC,yBAAyB;IAqBjC,OAAO,CAAC,mCAAmC;IAI3C,OAAO,CAAC,8BAA8B;IAItC,OAAO,CAAC,eAAe;IAsBvB,OAAO,CAAC,kBAAkB;IAgB1B,OAAO,CAAC,oBAAoB;IAU5B,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY;IAY3D,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,IAAI;IAwBhF,eAAe,CAAC,MAAM,EAAE,MAAM;IAIvB,cAAc,CAAC,MAAM,EAAE,MAAM;CAOvC;AAED,QAAA,MAAM,gBAAgB,kBAAiC,CAAC;AAExD,eAAe,gBAAgB,CAAC"}
|