@orderly.network/hooks 1.0.25-alpha.0 → 1.0.25-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +7 -61
- package/dist/index.d.ts +7 -61
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -10,7 +10,7 @@ export { default as useConstant } from 'use-constant';
|
|
|
10
10
|
import { WS } from '@orderly.network/net';
|
|
11
11
|
import * as react from 'react';
|
|
12
12
|
import { PropsWithChildren } from 'react';
|
|
13
|
-
import { NetworkId, OrderSide, OrderEntity, API, WSMessage, OrderStatus
|
|
13
|
+
import { NetworkId, OrderSide, OrderEntity, API, WSMessage, OrderStatus } from '@orderly.network/types';
|
|
14
14
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
15
15
|
import * as swr_subscription from 'swr/subscription';
|
|
16
16
|
import { Decimal } from '@orderly.network/utils';
|
|
@@ -212,11 +212,7 @@ declare const useMarkPrice: (symbol: string) => swr_subscription.SWRSubscription
|
|
|
212
212
|
|
|
213
213
|
declare const useIndexPrice: (symbol: string) => swr_subscription.SWRSubscriptionResponse<any, any>;
|
|
214
214
|
|
|
215
|
-
declare const useLeverage: () =>
|
|
216
|
-
update: (data: any) => Promise<unknown>;
|
|
217
|
-
config: number[];
|
|
218
|
-
isMutating: boolean;
|
|
219
|
-
}];
|
|
215
|
+
declare const useLeverage: () => any;
|
|
220
216
|
|
|
221
217
|
declare const useTickerStream: (symbol: string) => API.MarketInfo;
|
|
222
218
|
|
|
@@ -307,7 +303,9 @@ declare const useChains: (networkId?: NetworkId, options?: inputOptions & SWRCon
|
|
|
307
303
|
}, {
|
|
308
304
|
readonly findByChainId: (chainId: number, field?: string) => (API.Chain & {
|
|
309
305
|
nativeToken?: API.TokenInfo | undefined;
|
|
310
|
-
}) |
|
|
306
|
+
}) | (<K extends never>(prop: K) => ((API.Chain & {
|
|
307
|
+
nativeToken?: API.TokenInfo | undefined;
|
|
308
|
+
}) | undefined)[K]) | undefined;
|
|
311
309
|
readonly error: any;
|
|
312
310
|
}];
|
|
313
311
|
|
|
@@ -398,61 +396,9 @@ declare const useWooCrossSwapQuery: () => {
|
|
|
398
396
|
};
|
|
399
397
|
|
|
400
398
|
/** @hidden */
|
|
401
|
-
declare
|
|
402
|
-
INITIALIZING = "WAITTING",
|
|
403
|
-
INFLIGHT = "INFLIGHT",
|
|
404
|
-
DELIVERED = "DELIVERED",
|
|
405
|
-
FAILED = "FAILED"
|
|
406
|
-
}
|
|
407
|
-
/** @hidden */
|
|
408
|
-
declare const useCrossSwap: () => {
|
|
409
|
-
swap: (inputs: {
|
|
410
|
-
address: string;
|
|
411
|
-
crossChainRouteAddress: string;
|
|
412
|
-
src: {
|
|
413
|
-
fromToken: string;
|
|
414
|
-
fromAmount: bigint;
|
|
415
|
-
bridgeToken: string;
|
|
416
|
-
minBridgeAmount: bigint;
|
|
417
|
-
};
|
|
418
|
-
dst: {
|
|
419
|
-
chainId: string;
|
|
420
|
-
bridgedToken: string;
|
|
421
|
-
toToken: string;
|
|
422
|
-
minToAmount: bigint;
|
|
423
|
-
airdropNativeAmount: bigint;
|
|
424
|
-
};
|
|
425
|
-
}) => Promise<{
|
|
426
|
-
readonly hash: string;
|
|
427
|
-
readonly to: string | null;
|
|
428
|
-
readonly from: string;
|
|
429
|
-
readonly value: bigint;
|
|
430
|
-
} | undefined>;
|
|
431
|
-
loading: boolean;
|
|
432
|
-
bridgeStatus: MessageStatus;
|
|
433
|
-
status: WS_WalletStatusEnum;
|
|
434
|
-
message: any;
|
|
435
|
-
};
|
|
399
|
+
declare const useCrossSwap: () => any;
|
|
436
400
|
|
|
437
401
|
/** @hidden */
|
|
438
|
-
declare const useSwap: () =>
|
|
439
|
-
swap: (woofiDexDepositorAdress: string, inputs: {
|
|
440
|
-
fromToken: string;
|
|
441
|
-
fromAmount: string;
|
|
442
|
-
toToken: string;
|
|
443
|
-
minToAmount: string;
|
|
444
|
-
orderlyNativeFees: bigint;
|
|
445
|
-
}, config: {
|
|
446
|
-
dst: any;
|
|
447
|
-
src: any;
|
|
448
|
-
}) => Promise<{
|
|
449
|
-
readonly hash: string;
|
|
450
|
-
readonly to: string | null;
|
|
451
|
-
readonly from: string;
|
|
452
|
-
readonly value: bigint;
|
|
453
|
-
} | undefined>;
|
|
454
|
-
loading: boolean;
|
|
455
|
-
status: WS_WalletStatusEnum;
|
|
456
|
-
};
|
|
402
|
+
declare const useSwap: () => any;
|
|
457
403
|
|
|
458
404
|
export { ConfigProviderProps, OrderlyConfigContextState, OrderlyConfigProvider, OrderlyContext, OrderlyProvider, WalletConnectorContext, useAccount, useAccountInfo, useAccountInstance, useBoolean, useChain, useChains, useCollateral, useConfig, useCrossSwap, useDeposit, useEventEmitter, useFundingRate, useHoldingStream, useIndexPrice, useLazyQuery, useLeverage, useLocalStorage, useMarginRatio, useMarkPrice, useMarkPricesStream, useMarketTradeStream, useMarketsStream, useMaxQty, useMediaQuery, useMutation, useOrderEntry, useOrderStream, useOrderbookStream, usePositionStream, usePreLoadData, usePrivateDataObserver, usePrivateInfiniteQuery, usePrivateQuery, useQuery, useSessionStorage, useSettleSubscription, useSwap, useSymbolsInfo, useTickerStream, useWS, useWalletConnector, useWalletSubscription, useWithdraw, useWooCrossSwapQuery, useWooSwapQuery };
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export { default as useConstant } from 'use-constant';
|
|
|
10
10
|
import { WS } from '@orderly.network/net';
|
|
11
11
|
import * as react from 'react';
|
|
12
12
|
import { PropsWithChildren } from 'react';
|
|
13
|
-
import { NetworkId, OrderSide, OrderEntity, API, WSMessage, OrderStatus
|
|
13
|
+
import { NetworkId, OrderSide, OrderEntity, API, WSMessage, OrderStatus } from '@orderly.network/types';
|
|
14
14
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
15
15
|
import * as swr_subscription from 'swr/subscription';
|
|
16
16
|
import { Decimal } from '@orderly.network/utils';
|
|
@@ -212,11 +212,7 @@ declare const useMarkPrice: (symbol: string) => swr_subscription.SWRSubscription
|
|
|
212
212
|
|
|
213
213
|
declare const useIndexPrice: (symbol: string) => swr_subscription.SWRSubscriptionResponse<any, any>;
|
|
214
214
|
|
|
215
|
-
declare const useLeverage: () =>
|
|
216
|
-
update: (data: any) => Promise<unknown>;
|
|
217
|
-
config: number[];
|
|
218
|
-
isMutating: boolean;
|
|
219
|
-
}];
|
|
215
|
+
declare const useLeverage: () => any;
|
|
220
216
|
|
|
221
217
|
declare const useTickerStream: (symbol: string) => API.MarketInfo;
|
|
222
218
|
|
|
@@ -307,7 +303,9 @@ declare const useChains: (networkId?: NetworkId, options?: inputOptions & SWRCon
|
|
|
307
303
|
}, {
|
|
308
304
|
readonly findByChainId: (chainId: number, field?: string) => (API.Chain & {
|
|
309
305
|
nativeToken?: API.TokenInfo | undefined;
|
|
310
|
-
}) |
|
|
306
|
+
}) | (<K extends never>(prop: K) => ((API.Chain & {
|
|
307
|
+
nativeToken?: API.TokenInfo | undefined;
|
|
308
|
+
}) | undefined)[K]) | undefined;
|
|
311
309
|
readonly error: any;
|
|
312
310
|
}];
|
|
313
311
|
|
|
@@ -398,61 +396,9 @@ declare const useWooCrossSwapQuery: () => {
|
|
|
398
396
|
};
|
|
399
397
|
|
|
400
398
|
/** @hidden */
|
|
401
|
-
declare
|
|
402
|
-
INITIALIZING = "WAITTING",
|
|
403
|
-
INFLIGHT = "INFLIGHT",
|
|
404
|
-
DELIVERED = "DELIVERED",
|
|
405
|
-
FAILED = "FAILED"
|
|
406
|
-
}
|
|
407
|
-
/** @hidden */
|
|
408
|
-
declare const useCrossSwap: () => {
|
|
409
|
-
swap: (inputs: {
|
|
410
|
-
address: string;
|
|
411
|
-
crossChainRouteAddress: string;
|
|
412
|
-
src: {
|
|
413
|
-
fromToken: string;
|
|
414
|
-
fromAmount: bigint;
|
|
415
|
-
bridgeToken: string;
|
|
416
|
-
minBridgeAmount: bigint;
|
|
417
|
-
};
|
|
418
|
-
dst: {
|
|
419
|
-
chainId: string;
|
|
420
|
-
bridgedToken: string;
|
|
421
|
-
toToken: string;
|
|
422
|
-
minToAmount: bigint;
|
|
423
|
-
airdropNativeAmount: bigint;
|
|
424
|
-
};
|
|
425
|
-
}) => Promise<{
|
|
426
|
-
readonly hash: string;
|
|
427
|
-
readonly to: string | null;
|
|
428
|
-
readonly from: string;
|
|
429
|
-
readonly value: bigint;
|
|
430
|
-
} | undefined>;
|
|
431
|
-
loading: boolean;
|
|
432
|
-
bridgeStatus: MessageStatus;
|
|
433
|
-
status: WS_WalletStatusEnum;
|
|
434
|
-
message: any;
|
|
435
|
-
};
|
|
399
|
+
declare const useCrossSwap: () => any;
|
|
436
400
|
|
|
437
401
|
/** @hidden */
|
|
438
|
-
declare const useSwap: () =>
|
|
439
|
-
swap: (woofiDexDepositorAdress: string, inputs: {
|
|
440
|
-
fromToken: string;
|
|
441
|
-
fromAmount: string;
|
|
442
|
-
toToken: string;
|
|
443
|
-
minToAmount: string;
|
|
444
|
-
orderlyNativeFees: bigint;
|
|
445
|
-
}, config: {
|
|
446
|
-
dst: any;
|
|
447
|
-
src: any;
|
|
448
|
-
}) => Promise<{
|
|
449
|
-
readonly hash: string;
|
|
450
|
-
readonly to: string | null;
|
|
451
|
-
readonly from: string;
|
|
452
|
-
readonly value: bigint;
|
|
453
|
-
} | undefined>;
|
|
454
|
-
loading: boolean;
|
|
455
|
-
status: WS_WalletStatusEnum;
|
|
456
|
-
};
|
|
402
|
+
declare const useSwap: () => any;
|
|
457
403
|
|
|
458
404
|
export { ConfigProviderProps, OrderlyConfigContextState, OrderlyConfigProvider, OrderlyContext, OrderlyProvider, WalletConnectorContext, useAccount, useAccountInfo, useAccountInstance, useBoolean, useChain, useChains, useCollateral, useConfig, useCrossSwap, useDeposit, useEventEmitter, useFundingRate, useHoldingStream, useIndexPrice, useLazyQuery, useLeverage, useLocalStorage, useMarginRatio, useMarkPrice, useMarkPricesStream, useMarketTradeStream, useMarketsStream, useMaxQty, useMediaQuery, useMutation, useOrderEntry, useOrderStream, useOrderbookStream, usePositionStream, usePreLoadData, usePrivateDataObserver, usePrivateInfiniteQuery, usePrivateQuery, useQuery, useSessionStorage, useSettleSubscription, useSwap, useSymbolsInfo, useTickerStream, useWS, useWalletConnector, useWalletSubscription, useWithdraw, useWooCrossSwapQuery, useWooSwapQuery };
|