@one_deploy/sdk 1.0.4 → 1.0.6

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 (57) hide show
  1. package/dist/config/index.d.mts +74 -0
  2. package/dist/config/index.d.ts +74 -0
  3. package/dist/config/index.js +244 -0
  4. package/dist/config/index.js.map +1 -0
  5. package/dist/config/index.mjs +226 -0
  6. package/dist/config/index.mjs.map +1 -0
  7. package/dist/engine-BeVuHpVx.d.mts +1202 -0
  8. package/dist/engine-DSc1Em4V.d.ts +1202 -0
  9. package/dist/hooks/index.d.mts +185 -0
  10. package/dist/hooks/index.d.ts +185 -0
  11. package/dist/hooks/index.js +1711 -0
  12. package/dist/hooks/index.js.map +1 -0
  13. package/dist/hooks/index.mjs +1699 -0
  14. package/dist/hooks/index.mjs.map +1 -0
  15. package/dist/index.d.mts +356 -0
  16. package/dist/index.d.ts +356 -0
  17. package/dist/index.js +5420 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/index.mjs +5293 -0
  20. package/dist/index.mjs.map +1 -0
  21. package/dist/price-CgqXPnT3.d.ts +13 -0
  22. package/dist/price-ClbLHHjv.d.mts +13 -0
  23. package/dist/providers/index.d.mts +121 -0
  24. package/dist/providers/index.d.ts +121 -0
  25. package/dist/providers/index.js +1741 -0
  26. package/dist/providers/index.js.map +1 -0
  27. package/dist/providers/index.mjs +1699 -0
  28. package/dist/providers/index.mjs.map +1 -0
  29. package/dist/react-native.d.mts +257 -0
  30. package/dist/react-native.d.ts +257 -0
  31. package/dist/react-native.js +2436 -0
  32. package/dist/react-native.js.map +1 -0
  33. package/dist/react-native.mjs +2392 -0
  34. package/dist/react-native.mjs.map +1 -0
  35. package/dist/services/index.d.mts +105 -0
  36. package/dist/services/index.d.ts +105 -0
  37. package/dist/services/index.js +1720 -0
  38. package/dist/services/index.js.map +1 -0
  39. package/dist/services/index.mjs +1709 -0
  40. package/dist/services/index.mjs.map +1 -0
  41. package/dist/supabase-BT0c7q9e.d.mts +82 -0
  42. package/dist/supabase-BT0c7q9e.d.ts +82 -0
  43. package/dist/types/index.d.mts +759 -0
  44. package/dist/types/index.d.ts +759 -0
  45. package/dist/types/index.js +4 -0
  46. package/dist/types/index.js.map +1 -0
  47. package/dist/types/index.mjs +3 -0
  48. package/dist/types/index.mjs.map +1 -0
  49. package/dist/utils/index.d.mts +36 -0
  50. package/dist/utils/index.d.ts +36 -0
  51. package/dist/utils/index.js +164 -0
  52. package/dist/utils/index.js.map +1 -0
  53. package/dist/utils/index.mjs +142 -0
  54. package/dist/utils/index.mjs.map +1 -0
  55. package/package.json +5 -1
  56. package/tsconfig.json +0 -22
  57. package/tsup.config.ts +0 -25
@@ -0,0 +1,105 @@
1
+ export { E as EngineAuthResponse, b as EngineTransactionRequest, d as EngineTransactionResponse, a as EngineWalletBalance, O as OneEngineClient, g as OnrampQuote, f as OnrampSession, e as OnrampSessionRequest, h as OnrampTransaction, j as SwapExecuteRequest, i as SwapQuote, S as SwapQuoteRequest, k as SwapResult, c as createOneEngineClient } from '../engine-DSc1Em4V.js';
2
+ export { S as SupabaseService, c as createSupabaseClient, g as getSupabaseClient } from '../supabase-BT0c7q9e.js';
3
+ export { P as PriceService, p as priceService } from '../price-CgqXPnT3.js';
4
+ import '../types/index.js';
5
+ import '@supabase/supabase-js';
6
+
7
+ /**
8
+ * Usage Tracking Service
9
+ * Tracks AI usage for Personal Assistant and Trading Agent
10
+ */
11
+ type UsageCategory = 'wallet' | 'payment' | 'exchange_onramper' | 'exchange_swap' | 'ai_thirdweb' | 'ai_trading_engine';
12
+ type DisplayCategory = 'personal_assistant' | 'trading_agent';
13
+ interface UsageRecord {
14
+ userId: string;
15
+ category: UsageCategory;
16
+ action: string;
17
+ requestTokens?: number;
18
+ responseTokens?: number;
19
+ creditsUsed?: number;
20
+ metadata?: Record<string, any>;
21
+ }
22
+ interface UsageSummary {
23
+ personal_assistant: {
24
+ requestCount: number;
25
+ totalTokens: number;
26
+ totalCredits: number;
27
+ };
28
+ trading_agent: {
29
+ requestCount: number;
30
+ totalTokens: number;
31
+ totalCredits: number;
32
+ };
33
+ }
34
+ interface UsageActivity {
35
+ type: DisplayCategory;
36
+ action: string;
37
+ tokens: number;
38
+ credits: number;
39
+ timestamp: string;
40
+ }
41
+ interface UsageResponse {
42
+ summary: UsageSummary;
43
+ dailyBreakdown: Array<{
44
+ date: string;
45
+ personal_assistant: number;
46
+ trading_agent: number;
47
+ }>;
48
+ recentActivity: UsageActivity[];
49
+ period: {
50
+ days: number;
51
+ startDate: string;
52
+ endDate: string;
53
+ };
54
+ }
55
+ /**
56
+ * Usage Tracking Service
57
+ */
58
+ declare class UsageService {
59
+ private baseUrl;
60
+ private userId;
61
+ constructor(baseUrl?: string);
62
+ /**
63
+ * Set the current user ID for tracking
64
+ */
65
+ setUserId(userId: string): void;
66
+ /**
67
+ * Record Personal Assistant usage (Thirdweb AI)
68
+ */
69
+ trackPersonalAssistant(action: string, tokens?: {
70
+ request?: number;
71
+ response?: number;
72
+ }, credits?: number, metadata?: Record<string, any>): Promise<boolean>;
73
+ /**
74
+ * Record Trading Agent usage (Engine AI)
75
+ */
76
+ trackTradingAgent(action: string, credits?: number, metadata?: Record<string, any>): Promise<boolean>;
77
+ /**
78
+ * Record wallet operation usage
79
+ */
80
+ trackWallet(action: string, metadata?: Record<string, any>): Promise<boolean>;
81
+ /**
82
+ * Record payment usage
83
+ */
84
+ trackPayment(action: string, metadata?: Record<string, any>): Promise<boolean>;
85
+ /**
86
+ * Record exchange usage (onramper)
87
+ */
88
+ trackOnramper(action: string, metadata?: Record<string, any>): Promise<boolean>;
89
+ /**
90
+ * Record exchange usage (swap)
91
+ */
92
+ trackSwap(action: string, metadata?: Record<string, any>): Promise<boolean>;
93
+ /**
94
+ * Record any usage
95
+ */
96
+ recordUsage(record: UsageRecord): Promise<boolean>;
97
+ /**
98
+ * Get AI usage summary for current user
99
+ */
100
+ getAIUsage(days?: number): Promise<UsageResponse | null>;
101
+ }
102
+ declare function getUsageService(): UsageService;
103
+ declare function createUsageService(baseUrl?: string): UsageService;
104
+
105
+ export { type DisplayCategory, type UsageActivity, type UsageCategory, type UsageRecord, type UsageResponse, UsageService, type UsageSummary, createUsageService, getUsageService };