@one_deploy/sdk 1.0.3 → 1.0.5

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 (53) hide show
  1. package/dist/{engine-CrlhH0nw.d.mts → engine-BeVuHpVx.d.mts} +163 -0
  2. package/dist/{engine-5ndtBaCr.d.ts → engine-DSc1Em4V.d.ts} +163 -0
  3. package/dist/hooks/index.d.mts +132 -3
  4. package/dist/hooks/index.d.ts +132 -3
  5. package/dist/hooks/index.js +351 -0
  6. package/dist/hooks/index.js.map +1 -1
  7. package/dist/hooks/index.mjs +345 -2
  8. package/dist/hooks/index.mjs.map +1 -1
  9. package/dist/index.d.mts +3 -3
  10. package/dist/index.d.ts +3 -3
  11. package/dist/index.js +352 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.mjs +345 -2
  14. package/dist/index.mjs.map +1 -1
  15. package/dist/providers/index.d.mts +1 -1
  16. package/dist/providers/index.d.ts +1 -1
  17. package/dist/providers/index.js +98 -0
  18. package/dist/providers/index.js.map +1 -1
  19. package/dist/providers/index.mjs +98 -0
  20. package/dist/providers/index.mjs.map +1 -1
  21. package/dist/react-native.d.mts +140 -3
  22. package/dist/react-native.d.ts +140 -3
  23. package/dist/react-native.js +642 -0
  24. package/dist/react-native.js.map +1 -1
  25. package/dist/react-native.mjs +636 -1
  26. package/dist/react-native.mjs.map +1 -1
  27. package/dist/services/index.d.mts +99 -79
  28. package/dist/services/index.d.ts +99 -79
  29. package/dist/services/index.js +254 -0
  30. package/dist/services/index.js.map +1 -1
  31. package/dist/services/index.mjs +252 -1
  32. package/dist/services/index.mjs.map +1 -1
  33. package/dist/supabase-BT0c7q9e.d.mts +82 -0
  34. package/dist/supabase-BT0c7q9e.d.ts +82 -0
  35. package/package.json +5 -1
  36. package/src/components/OneSwapWidget.tsx +1 -1
  37. package/src/components/ai/OneChainSelector.tsx +183 -0
  38. package/src/components/ai/OneCycleSelector.tsx +187 -0
  39. package/src/components/ai/OnePairSelector.tsx +181 -0
  40. package/src/components/ai/OneTierSelector.tsx +187 -0
  41. package/src/components/ai/index.ts +17 -0
  42. package/src/components/index.ts +3 -0
  43. package/src/hooks/index.ts +20 -0
  44. package/src/hooks/useAITrading.ts +444 -0
  45. package/src/index.ts +20 -0
  46. package/src/react-native.ts +23 -0
  47. package/src/services/engine.ts +184 -0
  48. package/src/services/index.ts +16 -0
  49. package/src/services/usage.ts +249 -0
  50. package/.turbo/turbo-build.log +0 -0
  51. package/.turbo/turbo-type-check.log +0 -0
  52. package/tsconfig.json +0 -22
  53. package/tsup.config.ts +0 -25
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React, { ReactNode } from 'react';
3
3
  import { OneConfig } from '../config/index.mjs';
4
- import { O as OneEngineClient, a as EngineWalletBalance, e as OnrampSessionRequest, S as SwapQuoteRequest, i as SwapQuote } from '../engine-CrlhH0nw.mjs';
4
+ import { O as OneEngineClient, a as EngineWalletBalance, e as OnrampSessionRequest, S as SwapQuoteRequest, i as SwapQuote } from '../engine-BeVuHpVx.mjs';
5
5
  import { User, Token, AIStrategy, AIOrder } from '../types/index.mjs';
6
6
  import { ThirdwebClient } from 'thirdweb';
7
7
  import { Chain } from 'thirdweb/chains';
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React, { ReactNode } from 'react';
3
3
  import { OneConfig } from '../config/index.js';
4
- import { O as OneEngineClient, a as EngineWalletBalance, e as OnrampSessionRequest, S as SwapQuoteRequest, i as SwapQuote } from '../engine-5ndtBaCr.js';
4
+ import { O as OneEngineClient, a as EngineWalletBalance, e as OnrampSessionRequest, S as SwapQuoteRequest, i as SwapQuote } from '../engine-DSc1Em4V.js';
5
5
  import { User, Token, AIStrategy, AIOrder } from '../types/index.js';
6
6
  import { ThirdwebClient } from 'thirdweb';
7
7
  import { Chain } from 'thirdweb/chains';
@@ -1069,6 +1069,43 @@ var OneEngineClient = class {
1069
1069
  async adminClearRateLimits(identifier) {
1070
1070
  return this.request(`/api/v1/admin/rate-limits/${identifier}`, { method: "DELETE" });
1071
1071
  }
1072
+ // ========== AI Agent Configuration ==========
1073
+ /**
1074
+ * Get all AI agent configurations
1075
+ * This returns the full agent setup including tiers, cycles, and trading parameters
1076
+ */
1077
+ async getAgentConfigs(options) {
1078
+ const params = new URLSearchParams();
1079
+ if (options?.includeInactive) params.set("includeInactive", "true");
1080
+ if (options?.agentId) params.set("agentId", options.agentId);
1081
+ const query = params.toString();
1082
+ return this.request(`/api/v1/agents${query ? `?${query}` : ""}`, { method: "GET" });
1083
+ }
1084
+ /**
1085
+ * Calculate subscription parameters for an agent
1086
+ */
1087
+ async calculateAgentParams(params) {
1088
+ return this.request("/api/v1/agents/calculate", {
1089
+ method: "POST",
1090
+ body: JSON.stringify(params)
1091
+ });
1092
+ }
1093
+ /**
1094
+ * Get supported trading pairs from agents
1095
+ */
1096
+ async getTradingPairs() {
1097
+ const result = await this.getAgentConfigs();
1098
+ if (result.success && result.data?.agents) {
1099
+ const allPairs = /* @__PURE__ */ new Set();
1100
+ const byAgent = {};
1101
+ for (const agent of result.data.agents) {
1102
+ byAgent[agent.id] = agent.supported_pairs;
1103
+ agent.supported_pairs.forEach((p) => allPairs.add(p));
1104
+ }
1105
+ return { success: true, data: { pairs: Array.from(allPairs), byAgent } };
1106
+ }
1107
+ return { success: false, error: result.error };
1108
+ }
1072
1109
  // ========== AI Quant Trading ==========
1073
1110
  /**
1074
1111
  * Get all AI trading strategies
@@ -1207,6 +1244,67 @@ var OneEngineClient = class {
1207
1244
  async getCryptoMarketOverview() {
1208
1245
  return this.request("/api/v1/prices?type=overview", { method: "GET" });
1209
1246
  }
1247
+ // ========== Project Management ==========
1248
+ /**
1249
+ * Get user's projects
1250
+ */
1251
+ async getProjects(options) {
1252
+ const params = new URLSearchParams();
1253
+ if (options?.isActive !== void 0) params.set("isActive", String(options.isActive));
1254
+ const query = params.toString();
1255
+ return this.request(`/api/v1/projects${query ? `?${query}` : ""}`, { method: "GET" });
1256
+ }
1257
+ /**
1258
+ * Create a new project for ecosystem partners
1259
+ */
1260
+ async createProject(params) {
1261
+ return this.request("/api/v1/projects", {
1262
+ method: "POST",
1263
+ body: JSON.stringify(params)
1264
+ });
1265
+ }
1266
+ /**
1267
+ * Get project details
1268
+ */
1269
+ async getProject(projectId) {
1270
+ return this.request(`/api/v1/projects/${projectId}`, { method: "GET" });
1271
+ }
1272
+ /**
1273
+ * Update project settings
1274
+ */
1275
+ async updateProject(projectId, updates) {
1276
+ return this.request(`/api/v1/projects/${projectId}`, {
1277
+ method: "PATCH",
1278
+ body: JSON.stringify(updates)
1279
+ });
1280
+ }
1281
+ /**
1282
+ * Get project features status
1283
+ */
1284
+ async getProjectFeatures(projectId) {
1285
+ return this.request(`/api/v1/projects/${projectId}/features`, { method: "GET" });
1286
+ }
1287
+ /**
1288
+ * Enable/disable features for a project
1289
+ */
1290
+ async updateProjectFeatures(projectId, features) {
1291
+ return this.request(`/api/v1/projects/${projectId}/features`, {
1292
+ method: "PATCH",
1293
+ body: JSON.stringify(features)
1294
+ });
1295
+ }
1296
+ /**
1297
+ * Regenerate project API key
1298
+ */
1299
+ async regenerateProjectApiKey(projectId) {
1300
+ return this.request(`/api/v1/projects/${projectId}/api-key`, { method: "POST" });
1301
+ }
1302
+ /**
1303
+ * Delete project
1304
+ */
1305
+ async deleteProject(projectId) {
1306
+ return this.request(`/api/v1/projects/${projectId}`, { method: "DELETE" });
1307
+ }
1210
1308
  };
1211
1309
  function createOneEngineClient(options) {
1212
1310
  return new OneEngineClient(options);