@one_deploy/sdk 1.0.2 → 1.0.4

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.
Files changed (70) hide show
  1. package/package.json +1 -1
  2. package/src/components/OneSwapWidget.tsx +1 -1
  3. package/src/components/ai/OneChainSelector.tsx +183 -0
  4. package/src/components/ai/OneCycleSelector.tsx +187 -0
  5. package/src/components/ai/OnePairSelector.tsx +181 -0
  6. package/src/components/ai/OneTierSelector.tsx +187 -0
  7. package/src/components/ai/index.ts +17 -0
  8. package/src/components/index.ts +3 -0
  9. package/src/config/index.ts +1 -1
  10. package/src/hooks/index.ts +20 -0
  11. package/src/hooks/useAITrading.ts +444 -0
  12. package/src/index.ts +20 -0
  13. package/src/react-native.ts +23 -0
  14. package/src/services/engine.ts +184 -0
  15. package/src/services/index.ts +16 -0
  16. package/src/services/usage.ts +249 -0
  17. package/.turbo/turbo-build.log +0 -0
  18. package/.turbo/turbo-type-check.log +0 -0
  19. package/dist/config/index.d.mts +0 -74
  20. package/dist/config/index.d.ts +0 -74
  21. package/dist/config/index.js +0 -244
  22. package/dist/config/index.js.map +0 -1
  23. package/dist/config/index.mjs +0 -226
  24. package/dist/config/index.mjs.map +0 -1
  25. package/dist/engine-5ndtBaCr.d.ts +0 -1039
  26. package/dist/engine-CrlhH0nw.d.mts +0 -1039
  27. package/dist/hooks/index.d.mts +0 -56
  28. package/dist/hooks/index.d.ts +0 -56
  29. package/dist/hooks/index.js +0 -1360
  30. package/dist/hooks/index.js.map +0 -1
  31. package/dist/hooks/index.mjs +0 -1356
  32. package/dist/hooks/index.mjs.map +0 -1
  33. package/dist/index.d.mts +0 -356
  34. package/dist/index.d.ts +0 -356
  35. package/dist/index.js +0 -5069
  36. package/dist/index.js.map +0 -1
  37. package/dist/index.mjs +0 -4950
  38. package/dist/index.mjs.map +0 -1
  39. package/dist/price-CgqXPnT3.d.ts +0 -13
  40. package/dist/price-ClbLHHjv.d.mts +0 -13
  41. package/dist/providers/index.d.mts +0 -121
  42. package/dist/providers/index.d.ts +0 -121
  43. package/dist/providers/index.js +0 -1643
  44. package/dist/providers/index.js.map +0 -1
  45. package/dist/providers/index.mjs +0 -1601
  46. package/dist/providers/index.mjs.map +0 -1
  47. package/dist/react-native.d.mts +0 -120
  48. package/dist/react-native.d.ts +0 -120
  49. package/dist/react-native.js +0 -1794
  50. package/dist/react-native.js.map +0 -1
  51. package/dist/react-native.mjs +0 -1757
  52. package/dist/react-native.mjs.map +0 -1
  53. package/dist/services/index.d.mts +0 -85
  54. package/dist/services/index.d.ts +0 -85
  55. package/dist/services/index.js +0 -1466
  56. package/dist/services/index.js.map +0 -1
  57. package/dist/services/index.mjs +0 -1458
  58. package/dist/services/index.mjs.map +0 -1
  59. package/dist/types/index.d.mts +0 -759
  60. package/dist/types/index.d.ts +0 -759
  61. package/dist/types/index.js +0 -4
  62. package/dist/types/index.js.map +0 -1
  63. package/dist/types/index.mjs +0 -3
  64. package/dist/types/index.mjs.map +0 -1
  65. package/dist/utils/index.d.mts +0 -36
  66. package/dist/utils/index.d.ts +0 -36
  67. package/dist/utils/index.js +0 -164
  68. package/dist/utils/index.js.map +0 -1
  69. package/dist/utils/index.mjs +0 -142
  70. package/dist/utils/index.mjs.map +0 -1
@@ -1,56 +0,0 @@
1
- import { a as EngineWalletBalance } from '../engine-CrlhH0nw.mjs';
2
- import { Token, TokenPrice } from '../types/index.mjs';
3
-
4
- interface UseWalletBalanceOptions {
5
- chains?: number[];
6
- autoRefresh?: boolean;
7
- refreshInterval?: number;
8
- engineUrl?: string;
9
- clientId?: string;
10
- }
11
- interface UseWalletBalanceReturn {
12
- balance: EngineWalletBalance | null;
13
- tokens: Token[];
14
- totalUsd: number;
15
- change24h: number;
16
- changePercent24h: number;
17
- isLoading: boolean;
18
- error: string | null;
19
- refetch: () => Promise<void>;
20
- }
21
- /**
22
- * Hook for fetching wallet balance via ONE Engine
23
- *
24
- * Note: If using OneProvider, prefer useOneWallet() instead for better integration.
25
- * This hook is for standalone usage outside of OneProvider.
26
- */
27
- declare function useWalletBalance(walletAddress: string | null, options?: UseWalletBalanceOptions): UseWalletBalanceReturn;
28
-
29
- interface UseTokenPriceOptions {
30
- autoRefresh?: boolean;
31
- refreshInterval?: number;
32
- engineUrl?: string;
33
- clientId?: string;
34
- }
35
- interface UseTokenPriceReturn {
36
- price: TokenPrice | null;
37
- isLoading: boolean;
38
- error: string | null;
39
- refetch: () => Promise<void>;
40
- }
41
- /**
42
- * Hook for fetching token price via ONE Engine
43
- *
44
- * Note: If using OneProvider, prefer useOneEngine().getTokenPrices() instead.
45
- * This hook is for standalone usage outside of OneProvider.
46
- */
47
- declare function useTokenPrice(symbol: string, options?: UseTokenPriceOptions): UseTokenPriceReturn;
48
- interface UseTokenPricesReturn {
49
- prices: Record<string, TokenPrice>;
50
- isLoading: boolean;
51
- error: string | null;
52
- refetch: () => Promise<void>;
53
- }
54
- declare function useTokenPrices(symbols: string[], options?: UseTokenPriceOptions): UseTokenPricesReturn;
55
-
56
- export { useTokenPrice, useTokenPrices, useWalletBalance };
@@ -1,56 +0,0 @@
1
- import { a as EngineWalletBalance } from '../engine-5ndtBaCr.js';
2
- import { Token, TokenPrice } from '../types/index.js';
3
-
4
- interface UseWalletBalanceOptions {
5
- chains?: number[];
6
- autoRefresh?: boolean;
7
- refreshInterval?: number;
8
- engineUrl?: string;
9
- clientId?: string;
10
- }
11
- interface UseWalletBalanceReturn {
12
- balance: EngineWalletBalance | null;
13
- tokens: Token[];
14
- totalUsd: number;
15
- change24h: number;
16
- changePercent24h: number;
17
- isLoading: boolean;
18
- error: string | null;
19
- refetch: () => Promise<void>;
20
- }
21
- /**
22
- * Hook for fetching wallet balance via ONE Engine
23
- *
24
- * Note: If using OneProvider, prefer useOneWallet() instead for better integration.
25
- * This hook is for standalone usage outside of OneProvider.
26
- */
27
- declare function useWalletBalance(walletAddress: string | null, options?: UseWalletBalanceOptions): UseWalletBalanceReturn;
28
-
29
- interface UseTokenPriceOptions {
30
- autoRefresh?: boolean;
31
- refreshInterval?: number;
32
- engineUrl?: string;
33
- clientId?: string;
34
- }
35
- interface UseTokenPriceReturn {
36
- price: TokenPrice | null;
37
- isLoading: boolean;
38
- error: string | null;
39
- refetch: () => Promise<void>;
40
- }
41
- /**
42
- * Hook for fetching token price via ONE Engine
43
- *
44
- * Note: If using OneProvider, prefer useOneEngine().getTokenPrices() instead.
45
- * This hook is for standalone usage outside of OneProvider.
46
- */
47
- declare function useTokenPrice(symbol: string, options?: UseTokenPriceOptions): UseTokenPriceReturn;
48
- interface UseTokenPricesReturn {
49
- prices: Record<string, TokenPrice>;
50
- isLoading: boolean;
51
- error: string | null;
52
- refetch: () => Promise<void>;
53
- }
54
- declare function useTokenPrices(symbols: string[], options?: UseTokenPriceOptions): UseTokenPricesReturn;
55
-
56
- export { useTokenPrice, useTokenPrices, useWalletBalance };