clodds 1.7.4 → 1.7.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/agents/index.js +111 -1
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/tool-registry.js +8 -1
- package/dist/agents/tool-registry.js.map +1 -1
- package/dist/credentials/index.d.ts +2 -2
- package/dist/credentials/index.js.map +1 -1
- package/dist/types.d.ts +45 -1
- package/package.json +1 -1
package/dist/agents/index.js
CHANGED
|
@@ -7172,6 +7172,66 @@ function buildTools() {
|
|
|
7172
7172
|
required: ['api_key'],
|
|
7173
7173
|
},
|
|
7174
7174
|
},
|
|
7175
|
+
{
|
|
7176
|
+
name: 'setup_binance_credentials',
|
|
7177
|
+
description: 'Set up Binance Futures trading credentials. Required before trading futures on Binance.',
|
|
7178
|
+
input_schema: {
|
|
7179
|
+
type: 'object',
|
|
7180
|
+
properties: {
|
|
7181
|
+
api_key: { type: 'string', description: 'Binance API key' },
|
|
7182
|
+
api_secret: { type: 'string', description: 'Binance API secret' },
|
|
7183
|
+
},
|
|
7184
|
+
required: ['api_key', 'api_secret'],
|
|
7185
|
+
},
|
|
7186
|
+
},
|
|
7187
|
+
{
|
|
7188
|
+
name: 'setup_bybit_credentials',
|
|
7189
|
+
description: 'Set up Bybit Futures trading credentials. Required before trading futures on Bybit.',
|
|
7190
|
+
input_schema: {
|
|
7191
|
+
type: 'object',
|
|
7192
|
+
properties: {
|
|
7193
|
+
api_key: { type: 'string', description: 'Bybit API key' },
|
|
7194
|
+
api_secret: { type: 'string', description: 'Bybit API secret' },
|
|
7195
|
+
},
|
|
7196
|
+
required: ['api_key', 'api_secret'],
|
|
7197
|
+
},
|
|
7198
|
+
},
|
|
7199
|
+
{
|
|
7200
|
+
name: 'setup_hyperliquid_credentials',
|
|
7201
|
+
description: 'Set up Hyperliquid trading credentials. Required before trading on Hyperliquid.',
|
|
7202
|
+
input_schema: {
|
|
7203
|
+
type: 'object',
|
|
7204
|
+
properties: {
|
|
7205
|
+
private_key: { type: 'string', description: 'Ethereum private key (0x...) for signing' },
|
|
7206
|
+
wallet_address: { type: 'string', description: 'Wallet address (0x...)' },
|
|
7207
|
+
},
|
|
7208
|
+
required: ['private_key'],
|
|
7209
|
+
},
|
|
7210
|
+
},
|
|
7211
|
+
{
|
|
7212
|
+
name: 'setup_mexc_credentials',
|
|
7213
|
+
description: 'Set up MEXC Futures trading credentials. Required before trading futures on MEXC.',
|
|
7214
|
+
input_schema: {
|
|
7215
|
+
type: 'object',
|
|
7216
|
+
properties: {
|
|
7217
|
+
api_key: { type: 'string', description: 'MEXC API key' },
|
|
7218
|
+
api_secret: { type: 'string', description: 'MEXC API secret' },
|
|
7219
|
+
},
|
|
7220
|
+
required: ['api_key', 'api_secret'],
|
|
7221
|
+
},
|
|
7222
|
+
},
|
|
7223
|
+
{
|
|
7224
|
+
name: 'setup_betfair_credentials',
|
|
7225
|
+
description: 'Set up Betfair trading credentials. Required before trading on Betfair.',
|
|
7226
|
+
input_schema: {
|
|
7227
|
+
type: 'object',
|
|
7228
|
+
properties: {
|
|
7229
|
+
app_key: { type: 'string', description: 'Betfair application key' },
|
|
7230
|
+
session_token: { type: 'string', description: 'Betfair session token (SSOID)' },
|
|
7231
|
+
},
|
|
7232
|
+
required: ['app_key', 'session_token'],
|
|
7233
|
+
},
|
|
7234
|
+
},
|
|
7175
7235
|
{
|
|
7176
7236
|
name: 'list_trading_credentials',
|
|
7177
7237
|
description: 'List which platforms the user has trading credentials set up for',
|
|
@@ -7189,7 +7249,7 @@ function buildTools() {
|
|
|
7189
7249
|
platform: {
|
|
7190
7250
|
type: 'string',
|
|
7191
7251
|
description: 'Platform to delete credentials for',
|
|
7192
|
-
enum: ['polymarket', 'kalshi', 'manifold'],
|
|
7252
|
+
enum: ['polymarket', 'kalshi', 'manifold', 'binance', 'bybit', 'hyperliquid', 'mexc', 'betfair'],
|
|
7193
7253
|
},
|
|
7194
7254
|
},
|
|
7195
7255
|
required: ['platform'],
|
|
@@ -9296,6 +9356,56 @@ async function executeTool(toolName, toolInput, context) {
|
|
|
9296
9356
|
security_notice: 'Your API key is encrypted and stored securely. You can regenerate your API key on Manifold settings if needed.',
|
|
9297
9357
|
});
|
|
9298
9358
|
}
|
|
9359
|
+
case 'setup_binance_credentials': {
|
|
9360
|
+
await context.credentials.setCredentials(userId, 'binance', {
|
|
9361
|
+
apiKey: toolInput.api_key,
|
|
9362
|
+
apiSecret: toolInput.api_secret,
|
|
9363
|
+
});
|
|
9364
|
+
return JSON.stringify({
|
|
9365
|
+
result: 'Binance credentials saved! You can now trade futures on Binance.',
|
|
9366
|
+
security_notice: 'Your credentials are encrypted with AES-256-GCM. Use IP-restricted API keys for maximum security.',
|
|
9367
|
+
});
|
|
9368
|
+
}
|
|
9369
|
+
case 'setup_bybit_credentials': {
|
|
9370
|
+
await context.credentials.setCredentials(userId, 'bybit', {
|
|
9371
|
+
apiKey: toolInput.api_key,
|
|
9372
|
+
apiSecret: toolInput.api_secret,
|
|
9373
|
+
});
|
|
9374
|
+
return JSON.stringify({
|
|
9375
|
+
result: 'Bybit credentials saved! You can now trade futures on Bybit.',
|
|
9376
|
+
security_notice: 'Your credentials are encrypted with AES-256-GCM. Use IP-restricted API keys for maximum security.',
|
|
9377
|
+
});
|
|
9378
|
+
}
|
|
9379
|
+
case 'setup_hyperliquid_credentials': {
|
|
9380
|
+
await context.credentials.setCredentials(userId, 'hyperliquid', {
|
|
9381
|
+
privateKey: toolInput.private_key,
|
|
9382
|
+
walletAddress: toolInput.wallet_address || '',
|
|
9383
|
+
});
|
|
9384
|
+
return JSON.stringify({
|
|
9385
|
+
result: 'Hyperliquid credentials saved! You can now trade on Hyperliquid.',
|
|
9386
|
+
security_notice: 'Your private key is encrypted with AES-256-GCM. Consider using a dedicated trading wallet.',
|
|
9387
|
+
});
|
|
9388
|
+
}
|
|
9389
|
+
case 'setup_mexc_credentials': {
|
|
9390
|
+
await context.credentials.setCredentials(userId, 'mexc', {
|
|
9391
|
+
apiKey: toolInput.api_key,
|
|
9392
|
+
apiSecret: toolInput.api_secret,
|
|
9393
|
+
});
|
|
9394
|
+
return JSON.stringify({
|
|
9395
|
+
result: 'MEXC credentials saved! You can now trade futures on MEXC.',
|
|
9396
|
+
security_notice: 'Your credentials are encrypted with AES-256-GCM. Use IP-restricted API keys for maximum security.',
|
|
9397
|
+
});
|
|
9398
|
+
}
|
|
9399
|
+
case 'setup_betfair_credentials': {
|
|
9400
|
+
await context.credentials.setCredentials(userId, 'betfair', {
|
|
9401
|
+
appKey: toolInput.app_key,
|
|
9402
|
+
sessionToken: toolInput.session_token,
|
|
9403
|
+
});
|
|
9404
|
+
return JSON.stringify({
|
|
9405
|
+
result: 'Betfair credentials saved! You can now trade on Betfair.',
|
|
9406
|
+
security_notice: 'Your credentials are encrypted with AES-256-GCM. Session tokens expire — you may need to refresh periodically.',
|
|
9407
|
+
});
|
|
9408
|
+
}
|
|
9299
9409
|
case 'list_trading_credentials': {
|
|
9300
9410
|
const platforms = await context.credentials.listUserPlatforms(userId);
|
|
9301
9411
|
if (platforms.length === 0) {
|