clodds 1.1.0
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/LICENSE +21 -0
- package/README.md +468 -0
- package/dist/acp/agreement.d.ts +110 -0
- package/dist/acp/agreement.js +514 -0
- package/dist/acp/agreement.js.map +1 -0
- package/dist/acp/discovery.d.ts +84 -0
- package/dist/acp/discovery.js +332 -0
- package/dist/acp/discovery.js.map +1 -0
- package/dist/acp/escrow.d.ts +139 -0
- package/dist/acp/escrow.js +880 -0
- package/dist/acp/escrow.js.map +1 -0
- package/dist/acp/identity.d.ts +135 -0
- package/dist/acp/identity.js +716 -0
- package/dist/acp/identity.js.map +1 -0
- package/dist/acp/index.d.ts +205 -0
- package/dist/acp/index.js +583 -0
- package/dist/acp/index.js.map +1 -0
- package/dist/acp/persistence.d.ts +59 -0
- package/dist/acp/persistence.js +590 -0
- package/dist/acp/persistence.js.map +1 -0
- package/dist/acp/predictions.d.ts +89 -0
- package/dist/acp/predictions.js +417 -0
- package/dist/acp/predictions.js.map +1 -0
- package/dist/acp/registry.d.ts +143 -0
- package/dist/acp/registry.js +584 -0
- package/dist/acp/registry.js.map +1 -0
- package/dist/agents/handlers/acp.d.ts +12 -0
- package/dist/agents/handlers/acp.js +987 -0
- package/dist/agents/handlers/acp.js.map +1 -0
- package/dist/agents/handlers/agentbets.d.ts +8 -0
- package/dist/agents/handlers/agentbets.js +63 -0
- package/dist/agents/handlers/agentbets.js.map +1 -0
- package/dist/agents/handlers/arbitrage.d.ts +16 -0
- package/dist/agents/handlers/arbitrage.js +187 -0
- package/dist/agents/handlers/arbitrage.js.map +1 -0
- package/dist/agents/handlers/betfair.d.ts +11 -0
- package/dist/agents/handlers/betfair.js +214 -0
- package/dist/agents/handlers/betfair.js.map +1 -0
- package/dist/agents/handlers/binance.d.ts +9 -0
- package/dist/agents/handlers/binance.js +227 -0
- package/dist/agents/handlers/binance.js.map +1 -0
- package/dist/agents/handlers/bittensor.d.ts +10 -0
- package/dist/agents/handlers/bittensor.js +90 -0
- package/dist/agents/handlers/bittensor.js.map +1 -0
- package/dist/agents/handlers/bybit.d.ts +9 -0
- package/dist/agents/handlers/bybit.js +226 -0
- package/dist/agents/handlers/bybit.js.map +1 -0
- package/dist/agents/handlers/credentials.d.ts +8 -0
- package/dist/agents/handlers/credentials.js +103 -0
- package/dist/agents/handlers/credentials.js.map +1 -0
- package/dist/agents/handlers/hyperliquid.d.ts +9 -0
- package/dist/agents/handlers/hyperliquid.js +326 -0
- package/dist/agents/handlers/hyperliquid.js.map +1 -0
- package/dist/agents/handlers/index.d.ts +82 -0
- package/dist/agents/handlers/index.js +143 -0
- package/dist/agents/handlers/index.js.map +1 -0
- package/dist/agents/handlers/kalshi.d.ts +10 -0
- package/dist/agents/handlers/kalshi.js +1377 -0
- package/dist/agents/handlers/kalshi.js.map +1 -0
- package/dist/agents/handlers/manifold.d.ts +9 -0
- package/dist/agents/handlers/manifold.js +1001 -0
- package/dist/agents/handlers/manifold.js.map +1 -0
- package/dist/agents/handlers/markets.d.ts +8 -0
- package/dist/agents/handlers/markets.js +321 -0
- package/dist/agents/handlers/markets.js.map +1 -0
- package/dist/agents/handlers/opinion.d.ts +11 -0
- package/dist/agents/handlers/opinion.js +374 -0
- package/dist/agents/handlers/opinion.js.map +1 -0
- package/dist/agents/handlers/paper-trading.d.ts +8 -0
- package/dist/agents/handlers/paper-trading.js +124 -0
- package/dist/agents/handlers/paper-trading.js.map +1 -0
- package/dist/agents/handlers/polymarket.d.ts +17 -0
- package/dist/agents/handlers/polymarket.js +455 -0
- package/dist/agents/handlers/polymarket.js.map +1 -0
- package/dist/agents/handlers/predictfun.d.ts +9 -0
- package/dist/agents/handlers/predictfun.js +488 -0
- package/dist/agents/handlers/predictfun.js.map +1 -0
- package/dist/agents/handlers/smarkets.d.ts +11 -0
- package/dist/agents/handlers/smarkets.js +205 -0
- package/dist/agents/handlers/smarkets.js.map +1 -0
- package/dist/agents/handlers/solana.d.ts +14 -0
- package/dist/agents/handlers/solana.js +1530 -0
- package/dist/agents/handlers/solana.js.map +1 -0
- package/dist/agents/handlers/types.d.ts +58 -0
- package/dist/agents/handlers/types.js +34 -0
- package/dist/agents/handlers/types.js.map +1 -0
- package/dist/agents/handlers/virtuals.d.ts +11 -0
- package/dist/agents/handlers/virtuals.js +135 -0
- package/dist/agents/handlers/virtuals.js.map +1 -0
- package/dist/agents/handlers/wallets.d.ts +9 -0
- package/dist/agents/handlers/wallets.js +222 -0
- package/dist/agents/handlers/wallets.js.map +1 -0
- package/dist/agents/index.d.ts +79 -0
- package/dist/agents/index.js +16690 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/subagents.d.ts +219 -0
- package/dist/agents/subagents.js +736 -0
- package/dist/agents/subagents.js.map +1 -0
- package/dist/alerts/index.d.ts +110 -0
- package/dist/alerts/index.js +421 -0
- package/dist/alerts/index.js.map +1 -0
- package/dist/alerts/realtime.d.ts +114 -0
- package/dist/alerts/realtime.js +262 -0
- package/dist/alerts/realtime.js.map +1 -0
- package/dist/api/apikeys.d.ts +74 -0
- package/dist/api/apikeys.js +319 -0
- package/dist/api/apikeys.js.map +1 -0
- package/dist/api/compute/code.d.ts +28 -0
- package/dist/api/compute/code.js +257 -0
- package/dist/api/compute/code.js.map +1 -0
- package/dist/api/compute/data.d.ts +72 -0
- package/dist/api/compute/data.js +264 -0
- package/dist/api/compute/data.js.map +1 -0
- package/dist/api/compute/gateway.d.ts +185 -0
- package/dist/api/compute/gateway.js +958 -0
- package/dist/api/compute/gateway.js.map +1 -0
- package/dist/api/compute/index.d.ts +21 -0
- package/dist/api/compute/index.js +46 -0
- package/dist/api/compute/index.js.map +1 -0
- package/dist/api/compute/llm.d.ts +64 -0
- package/dist/api/compute/llm.js +602 -0
- package/dist/api/compute/llm.js.map +1 -0
- package/dist/api/compute/persistence.d.ts +77 -0
- package/dist/api/compute/persistence.js +251 -0
- package/dist/api/compute/persistence.js.map +1 -0
- package/dist/api/compute/storage.d.ts +48 -0
- package/dist/api/compute/storage.js +283 -0
- package/dist/api/compute/storage.js.map +1 -0
- package/dist/api/compute/trade.d.ts +69 -0
- package/dist/api/compute/trade.js +460 -0
- package/dist/api/compute/trade.js.map +1 -0
- package/dist/api/compute/types.d.ts +271 -0
- package/dist/api/compute/types.js +87 -0
- package/dist/api/compute/types.js.map +1 -0
- package/dist/api/compute/web.d.ts +29 -0
- package/dist/api/compute/web.js +255 -0
- package/dist/api/compute/web.js.map +1 -0
- package/dist/api/custody.d.ts +48 -0
- package/dist/api/custody.js +272 -0
- package/dist/api/custody.js.map +1 -0
- package/dist/api/fees.d.ts +91 -0
- package/dist/api/fees.js +155 -0
- package/dist/api/fees.js.map +1 -0
- package/dist/api/gateway.d.ts +40 -0
- package/dist/api/gateway.js +569 -0
- package/dist/api/gateway.js.map +1 -0
- package/dist/api/index.d.ts +29 -0
- package/dist/api/index.js +55 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/jobs.d.ts +59 -0
- package/dist/api/jobs.js +362 -0
- package/dist/api/jobs.js.map +1 -0
- package/dist/api/middleware.d.ts +60 -0
- package/dist/api/middleware.js +315 -0
- package/dist/api/middleware.js.map +1 -0
- package/dist/api/prompt.d.ts +44 -0
- package/dist/api/prompt.js +345 -0
- package/dist/api/prompt.js.map +1 -0
- package/dist/api/sdk.d.ts +258 -0
- package/dist/api/sdk.js +341 -0
- package/dist/api/sdk.js.map +1 -0
- package/dist/api/server.d.ts +17 -0
- package/dist/api/server.js +852 -0
- package/dist/api/server.js.map +1 -0
- package/dist/api/types.d.ts +307 -0
- package/dist/api/types.js +64 -0
- package/dist/api/types.js.map +1 -0
- package/dist/arbitrage/index.d.ts +124 -0
- package/dist/arbitrage/index.js +482 -0
- package/dist/arbitrage/index.js.map +1 -0
- package/dist/auth/copilot.d.ts +87 -0
- package/dist/auth/copilot.js +328 -0
- package/dist/auth/copilot.js.map +1 -0
- package/dist/auth/google.d.ts +121 -0
- package/dist/auth/google.js +479 -0
- package/dist/auth/google.js.map +1 -0
- package/dist/auth/index.d.ts +8 -0
- package/dist/auth/index.js +25 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/oauth.d.ts +94 -0
- package/dist/auth/oauth.js +502 -0
- package/dist/auth/oauth.js.map +1 -0
- package/dist/auth/qwen.d.ts +110 -0
- package/dist/auth/qwen.js +351 -0
- package/dist/auth/qwen.js.map +1 -0
- package/dist/auto-reply/index.d.ts +143 -0
- package/dist/auto-reply/index.js +391 -0
- package/dist/auto-reply/index.js.map +1 -0
- package/dist/automation/cron.d.ts +66 -0
- package/dist/automation/cron.js +226 -0
- package/dist/automation/cron.js.map +1 -0
- package/dist/automation/heartbeats.d.ts +63 -0
- package/dist/automation/heartbeats.js +144 -0
- package/dist/automation/heartbeats.js.map +1 -0
- package/dist/automation/index.d.ts +9 -0
- package/dist/automation/index.js +15 -0
- package/dist/automation/index.js.map +1 -0
- package/dist/automation/webhooks.d.ts +60 -0
- package/dist/automation/webhooks.js +225 -0
- package/dist/automation/webhooks.js.map +1 -0
- package/dist/bankr/client.d.ts +86 -0
- package/dist/bankr/client.js +177 -0
- package/dist/bankr/client.js.map +1 -0
- package/dist/bankr/index.d.ts +6 -0
- package/dist/bankr/index.js +23 -0
- package/dist/bankr/index.js.map +1 -0
- package/dist/base/index.d.ts +6 -0
- package/dist/base/index.js +23 -0
- package/dist/base/index.js.map +1 -0
- package/dist/base/provider.d.ts +27 -0
- package/dist/base/provider.js +128 -0
- package/dist/base/provider.js.map +1 -0
- package/dist/bin/worker.d.ts +31 -0
- package/dist/bin/worker.js +127 -0
- package/dist/bin/worker.js.map +1 -0
- package/dist/bittensor/chutes.d.ts +14 -0
- package/dist/bittensor/chutes.js +141 -0
- package/dist/bittensor/chutes.js.map +1 -0
- package/dist/bittensor/index.d.ts +7 -0
- package/dist/bittensor/index.js +13 -0
- package/dist/bittensor/index.js.map +1 -0
- package/dist/bittensor/persistence.d.ts +8 -0
- package/dist/bittensor/persistence.js +188 -0
- package/dist/bittensor/persistence.js.map +1 -0
- package/dist/bittensor/plugin.d.ts +30 -0
- package/dist/bittensor/plugin.js +134 -0
- package/dist/bittensor/plugin.js.map +1 -0
- package/dist/bittensor/python-runner.d.ts +7 -0
- package/dist/bittensor/python-runner.js +83 -0
- package/dist/bittensor/python-runner.js.map +1 -0
- package/dist/bittensor/server.d.ts +7 -0
- package/dist/bittensor/server.js +110 -0
- package/dist/bittensor/server.js.map +1 -0
- package/dist/bittensor/service.d.ts +7 -0
- package/dist/bittensor/service.js +291 -0
- package/dist/bittensor/service.js.map +1 -0
- package/dist/bittensor/tool.d.ts +45 -0
- package/dist/bittensor/tool.js +147 -0
- package/dist/bittensor/tool.js.map +1 -0
- package/dist/bittensor/types.d.ts +188 -0
- package/dist/bittensor/types.js +6 -0
- package/dist/bittensor/types.js.map +1 -0
- package/dist/bittensor/wallet.d.ts +18 -0
- package/dist/bittensor/wallet.js +192 -0
- package/dist/bittensor/wallet.js.map +1 -0
- package/dist/bridge/wormhole.d.ts +239 -0
- package/dist/bridge/wormhole.js +404 -0
- package/dist/bridge/wormhole.js.map +1 -0
- package/dist/browser/index.d.ts +67 -0
- package/dist/browser/index.js +458 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/cache/index.d.ts +105 -0
- package/dist/cache/index.js +306 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/canvas/index.d.ts +66 -0
- package/dist/canvas/index.js +391 -0
- package/dist/canvas/index.js.map +1 -0
- package/dist/channels/base-adapter.d.ts +126 -0
- package/dist/channels/base-adapter.js +416 -0
- package/dist/channels/base-adapter.js.map +1 -0
- package/dist/channels/bluebubbles/index.d.ts +23 -0
- package/dist/channels/bluebubbles/index.js +182 -0
- package/dist/channels/bluebubbles/index.js.map +1 -0
- package/dist/channels/discord/index.d.ts +25 -0
- package/dist/channels/discord/index.js +419 -0
- package/dist/channels/discord/index.js.map +1 -0
- package/dist/channels/googlechat/index.d.ts +35 -0
- package/dist/channels/googlechat/index.js +223 -0
- package/dist/channels/googlechat/index.js.map +1 -0
- package/dist/channels/imessage/index.d.ts +28 -0
- package/dist/channels/imessage/index.js +340 -0
- package/dist/channels/imessage/index.js.map +1 -0
- package/dist/channels/index.d.ts +58 -0
- package/dist/channels/index.js +382 -0
- package/dist/channels/index.js.map +1 -0
- package/dist/channels/line/index.d.ts +307 -0
- package/dist/channels/line/index.js +760 -0
- package/dist/channels/line/index.js.map +1 -0
- package/dist/channels/matrix/index.d.ts +35 -0
- package/dist/channels/matrix/index.js +328 -0
- package/dist/channels/matrix/index.js.map +1 -0
- package/dist/channels/mattermost/index.d.ts +25 -0
- package/dist/channels/mattermost/index.js +239 -0
- package/dist/channels/mattermost/index.js.map +1 -0
- package/dist/channels/nextcloud-talk/index.d.ts +25 -0
- package/dist/channels/nextcloud-talk/index.js +175 -0
- package/dist/channels/nextcloud-talk/index.js.map +1 -0
- package/dist/channels/nostr/index.d.ts +21 -0
- package/dist/channels/nostr/index.js +278 -0
- package/dist/channels/nostr/index.js.map +1 -0
- package/dist/channels/signal/index.d.ts +33 -0
- package/dist/channels/signal/index.js +333 -0
- package/dist/channels/signal/index.js.map +1 -0
- package/dist/channels/slack/index.d.ts +26 -0
- package/dist/channels/slack/index.js +266 -0
- package/dist/channels/slack/index.js.map +1 -0
- package/dist/channels/teams/index.d.ts +42 -0
- package/dist/channels/teams/index.js +312 -0
- package/dist/channels/teams/index.js.map +1 -0
- package/dist/channels/telegram/index.d.ts +9 -0
- package/dist/channels/telegram/index.js +761 -0
- package/dist/channels/telegram/index.js.map +1 -0
- package/dist/channels/tlon/index.d.ts +25 -0
- package/dist/channels/tlon/index.js +236 -0
- package/dist/channels/tlon/index.js.map +1 -0
- package/dist/channels/twitch/index.d.ts +25 -0
- package/dist/channels/twitch/index.js +182 -0
- package/dist/channels/twitch/index.js.map +1 -0
- package/dist/channels/voice/index.d.ts +31 -0
- package/dist/channels/voice/index.js +208 -0
- package/dist/channels/voice/index.js.map +1 -0
- package/dist/channels/webchat/index.d.ts +29 -0
- package/dist/channels/webchat/index.js +366 -0
- package/dist/channels/webchat/index.js.map +1 -0
- package/dist/channels/whatsapp/index.d.ts +72 -0
- package/dist/channels/whatsapp/index.js +767 -0
- package/dist/channels/whatsapp/index.js.map +1 -0
- package/dist/channels/zalo/index.d.ts +45 -0
- package/dist/channels/zalo/index.js +285 -0
- package/dist/channels/zalo/index.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +23 -0
- package/dist/cli/commands/doctor.js +649 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/gateway.d.ts +6 -0
- package/dist/cli/commands/gateway.js +32 -0
- package/dist/cli/commands/gateway.js.map +1 -0
- package/dist/cli/commands/index.d.ts +31 -0
- package/dist/cli/commands/index.js +3743 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/onboard.d.ts +4 -0
- package/dist/cli/commands/onboard.js +334 -0
- package/dist/cli/commands/onboard.js.map +1 -0
- package/dist/cli/commands/repl.d.ts +11 -0
- package/dist/cli/commands/repl.js +185 -0
- package/dist/cli/commands/repl.js.map +1 -0
- package/dist/cli/commands/skills.d.ts +29 -0
- package/dist/cli/commands/skills.js +297 -0
- package/dist/cli/commands/skills.js.map +1 -0
- package/dist/cli/index.d.ts +12 -0
- package/dist/cli/index.js +449 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/secure.d.ts +14 -0
- package/dist/cli/secure.js +626 -0
- package/dist/cli/secure.js.map +1 -0
- package/dist/commands/index.d.ts +61 -0
- package/dist/commands/index.js +290 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/registry.d.ts +69 -0
- package/dist/commands/registry.js +3142 -0
- package/dist/commands/registry.js.map +1 -0
- package/dist/config/index.d.ts +465 -0
- package/dist/config/index.js +1451 -0
- package/dist/config/index.js.map +1 -0
- package/dist/credentials/index.d.ts +51 -0
- package/dist/credentials/index.js +270 -0
- package/dist/credentials/index.js.map +1 -0
- package/dist/cron/index.d.ts +151 -0
- package/dist/cron/index.js +1283 -0
- package/dist/cron/index.js.map +1 -0
- package/dist/cron/types.d.ts +102 -0
- package/dist/cron/types.js +6 -0
- package/dist/cron/types.js.map +1 -0
- package/dist/daemon/index.d.ts +23 -0
- package/dist/daemon/index.js +159 -0
- package/dist/daemon/index.js.map +1 -0
- package/dist/db/index.d.ts +825 -0
- package/dist/db/index.js +3382 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/migrations.d.ts +70 -0
- package/dist/db/migrations.js +1373 -0
- package/dist/db/migrations.js.map +1 -0
- package/dist/docker/index.d.ts +188 -0
- package/dist/docker/index.js +571 -0
- package/dist/docker/index.js.map +1 -0
- package/dist/doctor/index.d.ts +47 -0
- package/dist/doctor/index.js +379 -0
- package/dist/doctor/index.js.map +1 -0
- package/dist/embeddings/index.d.ts +65 -0
- package/dist/embeddings/index.js +399 -0
- package/dist/embeddings/index.js.map +1 -0
- package/dist/evm/contracts.d.ts +112 -0
- package/dist/evm/contracts.js +332 -0
- package/dist/evm/contracts.js.map +1 -0
- package/dist/evm/index.d.ts +21 -0
- package/dist/evm/index.js +45 -0
- package/dist/evm/index.js.map +1 -0
- package/dist/evm/multichain.d.ts +87 -0
- package/dist/evm/multichain.js +308 -0
- package/dist/evm/multichain.js.map +1 -0
- package/dist/evm/odos.d.ts +62 -0
- package/dist/evm/odos.js +261 -0
- package/dist/evm/odos.js.map +1 -0
- package/dist/evm/oneinch.d.ts +55 -0
- package/dist/evm/oneinch.js +324 -0
- package/dist/evm/oneinch.js.map +1 -0
- package/dist/evm/transfers.d.ts +83 -0
- package/dist/evm/transfers.js +393 -0
- package/dist/evm/transfers.js.map +1 -0
- package/dist/evm/uniswap.d.ts +56 -0
- package/dist/evm/uniswap.js +307 -0
- package/dist/evm/uniswap.js.map +1 -0
- package/dist/evm/virtuals.d.ts +220 -0
- package/dist/evm/virtuals.js +735 -0
- package/dist/evm/virtuals.js.map +1 -0
- package/dist/evm/wallet.d.ts +96 -0
- package/dist/evm/wallet.js +258 -0
- package/dist/evm/wallet.js.map +1 -0
- package/dist/exchanges/binance-futures/index.d.ts +83 -0
- package/dist/exchanges/binance-futures/index.js +394 -0
- package/dist/exchanges/binance-futures/index.js.map +1 -0
- package/dist/exchanges/bybit/index.d.ts +78 -0
- package/dist/exchanges/bybit/index.js +379 -0
- package/dist/exchanges/bybit/index.js.map +1 -0
- package/dist/exchanges/hyperliquid/index.d.ts +594 -0
- package/dist/exchanges/hyperliquid/index.js +1101 -0
- package/dist/exchanges/hyperliquid/index.js.map +1 -0
- package/dist/exchanges/mexc/index.d.ts +80 -0
- package/dist/exchanges/mexc/index.js +389 -0
- package/dist/exchanges/mexc/index.js.map +1 -0
- package/dist/exchanges/opinion/index.d.ts +128 -0
- package/dist/exchanges/opinion/index.js +443 -0
- package/dist/exchanges/opinion/index.js.map +1 -0
- package/dist/exchanges/predictfun/index.d.ts +107 -0
- package/dist/exchanges/predictfun/index.js +398 -0
- package/dist/exchanges/predictfun/index.js.map +1 -0
- package/dist/execution/auto-redeem.d.ts +55 -0
- package/dist/execution/auto-redeem.js +324 -0
- package/dist/execution/auto-redeem.js.map +1 -0
- package/dist/execution/bracket-orders.d.ts +84 -0
- package/dist/execution/bracket-orders.js +387 -0
- package/dist/execution/bracket-orders.js.map +1 -0
- package/dist/execution/circuit-breaker.d.ts +87 -0
- package/dist/execution/circuit-breaker.js +274 -0
- package/dist/execution/circuit-breaker.js.map +1 -0
- package/dist/execution/dca-persistence.d.ts +47 -0
- package/dist/execution/dca-persistence.js +159 -0
- package/dist/execution/dca-persistence.js.map +1 -0
- package/dist/execution/dca.d.ts +60 -0
- package/dist/execution/dca.js +273 -0
- package/dist/execution/dca.js.map +1 -0
- package/dist/execution/futures.d.ts +162 -0
- package/dist/execution/futures.js +1336 -0
- package/dist/execution/futures.js.map +1 -0
- package/dist/execution/index.d.ts +346 -0
- package/dist/execution/index.js +2532 -0
- package/dist/execution/index.js.map +1 -0
- package/dist/execution/mev-protection.d.ts +150 -0
- package/dist/execution/mev-protection.js +377 -0
- package/dist/execution/mev-protection.js.map +1 -0
- package/dist/execution/order-persistence.d.ts +81 -0
- package/dist/execution/order-persistence.js +350 -0
- package/dist/execution/order-persistence.js.map +1 -0
- package/dist/execution/position-manager.d.ts +142 -0
- package/dist/execution/position-manager.js +404 -0
- package/dist/execution/position-manager.js.map +1 -0
- package/dist/execution/smart-router.d.ts +90 -0
- package/dist/execution/smart-router.js +323 -0
- package/dist/execution/smart-router.js.map +1 -0
- package/dist/execution/trigger-orders.d.ts +81 -0
- package/dist/execution/trigger-orders.js +266 -0
- package/dist/execution/trigger-orders.js.map +1 -0
- package/dist/execution/twap.d.ts +87 -0
- package/dist/execution/twap.js +405 -0
- package/dist/execution/twap.js.map +1 -0
- package/dist/extensions/copilot-proxy/index.d.ts +49 -0
- package/dist/extensions/copilot-proxy/index.js +204 -0
- package/dist/extensions/copilot-proxy/index.js.map +1 -0
- package/dist/extensions/diagnostics-otel/index.d.ts +54 -0
- package/dist/extensions/diagnostics-otel/index.js +290 -0
- package/dist/extensions/diagnostics-otel/index.js.map +1 -0
- package/dist/extensions/google-auth/index.d.ts +71 -0
- package/dist/extensions/google-auth/index.js +350 -0
- package/dist/extensions/google-auth/index.js.map +1 -0
- package/dist/extensions/index.d.ts +11 -0
- package/dist/extensions/index.js +29 -0
- package/dist/extensions/index.js.map +1 -0
- package/dist/extensions/llm-task/index.d.ts +80 -0
- package/dist/extensions/llm-task/index.js +248 -0
- package/dist/extensions/llm-task/index.js.map +1 -0
- package/dist/extensions/lobster/index.d.ts +69 -0
- package/dist/extensions/lobster/index.js +178 -0
- package/dist/extensions/lobster/index.js.map +1 -0
- package/dist/extensions/memory-lancedb/index.d.ts +62 -0
- package/dist/extensions/memory-lancedb/index.js +343 -0
- package/dist/extensions/memory-lancedb/index.js.map +1 -0
- package/dist/extensions/open-prose/index.d.ts +82 -0
- package/dist/extensions/open-prose/index.js +565 -0
- package/dist/extensions/open-prose/index.js.map +1 -0
- package/dist/extensions/qwen-portal/index.d.ts +48 -0
- package/dist/extensions/qwen-portal/index.js +161 -0
- package/dist/extensions/qwen-portal/index.js.map +1 -0
- package/dist/extensions/task-runner/index.d.ts +121 -0
- package/dist/extensions/task-runner/index.js +640 -0
- package/dist/extensions/task-runner/index.js.map +1 -0
- package/dist/farcaster/client.d.ts +101 -0
- package/dist/farcaster/client.js +282 -0
- package/dist/farcaster/client.js.map +1 -0
- package/dist/farcaster/index.d.ts +4 -0
- package/dist/farcaster/index.js +21 -0
- package/dist/farcaster/index.js.map +1 -0
- package/dist/feeds/acled/index.d.ts +86 -0
- package/dist/feeds/acled/index.js +215 -0
- package/dist/feeds/acled/index.js.map +1 -0
- package/dist/feeds/agentbets/index.d.ts +17 -0
- package/dist/feeds/agentbets/index.js +137 -0
- package/dist/feeds/agentbets/index.js.map +1 -0
- package/dist/feeds/betfair/index.d.ts +132 -0
- package/dist/feeds/betfair/index.js +640 -0
- package/dist/feeds/betfair/index.js.map +1 -0
- package/dist/feeds/crypto/index.d.ts +101 -0
- package/dist/feeds/crypto/index.js +506 -0
- package/dist/feeds/crypto/index.js.map +1 -0
- package/dist/feeds/crypto/whale-tracker.d.ts +138 -0
- package/dist/feeds/crypto/whale-tracker.js +685 -0
- package/dist/feeds/crypto/whale-tracker.js.map +1 -0
- package/dist/feeds/descriptors.d.ts +14 -0
- package/dist/feeds/descriptors.js +582 -0
- package/dist/feeds/descriptors.js.map +1 -0
- package/dist/feeds/drift/index.d.ts +23 -0
- package/dist/feeds/drift/index.js +182 -0
- package/dist/feeds/drift/index.js.map +1 -0
- package/dist/feeds/drift/trading.d.ts +75 -0
- package/dist/feeds/drift/trading.js +457 -0
- package/dist/feeds/drift/trading.js.map +1 -0
- package/dist/feeds/external/index.d.ts +48 -0
- package/dist/feeds/external/index.js +575 -0
- package/dist/feeds/external/index.js.map +1 -0
- package/dist/feeds/fred/index.d.ts +134 -0
- package/dist/feeds/fred/index.js +263 -0
- package/dist/feeds/fred/index.js.map +1 -0
- package/dist/feeds/freshness.d.ts +79 -0
- package/dist/feeds/freshness.js +259 -0
- package/dist/feeds/freshness.js.map +1 -0
- package/dist/feeds/hedgehog/index.d.ts +24 -0
- package/dist/feeds/hedgehog/index.js +589 -0
- package/dist/feeds/hedgehog/index.js.map +1 -0
- package/dist/feeds/hedgehog/types.d.ts +215 -0
- package/dist/feeds/hedgehog/types.js +7 -0
- package/dist/feeds/hedgehog/types.js.map +1 -0
- package/dist/feeds/index.d.ts +38 -0
- package/dist/feeds/index.js +469 -0
- package/dist/feeds/index.js.map +1 -0
- package/dist/feeds/kalshi/index.d.ts +116 -0
- package/dist/feeds/kalshi/index.js +970 -0
- package/dist/feeds/kalshi/index.js.map +1 -0
- package/dist/feeds/manifold/index.d.ts +15 -0
- package/dist/feeds/manifold/index.js +269 -0
- package/dist/feeds/manifold/index.js.map +1 -0
- package/dist/feeds/metaculus/index.d.ts +22 -0
- package/dist/feeds/metaculus/index.js +149 -0
- package/dist/feeds/metaculus/index.js.map +1 -0
- package/dist/feeds/news/index.d.ts +20 -0
- package/dist/feeds/news/index.js +308 -0
- package/dist/feeds/news/index.js.map +1 -0
- package/dist/feeds/opinion/index.d.ts +31 -0
- package/dist/feeds/opinion/index.js +389 -0
- package/dist/feeds/opinion/index.js.map +1 -0
- package/dist/feeds/polymarket/index.d.ts +21 -0
- package/dist/feeds/polymarket/index.js +501 -0
- package/dist/feeds/polymarket/index.js.map +1 -0
- package/dist/feeds/polymarket/rtds.d.ts +40 -0
- package/dist/feeds/polymarket/rtds.js +159 -0
- package/dist/feeds/polymarket/rtds.js.map +1 -0
- package/dist/feeds/polymarket/user-ws.d.ts +64 -0
- package/dist/feeds/polymarket/user-ws.js +230 -0
- package/dist/feeds/polymarket/user-ws.js.map +1 -0
- package/dist/feeds/polymarket/whale-tracker.d.ts +152 -0
- package/dist/feeds/polymarket/whale-tracker.js +709 -0
- package/dist/feeds/polymarket/whale-tracker.js.map +1 -0
- package/dist/feeds/predictfun/index.d.ts +24 -0
- package/dist/feeds/predictfun/index.js +234 -0
- package/dist/feeds/predictfun/index.js.map +1 -0
- package/dist/feeds/predictit/index.d.ts +14 -0
- package/dist/feeds/predictit/index.js +88 -0
- package/dist/feeds/predictit/index.js.map +1 -0
- package/dist/feeds/registry.d.ts +148 -0
- package/dist/feeds/registry.js +197 -0
- package/dist/feeds/registry.js.map +1 -0
- package/dist/feeds/smarkets/index.d.ts +76 -0
- package/dist/feeds/smarkets/index.js +415 -0
- package/dist/feeds/smarkets/index.js.map +1 -0
- package/dist/feeds/virtuals/index.d.ts +92 -0
- package/dist/feeds/virtuals/index.js +341 -0
- package/dist/feeds/virtuals/index.js.map +1 -0
- package/dist/feeds/weather-nws/index.d.ts +73 -0
- package/dist/feeds/weather-nws/index.js +162 -0
- package/dist/feeds/weather-nws/index.js.map +1 -0
- package/dist/feeds/weather-openmeteo/index.d.ts +80 -0
- package/dist/feeds/weather-openmeteo/index.js +197 -0
- package/dist/feeds/weather-openmeteo/index.js.map +1 -0
- package/dist/gateway/alerts-routes.d.ts +15 -0
- package/dist/gateway/alerts-routes.js +188 -0
- package/dist/gateway/alerts-routes.js.map +1 -0
- package/dist/gateway/alt-data-routes.d.ts +15 -0
- package/dist/gateway/alt-data-routes.js +67 -0
- package/dist/gateway/alt-data-routes.js.map +1 -0
- package/dist/gateway/api-routes.d.ts +39 -0
- package/dist/gateway/api-routes.js +1028 -0
- package/dist/gateway/api-routes.js.map +1 -0
- package/dist/gateway/audit-routes.d.ts +8 -0
- package/dist/gateway/audit-routes.js +61 -0
- package/dist/gateway/audit-routes.js.map +1 -0
- package/dist/gateway/bracket-routes.d.ts +12 -0
- package/dist/gateway/bracket-routes.js +122 -0
- package/dist/gateway/bracket-routes.js.map +1 -0
- package/dist/gateway/control-ui.d.ts +45 -0
- package/dist/gateway/control-ui.js +301 -0
- package/dist/gateway/control-ui.js.map +1 -0
- package/dist/gateway/copy-trading-routes.d.ts +12 -0
- package/dist/gateway/copy-trading-routes.js +159 -0
- package/dist/gateway/copy-trading-routes.js.map +1 -0
- package/dist/gateway/cron-routes.d.ts +14 -0
- package/dist/gateway/cron-routes.js +132 -0
- package/dist/gateway/cron-routes.js.map +1 -0
- package/dist/gateway/dca-routes.d.ts +8 -0
- package/dist/gateway/dca-routes.js +179 -0
- package/dist/gateway/dca-routes.js.map +1 -0
- package/dist/gateway/embeddings-routes.d.ts +12 -0
- package/dist/gateway/embeddings-routes.js +102 -0
- package/dist/gateway/embeddings-routes.js.map +1 -0
- package/dist/gateway/feeds-routes.d.ts +34 -0
- package/dist/gateway/feeds-routes.js +167 -0
- package/dist/gateway/feeds-routes.js.map +1 -0
- package/dist/gateway/index.d.ts +100 -0
- package/dist/gateway/index.js +2321 -0
- package/dist/gateway/index.js.map +1 -0
- package/dist/gateway/monitoring-routes.d.ts +12 -0
- package/dist/gateway/monitoring-routes.js +73 -0
- package/dist/gateway/monitoring-routes.js.map +1 -0
- package/dist/gateway/opportunity-routes.d.ts +12 -0
- package/dist/gateway/opportunity-routes.js +238 -0
- package/dist/gateway/opportunity-routes.js.map +1 -0
- package/dist/gateway/payments-routes.d.ts +14 -0
- package/dist/gateway/payments-routes.js +82 -0
- package/dist/gateway/payments-routes.js.map +1 -0
- package/dist/gateway/percolator-routes.d.ts +16 -0
- package/dist/gateway/percolator-routes.js +139 -0
- package/dist/gateway/percolator-routes.js.map +1 -0
- package/dist/gateway/queue-routes.d.ts +12 -0
- package/dist/gateway/queue-routes.js +47 -0
- package/dist/gateway/queue-routes.js.map +1 -0
- package/dist/gateway/risk-routes.d.ts +12 -0
- package/dist/gateway/risk-routes.js +119 -0
- package/dist/gateway/risk-routes.js.map +1 -0
- package/dist/gateway/routing-routes.d.ts +12 -0
- package/dist/gateway/routing-routes.js +86 -0
- package/dist/gateway/routing-routes.js.map +1 -0
- package/dist/gateway/server.d.ts +215 -0
- package/dist/gateway/server.js +2287 -0
- package/dist/gateway/server.js.map +1 -0
- package/dist/gateway/shield-routes.d.ts +8 -0
- package/dist/gateway/shield-routes.js +88 -0
- package/dist/gateway/shield-routes.js.map +1 -0
- package/dist/gateway/signal-bus.d.ts +51 -0
- package/dist/gateway/signal-bus.js +64 -0
- package/dist/gateway/signal-bus.js.map +1 -0
- package/dist/gateway/trigger-routes.d.ts +12 -0
- package/dist/gateway/trigger-routes.js +127 -0
- package/dist/gateway/trigger-routes.js.map +1 -0
- package/dist/gateway/twap-routes.d.ts +12 -0
- package/dist/gateway/twap-routes.js +142 -0
- package/dist/gateway/twap-routes.js.map +1 -0
- package/dist/gateway/webhooks-routes.d.ts +31 -0
- package/dist/gateway/webhooks-routes.js +107 -0
- package/dist/gateway/webhooks-routes.js.map +1 -0
- package/dist/gateway/whale-routes.d.ts +12 -0
- package/dist/gateway/whale-routes.js +204 -0
- package/dist/gateway/whale-routes.js.map +1 -0
- package/dist/history/index.d.ts +81 -0
- package/dist/history/index.js +362 -0
- package/dist/history/index.js.map +1 -0
- package/dist/hooks/index.d.ts +279 -0
- package/dist/hooks/index.js +739 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/i18n/index.d.ts +65 -0
- package/dist/i18n/index.js +183 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/identity/erc8004.d.ts +104 -0
- package/dist/identity/erc8004.js +493 -0
- package/dist/identity/erc8004.js.map +1 -0
- package/dist/identity/index.d.ts +1 -0
- package/dist/identity/index.js +18 -0
- package/dist/identity/index.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +240 -0
- package/dist/index.js.map +1 -0
- package/dist/infra/index.d.ts +133 -0
- package/dist/infra/index.js +481 -0
- package/dist/infra/index.js.map +1 -0
- package/dist/infra/retry.d.ts +132 -0
- package/dist/infra/retry.js +450 -0
- package/dist/infra/retry.js.map +1 -0
- package/dist/ledger/anchor.d.ts +45 -0
- package/dist/ledger/anchor.js +271 -0
- package/dist/ledger/anchor.js.map +1 -0
- package/dist/ledger/hash.d.ts +26 -0
- package/dist/ledger/hash.js +69 -0
- package/dist/ledger/hash.js.map +1 -0
- package/dist/ledger/hooks.d.ts +107 -0
- package/dist/ledger/hooks.js +314 -0
- package/dist/ledger/hooks.js.map +1 -0
- package/dist/ledger/index.d.ts +67 -0
- package/dist/ledger/index.js +221 -0
- package/dist/ledger/index.js.map +1 -0
- package/dist/ledger/storage.d.ts +57 -0
- package/dist/ledger/storage.js +368 -0
- package/dist/ledger/storage.js.map +1 -0
- package/dist/ledger/types.d.ts +138 -0
- package/dist/ledger/types.js +16 -0
- package/dist/ledger/types.js.map +1 -0
- package/dist/link-understanding/index.d.ts +61 -0
- package/dist/link-understanding/index.js +320 -0
- package/dist/link-understanding/index.js.map +1 -0
- package/dist/logging/index.d.ts +50 -0
- package/dist/logging/index.js +255 -0
- package/dist/logging/index.js.map +1 -0
- package/dist/macos/index.d.ts +143 -0
- package/dist/macos/index.js +587 -0
- package/dist/macos/index.js.map +1 -0
- package/dist/markdown/index.d.ts +43 -0
- package/dist/markdown/index.js +305 -0
- package/dist/markdown/index.js.map +1 -0
- package/dist/market-index/index.d.ts +51 -0
- package/dist/market-index/index.js +553 -0
- package/dist/market-index/index.js.map +1 -0
- package/dist/mcp/index.d.ts +263 -0
- package/dist/mcp/index.js +940 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/installer.d.ts +11 -0
- package/dist/mcp/installer.js +128 -0
- package/dist/mcp/installer.js.map +1 -0
- package/dist/mcp/server.d.ts +7 -0
- package/dist/mcp/server.js +172 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/media/index.d.ts +119 -0
- package/dist/media/index.js +740 -0
- package/dist/media/index.js.map +1 -0
- package/dist/memory/context.d.ts +189 -0
- package/dist/memory/context.js +541 -0
- package/dist/memory/context.js.map +1 -0
- package/dist/memory/index.d.ts +74 -0
- package/dist/memory/index.js +352 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/summarizer.d.ts +10 -0
- package/dist/memory/summarizer.js +51 -0
- package/dist/memory/summarizer.js.map +1 -0
- package/dist/memory/tokenizer.d.ts +4 -0
- package/dist/memory/tokenizer.js +61 -0
- package/dist/memory/tokenizer.js.map +1 -0
- package/dist/messages/unified.d.ts +7 -0
- package/dist/messages/unified.js +77 -0
- package/dist/messages/unified.js.map +1 -0
- package/dist/ml-pipeline/collector.d.ts +23 -0
- package/dist/ml-pipeline/collector.js +176 -0
- package/dist/ml-pipeline/collector.js.map +1 -0
- package/dist/ml-pipeline/index.d.ts +21 -0
- package/dist/ml-pipeline/index.js +72 -0
- package/dist/ml-pipeline/index.js.map +1 -0
- package/dist/ml-pipeline/trainer.d.ts +32 -0
- package/dist/ml-pipeline/trainer.js +228 -0
- package/dist/ml-pipeline/trainer.js.map +1 -0
- package/dist/ml-pipeline/types.d.ts +51 -0
- package/dist/ml-pipeline/types.js +23 -0
- package/dist/ml-pipeline/types.js.map +1 -0
- package/dist/models/adaptive.d.ts +11 -0
- package/dist/models/adaptive.js +64 -0
- package/dist/models/adaptive.js.map +1 -0
- package/dist/models/failover.d.ts +51 -0
- package/dist/models/failover.js +151 -0
- package/dist/models/failover.js.map +1 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +13 -0
- package/dist/models/index.js.map +1 -0
- package/dist/monitoring/alerts.d.ts +185 -0
- package/dist/monitoring/alerts.js +565 -0
- package/dist/monitoring/alerts.js.map +1 -0
- package/dist/monitoring/health.d.ts +151 -0
- package/dist/monitoring/health.js +423 -0
- package/dist/monitoring/health.js.map +1 -0
- package/dist/monitoring/index.d.ts +25 -0
- package/dist/monitoring/index.js +258 -0
- package/dist/monitoring/index.js.map +1 -0
- package/dist/monitoring/metrics.d.ts +147 -0
- package/dist/monitoring/metrics.js +519 -0
- package/dist/monitoring/metrics.js.map +1 -0
- package/dist/nodes/index.d.ts +81 -0
- package/dist/nodes/index.js +475 -0
- package/dist/nodes/index.js.map +1 -0
- package/dist/opportunity/analytics.d.ts +221 -0
- package/dist/opportunity/analytics.js +678 -0
- package/dist/opportunity/analytics.js.map +1 -0
- package/dist/opportunity/combinatorial.d.ts +147 -0
- package/dist/opportunity/combinatorial.js +765 -0
- package/dist/opportunity/combinatorial.js.map +1 -0
- package/dist/opportunity/correlation.d.ts +107 -0
- package/dist/opportunity/correlation.js +410 -0
- package/dist/opportunity/correlation.js.map +1 -0
- package/dist/opportunity/executor.d.ts +108 -0
- package/dist/opportunity/executor.js +356 -0
- package/dist/opportunity/executor.js.map +1 -0
- package/dist/opportunity/index.d.ts +285 -0
- package/dist/opportunity/index.js +839 -0
- package/dist/opportunity/index.js.map +1 -0
- package/dist/opportunity/links.d.ts +87 -0
- package/dist/opportunity/links.js +344 -0
- package/dist/opportunity/links.js.map +1 -0
- package/dist/opportunity/matching.d.ts +101 -0
- package/dist/opportunity/matching.js +551 -0
- package/dist/opportunity/matching.js.map +1 -0
- package/dist/opportunity/outcomes.d.ts +74 -0
- package/dist/opportunity/outcomes.js +321 -0
- package/dist/opportunity/outcomes.js.map +1 -0
- package/dist/opportunity/risk.d.ts +128 -0
- package/dist/opportunity/risk.js +381 -0
- package/dist/opportunity/risk.js.map +1 -0
- package/dist/opportunity/scoring.d.ts +151 -0
- package/dist/opportunity/scoring.js +421 -0
- package/dist/opportunity/scoring.js.map +1 -0
- package/dist/pairing/index.d.ts +108 -0
- package/dist/pairing/index.js +431 -0
- package/dist/pairing/index.js.map +1 -0
- package/dist/payments/index.d.ts +12 -0
- package/dist/payments/index.js +34 -0
- package/dist/payments/index.js.map +1 -0
- package/dist/payments/x402/evm.d.ts +53 -0
- package/dist/payments/x402/evm.js +282 -0
- package/dist/payments/x402/evm.js.map +1 -0
- package/dist/payments/x402/index.d.ts +158 -0
- package/dist/payments/x402/index.js +531 -0
- package/dist/payments/x402/index.js.map +1 -0
- package/dist/payments/x402/solana.d.ts +51 -0
- package/dist/payments/x402/solana.js +397 -0
- package/dist/payments/x402/solana.js.map +1 -0
- package/dist/percolator/accounts.d.ts +21 -0
- package/dist/percolator/accounts.js +76 -0
- package/dist/percolator/accounts.js.map +1 -0
- package/dist/percolator/encode.d.ts +14 -0
- package/dist/percolator/encode.js +90 -0
- package/dist/percolator/encode.js.map +1 -0
- package/dist/percolator/execution.d.ts +29 -0
- package/dist/percolator/execution.js +239 -0
- package/dist/percolator/execution.js.map +1 -0
- package/dist/percolator/feed.d.ts +15 -0
- package/dist/percolator/feed.js +160 -0
- package/dist/percolator/feed.js.map +1 -0
- package/dist/percolator/index.d.ts +20 -0
- package/dist/percolator/index.js +24 -0
- package/dist/percolator/index.js.map +1 -0
- package/dist/percolator/instructions.d.ts +29 -0
- package/dist/percolator/instructions.js +52 -0
- package/dist/percolator/instructions.js.map +1 -0
- package/dist/percolator/keeper.d.ts +11 -0
- package/dist/percolator/keeper.js +83 -0
- package/dist/percolator/keeper.js.map +1 -0
- package/dist/percolator/pda.d.ts +15 -0
- package/dist/percolator/pda.js +26 -0
- package/dist/percolator/pda.js.map +1 -0
- package/dist/percolator/slab.d.ts +122 -0
- package/dist/percolator/slab.js +325 -0
- package/dist/percolator/slab.js.map +1 -0
- package/dist/percolator/tx.d.ts +27 -0
- package/dist/percolator/tx.js +77 -0
- package/dist/percolator/tx.js.map +1 -0
- package/dist/percolator/types.d.ts +51 -0
- package/dist/percolator/types.js +9 -0
- package/dist/percolator/types.js.map +1 -0
- package/dist/permissions/index.d.ts +262 -0
- package/dist/permissions/index.js +929 -0
- package/dist/permissions/index.js.map +1 -0
- package/dist/plugins/index.d.ts +158 -0
- package/dist/plugins/index.js +444 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/portfolio/index.d.ts +170 -0
- package/dist/portfolio/index.js +970 -0
- package/dist/portfolio/index.js.map +1 -0
- package/dist/presence/index.d.ts +34 -0
- package/dist/presence/index.js +124 -0
- package/dist/presence/index.js.map +1 -0
- package/dist/process/index.d.ts +82 -0
- package/dist/process/index.js +402 -0
- package/dist/process/index.js.map +1 -0
- package/dist/providers/discovery.d.ts +209 -0
- package/dist/providers/discovery.js +751 -0
- package/dist/providers/discovery.js.map +1 -0
- package/dist/providers/health.d.ts +27 -0
- package/dist/providers/health.js +80 -0
- package/dist/providers/health.js.map +1 -0
- package/dist/providers/index.d.ts +154 -0
- package/dist/providers/index.js +897 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/queue/index.d.ts +36 -0
- package/dist/queue/index.js +146 -0
- package/dist/queue/index.js.map +1 -0
- package/dist/queue/jobs/index.d.ts +11 -0
- package/dist/queue/jobs/index.js +32 -0
- package/dist/queue/jobs/index.js.map +1 -0
- package/dist/queue/jobs/producer.d.ts +43 -0
- package/dist/queue/jobs/producer.js +233 -0
- package/dist/queue/jobs/producer.js.map +1 -0
- package/dist/queue/jobs/types.d.ts +128 -0
- package/dist/queue/jobs/types.js +14 -0
- package/dist/queue/jobs/types.js.map +1 -0
- package/dist/queue/jobs/worker.d.ts +22 -0
- package/dist/queue/jobs/worker.js +220 -0
- package/dist/queue/jobs/worker.js.map +1 -0
- package/dist/remote/index.d.ts +136 -0
- package/dist/remote/index.js +456 -0
- package/dist/remote/index.js.map +1 -0
- package/dist/risk/circuit-breaker.d.ts +99 -0
- package/dist/risk/circuit-breaker.js +300 -0
- package/dist/risk/circuit-breaker.js.map +1 -0
- package/dist/risk/dashboard.d.ts +69 -0
- package/dist/risk/dashboard.js +127 -0
- package/dist/risk/dashboard.js.map +1 -0
- package/dist/risk/engine.d.ts +128 -0
- package/dist/risk/engine.js +311 -0
- package/dist/risk/engine.js.map +1 -0
- package/dist/risk/index.d.ts +10 -0
- package/dist/risk/index.js +38 -0
- package/dist/risk/index.js.map +1 -0
- package/dist/risk/stress.d.ts +70 -0
- package/dist/risk/stress.js +215 -0
- package/dist/risk/stress.js.map +1 -0
- package/dist/risk/var.d.ts +72 -0
- package/dist/risk/var.js +173 -0
- package/dist/risk/var.js.map +1 -0
- package/dist/risk/volatility.d.ts +61 -0
- package/dist/risk/volatility.js +132 -0
- package/dist/risk/volatility.js.map +1 -0
- package/dist/routing/index.d.ts +116 -0
- package/dist/routing/index.js +371 -0
- package/dist/routing/index.js.map +1 -0
- package/dist/search/index.d.ts +30 -0
- package/dist/search/index.js +129 -0
- package/dist/search/index.js.map +1 -0
- package/dist/security/address-checker.d.ts +6 -0
- package/dist/security/address-checker.js +213 -0
- package/dist/security/address-checker.js.map +1 -0
- package/dist/security/code-scanner.d.ts +3 -0
- package/dist/security/code-scanner.js +190 -0
- package/dist/security/code-scanner.js.map +1 -0
- package/dist/security/index.d.ts +176 -0
- package/dist/security/index.js +498 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/sanitizer.d.ts +2 -0
- package/dist/security/sanitizer.js +135 -0
- package/dist/security/sanitizer.js.map +1 -0
- package/dist/security/scam-db.d.ts +5 -0
- package/dist/security/scam-db.js +116 -0
- package/dist/security/scam-db.js.map +1 -0
- package/dist/security/shield.d.ts +12 -0
- package/dist/security/shield.js +80 -0
- package/dist/security/shield.js.map +1 -0
- package/dist/security/tx-validator.d.ts +5 -0
- package/dist/security/tx-validator.js +115 -0
- package/dist/security/tx-validator.js.map +1 -0
- package/dist/security/types.d.ts +84 -0
- package/dist/security/types.js +6 -0
- package/dist/security/types.js.map +1 -0
- package/dist/services/alt-data/feeds/fear-greed.d.ts +14 -0
- package/dist/services/alt-data/feeds/fear-greed.js +81 -0
- package/dist/services/alt-data/feeds/fear-greed.js.map +1 -0
- package/dist/services/alt-data/feeds/funding-rates.d.ts +13 -0
- package/dist/services/alt-data/feeds/funding-rates.js +90 -0
- package/dist/services/alt-data/feeds/funding-rates.js.map +1 -0
- package/dist/services/alt-data/feeds/reddit.d.ts +13 -0
- package/dist/services/alt-data/feeds/reddit.js +112 -0
- package/dist/services/alt-data/feeds/reddit.js.map +1 -0
- package/dist/services/alt-data/index.d.ts +31 -0
- package/dist/services/alt-data/index.js +278 -0
- package/dist/services/alt-data/index.js.map +1 -0
- package/dist/services/alt-data/market-matcher.d.ts +29 -0
- package/dist/services/alt-data/market-matcher.js +157 -0
- package/dist/services/alt-data/market-matcher.js.map +1 -0
- package/dist/services/alt-data/sentiment.d.ts +11 -0
- package/dist/services/alt-data/sentiment.js +277 -0
- package/dist/services/alt-data/sentiment.js.map +1 -0
- package/dist/services/alt-data/types.d.ts +86 -0
- package/dist/services/alt-data/types.js +9 -0
- package/dist/services/alt-data/types.js.map +1 -0
- package/dist/services/feature-engineering/accessor.d.ts +19 -0
- package/dist/services/feature-engineering/accessor.js +31 -0
- package/dist/services/feature-engineering/accessor.js.map +1 -0
- package/dist/services/feature-engineering/index.d.ts +15 -0
- package/dist/services/feature-engineering/index.js +345 -0
- package/dist/services/feature-engineering/index.js.map +1 -0
- package/dist/services/feature-engineering/indicators.d.ts +90 -0
- package/dist/services/feature-engineering/indicators.js +254 -0
- package/dist/services/feature-engineering/indicators.js.map +1 -0
- package/dist/services/feature-engineering/rolling-window.d.ts +89 -0
- package/dist/services/feature-engineering/rolling-window.js +173 -0
- package/dist/services/feature-engineering/rolling-window.js.map +1 -0
- package/dist/services/feature-engineering/thresholds.d.ts +137 -0
- package/dist/services/feature-engineering/thresholds.js +280 -0
- package/dist/services/feature-engineering/thresholds.js.map +1 -0
- package/dist/services/feature-engineering/types.d.ts +138 -0
- package/dist/services/feature-engineering/types.js +6 -0
- package/dist/services/feature-engineering/types.js.map +1 -0
- package/dist/services/tick-recorder/index.d.ts +12 -0
- package/dist/services/tick-recorder/index.js +200 -0
- package/dist/services/tick-recorder/index.js.map +1 -0
- package/dist/services/tick-recorder/queries.d.ts +46 -0
- package/dist/services/tick-recorder/queries.js +291 -0
- package/dist/services/tick-recorder/queries.js.map +1 -0
- package/dist/services/tick-recorder/schema.d.ts +27 -0
- package/dist/services/tick-recorder/schema.js +185 -0
- package/dist/services/tick-recorder/schema.js.map +1 -0
- package/dist/services/tick-recorder/timescale.d.ts +27 -0
- package/dist/services/tick-recorder/timescale.js +105 -0
- package/dist/services/tick-recorder/timescale.js.map +1 -0
- package/dist/services/tick-recorder/types.d.ts +113 -0
- package/dist/services/tick-recorder/types.js +7 -0
- package/dist/services/tick-recorder/types.js.map +1 -0
- package/dist/services/tick-streamer/index.d.ts +12 -0
- package/dist/services/tick-streamer/index.js +317 -0
- package/dist/services/tick-streamer/index.js.map +1 -0
- package/dist/services/tick-streamer/types.d.ts +134 -0
- package/dist/services/tick-streamer/types.js +6 -0
- package/dist/services/tick-streamer/types.js.map +1 -0
- package/dist/session/index.d.ts +147 -0
- package/dist/session/index.js +429 -0
- package/dist/session/index.js.map +1 -0
- package/dist/sessions/index.d.ts +69 -0
- package/dist/sessions/index.js +447 -0
- package/dist/sessions/index.js.map +1 -0
- package/dist/signal-router/index.d.ts +2 -0
- package/dist/signal-router/index.js +6 -0
- package/dist/signal-router/index.js.map +1 -0
- package/dist/signal-router/router.d.ts +25 -0
- package/dist/signal-router/router.js +391 -0
- package/dist/signal-router/router.js.map +1 -0
- package/dist/signal-router/types.d.ts +64 -0
- package/dist/signal-router/types.js +9 -0
- package/dist/signal-router/types.js.map +1 -0
- package/dist/skills/bundled/acp/index.d.ts +25 -0
- package/dist/skills/bundled/acp/index.js +472 -0
- package/dist/skills/bundled/acp/index.js.map +1 -0
- package/dist/skills/bundled/agentbets/index.d.ts +15 -0
- package/dist/skills/bundled/agentbets/index.js +168 -0
- package/dist/skills/bundled/agentbets/index.js.map +1 -0
- package/dist/skills/bundled/ai-strategy/index.d.ts +21 -0
- package/dist/skills/bundled/ai-strategy/index.js +647 -0
- package/dist/skills/bundled/ai-strategy/index.js.map +1 -0
- package/dist/skills/bundled/alerts/index.d.ts +20 -0
- package/dist/skills/bundled/alerts/index.js +249 -0
- package/dist/skills/bundled/alerts/index.js.map +1 -0
- package/dist/skills/bundled/analytics/index.d.ts +17 -0
- package/dist/skills/bundled/analytics/index.js +112 -0
- package/dist/skills/bundled/analytics/index.js.map +1 -0
- package/dist/skills/bundled/arbitrage/index.d.ts +24 -0
- package/dist/skills/bundled/arbitrage/index.js +253 -0
- package/dist/skills/bundled/arbitrage/index.js.map +1 -0
- package/dist/skills/bundled/auto-reply/index.d.ts +18 -0
- package/dist/skills/bundled/auto-reply/index.js +215 -0
- package/dist/skills/bundled/auto-reply/index.js.map +1 -0
- package/dist/skills/bundled/automation/index.d.ts +19 -0
- package/dist/skills/bundled/automation/index.js +160 -0
- package/dist/skills/bundled/automation/index.js.map +1 -0
- package/dist/skills/bundled/backtest/index.d.ts +18 -0
- package/dist/skills/bundled/backtest/index.js +250 -0
- package/dist/skills/bundled/backtest/index.js.map +1 -0
- package/dist/skills/bundled/bags/index.d.ts +49 -0
- package/dist/skills/bundled/bags/index.js +1069 -0
- package/dist/skills/bundled/bags/index.js.map +1 -0
- package/dist/skills/bundled/bankr/index.d.ts +161 -0
- package/dist/skills/bundled/bankr/index.js +271 -0
- package/dist/skills/bundled/bankr/index.js.map +1 -0
- package/dist/skills/bundled/betfair/index.d.ts +24 -0
- package/dist/skills/bundled/betfair/index.js +511 -0
- package/dist/skills/bundled/betfair/index.js.map +1 -0
- package/dist/skills/bundled/binance-futures/index.d.ts +15 -0
- package/dist/skills/bundled/binance-futures/index.js +485 -0
- package/dist/skills/bundled/binance-futures/index.js.map +1 -0
- package/dist/skills/bundled/botchan/index.d.ts +130 -0
- package/dist/skills/bundled/botchan/index.js +427 -0
- package/dist/skills/bundled/botchan/index.js.map +1 -0
- package/dist/skills/bundled/bridge/index.d.ts +17 -0
- package/dist/skills/bundled/bridge/index.js +297 -0
- package/dist/skills/bundled/bridge/index.js.map +1 -0
- package/dist/skills/bundled/bybit-futures/index.d.ts +15 -0
- package/dist/skills/bundled/bybit-futures/index.js +380 -0
- package/dist/skills/bundled/bybit-futures/index.js.map +1 -0
- package/dist/skills/bundled/clanker/index.d.ts +236 -0
- package/dist/skills/bundled/clanker/index.js +759 -0
- package/dist/skills/bundled/clanker/index.js.map +1 -0
- package/dist/skills/bundled/copy-trading/index.d.ts +20 -0
- package/dist/skills/bundled/copy-trading/index.js +213 -0
- package/dist/skills/bundled/copy-trading/index.js.map +1 -0
- package/dist/skills/bundled/copy-trading-solana/index.d.ts +21 -0
- package/dist/skills/bundled/copy-trading-solana/index.js +421 -0
- package/dist/skills/bundled/copy-trading-solana/index.js.map +1 -0
- package/dist/skills/bundled/credentials/index.d.ts +17 -0
- package/dist/skills/bundled/credentials/index.js +137 -0
- package/dist/skills/bundled/credentials/index.js.map +1 -0
- package/dist/skills/bundled/crypto-hft/index.d.ts +26 -0
- package/dist/skills/bundled/crypto-hft/index.js +361 -0
- package/dist/skills/bundled/crypto-hft/index.js.map +1 -0
- package/dist/skills/bundled/dca/index.d.ts +26 -0
- package/dist/skills/bundled/dca/index.js +1342 -0
- package/dist/skills/bundled/dca/index.js.map +1 -0
- package/dist/skills/bundled/divergence/index.d.ts +19 -0
- package/dist/skills/bundled/divergence/index.js +272 -0
- package/dist/skills/bundled/divergence/index.js.map +1 -0
- package/dist/skills/bundled/doctor/index.d.ts +18 -0
- package/dist/skills/bundled/doctor/index.js +78 -0
- package/dist/skills/bundled/doctor/index.js.map +1 -0
- package/dist/skills/bundled/drift/index.d.ts +13 -0
- package/dist/skills/bundled/drift/index.js +378 -0
- package/dist/skills/bundled/drift/index.js.map +1 -0
- package/dist/skills/bundled/drift-sdk/index.d.ts +17 -0
- package/dist/skills/bundled/drift-sdk/index.js +501 -0
- package/dist/skills/bundled/drift-sdk/index.js.map +1 -0
- package/dist/skills/bundled/edge/index.d.ts +16 -0
- package/dist/skills/bundled/edge/index.js +91 -0
- package/dist/skills/bundled/edge/index.js.map +1 -0
- package/dist/skills/bundled/embeddings/index.d.ts +19 -0
- package/dist/skills/bundled/embeddings/index.js +215 -0
- package/dist/skills/bundled/embeddings/index.js.map +1 -0
- package/dist/skills/bundled/endaoment/index.d.ts +105 -0
- package/dist/skills/bundled/endaoment/index.js +285 -0
- package/dist/skills/bundled/endaoment/index.js.map +1 -0
- package/dist/skills/bundled/ens/index.d.ts +151 -0
- package/dist/skills/bundled/ens/index.js +278 -0
- package/dist/skills/bundled/ens/index.js.map +1 -0
- package/dist/skills/bundled/erc8004/index.d.ts +123 -0
- package/dist/skills/bundled/erc8004/index.js +301 -0
- package/dist/skills/bundled/erc8004/index.js.map +1 -0
- package/dist/skills/bundled/execution/index.d.ts +18 -0
- package/dist/skills/bundled/execution/index.js +358 -0
- package/dist/skills/bundled/execution/index.js.map +1 -0
- package/dist/skills/bundled/farcaster/index.d.ts +121 -0
- package/dist/skills/bundled/farcaster/index.js +314 -0
- package/dist/skills/bundled/farcaster/index.js.map +1 -0
- package/dist/skills/bundled/features/index.d.ts +17 -0
- package/dist/skills/bundled/features/index.js +305 -0
- package/dist/skills/bundled/features/index.js.map +1 -0
- package/dist/skills/bundled/feeds/index.d.ts +26 -0
- package/dist/skills/bundled/feeds/index.js +462 -0
- package/dist/skills/bundled/feeds/index.js.map +1 -0
- package/dist/skills/bundled/harden/index.d.ts +55 -0
- package/dist/skills/bundled/harden/index.js +510 -0
- package/dist/skills/bundled/harden/index.js.map +1 -0
- package/dist/skills/bundled/history/index.d.ts +21 -0
- package/dist/skills/bundled/history/index.js +195 -0
- package/dist/skills/bundled/history/index.js.map +1 -0
- package/dist/skills/bundled/hyperliquid/index.d.ts +19 -0
- package/dist/skills/bundled/hyperliquid/index.js +1280 -0
- package/dist/skills/bundled/hyperliquid/index.js.map +1 -0
- package/dist/skills/bundled/identity/index.d.ts +17 -0
- package/dist/skills/bundled/identity/index.js +223 -0
- package/dist/skills/bundled/identity/index.js.map +1 -0
- package/dist/skills/bundled/integrations/index.d.ts +17 -0
- package/dist/skills/bundled/integrations/index.js +138 -0
- package/dist/skills/bundled/integrations/index.js.map +1 -0
- package/dist/skills/bundled/jupiter/index.d.ts +41 -0
- package/dist/skills/bundled/jupiter/index.js +872 -0
- package/dist/skills/bundled/jupiter/index.js.map +1 -0
- package/dist/skills/bundled/kamino/index.d.ts +33 -0
- package/dist/skills/bundled/kamino/index.js +578 -0
- package/dist/skills/bundled/kamino/index.js.map +1 -0
- package/dist/skills/bundled/ledger/index.d.ts +14 -0
- package/dist/skills/bundled/ledger/index.js +186 -0
- package/dist/skills/bundled/ledger/index.js.map +1 -0
- package/dist/skills/bundled/market-index/index.d.ts +18 -0
- package/dist/skills/bundled/market-index/index.js +182 -0
- package/dist/skills/bundled/market-index/index.js.map +1 -0
- package/dist/skills/bundled/markets/index.d.ts +16 -0
- package/dist/skills/bundled/markets/index.js +95 -0
- package/dist/skills/bundled/markets/index.js.map +1 -0
- package/dist/skills/bundled/mcp/index.d.ts +19 -0
- package/dist/skills/bundled/mcp/index.js +212 -0
- package/dist/skills/bundled/mcp/index.js.map +1 -0
- package/dist/skills/bundled/memory/index.d.ts +20 -0
- package/dist/skills/bundled/memory/index.js +210 -0
- package/dist/skills/bundled/memory/index.js.map +1 -0
- package/dist/skills/bundled/metaculus/index.d.ts +17 -0
- package/dist/skills/bundled/metaculus/index.js +168 -0
- package/dist/skills/bundled/metaculus/index.js.map +1 -0
- package/dist/skills/bundled/meteora/index.d.ts +39 -0
- package/dist/skills/bundled/meteora/index.js +837 -0
- package/dist/skills/bundled/meteora/index.js.map +1 -0
- package/dist/skills/bundled/meteora-dbc/index.d.ts +33 -0
- package/dist/skills/bundled/meteora-dbc/index.js +993 -0
- package/dist/skills/bundled/meteora-dbc/index.js.map +1 -0
- package/dist/skills/bundled/metrics/index.d.ts +18 -0
- package/dist/skills/bundled/metrics/index.js +91 -0
- package/dist/skills/bundled/metrics/index.js.map +1 -0
- package/dist/skills/bundled/mev/index.d.ts +17 -0
- package/dist/skills/bundled/mev/index.js +108 -0
- package/dist/skills/bundled/mev/index.js.map +1 -0
- package/dist/skills/bundled/mexc-futures/index.d.ts +16 -0
- package/dist/skills/bundled/mexc-futures/index.js +389 -0
- package/dist/skills/bundled/mexc-futures/index.js.map +1 -0
- package/dist/skills/bundled/mm/index.d.ts +18 -0
- package/dist/skills/bundled/mm/index.js +315 -0
- package/dist/skills/bundled/mm/index.js.map +1 -0
- package/dist/skills/bundled/monitoring/index.d.ts +18 -0
- package/dist/skills/bundled/monitoring/index.js +146 -0
- package/dist/skills/bundled/monitoring/index.js.map +1 -0
- package/dist/skills/bundled/news/index.d.ts +17 -0
- package/dist/skills/bundled/news/index.js +161 -0
- package/dist/skills/bundled/news/index.js.map +1 -0
- package/dist/skills/bundled/onchainkit/index.d.ts +92 -0
- package/dist/skills/bundled/onchainkit/index.js +429 -0
- package/dist/skills/bundled/onchainkit/index.js.map +1 -0
- package/dist/skills/bundled/opinion/index.d.ts +12 -0
- package/dist/skills/bundled/opinion/index.js +429 -0
- package/dist/skills/bundled/opinion/index.js.map +1 -0
- package/dist/skills/bundled/opportunity/index.d.ts +25 -0
- package/dist/skills/bundled/opportunity/index.js +289 -0
- package/dist/skills/bundled/opportunity/index.js.map +1 -0
- package/dist/skills/bundled/orca/index.d.ts +12 -0
- package/dist/skills/bundled/orca/index.js +663 -0
- package/dist/skills/bundled/orca/index.js.map +1 -0
- package/dist/skills/bundled/pairing/index.d.ts +24 -0
- package/dist/skills/bundled/pairing/index.js +228 -0
- package/dist/skills/bundled/pairing/index.js.map +1 -0
- package/dist/skills/bundled/percolator/index.d.ts +20 -0
- package/dist/skills/bundled/percolator/index.js +229 -0
- package/dist/skills/bundled/percolator/index.js.map +1 -0
- package/dist/skills/bundled/permissions/index.d.ts +21 -0
- package/dist/skills/bundled/permissions/index.js +204 -0
- package/dist/skills/bundled/permissions/index.js.map +1 -0
- package/dist/skills/bundled/plugins/index.d.ts +20 -0
- package/dist/skills/bundled/plugins/index.js +209 -0
- package/dist/skills/bundled/plugins/index.js.map +1 -0
- package/dist/skills/bundled/portfolio/index.d.ts +20 -0
- package/dist/skills/bundled/portfolio/index.js +367 -0
- package/dist/skills/bundled/portfolio/index.js.map +1 -0
- package/dist/skills/bundled/portfolio-sync/index.d.ts +17 -0
- package/dist/skills/bundled/portfolio-sync/index.js +116 -0
- package/dist/skills/bundled/portfolio-sync/index.js.map +1 -0
- package/dist/skills/bundled/positions/index.d.ts +18 -0
- package/dist/skills/bundled/positions/index.js +161 -0
- package/dist/skills/bundled/positions/index.js.map +1 -0
- package/dist/skills/bundled/predictfun/index.d.ts +13 -0
- package/dist/skills/bundled/predictfun/index.js +612 -0
- package/dist/skills/bundled/predictfun/index.js.map +1 -0
- package/dist/skills/bundled/predictit/index.d.ts +16 -0
- package/dist/skills/bundled/predictit/index.js +138 -0
- package/dist/skills/bundled/predictit/index.js.map +1 -0
- package/dist/skills/bundled/presence/index.d.ts +18 -0
- package/dist/skills/bundled/presence/index.js +151 -0
- package/dist/skills/bundled/presence/index.js.map +1 -0
- package/dist/skills/bundled/processes/index.d.ts +17 -0
- package/dist/skills/bundled/processes/index.js +121 -0
- package/dist/skills/bundled/processes/index.js.map +1 -0
- package/dist/skills/bundled/pump-swarm/index.d.ts +16 -0
- package/dist/skills/bundled/pump-swarm/index.js +2235 -0
- package/dist/skills/bundled/pump-swarm/index.js.map +1 -0
- package/dist/skills/bundled/pumpfun/index.d.ts +47 -0
- package/dist/skills/bundled/pumpfun/index.js +1400 -0
- package/dist/skills/bundled/pumpfun/index.js.map +1 -0
- package/dist/skills/bundled/qmd/index.d.ts +18 -0
- package/dist/skills/bundled/qmd/index.js +116 -0
- package/dist/skills/bundled/qmd/index.js.map +1 -0
- package/dist/skills/bundled/qrcoin/index.d.ts +92 -0
- package/dist/skills/bundled/qrcoin/index.js +328 -0
- package/dist/skills/bundled/qrcoin/index.js.map +1 -0
- package/dist/skills/bundled/raydium/index.d.ts +35 -0
- package/dist/skills/bundled/raydium/index.js +695 -0
- package/dist/skills/bundled/raydium/index.js.map +1 -0
- package/dist/skills/bundled/remote/index.d.ts +19 -0
- package/dist/skills/bundled/remote/index.js +186 -0
- package/dist/skills/bundled/remote/index.js.map +1 -0
- package/dist/skills/bundled/research/index.d.ts +17 -0
- package/dist/skills/bundled/research/index.js +185 -0
- package/dist/skills/bundled/research/index.js.map +1 -0
- package/dist/skills/bundled/risk/index.d.ts +31 -0
- package/dist/skills/bundled/risk/index.js +379 -0
- package/dist/skills/bundled/risk/index.js.map +1 -0
- package/dist/skills/bundled/router/index.d.ts +17 -0
- package/dist/skills/bundled/router/index.js +160 -0
- package/dist/skills/bundled/router/index.js.map +1 -0
- package/dist/skills/bundled/routing/index.d.ts +23 -0
- package/dist/skills/bundled/routing/index.js +257 -0
- package/dist/skills/bundled/routing/index.js.map +1 -0
- package/dist/skills/bundled/sandbox/index.d.ts +18 -0
- package/dist/skills/bundled/sandbox/index.js +119 -0
- package/dist/skills/bundled/sandbox/index.js.map +1 -0
- package/dist/skills/bundled/search-config/index.d.ts +18 -0
- package/dist/skills/bundled/search-config/index.js +170 -0
- package/dist/skills/bundled/search-config/index.js.map +1 -0
- package/dist/skills/bundled/sessions/index.d.ts +29 -0
- package/dist/skills/bundled/sessions/index.js +193 -0
- package/dist/skills/bundled/sessions/index.js.map +1 -0
- package/dist/skills/bundled/shield/index.d.ts +22 -0
- package/dist/skills/bundled/shield/index.js +245 -0
- package/dist/skills/bundled/shield/index.js.map +1 -0
- package/dist/skills/bundled/signals/index.d.ts +24 -0
- package/dist/skills/bundled/signals/index.js +776 -0
- package/dist/skills/bundled/signals/index.js.map +1 -0
- package/dist/skills/bundled/sizing/index.d.ts +16 -0
- package/dist/skills/bundled/sizing/index.js +168 -0
- package/dist/skills/bundled/sizing/index.js.map +1 -0
- package/dist/skills/bundled/slippage/index.d.ts +16 -0
- package/dist/skills/bundled/slippage/index.js +111 -0
- package/dist/skills/bundled/slippage/index.js.map +1 -0
- package/dist/skills/bundled/smarkets/index.d.ts +23 -0
- package/dist/skills/bundled/smarkets/index.js +473 -0
- package/dist/skills/bundled/smarkets/index.js.map +1 -0
- package/dist/skills/bundled/strategy/index.d.ts +18 -0
- package/dist/skills/bundled/strategy/index.js +168 -0
- package/dist/skills/bundled/strategy/index.js.map +1 -0
- package/dist/skills/bundled/streaming/index.d.ts +19 -0
- package/dist/skills/bundled/streaming/index.js +147 -0
- package/dist/skills/bundled/streaming/index.js.map +1 -0
- package/dist/skills/bundled/tailscale/index.d.ts +18 -0
- package/dist/skills/bundled/tailscale/index.js +173 -0
- package/dist/skills/bundled/tailscale/index.js.map +1 -0
- package/dist/skills/bundled/ticks/index.d.ts +17 -0
- package/dist/skills/bundled/ticks/index.js +287 -0
- package/dist/skills/bundled/ticks/index.js.map +1 -0
- package/dist/skills/bundled/token-security/index.d.ts +19 -0
- package/dist/skills/bundled/token-security/index.js +138 -0
- package/dist/skills/bundled/token-security/index.js.map +1 -0
- package/dist/skills/bundled/trading-evm/index.d.ts +19 -0
- package/dist/skills/bundled/trading-evm/index.js +302 -0
- package/dist/skills/bundled/trading-evm/index.js.map +1 -0
- package/dist/skills/bundled/trading-futures/index.d.ts +14 -0
- package/dist/skills/bundled/trading-futures/index.js +874 -0
- package/dist/skills/bundled/trading-futures/index.js.map +1 -0
- package/dist/skills/bundled/trading-kalshi/index.d.ts +36 -0
- package/dist/skills/bundled/trading-kalshi/index.js +1199 -0
- package/dist/skills/bundled/trading-kalshi/index.js.map +1 -0
- package/dist/skills/bundled/trading-manifold/index.d.ts +23 -0
- package/dist/skills/bundled/trading-manifold/index.js +391 -0
- package/dist/skills/bundled/trading-manifold/index.js.map +1 -0
- package/dist/skills/bundled/trading-polymarket/index.d.ts +27 -0
- package/dist/skills/bundled/trading-polymarket/index.js +1321 -0
- package/dist/skills/bundled/trading-polymarket/index.js.map +1 -0
- package/dist/skills/bundled/trading-solana/index.d.ts +19 -0
- package/dist/skills/bundled/trading-solana/index.js +383 -0
- package/dist/skills/bundled/trading-solana/index.js.map +1 -0
- package/dist/skills/bundled/trading-system/index.d.ts +22 -0
- package/dist/skills/bundled/trading-system/index.js +355 -0
- package/dist/skills/bundled/trading-system/index.js.map +1 -0
- package/dist/skills/bundled/triggers/index.d.ts +18 -0
- package/dist/skills/bundled/triggers/index.js +172 -0
- package/dist/skills/bundled/triggers/index.js.map +1 -0
- package/dist/skills/bundled/tts/index.d.ts +16 -0
- package/dist/skills/bundled/tts/index.js +150 -0
- package/dist/skills/bundled/tts/index.js.map +1 -0
- package/dist/skills/bundled/tweet-ideas/index.d.ts +20 -0
- package/dist/skills/bundled/tweet-ideas/index.js +470 -0
- package/dist/skills/bundled/tweet-ideas/index.js.map +1 -0
- package/dist/skills/bundled/usage/index.d.ts +17 -0
- package/dist/skills/bundled/usage/index.js +145 -0
- package/dist/skills/bundled/usage/index.js.map +1 -0
- package/dist/skills/bundled/veil/index.d.ts +79 -0
- package/dist/skills/bundled/veil/index.js +322 -0
- package/dist/skills/bundled/veil/index.js.map +1 -0
- package/dist/skills/bundled/verify/index.d.ts +20 -0
- package/dist/skills/bundled/verify/index.js +157 -0
- package/dist/skills/bundled/verify/index.js.map +1 -0
- package/dist/skills/bundled/virtuals/index.d.ts +20 -0
- package/dist/skills/bundled/virtuals/index.js +255 -0
- package/dist/skills/bundled/virtuals/index.js.map +1 -0
- package/dist/skills/bundled/voice/index.d.ts +18 -0
- package/dist/skills/bundled/voice/index.js +190 -0
- package/dist/skills/bundled/voice/index.js.map +1 -0
- package/dist/skills/bundled/weather/index.d.ts +20 -0
- package/dist/skills/bundled/weather/index.js +475 -0
- package/dist/skills/bundled/weather/index.js.map +1 -0
- package/dist/skills/bundled/webhooks/index.d.ts +18 -0
- package/dist/skills/bundled/webhooks/index.js +136 -0
- package/dist/skills/bundled/webhooks/index.js.map +1 -0
- package/dist/skills/bundled/whale-tracking/index.d.ts +18 -0
- package/dist/skills/bundled/whale-tracking/index.js +441 -0
- package/dist/skills/bundled/whale-tracking/index.js.map +1 -0
- package/dist/skills/bundled/yoink/index.d.ts +78 -0
- package/dist/skills/bundled/yoink/index.js +236 -0
- package/dist/skills/bundled/yoink/index.js.map +1 -0
- package/dist/skills/executor.d.ts +117 -0
- package/dist/skills/executor.js +469 -0
- package/dist/skills/executor.js.map +1 -0
- package/dist/skills/frontmatter.d.ts +69 -0
- package/dist/skills/frontmatter.js +187 -0
- package/dist/skills/frontmatter.js.map +1 -0
- package/dist/skills/index.d.ts +150 -0
- package/dist/skills/index.js +531 -0
- package/dist/skills/index.js.map +1 -0
- package/dist/skills/loader.d.ts +48 -0
- package/dist/skills/loader.js +594 -0
- package/dist/skills/loader.js.map +1 -0
- package/dist/skills/registry.d.ts +94 -0
- package/dist/skills/registry.js +308 -0
- package/dist/skills/registry.js.map +1 -0
- package/dist/solana/copytrade.d.ts +116 -0
- package/dist/solana/copytrade.js +493 -0
- package/dist/solana/copytrade.js.map +1 -0
- package/dist/solana/drift.d.ts +154 -0
- package/dist/solana/drift.js +599 -0
- package/dist/solana/drift.js.map +1 -0
- package/dist/solana/jupiter.d.ts +283 -0
- package/dist/solana/jupiter.js +553 -0
- package/dist/solana/jupiter.js.map +1 -0
- package/dist/solana/kamino.d.ts +206 -0
- package/dist/solana/kamino.js +546 -0
- package/dist/solana/kamino.js.map +1 -0
- package/dist/solana/meteora-dbc.d.ts +430 -0
- package/dist/solana/meteora-dbc.js +1105 -0
- package/dist/solana/meteora-dbc.js.map +1 -0
- package/dist/solana/meteora.d.ts +232 -0
- package/dist/solana/meteora.js +682 -0
- package/dist/solana/meteora.js.map +1 -0
- package/dist/solana/orca.d.ts +163 -0
- package/dist/solana/orca.js +378 -0
- package/dist/solana/orca.js.map +1 -0
- package/dist/solana/pools.d.ts +26 -0
- package/dist/solana/pools.js +96 -0
- package/dist/solana/pools.js.map +1 -0
- package/dist/solana/pump-swarm.d.ts +349 -0
- package/dist/solana/pump-swarm.js +1663 -0
- package/dist/solana/pump-swarm.js.map +1 -0
- package/dist/solana/pumpapi.d.ts +196 -0
- package/dist/solana/pumpapi.js +462 -0
- package/dist/solana/pumpapi.js.map +1 -0
- package/dist/solana/raydium.d.ts +170 -0
- package/dist/solana/raydium.js +673 -0
- package/dist/solana/raydium.js.map +1 -0
- package/dist/solana/swarm-ai-builder.d.ts +97 -0
- package/dist/solana/swarm-ai-builder.js +571 -0
- package/dist/solana/swarm-ai-builder.js.map +1 -0
- package/dist/solana/swarm-arbitrage.d.ts +111 -0
- package/dist/solana/swarm-arbitrage.js +437 -0
- package/dist/solana/swarm-arbitrage.js.map +1 -0
- package/dist/solana/swarm-builders.d.ts +71 -0
- package/dist/solana/swarm-builders.js +402 -0
- package/dist/solana/swarm-builders.js.map +1 -0
- package/dist/solana/swarm-copytrade.d.ts +103 -0
- package/dist/solana/swarm-copytrade.js +420 -0
- package/dist/solana/swarm-copytrade.js.map +1 -0
- package/dist/solana/swarm-presets.d.ts +49 -0
- package/dist/solana/swarm-presets.js +282 -0
- package/dist/solana/swarm-presets.js.map +1 -0
- package/dist/solana/swarm-signals.d.ts +128 -0
- package/dist/solana/swarm-signals.js +529 -0
- package/dist/solana/swarm-signals.js.map +1 -0
- package/dist/solana/swarm-strategies.d.ts +230 -0
- package/dist/solana/swarm-strategies.js +611 -0
- package/dist/solana/swarm-strategies.js.map +1 -0
- package/dist/solana/tokenlist.d.ts +10 -0
- package/dist/solana/tokenlist.js +54 -0
- package/dist/solana/tokenlist.js.map +1 -0
- package/dist/solana/wallet.d.ts +12 -0
- package/dist/solana/wallet.js +90 -0
- package/dist/solana/wallet.js.map +1 -0
- package/dist/strategies/crypto-hft/index.d.ts +46 -0
- package/dist/strategies/crypto-hft/index.js +469 -0
- package/dist/strategies/crypto-hft/index.js.map +1 -0
- package/dist/strategies/crypto-hft/market-scanner.d.ts +26 -0
- package/dist/strategies/crypto-hft/market-scanner.js +177 -0
- package/dist/strategies/crypto-hft/market-scanner.js.map +1 -0
- package/dist/strategies/crypto-hft/orderbook.d.ts +37 -0
- package/dist/strategies/crypto-hft/orderbook.js +184 -0
- package/dist/strategies/crypto-hft/orderbook.js.map +1 -0
- package/dist/strategies/crypto-hft/positions.d.ts +49 -0
- package/dist/strategies/crypto-hft/positions.js +376 -0
- package/dist/strategies/crypto-hft/positions.js.map +1 -0
- package/dist/strategies/crypto-hft/presets.d.ts +11 -0
- package/dist/strategies/crypto-hft/presets.js +164 -0
- package/dist/strategies/crypto-hft/presets.js.map +1 -0
- package/dist/strategies/crypto-hft/strategies.d.ts +96 -0
- package/dist/strategies/crypto-hft/strategies.js +330 -0
- package/dist/strategies/crypto-hft/strategies.js.map +1 -0
- package/dist/strategies/crypto-hft/types.d.ts +196 -0
- package/dist/strategies/crypto-hft/types.js +32 -0
- package/dist/strategies/crypto-hft/types.js.map +1 -0
- package/dist/strategies/hft-divergence/detector.d.ts +29 -0
- package/dist/strategies/hft-divergence/detector.js +182 -0
- package/dist/strategies/hft-divergence/detector.js.map +1 -0
- package/dist/strategies/hft-divergence/index.d.ts +12 -0
- package/dist/strategies/hft-divergence/index.js +19 -0
- package/dist/strategies/hft-divergence/index.js.map +1 -0
- package/dist/strategies/hft-divergence/market-rotator.d.ts +17 -0
- package/dist/strategies/hft-divergence/market-rotator.js +128 -0
- package/dist/strategies/hft-divergence/market-rotator.js.map +1 -0
- package/dist/strategies/hft-divergence/position-manager.d.ts +35 -0
- package/dist/strategies/hft-divergence/position-manager.js +188 -0
- package/dist/strategies/hft-divergence/position-manager.js.map +1 -0
- package/dist/strategies/hft-divergence/strategy.d.ts +31 -0
- package/dist/strategies/hft-divergence/strategy.js +295 -0
- package/dist/strategies/hft-divergence/strategy.js.map +1 -0
- package/dist/strategies/hft-divergence/types.d.ts +114 -0
- package/dist/strategies/hft-divergence/types.js +10 -0
- package/dist/strategies/hft-divergence/types.js.map +1 -0
- package/dist/streaming/index.d.ts +70 -0
- package/dist/streaming/index.js +296 -0
- package/dist/streaming/index.js.map +1 -0
- package/dist/tailscale/index.d.ts +139 -0
- package/dist/tailscale/index.js +345 -0
- package/dist/tailscale/index.js.map +1 -0
- package/dist/telemetry/index.d.ts +143 -0
- package/dist/telemetry/index.js +535 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/terminal/index.d.ts +121 -0
- package/dist/terminal/index.js +548 -0
- package/dist/terminal/index.js.map +1 -0
- package/dist/token-security/index.d.ts +36 -0
- package/dist/token-security/index.js +253 -0
- package/dist/token-security/index.js.map +1 -0
- package/dist/tools/browser.d.ts +128 -0
- package/dist/tools/browser.js +459 -0
- package/dist/tools/browser.js.map +1 -0
- package/dist/tools/canvas.d.ts +93 -0
- package/dist/tools/canvas.js +349 -0
- package/dist/tools/canvas.js.map +1 -0
- package/dist/tools/docker.d.ts +59 -0
- package/dist/tools/docker.js +191 -0
- package/dist/tools/docker.js.map +1 -0
- package/dist/tools/email.d.ts +25 -0
- package/dist/tools/email.js +131 -0
- package/dist/tools/email.js.map +1 -0
- package/dist/tools/exec.d.ts +81 -0
- package/dist/tools/exec.js +373 -0
- package/dist/tools/exec.js.map +1 -0
- package/dist/tools/files.d.ts +46 -0
- package/dist/tools/files.js +185 -0
- package/dist/tools/files.js.map +1 -0
- package/dist/tools/git.d.ts +29 -0
- package/dist/tools/git.js +105 -0
- package/dist/tools/git.js.map +1 -0
- package/dist/tools/image.d.ts +57 -0
- package/dist/tools/image.js +308 -0
- package/dist/tools/image.js.map +1 -0
- package/dist/tools/index.d.ts +39 -0
- package/dist/tools/index.js +46 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/message.d.ts +99 -0
- package/dist/tools/message.js +200 -0
- package/dist/tools/message.js.map +1 -0
- package/dist/tools/nodes.d.ts +134 -0
- package/dist/tools/nodes.js +357 -0
- package/dist/tools/nodes.js.map +1 -0
- package/dist/tools/sessions.d.ts +60 -0
- package/dist/tools/sessions.js +119 -0
- package/dist/tools/sessions.js.map +1 -0
- package/dist/tools/shell-history.d.ts +17 -0
- package/dist/tools/shell-history.js +118 -0
- package/dist/tools/shell-history.js.map +1 -0
- package/dist/tools/sms.d.ts +18 -0
- package/dist/tools/sms.js +66 -0
- package/dist/tools/sms.js.map +1 -0
- package/dist/tools/sql.d.ts +19 -0
- package/dist/tools/sql.js +91 -0
- package/dist/tools/sql.js.map +1 -0
- package/dist/tools/transcription.d.ts +13 -0
- package/dist/tools/transcription.js +99 -0
- package/dist/tools/transcription.js.map +1 -0
- package/dist/tools/web-fetch.d.ts +69 -0
- package/dist/tools/web-fetch.js +251 -0
- package/dist/tools/web-fetch.js.map +1 -0
- package/dist/tools/web-search.d.ts +58 -0
- package/dist/tools/web-search.js +204 -0
- package/dist/tools/web-search.js.map +1 -0
- package/dist/tools/webhooks.d.ts +74 -0
- package/dist/tools/webhooks.js +165 -0
- package/dist/tools/webhooks.js.map +1 -0
- package/dist/trading/accounts.d.ts +167 -0
- package/dist/trading/accounts.js +394 -0
- package/dist/trading/accounts.js.map +1 -0
- package/dist/trading/adapters/index.d.ts +27 -0
- package/dist/trading/adapters/index.js +165 -0
- package/dist/trading/adapters/index.js.map +1 -0
- package/dist/trading/backtest.d.ts +161 -0
- package/dist/trading/backtest.js +665 -0
- package/dist/trading/backtest.js.map +1 -0
- package/dist/trading/bots/index.d.ts +196 -0
- package/dist/trading/bots/index.js +688 -0
- package/dist/trading/bots/index.js.map +1 -0
- package/dist/trading/bridge.d.ts +33 -0
- package/dist/trading/bridge.js +121 -0
- package/dist/trading/bridge.js.map +1 -0
- package/dist/trading/builder.d.ts +102 -0
- package/dist/trading/builder.js +430 -0
- package/dist/trading/builder.js.map +1 -0
- package/dist/trading/copy-trading.d.ts +125 -0
- package/dist/trading/copy-trading.js +611 -0
- package/dist/trading/copy-trading.js.map +1 -0
- package/dist/trading/devtools.d.ts +172 -0
- package/dist/trading/devtools.js +425 -0
- package/dist/trading/devtools.js.map +1 -0
- package/dist/trading/futures/index.d.ts +981 -0
- package/dist/trading/futures/index.js +4011 -0
- package/dist/trading/futures/index.js.map +1 -0
- package/dist/trading/index.d.ts +102 -0
- package/dist/trading/index.js +310 -0
- package/dist/trading/index.js.map +1 -0
- package/dist/trading/kelly.d.ts +137 -0
- package/dist/trading/kelly.js +328 -0
- package/dist/trading/kelly.js.map +1 -0
- package/dist/trading/logger.d.ts +163 -0
- package/dist/trading/logger.js +424 -0
- package/dist/trading/logger.js.map +1 -0
- package/dist/trading/market-making/engine.d.ts +44 -0
- package/dist/trading/market-making/engine.js +165 -0
- package/dist/trading/market-making/engine.js.map +1 -0
- package/dist/trading/market-making/index.d.ts +10 -0
- package/dist/trading/market-making/index.js +29 -0
- package/dist/trading/market-making/index.js.map +1 -0
- package/dist/trading/market-making/strategy.d.ts +25 -0
- package/dist/trading/market-making/strategy.js +250 -0
- package/dist/trading/market-making/strategy.js.map +1 -0
- package/dist/trading/market-making/types.d.ts +92 -0
- package/dist/trading/market-making/types.js +6 -0
- package/dist/trading/market-making/types.js.map +1 -0
- package/dist/trading/ml-signals.d.ts +175 -0
- package/dist/trading/ml-signals.js +548 -0
- package/dist/trading/ml-signals.js.map +1 -0
- package/dist/trading/orchestrator.d.ts +59 -0
- package/dist/trading/orchestrator.js +199 -0
- package/dist/trading/orchestrator.js.map +1 -0
- package/dist/trading/position-bridge.d.ts +41 -0
- package/dist/trading/position-bridge.js +178 -0
- package/dist/trading/position-bridge.js.map +1 -0
- package/dist/trading/resilience.d.ts +81 -0
- package/dist/trading/resilience.js +257 -0
- package/dist/trading/resilience.js.map +1 -0
- package/dist/trading/risk.d.ts +18 -0
- package/dist/trading/risk.js +91 -0
- package/dist/trading/risk.js.map +1 -0
- package/dist/trading/safety.d.ts +114 -0
- package/dist/trading/safety.js +372 -0
- package/dist/trading/safety.js.map +1 -0
- package/dist/trading/secrets.d.ts +48 -0
- package/dist/trading/secrets.js +243 -0
- package/dist/trading/secrets.js.map +1 -0
- package/dist/trading/state.d.ts +88 -0
- package/dist/trading/state.js +221 -0
- package/dist/trading/state.js.map +1 -0
- package/dist/trading/stream.d.ts +121 -0
- package/dist/trading/stream.js +396 -0
- package/dist/trading/stream.js.map +1 -0
- package/dist/trading/tracking.d.ts +136 -0
- package/dist/trading/tracking.js +512 -0
- package/dist/trading/tracking.js.map +1 -0
- package/dist/tts/index.d.ts +28 -0
- package/dist/tts/index.js +64 -0
- package/dist/tts/index.js.map +1 -0
- package/dist/tui/index.d.ts +159 -0
- package/dist/tui/index.js +580 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/types.d.ts +1373 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/dist/usage/index.d.ts +57 -0
- package/dist/usage/index.js +191 -0
- package/dist/usage/index.js.map +1 -0
- package/dist/utils/attachments.d.ts +12 -0
- package/dist/utils/attachments.js +104 -0
- package/dist/utils/attachments.js.map +1 -0
- package/dist/utils/config.d.ts +14 -0
- package/dist/utils/config.js +474 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/http.d.ts +22 -0
- package/dist/utils/http.js +191 -0
- package/dist/utils/http.js.map +1 -0
- package/dist/utils/id.d.ts +21 -0
- package/dist/utils/id.js +41 -0
- package/dist/utils/id.js.map +1 -0
- package/dist/utils/json-utils.d.ts +201 -0
- package/dist/utils/json-utils.js +151 -0
- package/dist/utils/json-utils.js.map +1 -0
- package/dist/utils/kalshi-auth.d.ts +10 -0
- package/dist/utils/kalshi-auth.js +48 -0
- package/dist/utils/kalshi-auth.js.map +1 -0
- package/dist/utils/kelly.d.ts +153 -0
- package/dist/utils/kelly.js +322 -0
- package/dist/utils/kelly.js.map +1 -0
- package/dist/utils/logger.d.ts +7 -0
- package/dist/utils/logger.js +26 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/opinion-auth.d.ts +17 -0
- package/dist/utils/opinion-auth.js +25 -0
- package/dist/utils/opinion-auth.js.map +1 -0
- package/dist/utils/polymarket-auth.d.ts +11 -0
- package/dist/utils/polymarket-auth.js +32 -0
- package/dist/utils/polymarket-auth.js.map +1 -0
- package/dist/utils/polymarket-order-signer.d.ts +118 -0
- package/dist/utils/polymarket-order-signer.js +329 -0
- package/dist/utils/polymarket-order-signer.js.map +1 -0
- package/dist/utils/polymarket-setup.d.ts +70 -0
- package/dist/utils/polymarket-setup.js +288 -0
- package/dist/utils/polymarket-setup.js.map +1 -0
- package/dist/utils/production.d.ts +112 -0
- package/dist/utils/production.js +294 -0
- package/dist/utils/production.js.map +1 -0
- package/dist/utils/rate-limiter.d.ts +77 -0
- package/dist/utils/rate-limiter.js +271 -0
- package/dist/utils/rate-limiter.js.map +1 -0
- package/dist/utils/webhook-security.d.ts +63 -0
- package/dist/utils/webhook-security.js +183 -0
- package/dist/utils/webhook-security.js.map +1 -0
- package/dist/voice/index.d.ts +125 -0
- package/dist/voice/index.js +557 -0
- package/dist/voice/index.js.map +1 -0
- package/dist/weather/edge.d.ts +70 -0
- package/dist/weather/edge.js +281 -0
- package/dist/weather/edge.js.map +1 -0
- package/dist/weather/index.d.ts +6 -0
- package/dist/weather/index.js +23 -0
- package/dist/weather/index.js.map +1 -0
- package/dist/weather/markets.d.ts +84 -0
- package/dist/weather/markets.js +320 -0
- package/dist/weather/markets.js.map +1 -0
- package/dist/weather/noaa.d.ts +113 -0
- package/dist/weather/noaa.js +287 -0
- package/dist/weather/noaa.js.map +1 -0
- package/dist/web/index.d.ts +112 -0
- package/dist/web/index.js +639 -0
- package/dist/web/index.js.map +1 -0
- package/dist/wizard/index.d.ts +27 -0
- package/dist/wizard/index.js +186 -0
- package/dist/wizard/index.js.map +1 -0
- package/dist/workspace/index.d.ts +73 -0
- package/dist/workspace/index.js +403 -0
- package/dist/workspace/index.js.map +1 -0
- package/package.json +168 -0
|
@@ -0,0 +1,2235 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Pump.fun Swarm Trading Skill
|
|
4
|
+
*
|
|
5
|
+
* Coordinate multiple wallets for synchronized Pump.fun trading.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.execute = execute;
|
|
9
|
+
const pump_swarm_1 = require("../../../solana/pump-swarm");
|
|
10
|
+
const swarm_presets_1 = require("../../../solana/swarm-presets");
|
|
11
|
+
const swarm_strategies_1 = require("../../../solana/swarm-strategies");
|
|
12
|
+
const swarm_copytrade_1 = require("../../../solana/swarm-copytrade");
|
|
13
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
14
|
+
// Default user ID for CLI usage
|
|
15
|
+
const CLI_USER_ID = 'cli_user';
|
|
16
|
+
// Lazy-loaded copytrader instance
|
|
17
|
+
let copyTraderInstance = null;
|
|
18
|
+
function getCopyTrader() {
|
|
19
|
+
if (!copyTraderInstance) {
|
|
20
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
21
|
+
const rpcUrl = process.env.SOLANA_RPC_URL || process.env.RPC_URL || 'https://api.mainnet-beta.solana.com';
|
|
22
|
+
const connection = new web3_js_1.Connection(rpcUrl, 'confirmed');
|
|
23
|
+
copyTraderInstance = (0, swarm_copytrade_1.getSwarmCopyTrader)(connection, swarm);
|
|
24
|
+
}
|
|
25
|
+
return copyTraderInstance;
|
|
26
|
+
}
|
|
27
|
+
// ============================================================================
|
|
28
|
+
// Helpers
|
|
29
|
+
// ============================================================================
|
|
30
|
+
/** Fetch current token price from Jupiter Price API */
|
|
31
|
+
async function fetchTokenPrice(mint) {
|
|
32
|
+
try {
|
|
33
|
+
const resp = await fetch(`https://api.jup.ag/price/v2?ids=${mint}`);
|
|
34
|
+
if (resp.ok) {
|
|
35
|
+
const data = await resp.json();
|
|
36
|
+
const price = parseFloat(data?.data?.[mint]?.price);
|
|
37
|
+
if (!isNaN(price) && price > 0)
|
|
38
|
+
return price;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
// Fall through to quote-based estimate
|
|
43
|
+
}
|
|
44
|
+
// Fallback: use swarm's getQuotes for a tiny amount to derive price
|
|
45
|
+
try {
|
|
46
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
47
|
+
const quote = await swarm.getQuotes?.({
|
|
48
|
+
mint,
|
|
49
|
+
action: 'buy',
|
|
50
|
+
amountPerWallet: 0.001,
|
|
51
|
+
});
|
|
52
|
+
if (quote?.quotes?.[0]?.outputAmount && quote?.quotes?.[0]?.inputAmount) {
|
|
53
|
+
return quote.quotes[0].inputAmount / quote.quotes[0].outputAmount;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
// ignore
|
|
58
|
+
}
|
|
59
|
+
throw new Error(`Could not fetch price for ${mint}. Check the mint address.`);
|
|
60
|
+
}
|
|
61
|
+
function formatSol(sol) {
|
|
62
|
+
return sol.toFixed(4);
|
|
63
|
+
}
|
|
64
|
+
function formatTokens(amount) {
|
|
65
|
+
if (amount >= 1_000_000_000)
|
|
66
|
+
return `${(amount / 1_000_000_000).toFixed(2)}B`;
|
|
67
|
+
if (amount >= 1_000_000)
|
|
68
|
+
return `${(amount / 1_000_000).toFixed(2)}M`;
|
|
69
|
+
if (amount >= 1_000)
|
|
70
|
+
return `${(amount / 1_000).toFixed(2)}K`;
|
|
71
|
+
return amount.toFixed(0);
|
|
72
|
+
}
|
|
73
|
+
function parseWalletIds(arg) {
|
|
74
|
+
return arg.split(',').map(s => s.trim()).filter(Boolean);
|
|
75
|
+
}
|
|
76
|
+
function formatTradeResult(result) {
|
|
77
|
+
const successCount = result.walletResults.filter(r => r.success).length;
|
|
78
|
+
const totalCount = result.walletResults.length;
|
|
79
|
+
let output = `**Swarm ${result.action.toUpperCase()} Result**\n\n`;
|
|
80
|
+
output += `Token: \`${result.mint.slice(0, 20)}...\`\n`;
|
|
81
|
+
output += `Status: ${result.success ? 'β
Success' : 'β Failed'} (${successCount}/${totalCount} wallets)\n`;
|
|
82
|
+
if (result.totalSolSpent) {
|
|
83
|
+
output += `Total SOL: ${formatSol(result.totalSolSpent)}\n`;
|
|
84
|
+
}
|
|
85
|
+
output += `Time: ${result.executionTimeMs}ms\n`;
|
|
86
|
+
output += `Mode: ${result.executionMode}\n`;
|
|
87
|
+
if (result.bundleIds && result.bundleIds.length > 0) {
|
|
88
|
+
if (result.bundleIds.length === 1) {
|
|
89
|
+
output += `Bundle: \`${result.bundleIds[0].slice(0, 20)}...\`\n`;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
output += `Bundles: ${result.bundleIds.length} submitted\n`;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (result.errors && result.errors.length > 0) {
|
|
96
|
+
output += `\n**Errors:**\n`;
|
|
97
|
+
for (const err of result.errors.slice(0, 5)) {
|
|
98
|
+
output += ` - ${err}\n`;
|
|
99
|
+
}
|
|
100
|
+
if (result.errors.length > 5) {
|
|
101
|
+
output += ` ... and ${result.errors.length - 5} more\n`;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
output += '\n**Wallet Results:**\n';
|
|
105
|
+
for (const wr of result.walletResults) {
|
|
106
|
+
const status = wr.success ? 'β
' : 'β';
|
|
107
|
+
output += `${status} **${wr.walletId}** (\`${wr.publicKey.slice(0, 8)}...\`)`;
|
|
108
|
+
if (wr.success && wr.signature) {
|
|
109
|
+
output += ` [tx](https://solscan.io/tx/${wr.signature})`;
|
|
110
|
+
}
|
|
111
|
+
if (wr.error) {
|
|
112
|
+
output += ` - ${wr.error.slice(0, 50)}`;
|
|
113
|
+
}
|
|
114
|
+
output += '\n';
|
|
115
|
+
}
|
|
116
|
+
return output;
|
|
117
|
+
}
|
|
118
|
+
// ============================================================================
|
|
119
|
+
// Command Handlers
|
|
120
|
+
// ============================================================================
|
|
121
|
+
async function handleWallets() {
|
|
122
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
123
|
+
const wallets = swarm.getWallets();
|
|
124
|
+
if (wallets.length === 0) {
|
|
125
|
+
return `**No Swarm Wallets Configured**
|
|
126
|
+
|
|
127
|
+
Set up wallets with environment variables:
|
|
128
|
+
\`\`\`bash
|
|
129
|
+
export SOLANA_PRIVATE_KEY="main-wallet-key"
|
|
130
|
+
export SOLANA_SWARM_KEY_1="wallet-2-key"
|
|
131
|
+
export SOLANA_SWARM_KEY_2="wallet-3-key"
|
|
132
|
+
# ... up to SOLANA_SWARM_KEY_20
|
|
133
|
+
\`\`\``;
|
|
134
|
+
}
|
|
135
|
+
const counts = swarm.getWalletCount();
|
|
136
|
+
let output = `**Swarm Wallets (${counts.enabled}/${counts.total} enabled)**\n\n`;
|
|
137
|
+
for (const w of wallets) {
|
|
138
|
+
const status = w.enabled ? 'π’' : 'π΄';
|
|
139
|
+
output += `${status} **${w.id}**\n`;
|
|
140
|
+
output += ` \`${w.publicKey}\`\n`;
|
|
141
|
+
output += ` SOL: ${formatSol(w.solBalance)}`;
|
|
142
|
+
if (w.positions.size > 0) {
|
|
143
|
+
output += ` | ${w.positions.size} positions`;
|
|
144
|
+
}
|
|
145
|
+
output += '\n\n';
|
|
146
|
+
}
|
|
147
|
+
output += `_Run \`/swarm balances\` to refresh SOL balances_`;
|
|
148
|
+
return output;
|
|
149
|
+
}
|
|
150
|
+
async function handleBalances() {
|
|
151
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
152
|
+
const wallets = swarm.getWallets();
|
|
153
|
+
if (wallets.length === 0) {
|
|
154
|
+
return 'No swarm wallets configured. Set SOLANA_PRIVATE_KEY and SOLANA_SWARM_KEY_N env vars.';
|
|
155
|
+
}
|
|
156
|
+
let output = '**Fetching balances from chain...**\n\n';
|
|
157
|
+
const balances = await swarm.refreshBalances();
|
|
158
|
+
let totalSol = 0;
|
|
159
|
+
for (const [id, balance] of balances) {
|
|
160
|
+
const wallet = swarm.getWallet(id);
|
|
161
|
+
const status = wallet?.enabled ? 'π’' : 'π΄';
|
|
162
|
+
output += `${status} ${id}: **${formatSol(balance)} SOL**\n`;
|
|
163
|
+
totalSol += balance;
|
|
164
|
+
}
|
|
165
|
+
output += `\n**Total: ${formatSol(totalSol)} SOL** across ${balances.size} wallets`;
|
|
166
|
+
return output;
|
|
167
|
+
}
|
|
168
|
+
async function handleRefresh(mint) {
|
|
169
|
+
if (!mint)
|
|
170
|
+
return 'Usage: /swarm refresh <mint>\n\nRefreshes token positions from chain for all wallets.';
|
|
171
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
172
|
+
let output = `**Refreshing positions for \`${mint.slice(0, 20)}...\`**\n\n`;
|
|
173
|
+
const position = await swarm.refreshTokenPositions(mint);
|
|
174
|
+
if (position.totalTokens === 0) {
|
|
175
|
+
return output + 'No positions found across any wallets.';
|
|
176
|
+
}
|
|
177
|
+
output += `**Total: ${formatTokens(position.totalTokens)} tokens**\n\n`;
|
|
178
|
+
output += `**By Wallet:**\n`;
|
|
179
|
+
for (const [walletId, amount] of position.byWallet) {
|
|
180
|
+
const pct = (amount / position.totalTokens * 100).toFixed(1);
|
|
181
|
+
output += ` ${walletId}: ${formatTokens(amount)} (${pct}%)\n`;
|
|
182
|
+
}
|
|
183
|
+
return output;
|
|
184
|
+
}
|
|
185
|
+
async function handleEnable(walletId) {
|
|
186
|
+
if (!walletId)
|
|
187
|
+
return 'Usage: /swarm enable <wallet_id>';
|
|
188
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
189
|
+
const wallet = swarm.getWallet(walletId);
|
|
190
|
+
if (!wallet) {
|
|
191
|
+
const wallets = swarm.getWallets();
|
|
192
|
+
return `Wallet "${walletId}" not found.\n\nAvailable: ${wallets.map(w => w.id).join(', ')}`;
|
|
193
|
+
}
|
|
194
|
+
swarm.enableWallet(walletId);
|
|
195
|
+
return `β
Wallet **${walletId}** enabled for trading.`;
|
|
196
|
+
}
|
|
197
|
+
async function handleDisable(walletId) {
|
|
198
|
+
if (!walletId)
|
|
199
|
+
return 'Usage: /swarm disable <wallet_id>';
|
|
200
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
201
|
+
const wallet = swarm.getWallet(walletId);
|
|
202
|
+
if (!wallet) {
|
|
203
|
+
return `Wallet "${walletId}" not found.`;
|
|
204
|
+
}
|
|
205
|
+
swarm.disableWallet(walletId);
|
|
206
|
+
return `π΄ Wallet **${walletId}** disabled. Will not participate in trades.`;
|
|
207
|
+
}
|
|
208
|
+
async function handleBuy(args) {
|
|
209
|
+
if (args.length < 2) {
|
|
210
|
+
return `**Usage:** /swarm buy <mint> <sol_per_wallet> [options]
|
|
211
|
+
|
|
212
|
+
**Options:**
|
|
213
|
+
--preset <name> Apply a saved preset
|
|
214
|
+
--wallets <id1,id2,...> Use specific wallets only
|
|
215
|
+
--parallel Parallel execution (fastest, default >5 wallets)
|
|
216
|
+
--bundle Single Jito bundle (atomic, max 5 wallets)
|
|
217
|
+
--multi-bundle Multiple Jito bundles in parallel (>5 wallets)
|
|
218
|
+
--sequential Sequential execution (staggered, stealthy)
|
|
219
|
+
--slippage <bps> Slippage tolerance (default: 500 = 5%)
|
|
220
|
+
--pool <pool> Pool: pump, raydium, auto (pumpfun only)
|
|
221
|
+
--dex <dex> DEX: pumpfun (default), bags, meteora
|
|
222
|
+
--pool-address <addr> Specific pool address (for Meteora)
|
|
223
|
+
|
|
224
|
+
**Examples:**
|
|
225
|
+
/swarm buy ABC123... 0.1
|
|
226
|
+
/swarm buy ABC123... 0.05 --wallets wallet_0,wallet_1
|
|
227
|
+
/swarm buy ABC123... 0.1 --multi-bundle --slippage 1000
|
|
228
|
+
/swarm buy ABC123... 0.1 --preset stealth
|
|
229
|
+
/swarm buy ABC123... 0.1 --dex bags
|
|
230
|
+
/swarm buy ABC123... 0.1 --dex meteora --pool-address <pool>`;
|
|
231
|
+
}
|
|
232
|
+
const mint = args[0];
|
|
233
|
+
const amountPerWallet = parseFloat(args[1]);
|
|
234
|
+
if (isNaN(amountPerWallet) || amountPerWallet <= 0) {
|
|
235
|
+
return 'β Invalid amount. Must be a positive number (SOL per wallet).';
|
|
236
|
+
}
|
|
237
|
+
if (amountPerWallet > 10) {
|
|
238
|
+
return 'β Amount too high. Max 10 SOL per wallet for safety.';
|
|
239
|
+
}
|
|
240
|
+
// Parse options
|
|
241
|
+
let walletIds;
|
|
242
|
+
let executionMode;
|
|
243
|
+
let slippageBps;
|
|
244
|
+
let pool;
|
|
245
|
+
let presetName;
|
|
246
|
+
let dex;
|
|
247
|
+
let poolAddress;
|
|
248
|
+
for (let i = 2; i < args.length; i++) {
|
|
249
|
+
if (args[i] === '--wallets' && args[i + 1]) {
|
|
250
|
+
walletIds = parseWalletIds(args[++i]);
|
|
251
|
+
}
|
|
252
|
+
else if (args[i] === '--preset' && args[i + 1]) {
|
|
253
|
+
presetName = args[++i];
|
|
254
|
+
}
|
|
255
|
+
else if (args[i] === '--parallel') {
|
|
256
|
+
executionMode = 'parallel';
|
|
257
|
+
}
|
|
258
|
+
else if (args[i] === '--bundle') {
|
|
259
|
+
executionMode = 'bundle';
|
|
260
|
+
}
|
|
261
|
+
else if (args[i] === '--multi-bundle') {
|
|
262
|
+
executionMode = 'multi-bundle';
|
|
263
|
+
}
|
|
264
|
+
else if (args[i] === '--sequential') {
|
|
265
|
+
executionMode = 'sequential';
|
|
266
|
+
}
|
|
267
|
+
else if (args[i] === '--slippage' && args[i + 1]) {
|
|
268
|
+
slippageBps = parseInt(args[++i]);
|
|
269
|
+
}
|
|
270
|
+
else if (args[i] === '--pool' && args[i + 1]) {
|
|
271
|
+
pool = args[++i];
|
|
272
|
+
}
|
|
273
|
+
else if (args[i] === '--dex' && args[i + 1]) {
|
|
274
|
+
const d = args[++i].toLowerCase();
|
|
275
|
+
if (d === 'pumpfun' || d === 'bags' || d === 'meteora' || d === 'auto') {
|
|
276
|
+
dex = d;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
else if ((args[i] === '--pool-address' || args[i] === '--pool_address') && args[i + 1]) {
|
|
280
|
+
poolAddress = args[++i];
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
284
|
+
const counts = swarm.getWalletCount();
|
|
285
|
+
if (counts.enabled === 0) {
|
|
286
|
+
return 'β No enabled wallets. Run `/swarm wallets` to check status.';
|
|
287
|
+
}
|
|
288
|
+
// Build base params
|
|
289
|
+
let params = {
|
|
290
|
+
mint,
|
|
291
|
+
action: 'buy',
|
|
292
|
+
amountPerWallet,
|
|
293
|
+
denominatedInSol: true,
|
|
294
|
+
slippageBps,
|
|
295
|
+
pool,
|
|
296
|
+
executionMode,
|
|
297
|
+
walletIds,
|
|
298
|
+
dex,
|
|
299
|
+
poolAddress,
|
|
300
|
+
};
|
|
301
|
+
// Apply preset if specified
|
|
302
|
+
if (presetName) {
|
|
303
|
+
const presetService = (0, swarm_presets_1.getSwarmPresetService)();
|
|
304
|
+
const preset = await presetService.get(CLI_USER_ID, presetName);
|
|
305
|
+
if (!preset) {
|
|
306
|
+
return `β Preset "${presetName}" not found. Run \`/swarm preset list\` to see available presets.`;
|
|
307
|
+
}
|
|
308
|
+
params = presetService.applyToParams(preset, params);
|
|
309
|
+
}
|
|
310
|
+
const walletCount = params.walletIds?.length || counts.enabled;
|
|
311
|
+
const totalSol = (typeof params.amountPerWallet === 'number' ? params.amountPerWallet : parseFloat(params.amountPerWallet)) * walletCount;
|
|
312
|
+
let output = `**Swarm Buy**\n\n`;
|
|
313
|
+
output += `Token: \`${mint}\`\n`;
|
|
314
|
+
output += `Amount: **${formatSol(typeof params.amountPerWallet === 'number' ? params.amountPerWallet : parseFloat(params.amountPerWallet))} SOL** per wallet\n`;
|
|
315
|
+
output += `Wallets: ${walletCount}\n`;
|
|
316
|
+
output += `Max Total: ~${formatSol(totalSol)} SOL\n`;
|
|
317
|
+
if (params.dex && params.dex !== 'pumpfun') {
|
|
318
|
+
output += `DEX: **${params.dex}**\n`;
|
|
319
|
+
}
|
|
320
|
+
if (presetName) {
|
|
321
|
+
output += `Preset: **${presetName}**\n`;
|
|
322
|
+
}
|
|
323
|
+
output += `\n_Executing..._\n\n`;
|
|
324
|
+
const result = await swarm.coordinatedBuy(params);
|
|
325
|
+
return output + formatTradeResult(result);
|
|
326
|
+
}
|
|
327
|
+
async function handleSell(args) {
|
|
328
|
+
if (args.length < 2) {
|
|
329
|
+
return `**Usage:** /swarm sell <mint> <amount|%> [options]
|
|
330
|
+
|
|
331
|
+
**Amount formats:**
|
|
332
|
+
- Percentage: "100%" or "50%" (of each wallet's position)
|
|
333
|
+
- Tokens: exact token amount per wallet
|
|
334
|
+
|
|
335
|
+
**Options:**
|
|
336
|
+
--preset <name> Apply a saved preset
|
|
337
|
+
--wallets <id1,id2,...> Use specific wallets only
|
|
338
|
+
--parallel Parallel execution (fastest, default >5 wallets)
|
|
339
|
+
--bundle Single Jito bundle (atomic, max 5 wallets)
|
|
340
|
+
--multi-bundle Multiple Jito bundles in parallel (>5 wallets)
|
|
341
|
+
--sequential Sequential execution (staggered, stealthy)
|
|
342
|
+
--slippage <bps> Slippage tolerance (default: 500 = 5%)
|
|
343
|
+
--pool <pool> Pool: pump, raydium, auto (pumpfun only)
|
|
344
|
+
--dex <dex> DEX: pumpfun (default), bags, meteora
|
|
345
|
+
--pool-address <addr> Specific pool address (for Meteora)
|
|
346
|
+
|
|
347
|
+
**Examples:**
|
|
348
|
+
/swarm sell ABC123... 100%
|
|
349
|
+
/swarm sell ABC123... 50% --multi-bundle
|
|
350
|
+
/swarm sell ABC123... 1000000 --sequential
|
|
351
|
+
/swarm sell ABC123... 100% --preset stealth
|
|
352
|
+
/swarm sell ABC123... 100% --dex bags`;
|
|
353
|
+
}
|
|
354
|
+
const mint = args[0];
|
|
355
|
+
const amountArg = args[1];
|
|
356
|
+
// Parse options
|
|
357
|
+
let walletIds;
|
|
358
|
+
let executionMode;
|
|
359
|
+
let slippageBps;
|
|
360
|
+
let pool;
|
|
361
|
+
let presetName;
|
|
362
|
+
let dex;
|
|
363
|
+
let poolAddress;
|
|
364
|
+
for (let i = 2; i < args.length; i++) {
|
|
365
|
+
if (args[i] === '--wallets' && args[i + 1]) {
|
|
366
|
+
walletIds = parseWalletIds(args[++i]);
|
|
367
|
+
}
|
|
368
|
+
else if (args[i] === '--preset' && args[i + 1]) {
|
|
369
|
+
presetName = args[++i];
|
|
370
|
+
}
|
|
371
|
+
else if (args[i] === '--parallel') {
|
|
372
|
+
executionMode = 'parallel';
|
|
373
|
+
}
|
|
374
|
+
else if (args[i] === '--bundle') {
|
|
375
|
+
executionMode = 'bundle';
|
|
376
|
+
}
|
|
377
|
+
else if (args[i] === '--multi-bundle') {
|
|
378
|
+
executionMode = 'multi-bundle';
|
|
379
|
+
}
|
|
380
|
+
else if (args[i] === '--sequential') {
|
|
381
|
+
executionMode = 'sequential';
|
|
382
|
+
}
|
|
383
|
+
else if (args[i] === '--slippage' && args[i + 1]) {
|
|
384
|
+
slippageBps = parseInt(args[++i]);
|
|
385
|
+
}
|
|
386
|
+
else if (args[i] === '--pool' && args[i + 1]) {
|
|
387
|
+
pool = args[++i];
|
|
388
|
+
}
|
|
389
|
+
else if (args[i] === '--dex' && args[i + 1]) {
|
|
390
|
+
const d = args[++i].toLowerCase();
|
|
391
|
+
if (d === 'pumpfun' || d === 'bags' || d === 'meteora' || d === 'auto') {
|
|
392
|
+
dex = d;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
else if ((args[i] === '--pool-address' || args[i] === '--pool_address') && args[i + 1]) {
|
|
396
|
+
poolAddress = args[++i];
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
400
|
+
// Build base params
|
|
401
|
+
let params = {
|
|
402
|
+
mint,
|
|
403
|
+
action: 'sell',
|
|
404
|
+
amountPerWallet: amountArg,
|
|
405
|
+
denominatedInSol: false,
|
|
406
|
+
slippageBps,
|
|
407
|
+
pool,
|
|
408
|
+
executionMode,
|
|
409
|
+
walletIds,
|
|
410
|
+
dex,
|
|
411
|
+
poolAddress,
|
|
412
|
+
};
|
|
413
|
+
// Apply preset if specified
|
|
414
|
+
if (presetName) {
|
|
415
|
+
const presetService = (0, swarm_presets_1.getSwarmPresetService)();
|
|
416
|
+
const preset = await presetService.get(CLI_USER_ID, presetName);
|
|
417
|
+
if (!preset) {
|
|
418
|
+
return `β Preset "${presetName}" not found. Run \`/swarm preset list\` to see available presets.`;
|
|
419
|
+
}
|
|
420
|
+
params = presetService.applyToParams(preset, params);
|
|
421
|
+
}
|
|
422
|
+
let output = `**Swarm Sell**\n\n`;
|
|
423
|
+
output += `Token: \`${mint}\`\n`;
|
|
424
|
+
output += `Amount: **${amountArg}** per wallet\n`;
|
|
425
|
+
if (params.dex && params.dex !== 'pumpfun') {
|
|
426
|
+
output += `DEX: **${params.dex}**\n`;
|
|
427
|
+
}
|
|
428
|
+
if (presetName) {
|
|
429
|
+
output += `Preset: **${presetName}**\n`;
|
|
430
|
+
}
|
|
431
|
+
output += `\n_Fetching positions and executing..._\n\n`;
|
|
432
|
+
const result = await swarm.coordinatedSell(params);
|
|
433
|
+
return output + formatTradeResult(result);
|
|
434
|
+
}
|
|
435
|
+
async function handlePosition(mint) {
|
|
436
|
+
if (!mint) {
|
|
437
|
+
return `**Usage:** /swarm position <mint>
|
|
438
|
+
|
|
439
|
+
Shows cached token positions. Use \`/swarm refresh <mint>\` to fetch fresh data from chain.`;
|
|
440
|
+
}
|
|
441
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
442
|
+
const position = swarm.getSwarmPosition(mint);
|
|
443
|
+
if (position.totalTokens === 0) {
|
|
444
|
+
return `No cached position for \`${mint.slice(0, 30)}...\`
|
|
445
|
+
|
|
446
|
+
Run \`/swarm refresh ${mint}\` to fetch from chain.`;
|
|
447
|
+
}
|
|
448
|
+
let output = `**Swarm Position**\n\n`;
|
|
449
|
+
output += `Token: \`${mint}\`\n`;
|
|
450
|
+
output += `Total: **${formatTokens(position.totalTokens)}** tokens\n\n`;
|
|
451
|
+
output += `**By Wallet:**\n`;
|
|
452
|
+
for (const [walletId, amount] of position.byWallet) {
|
|
453
|
+
const pct = (amount / position.totalTokens * 100).toFixed(1);
|
|
454
|
+
output += ` ${walletId}: ${formatTokens(amount)} (${pct}%)\n`;
|
|
455
|
+
}
|
|
456
|
+
output += `\n_Last updated: ${new Date(position.lastUpdated).toLocaleTimeString()}_`;
|
|
457
|
+
return output;
|
|
458
|
+
}
|
|
459
|
+
// ============================================================================
|
|
460
|
+
// Preset Command Handlers
|
|
461
|
+
// ============================================================================
|
|
462
|
+
async function handlePreset(args) {
|
|
463
|
+
const subcommand = args[0]?.toLowerCase() || 'help';
|
|
464
|
+
const rest = args.slice(1);
|
|
465
|
+
switch (subcommand) {
|
|
466
|
+
case 'save':
|
|
467
|
+
return await handlePresetSave(rest);
|
|
468
|
+
case 'list':
|
|
469
|
+
case 'ls':
|
|
470
|
+
return await handlePresetList(rest[0]);
|
|
471
|
+
case 'show':
|
|
472
|
+
case 'get':
|
|
473
|
+
return await handlePresetShow(rest[0]);
|
|
474
|
+
case 'delete':
|
|
475
|
+
case 'rm':
|
|
476
|
+
return await handlePresetDelete(rest[0]);
|
|
477
|
+
case 'help':
|
|
478
|
+
default:
|
|
479
|
+
return handlePresetHelp();
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
function handlePresetHelp() {
|
|
483
|
+
return `**Swarm Presets**
|
|
484
|
+
|
|
485
|
+
Save and reuse trading configurations.
|
|
486
|
+
|
|
487
|
+
**Commands:**
|
|
488
|
+
/swarm preset save <name> [opts] Save a preset
|
|
489
|
+
/swarm preset list [type] List presets (strategy|token|wallet_group)
|
|
490
|
+
/swarm preset show <name> Show preset details
|
|
491
|
+
/swarm preset delete <name> Delete a preset
|
|
492
|
+
|
|
493
|
+
**Save Options:**
|
|
494
|
+
--type <type> Preset type: strategy, token, wallet_group
|
|
495
|
+
--desc "description" Preset description
|
|
496
|
+
--mint <address> Token address (for token type)
|
|
497
|
+
--amount <sol> Default SOL per wallet
|
|
498
|
+
--slippage <bps> Slippage in basis points
|
|
499
|
+
--pool <pump|raydium|auto> Pool preference
|
|
500
|
+
--mode <mode> parallel|bundle|multi-bundle|sequential
|
|
501
|
+
--wallets <id1,id2,...> Wallet IDs (for wallet_group type)
|
|
502
|
+
|
|
503
|
+
**Built-in Presets:**
|
|
504
|
+
fast Parallel, 5% slippage, auto pool
|
|
505
|
+
atomic Multi-bundle, 5% slippage
|
|
506
|
+
stealth Sequential, 3% slippage, 10% variance
|
|
507
|
+
aggressive Parallel, 10% slippage, pump pool
|
|
508
|
+
safe Bundle, 2% slippage
|
|
509
|
+
|
|
510
|
+
**Examples:**
|
|
511
|
+
/swarm preset save my_stealth --type strategy --mode sequential --slippage 300
|
|
512
|
+
/swarm preset save bonk_snipe --type token --mint DezXAZ... --slippage 1000
|
|
513
|
+
/swarm preset save top5 --type wallet_group --wallets wallet_0,wallet_1,wallet_2
|
|
514
|
+
/swarm buy ABC... 0.1 --preset my_stealth`;
|
|
515
|
+
}
|
|
516
|
+
async function handlePresetSave(args) {
|
|
517
|
+
if (args.length === 0) {
|
|
518
|
+
return 'Usage: /swarm preset save <name> [--type <type>] [--desc "..."] [options]';
|
|
519
|
+
}
|
|
520
|
+
const name = args[0];
|
|
521
|
+
let type = 'strategy';
|
|
522
|
+
let description;
|
|
523
|
+
let mint;
|
|
524
|
+
let amountPerWallet;
|
|
525
|
+
let slippageBps;
|
|
526
|
+
let pool;
|
|
527
|
+
let executionMode;
|
|
528
|
+
let walletIds;
|
|
529
|
+
let dex;
|
|
530
|
+
let poolAddress;
|
|
531
|
+
for (let i = 1; i < args.length; i++) {
|
|
532
|
+
const arg = args[i];
|
|
533
|
+
if (arg === '--type' && args[i + 1]) {
|
|
534
|
+
const t = args[++i].toLowerCase();
|
|
535
|
+
if (t === 'strategy' || t === 'token' || t === 'wallet_group') {
|
|
536
|
+
type = t;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
else if ((arg === '--desc' || arg === '--description') && args[i + 1]) {
|
|
540
|
+
description = args[++i];
|
|
541
|
+
}
|
|
542
|
+
else if (arg === '--mint' && args[i + 1]) {
|
|
543
|
+
mint = args[++i];
|
|
544
|
+
}
|
|
545
|
+
else if (arg === '--amount' && args[i + 1]) {
|
|
546
|
+
amountPerWallet = parseFloat(args[++i]);
|
|
547
|
+
}
|
|
548
|
+
else if (arg === '--slippage' && args[i + 1]) {
|
|
549
|
+
slippageBps = parseInt(args[++i]);
|
|
550
|
+
}
|
|
551
|
+
else if (arg === '--pool' && args[i + 1]) {
|
|
552
|
+
const p = args[++i].toLowerCase();
|
|
553
|
+
if (p === 'pump' || p === 'raydium' || p === 'auto') {
|
|
554
|
+
pool = p;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
else if (arg === '--mode' && args[i + 1]) {
|
|
558
|
+
const m = args[++i].toLowerCase();
|
|
559
|
+
if (m === 'parallel' || m === 'bundle' || m === 'multi-bundle' || m === 'sequential') {
|
|
560
|
+
executionMode = m;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
else if (arg === '--wallets' && args[i + 1]) {
|
|
564
|
+
walletIds = parseWalletIds(args[++i]);
|
|
565
|
+
}
|
|
566
|
+
else if (arg === '--dex' && args[i + 1]) {
|
|
567
|
+
const d = args[++i].toLowerCase();
|
|
568
|
+
if (d === 'pumpfun' || d === 'bags' || d === 'meteora' || d === 'auto') {
|
|
569
|
+
dex = d;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
else if (arg === '--pool-address' && args[i + 1]) {
|
|
573
|
+
poolAddress = args[++i];
|
|
574
|
+
}
|
|
575
|
+
else if (arg === '--parallel') {
|
|
576
|
+
executionMode = 'parallel';
|
|
577
|
+
}
|
|
578
|
+
else if (arg === '--bundle') {
|
|
579
|
+
executionMode = 'bundle';
|
|
580
|
+
}
|
|
581
|
+
else if (arg === '--multi-bundle') {
|
|
582
|
+
executionMode = 'multi-bundle';
|
|
583
|
+
}
|
|
584
|
+
else if (arg === '--sequential') {
|
|
585
|
+
executionMode = 'sequential';
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
// Build config
|
|
589
|
+
const config = {};
|
|
590
|
+
if (mint)
|
|
591
|
+
config.mint = mint;
|
|
592
|
+
if (amountPerWallet !== undefined && !isNaN(amountPerWallet))
|
|
593
|
+
config.amountPerWallet = amountPerWallet;
|
|
594
|
+
if (slippageBps !== undefined && !isNaN(slippageBps))
|
|
595
|
+
config.slippageBps = slippageBps;
|
|
596
|
+
if (pool)
|
|
597
|
+
config.pool = pool;
|
|
598
|
+
if (executionMode)
|
|
599
|
+
config.executionMode = executionMode;
|
|
600
|
+
if (walletIds && walletIds.length > 0)
|
|
601
|
+
config.walletIds = walletIds;
|
|
602
|
+
if (dex)
|
|
603
|
+
config.dex = dex;
|
|
604
|
+
if (poolAddress)
|
|
605
|
+
config.poolAddress = poolAddress;
|
|
606
|
+
if (Object.keys(config).length === 0) {
|
|
607
|
+
return 'β No configuration provided. Use --slippage, --mode, --pool, --dex, etc.';
|
|
608
|
+
}
|
|
609
|
+
const presetService = (0, swarm_presets_1.getSwarmPresetService)();
|
|
610
|
+
try {
|
|
611
|
+
const preset = await presetService.create(CLI_USER_ID, {
|
|
612
|
+
name,
|
|
613
|
+
type,
|
|
614
|
+
description,
|
|
615
|
+
config,
|
|
616
|
+
});
|
|
617
|
+
let output = `β
**Preset "${preset.name}" saved**\n\n`;
|
|
618
|
+
output += `Type: ${preset.type}\n`;
|
|
619
|
+
if (description)
|
|
620
|
+
output += `Description: ${description}\n`;
|
|
621
|
+
output += `\n**Settings:**\n`;
|
|
622
|
+
for (const [key, value] of Object.entries(config)) {
|
|
623
|
+
output += ` ${key}: ${Array.isArray(value) ? value.join(', ') : value}\n`;
|
|
624
|
+
}
|
|
625
|
+
return output;
|
|
626
|
+
}
|
|
627
|
+
catch (err) {
|
|
628
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
629
|
+
if (msg.includes('UNIQUE constraint')) {
|
|
630
|
+
return `β Preset "${name}" already exists. Delete it first with \`/swarm preset delete ${name}\``;
|
|
631
|
+
}
|
|
632
|
+
return `β Failed to save preset: ${msg}`;
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
async function handlePresetList(typeFilter) {
|
|
636
|
+
const presetService = (0, swarm_presets_1.getSwarmPresetService)();
|
|
637
|
+
let type;
|
|
638
|
+
if (typeFilter) {
|
|
639
|
+
const t = typeFilter.toLowerCase();
|
|
640
|
+
if (t === 'strategy' || t === 'token' || t === 'wallet_group') {
|
|
641
|
+
type = t;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
const presets = await presetService.list(CLI_USER_ID, type);
|
|
645
|
+
if (presets.length === 0) {
|
|
646
|
+
return type
|
|
647
|
+
? `No ${type} presets found.`
|
|
648
|
+
: 'No presets found. Use `/swarm preset save <name>` to create one.';
|
|
649
|
+
}
|
|
650
|
+
let output = '**Swarm Presets**\n\n';
|
|
651
|
+
// Group by type
|
|
652
|
+
const byType = new Map();
|
|
653
|
+
for (const preset of presets) {
|
|
654
|
+
const list = byType.get(preset.type) || [];
|
|
655
|
+
list.push(preset);
|
|
656
|
+
byType.set(preset.type, list);
|
|
657
|
+
}
|
|
658
|
+
for (const [presetType, list] of Array.from(byType.entries())) {
|
|
659
|
+
output += `**${presetType.toUpperCase()}:**\n`;
|
|
660
|
+
for (const preset of list) {
|
|
661
|
+
const isBuiltin = preset.userId === 'system';
|
|
662
|
+
const badge = isBuiltin ? ' (built-in)' : '';
|
|
663
|
+
output += ` **${preset.name}**${badge}`;
|
|
664
|
+
if (preset.description) {
|
|
665
|
+
output += ` - ${preset.description}`;
|
|
666
|
+
}
|
|
667
|
+
output += '\n';
|
|
668
|
+
}
|
|
669
|
+
output += '\n';
|
|
670
|
+
}
|
|
671
|
+
return output.trim();
|
|
672
|
+
}
|
|
673
|
+
async function handlePresetShow(name) {
|
|
674
|
+
if (!name) {
|
|
675
|
+
return 'Usage: /swarm preset show <name>';
|
|
676
|
+
}
|
|
677
|
+
const presetService = (0, swarm_presets_1.getSwarmPresetService)();
|
|
678
|
+
const preset = await presetService.get(CLI_USER_ID, name);
|
|
679
|
+
if (!preset) {
|
|
680
|
+
return `β Preset "${name}" not found.`;
|
|
681
|
+
}
|
|
682
|
+
const isBuiltin = preset.userId === 'system';
|
|
683
|
+
let output = `**Preset: ${preset.name}**${isBuiltin ? ' (built-in)' : ''}\n\n`;
|
|
684
|
+
output += `Type: ${preset.type}\n`;
|
|
685
|
+
if (preset.description) {
|
|
686
|
+
output += `Description: ${preset.description}\n`;
|
|
687
|
+
}
|
|
688
|
+
output += `\n**Configuration:**\n`;
|
|
689
|
+
const config = preset.config;
|
|
690
|
+
if (config.mint)
|
|
691
|
+
output += ` mint: ${config.mint}\n`;
|
|
692
|
+
if (config.amountPerWallet !== undefined)
|
|
693
|
+
output += ` amountPerWallet: ${config.amountPerWallet}\n`;
|
|
694
|
+
if (config.slippageBps !== undefined)
|
|
695
|
+
output += ` slippage: ${config.slippageBps} bps (${(config.slippageBps / 100).toFixed(1)}%)\n`;
|
|
696
|
+
if (config.pool)
|
|
697
|
+
output += ` pool: ${config.pool}\n`;
|
|
698
|
+
if (config.executionMode)
|
|
699
|
+
output += ` executionMode: ${config.executionMode}\n`;
|
|
700
|
+
if (config.walletIds && config.walletIds.length > 0)
|
|
701
|
+
output += ` wallets: ${config.walletIds.join(', ')}\n`;
|
|
702
|
+
if (config.amountVariancePct !== undefined)
|
|
703
|
+
output += ` amountVariance: ${config.amountVariancePct}%\n`;
|
|
704
|
+
if (!isBuiltin) {
|
|
705
|
+
output += `\nCreated: ${preset.createdAt.toLocaleDateString()}`;
|
|
706
|
+
}
|
|
707
|
+
return output;
|
|
708
|
+
}
|
|
709
|
+
async function handlePresetDelete(name) {
|
|
710
|
+
if (!name) {
|
|
711
|
+
return 'Usage: /swarm preset delete <name>';
|
|
712
|
+
}
|
|
713
|
+
const presetService = (0, swarm_presets_1.getSwarmPresetService)();
|
|
714
|
+
try {
|
|
715
|
+
const deleted = await presetService.delete(CLI_USER_ID, name);
|
|
716
|
+
if (deleted) {
|
|
717
|
+
return `β
Preset "${name}" deleted.`;
|
|
718
|
+
}
|
|
719
|
+
else {
|
|
720
|
+
return `β Preset "${name}" not found.`;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
catch (err) {
|
|
724
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
725
|
+
return `β ${msg}`;
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
// ============================================================================
|
|
729
|
+
// Strategy Handlers - Smart Multi-Step Execution
|
|
730
|
+
// ============================================================================
|
|
731
|
+
// Track active strategies for status/cancel
|
|
732
|
+
const activeStrategies = new Map();
|
|
733
|
+
async function handleStrategy(args) {
|
|
734
|
+
const subCommand = args[0]?.toLowerCase();
|
|
735
|
+
const rest = args.slice(1);
|
|
736
|
+
switch (subCommand) {
|
|
737
|
+
case 'scale-in':
|
|
738
|
+
case 'scalein':
|
|
739
|
+
return await handleStrategyScaleIn(rest);
|
|
740
|
+
case 'scale-out':
|
|
741
|
+
case 'scaleout':
|
|
742
|
+
return await handleStrategyScaleOut(rest);
|
|
743
|
+
case 'snipe':
|
|
744
|
+
return await handleStrategySnipe(rest);
|
|
745
|
+
case 'twap':
|
|
746
|
+
return await handleStrategyTWAP(rest);
|
|
747
|
+
case 'ladder':
|
|
748
|
+
return await handleStrategyLadder(rest);
|
|
749
|
+
case 'dca-smart':
|
|
750
|
+
return await handleStrategyDCA(rest);
|
|
751
|
+
case 'split':
|
|
752
|
+
return await handleStrategySplit(rest);
|
|
753
|
+
case 'rotation':
|
|
754
|
+
case 'rotate':
|
|
755
|
+
return await handleStrategyRotation(rest);
|
|
756
|
+
case 'list':
|
|
757
|
+
case 'active':
|
|
758
|
+
return handleStrategyList();
|
|
759
|
+
case 'cancel':
|
|
760
|
+
return handleStrategyCancel(rest[0]);
|
|
761
|
+
case 'pause':
|
|
762
|
+
return handleStrategyPause(rest[0]);
|
|
763
|
+
case 'resume':
|
|
764
|
+
return handleStrategyResume(rest[0]);
|
|
765
|
+
default:
|
|
766
|
+
return `**Swarm Smart Strategies**
|
|
767
|
+
|
|
768
|
+
Execute complex multi-step trading strategies across your swarm.
|
|
769
|
+
|
|
770
|
+
**Available Strategies:**
|
|
771
|
+
|
|
772
|
+
**Scale-In** - Buy gradually at lower prices:
|
|
773
|
+
/swarm strategy scale-in <mint> <total_sol> <levels> <drop%>
|
|
774
|
+
Example: /swarm strategy scale-in ABC... 1.0 4 5
|
|
775
|
+
Buys 25% now, then 25% at each 5% price drop (4 levels total)
|
|
776
|
+
|
|
777
|
+
**Scale-Out** - Sell gradually at higher prices:
|
|
778
|
+
/swarm strategy scale-out <mint> <levels> <rise%>
|
|
779
|
+
Example: /swarm strategy scale-out ABC... 4 25
|
|
780
|
+
Sells 25% at +25%, +50%, +75%, +100%
|
|
781
|
+
|
|
782
|
+
**Snipe + Exit** - Fast entry with automatic TP/SL:
|
|
783
|
+
/swarm strategy snipe <mint> <sol> <tp%> <sl%>
|
|
784
|
+
Example: /swarm strategy snipe ABC... 0.5 50 20
|
|
785
|
+
Buys immediately, auto-sells at +50% profit or -20% loss
|
|
786
|
+
|
|
787
|
+
**TWAP** - Time-weighted average execution:
|
|
788
|
+
/swarm strategy twap <mint> <buy|sell> <total> <intervals> <delay>
|
|
789
|
+
Example: /swarm strategy twap ABC... buy 1.0 10 5m
|
|
790
|
+
Buys 0.1 SOL every 5 minutes, 10 times
|
|
791
|
+
|
|
792
|
+
**Ladder Buy** - Set multiple buy orders at price levels:
|
|
793
|
+
/swarm strategy ladder <mint> <total_sol> <levels> <drop%>
|
|
794
|
+
Example: /swarm strategy ladder ABC... 0.5 5 3
|
|
795
|
+
Buys at current, -3%, -6%, -9%, -12%
|
|
796
|
+
|
|
797
|
+
**Split** - Different wallets do different actions:
|
|
798
|
+
/swarm strategy split <mint> <buy_wallets> <sell_wallets> <buy_amt> <sell_amt>
|
|
799
|
+
Example: /swarm strategy split ABC... wallet_0,wallet_1 wallet_2,wallet_3 0.1 50%
|
|
800
|
+
Some wallets buy, others sell simultaneously
|
|
801
|
+
|
|
802
|
+
**Rotation** - Exit one token, enter another:
|
|
803
|
+
/swarm strategy rotation <exit_mint> <enter_mint> <sell%>
|
|
804
|
+
Example: /swarm strategy rotation ABC... XYZ... 100
|
|
805
|
+
Sells 100% of ABC, uses proceeds to buy XYZ
|
|
806
|
+
|
|
807
|
+
**Control:**
|
|
808
|
+
/swarm strategy list List active strategies
|
|
809
|
+
/swarm strategy cancel <id> Cancel a running strategy
|
|
810
|
+
/swarm strategy pause <id> Pause a strategy
|
|
811
|
+
/swarm strategy resume <id> Resume a paused strategy`;
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
async function handleStrategyScaleIn(args) {
|
|
815
|
+
if (args.length < 4) {
|
|
816
|
+
return `**Scale-In Strategy**
|
|
817
|
+
|
|
818
|
+
Buy gradually at lower price levels.
|
|
819
|
+
|
|
820
|
+
**Usage:** /swarm strategy scale-in <mint> <total_sol> <levels> <drop_percent>
|
|
821
|
+
|
|
822
|
+
**Parameters:**
|
|
823
|
+
mint Token mint address
|
|
824
|
+
total_sol Total SOL to spend across all levels
|
|
825
|
+
levels Number of buy levels (2-10)
|
|
826
|
+
drop_percent Price drop % between levels
|
|
827
|
+
|
|
828
|
+
**Example:**
|
|
829
|
+
/swarm strategy scale-in ABC... 1.0 4 5
|
|
830
|
+
|
|
831
|
+
Level 1: Buy 0.25 SOL now
|
|
832
|
+
Level 2: Buy 0.25 SOL if price drops 5%
|
|
833
|
+
Level 3: Buy 0.25 SOL if price drops 10%
|
|
834
|
+
Level 4: Buy 0.25 SOL if price drops 15%`;
|
|
835
|
+
}
|
|
836
|
+
const [mint, totalSolStr, levelsStr, dropStr] = args;
|
|
837
|
+
const totalSol = parseFloat(totalSolStr);
|
|
838
|
+
const levels = parseInt(levelsStr);
|
|
839
|
+
const dropPercent = parseFloat(dropStr);
|
|
840
|
+
if (isNaN(totalSol) || totalSol <= 0)
|
|
841
|
+
return 'β Invalid total SOL amount';
|
|
842
|
+
if (isNaN(levels) || levels < 2 || levels > 10)
|
|
843
|
+
return 'β Levels must be 2-10';
|
|
844
|
+
if (isNaN(dropPercent) || dropPercent <= 0)
|
|
845
|
+
return 'β Invalid drop percent';
|
|
846
|
+
// Build price levels
|
|
847
|
+
const priceLevels = [];
|
|
848
|
+
const percentPerLevel = 100 / levels;
|
|
849
|
+
for (let i = 0; i < levels; i++) {
|
|
850
|
+
priceLevels.push({ price: 100 - (i * dropPercent), percent: percentPerLevel });
|
|
851
|
+
}
|
|
852
|
+
const currentPrice = await fetchTokenPrice(mint);
|
|
853
|
+
const strategy = swarm_strategies_1.StrategyTemplates.scaleIn(mint, totalSol, priceLevels, currentPrice);
|
|
854
|
+
// Execute
|
|
855
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
856
|
+
const executor = new swarm_strategies_1.StrategyExecutor(swarm);
|
|
857
|
+
activeStrategies.set(strategy.id, { strategy, executor });
|
|
858
|
+
// Run async
|
|
859
|
+
executor.execute(strategy).then(result => {
|
|
860
|
+
activeStrategies.delete(strategy.id);
|
|
861
|
+
});
|
|
862
|
+
return `**Scale-In Strategy Started**
|
|
863
|
+
|
|
864
|
+
ID: \`${strategy.id}\`
|
|
865
|
+
Token: \`${mint.slice(0, 20)}...\`
|
|
866
|
+
Total: ${totalSol} SOL across ${levels} levels
|
|
867
|
+
Drop between levels: ${dropPercent}%
|
|
868
|
+
|
|
869
|
+
Strategy will buy:
|
|
870
|
+
${priceLevels.map((l, i) => ` Level ${i + 1}: ${(totalSol * l.percent / 100).toFixed(4)} SOL at ${i === 0 ? 'current price' : `-${i * dropPercent}%`}`).join('\n')}
|
|
871
|
+
|
|
872
|
+
Use \`/swarm strategy list\` to check status.
|
|
873
|
+
Use \`/swarm strategy cancel ${strategy.id.slice(0, 12)}\` to stop.`;
|
|
874
|
+
}
|
|
875
|
+
async function handleStrategyScaleOut(args) {
|
|
876
|
+
if (args.length < 3) {
|
|
877
|
+
return `**Scale-Out Strategy**
|
|
878
|
+
|
|
879
|
+
Sell gradually at higher price levels.
|
|
880
|
+
|
|
881
|
+
**Usage:** /swarm strategy scale-out <mint> <levels> <rise_percent>
|
|
882
|
+
|
|
883
|
+
**Example:**
|
|
884
|
+
/swarm strategy scale-out ABC... 4 25
|
|
885
|
+
Sells 25% at +25%, 25% at +50%, 25% at +75%, 25% at +100%`;
|
|
886
|
+
}
|
|
887
|
+
const [mint, levelsStr, riseStr] = args;
|
|
888
|
+
const levels = parseInt(levelsStr);
|
|
889
|
+
const risePercent = parseFloat(riseStr);
|
|
890
|
+
if (isNaN(levels) || levels < 2 || levels > 10)
|
|
891
|
+
return 'β Levels must be 2-10';
|
|
892
|
+
if (isNaN(risePercent) || risePercent <= 0)
|
|
893
|
+
return 'β Invalid rise percent';
|
|
894
|
+
const priceLevels = [];
|
|
895
|
+
const percentPerLevel = 100 / levels;
|
|
896
|
+
for (let i = 1; i <= levels; i++) {
|
|
897
|
+
priceLevels.push({ price: i * risePercent, percent: percentPerLevel });
|
|
898
|
+
}
|
|
899
|
+
const currentPrice = await fetchTokenPrice(mint);
|
|
900
|
+
const strategy = swarm_strategies_1.StrategyTemplates.scaleOut(mint, priceLevels, currentPrice);
|
|
901
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
902
|
+
const executor = new swarm_strategies_1.StrategyExecutor(swarm);
|
|
903
|
+
activeStrategies.set(strategy.id, { strategy, executor });
|
|
904
|
+
executor.execute(strategy).then(() => activeStrategies.delete(strategy.id));
|
|
905
|
+
return `**Scale-Out Strategy Started**
|
|
906
|
+
|
|
907
|
+
ID: \`${strategy.id}\`
|
|
908
|
+
Token: \`${mint.slice(0, 20)}...\`
|
|
909
|
+
Levels: ${levels} sell points
|
|
910
|
+
|
|
911
|
+
Will sell:
|
|
912
|
+
${priceLevels.map((l, i) => ` Level ${i + 1}: ${l.percent.toFixed(0)}% at +${l.price}%`).join('\n')}
|
|
913
|
+
|
|
914
|
+
Use \`/swarm strategy cancel ${strategy.id.slice(0, 12)}\` to stop.`;
|
|
915
|
+
}
|
|
916
|
+
async function handleStrategySnipe(args) {
|
|
917
|
+
if (args.length < 4) {
|
|
918
|
+
return `**Snipe + Exit Strategy**
|
|
919
|
+
|
|
920
|
+
Fast entry with automatic take-profit and stop-loss.
|
|
921
|
+
|
|
922
|
+
**Usage:** /swarm strategy snipe <mint> <sol> <tp_percent> <sl_percent>
|
|
923
|
+
|
|
924
|
+
**Example:**
|
|
925
|
+
/swarm strategy snipe ABC... 0.5 50 20
|
|
926
|
+
Buys 0.5 SOL immediately
|
|
927
|
+
Auto-sells all at +50% profit OR -20% loss (whichever hits first)`;
|
|
928
|
+
}
|
|
929
|
+
const [mint, solStr, tpStr, slStr] = args;
|
|
930
|
+
const sol = parseFloat(solStr);
|
|
931
|
+
const tp = parseFloat(tpStr);
|
|
932
|
+
const sl = parseFloat(slStr);
|
|
933
|
+
if (isNaN(sol) || sol <= 0)
|
|
934
|
+
return 'β Invalid SOL amount';
|
|
935
|
+
if (isNaN(tp) || tp <= 0)
|
|
936
|
+
return 'β Invalid take-profit percent';
|
|
937
|
+
if (isNaN(sl) || sl <= 0)
|
|
938
|
+
return 'β Invalid stop-loss percent';
|
|
939
|
+
const currentPrice = await fetchTokenPrice(mint);
|
|
940
|
+
const strategy = swarm_strategies_1.StrategyTemplates.snipeExit(mint, sol, tp, sl, currentPrice);
|
|
941
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
942
|
+
const executor = new swarm_strategies_1.StrategyExecutor(swarm);
|
|
943
|
+
activeStrategies.set(strategy.id, { strategy, executor });
|
|
944
|
+
executor.execute(strategy).then(() => activeStrategies.delete(strategy.id));
|
|
945
|
+
return `**Snipe + Exit Strategy Started**
|
|
946
|
+
|
|
947
|
+
ID: \`${strategy.id}\`
|
|
948
|
+
Token: \`${mint.slice(0, 20)}...\`
|
|
949
|
+
|
|
950
|
+
Entry: ${sol} SOL (executing now...)
|
|
951
|
+
Take Profit: +${tp}%
|
|
952
|
+
Stop Loss: -${sl}%
|
|
953
|
+
|
|
954
|
+
Strategy will auto-exit at whichever level hits first.`;
|
|
955
|
+
}
|
|
956
|
+
async function handleStrategyTWAP(args) {
|
|
957
|
+
if (args.length < 5) {
|
|
958
|
+
return `**TWAP Strategy**
|
|
959
|
+
|
|
960
|
+
Time-Weighted Average Price - split order over time.
|
|
961
|
+
|
|
962
|
+
**Usage:** /swarm strategy twap <mint> <buy|sell> <total_amount> <intervals> <delay>
|
|
963
|
+
|
|
964
|
+
**Delay formats:** 30s, 5m, 1h
|
|
965
|
+
|
|
966
|
+
**Example:**
|
|
967
|
+
/swarm strategy twap ABC... buy 1.0 10 5m
|
|
968
|
+
Buys 0.1 SOL every 5 minutes, 10 times total`;
|
|
969
|
+
}
|
|
970
|
+
const [mint, action, amountStr, intervalsStr, delayStr] = args;
|
|
971
|
+
const amount = parseFloat(amountStr);
|
|
972
|
+
const intervals = parseInt(intervalsStr);
|
|
973
|
+
if (!['buy', 'sell'].includes(action.toLowerCase()))
|
|
974
|
+
return 'β Action must be buy or sell';
|
|
975
|
+
if (isNaN(amount) || amount <= 0)
|
|
976
|
+
return 'β Invalid amount';
|
|
977
|
+
if (isNaN(intervals) || intervals < 2 || intervals > 100)
|
|
978
|
+
return 'β Intervals must be 2-100';
|
|
979
|
+
// Parse delay
|
|
980
|
+
let delayMs = 60000;
|
|
981
|
+
const delayMatch = delayStr.match(/^(\d+)(s|m|h)$/i);
|
|
982
|
+
if (delayMatch) {
|
|
983
|
+
const num = parseInt(delayMatch[1]);
|
|
984
|
+
const unit = delayMatch[2].toLowerCase();
|
|
985
|
+
if (unit === 's')
|
|
986
|
+
delayMs = num * 1000;
|
|
987
|
+
else if (unit === 'm')
|
|
988
|
+
delayMs = num * 60 * 1000;
|
|
989
|
+
else if (unit === 'h')
|
|
990
|
+
delayMs = num * 60 * 60 * 1000;
|
|
991
|
+
}
|
|
992
|
+
const strategy = swarm_strategies_1.StrategyTemplates.twap(mint, action.toLowerCase(), amount, intervals, delayMs);
|
|
993
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
994
|
+
const executor = new swarm_strategies_1.StrategyExecutor(swarm);
|
|
995
|
+
activeStrategies.set(strategy.id, { strategy, executor });
|
|
996
|
+
executor.execute(strategy).then(() => activeStrategies.delete(strategy.id));
|
|
997
|
+
const amountPer = amount / intervals;
|
|
998
|
+
const totalTime = (intervals - 1) * delayMs;
|
|
999
|
+
const totalTimeStr = totalTime >= 3600000
|
|
1000
|
+
? `${(totalTime / 3600000).toFixed(1)}h`
|
|
1001
|
+
: totalTime >= 60000
|
|
1002
|
+
? `${(totalTime / 60000).toFixed(0)}m`
|
|
1003
|
+
: `${(totalTime / 1000).toFixed(0)}s`;
|
|
1004
|
+
return `**TWAP Strategy Started**
|
|
1005
|
+
|
|
1006
|
+
ID: \`${strategy.id}\`
|
|
1007
|
+
Token: \`${mint.slice(0, 20)}...\`
|
|
1008
|
+
Action: ${action.toUpperCase()}
|
|
1009
|
+
Total: ${amount} ${action === 'buy' ? 'SOL' : 'tokens'}
|
|
1010
|
+
Intervals: ${intervals}
|
|
1011
|
+
Amount per interval: ${amountPer.toFixed(4)}
|
|
1012
|
+
Delay: ${delayStr}
|
|
1013
|
+
Total duration: ~${totalTimeStr}`;
|
|
1014
|
+
}
|
|
1015
|
+
async function handleStrategyLadder(args) {
|
|
1016
|
+
if (args.length < 4) {
|
|
1017
|
+
return `**Ladder Buy Strategy**
|
|
1018
|
+
|
|
1019
|
+
Set multiple buy orders at decreasing price levels.
|
|
1020
|
+
|
|
1021
|
+
**Usage:** /swarm strategy ladder <mint> <total_sol> <levels> <drop_percent>
|
|
1022
|
+
|
|
1023
|
+
**Example:**
|
|
1024
|
+
/swarm strategy ladder ABC... 0.5 5 3
|
|
1025
|
+
Sets buys at current, -3%, -6%, -9%, -12%`;
|
|
1026
|
+
}
|
|
1027
|
+
const [mint, totalSolStr, levelsStr, dropStr] = args;
|
|
1028
|
+
const totalSol = parseFloat(totalSolStr);
|
|
1029
|
+
const levels = parseInt(levelsStr);
|
|
1030
|
+
const dropPercent = parseFloat(dropStr);
|
|
1031
|
+
if (isNaN(totalSol) || totalSol <= 0)
|
|
1032
|
+
return 'β Invalid total SOL';
|
|
1033
|
+
if (isNaN(levels) || levels < 2 || levels > 10)
|
|
1034
|
+
return 'β Levels must be 2-10';
|
|
1035
|
+
if (isNaN(dropPercent) || dropPercent <= 0)
|
|
1036
|
+
return 'β Invalid drop percent';
|
|
1037
|
+
const currentPrice = await fetchTokenPrice(mint);
|
|
1038
|
+
const strategy = swarm_strategies_1.StrategyTemplates.ladderBuy(mint, totalSol, levels, dropPercent, currentPrice);
|
|
1039
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
1040
|
+
const executor = new swarm_strategies_1.StrategyExecutor(swarm);
|
|
1041
|
+
activeStrategies.set(strategy.id, { strategy, executor });
|
|
1042
|
+
executor.execute(strategy).then(() => activeStrategies.delete(strategy.id));
|
|
1043
|
+
return `**Ladder Buy Strategy Started**
|
|
1044
|
+
|
|
1045
|
+
ID: \`${strategy.id}\`
|
|
1046
|
+
Token: \`${mint.slice(0, 20)}...\`
|
|
1047
|
+
Total: ${totalSol} SOL
|
|
1048
|
+
Levels: ${levels}
|
|
1049
|
+
Drop per level: ${dropPercent}%
|
|
1050
|
+
|
|
1051
|
+
Buying ${(totalSol / levels).toFixed(4)} SOL at each level.`;
|
|
1052
|
+
}
|
|
1053
|
+
async function handleStrategyDCA(args) {
|
|
1054
|
+
if (args.length < 4) {
|
|
1055
|
+
return `**Smart DCA Strategy**
|
|
1056
|
+
|
|
1057
|
+
Dollar-cost average with time delays.
|
|
1058
|
+
|
|
1059
|
+
**Usage:** /swarm strategy dca-smart <mint> <amount_per_buy> <count> <interval>
|
|
1060
|
+
|
|
1061
|
+
**Example:**
|
|
1062
|
+
/swarm strategy dca-smart ABC... 0.1 10 1h
|
|
1063
|
+
Buys 0.1 SOL every hour, 10 times`;
|
|
1064
|
+
}
|
|
1065
|
+
const [mint, amountStr, countStr, intervalStr] = args;
|
|
1066
|
+
const amount = parseFloat(amountStr);
|
|
1067
|
+
const count = parseInt(countStr);
|
|
1068
|
+
if (isNaN(amount) || amount <= 0)
|
|
1069
|
+
return 'β Invalid amount';
|
|
1070
|
+
if (isNaN(count) || count < 2 || count > 100)
|
|
1071
|
+
return 'β Count must be 2-100';
|
|
1072
|
+
let intervalMs = 3600000;
|
|
1073
|
+
const match = intervalStr.match(/^(\d+)(s|m|h)$/i);
|
|
1074
|
+
if (match) {
|
|
1075
|
+
const num = parseInt(match[1]);
|
|
1076
|
+
const unit = match[2].toLowerCase();
|
|
1077
|
+
if (unit === 's')
|
|
1078
|
+
intervalMs = num * 1000;
|
|
1079
|
+
else if (unit === 'm')
|
|
1080
|
+
intervalMs = num * 60 * 1000;
|
|
1081
|
+
else if (unit === 'h')
|
|
1082
|
+
intervalMs = num * 60 * 60 * 1000;
|
|
1083
|
+
}
|
|
1084
|
+
const strategy = swarm_strategies_1.StrategyTemplates.dca(mint, amount, count, intervalMs);
|
|
1085
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
1086
|
+
const executor = new swarm_strategies_1.StrategyExecutor(swarm);
|
|
1087
|
+
activeStrategies.set(strategy.id, { strategy, executor });
|
|
1088
|
+
executor.execute(strategy).then(() => activeStrategies.delete(strategy.id));
|
|
1089
|
+
return `**Smart DCA Strategy Started**
|
|
1090
|
+
|
|
1091
|
+
ID: \`${strategy.id}\`
|
|
1092
|
+
Token: \`${mint.slice(0, 20)}...\`
|
|
1093
|
+
Amount per buy: ${amount} SOL
|
|
1094
|
+
Total buys: ${count}
|
|
1095
|
+
Interval: ${intervalStr}
|
|
1096
|
+
Total investment: ${(amount * count).toFixed(4)} SOL`;
|
|
1097
|
+
}
|
|
1098
|
+
async function handleStrategySplit(args) {
|
|
1099
|
+
if (args.length < 5) {
|
|
1100
|
+
return `**Split Strategy**
|
|
1101
|
+
|
|
1102
|
+
Different wallets execute different actions simultaneously.
|
|
1103
|
+
|
|
1104
|
+
**Usage:** /swarm strategy split <mint> <buy_wallets> <sell_wallets> <buy_amount> <sell_amount>
|
|
1105
|
+
|
|
1106
|
+
**Example:**
|
|
1107
|
+
/swarm strategy split ABC... wallet_0,wallet_1 wallet_2,wallet_3 0.1 50%
|
|
1108
|
+
Wallets 0,1 buy 0.1 SOL each while wallets 2,3 sell 50%`;
|
|
1109
|
+
}
|
|
1110
|
+
const [mint, buyWalletsStr, sellWalletsStr, buyAmtStr, sellAmtStr] = args;
|
|
1111
|
+
const buyWallets = buyWalletsStr.split(',').map(s => s.trim());
|
|
1112
|
+
const sellWallets = sellWalletsStr.split(',').map(s => s.trim());
|
|
1113
|
+
const buyAmount = parseFloat(buyAmtStr);
|
|
1114
|
+
const sellAmount = parseFloat(sellAmtStr.replace('%', ''));
|
|
1115
|
+
if (isNaN(buyAmount))
|
|
1116
|
+
return 'β Invalid buy amount';
|
|
1117
|
+
if (isNaN(sellAmount))
|
|
1118
|
+
return 'β Invalid sell amount';
|
|
1119
|
+
const strategy = swarm_strategies_1.StrategyTemplates.split(mint, buyWallets, sellWallets, buyAmount, sellAmount);
|
|
1120
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
1121
|
+
const executor = new swarm_strategies_1.StrategyExecutor(swarm);
|
|
1122
|
+
activeStrategies.set(strategy.id, { strategy, executor });
|
|
1123
|
+
executor.execute(strategy).then(() => activeStrategies.delete(strategy.id));
|
|
1124
|
+
return `**Split Strategy Started**
|
|
1125
|
+
|
|
1126
|
+
ID: \`${strategy.id}\`
|
|
1127
|
+
Token: \`${mint.slice(0, 20)}...\`
|
|
1128
|
+
|
|
1129
|
+
Buy wallets: ${buyWallets.join(', ')} (${buyAmount} SOL each)
|
|
1130
|
+
Sell wallets: ${sellWallets.join(', ')} (${sellAmtStr} each)
|
|
1131
|
+
|
|
1132
|
+
Executing simultaneously...`;
|
|
1133
|
+
}
|
|
1134
|
+
async function handleStrategyRotation(args) {
|
|
1135
|
+
if (args.length < 3) {
|
|
1136
|
+
return `**Rotation Strategy**
|
|
1137
|
+
|
|
1138
|
+
Exit one token and enter another atomically.
|
|
1139
|
+
|
|
1140
|
+
**Usage:** /swarm strategy rotation <exit_mint> <enter_mint> <sell_percent>
|
|
1141
|
+
|
|
1142
|
+
**Example:**
|
|
1143
|
+
/swarm strategy rotation ABC... XYZ... 100
|
|
1144
|
+
Sells 100% of ABC, immediately buys XYZ with proceeds`;
|
|
1145
|
+
}
|
|
1146
|
+
const [exitMint, enterMint, sellPctStr] = args;
|
|
1147
|
+
const sellPercent = parseFloat(sellPctStr);
|
|
1148
|
+
if (isNaN(sellPercent) || sellPercent <= 0 || sellPercent > 100) {
|
|
1149
|
+
return 'β Sell percent must be 1-100';
|
|
1150
|
+
}
|
|
1151
|
+
const strategy = swarm_strategies_1.StrategyTemplates.rotation(exitMint, enterMint, sellPercent);
|
|
1152
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
1153
|
+
const executor = new swarm_strategies_1.StrategyExecutor(swarm);
|
|
1154
|
+
activeStrategies.set(strategy.id, { strategy, executor });
|
|
1155
|
+
executor.execute(strategy).then(() => activeStrategies.delete(strategy.id));
|
|
1156
|
+
return `**Rotation Strategy Started**
|
|
1157
|
+
|
|
1158
|
+
ID: \`${strategy.id}\`
|
|
1159
|
+
|
|
1160
|
+
Step 1: Sell ${sellPercent}% of \`${exitMint.slice(0, 16)}...\`
|
|
1161
|
+
Step 2: Buy \`${enterMint.slice(0, 16)}...\` with proceeds
|
|
1162
|
+
|
|
1163
|
+
Executing...`;
|
|
1164
|
+
}
|
|
1165
|
+
function handleStrategyList() {
|
|
1166
|
+
if (activeStrategies.size === 0) {
|
|
1167
|
+
return '**No Active Strategies**\n\nUse `/swarm strategy` to see available strategy types.';
|
|
1168
|
+
}
|
|
1169
|
+
let output = `**Active Strategies (${activeStrategies.size})**\n\n`;
|
|
1170
|
+
for (const [id, { strategy }] of activeStrategies) {
|
|
1171
|
+
const elapsed = strategy.startedAt ? Math.round((Date.now() - strategy.startedAt) / 1000) : 0;
|
|
1172
|
+
const completedSteps = strategy.steps.filter(s => s.completed).length;
|
|
1173
|
+
output += `**${strategy.name}** (\`${id.slice(0, 16)}...\`)\n`;
|
|
1174
|
+
output += ` Type: ${strategy.type}\n`;
|
|
1175
|
+
output += ` Token: \`${strategy.mint.slice(0, 16)}...\`\n`;
|
|
1176
|
+
output += ` Status: ${strategy.status}\n`;
|
|
1177
|
+
output += ` Progress: ${completedSteps}/${strategy.steps.length} steps\n`;
|
|
1178
|
+
output += ` Running: ${elapsed}s\n\n`;
|
|
1179
|
+
}
|
|
1180
|
+
return output;
|
|
1181
|
+
}
|
|
1182
|
+
function handleStrategyCancel(idPrefix) {
|
|
1183
|
+
if (!idPrefix)
|
|
1184
|
+
return 'Usage: /swarm strategy cancel <strategy_id>';
|
|
1185
|
+
for (const [id, { executor }] of activeStrategies) {
|
|
1186
|
+
if (id.startsWith(idPrefix) || id.includes(idPrefix)) {
|
|
1187
|
+
executor.cancel(id);
|
|
1188
|
+
activeStrategies.delete(id);
|
|
1189
|
+
return `β
Strategy \`${id}\` cancelled.`;
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
return `β No active strategy found matching "${idPrefix}"`;
|
|
1193
|
+
}
|
|
1194
|
+
function handleStrategyPause(idPrefix) {
|
|
1195
|
+
if (!idPrefix)
|
|
1196
|
+
return 'Usage: /swarm strategy pause <strategy_id>';
|
|
1197
|
+
for (const [id, { executor }] of activeStrategies) {
|
|
1198
|
+
if (id.startsWith(idPrefix) || id.includes(idPrefix)) {
|
|
1199
|
+
if (executor.pause(id)) {
|
|
1200
|
+
return `βΈοΈ Strategy \`${id}\` paused.`;
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
return `β No active strategy found matching "${idPrefix}"`;
|
|
1205
|
+
}
|
|
1206
|
+
function handleStrategyResume(idPrefix) {
|
|
1207
|
+
if (!idPrefix)
|
|
1208
|
+
return 'Usage: /swarm strategy resume <strategy_id>';
|
|
1209
|
+
for (const [id, { executor }] of activeStrategies) {
|
|
1210
|
+
if (id.startsWith(idPrefix) || id.includes(idPrefix)) {
|
|
1211
|
+
if (executor.resume(id)) {
|
|
1212
|
+
return `βΆοΈ Strategy \`${id}\` resumed.`;
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
return `β No paused strategy found matching "${idPrefix}"`;
|
|
1217
|
+
}
|
|
1218
|
+
async function handleHelp() {
|
|
1219
|
+
return `**Pump.fun Swarm Trading**
|
|
1220
|
+
|
|
1221
|
+
Coordinate up to 20 wallets for synchronized trading.
|
|
1222
|
+
|
|
1223
|
+
**Wallet Management:**
|
|
1224
|
+
/swarm wallets List all swarm wallets
|
|
1225
|
+
/swarm balances Refresh SOL balances from chain
|
|
1226
|
+
/swarm enable <id> Enable wallet for trading
|
|
1227
|
+
/swarm disable <id> Disable wallet
|
|
1228
|
+
/swarm status [mints...] Full swarm status
|
|
1229
|
+
|
|
1230
|
+
**SOL Management:**
|
|
1231
|
+
/swarm distribute <sol> Distribute SOL to all wallets
|
|
1232
|
+
/swarm consolidate Collect all SOL to main wallet
|
|
1233
|
+
/swarm consolidate-tokens <mint> Move all tokens to main wallet
|
|
1234
|
+
|
|
1235
|
+
**Trading:**
|
|
1236
|
+
/swarm buy <mint> <sol> Buy on all enabled wallets
|
|
1237
|
+
/swarm sell <mint> <amt|%> Sell from all wallets with positions
|
|
1238
|
+
/swarm quote <mint> <sol> Get quotes without executing
|
|
1239
|
+
/swarm simulate <mint> <sol> Simulate trade (dry run)
|
|
1240
|
+
|
|
1241
|
+
**Position Management:**
|
|
1242
|
+
/swarm position <mint> Check cached positions
|
|
1243
|
+
/swarm refresh <mint> Fetch fresh positions from chain
|
|
1244
|
+
/swarm rebalance <mint> Equalize positions across wallets
|
|
1245
|
+
|
|
1246
|
+
**Risk Management:**
|
|
1247
|
+
/swarm stop-loss <mint> <price> <pct> Set stop loss
|
|
1248
|
+
/swarm take-profit <mint> <price> <pct> Set take profit
|
|
1249
|
+
/swarm triggers List active triggers
|
|
1250
|
+
/swarm remove-trigger <mint> <type> Remove a trigger
|
|
1251
|
+
|
|
1252
|
+
**DCA (Dollar Cost Averaging):**
|
|
1253
|
+
/swarm dca <mint> <sol> <interval> <count> Schedule DCA buys
|
|
1254
|
+
/swarm dca-list List active DCAs
|
|
1255
|
+
/swarm dca-cancel <id> Cancel a DCA schedule
|
|
1256
|
+
|
|
1257
|
+
**History:**
|
|
1258
|
+
/swarm history [--mint <m>] [--wallet <w>] [--limit <n>]
|
|
1259
|
+
|
|
1260
|
+
**Presets:**
|
|
1261
|
+
/swarm preset save <name> Save a trading preset
|
|
1262
|
+
/swarm preset list List saved presets
|
|
1263
|
+
/swarm preset show <name> Show preset details
|
|
1264
|
+
/swarm preset delete <name> Delete a preset
|
|
1265
|
+
|
|
1266
|
+
**Smart Strategies (Multi-Step):**
|
|
1267
|
+
/swarm strategy Show all strategy types
|
|
1268
|
+
/swarm strategy scale-in ... Buy at multiple price dips
|
|
1269
|
+
/swarm strategy scale-out ... Sell at multiple price rises
|
|
1270
|
+
/swarm strategy snipe ... Fast buy with auto TP/SL
|
|
1271
|
+
/swarm strategy twap ... Time-weighted execution
|
|
1272
|
+
/swarm strategy ladder ... Ladder buy at price levels
|
|
1273
|
+
/swarm strategy split ... Different wallets buy/sell
|
|
1274
|
+
/swarm strategy rotation ... Exit one token, enter another
|
|
1275
|
+
/swarm strategy list List active strategies
|
|
1276
|
+
/swarm strategy cancel <id> Cancel a running strategy
|
|
1277
|
+
|
|
1278
|
+
**Copytrading (Amplified Wallet Following):**
|
|
1279
|
+
/swarm copy add <address> [options] Follow a wallet with all swarm wallets
|
|
1280
|
+
/swarm copy list List copied wallets
|
|
1281
|
+
/swarm copy remove <id> Stop copying
|
|
1282
|
+
/swarm copy stats [id] View copy statistics
|
|
1283
|
+
|
|
1284
|
+
**Execution Modes:**
|
|
1285
|
+
--parallel All wallets in parallel (fastest)
|
|
1286
|
+
--bundle Single Jito bundle (atomic, max 5)
|
|
1287
|
+
--multi-bundle Multiple Jito bundles (6-20 wallets)
|
|
1288
|
+
--sequential Staggered execution (stealthy)
|
|
1289
|
+
|
|
1290
|
+
**Multi-DEX Support:**
|
|
1291
|
+
--dex pumpfun Pump.fun via PumpPortal (default)
|
|
1292
|
+
--dex bags Bags.fm (requires BAGS_API_KEY)
|
|
1293
|
+
--dex meteora Meteora DLMM pools
|
|
1294
|
+
|
|
1295
|
+
**Examples:**
|
|
1296
|
+
/swarm distribute 0.1 # Send 0.1 SOL to each wallet
|
|
1297
|
+
/swarm buy ABC... 0.1 --preset stealth # Buy with preset
|
|
1298
|
+
/swarm buy ABC... 0.1 --dex bags # Buy on Bags.fm
|
|
1299
|
+
/swarm copy add 7xKX... --multiplier 2 # Copy wallet with 2x size
|
|
1300
|
+
/swarm stop-loss ABC... 0.00001 50 # Sell 50% if price drops
|
|
1301
|
+
/swarm strategy snipe ABC... 0.5 50 20 # Snipe with 50% TP, 20% SL`;
|
|
1302
|
+
}
|
|
1303
|
+
// ============================================================================
|
|
1304
|
+
// SOL Distribution & Consolidation Handlers
|
|
1305
|
+
// ============================================================================
|
|
1306
|
+
async function handleDistribute(args) {
|
|
1307
|
+
if (args.length < 1) {
|
|
1308
|
+
return `**Usage:** /swarm distribute <sol_per_wallet> [--from <wallet_id>]
|
|
1309
|
+
|
|
1310
|
+
Distribute SOL from main wallet to all enabled wallets.
|
|
1311
|
+
|
|
1312
|
+
**Examples:**
|
|
1313
|
+
/swarm distribute 0.1 # Send 0.1 SOL to each wallet
|
|
1314
|
+
/swarm distribute 0.5 --from wallet_0`;
|
|
1315
|
+
}
|
|
1316
|
+
const amount = parseFloat(args[0]);
|
|
1317
|
+
if (isNaN(amount) || amount <= 0) {
|
|
1318
|
+
return 'β Invalid amount. Must be a positive number.';
|
|
1319
|
+
}
|
|
1320
|
+
let fromWallet = 'wallet_0';
|
|
1321
|
+
for (let i = 1; i < args.length; i++) {
|
|
1322
|
+
if (args[i] === '--from' && args[i + 1]) {
|
|
1323
|
+
fromWallet = args[++i];
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
1327
|
+
const result = await swarm.distributeSOL(amount, fromWallet);
|
|
1328
|
+
let output = `**SOL Distribution**\n\n`;
|
|
1329
|
+
output += `From: ${result.fromWallet}\n`;
|
|
1330
|
+
output += `Amount per wallet: ${formatSol(amount)} SOL\n`;
|
|
1331
|
+
output += `Status: ${result.success ? 'β
Success' : 'β Failed'}\n`;
|
|
1332
|
+
output += `Total distributed: ${formatSol(result.totalDistributed)} SOL\n\n`;
|
|
1333
|
+
if (result.distributions.length > 0) {
|
|
1334
|
+
output += `**Transfers:**\n`;
|
|
1335
|
+
for (const d of result.distributions) {
|
|
1336
|
+
if (d.signature) {
|
|
1337
|
+
output += `β
${d.toWallet}: ${formatSol(d.amount)} SOL\n`;
|
|
1338
|
+
}
|
|
1339
|
+
else {
|
|
1340
|
+
output += `β ${d.toWallet}: ${d.error}\n`;
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
if (result.errors && result.errors.length > 0) {
|
|
1345
|
+
output += `\n**Errors:**\n`;
|
|
1346
|
+
for (const err of result.errors) {
|
|
1347
|
+
output += ` - ${err}\n`;
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
return output;
|
|
1351
|
+
}
|
|
1352
|
+
async function handleConsolidate(args) {
|
|
1353
|
+
let toWallet = 'wallet_0';
|
|
1354
|
+
let leaveAmount = 0.005;
|
|
1355
|
+
for (let i = 0; i < args.length; i++) {
|
|
1356
|
+
if (args[i] === '--to' && args[i + 1]) {
|
|
1357
|
+
toWallet = args[++i];
|
|
1358
|
+
}
|
|
1359
|
+
else if (args[i] === '--leave' && args[i + 1]) {
|
|
1360
|
+
leaveAmount = parseFloat(args[++i]);
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
1364
|
+
const result = await swarm.consolidateSOL(toWallet, leaveAmount);
|
|
1365
|
+
let output = `**SOL Consolidation**\n\n`;
|
|
1366
|
+
output += `To: ${result.toWallet}\n`;
|
|
1367
|
+
output += `Leave per wallet: ${formatSol(leaveAmount)} SOL\n`;
|
|
1368
|
+
output += `Status: ${result.success ? 'β
Success' : 'β Failed'}\n`;
|
|
1369
|
+
output += `Total consolidated: ${formatSol(result.totalConsolidated)} SOL\n\n`;
|
|
1370
|
+
if (result.consolidations.length > 0) {
|
|
1371
|
+
output += `**Transfers:**\n`;
|
|
1372
|
+
for (const c of result.consolidations) {
|
|
1373
|
+
if (c.signature) {
|
|
1374
|
+
output += `β
${c.fromWallet}: ${formatSol(c.amount)} SOL\n`;
|
|
1375
|
+
}
|
|
1376
|
+
else {
|
|
1377
|
+
output += `β ${c.fromWallet}: ${c.error}\n`;
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
return output;
|
|
1382
|
+
}
|
|
1383
|
+
async function handleConsolidateTokens(mint) {
|
|
1384
|
+
if (!mint) {
|
|
1385
|
+
return `**Usage:** /swarm consolidate-tokens <mint> [--to <wallet_id>]
|
|
1386
|
+
|
|
1387
|
+
Move all tokens of a specific mint to one wallet (sells from others).`;
|
|
1388
|
+
}
|
|
1389
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
1390
|
+
const result = await swarm.consolidateTokens(mint);
|
|
1391
|
+
let output = `**Token Consolidation**\n\n`;
|
|
1392
|
+
output += `Token: \`${mint.slice(0, 20)}...\`\n`;
|
|
1393
|
+
output += `To: ${result.toWallet}\n`;
|
|
1394
|
+
output += `Status: ${result.success ? 'β
Success' : 'β Failed'}\n`;
|
|
1395
|
+
output += `Total: ${formatTokens(result.totalConsolidated)} tokens\n\n`;
|
|
1396
|
+
if (result.consolidations.length > 0) {
|
|
1397
|
+
output += `**Transfers:**\n`;
|
|
1398
|
+
for (const c of result.consolidations) {
|
|
1399
|
+
if (c.signature) {
|
|
1400
|
+
output += `β
${c.fromWallet}: ${formatTokens(c.amount)}\n`;
|
|
1401
|
+
}
|
|
1402
|
+
else {
|
|
1403
|
+
output += `β ${c.fromWallet}: ${c.error}\n`;
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
return output;
|
|
1408
|
+
}
|
|
1409
|
+
// ============================================================================
|
|
1410
|
+
// Status & Quote Handlers
|
|
1411
|
+
// ============================================================================
|
|
1412
|
+
async function handleStatus(mints) {
|
|
1413
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
1414
|
+
const status = await swarm.getSwarmStatus(mints.length > 0 ? mints : undefined);
|
|
1415
|
+
let output = `**Swarm Status**\n\n`;
|
|
1416
|
+
output += `Wallets: ${status.enabledWallets}/${status.totalWallets} enabled\n`;
|
|
1417
|
+
output += `Total SOL: ${formatSol(status.totalSolBalance)}\n\n`;
|
|
1418
|
+
output += `**Balances:**\n`;
|
|
1419
|
+
for (const [id, balance] of status.balanceByWallet) {
|
|
1420
|
+
const wallet = swarm.getWallet(id);
|
|
1421
|
+
const statusIcon = wallet?.enabled ? 'π’' : 'π΄';
|
|
1422
|
+
output += `${statusIcon} ${id}: ${formatSol(balance)} SOL\n`;
|
|
1423
|
+
}
|
|
1424
|
+
if (status.positions.size > 0) {
|
|
1425
|
+
output += `\n**Positions:**\n`;
|
|
1426
|
+
for (const [mint, pos] of status.positions) {
|
|
1427
|
+
output += `\`${mint.slice(0, 16)}...\`: ${formatTokens(pos.totalTokens)} total\n`;
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
return output;
|
|
1431
|
+
}
|
|
1432
|
+
async function handleQuote(args) {
|
|
1433
|
+
if (args.length < 2) {
|
|
1434
|
+
return `**Usage:** /swarm quote <mint> <sol_per_wallet> [--wallets <ids>]
|
|
1435
|
+
|
|
1436
|
+
Get quotes without executing trades.`;
|
|
1437
|
+
}
|
|
1438
|
+
const mint = args[0];
|
|
1439
|
+
const amount = parseFloat(args[1]);
|
|
1440
|
+
if (isNaN(amount) || amount <= 0) {
|
|
1441
|
+
return 'β Invalid amount.';
|
|
1442
|
+
}
|
|
1443
|
+
let walletIds;
|
|
1444
|
+
for (let i = 2; i < args.length; i++) {
|
|
1445
|
+
if (args[i] === '--wallets' && args[i + 1]) {
|
|
1446
|
+
walletIds = parseWalletIds(args[++i]);
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
1450
|
+
const result = await swarm.coordinatedQuote({
|
|
1451
|
+
mint,
|
|
1452
|
+
action: 'buy',
|
|
1453
|
+
amountPerWallet: amount,
|
|
1454
|
+
denominatedInSol: true,
|
|
1455
|
+
walletIds,
|
|
1456
|
+
});
|
|
1457
|
+
let output = `**Swarm Quote**\n\n`;
|
|
1458
|
+
output += `Token: \`${mint.slice(0, 20)}...\`\n`;
|
|
1459
|
+
output += `Total Input: ${formatSol(result.totalInput)} SOL\n`;
|
|
1460
|
+
output += `Total Output: ${formatTokens(result.totalOutput)} tokens\n`;
|
|
1461
|
+
if (result.avgPriceImpact !== undefined) {
|
|
1462
|
+
output += `Avg Price Impact: ${result.avgPriceImpact.toFixed(2)}%\n`;
|
|
1463
|
+
}
|
|
1464
|
+
output += `\n**Per Wallet:**\n`;
|
|
1465
|
+
for (const q of result.quotes) {
|
|
1466
|
+
if (q.error) {
|
|
1467
|
+
output += `β ${q.walletId}: ${q.error}\n`;
|
|
1468
|
+
}
|
|
1469
|
+
else {
|
|
1470
|
+
output += `β
${q.walletId}: ${formatSol(q.inputAmount)} β ${formatTokens(q.outputAmount)}`;
|
|
1471
|
+
if (q.priceImpact !== undefined) {
|
|
1472
|
+
output += ` (${q.priceImpact.toFixed(2)}% impact)`;
|
|
1473
|
+
}
|
|
1474
|
+
output += `\n`;
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
return output;
|
|
1478
|
+
}
|
|
1479
|
+
async function handleSimulate(args) {
|
|
1480
|
+
if (args.length < 2) {
|
|
1481
|
+
return `**Usage:** /swarm simulate <mint> <sol> [options]
|
|
1482
|
+
|
|
1483
|
+
Simulate a trade without executing. Shows what would happen.`;
|
|
1484
|
+
}
|
|
1485
|
+
const mint = args[0];
|
|
1486
|
+
const amount = parseFloat(args[1]);
|
|
1487
|
+
const action = args.includes('--sell') ? 'sell' : 'buy';
|
|
1488
|
+
if (isNaN(amount) || amount <= 0) {
|
|
1489
|
+
return 'β Invalid amount.';
|
|
1490
|
+
}
|
|
1491
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
1492
|
+
const result = await swarm.simulate({
|
|
1493
|
+
mint,
|
|
1494
|
+
action,
|
|
1495
|
+
amountPerWallet: action === 'sell' ? `${amount}%` : amount,
|
|
1496
|
+
denominatedInSol: action === 'buy',
|
|
1497
|
+
});
|
|
1498
|
+
let output = `**Simulation Result**\n\n`;
|
|
1499
|
+
output += `Would succeed: ${result.wouldSucceed ? 'β
Yes' : 'β No'}\n`;
|
|
1500
|
+
output += `Wallets used: ${result.walletsUsed}\n`;
|
|
1501
|
+
if (result.estimatedTotalSol > 0) {
|
|
1502
|
+
output += `Est. SOL: ${formatSol(result.estimatedTotalSol)}\n`;
|
|
1503
|
+
}
|
|
1504
|
+
if (result.estimatedTotalTokens) {
|
|
1505
|
+
output += `Est. Tokens: ${formatTokens(result.estimatedTotalTokens)}\n`;
|
|
1506
|
+
}
|
|
1507
|
+
output += `Est. Fees: ${formatSol(result.estimatedFees)} SOL\n`;
|
|
1508
|
+
if (result.warnings.length > 0) {
|
|
1509
|
+
output += `\n**Warnings:**\n`;
|
|
1510
|
+
for (const w of result.warnings) {
|
|
1511
|
+
output += ` β οΈ ${w}\n`;
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
if (result.errors.length > 0) {
|
|
1515
|
+
output += `\n**Errors:**\n`;
|
|
1516
|
+
for (const e of result.errors) {
|
|
1517
|
+
output += ` β ${e}\n`;
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
return output;
|
|
1521
|
+
}
|
|
1522
|
+
// ============================================================================
|
|
1523
|
+
// Stop Loss & Take Profit Handlers
|
|
1524
|
+
// ============================================================================
|
|
1525
|
+
async function handleStopLoss(args) {
|
|
1526
|
+
if (args.length < 3) {
|
|
1527
|
+
return `**Usage:** /swarm stop-loss <mint> <trigger_price> <sell_percent> [options]
|
|
1528
|
+
|
|
1529
|
+
Set a stop loss that automatically sells when price drops.
|
|
1530
|
+
|
|
1531
|
+
**Options:**
|
|
1532
|
+
--dex <dex> DEX to use: pumpfun (default), bags, meteora
|
|
1533
|
+
--pool-address <addr> Specific pool address (for Meteora)
|
|
1534
|
+
|
|
1535
|
+
**Examples:**
|
|
1536
|
+
/swarm stop-loss ABC... 0.00001 100 # Sell 100% if price drops to 0.00001
|
|
1537
|
+
/swarm stop-loss ABC... 0.00002 50 --dex bags # Sell on Bags.fm`;
|
|
1538
|
+
}
|
|
1539
|
+
const mint = args[0];
|
|
1540
|
+
const triggerPrice = parseFloat(args[1]);
|
|
1541
|
+
const sellPercent = parseFloat(args[2]);
|
|
1542
|
+
// Parse options
|
|
1543
|
+
let dex;
|
|
1544
|
+
let poolAddress;
|
|
1545
|
+
for (let i = 3; i < args.length; i++) {
|
|
1546
|
+
if (args[i] === '--dex' && args[i + 1]) {
|
|
1547
|
+
const d = args[++i].toLowerCase();
|
|
1548
|
+
if (d === 'pumpfun' || d === 'bags' || d === 'meteora') {
|
|
1549
|
+
dex = d;
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
else if (args[i] === '--pool-address' && args[i + 1]) {
|
|
1553
|
+
poolAddress = args[++i];
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
if (isNaN(triggerPrice) || triggerPrice <= 0) {
|
|
1557
|
+
return 'β Invalid trigger price.';
|
|
1558
|
+
}
|
|
1559
|
+
if (isNaN(sellPercent) || sellPercent <= 0 || sellPercent > 100) {
|
|
1560
|
+
return 'β Sell percent must be between 1 and 100.';
|
|
1561
|
+
}
|
|
1562
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
1563
|
+
swarm.setStopLoss({
|
|
1564
|
+
mint,
|
|
1565
|
+
triggerPrice,
|
|
1566
|
+
sellPercent,
|
|
1567
|
+
enabled: true,
|
|
1568
|
+
dex,
|
|
1569
|
+
poolAddress,
|
|
1570
|
+
});
|
|
1571
|
+
return `β
**Stop Loss Set**
|
|
1572
|
+
|
|
1573
|
+
Token: \`${mint.slice(0, 20)}...\`
|
|
1574
|
+
Trigger: ${triggerPrice}
|
|
1575
|
+
Sell: ${sellPercent}%${dex ? `\nDEX: ${dex}` : ''}
|
|
1576
|
+
|
|
1577
|
+
_Monitoring active. Will auto-sell if price drops to trigger._`;
|
|
1578
|
+
}
|
|
1579
|
+
async function handleTakeProfit(args) {
|
|
1580
|
+
if (args.length < 3) {
|
|
1581
|
+
return `**Usage:** /swarm take-profit <mint> <trigger_price> <sell_percent> [options]
|
|
1582
|
+
|
|
1583
|
+
Set a take profit that automatically sells when price rises.
|
|
1584
|
+
|
|
1585
|
+
**Options:**
|
|
1586
|
+
--dex <dex> DEX to use: pumpfun (default), bags, meteora
|
|
1587
|
+
--pool-address <addr> Specific pool address (for Meteora)
|
|
1588
|
+
|
|
1589
|
+
**Examples:**
|
|
1590
|
+
/swarm take-profit ABC... 0.001 50 # Sell 50% when price hits 0.001
|
|
1591
|
+
/swarm take-profit ABC... 0.002 100 --dex bags # Sell on Bags.fm`;
|
|
1592
|
+
}
|
|
1593
|
+
const mint = args[0];
|
|
1594
|
+
const triggerPrice = parseFloat(args[1]);
|
|
1595
|
+
const sellPercent = parseFloat(args[2]);
|
|
1596
|
+
// Parse options
|
|
1597
|
+
let dex;
|
|
1598
|
+
let poolAddress;
|
|
1599
|
+
for (let i = 3; i < args.length; i++) {
|
|
1600
|
+
if (args[i] === '--dex' && args[i + 1]) {
|
|
1601
|
+
const d = args[++i].toLowerCase();
|
|
1602
|
+
if (d === 'pumpfun' || d === 'bags' || d === 'meteora') {
|
|
1603
|
+
dex = d;
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
else if (args[i] === '--pool-address' && args[i + 1]) {
|
|
1607
|
+
poolAddress = args[++i];
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1610
|
+
if (isNaN(triggerPrice) || triggerPrice <= 0) {
|
|
1611
|
+
return 'β Invalid trigger price.';
|
|
1612
|
+
}
|
|
1613
|
+
if (isNaN(sellPercent) || sellPercent <= 0 || sellPercent > 100) {
|
|
1614
|
+
return 'β Sell percent must be between 1 and 100.';
|
|
1615
|
+
}
|
|
1616
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
1617
|
+
swarm.setTakeProfit({
|
|
1618
|
+
mint,
|
|
1619
|
+
triggerPrice,
|
|
1620
|
+
sellPercent,
|
|
1621
|
+
enabled: true,
|
|
1622
|
+
dex,
|
|
1623
|
+
poolAddress,
|
|
1624
|
+
});
|
|
1625
|
+
return `β
**Take Profit Set**
|
|
1626
|
+
|
|
1627
|
+
Token: \`${mint.slice(0, 20)}...\`
|
|
1628
|
+
Trigger: ${triggerPrice}
|
|
1629
|
+
Sell: ${sellPercent}%${dex ? `\nDEX: ${dex}` : ''}
|
|
1630
|
+
|
|
1631
|
+
_Monitoring active. Will auto-sell if price rises to trigger._`;
|
|
1632
|
+
}
|
|
1633
|
+
async function handleTriggers() {
|
|
1634
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
1635
|
+
const stopLosses = swarm.getStopLossConfigs();
|
|
1636
|
+
const takeProfits = swarm.getTakeProfitConfigs();
|
|
1637
|
+
if (stopLosses.length === 0 && takeProfits.length === 0) {
|
|
1638
|
+
return 'No active triggers. Set with `/swarm stop-loss` or `/swarm take-profit`.';
|
|
1639
|
+
}
|
|
1640
|
+
let output = `**Active Triggers**\n\n`;
|
|
1641
|
+
if (stopLosses.length > 0) {
|
|
1642
|
+
output += `**Stop Losses:**\n`;
|
|
1643
|
+
for (const sl of stopLosses) {
|
|
1644
|
+
const status = sl.enabled ? 'π’' : 'π΄';
|
|
1645
|
+
output += `${status} \`${sl.mint.slice(0, 16)}...\` @ ${sl.triggerPrice} β sell ${sl.sellPercent}%\n`;
|
|
1646
|
+
}
|
|
1647
|
+
output += '\n';
|
|
1648
|
+
}
|
|
1649
|
+
if (takeProfits.length > 0) {
|
|
1650
|
+
output += `**Take Profits:**\n`;
|
|
1651
|
+
for (const tp of takeProfits) {
|
|
1652
|
+
const status = tp.enabled ? 'π’' : 'π΄';
|
|
1653
|
+
output += `${status} \`${tp.mint.slice(0, 16)}...\` @ ${tp.triggerPrice} β sell ${tp.sellPercent}%\n`;
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
return output;
|
|
1657
|
+
}
|
|
1658
|
+
async function handleRemoveTrigger(args) {
|
|
1659
|
+
if (args.length < 2) {
|
|
1660
|
+
return `**Usage:** /swarm remove-trigger <mint> <stop-loss|take-profit>`;
|
|
1661
|
+
}
|
|
1662
|
+
const mint = args[0];
|
|
1663
|
+
const type = args[1].toLowerCase();
|
|
1664
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
1665
|
+
let removed = false;
|
|
1666
|
+
if (type === 'stop-loss' || type === 'sl') {
|
|
1667
|
+
removed = swarm.removeStopLoss(mint);
|
|
1668
|
+
}
|
|
1669
|
+
else if (type === 'take-profit' || type === 'tp') {
|
|
1670
|
+
removed = swarm.removeTakeProfit(mint);
|
|
1671
|
+
}
|
|
1672
|
+
else {
|
|
1673
|
+
return 'β Type must be `stop-loss` or `take-profit`.';
|
|
1674
|
+
}
|
|
1675
|
+
return removed
|
|
1676
|
+
? `β
Removed ${type} for \`${mint.slice(0, 20)}...\``
|
|
1677
|
+
: `β No ${type} found for that token.`;
|
|
1678
|
+
}
|
|
1679
|
+
// ============================================================================
|
|
1680
|
+
// DCA Handlers
|
|
1681
|
+
// ============================================================================
|
|
1682
|
+
function parseInterval(str) {
|
|
1683
|
+
const match = str.match(/^(\d+)(s|m|h|d)$/i);
|
|
1684
|
+
if (!match)
|
|
1685
|
+
return 0;
|
|
1686
|
+
const value = parseInt(match[1]);
|
|
1687
|
+
const unit = match[2].toLowerCase();
|
|
1688
|
+
switch (unit) {
|
|
1689
|
+
case 's': return value * 1000;
|
|
1690
|
+
case 'm': return value * 60 * 1000;
|
|
1691
|
+
case 'h': return value * 60 * 60 * 1000;
|
|
1692
|
+
case 'd': return value * 24 * 60 * 60 * 1000;
|
|
1693
|
+
default: return 0;
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
async function handleDCA(args) {
|
|
1697
|
+
if (args.length < 4) {
|
|
1698
|
+
return `**Usage:** /swarm dca <mint> <sol_per_interval> <interval> <count> [options]
|
|
1699
|
+
|
|
1700
|
+
Schedule DCA (Dollar Cost Averaging) buys.
|
|
1701
|
+
|
|
1702
|
+
**Interval formats:** 30s, 5m, 1h, 1d
|
|
1703
|
+
|
|
1704
|
+
**Options:**
|
|
1705
|
+
--dex <dex> DEX to use: pumpfun (default), bags, meteora
|
|
1706
|
+
--pool-address <addr> Specific pool address (for Meteora)
|
|
1707
|
+
|
|
1708
|
+
**Examples:**
|
|
1709
|
+
/swarm dca ABC... 0.05 1h 10 # Buy 0.05 SOL every hour, 10 times
|
|
1710
|
+
/swarm dca ABC... 0.1 30m 20 --dex bags # DCA on Bags.fm`;
|
|
1711
|
+
}
|
|
1712
|
+
const mint = args[0];
|
|
1713
|
+
const amountPerInterval = parseFloat(args[1]);
|
|
1714
|
+
const intervalMs = parseInterval(args[2]);
|
|
1715
|
+
const totalIntervals = parseInt(args[3]);
|
|
1716
|
+
// Parse options
|
|
1717
|
+
let dex;
|
|
1718
|
+
let poolAddress;
|
|
1719
|
+
for (let i = 4; i < args.length; i++) {
|
|
1720
|
+
if (args[i] === '--dex' && args[i + 1]) {
|
|
1721
|
+
const d = args[++i].toLowerCase();
|
|
1722
|
+
if (d === 'pumpfun' || d === 'bags' || d === 'meteora') {
|
|
1723
|
+
dex = d;
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
else if (args[i] === '--pool-address' && args[i + 1]) {
|
|
1727
|
+
poolAddress = args[++i];
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
if (isNaN(amountPerInterval) || amountPerInterval <= 0) {
|
|
1731
|
+
return 'β Invalid amount.';
|
|
1732
|
+
}
|
|
1733
|
+
if (intervalMs <= 0) {
|
|
1734
|
+
return 'β Invalid interval. Use formats like 30s, 5m, 1h, 1d.';
|
|
1735
|
+
}
|
|
1736
|
+
if (isNaN(totalIntervals) || totalIntervals <= 0) {
|
|
1737
|
+
return 'β Invalid count.';
|
|
1738
|
+
}
|
|
1739
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
1740
|
+
const config = swarm.scheduleDCA({
|
|
1741
|
+
mint,
|
|
1742
|
+
amountPerInterval,
|
|
1743
|
+
intervalMs,
|
|
1744
|
+
totalIntervals,
|
|
1745
|
+
enabled: true,
|
|
1746
|
+
dex,
|
|
1747
|
+
poolAddress,
|
|
1748
|
+
});
|
|
1749
|
+
const totalSol = amountPerInterval * totalIntervals;
|
|
1750
|
+
return `β
**DCA Scheduled**
|
|
1751
|
+
|
|
1752
|
+
ID: \`${config.id}\`
|
|
1753
|
+
Token: \`${mint.slice(0, 20)}...\`
|
|
1754
|
+
Per interval: ${formatSol(amountPerInterval)} SOL
|
|
1755
|
+
Interval: ${args[2]}
|
|
1756
|
+
Count: ${totalIntervals}
|
|
1757
|
+
Total SOL: ${formatSol(totalSol)}${dex ? `\nDEX: ${dex}` : ''}
|
|
1758
|
+
|
|
1759
|
+
_First buy in ${args[2]}. Use \`/swarm dca-cancel ${config.id}\` to stop._`;
|
|
1760
|
+
}
|
|
1761
|
+
async function handleDCAList() {
|
|
1762
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
1763
|
+
const configs = swarm.getDCAConfigs();
|
|
1764
|
+
if (configs.length === 0) {
|
|
1765
|
+
return 'No active DCAs. Schedule with `/swarm dca`.';
|
|
1766
|
+
}
|
|
1767
|
+
let output = `**Active DCAs**\n\n`;
|
|
1768
|
+
for (const config of configs) {
|
|
1769
|
+
const status = config.enabled ? 'π’' : 'π΄';
|
|
1770
|
+
const progress = `${config.completedIntervals}/${config.totalIntervals}`;
|
|
1771
|
+
output += `${status} **${config.id}**\n`;
|
|
1772
|
+
output += ` Token: \`${config.mint.slice(0, 16)}...\`\n`;
|
|
1773
|
+
output += ` Progress: ${progress}\n`;
|
|
1774
|
+
output += ` Amount: ${formatSol(config.amountPerInterval)} SOL\n`;
|
|
1775
|
+
output += ` Next: ${new Date(config.nextExecutionAt).toLocaleTimeString()}\n\n`;
|
|
1776
|
+
}
|
|
1777
|
+
return output;
|
|
1778
|
+
}
|
|
1779
|
+
async function handleDCACancel(id) {
|
|
1780
|
+
if (!id) {
|
|
1781
|
+
return 'Usage: /swarm dca-cancel <id>';
|
|
1782
|
+
}
|
|
1783
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
1784
|
+
const cancelled = swarm.cancelDCA(id);
|
|
1785
|
+
return cancelled
|
|
1786
|
+
? `β
DCA \`${id}\` cancelled.`
|
|
1787
|
+
: `β DCA \`${id}\` not found.`;
|
|
1788
|
+
}
|
|
1789
|
+
// ============================================================================
|
|
1790
|
+
// History & Rebalance Handlers
|
|
1791
|
+
// ============================================================================
|
|
1792
|
+
async function handleHistory(args) {
|
|
1793
|
+
let mint;
|
|
1794
|
+
let walletId;
|
|
1795
|
+
let limit = 20;
|
|
1796
|
+
for (let i = 0; i < args.length; i++) {
|
|
1797
|
+
if (args[i] === '--mint' && args[i + 1]) {
|
|
1798
|
+
mint = args[++i];
|
|
1799
|
+
}
|
|
1800
|
+
else if (args[i] === '--wallet' && args[i + 1]) {
|
|
1801
|
+
walletId = args[++i];
|
|
1802
|
+
}
|
|
1803
|
+
else if (args[i] === '--limit' && args[i + 1]) {
|
|
1804
|
+
limit = parseInt(args[++i]);
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
1808
|
+
const history = swarm.getTradeHistory({ mint, walletId, limit });
|
|
1809
|
+
if (history.length === 0) {
|
|
1810
|
+
return 'No trade history. Trades will be recorded as you execute them.';
|
|
1811
|
+
}
|
|
1812
|
+
let output = `**Trade History** (${history.length})\n\n`;
|
|
1813
|
+
for (const entry of history) {
|
|
1814
|
+
const action = entry.action === 'buy' ? 'π’ BUY' : 'π΄ SELL';
|
|
1815
|
+
const time = new Date(entry.timestamp).toLocaleString();
|
|
1816
|
+
const status = entry.success ? 'β
' : 'β';
|
|
1817
|
+
output += `${status} ${action} ${entry.walletId}\n`;
|
|
1818
|
+
output += ` ${time}\n`;
|
|
1819
|
+
output += ` \`${entry.mint.slice(0, 16)}...\`\n`;
|
|
1820
|
+
if (entry.solAmount)
|
|
1821
|
+
output += ` SOL: ${formatSol(entry.solAmount)}\n`;
|
|
1822
|
+
if (entry.tokenAmount)
|
|
1823
|
+
output += ` Tokens: ${formatTokens(entry.tokenAmount)}\n`;
|
|
1824
|
+
output += '\n';
|
|
1825
|
+
}
|
|
1826
|
+
return output;
|
|
1827
|
+
}
|
|
1828
|
+
async function handleRebalance(mint) {
|
|
1829
|
+
if (!mint) {
|
|
1830
|
+
return `**Usage:** /swarm rebalance <mint>
|
|
1831
|
+
|
|
1832
|
+
Redistribute tokens evenly across all enabled wallets.`;
|
|
1833
|
+
}
|
|
1834
|
+
const swarm = (0, pump_swarm_1.getSwarm)();
|
|
1835
|
+
const result = await swarm.rebalance(mint);
|
|
1836
|
+
let output = `**Rebalance Result**\n\n`;
|
|
1837
|
+
output += `Token: \`${mint.slice(0, 20)}...\`\n`;
|
|
1838
|
+
output += `Status: ${result.success ? 'β
Success' : 'β Failed'}\n\n`;
|
|
1839
|
+
if (result.transfers.length > 0) {
|
|
1840
|
+
output += `**Transfers:**\n`;
|
|
1841
|
+
for (const t of result.transfers) {
|
|
1842
|
+
if (t.signature) {
|
|
1843
|
+
output += `β
${t.fromWallet} β ${t.toWallet}: ${formatTokens(t.amount)}\n`;
|
|
1844
|
+
}
|
|
1845
|
+
else {
|
|
1846
|
+
output += `β ${t.fromWallet}: ${t.error}\n`;
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
else {
|
|
1851
|
+
output += '_Positions already balanced (within 5% threshold)_';
|
|
1852
|
+
}
|
|
1853
|
+
return output;
|
|
1854
|
+
}
|
|
1855
|
+
// ============================================================================
|
|
1856
|
+
// Main Execute Function
|
|
1857
|
+
// ============================================================================
|
|
1858
|
+
async function execute(args) {
|
|
1859
|
+
const parts = args.trim().split(/\s+/);
|
|
1860
|
+
const command = parts[0]?.toLowerCase() || 'help';
|
|
1861
|
+
const rest = parts.slice(1);
|
|
1862
|
+
try {
|
|
1863
|
+
switch (command) {
|
|
1864
|
+
// Wallet management
|
|
1865
|
+
case 'wallets':
|
|
1866
|
+
case 'list':
|
|
1867
|
+
return await handleWallets();
|
|
1868
|
+
case 'balances':
|
|
1869
|
+
case 'balance':
|
|
1870
|
+
return await handleBalances();
|
|
1871
|
+
case 'enable':
|
|
1872
|
+
return await handleEnable(rest[0]);
|
|
1873
|
+
case 'disable':
|
|
1874
|
+
return await handleDisable(rest[0]);
|
|
1875
|
+
case 'status':
|
|
1876
|
+
return await handleStatus(rest);
|
|
1877
|
+
// SOL management
|
|
1878
|
+
case 'distribute':
|
|
1879
|
+
return await handleDistribute(rest);
|
|
1880
|
+
case 'consolidate':
|
|
1881
|
+
return await handleConsolidate(rest);
|
|
1882
|
+
case 'consolidate-tokens':
|
|
1883
|
+
return await handleConsolidateTokens(rest[0]);
|
|
1884
|
+
// Trading
|
|
1885
|
+
case 'buy':
|
|
1886
|
+
return await handleBuy(rest);
|
|
1887
|
+
case 'sell':
|
|
1888
|
+
return await handleSell(rest);
|
|
1889
|
+
case 'quote':
|
|
1890
|
+
return await handleQuote(rest);
|
|
1891
|
+
case 'simulate':
|
|
1892
|
+
case 'sim':
|
|
1893
|
+
return await handleSimulate(rest);
|
|
1894
|
+
// Positions
|
|
1895
|
+
case 'position':
|
|
1896
|
+
case 'pos':
|
|
1897
|
+
return await handlePosition(rest[0]);
|
|
1898
|
+
case 'refresh':
|
|
1899
|
+
case 'sync':
|
|
1900
|
+
return await handleRefresh(rest[0]);
|
|
1901
|
+
case 'rebalance':
|
|
1902
|
+
return await handleRebalance(rest[0]);
|
|
1903
|
+
// Risk management
|
|
1904
|
+
case 'stop-loss':
|
|
1905
|
+
case 'sl':
|
|
1906
|
+
return await handleStopLoss(rest);
|
|
1907
|
+
case 'take-profit':
|
|
1908
|
+
case 'tp':
|
|
1909
|
+
return await handleTakeProfit(rest);
|
|
1910
|
+
case 'triggers':
|
|
1911
|
+
return await handleTriggers();
|
|
1912
|
+
case 'remove-trigger':
|
|
1913
|
+
return await handleRemoveTrigger(rest);
|
|
1914
|
+
// DCA
|
|
1915
|
+
case 'dca':
|
|
1916
|
+
return await handleDCA(rest);
|
|
1917
|
+
case 'dca-list':
|
|
1918
|
+
return await handleDCAList();
|
|
1919
|
+
case 'dca-cancel':
|
|
1920
|
+
return await handleDCACancel(rest[0]);
|
|
1921
|
+
// History
|
|
1922
|
+
case 'history':
|
|
1923
|
+
return await handleHistory(rest);
|
|
1924
|
+
// Presets
|
|
1925
|
+
case 'preset':
|
|
1926
|
+
case 'presets':
|
|
1927
|
+
return await handlePreset(rest);
|
|
1928
|
+
// Smart Strategies
|
|
1929
|
+
case 'strategy':
|
|
1930
|
+
case 'strat':
|
|
1931
|
+
return await handleStrategy(rest);
|
|
1932
|
+
// Copytrading
|
|
1933
|
+
case 'copy':
|
|
1934
|
+
case 'copytrade':
|
|
1935
|
+
return await handleCopytrade(rest);
|
|
1936
|
+
case 'help':
|
|
1937
|
+
default:
|
|
1938
|
+
return await handleHelp();
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
catch (error) {
|
|
1942
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
1943
|
+
return `β **Error:** ${msg}`;
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
// ============================================================================
|
|
1947
|
+
// Copytrading Handlers
|
|
1948
|
+
// ============================================================================
|
|
1949
|
+
async function handleCopytrade(args) {
|
|
1950
|
+
if (args.length === 0) {
|
|
1951
|
+
return handleCopytradeHelp();
|
|
1952
|
+
}
|
|
1953
|
+
const [subCmd, ...rest] = args;
|
|
1954
|
+
switch (subCmd.toLowerCase()) {
|
|
1955
|
+
case 'add':
|
|
1956
|
+
return await handleCopytradeAdd(rest);
|
|
1957
|
+
case 'remove':
|
|
1958
|
+
case 'rm':
|
|
1959
|
+
return await handleCopytradeRemove(rest[0]);
|
|
1960
|
+
case 'list':
|
|
1961
|
+
case 'ls':
|
|
1962
|
+
return handleCopytradeList();
|
|
1963
|
+
case 'enable':
|
|
1964
|
+
return handleCopytradeEnable(rest[0]);
|
|
1965
|
+
case 'disable':
|
|
1966
|
+
return handleCopytradeDisable(rest[0]);
|
|
1967
|
+
case 'config':
|
|
1968
|
+
return await handleCopytradeConfig(rest);
|
|
1969
|
+
case 'stats':
|
|
1970
|
+
return handleCopytradeStats(rest[0]);
|
|
1971
|
+
default:
|
|
1972
|
+
return handleCopytradeHelp();
|
|
1973
|
+
}
|
|
1974
|
+
}
|
|
1975
|
+
function handleCopytradeHelp() {
|
|
1976
|
+
return `**Swarm Copytrading**
|
|
1977
|
+
|
|
1978
|
+
Follow wallets and replicate their trades across ALL your swarm wallets.
|
|
1979
|
+
|
|
1980
|
+
**Commands:**
|
|
1981
|
+
/swarm copy add <address> [options] Add wallet to copy
|
|
1982
|
+
/swarm copy remove <id> Stop copying a wallet
|
|
1983
|
+
/swarm copy list List copied wallets
|
|
1984
|
+
/swarm copy enable <id> Enable copying
|
|
1985
|
+
/swarm copy disable <id> Pause copying
|
|
1986
|
+
/swarm copy config <id> [options] Update copy settings
|
|
1987
|
+
/swarm copy stats [id] View copy statistics
|
|
1988
|
+
|
|
1989
|
+
**Add Options:**
|
|
1990
|
+
--name "Whale 1" Friendly name
|
|
1991
|
+
--multiplier <n> Size multiplier (1.0 = same, 2.0 = 2x)
|
|
1992
|
+
--max-sol <n> Max SOL per trade (default: 1.0)
|
|
1993
|
+
--min-sol <n> Min SOL to copy (default: 0.01)
|
|
1994
|
+
--delay <ms> Delay before copying (stealth)
|
|
1995
|
+
--buys-only Only copy buys
|
|
1996
|
+
--sells-only Only copy sells
|
|
1997
|
+
--dex <dex> DEX for execution
|
|
1998
|
+
--mode <mode> Execution mode
|
|
1999
|
+
|
|
2000
|
+
**Examples:**
|
|
2001
|
+
/swarm copy add 7xKX...abc --name "Alpha Whale" --multiplier 0.5
|
|
2002
|
+
/swarm copy add 9zYZ...xyz --buys-only --max-sol 0.5 --delay 1000
|
|
2003
|
+
/swarm copy list
|
|
2004
|
+
/swarm copy stats`;
|
|
2005
|
+
}
|
|
2006
|
+
async function handleCopytradeAdd(args) {
|
|
2007
|
+
if (args.length === 0) {
|
|
2008
|
+
return 'β Usage: /swarm copy add <wallet_address> [options]';
|
|
2009
|
+
}
|
|
2010
|
+
const address = args[0];
|
|
2011
|
+
// Parse options
|
|
2012
|
+
let name;
|
|
2013
|
+
let multiplier = 1.0;
|
|
2014
|
+
let maxSolPerTrade = 1.0;
|
|
2015
|
+
let minSolPerTrade = 0.01;
|
|
2016
|
+
let delayMs = 0;
|
|
2017
|
+
let copyBuys = true;
|
|
2018
|
+
let copySells = true;
|
|
2019
|
+
let dex;
|
|
2020
|
+
let executionMode;
|
|
2021
|
+
let slippageBps = 500;
|
|
2022
|
+
for (let i = 1; i < args.length; i++) {
|
|
2023
|
+
const arg = args[i];
|
|
2024
|
+
if (arg === '--name' && args[i + 1]) {
|
|
2025
|
+
name = args[++i];
|
|
2026
|
+
}
|
|
2027
|
+
else if (arg === '--multiplier' && args[i + 1]) {
|
|
2028
|
+
multiplier = parseFloat(args[++i]);
|
|
2029
|
+
}
|
|
2030
|
+
else if (arg === '--max-sol' && args[i + 1]) {
|
|
2031
|
+
maxSolPerTrade = parseFloat(args[++i]);
|
|
2032
|
+
}
|
|
2033
|
+
else if (arg === '--min-sol' && args[i + 1]) {
|
|
2034
|
+
minSolPerTrade = parseFloat(args[++i]);
|
|
2035
|
+
}
|
|
2036
|
+
else if (arg === '--delay' && args[i + 1]) {
|
|
2037
|
+
delayMs = parseInt(args[++i]);
|
|
2038
|
+
}
|
|
2039
|
+
else if (arg === '--buys-only') {
|
|
2040
|
+
copySells = false;
|
|
2041
|
+
}
|
|
2042
|
+
else if (arg === '--sells-only') {
|
|
2043
|
+
copyBuys = false;
|
|
2044
|
+
}
|
|
2045
|
+
else if (arg === '--dex' && args[i + 1]) {
|
|
2046
|
+
const d = args[++i].toLowerCase();
|
|
2047
|
+
if (d === 'pumpfun' || d === 'bags' || d === 'meteora' || d === 'auto') {
|
|
2048
|
+
dex = d;
|
|
2049
|
+
}
|
|
2050
|
+
}
|
|
2051
|
+
else if (arg === '--mode' && args[i + 1]) {
|
|
2052
|
+
const m = args[++i].toLowerCase();
|
|
2053
|
+
if (m === 'parallel' || m === 'bundle' || m === 'multi-bundle' || m === 'sequential') {
|
|
2054
|
+
executionMode = m;
|
|
2055
|
+
}
|
|
2056
|
+
}
|
|
2057
|
+
else if (arg === '--slippage' && args[i + 1]) {
|
|
2058
|
+
slippageBps = parseInt(args[++i]);
|
|
2059
|
+
}
|
|
2060
|
+
}
|
|
2061
|
+
const copyTrader = getCopyTrader();
|
|
2062
|
+
const target = copyTrader.addTarget(address, {
|
|
2063
|
+
multiplier,
|
|
2064
|
+
maxSolPerTrade,
|
|
2065
|
+
minSolPerTrade,
|
|
2066
|
+
delayMs,
|
|
2067
|
+
copyBuys,
|
|
2068
|
+
copySells,
|
|
2069
|
+
dex,
|
|
2070
|
+
executionMode,
|
|
2071
|
+
slippageBps,
|
|
2072
|
+
}, name);
|
|
2073
|
+
return `β
**Copytrading Target Added**
|
|
2074
|
+
|
|
2075
|
+
ID: \`${target.id}\`
|
|
2076
|
+
Address: \`${address.slice(0, 20)}...\`${name ? `\nName: ${name}` : ''}
|
|
2077
|
+
Multiplier: ${multiplier}x
|
|
2078
|
+
Max per trade: ${maxSolPerTrade} SOL
|
|
2079
|
+
Copy: ${copyBuys && copySells ? 'Buys & Sells' : copyBuys ? 'Buys only' : 'Sells only'}
|
|
2080
|
+
Delay: ${delayMs}ms${dex ? `\nDEX: ${dex}` : ''}
|
|
2081
|
+
|
|
2082
|
+
_Now monitoring for trades..._`;
|
|
2083
|
+
}
|
|
2084
|
+
async function handleCopytradeRemove(id) {
|
|
2085
|
+
if (!id) {
|
|
2086
|
+
return 'β Usage: /swarm copy remove <id>';
|
|
2087
|
+
}
|
|
2088
|
+
const copyTrader = getCopyTrader();
|
|
2089
|
+
const removed = copyTrader.removeTarget(id);
|
|
2090
|
+
return removed
|
|
2091
|
+
? `β
Removed copytrading target \`${id}\``
|
|
2092
|
+
: `β Target \`${id}\` not found`;
|
|
2093
|
+
}
|
|
2094
|
+
function handleCopytradeList() {
|
|
2095
|
+
const copyTrader = getCopyTrader();
|
|
2096
|
+
const targets = copyTrader.listTargets();
|
|
2097
|
+
if (targets.length === 0) {
|
|
2098
|
+
return 'No copytrading targets. Add one with `/swarm copy add <address>`.';
|
|
2099
|
+
}
|
|
2100
|
+
let output = `**Copytrading Targets** (${targets.length})\n\n`;
|
|
2101
|
+
for (const target of targets) {
|
|
2102
|
+
const status = target.enabled ? 'π’' : 'βΈοΈ';
|
|
2103
|
+
const addr = target.address.slice(0, 12) + '...';
|
|
2104
|
+
output += `${status} **${target.name || addr}**\n`;
|
|
2105
|
+
output += ` ID: \`${target.id}\`\n`;
|
|
2106
|
+
output += ` Address: \`${target.address.slice(0, 20)}...\`\n`;
|
|
2107
|
+
output += ` Multiplier: ${target.config.multiplier}x | Max: ${target.config.maxSolPerTrade} SOL\n`;
|
|
2108
|
+
output += ` Trades: ${target.stats.totalTradesCopied} | PnL: ${formatSol(target.stats.pnlSol)} SOL\n\n`;
|
|
2109
|
+
}
|
|
2110
|
+
return output;
|
|
2111
|
+
}
|
|
2112
|
+
function handleCopytradeEnable(id) {
|
|
2113
|
+
if (!id)
|
|
2114
|
+
return 'β Usage: /swarm copy enable <id>';
|
|
2115
|
+
const copyTrader = getCopyTrader();
|
|
2116
|
+
const enabled = copyTrader.enableTarget(id);
|
|
2117
|
+
return enabled
|
|
2118
|
+
? `β
Enabled copytrading for \`${id}\``
|
|
2119
|
+
: `β Target \`${id}\` not found`;
|
|
2120
|
+
}
|
|
2121
|
+
function handleCopytradeDisable(id) {
|
|
2122
|
+
if (!id)
|
|
2123
|
+
return 'β Usage: /swarm copy disable <id>';
|
|
2124
|
+
const copyTrader = getCopyTrader();
|
|
2125
|
+
const disabled = copyTrader.disableTarget(id);
|
|
2126
|
+
return disabled
|
|
2127
|
+
? `βΈοΈ Paused copytrading for \`${id}\``
|
|
2128
|
+
: `β Target \`${id}\` not found`;
|
|
2129
|
+
}
|
|
2130
|
+
async function handleCopytradeConfig(args) {
|
|
2131
|
+
if (args.length < 2) {
|
|
2132
|
+
return `**Usage:** /swarm copy config <id> [options]
|
|
2133
|
+
|
|
2134
|
+
Update configuration for a copy target.
|
|
2135
|
+
|
|
2136
|
+
**Options:**
|
|
2137
|
+
--multiplier <n> Size multiplier
|
|
2138
|
+
--max-sol <n> Max SOL per trade
|
|
2139
|
+
--min-sol <n> Min SOL to copy
|
|
2140
|
+
--delay <ms> Delay before copying
|
|
2141
|
+
--buys <on|off> Copy buys
|
|
2142
|
+
--sells <on|off> Copy sells
|
|
2143
|
+
--dex <dex> DEX for execution`;
|
|
2144
|
+
}
|
|
2145
|
+
const id = args[0];
|
|
2146
|
+
const copyTrader = getCopyTrader();
|
|
2147
|
+
const target = copyTrader.getTarget(id);
|
|
2148
|
+
if (!target) {
|
|
2149
|
+
return `β Target \`${id}\` not found`;
|
|
2150
|
+
}
|
|
2151
|
+
const config = {};
|
|
2152
|
+
for (let i = 1; i < args.length; i++) {
|
|
2153
|
+
const arg = args[i];
|
|
2154
|
+
if (arg === '--multiplier' && args[i + 1]) {
|
|
2155
|
+
config.multiplier = parseFloat(args[++i]);
|
|
2156
|
+
}
|
|
2157
|
+
else if (arg === '--max-sol' && args[i + 1]) {
|
|
2158
|
+
config.maxSolPerTrade = parseFloat(args[++i]);
|
|
2159
|
+
}
|
|
2160
|
+
else if (arg === '--min-sol' && args[i + 1]) {
|
|
2161
|
+
config.minSolPerTrade = parseFloat(args[++i]);
|
|
2162
|
+
}
|
|
2163
|
+
else if (arg === '--delay' && args[i + 1]) {
|
|
2164
|
+
config.delayMs = parseInt(args[++i]);
|
|
2165
|
+
}
|
|
2166
|
+
else if (arg === '--buys' && args[i + 1]) {
|
|
2167
|
+
config.copyBuys = args[++i].toLowerCase() === 'on';
|
|
2168
|
+
}
|
|
2169
|
+
else if (arg === '--sells' && args[i + 1]) {
|
|
2170
|
+
config.copySells = args[++i].toLowerCase() === 'on';
|
|
2171
|
+
}
|
|
2172
|
+
else if (arg === '--dex' && args[i + 1]) {
|
|
2173
|
+
const d = args[++i].toLowerCase();
|
|
2174
|
+
if (d === 'pumpfun' || d === 'bags' || d === 'meteora' || d === 'auto') {
|
|
2175
|
+
config.dex = d;
|
|
2176
|
+
}
|
|
2177
|
+
}
|
|
2178
|
+
}
|
|
2179
|
+
copyTrader.updateTargetConfig(id, config);
|
|
2180
|
+
return `β
Updated config for \`${id}\`\n\n${JSON.stringify(config, null, 2)}`;
|
|
2181
|
+
}
|
|
2182
|
+
function handleCopytradeStats(id) {
|
|
2183
|
+
const copyTrader = getCopyTrader();
|
|
2184
|
+
if (id) {
|
|
2185
|
+
const target = copyTrader.getTarget(id);
|
|
2186
|
+
if (!target) {
|
|
2187
|
+
return `β Target \`${id}\` not found`;
|
|
2188
|
+
}
|
|
2189
|
+
const stats = target.stats;
|
|
2190
|
+
return `**Copytrade Stats: ${target.name || target.address.slice(0, 12)}**
|
|
2191
|
+
|
|
2192
|
+
Total Trades: ${stats.totalTradesCopied}
|
|
2193
|
+
Successful: ${stats.successfulTrades}
|
|
2194
|
+
Failed: ${stats.failedTrades}
|
|
2195
|
+
Success Rate: ${stats.totalTradesCopied > 0 ? ((stats.successfulTrades / stats.totalTradesCopied) * 100).toFixed(1) : 0}%
|
|
2196
|
+
|
|
2197
|
+
SOL Spent: ${formatSol(stats.totalSolSpent)}
|
|
2198
|
+
SOL Received: ${formatSol(stats.totalSolReceived)}
|
|
2199
|
+
**PnL: ${formatSol(stats.pnlSol)} SOL**
|
|
2200
|
+
|
|
2201
|
+
Today: ${stats.todayTrades} trades, ${formatSol(stats.todaySol)} SOL${stats.lastTradeAt ? `\nLast trade: ${new Date(stats.lastTradeAt).toLocaleString()}` : ''}`;
|
|
2202
|
+
}
|
|
2203
|
+
// Aggregate stats
|
|
2204
|
+
const targets = copyTrader.listTargets();
|
|
2205
|
+
if (targets.length === 0) {
|
|
2206
|
+
return 'No copytrading targets.';
|
|
2207
|
+
}
|
|
2208
|
+
let totalTrades = 0;
|
|
2209
|
+
let totalSuccess = 0;
|
|
2210
|
+
let totalSpent = 0;
|
|
2211
|
+
let totalReceived = 0;
|
|
2212
|
+
for (const t of targets) {
|
|
2213
|
+
totalTrades += t.stats.totalTradesCopied;
|
|
2214
|
+
totalSuccess += t.stats.successfulTrades;
|
|
2215
|
+
totalSpent += t.stats.totalSolSpent;
|
|
2216
|
+
totalReceived += t.stats.totalSolReceived;
|
|
2217
|
+
}
|
|
2218
|
+
const pnl = totalReceived - totalSpent;
|
|
2219
|
+
return `**Copytrade Summary (${targets.length} targets)**
|
|
2220
|
+
|
|
2221
|
+
Total Trades: ${totalTrades}
|
|
2222
|
+
Success Rate: ${totalTrades > 0 ? ((totalSuccess / totalTrades) * 100).toFixed(1) : 0}%
|
|
2223
|
+
|
|
2224
|
+
SOL Spent: ${formatSol(totalSpent)}
|
|
2225
|
+
SOL Received: ${formatSol(totalReceived)}
|
|
2226
|
+
**Total PnL: ${formatSol(pnl)} SOL**`;
|
|
2227
|
+
}
|
|
2228
|
+
exports.default = {
|
|
2229
|
+
name: 'pump-swarm',
|
|
2230
|
+
description: 'Coordinate multiple wallets for synchronized Pump.fun trading',
|
|
2231
|
+
commands: ['/pump-swarm', '/swarm'],
|
|
2232
|
+
requires: { env: ['SOLANA_PRIVATE_KEY'] },
|
|
2233
|
+
handle: execute,
|
|
2234
|
+
};
|
|
2235
|
+
//# sourceMappingURL=index.js.map
|