@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.
- package/dist/{engine-CrlhH0nw.d.mts → engine-BeVuHpVx.d.mts} +163 -0
- package/dist/{engine-5ndtBaCr.d.ts → engine-DSc1Em4V.d.ts} +163 -0
- package/dist/hooks/index.d.mts +132 -3
- package/dist/hooks/index.d.ts +132 -3
- package/dist/hooks/index.js +351 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +345 -2
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +352 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +345 -2
- package/dist/index.mjs.map +1 -1
- package/dist/providers/index.d.mts +1 -1
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.js +98 -0
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/index.mjs +98 -0
- package/dist/providers/index.mjs.map +1 -1
- package/dist/react-native.d.mts +140 -3
- package/dist/react-native.d.ts +140 -3
- package/dist/react-native.js +642 -0
- package/dist/react-native.js.map +1 -1
- package/dist/react-native.mjs +636 -1
- package/dist/react-native.mjs.map +1 -1
- package/dist/services/index.d.mts +99 -79
- package/dist/services/index.d.ts +99 -79
- package/dist/services/index.js +254 -0
- package/dist/services/index.js.map +1 -1
- package/dist/services/index.mjs +252 -1
- package/dist/services/index.mjs.map +1 -1
- package/dist/supabase-BT0c7q9e.d.mts +82 -0
- package/dist/supabase-BT0c7q9e.d.ts +82 -0
- package/package.json +5 -1
- package/src/components/OneSwapWidget.tsx +1 -1
- package/src/components/ai/OneChainSelector.tsx +183 -0
- package/src/components/ai/OneCycleSelector.tsx +187 -0
- package/src/components/ai/OnePairSelector.tsx +181 -0
- package/src/components/ai/OneTierSelector.tsx +187 -0
- package/src/components/ai/index.ts +17 -0
- package/src/components/index.ts +3 -0
- package/src/hooks/index.ts +20 -0
- package/src/hooks/useAITrading.ts +444 -0
- package/src/index.ts +20 -0
- package/src/react-native.ts +23 -0
- package/src/services/engine.ts +184 -0
- package/src/services/index.ts +16 -0
- package/src/services/usage.ts +249 -0
- package/.turbo/turbo-build.log +0 -0
- package/.turbo/turbo-type-check.log +0 -0
- package/tsconfig.json +0 -22
- package/tsup.config.ts +0 -25
package/dist/providers/index.mjs
CHANGED
|
@@ -1065,6 +1065,43 @@ var OneEngineClient = class {
|
|
|
1065
1065
|
async adminClearRateLimits(identifier) {
|
|
1066
1066
|
return this.request(`/api/v1/admin/rate-limits/${identifier}`, { method: "DELETE" });
|
|
1067
1067
|
}
|
|
1068
|
+
// ========== AI Agent Configuration ==========
|
|
1069
|
+
/**
|
|
1070
|
+
* Get all AI agent configurations
|
|
1071
|
+
* This returns the full agent setup including tiers, cycles, and trading parameters
|
|
1072
|
+
*/
|
|
1073
|
+
async getAgentConfigs(options) {
|
|
1074
|
+
const params = new URLSearchParams();
|
|
1075
|
+
if (options?.includeInactive) params.set("includeInactive", "true");
|
|
1076
|
+
if (options?.agentId) params.set("agentId", options.agentId);
|
|
1077
|
+
const query = params.toString();
|
|
1078
|
+
return this.request(`/api/v1/agents${query ? `?${query}` : ""}`, { method: "GET" });
|
|
1079
|
+
}
|
|
1080
|
+
/**
|
|
1081
|
+
* Calculate subscription parameters for an agent
|
|
1082
|
+
*/
|
|
1083
|
+
async calculateAgentParams(params) {
|
|
1084
|
+
return this.request("/api/v1/agents/calculate", {
|
|
1085
|
+
method: "POST",
|
|
1086
|
+
body: JSON.stringify(params)
|
|
1087
|
+
});
|
|
1088
|
+
}
|
|
1089
|
+
/**
|
|
1090
|
+
* Get supported trading pairs from agents
|
|
1091
|
+
*/
|
|
1092
|
+
async getTradingPairs() {
|
|
1093
|
+
const result = await this.getAgentConfigs();
|
|
1094
|
+
if (result.success && result.data?.agents) {
|
|
1095
|
+
const allPairs = /* @__PURE__ */ new Set();
|
|
1096
|
+
const byAgent = {};
|
|
1097
|
+
for (const agent of result.data.agents) {
|
|
1098
|
+
byAgent[agent.id] = agent.supported_pairs;
|
|
1099
|
+
agent.supported_pairs.forEach((p) => allPairs.add(p));
|
|
1100
|
+
}
|
|
1101
|
+
return { success: true, data: { pairs: Array.from(allPairs), byAgent } };
|
|
1102
|
+
}
|
|
1103
|
+
return { success: false, error: result.error };
|
|
1104
|
+
}
|
|
1068
1105
|
// ========== AI Quant Trading ==========
|
|
1069
1106
|
/**
|
|
1070
1107
|
* Get all AI trading strategies
|
|
@@ -1203,6 +1240,67 @@ var OneEngineClient = class {
|
|
|
1203
1240
|
async getCryptoMarketOverview() {
|
|
1204
1241
|
return this.request("/api/v1/prices?type=overview", { method: "GET" });
|
|
1205
1242
|
}
|
|
1243
|
+
// ========== Project Management ==========
|
|
1244
|
+
/**
|
|
1245
|
+
* Get user's projects
|
|
1246
|
+
*/
|
|
1247
|
+
async getProjects(options) {
|
|
1248
|
+
const params = new URLSearchParams();
|
|
1249
|
+
if (options?.isActive !== void 0) params.set("isActive", String(options.isActive));
|
|
1250
|
+
const query = params.toString();
|
|
1251
|
+
return this.request(`/api/v1/projects${query ? `?${query}` : ""}`, { method: "GET" });
|
|
1252
|
+
}
|
|
1253
|
+
/**
|
|
1254
|
+
* Create a new project for ecosystem partners
|
|
1255
|
+
*/
|
|
1256
|
+
async createProject(params) {
|
|
1257
|
+
return this.request("/api/v1/projects", {
|
|
1258
|
+
method: "POST",
|
|
1259
|
+
body: JSON.stringify(params)
|
|
1260
|
+
});
|
|
1261
|
+
}
|
|
1262
|
+
/**
|
|
1263
|
+
* Get project details
|
|
1264
|
+
*/
|
|
1265
|
+
async getProject(projectId) {
|
|
1266
|
+
return this.request(`/api/v1/projects/${projectId}`, { method: "GET" });
|
|
1267
|
+
}
|
|
1268
|
+
/**
|
|
1269
|
+
* Update project settings
|
|
1270
|
+
*/
|
|
1271
|
+
async updateProject(projectId, updates) {
|
|
1272
|
+
return this.request(`/api/v1/projects/${projectId}`, {
|
|
1273
|
+
method: "PATCH",
|
|
1274
|
+
body: JSON.stringify(updates)
|
|
1275
|
+
});
|
|
1276
|
+
}
|
|
1277
|
+
/**
|
|
1278
|
+
* Get project features status
|
|
1279
|
+
*/
|
|
1280
|
+
async getProjectFeatures(projectId) {
|
|
1281
|
+
return this.request(`/api/v1/projects/${projectId}/features`, { method: "GET" });
|
|
1282
|
+
}
|
|
1283
|
+
/**
|
|
1284
|
+
* Enable/disable features for a project
|
|
1285
|
+
*/
|
|
1286
|
+
async updateProjectFeatures(projectId, features) {
|
|
1287
|
+
return this.request(`/api/v1/projects/${projectId}/features`, {
|
|
1288
|
+
method: "PATCH",
|
|
1289
|
+
body: JSON.stringify(features)
|
|
1290
|
+
});
|
|
1291
|
+
}
|
|
1292
|
+
/**
|
|
1293
|
+
* Regenerate project API key
|
|
1294
|
+
*/
|
|
1295
|
+
async regenerateProjectApiKey(projectId) {
|
|
1296
|
+
return this.request(`/api/v1/projects/${projectId}/api-key`, { method: "POST" });
|
|
1297
|
+
}
|
|
1298
|
+
/**
|
|
1299
|
+
* Delete project
|
|
1300
|
+
*/
|
|
1301
|
+
async deleteProject(projectId) {
|
|
1302
|
+
return this.request(`/api/v1/projects/${projectId}`, { method: "DELETE" });
|
|
1303
|
+
}
|
|
1206
1304
|
};
|
|
1207
1305
|
function createOneEngineClient(options) {
|
|
1208
1306
|
return new OneEngineClient(options);
|