clodds 1.7.4 → 1.7.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.
@@ -7172,6 +7172,140 @@ 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
+ },
7235
+ {
7236
+ name: 'setup_drift_credentials',
7237
+ description: 'Set up Drift (Solana) trading credentials. Required before trading perpetuals on Drift.',
7238
+ input_schema: {
7239
+ type: 'object',
7240
+ properties: {
7241
+ private_key: { type: 'string', description: 'Solana private key (base58 format)' },
7242
+ keypair_path: { type: 'string', description: 'Path to Solana keypair JSON file (alternative to private_key)' },
7243
+ },
7244
+ required: ['private_key'],
7245
+ },
7246
+ },
7247
+ {
7248
+ name: 'setup_smarkets_credentials',
7249
+ description: 'Set up Smarkets trading credentials. Required before trading on Smarkets.',
7250
+ input_schema: {
7251
+ type: 'object',
7252
+ properties: {
7253
+ api_token: { type: 'string', description: 'Smarkets API token' },
7254
+ session_token: { type: 'string', description: 'Smarkets session token (alternative auth)' },
7255
+ },
7256
+ required: ['api_token'],
7257
+ },
7258
+ },
7259
+ {
7260
+ name: 'setup_opinion_credentials',
7261
+ description: 'Set up Opinion.trade credentials. Required before trading on Opinion.',
7262
+ input_schema: {
7263
+ type: 'object',
7264
+ properties: {
7265
+ api_key: { type: 'string', description: 'Opinion.trade API key' },
7266
+ private_key: { type: 'string', description: 'BNB Chain wallet private key for trading' },
7267
+ multi_sig_address: { type: 'string', description: 'Vault/funder address (optional)' },
7268
+ },
7269
+ required: ['api_key'],
7270
+ },
7271
+ },
7272
+ {
7273
+ name: 'setup_virtuals_credentials',
7274
+ description: 'Set up Virtuals Protocol trading credentials. Required before trading AI agents on Virtuals.',
7275
+ input_schema: {
7276
+ type: 'object',
7277
+ properties: {
7278
+ private_key: { type: 'string', description: 'EVM wallet private key (Base chain)' },
7279
+ rpc_url: { type: 'string', description: 'Base chain RPC URL (optional, defaults to mainnet)' },
7280
+ },
7281
+ required: ['private_key'],
7282
+ },
7283
+ },
7284
+ {
7285
+ name: 'setup_hedgehog_credentials',
7286
+ description: 'Set up Hedgehog Markets trading credentials. Required before trading on Hedgehog.',
7287
+ input_schema: {
7288
+ type: 'object',
7289
+ properties: {
7290
+ private_key: { type: 'string', description: 'Solana wallet private key (base58)' },
7291
+ api_key: { type: 'string', description: 'Hedgehog API key for higher rate limits (optional)' },
7292
+ },
7293
+ required: ['private_key'],
7294
+ },
7295
+ },
7296
+ {
7297
+ name: 'setup_predictfun_credentials',
7298
+ description: 'Set up Predict.fun trading credentials. Required before trading on Predict.fun.',
7299
+ input_schema: {
7300
+ type: 'object',
7301
+ properties: {
7302
+ private_key: { type: 'string', description: 'BNB Chain wallet private key for signing' },
7303
+ predict_account: { type: 'string', description: 'Smart wallet/deposit address (optional)' },
7304
+ api_key: { type: 'string', description: 'Predict.fun API key (optional)' },
7305
+ },
7306
+ required: ['private_key'],
7307
+ },
7308
+ },
7175
7309
  {
7176
7310
  name: 'list_trading_credentials',
7177
7311
  description: 'List which platforms the user has trading credentials set up for',
@@ -7189,7 +7323,7 @@ function buildTools() {
7189
7323
  platform: {
7190
7324
  type: 'string',
7191
7325
  description: 'Platform to delete credentials for',
7192
- enum: ['polymarket', 'kalshi', 'manifold'],
7326
+ enum: ['polymarket', 'kalshi', 'manifold', 'binance', 'bybit', 'hyperliquid', 'mexc', 'betfair', 'drift', 'smarkets', 'opinion', 'virtuals', 'hedgehog', 'predictfun'],
7193
7327
  },
7194
7328
  },
7195
7329
  required: ['platform'],
@@ -9296,6 +9430,118 @@ async function executeTool(toolName, toolInput, context) {
9296
9430
  security_notice: 'Your API key is encrypted and stored securely. You can regenerate your API key on Manifold settings if needed.',
9297
9431
  });
9298
9432
  }
9433
+ case 'setup_binance_credentials': {
9434
+ await context.credentials.setCredentials(userId, 'binance', {
9435
+ apiKey: toolInput.api_key,
9436
+ apiSecret: toolInput.api_secret,
9437
+ });
9438
+ return JSON.stringify({
9439
+ result: 'Binance credentials saved! You can now trade futures on Binance.',
9440
+ security_notice: 'Your credentials are encrypted with AES-256-GCM. Use IP-restricted API keys for maximum security.',
9441
+ });
9442
+ }
9443
+ case 'setup_bybit_credentials': {
9444
+ await context.credentials.setCredentials(userId, 'bybit', {
9445
+ apiKey: toolInput.api_key,
9446
+ apiSecret: toolInput.api_secret,
9447
+ });
9448
+ return JSON.stringify({
9449
+ result: 'Bybit credentials saved! You can now trade futures on Bybit.',
9450
+ security_notice: 'Your credentials are encrypted with AES-256-GCM. Use IP-restricted API keys for maximum security.',
9451
+ });
9452
+ }
9453
+ case 'setup_hyperliquid_credentials': {
9454
+ await context.credentials.setCredentials(userId, 'hyperliquid', {
9455
+ privateKey: toolInput.private_key,
9456
+ walletAddress: toolInput.wallet_address || '',
9457
+ });
9458
+ return JSON.stringify({
9459
+ result: 'Hyperliquid credentials saved! You can now trade on Hyperliquid.',
9460
+ security_notice: 'Your private key is encrypted with AES-256-GCM. Consider using a dedicated trading wallet.',
9461
+ });
9462
+ }
9463
+ case 'setup_mexc_credentials': {
9464
+ await context.credentials.setCredentials(userId, 'mexc', {
9465
+ apiKey: toolInput.api_key,
9466
+ apiSecret: toolInput.api_secret,
9467
+ });
9468
+ return JSON.stringify({
9469
+ result: 'MEXC credentials saved! You can now trade futures on MEXC.',
9470
+ security_notice: 'Your credentials are encrypted with AES-256-GCM. Use IP-restricted API keys for maximum security.',
9471
+ });
9472
+ }
9473
+ case 'setup_betfair_credentials': {
9474
+ await context.credentials.setCredentials(userId, 'betfair', {
9475
+ appKey: toolInput.app_key,
9476
+ sessionToken: toolInput.session_token,
9477
+ });
9478
+ return JSON.stringify({
9479
+ result: 'Betfair credentials saved! You can now trade on Betfair.',
9480
+ security_notice: 'Your credentials are encrypted with AES-256-GCM. Session tokens expire — you may need to refresh periodically.',
9481
+ });
9482
+ }
9483
+ case 'setup_drift_credentials': {
9484
+ await context.credentials.setCredentials(userId, 'drift', {
9485
+ privateKey: toolInput.private_key,
9486
+ keypairPath: toolInput.keypair_path || undefined,
9487
+ });
9488
+ return JSON.stringify({
9489
+ result: 'Drift credentials saved! You can now trade perpetuals on Drift.',
9490
+ security_notice: 'Your Solana private key is encrypted with AES-256-GCM. Use a dedicated trading wallet.',
9491
+ });
9492
+ }
9493
+ case 'setup_smarkets_credentials': {
9494
+ await context.credentials.setCredentials(userId, 'smarkets', {
9495
+ apiToken: toolInput.api_token,
9496
+ sessionToken: toolInput.session_token || undefined,
9497
+ });
9498
+ return JSON.stringify({
9499
+ result: 'Smarkets credentials saved! You can now trade on Smarkets.',
9500
+ security_notice: 'Your credentials are encrypted with AES-256-GCM.',
9501
+ });
9502
+ }
9503
+ case 'setup_opinion_credentials': {
9504
+ await context.credentials.setCredentials(userId, 'opinion', {
9505
+ apiKey: toolInput.api_key,
9506
+ privateKey: toolInput.private_key || undefined,
9507
+ multiSigAddress: toolInput.multi_sig_address || undefined,
9508
+ });
9509
+ return JSON.stringify({
9510
+ result: 'Opinion.trade credentials saved! You can now trade on Opinion.',
9511
+ security_notice: 'Your credentials are encrypted with AES-256-GCM. Use a dedicated BNB Chain wallet for trading.',
9512
+ });
9513
+ }
9514
+ case 'setup_virtuals_credentials': {
9515
+ await context.credentials.setCredentials(userId, 'virtuals', {
9516
+ privateKey: toolInput.private_key,
9517
+ rpcUrl: toolInput.rpc_url || undefined,
9518
+ });
9519
+ return JSON.stringify({
9520
+ result: 'Virtuals Protocol credentials saved! You can now trade AI agents on Virtuals.',
9521
+ security_notice: 'Your EVM private key is encrypted with AES-256-GCM. Use a dedicated Base chain wallet.',
9522
+ });
9523
+ }
9524
+ case 'setup_hedgehog_credentials': {
9525
+ await context.credentials.setCredentials(userId, 'hedgehog', {
9526
+ privateKey: toolInput.private_key,
9527
+ apiKey: toolInput.api_key || undefined,
9528
+ });
9529
+ return JSON.stringify({
9530
+ result: 'Hedgehog Markets credentials saved! You can now trade on Hedgehog.',
9531
+ security_notice: 'Your Solana private key is encrypted with AES-256-GCM. Use a dedicated trading wallet.',
9532
+ });
9533
+ }
9534
+ case 'setup_predictfun_credentials': {
9535
+ await context.credentials.setCredentials(userId, 'predictfun', {
9536
+ privateKey: toolInput.private_key,
9537
+ predictAccount: toolInput.predict_account || undefined,
9538
+ apiKey: toolInput.api_key || undefined,
9539
+ });
9540
+ return JSON.stringify({
9541
+ result: 'Predict.fun credentials saved! You can now trade on Predict.fun.',
9542
+ security_notice: 'Your BNB Chain private key is encrypted with AES-256-GCM. Use a dedicated trading wallet.',
9543
+ });
9544
+ }
9299
9545
  case 'list_trading_credentials': {
9300
9546
  const platforms = await context.credentials.listUserPlatforms(userId);
9301
9547
  if (platforms.length === 0) {