@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
|
@@ -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-
|
|
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-
|
|
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';
|
package/dist/providers/index.js
CHANGED
|
@@ -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);
|