@general-liquidity/gordon-cli 0.75.13 → 0.75.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1509 -452
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14365,6 +14365,15 @@ __export(exports_env, {
|
|
|
14365
14365
|
import { existsSync as existsSync2 } from "fs";
|
|
14366
14366
|
import { mkdir as mkdir2 } from "fs/promises";
|
|
14367
14367
|
import { join as join3 } from "path";
|
|
14368
|
+
function escapeEnvValue(value) {
|
|
14369
|
+
return value.replace(/'/g, "'\\''");
|
|
14370
|
+
}
|
|
14371
|
+
function unescapeEnvValue(value) {
|
|
14372
|
+
return value.replace(/'\\''/g, "'");
|
|
14373
|
+
}
|
|
14374
|
+
function formatEnvLine(key, value) {
|
|
14375
|
+
return `${key}='${escapeEnvValue(value)}'`;
|
|
14376
|
+
}
|
|
14368
14377
|
function parseEnvContent(content) {
|
|
14369
14378
|
const result = {};
|
|
14370
14379
|
for (const line of content.split(`
|
|
@@ -14377,7 +14386,9 @@ function parseEnvContent(content) {
|
|
|
14377
14386
|
if (match) {
|
|
14378
14387
|
const key = match[1]?.trim();
|
|
14379
14388
|
let value = match[2]?.trim() ?? "";
|
|
14380
|
-
if (value.startsWith("'") && value.endsWith("'")
|
|
14389
|
+
if (value.startsWith("'") && value.endsWith("'")) {
|
|
14390
|
+
value = unescapeEnvValue(value.slice(1, -1));
|
|
14391
|
+
} else if (value.startsWith('"') && value.endsWith('"')) {
|
|
14381
14392
|
value = value.slice(1, -1);
|
|
14382
14393
|
}
|
|
14383
14394
|
if (key) {
|
|
@@ -14396,77 +14407,37 @@ function findEnvFilePath() {
|
|
|
14396
14407
|
}
|
|
14397
14408
|
return null;
|
|
14398
14409
|
}
|
|
14399
|
-
|
|
14400
|
-
|
|
14401
|
-
|
|
14402
|
-
if (!fileExists) {
|
|
14403
|
-
const keys2 = {
|
|
14404
|
-
OPENAI_API_KEY: process.env.OPENAI_API_KEY,
|
|
14405
|
-
DEDALUS_API_KEY: process.env.DEDALUS_API_KEY,
|
|
14406
|
-
BINANCE_API_KEY: process.env.BINANCE_API_KEY,
|
|
14407
|
-
BINANCE_API_SECRET: process.env.BINANCE_API_SECRET,
|
|
14408
|
-
BINANCE_US_API_KEY: process.env.BINANCE_US_API_KEY,
|
|
14409
|
-
BINANCE_US_API_SECRET: process.env.BINANCE_US_API_SECRET,
|
|
14410
|
-
COINBASE_API_KEY: process.env.COINBASE_API_KEY,
|
|
14411
|
-
COINBASE_API_SECRET: process.env.COINBASE_API_SECRET,
|
|
14412
|
-
COINBASE_PASSPHRASE: process.env.COINBASE_PASSPHRASE,
|
|
14413
|
-
KRAKEN_API_KEY: process.env.KRAKEN_API_KEY,
|
|
14414
|
-
KRAKEN_API_SECRET: process.env.KRAKEN_API_SECRET,
|
|
14415
|
-
BITFINEX_API_KEY: process.env.BITFINEX_API_KEY,
|
|
14416
|
-
BITFINEX_API_SECRET: process.env.BITFINEX_API_SECRET,
|
|
14417
|
-
HYPERLIQUID_PRIVATE_KEY: process.env.HYPERLIQUID_PRIVATE_KEY,
|
|
14418
|
-
UNISWAP_API_KEY: process.env.UNISWAP_API_KEY,
|
|
14419
|
-
THEGRAPH_API_KEY: process.env.THEGRAPH_API_KEY
|
|
14420
|
-
};
|
|
14421
|
-
return {
|
|
14422
|
-
fileExists: false,
|
|
14423
|
-
hasLLMKey: !!(keys2.OPENAI_API_KEY || keys2.DEDALUS_API_KEY),
|
|
14424
|
-
hasBinanceKeys: !!(keys2.BINANCE_API_KEY && keys2.BINANCE_API_SECRET),
|
|
14425
|
-
hasBinanceUSKeys: !!(keys2.BINANCE_US_API_KEY && keys2.BINANCE_US_API_SECRET),
|
|
14426
|
-
hasCoinbaseKeys: !!(keys2.COINBASE_API_KEY && keys2.COINBASE_API_SECRET),
|
|
14427
|
-
hasKrakenKeys: !!(keys2.KRAKEN_API_KEY && keys2.KRAKEN_API_SECRET),
|
|
14428
|
-
hasBitfinexKeys: !!(keys2.BITFINEX_API_KEY && keys2.BITFINEX_API_SECRET),
|
|
14429
|
-
hasHyperliquidKey: !!keys2.HYPERLIQUID_PRIVATE_KEY,
|
|
14430
|
-
hasUniswapKey: !!keys2.UNISWAP_API_KEY,
|
|
14431
|
-
hasGraphKey: !!keys2.THEGRAPH_API_KEY,
|
|
14432
|
-
keys: keys2
|
|
14433
|
-
};
|
|
14434
|
-
}
|
|
14435
|
-
const file2 = Bun.file(envPath);
|
|
14436
|
-
const content = await file2.text();
|
|
14437
|
-
const parsed = parseEnvContent(content);
|
|
14438
|
-
const keys = {
|
|
14439
|
-
OPENAI_API_KEY: parsed.OPENAI_API_KEY || process.env.OPENAI_API_KEY,
|
|
14440
|
-
DEDALUS_API_KEY: parsed.DEDALUS_API_KEY || process.env.DEDALUS_API_KEY,
|
|
14441
|
-
BINANCE_API_KEY: parsed.BINANCE_API_KEY || process.env.BINANCE_API_KEY,
|
|
14442
|
-
BINANCE_API_SECRET: parsed.BINANCE_API_SECRET || process.env.BINANCE_API_SECRET,
|
|
14443
|
-
BINANCE_US_API_KEY: parsed.BINANCE_US_API_KEY || process.env.BINANCE_US_API_KEY,
|
|
14444
|
-
BINANCE_US_API_SECRET: parsed.BINANCE_US_API_SECRET || process.env.BINANCE_US_API_SECRET,
|
|
14445
|
-
COINBASE_API_KEY: parsed.COINBASE_API_KEY || process.env.COINBASE_API_KEY,
|
|
14446
|
-
COINBASE_API_SECRET: parsed.COINBASE_API_SECRET || process.env.COINBASE_API_SECRET,
|
|
14447
|
-
COINBASE_PASSPHRASE: parsed.COINBASE_PASSPHRASE || process.env.COINBASE_PASSPHRASE,
|
|
14448
|
-
KRAKEN_API_KEY: parsed.KRAKEN_API_KEY || process.env.KRAKEN_API_KEY,
|
|
14449
|
-
KRAKEN_API_SECRET: parsed.KRAKEN_API_SECRET || process.env.KRAKEN_API_SECRET,
|
|
14450
|
-
BITFINEX_API_KEY: parsed.BITFINEX_API_KEY || process.env.BITFINEX_API_KEY,
|
|
14451
|
-
BITFINEX_API_SECRET: parsed.BITFINEX_API_SECRET || process.env.BITFINEX_API_SECRET,
|
|
14452
|
-
HYPERLIQUID_PRIVATE_KEY: parsed.HYPERLIQUID_PRIVATE_KEY || process.env.HYPERLIQUID_PRIVATE_KEY,
|
|
14453
|
-
UNISWAP_API_KEY: parsed.UNISWAP_API_KEY || process.env.UNISWAP_API_KEY,
|
|
14454
|
-
THEGRAPH_API_KEY: parsed.THEGRAPH_API_KEY || process.env.THEGRAPH_API_KEY
|
|
14455
|
-
};
|
|
14456
|
-
return {
|
|
14457
|
-
fileExists: true,
|
|
14410
|
+
function buildEnvStatus(keys, fileExists) {
|
|
14411
|
+
return {
|
|
14412
|
+
fileExists,
|
|
14458
14413
|
hasLLMKey: !!(keys.OPENAI_API_KEY || keys.DEDALUS_API_KEY),
|
|
14459
14414
|
hasBinanceKeys: !!(keys.BINANCE_API_KEY && keys.BINANCE_API_SECRET),
|
|
14460
14415
|
hasBinanceUSKeys: !!(keys.BINANCE_US_API_KEY && keys.BINANCE_US_API_SECRET),
|
|
14461
|
-
hasCoinbaseKeys: !!(keys.COINBASE_API_KEY && keys.COINBASE_API_SECRET),
|
|
14416
|
+
hasCoinbaseKeys: !!(keys.COINBASE_API_KEY && keys.COINBASE_API_SECRET && keys.COINBASE_PASSPHRASE),
|
|
14462
14417
|
hasKrakenKeys: !!(keys.KRAKEN_API_KEY && keys.KRAKEN_API_SECRET),
|
|
14463
14418
|
hasBitfinexKeys: !!(keys.BITFINEX_API_KEY && keys.BITFINEX_API_SECRET),
|
|
14464
14419
|
hasHyperliquidKey: !!keys.HYPERLIQUID_PRIVATE_KEY,
|
|
14465
14420
|
hasUniswapKey: !!keys.UNISWAP_API_KEY,
|
|
14466
14421
|
hasGraphKey: !!keys.THEGRAPH_API_KEY,
|
|
14422
|
+
hasSolanaKey: !!keys.SOLANA_PRIVATE_KEY,
|
|
14423
|
+
hasPolkadotKey: !!(keys.POLKADOT_MNEMONIC || keys.POLKADOT_PRIVATE_KEY),
|
|
14424
|
+
hasChainlinkStreamsKeys: !!(keys.CHAINLINK_API_KEY && keys.CHAINLINK_API_SECRET),
|
|
14425
|
+
hasChainlinkCCIPKey: !!keys.EVM_PRIVATE_KEY,
|
|
14426
|
+
hasCDPKeys: !!(keys.CDP_API_KEY_ID && keys.CDP_API_KEY_SECRET && keys.CDP_WALLET_SECRET),
|
|
14427
|
+
hasBasescanKey: !!keys.BASESCAN_API_KEY,
|
|
14467
14428
|
keys
|
|
14468
14429
|
};
|
|
14469
14430
|
}
|
|
14431
|
+
async function checkEnvStatus() {
|
|
14432
|
+
const envPath = findEnvFilePath();
|
|
14433
|
+
const fileExists = envPath !== null;
|
|
14434
|
+
const parsed = fileExists ? parseEnvContent(await Bun.file(envPath).text()) : {};
|
|
14435
|
+
const keys = {};
|
|
14436
|
+
for (const name of ENV_KEY_NAMES) {
|
|
14437
|
+
keys[name] = parsed[name] || process.env[name];
|
|
14438
|
+
}
|
|
14439
|
+
return buildEnvStatus(keys, fileExists);
|
|
14440
|
+
}
|
|
14470
14441
|
async function loadEnvFile() {
|
|
14471
14442
|
const envPath = findEnvFilePath();
|
|
14472
14443
|
if (envPath) {
|
|
@@ -14535,7 +14506,7 @@ async function saveEnvKeys(newKeys) {
|
|
|
14535
14506
|
const updatedKeys = { ...existingKeys };
|
|
14536
14507
|
for (const [key, value] of Object.entries(newKeys)) {
|
|
14537
14508
|
if (value) {
|
|
14538
|
-
updatedKeys[key] =
|
|
14509
|
+
updatedKeys[key] = formatEnvLine(key, value);
|
|
14539
14510
|
process.env[key] = value;
|
|
14540
14511
|
}
|
|
14541
14512
|
}
|
|
@@ -14578,87 +14549,187 @@ async function createEnvFile(keys) {
|
|
|
14578
14549
|
"# LLM Provider (pick one)"
|
|
14579
14550
|
];
|
|
14580
14551
|
if (keys.OPENAI_API_KEY) {
|
|
14581
|
-
lines.push(
|
|
14552
|
+
lines.push(formatEnvLine("OPENAI_API_KEY", keys.OPENAI_API_KEY));
|
|
14582
14553
|
} else {
|
|
14583
14554
|
lines.push("# OPENAI_API_KEY=sk-...");
|
|
14584
14555
|
}
|
|
14585
14556
|
if (keys.DEDALUS_API_KEY) {
|
|
14586
|
-
lines.push(
|
|
14557
|
+
lines.push(formatEnvLine("DEDALUS_API_KEY", keys.DEDALUS_API_KEY));
|
|
14587
14558
|
} else {
|
|
14588
14559
|
lines.push("# DEDALUS_API_KEY=dd-...");
|
|
14589
14560
|
}
|
|
14590
14561
|
lines.push("");
|
|
14591
14562
|
lines.push("# Binance (required for trading)");
|
|
14592
14563
|
if (keys.BINANCE_API_KEY) {
|
|
14593
|
-
lines.push(
|
|
14564
|
+
lines.push(formatEnvLine("BINANCE_API_KEY", keys.BINANCE_API_KEY));
|
|
14594
14565
|
} else {
|
|
14595
14566
|
lines.push("# BINANCE_API_KEY=");
|
|
14596
14567
|
}
|
|
14597
14568
|
if (keys.BINANCE_API_SECRET) {
|
|
14598
|
-
lines.push(
|
|
14569
|
+
lines.push(formatEnvLine("BINANCE_API_SECRET", keys.BINANCE_API_SECRET));
|
|
14599
14570
|
} else {
|
|
14600
14571
|
lines.push("# BINANCE_API_SECRET=");
|
|
14601
14572
|
}
|
|
14602
14573
|
lines.push("");
|
|
14603
14574
|
lines.push("# Binance US (alternative for US users)");
|
|
14604
14575
|
if (keys.BINANCE_US_API_KEY) {
|
|
14605
|
-
lines.push(
|
|
14576
|
+
lines.push(formatEnvLine("BINANCE_US_API_KEY", keys.BINANCE_US_API_KEY));
|
|
14606
14577
|
} else {
|
|
14607
14578
|
lines.push("# BINANCE_US_API_KEY=");
|
|
14608
14579
|
}
|
|
14609
14580
|
if (keys.BINANCE_US_API_SECRET) {
|
|
14610
|
-
lines.push(
|
|
14581
|
+
lines.push(formatEnvLine("BINANCE_US_API_SECRET", keys.BINANCE_US_API_SECRET));
|
|
14611
14582
|
} else {
|
|
14612
14583
|
lines.push("# BINANCE_US_API_SECRET=");
|
|
14613
14584
|
}
|
|
14614
14585
|
lines.push("");
|
|
14615
14586
|
lines.push("# Coinbase");
|
|
14616
14587
|
if (keys.COINBASE_API_KEY) {
|
|
14617
|
-
lines.push(
|
|
14588
|
+
lines.push(formatEnvLine("COINBASE_API_KEY", keys.COINBASE_API_KEY));
|
|
14618
14589
|
} else {
|
|
14619
14590
|
lines.push("# COINBASE_API_KEY=");
|
|
14620
14591
|
}
|
|
14621
14592
|
if (keys.COINBASE_API_SECRET) {
|
|
14622
|
-
lines.push(
|
|
14593
|
+
lines.push(formatEnvLine("COINBASE_API_SECRET", keys.COINBASE_API_SECRET));
|
|
14623
14594
|
} else {
|
|
14624
14595
|
lines.push("# COINBASE_API_SECRET=");
|
|
14625
14596
|
}
|
|
14626
14597
|
if (keys.COINBASE_PASSPHRASE) {
|
|
14627
|
-
lines.push(
|
|
14598
|
+
lines.push(formatEnvLine("COINBASE_PASSPHRASE", keys.COINBASE_PASSPHRASE));
|
|
14628
14599
|
} else {
|
|
14629
14600
|
lines.push("# COINBASE_PASSPHRASE=");
|
|
14630
14601
|
}
|
|
14631
14602
|
lines.push("");
|
|
14632
14603
|
lines.push("# Kraken");
|
|
14633
14604
|
if (keys.KRAKEN_API_KEY) {
|
|
14634
|
-
lines.push(
|
|
14605
|
+
lines.push(formatEnvLine("KRAKEN_API_KEY", keys.KRAKEN_API_KEY));
|
|
14635
14606
|
} else {
|
|
14636
14607
|
lines.push("# KRAKEN_API_KEY=");
|
|
14637
14608
|
}
|
|
14638
14609
|
if (keys.KRAKEN_API_SECRET) {
|
|
14639
|
-
lines.push(
|
|
14610
|
+
lines.push(formatEnvLine("KRAKEN_API_SECRET", keys.KRAKEN_API_SECRET));
|
|
14640
14611
|
} else {
|
|
14641
14612
|
lines.push("# KRAKEN_API_SECRET=");
|
|
14642
14613
|
}
|
|
14643
14614
|
lines.push("");
|
|
14644
14615
|
lines.push("# Bitfinex");
|
|
14645
14616
|
if (keys.BITFINEX_API_KEY) {
|
|
14646
|
-
lines.push(
|
|
14617
|
+
lines.push(formatEnvLine("BITFINEX_API_KEY", keys.BITFINEX_API_KEY));
|
|
14647
14618
|
} else {
|
|
14648
14619
|
lines.push("# BITFINEX_API_KEY=");
|
|
14649
14620
|
}
|
|
14650
14621
|
if (keys.BITFINEX_API_SECRET) {
|
|
14651
|
-
lines.push(
|
|
14622
|
+
lines.push(formatEnvLine("BITFINEX_API_SECRET", keys.BITFINEX_API_SECRET));
|
|
14652
14623
|
} else {
|
|
14653
14624
|
lines.push("# BITFINEX_API_SECRET=");
|
|
14654
14625
|
}
|
|
14655
14626
|
lines.push("");
|
|
14656
14627
|
lines.push("# Hyperliquid");
|
|
14657
14628
|
if (keys.HYPERLIQUID_PRIVATE_KEY) {
|
|
14658
|
-
lines.push(
|
|
14629
|
+
lines.push(formatEnvLine("HYPERLIQUID_PRIVATE_KEY", keys.HYPERLIQUID_PRIVATE_KEY));
|
|
14659
14630
|
} else {
|
|
14660
14631
|
lines.push("# HYPERLIQUID_PRIVATE_KEY=");
|
|
14661
14632
|
}
|
|
14633
|
+
lines.push("");
|
|
14634
|
+
lines.push("# Uniswap");
|
|
14635
|
+
if (keys.UNISWAP_API_KEY) {
|
|
14636
|
+
lines.push(formatEnvLine("UNISWAP_API_KEY", keys.UNISWAP_API_KEY));
|
|
14637
|
+
} else {
|
|
14638
|
+
lines.push("# UNISWAP_API_KEY=");
|
|
14639
|
+
}
|
|
14640
|
+
lines.push("");
|
|
14641
|
+
lines.push("# The Graph (subgraph queries for DeFi protocols)");
|
|
14642
|
+
if (keys.THEGRAPH_API_KEY) {
|
|
14643
|
+
lines.push(formatEnvLine("THEGRAPH_API_KEY", keys.THEGRAPH_API_KEY));
|
|
14644
|
+
} else {
|
|
14645
|
+
lines.push("# THEGRAPH_API_KEY=");
|
|
14646
|
+
}
|
|
14647
|
+
lines.push("");
|
|
14648
|
+
lines.push("# ---- Blockchain Networks ----");
|
|
14649
|
+
lines.push("");
|
|
14650
|
+
lines.push("# Solana (DeFi, token swaps, staking, lending \u2014 60+ tools)");
|
|
14651
|
+
if (keys.SOLANA_PRIVATE_KEY) {
|
|
14652
|
+
lines.push(formatEnvLine("SOLANA_PRIVATE_KEY", keys.SOLANA_PRIVATE_KEY));
|
|
14653
|
+
} else {
|
|
14654
|
+
lines.push("# SOLANA_PRIVATE_KEY=");
|
|
14655
|
+
}
|
|
14656
|
+
if (keys.SOLANA_RPC_URL) {
|
|
14657
|
+
lines.push(formatEnvLine("SOLANA_RPC_URL", keys.SOLANA_RPC_URL));
|
|
14658
|
+
} else {
|
|
14659
|
+
lines.push("# SOLANA_RPC_URL=https://api.mainnet-beta.solana.com");
|
|
14660
|
+
}
|
|
14661
|
+
lines.push("");
|
|
14662
|
+
lines.push("# Polkadot (cross-chain swaps, staking, governance)");
|
|
14663
|
+
if (keys.POLKADOT_MNEMONIC) {
|
|
14664
|
+
lines.push(formatEnvLine("POLKADOT_MNEMONIC", keys.POLKADOT_MNEMONIC));
|
|
14665
|
+
} else {
|
|
14666
|
+
lines.push("# POLKADOT_MNEMONIC=");
|
|
14667
|
+
}
|
|
14668
|
+
if (keys.POLKADOT_PRIVATE_KEY) {
|
|
14669
|
+
lines.push(formatEnvLine("POLKADOT_PRIVATE_KEY", keys.POLKADOT_PRIVATE_KEY));
|
|
14670
|
+
} else {
|
|
14671
|
+
lines.push("# POLKADOT_PRIVATE_KEY=");
|
|
14672
|
+
}
|
|
14673
|
+
lines.push("");
|
|
14674
|
+
lines.push("# Chainlink Data Streams (real-time institutional-grade price feeds)");
|
|
14675
|
+
if (keys.CHAINLINK_API_KEY) {
|
|
14676
|
+
lines.push(formatEnvLine("CHAINLINK_API_KEY", keys.CHAINLINK_API_KEY));
|
|
14677
|
+
} else {
|
|
14678
|
+
lines.push("# CHAINLINK_API_KEY=");
|
|
14679
|
+
}
|
|
14680
|
+
if (keys.CHAINLINK_API_SECRET) {
|
|
14681
|
+
lines.push(formatEnvLine("CHAINLINK_API_SECRET", keys.CHAINLINK_API_SECRET));
|
|
14682
|
+
} else {
|
|
14683
|
+
lines.push("# CHAINLINK_API_SECRET=");
|
|
14684
|
+
}
|
|
14685
|
+
lines.push("");
|
|
14686
|
+
lines.push("# EVM Private Key (Chainlink CCIP cross-chain bridging)");
|
|
14687
|
+
if (keys.EVM_PRIVATE_KEY) {
|
|
14688
|
+
lines.push(formatEnvLine("EVM_PRIVATE_KEY", keys.EVM_PRIVATE_KEY));
|
|
14689
|
+
} else {
|
|
14690
|
+
lines.push("# EVM_PRIVATE_KEY=0x...");
|
|
14691
|
+
}
|
|
14692
|
+
lines.push("");
|
|
14693
|
+
lines.push("# Coinbase CDP (Base smart wallets, onchain actions)");
|
|
14694
|
+
if (keys.CDP_API_KEY_ID) {
|
|
14695
|
+
lines.push(formatEnvLine("CDP_API_KEY_ID", keys.CDP_API_KEY_ID));
|
|
14696
|
+
} else {
|
|
14697
|
+
lines.push("# CDP_API_KEY_ID=");
|
|
14698
|
+
}
|
|
14699
|
+
if (keys.CDP_API_KEY_SECRET) {
|
|
14700
|
+
lines.push(formatEnvLine("CDP_API_KEY_SECRET", keys.CDP_API_KEY_SECRET));
|
|
14701
|
+
} else {
|
|
14702
|
+
lines.push("# CDP_API_KEY_SECRET=");
|
|
14703
|
+
}
|
|
14704
|
+
if (keys.CDP_WALLET_SECRET) {
|
|
14705
|
+
lines.push(formatEnvLine("CDP_WALLET_SECRET", keys.CDP_WALLET_SECRET));
|
|
14706
|
+
} else {
|
|
14707
|
+
lines.push("# CDP_WALLET_SECRET=");
|
|
14708
|
+
}
|
|
14709
|
+
if (keys.CDP_NETWORK_ID) {
|
|
14710
|
+
lines.push(formatEnvLine("CDP_NETWORK_ID", keys.CDP_NETWORK_ID));
|
|
14711
|
+
} else {
|
|
14712
|
+
lines.push("# CDP_NETWORK_ID=base-mainnet");
|
|
14713
|
+
}
|
|
14714
|
+
lines.push("");
|
|
14715
|
+
lines.push("# Basescan (optional \u2014 enables Base L2 whale detection, holder queries)");
|
|
14716
|
+
if (keys.BASESCAN_API_KEY) {
|
|
14717
|
+
lines.push(formatEnvLine("BASESCAN_API_KEY", keys.BASESCAN_API_KEY));
|
|
14718
|
+
} else {
|
|
14719
|
+
lines.push("# BASESCAN_API_KEY=");
|
|
14720
|
+
}
|
|
14721
|
+
lines.push("");
|
|
14722
|
+
lines.push("# ---- Gordon LLM Provider ----");
|
|
14723
|
+
if (keys.GORDON_PROVIDER) {
|
|
14724
|
+
lines.push(formatEnvLine("GORDON_PROVIDER", keys.GORDON_PROVIDER));
|
|
14725
|
+
} else {
|
|
14726
|
+
lines.push("# GORDON_PROVIDER=openai");
|
|
14727
|
+
}
|
|
14728
|
+
if (keys.GORDON_MODEL) {
|
|
14729
|
+
lines.push(formatEnvLine("GORDON_MODEL", keys.GORDON_MODEL));
|
|
14730
|
+
} else {
|
|
14731
|
+
lines.push("# GORDON_MODEL=gpt-4o");
|
|
14732
|
+
}
|
|
14662
14733
|
await Bun.write(GORDON_ENV_PATH, lines.join(`
|
|
14663
14734
|
`) + `
|
|
14664
14735
|
`);
|
|
@@ -14698,7 +14769,7 @@ async function isReadyForLLM() {
|
|
|
14698
14769
|
}
|
|
14699
14770
|
return { ready: true };
|
|
14700
14771
|
}
|
|
14701
|
-
var GORDON_ENV_PATH, CWD_ENV_PATH;
|
|
14772
|
+
var GORDON_ENV_PATH, CWD_ENV_PATH, ENV_KEY_NAMES;
|
|
14702
14773
|
var init_env = __esm(() => {
|
|
14703
14774
|
init_env_validation();
|
|
14704
14775
|
init_keyring();
|
|
@@ -14706,6 +14777,38 @@ var init_env = __esm(() => {
|
|
|
14706
14777
|
init_env_validation();
|
|
14707
14778
|
GORDON_ENV_PATH = join3(GORDON_DIR, ".env");
|
|
14708
14779
|
CWD_ENV_PATH = join3(process.cwd(), ".env");
|
|
14780
|
+
ENV_KEY_NAMES = [
|
|
14781
|
+
"OPENAI_API_KEY",
|
|
14782
|
+
"DEDALUS_API_KEY",
|
|
14783
|
+
"BINANCE_API_KEY",
|
|
14784
|
+
"BINANCE_API_SECRET",
|
|
14785
|
+
"BINANCE_US_API_KEY",
|
|
14786
|
+
"BINANCE_US_API_SECRET",
|
|
14787
|
+
"COINBASE_API_KEY",
|
|
14788
|
+
"COINBASE_API_SECRET",
|
|
14789
|
+
"COINBASE_PASSPHRASE",
|
|
14790
|
+
"KRAKEN_API_KEY",
|
|
14791
|
+
"KRAKEN_API_SECRET",
|
|
14792
|
+
"BITFINEX_API_KEY",
|
|
14793
|
+
"BITFINEX_API_SECRET",
|
|
14794
|
+
"HYPERLIQUID_PRIVATE_KEY",
|
|
14795
|
+
"UNISWAP_API_KEY",
|
|
14796
|
+
"THEGRAPH_API_KEY",
|
|
14797
|
+
"GORDON_PROVIDER",
|
|
14798
|
+
"GORDON_MODEL",
|
|
14799
|
+
"SOLANA_PRIVATE_KEY",
|
|
14800
|
+
"SOLANA_RPC_URL",
|
|
14801
|
+
"POLKADOT_MNEMONIC",
|
|
14802
|
+
"POLKADOT_PRIVATE_KEY",
|
|
14803
|
+
"CHAINLINK_API_KEY",
|
|
14804
|
+
"CHAINLINK_API_SECRET",
|
|
14805
|
+
"EVM_PRIVATE_KEY",
|
|
14806
|
+
"CDP_API_KEY_ID",
|
|
14807
|
+
"CDP_API_KEY_SECRET",
|
|
14808
|
+
"CDP_WALLET_SECRET",
|
|
14809
|
+
"CDP_NETWORK_ID",
|
|
14810
|
+
"BASESCAN_API_KEY"
|
|
14811
|
+
];
|
|
14709
14812
|
});
|
|
14710
14813
|
|
|
14711
14814
|
// src/types/config.ts
|
|
@@ -299020,6 +299123,48 @@ var init_websocket = __esm(() => {
|
|
|
299020
299123
|
}
|
|
299021
299124
|
};
|
|
299022
299125
|
});
|
|
299126
|
+
|
|
299127
|
+
// src/infra/exchange/types.ts
|
|
299128
|
+
function resolveExchangeCredentials(config3) {
|
|
299129
|
+
const envMap = config3.type in EXCHANGE_ENV_MAP ? EXCHANGE_ENV_MAP[config3.type] : undefined;
|
|
299130
|
+
const isRedacted = (v) => !v || v === "***";
|
|
299131
|
+
let apiKey = config3.apiKey;
|
|
299132
|
+
let apiSecret = config3.apiSecret;
|
|
299133
|
+
let passphrase = config3.passphrase;
|
|
299134
|
+
let walletPrivateKey = config3.walletPrivateKey;
|
|
299135
|
+
if (envMap) {
|
|
299136
|
+
if (isRedacted(apiKey) && envMap.key)
|
|
299137
|
+
apiKey = process.env[envMap.key] || "";
|
|
299138
|
+
if (isRedacted(apiSecret) && envMap.secret)
|
|
299139
|
+
apiSecret = process.env[envMap.secret] || "";
|
|
299140
|
+
if (isRedacted(passphrase) && envMap.passphrase)
|
|
299141
|
+
passphrase = process.env[envMap.passphrase] || undefined;
|
|
299142
|
+
if (isRedacted(walletPrivateKey) && envMap.wallet)
|
|
299143
|
+
walletPrivateKey = process.env[envMap.wallet] || undefined;
|
|
299144
|
+
}
|
|
299145
|
+
if (isRedacted(apiKey))
|
|
299146
|
+
apiKey = "";
|
|
299147
|
+
if (isRedacted(apiSecret))
|
|
299148
|
+
apiSecret = "";
|
|
299149
|
+
if (isRedacted(passphrase))
|
|
299150
|
+
passphrase = undefined;
|
|
299151
|
+
if (isRedacted(walletPrivateKey))
|
|
299152
|
+
walletPrivateKey = undefined;
|
|
299153
|
+
return { apiKey, apiSecret, passphrase, sandbox: config3.sandbox, walletPrivateKey };
|
|
299154
|
+
}
|
|
299155
|
+
var EXCHANGE_ENV_MAP;
|
|
299156
|
+
var init_types11 = __esm(() => {
|
|
299157
|
+
EXCHANGE_ENV_MAP = {
|
|
299158
|
+
binance: { key: "BINANCE_API_KEY", secret: "BINANCE_API_SECRET" },
|
|
299159
|
+
binance_us: { key: "BINANCE_US_API_KEY", secret: "BINANCE_US_API_SECRET" },
|
|
299160
|
+
coinbase: { key: "COINBASE_API_KEY", secret: "COINBASE_API_SECRET", passphrase: "COINBASE_PASSPHRASE" },
|
|
299161
|
+
kraken: { key: "KRAKEN_API_KEY", secret: "KRAKEN_API_SECRET" },
|
|
299162
|
+
bitfinex: { key: "BITFINEX_API_KEY", secret: "BITFINEX_API_SECRET" },
|
|
299163
|
+
hyperliquid: { wallet: "HYPERLIQUID_PRIVATE_KEY" },
|
|
299164
|
+
uniswap: { key: "UNISWAP_API_KEY" }
|
|
299165
|
+
};
|
|
299166
|
+
});
|
|
299167
|
+
|
|
299023
299168
|
// src/infra/retry.ts
|
|
299024
299169
|
class CircuitBreaker {
|
|
299025
299170
|
state = "CLOSED";
|
|
@@ -324843,7 +324988,7 @@ function isUniswapXRouting(routing) {
|
|
|
324843
324988
|
return ["DUTCH_V2", "DUTCH_V3", "DUTCH_LIMIT", "PRIORITY"].includes(routing);
|
|
324844
324989
|
}
|
|
324845
324990
|
var NATIVE_TOKEN = "0x0000000000000000000000000000000000000000", GAS_BUFFER_PERCENT = 0.15, WRAPPED_NATIVE, USDC_ADDRESSES, SUPPORTED_CHAIN_IDS, CHAIN_NAMES;
|
|
324846
|
-
var
|
|
324991
|
+
var init_types12 = __esm(() => {
|
|
324847
324992
|
WRAPPED_NATIVE = {
|
|
324848
324993
|
1: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
|
|
324849
324994
|
10: "0x4200000000000000000000000000000000000006",
|
|
@@ -325006,7 +325151,7 @@ class UniswapTokenList {
|
|
|
325006
325151
|
}
|
|
325007
325152
|
var TOKEN_LIST_URL = "https://tokens.uniswap.org", CACHE_TTL_MS2;
|
|
325008
325153
|
var init_token_list = __esm(() => {
|
|
325009
|
-
|
|
325154
|
+
init_types12();
|
|
325010
325155
|
CACHE_TTL_MS2 = 24 * 60 * 60 * 1000;
|
|
325011
325156
|
});
|
|
325012
325157
|
|
|
@@ -325251,7 +325396,7 @@ class UniswapClient {
|
|
|
325251
325396
|
}
|
|
325252
325397
|
var BASE_URL4 = "https://trade-api.gateway.uniswap.org/v1", MAX_RETRIES2 = 3, BASE_DELAY_MS = 500, QUOTE_MAX_AGE_MS = 30000, RATE_LIMIT_CONFIG6;
|
|
325253
325398
|
var init_client9 = __esm(() => {
|
|
325254
|
-
|
|
325399
|
+
init_types12();
|
|
325255
325400
|
init_token_list();
|
|
325256
325401
|
RATE_LIMIT_CONFIG6 = {
|
|
325257
325402
|
maxRequestsPerMinute: 60,
|
|
@@ -326017,7 +326162,7 @@ var init_uniswap = __esm(() => {
|
|
|
326017
326162
|
init_token_list();
|
|
326018
326163
|
init_subgraph();
|
|
326019
326164
|
init_subgraph_types();
|
|
326020
|
-
|
|
326165
|
+
init_types12();
|
|
326021
326166
|
});
|
|
326022
326167
|
|
|
326023
326168
|
// src/infra/exchange/adapters/uniswap.ts
|
|
@@ -326307,7 +326452,7 @@ class UniswapAdapter {
|
|
|
326307
326452
|
var init_uniswap2 = __esm(() => {
|
|
326308
326453
|
init_uniswap();
|
|
326309
326454
|
init_subgraph();
|
|
326310
|
-
|
|
326455
|
+
init_types12();
|
|
326311
326456
|
});
|
|
326312
326457
|
|
|
326313
326458
|
// src/infra/exchange/factory.ts
|
|
@@ -326415,6 +326560,7 @@ var init_exchange = __esm(() => {
|
|
|
326415
326560
|
init_bitfinex3();
|
|
326416
326561
|
init_hyperliquid3();
|
|
326417
326562
|
init_uniswap2();
|
|
326563
|
+
init_types11();
|
|
326418
326564
|
});
|
|
326419
326565
|
|
|
326420
326566
|
// src/core/validator.ts
|
|
@@ -338701,7 +338847,7 @@ var init_iceberg = __esm(() => {
|
|
|
338701
338847
|
|
|
338702
338848
|
// src/core/execution/algorithms/types.ts
|
|
338703
338849
|
var ExecutionAlgorithmSchema, DEFAULT_TWAP_CONFIG, DEFAULT_VWAP_CONFIG, DEFAULT_ICEBERG_CONFIG;
|
|
338704
|
-
var
|
|
338850
|
+
var init_types13 = __esm(() => {
|
|
338705
338851
|
init_zod();
|
|
338706
338852
|
ExecutionAlgorithmSchema = exports_external.enum(["TWAP", "VWAP", "ICEBERG"]);
|
|
338707
338853
|
DEFAULT_TWAP_CONFIG = {
|
|
@@ -338842,7 +338988,7 @@ var init_session_manager = __esm(() => {
|
|
|
338842
338988
|
init_twap();
|
|
338843
338989
|
init_vwap();
|
|
338844
338990
|
init_iceberg();
|
|
338845
|
-
|
|
338991
|
+
init_types13();
|
|
338846
338992
|
logger70 = createModuleLogger("execution-session-manager");
|
|
338847
338993
|
});
|
|
338848
338994
|
|
|
@@ -338939,7 +339085,7 @@ function describeIntent(intent2) {
|
|
|
338939
339085
|
}
|
|
338940
339086
|
var DURATION_PATTERNS;
|
|
338941
339087
|
var init_intent_parser = __esm(() => {
|
|
338942
|
-
|
|
339088
|
+
init_types13();
|
|
338943
339089
|
DURATION_PATTERNS = [
|
|
338944
339090
|
{ pattern: /(\d+)\s*h(?:ours?)?/i, toMs: (m) => parseInt(m[1], 10) * 60 * 60 * 1000 },
|
|
338945
339091
|
{ pattern: /(\d+)\s*m(?:in(?:utes?)?)?/i, toMs: (m) => parseInt(m[1], 10) * 60 * 1000 },
|
|
@@ -341123,7 +341269,7 @@ var init_risk_management2 = __esm(() => {
|
|
|
341123
341269
|
});
|
|
341124
341270
|
|
|
341125
341271
|
// src/strategies/types.ts
|
|
341126
|
-
var
|
|
341272
|
+
var init_types14 = () => {};
|
|
341127
341273
|
|
|
341128
341274
|
// src/strategies/registry.ts
|
|
341129
341275
|
class StrategyRegistry {
|
|
@@ -349447,7 +349593,7 @@ var init_dsl = __esm(() => {
|
|
|
349447
349593
|
|
|
349448
349594
|
// src/strategies/index.ts
|
|
349449
349595
|
var init_strategies = __esm(() => {
|
|
349450
|
-
|
|
349596
|
+
init_types14();
|
|
349451
349597
|
init_registry3();
|
|
349452
349598
|
init_base_strategy();
|
|
349453
349599
|
init_ensemble();
|
|
@@ -349967,7 +350113,7 @@ var init_strategies2 = __esm(() => {
|
|
|
349967
350113
|
|
|
349968
350114
|
// src/backtest/types.ts
|
|
349969
350115
|
var DEFAULT_BACKTEST_CONFIG, DEFAULT_BACKTEST_PARAMS;
|
|
349970
|
-
var
|
|
350116
|
+
var init_types15 = __esm(() => {
|
|
349971
350117
|
DEFAULT_BACKTEST_CONFIG = {
|
|
349972
350118
|
timeframe: "4h",
|
|
349973
350119
|
days: 90,
|
|
@@ -350935,7 +351081,7 @@ function runBacktest(strategy, data4, params, strategyParams) {
|
|
|
350935
351081
|
return engine.run(strategy, data4, strategyParams);
|
|
350936
351082
|
}
|
|
350937
351083
|
var init_engine2 = __esm(() => {
|
|
350938
|
-
|
|
351084
|
+
init_types15();
|
|
350939
351085
|
init_indicators();
|
|
350940
351086
|
});
|
|
350941
351087
|
|
|
@@ -353948,7 +354094,7 @@ function standardDeviation(values) {
|
|
|
353948
354094
|
}
|
|
353949
354095
|
var logger78, DEFAULT_WALK_FORWARD_CONFIG;
|
|
353950
354096
|
var init_walk_forward = __esm(() => {
|
|
353951
|
-
|
|
354097
|
+
init_types15();
|
|
353952
354098
|
init_engine2();
|
|
353953
354099
|
init_logger2();
|
|
353954
354100
|
logger78 = createModuleLogger("walk-forward");
|
|
@@ -354616,7 +354762,7 @@ var init_backtest = __esm(async () => {
|
|
|
354616
354762
|
init_tools();
|
|
354617
354763
|
init_zod();
|
|
354618
354764
|
init_strategies();
|
|
354619
|
-
|
|
354765
|
+
init_types15();
|
|
354620
354766
|
init_engine2();
|
|
354621
354767
|
init_historical();
|
|
354622
354768
|
init_export();
|
|
@@ -358976,7 +359122,7 @@ var init_autonomous = __esm(() => {
|
|
|
358976
359122
|
|
|
358977
359123
|
// src/infra/base/types.ts
|
|
358978
359124
|
var BASE_CHAIN_CONFIG, BASE_TOKENS, REGISTRY_API_BASE = "https://base.org/api/registry";
|
|
358979
|
-
var
|
|
359125
|
+
var init_types16 = __esm(() => {
|
|
358980
359126
|
BASE_CHAIN_CONFIG = {
|
|
358981
359127
|
mainnet: {
|
|
358982
359128
|
chainId: 8453,
|
|
@@ -359062,7 +359208,7 @@ function formatRegistryEntry(entry) {
|
|
|
359062
359208
|
};
|
|
359063
359209
|
}
|
|
359064
359210
|
var init_registry4 = __esm(() => {
|
|
359065
|
-
|
|
359211
|
+
init_types16();
|
|
359066
359212
|
});
|
|
359067
359213
|
|
|
359068
359214
|
// src/infra/base/chain.ts
|
|
@@ -359131,7 +359277,7 @@ async function getBaseTokenBalance(tokenAddress, walletAddress, decimals = 18, n
|
|
|
359131
359277
|
return parseFloat(`${intPart}.${fracPart}`);
|
|
359132
359278
|
}
|
|
359133
359279
|
var init_chain2 = __esm(() => {
|
|
359134
|
-
|
|
359280
|
+
init_types16();
|
|
359135
359281
|
});
|
|
359136
359282
|
|
|
359137
359283
|
// src/infra/base/basescan.ts
|
|
@@ -359381,7 +359527,7 @@ async function detectNewListings(opts = {}) {
|
|
|
359381
359527
|
}
|
|
359382
359528
|
var init_signals = __esm(() => {
|
|
359383
359529
|
init_dexscreener();
|
|
359384
|
-
|
|
359530
|
+
init_types16();
|
|
359385
359531
|
});
|
|
359386
359532
|
|
|
359387
359533
|
// src/infra/base/index.ts
|
|
@@ -359390,7 +359536,7 @@ var init_base4 = __esm(() => {
|
|
|
359390
359536
|
init_chain2();
|
|
359391
359537
|
init_dexscreener();
|
|
359392
359538
|
init_signals();
|
|
359393
|
-
|
|
359539
|
+
init_types16();
|
|
359394
359540
|
});
|
|
359395
359541
|
|
|
359396
359542
|
// src/infra/agents/tools/base-onchain.ts
|
|
@@ -359625,7 +359771,7 @@ var init_base_onchain = __esm(() => {
|
|
|
359625
359771
|
|
|
359626
359772
|
// src/infra/agentkit/types.ts
|
|
359627
359773
|
var CDP_ENV_KEYS;
|
|
359628
|
-
var
|
|
359774
|
+
var init_types17 = __esm(() => {
|
|
359629
359775
|
CDP_ENV_KEYS = {
|
|
359630
359776
|
API_KEY_ID: "CDP_API_KEY_ID",
|
|
359631
359777
|
API_KEY_SECRET: "CDP_API_KEY_SECRET",
|
|
@@ -804272,7 +804418,7 @@ var init_client10 = __esm(() => {
|
|
|
804272
804418
|
});
|
|
804273
804419
|
|
|
804274
804420
|
// node_modules/@across-protocol/app-sdk/dist/types/index.js
|
|
804275
|
-
var
|
|
804421
|
+
var init_types18 = () => {};
|
|
804276
804422
|
|
|
804277
804423
|
// node_modules/@across-protocol/app-sdk/dist/index.js
|
|
804278
804424
|
var exports_dist4 = {};
|
|
@@ -804340,7 +804486,7 @@ __export(exports_dist4, {
|
|
|
804340
804486
|
});
|
|
804341
804487
|
var init_dist19 = __esm(() => {
|
|
804342
804488
|
init_client10();
|
|
804343
|
-
|
|
804489
|
+
init_types18();
|
|
804344
804490
|
init_actions();
|
|
804345
804491
|
init_errors14();
|
|
804346
804492
|
init_utils12();
|
|
@@ -1196061,14 +1196207,14 @@ function getAvailableActionNames() {
|
|
|
1196061
1196207
|
}
|
|
1196062
1196208
|
var import_agentkit, _agentKit = null, _actions = null;
|
|
1196063
1196209
|
var init_provider3 = __esm(() => {
|
|
1196064
|
-
|
|
1196210
|
+
init_types17();
|
|
1196065
1196211
|
import_agentkit = __toESM(require_dist25(), 1);
|
|
1196066
1196212
|
});
|
|
1196067
1196213
|
|
|
1196068
1196214
|
// src/infra/agentkit/index.ts
|
|
1196069
1196215
|
var init_agentkit = __esm(() => {
|
|
1196070
1196216
|
init_provider3();
|
|
1196071
|
-
|
|
1196217
|
+
init_types17();
|
|
1196072
1196218
|
});
|
|
1196073
1196219
|
|
|
1196074
1196220
|
// src/infra/agents/tools/agentkit-onchain.ts
|
|
@@ -1196372,7 +1196518,7 @@ var init_agentkit_defi = __esm(() => {
|
|
|
1196372
1196518
|
|
|
1196373
1196519
|
// src/infra/polkadotkit/types.ts
|
|
1196374
1196520
|
var POLKADOT_ENV_KEYS;
|
|
1196375
|
-
var
|
|
1196521
|
+
var init_types19 = __esm(() => {
|
|
1196376
1196522
|
POLKADOT_ENV_KEYS = {
|
|
1196377
1196523
|
PRIVATE_KEY: "POLKADOT_PRIVATE_KEY",
|
|
1196378
1196524
|
MNEMONIC: "POLKADOT_MNEMONIC",
|
|
@@ -1199481,7 +1199627,7 @@ var init_multisig = __esm(() => {
|
|
|
1199481
1199627
|
|
|
1199482
1199628
|
// node_modules/@polkadot-api/substrate-bindings/dist/esm/trie/types.mjs
|
|
1199483
1199629
|
var TrieNodeHeaders;
|
|
1199484
|
-
var
|
|
1199630
|
+
var init_types20 = __esm(() => {
|
|
1199485
1199631
|
TrieNodeHeaders = {
|
|
1199486
1199632
|
Leaf: "Leaf",
|
|
1199487
1199633
|
Branch: "Branch",
|
|
@@ -1199514,7 +1199660,7 @@ var varHex, allHex, hex32, byte, getHeader = (bytes3) => {
|
|
|
1199514
1199660
|
var init_node_decoder = __esm(() => {
|
|
1199515
1199661
|
init_scale_ts();
|
|
1199516
1199662
|
init_Hex3();
|
|
1199517
|
-
|
|
1199663
|
+
init_types20();
|
|
1199518
1199664
|
varHex = Hex().dec;
|
|
1199519
1199665
|
allHex = Hex(Infinity).dec;
|
|
1199520
1199666
|
hex32 = Hex(32).dec;
|
|
@@ -1199718,7 +1199864,7 @@ var init_esm12 = __esm(() => {
|
|
|
1199718
1199864
|
init_enum();
|
|
1199719
1199865
|
init_ss58_util();
|
|
1199720
1199866
|
init_multisig();
|
|
1199721
|
-
|
|
1199867
|
+
init_types20();
|
|
1199722
1199868
|
init_node_decoder();
|
|
1199723
1199869
|
init_proofs();
|
|
1199724
1199870
|
});
|
|
@@ -1294053,7 +1294199,7 @@ var init_fixed_point_number = __esm(() => {
|
|
|
1294053
1294199
|
|
|
1294054
1294200
|
// node_modules/@acala-network/sdk-core/dist/esm/types.js
|
|
1294055
1294201
|
var TokenType;
|
|
1294056
|
-
var
|
|
1294202
|
+
var init_types21 = __esm(() => {
|
|
1294057
1294203
|
(function(TokenType2) {
|
|
1294058
1294204
|
TokenType2[TokenType2["BASIC"] = 0] = "BASIC";
|
|
1294059
1294205
|
TokenType2[TokenType2["DEX_SHARE"] = 1] = "DEX_SHARE";
|
|
@@ -1294290,7 +1294436,7 @@ var import_isArray;
|
|
|
1294290
1294436
|
var init_converter2 = __esm(() => {
|
|
1294291
1294437
|
init_errors25();
|
|
1294292
1294438
|
init_token();
|
|
1294293
|
-
|
|
1294439
|
+
init_types21();
|
|
1294294
1294440
|
import_isArray = __toESM(require_isArray(), 1);
|
|
1294295
1294441
|
});
|
|
1294296
1294442
|
|
|
@@ -1294332,7 +1294478,7 @@ function sortTokenByName(a4, b2) {
|
|
|
1294332
1294478
|
var TOKEN_TYPE_WEIGHTS, TOKEN_SORT;
|
|
1294333
1294479
|
var init_sort_token = __esm(() => {
|
|
1294334
1294480
|
init_converter2();
|
|
1294335
|
-
|
|
1294481
|
+
init_types21();
|
|
1294336
1294482
|
TOKEN_TYPE_WEIGHTS = {
|
|
1294337
1294483
|
[TokenType.BASIC]: 9,
|
|
1294338
1294484
|
[TokenType.DEX_SHARE]: 8,
|
|
@@ -1294543,7 +1294689,7 @@ class Token {
|
|
|
1294543
1294689
|
var STABLE_ASSET_POOLS;
|
|
1294544
1294690
|
var init_token = __esm(() => {
|
|
1294545
1294691
|
init_util7();
|
|
1294546
|
-
|
|
1294692
|
+
init_types21();
|
|
1294547
1294693
|
init_converter2();
|
|
1294548
1294694
|
init_sort_token();
|
|
1294549
1294695
|
init_fixed_point_number();
|
|
@@ -1294665,14 +1294811,14 @@ var init_esm28 = __esm(() => {
|
|
|
1294665
1294811
|
init_token_balance();
|
|
1294666
1294812
|
init_token_pair();
|
|
1294667
1294813
|
init_events4();
|
|
1294668
|
-
|
|
1294814
|
+
init_types21();
|
|
1294669
1294815
|
init_converter2();
|
|
1294670
1294816
|
init_utils35();
|
|
1294671
1294817
|
});
|
|
1294672
1294818
|
|
|
1294673
1294819
|
// node_modules/@acala-network/sdk/dist/esm/types.js
|
|
1294674
1294820
|
var ChainType;
|
|
1294675
|
-
var
|
|
1294821
|
+
var init_types22 = __esm(() => {
|
|
1294676
1294822
|
(function(ChainType2) {
|
|
1294677
1294823
|
ChainType2["ACALA"] = "ACALA";
|
|
1294678
1294824
|
ChainType2["MANDALA"] = "MANDALA";
|
|
@@ -1294707,7 +1294853,7 @@ function getChainType(type2) {
|
|
|
1294707
1294853
|
return ChainType.MANDALA;
|
|
1294708
1294854
|
}
|
|
1294709
1294855
|
var init_get_chain_type = __esm(() => {
|
|
1294710
|
-
|
|
1294856
|
+
init_types22();
|
|
1294711
1294857
|
});
|
|
1294712
1294858
|
|
|
1294713
1294859
|
// node_modules/@acala-network/sdk/node_modules/lru-cache/index.mjs
|
|
@@ -1295805,12 +1295951,12 @@ var init_listener = __esm(() => {
|
|
|
1295805
1295951
|
});
|
|
1295806
1295952
|
|
|
1295807
1295953
|
// node_modules/@acala-network/sdk/dist/esm/utils/chain-listener/types.js
|
|
1295808
|
-
var
|
|
1295954
|
+
var init_types23 = () => {};
|
|
1295809
1295955
|
|
|
1295810
1295956
|
// node_modules/@acala-network/sdk/dist/esm/utils/chain-listener/index.js
|
|
1295811
1295957
|
var init_chain_listener = __esm(() => {
|
|
1295812
1295958
|
init_listener();
|
|
1295813
|
-
|
|
1295959
|
+
init_types23();
|
|
1295814
1295960
|
});
|
|
1295815
1295961
|
|
|
1295816
1295962
|
// node_modules/@acala-network/sdk/dist/esm/utils/storage/error.js
|
|
@@ -1296144,7 +1296290,7 @@ function getAPY(rewardRate, commissionRate, eraFrequency, chain2) {
|
|
|
1296144
1296290
|
}
|
|
1296145
1296291
|
var ESTIMATE_BLOCK_TIME, YEAR;
|
|
1296146
1296292
|
var init_get_apy = __esm(() => {
|
|
1296147
|
-
|
|
1296293
|
+
init_types22();
|
|
1296148
1296294
|
ESTIMATE_BLOCK_TIME = {
|
|
1296149
1296295
|
[ChainType.ACALA]: 6 * 1000,
|
|
1296150
1296296
|
[ChainType.KARURA]: 6 * 1000,
|
|
@@ -1297033,7 +1297179,7 @@ var import_rxjs55, import_operators6;
|
|
|
1297033
1297179
|
var init_liquidity = __esm(() => {
|
|
1297034
1297180
|
init_esm28();
|
|
1297035
1297181
|
init_util7();
|
|
1297036
|
-
|
|
1297182
|
+
init_types22();
|
|
1297037
1297183
|
init_get_chain_type();
|
|
1297038
1297184
|
init_errors27();
|
|
1297039
1297185
|
init_storage12();
|
|
@@ -1298712,7 +1298858,7 @@ var init_oracle_price_provider = __esm(() => {
|
|
|
1298712
1298858
|
|
|
1298713
1298859
|
// node_modules/@acala-network/sdk/dist/esm/wallet/price-provider/types.js
|
|
1298714
1298860
|
var PriceProviderType;
|
|
1298715
|
-
var
|
|
1298861
|
+
var init_types24 = __esm(() => {
|
|
1298716
1298862
|
(function(PriceProviderType2) {
|
|
1298717
1298863
|
PriceProviderType2[PriceProviderType2["AGGREGATE"] = 0] = "AGGREGATE";
|
|
1298718
1298864
|
PriceProviderType2[PriceProviderType2["MARKET"] = 1] = "MARKET";
|
|
@@ -1591307,7 +1591453,7 @@ var init_acala3 = __esm(() => {
|
|
|
1591307
1591453
|
init_esm28();
|
|
1591308
1591454
|
init_storage11();
|
|
1591309
1591455
|
init_create_token_list();
|
|
1591310
|
-
|
|
1591456
|
+
init_types22();
|
|
1591311
1591457
|
init_get_chain_type();
|
|
1591312
1591458
|
init_errors28();
|
|
1591313
1591459
|
import_rxjs61 = __toESM(require_cjs10(), 1);
|
|
@@ -1606301,7 +1606447,7 @@ var init_lookup3 = () => {};
|
|
|
1606301
1606447
|
|
|
1606302
1606448
|
// node_modules/@polkadot/types-create/types/types.js
|
|
1606303
1606449
|
var TypeDefInfo;
|
|
1606304
|
-
var
|
|
1606450
|
+
var init_types25 = __esm(() => {
|
|
1606305
1606451
|
(function(TypeDefInfo2) {
|
|
1606306
1606452
|
TypeDefInfo2[TypeDefInfo2["BTreeMap"] = 0] = "BTreeMap";
|
|
1606307
1606453
|
TypeDefInfo2[TypeDefInfo2["BTreeSet"] = 1] = "BTreeSet";
|
|
@@ -1606330,9 +1606476,9 @@ var init_types24 = __esm(() => {
|
|
|
1606330
1606476
|
});
|
|
1606331
1606477
|
|
|
1606332
1606478
|
// node_modules/@polkadot/types-create/types/index.js
|
|
1606333
|
-
var
|
|
1606479
|
+
var init_types26 = __esm(() => {
|
|
1606334
1606480
|
init_lookup3();
|
|
1606335
|
-
|
|
1606481
|
+
init_types25();
|
|
1606336
1606482
|
});
|
|
1606337
1606483
|
|
|
1606338
1606484
|
// node_modules/@polkadot/types-codec/node_modules/@polkadot/util/node_modules/@polkadot/x-global/index.js
|
|
@@ -1610964,7 +1611110,7 @@ var KNOWN_INTERNALS, nestedExtraction, wrappedExtraction;
|
|
|
1610964
1611110
|
var init_getTypeDef = __esm(() => {
|
|
1610965
1611111
|
init_types_codec();
|
|
1610966
1611112
|
init_util13();
|
|
1610967
|
-
|
|
1611113
|
+
init_types26();
|
|
1610968
1611114
|
KNOWN_INTERNALS = ["_alias", "_fallback"];
|
|
1610969
1611115
|
nestedExtraction = [
|
|
1610970
1611116
|
["[", "]", TypeDefInfo.VecFixed, _decodeFixedVec],
|
|
@@ -1611062,7 +1611208,7 @@ var infoMapping;
|
|
|
1611062
1611208
|
var init_class2 = __esm(() => {
|
|
1611063
1611209
|
init_types_codec();
|
|
1611064
1611210
|
init_util13();
|
|
1611065
|
-
|
|
1611211
|
+
init_types26();
|
|
1611066
1611212
|
init_getTypeDef();
|
|
1611067
1611213
|
infoMapping = {
|
|
1611068
1611214
|
[TypeDefInfo.BTreeMap]: (_registry2, value2) => createHashMap(BTreeMap, value2),
|
|
@@ -1611239,7 +1611385,7 @@ function withTypeString(registry2, typeDef) {
|
|
|
1611239
1611385
|
var stringIdentity = (value2) => value2.toString(), INFO_WRAP, encoders;
|
|
1611240
1611386
|
var init_encodeTypes = __esm(() => {
|
|
1611241
1611387
|
init_util13();
|
|
1611242
|
-
|
|
1611388
|
+
init_types26();
|
|
1611243
1611389
|
INFO_WRAP = ["BTreeMap", "BTreeSet", "Compact", "HashMap", "Option", "Result", "Vec"];
|
|
1611244
1611390
|
encoders = {
|
|
1611245
1611391
|
[TypeDefInfo.BTreeMap]: (registry2, typeDef) => encodeWithParams(registry2, typeDef, "BTreeMap"),
|
|
@@ -1611322,7 +1611468,7 @@ var init_exports4 = __esm(() => {
|
|
|
1611322
1611468
|
|
|
1611323
1611469
|
// node_modules/@polkadot/types-create/bundle.js
|
|
1611324
1611470
|
var init_bundle15 = __esm(() => {
|
|
1611325
|
-
|
|
1611471
|
+
init_types26();
|
|
1611326
1611472
|
init_exports4();
|
|
1611327
1611473
|
});
|
|
1611328
1611474
|
|
|
@@ -1625771,7 +1625917,7 @@ var init_bundle17 = __esm(() => {
|
|
|
1625771
1625917
|
});
|
|
1625772
1625918
|
|
|
1625773
1625919
|
// node_modules/@polkadot/types/index.js
|
|
1625774
|
-
var
|
|
1625920
|
+
var init_types27 = __esm(() => {
|
|
1625775
1625921
|
init_packageDetect15();
|
|
1625776
1625922
|
init_bundle17();
|
|
1625777
1625923
|
});
|
|
@@ -1626123,7 +1626269,7 @@ class RpcCore {
|
|
|
1626123
1626269
|
var import_rxjs65, l10, EMPTY_META, RPC_CORE_DEFAULT_CAPACITY;
|
|
1626124
1626270
|
var init_bundle18 = __esm(() => {
|
|
1626125
1626271
|
init_rpc_provider();
|
|
1626126
|
-
|
|
1626272
|
+
init_types27();
|
|
1626127
1626273
|
init_util18();
|
|
1626128
1626274
|
init_util11();
|
|
1626129
1626275
|
init_util22();
|
|
@@ -1629444,7 +1629590,7 @@ function dispatchQueue(instanceId, api7) {
|
|
|
1629444
1629590
|
}
|
|
1629445
1629591
|
var import_rxjs100, DEMOCRACY_ID;
|
|
1629446
1629592
|
var init_dispatchQueue = __esm(() => {
|
|
1629447
|
-
|
|
1629593
|
+
init_types27();
|
|
1629448
1629594
|
init_util10();
|
|
1629449
1629595
|
init_util23();
|
|
1629450
1629596
|
init_util25();
|
|
@@ -1650244,7 +1650390,7 @@ var init_Decorate = __esm(() => {
|
|
|
1650244
1650390
|
init_api_derive();
|
|
1650245
1650391
|
init_rpc_core();
|
|
1650246
1650392
|
init_rpc_provider();
|
|
1650247
|
-
|
|
1650393
|
+
init_types27();
|
|
1650248
1650394
|
init_types_known();
|
|
1650249
1650395
|
init_util8();
|
|
1650250
1650396
|
init_util_crypto3();
|
|
@@ -1650800,7 +1650946,7 @@ function textToString(t3) {
|
|
|
1650800
1650946
|
}
|
|
1650801
1650947
|
var import_rxjs151, KEEPALIVE_INTERVAL = 1e4, WITH_VERSION_SHORTCUT = false, SUPPORTED_METADATA_VERSIONS, l13, Init;
|
|
1650802
1650948
|
var init_Init = __esm(() => {
|
|
1650803
|
-
|
|
1650949
|
+
init_types27();
|
|
1650804
1650950
|
init_constants6();
|
|
1650805
1650951
|
init_types_known();
|
|
1650806
1650952
|
init_util8();
|
|
@@ -1651734,13 +1651880,13 @@ var init_wallet5 = __esm(() => {
|
|
|
1651734
1651880
|
init_util7();
|
|
1651735
1651881
|
init_esm28();
|
|
1651736
1651882
|
init_errors24();
|
|
1651737
|
-
|
|
1651883
|
+
init_types22();
|
|
1651738
1651884
|
init_homa();
|
|
1651739
1651885
|
init_liquidity();
|
|
1651740
1651886
|
init_get_max_available_balance();
|
|
1651741
1651887
|
init_market_price_provider();
|
|
1651742
1651888
|
init_oracle_price_provider();
|
|
1651743
|
-
|
|
1651889
|
+
init_types24();
|
|
1651744
1651890
|
init_storages2();
|
|
1651745
1651891
|
init_get_chain_type();
|
|
1651746
1651892
|
init_dex_price_provider();
|
|
@@ -1651756,17 +1651902,17 @@ var init_wallet5 = __esm(() => {
|
|
|
1651756
1651902
|
});
|
|
1651757
1651903
|
|
|
1651758
1651904
|
// node_modules/@acala-network/sdk/dist/esm/wallet/vesting/types.js
|
|
1651759
|
-
var
|
|
1651905
|
+
var init_types28 = () => {};
|
|
1651760
1651906
|
|
|
1651761
1651907
|
// node_modules/@acala-network/sdk/dist/esm/wallet/types.js
|
|
1651762
|
-
var
|
|
1651763
|
-
|
|
1651908
|
+
var init_types29 = __esm(() => {
|
|
1651909
|
+
init_types28();
|
|
1651764
1651910
|
});
|
|
1651765
1651911
|
|
|
1651766
1651912
|
// node_modules/@acala-network/sdk/dist/esm/wallet/index.js
|
|
1651767
1651913
|
var init_wallet6 = __esm(() => {
|
|
1651768
1651914
|
init_wallet5();
|
|
1651769
|
-
|
|
1651915
|
+
init_types29();
|
|
1651770
1651916
|
});
|
|
1651771
1651917
|
|
|
1651772
1651918
|
// node_modules/@acala-network/sdk/node_modules/graphql-request/node_modules/form-data/node_modules/mime-types/node_modules/mime-db/db.json
|
|
@@ -1661767,7 +1661913,7 @@ var init_base_history_fetcher = () => {};
|
|
|
1661767
1661913
|
|
|
1661768
1661914
|
// node_modules/@acala-network/sdk/dist/esm/history/utils/resolve-links.js
|
|
1661769
1661915
|
var init_resolve_links = __esm(() => {
|
|
1661770
|
-
|
|
1661916
|
+
init_types22();
|
|
1661771
1661917
|
});
|
|
1661772
1661918
|
// node_modules/@acala-network/sdk/dist/esm/history/fetchers/transfers.js
|
|
1661773
1661919
|
var import_graphql_request;
|
|
@@ -1661887,7 +1662033,7 @@ var init_storages3 = __esm(() => {
|
|
|
1661887
1662033
|
|
|
1661888
1662034
|
// node_modules/@acala-network/sdk/dist/esm/incentive/types.js
|
|
1661889
1662035
|
var IncentiveType;
|
|
1661890
|
-
var
|
|
1662036
|
+
var init_types30 = __esm(() => {
|
|
1661891
1662037
|
(function(IncentiveType2) {
|
|
1661892
1662038
|
IncentiveType2[IncentiveType2["LOANS"] = 0] = "LOANS";
|
|
1661893
1662039
|
IncentiveType2[IncentiveType2["DEX"] = 1] = "DEX";
|
|
@@ -1662239,7 +1662385,7 @@ var init_incentive = __esm(() => {
|
|
|
1662239
1662385
|
init_util7();
|
|
1662240
1662386
|
init_errors27();
|
|
1662241
1662387
|
init_storages3();
|
|
1662242
|
-
|
|
1662388
|
+
init_types30();
|
|
1662243
1662389
|
init_get_apr();
|
|
1662244
1662390
|
init_get_deduction_endtime_configs();
|
|
1662245
1662391
|
import_rxjs157 = __toESM(require_cjs10(), 1);
|
|
@@ -1662247,7 +1662393,7 @@ var init_incentive = __esm(() => {
|
|
|
1662247
1662393
|
});
|
|
1662248
1662394
|
|
|
1662249
1662395
|
// node_modules/@acala-network/sdk/dist/esm/auction/types.js
|
|
1662250
|
-
var
|
|
1662396
|
+
var init_types31 = () => {};
|
|
1662251
1662397
|
|
|
1662252
1662398
|
// node_modules/@acala-network/sdk/dist/esm/auction/api.js
|
|
1662253
1662399
|
var GraphqlRequest;
|
|
@@ -1662276,7 +1662422,7 @@ var init_auctions = __esm(() => {
|
|
|
1662276
1662422
|
|
|
1662277
1662423
|
// node_modules/@acala-network/sdk/dist/esm/auction/index.js
|
|
1662278
1662424
|
var init_auction2 = __esm(() => {
|
|
1662279
|
-
|
|
1662425
|
+
init_types31();
|
|
1662280
1662426
|
init_auctions();
|
|
1662281
1662427
|
init_auction();
|
|
1662282
1662428
|
init_api4();
|
|
@@ -1662290,7 +1662436,7 @@ var init_esm32 = __esm(() => {
|
|
|
1662290
1662436
|
init_wallet6();
|
|
1662291
1662437
|
init_liquidity();
|
|
1662292
1662438
|
init_homa();
|
|
1662293
|
-
|
|
1662439
|
+
init_types22();
|
|
1662294
1662440
|
init_history2();
|
|
1662295
1662441
|
init_incentive();
|
|
1662296
1662442
|
init_auction2();
|
|
@@ -1818652,7 +1818798,7 @@ var init_lookup4 = () => {};
|
|
|
1818652
1818798
|
|
|
1818653
1818799
|
// node_modules/@galacticcouncil/sdk/node_modules/@polkadot/types/node_modules/@polkadot/types-create/types/types.js
|
|
1818654
1818800
|
var TypeDefInfo2;
|
|
1818655
|
-
var
|
|
1818801
|
+
var init_types32 = __esm(() => {
|
|
1818656
1818802
|
(function(TypeDefInfo3) {
|
|
1818657
1818803
|
TypeDefInfo3[TypeDefInfo3["BTreeMap"] = 0] = "BTreeMap";
|
|
1818658
1818804
|
TypeDefInfo3[TypeDefInfo3["BTreeSet"] = 1] = "BTreeSet";
|
|
@@ -1818681,9 +1818827,9 @@ var init_types31 = __esm(() => {
|
|
|
1818681
1818827
|
});
|
|
1818682
1818828
|
|
|
1818683
1818829
|
// node_modules/@galacticcouncil/sdk/node_modules/@polkadot/types/node_modules/@polkadot/types-create/types/index.js
|
|
1818684
|
-
var
|
|
1818830
|
+
var init_types33 = __esm(() => {
|
|
1818685
1818831
|
init_lookup4();
|
|
1818686
|
-
|
|
1818832
|
+
init_types32();
|
|
1818687
1818833
|
});
|
|
1818688
1818834
|
|
|
1818689
1818835
|
// node_modules/@galacticcouncil/sdk/node_modules/@polkadot/types/node_modules/@polkadot/types-codec/packageDetect.js
|
|
@@ -1822048,7 +1822194,7 @@ var KNOWN_INTERNALS2, nestedExtraction2, wrappedExtraction2;
|
|
|
1822048
1822194
|
var init_getTypeDef2 = __esm(() => {
|
|
1822049
1822195
|
init_types_codec2();
|
|
1822050
1822196
|
init_util7();
|
|
1822051
|
-
|
|
1822197
|
+
init_types33();
|
|
1822052
1822198
|
KNOWN_INTERNALS2 = ["_alias", "_fallback"];
|
|
1822053
1822199
|
nestedExtraction2 = [
|
|
1822054
1822200
|
["[", "]", TypeDefInfo2.VecFixed, _decodeFixedVec2],
|
|
@@ -1822146,7 +1822292,7 @@ var infoMapping2;
|
|
|
1822146
1822292
|
var init_class3 = __esm(() => {
|
|
1822147
1822293
|
init_types_codec2();
|
|
1822148
1822294
|
init_util7();
|
|
1822149
|
-
|
|
1822295
|
+
init_types33();
|
|
1822150
1822296
|
init_getTypeDef2();
|
|
1822151
1822297
|
infoMapping2 = {
|
|
1822152
1822298
|
[TypeDefInfo2.BTreeMap]: (_registry2, value2) => createHashMap2(BTreeMap2, value2),
|
|
@@ -1822323,7 +1822469,7 @@ function withTypeString2(registry3, typeDef) {
|
|
|
1822323
1822469
|
var stringIdentity2 = (value2) => value2.toString(), INFO_WRAP2, encoders2;
|
|
1822324
1822470
|
var init_encodeTypes2 = __esm(() => {
|
|
1822325
1822471
|
init_util7();
|
|
1822326
|
-
|
|
1822472
|
+
init_types33();
|
|
1822327
1822473
|
INFO_WRAP2 = ["BTreeMap", "BTreeSet", "Compact", "HashMap", "Option", "Result", "Vec"];
|
|
1822328
1822474
|
encoders2 = {
|
|
1822329
1822475
|
[TypeDefInfo2.BTreeMap]: (registry3, typeDef) => encodeWithParams2(registry3, typeDef, "BTreeMap"),
|
|
@@ -1822406,7 +1822552,7 @@ var init_exports5 = __esm(() => {
|
|
|
1822406
1822552
|
|
|
1822407
1822553
|
// node_modules/@galacticcouncil/sdk/node_modules/@polkadot/types/node_modules/@polkadot/types-create/bundle.js
|
|
1822408
1822554
|
var init_bundle28 = __esm(() => {
|
|
1822409
|
-
|
|
1822555
|
+
init_types33();
|
|
1822410
1822556
|
init_exports5();
|
|
1822411
1822557
|
});
|
|
1822412
1822558
|
|
|
@@ -1832085,7 +1832231,7 @@ var init_bundle29 = __esm(() => {
|
|
|
1832085
1832231
|
});
|
|
1832086
1832232
|
|
|
1832087
1832233
|
// node_modules/@galacticcouncil/sdk/node_modules/@polkadot/types/index.js
|
|
1832088
|
-
var
|
|
1832234
|
+
var init_types34 = __esm(() => {
|
|
1832089
1832235
|
init_packageDetect27();
|
|
1832090
1832236
|
init_bundle29();
|
|
1832091
1832237
|
});
|
|
@@ -1836576,7 +1836722,7 @@ var init_build9 = __esm(() => {
|
|
|
1836576
1836722
|
init_hydradx();
|
|
1836577
1836723
|
init_basilisk();
|
|
1836578
1836724
|
init_build3();
|
|
1836579
|
-
|
|
1836725
|
+
init_types34();
|
|
1836580
1836726
|
init_util7();
|
|
1836581
1836727
|
init_util_crypto4();
|
|
1836582
1836728
|
init__esm();
|
|
@@ -1869691,7 +1869837,7 @@ var handleResult4 = (ctx, result) => {
|
|
|
1869691
1869837
|
}, ZodDiscriminatedUnion5, ZodIntersection5, ZodTuple5, ZodRecord5, ZodMap5, ZodSet5, ZodFunction5, ZodLazy5, ZodLiteral5, ZodEnum5, ZodNativeEnum4, ZodPromise5, ZodEffects4, ZodOptional5, ZodNullable5, ZodDefault5, ZodCatch5, ZodNaN5, BRAND4, ZodBranded4, ZodPipeline4, ZodReadonly5, late4, ZodFirstPartyTypeKind5, instanceOfType4 = (cls, params2 = {
|
|
1869692
1869838
|
message: `Input not instance of ${cls.name}`
|
|
1869693
1869839
|
}) => custom6((data7) => data7 instanceof cls, params2), stringType4, numberType4, nanType4, bigIntType4, booleanType4, dateType4, symbolType4, undefinedType4, nullType4, anyType4, unknownType4, neverType4, voidType4, arrayType4, objectType4, strictObjectType4, unionType4, discriminatedUnionType4, intersectionType4, tupleType4, recordType4, mapType4, setType4, functionType4, lazyType4, literalType4, enumType4, nativeEnumType4, promiseType4, effectsType4, optionalType4, nullableType4, preprocessType4, pipelineType4, ostring4 = () => stringType4().optional(), onumber4 = () => numberType4().optional(), oboolean4 = () => booleanType4().optional(), coerce4, NEVER6;
|
|
1869694
|
-
var
|
|
1869840
|
+
var init_types35 = __esm(() => {
|
|
1869695
1869841
|
init_ZodError3();
|
|
1869696
1869842
|
init_errors33();
|
|
1869697
1869843
|
init_errorUtil3();
|
|
@@ -1872612,7 +1872758,7 @@ var init_external4 = __esm(() => {
|
|
|
1872612
1872758
|
init_parseUtil3();
|
|
1872613
1872759
|
init_typeAliases3();
|
|
1872614
1872760
|
init_util37();
|
|
1872615
|
-
|
|
1872761
|
+
init_types35();
|
|
1872616
1872762
|
init_ZodError3();
|
|
1872617
1872763
|
});
|
|
1872618
1872764
|
|
|
@@ -1872891,7 +1873037,7 @@ var init_format13 = __esm(() => {
|
|
|
1872891
1873037
|
|
|
1872892
1873038
|
// node_modules/@cfworker/json-schema/dist/esm/types.js
|
|
1872893
1873039
|
var OutputFormat;
|
|
1872894
|
-
var
|
|
1873040
|
+
var init_types36 = __esm(() => {
|
|
1872895
1873041
|
(function(OutputFormat2) {
|
|
1872896
1873042
|
OutputFormat2[OutputFormat2["Flag"] = 1] = "Flag";
|
|
1872897
1873043
|
OutputFormat2[OutputFormat2["Basic"] = 2] = "Basic";
|
|
@@ -1873688,7 +1873834,7 @@ var init_validator3 = () => {};
|
|
|
1873688
1873834
|
var init_esm35 = __esm(() => {
|
|
1873689
1873835
|
init_dereference();
|
|
1873690
1873836
|
init_format13();
|
|
1873691
|
-
|
|
1873837
|
+
init_types36();
|
|
1873692
1873838
|
init_validate4();
|
|
1873693
1873839
|
init_validator3();
|
|
1873694
1873840
|
});
|
|
@@ -1892371,7 +1892517,7 @@ var init_base20 = __esm(() => {
|
|
|
1892371
1892517
|
});
|
|
1892372
1892518
|
|
|
1892373
1892519
|
// node_modules/@langchain/core/dist/tools/types.js
|
|
1892374
|
-
var
|
|
1892520
|
+
var init_types37 = __esm(() => {
|
|
1892375
1892521
|
init_base19();
|
|
1892376
1892522
|
init_zod3();
|
|
1892377
1892523
|
});
|
|
@@ -1892467,7 +1892613,7 @@ var init_tools2 = __esm(() => {
|
|
|
1892467
1892613
|
init_utils47();
|
|
1892468
1892614
|
init_zod3();
|
|
1892469
1892615
|
init_json_schema3();
|
|
1892470
|
-
|
|
1892616
|
+
init_types37();
|
|
1892471
1892617
|
StructuredTool = class StructuredTool extends BaseLangChain {
|
|
1892472
1892618
|
get lc_namespace() {
|
|
1892473
1892619
|
return ["langchain", "tools"];
|
|
@@ -1893729,7 +1893875,7 @@ var handleResult5 = (ctx, result) => {
|
|
|
1893729
1893875
|
}, ZodDiscriminatedUnion6, ZodIntersection6, ZodTuple6, ZodRecord6, ZodMap6, ZodSet6, ZodFunction6, ZodLazy6, ZodLiteral6, ZodEnum6, ZodNativeEnum5, ZodPromise6, ZodEffects5, ZodOptional6, ZodNullable6, ZodDefault6, ZodCatch6, ZodNaN6, BRAND5, ZodBranded5, ZodPipeline5, ZodReadonly6, late5, ZodFirstPartyTypeKind6, instanceOfType5 = (cls, params2 = {
|
|
1893730
1893876
|
message: `Input not instance of ${cls.name}`
|
|
1893731
1893877
|
}) => custom7((data7) => data7 instanceof cls, params2), stringType5, numberType5, nanType5, bigIntType5, booleanType5, dateType5, symbolType5, undefinedType5, nullType5, anyType5, unknownType5, neverType5, voidType5, arrayType5, objectType5, strictObjectType5, unionType5, discriminatedUnionType5, intersectionType5, tupleType5, recordType5, mapType5, setType5, functionType5, lazyType5, literalType5, enumType5, nativeEnumType5, promiseType5, effectsType5, optionalType5, nullableType5, preprocessType5, pipelineType5, ostring5 = () => stringType5().optional(), onumber5 = () => numberType5().optional(), oboolean5 = () => booleanType5().optional(), coerce5, NEVER8;
|
|
1893732
|
-
var
|
|
1893878
|
+
var init_types38 = __esm(() => {
|
|
1893733
1893879
|
init_ZodError4();
|
|
1893734
1893880
|
init_errors35();
|
|
1893735
1893881
|
init_errorUtil4();
|
|
@@ -1896650,7 +1896796,7 @@ var init_external5 = __esm(() => {
|
|
|
1896650
1896796
|
init_parseUtil4();
|
|
1896651
1896797
|
init_typeAliases4();
|
|
1896652
1896798
|
init_util39();
|
|
1896653
|
-
|
|
1896799
|
+
init_types38();
|
|
1896654
1896800
|
init_ZodError4();
|
|
1896655
1896801
|
});
|
|
1896656
1896802
|
|
|
@@ -1898692,13 +1898838,13 @@ function getAvailableActionNames2() {
|
|
|
1898692
1898838
|
var _agentKit2 = null, _actions2 = null;
|
|
1898693
1898839
|
var init_provider5 = __esm(() => {
|
|
1898694
1898840
|
init_dist34();
|
|
1898695
|
-
|
|
1898841
|
+
init_types19();
|
|
1898696
1898842
|
});
|
|
1898697
1898843
|
|
|
1898698
1898844
|
// src/infra/polkadotkit/index.ts
|
|
1898699
1898845
|
var init_polkadotkit = __esm(() => {
|
|
1898700
1898846
|
init_provider5();
|
|
1898701
|
-
|
|
1898847
|
+
init_types19();
|
|
1898702
1898848
|
});
|
|
1898703
1898849
|
|
|
1898704
1898850
|
// src/infra/agents/tools/polkadotkit-assets.ts
|
|
@@ -1898962,7 +1899108,7 @@ var init_polkadotkit_defi = __esm(() => {
|
|
|
1898962
1899108
|
|
|
1898963
1899109
|
// src/infra/solanakit/types.ts
|
|
1898964
1899110
|
var SOLANA_ENV_KEYS;
|
|
1898965
|
-
var
|
|
1899111
|
+
var init_types39 = __esm(() => {
|
|
1898966
1899112
|
SOLANA_ENV_KEYS = {
|
|
1898967
1899113
|
PRIVATE_KEY: "SOLANA_PRIVATE_KEY",
|
|
1898968
1899114
|
RPC_URL: "SOLANA_RPC_URL",
|
|
@@ -1901998,7 +1902144,7 @@ var handleResult6 = (ctx, result) => {
|
|
|
1901998
1902144
|
}, ZodDiscriminatedUnion7, ZodIntersection7, ZodTuple7, ZodRecord7, ZodMap7, ZodSet7, ZodFunction7, ZodLazy7, ZodLiteral7, ZodEnum7, ZodNativeEnum6, ZodPromise7, ZodEffects6, ZodOptional7, ZodNullable7, ZodDefault7, ZodCatch7, ZodNaN7, BRAND6, ZodBranded6, ZodPipeline6, ZodReadonly7, late6, ZodFirstPartyTypeKind7, instanceOfType6 = (cls, params2 = {
|
|
1901999
1902145
|
message: `Input not instance of ${cls.name}`
|
|
1902000
1902146
|
}) => custom8((data7) => data7 instanceof cls, params2), stringType6, numberType6, nanType6, bigIntType6, booleanType6, dateType6, symbolType6, undefinedType6, nullType6, anyType6, unknownType6, neverType6, voidType6, arrayType6, objectType6, strictObjectType6, unionType6, discriminatedUnionType6, intersectionType6, tupleType6, recordType6, mapType6, setType6, functionType6, lazyType6, literalType6, enumType6, nativeEnumType6, promiseType6, effectsType6, optionalType6, nullableType6, preprocessType6, pipelineType6, ostring6 = () => stringType6().optional(), onumber6 = () => numberType6().optional(), oboolean6 = () => booleanType6().optional(), coerce6, NEVER9;
|
|
1902001
|
-
var
|
|
1902147
|
+
var init_types40 = __esm(() => {
|
|
1902002
1902148
|
init_ZodError5();
|
|
1902003
1902149
|
init_errors37();
|
|
1902004
1902150
|
init_errorUtil5();
|
|
@@ -1904919,7 +1905065,7 @@ var init_external6 = __esm(() => {
|
|
|
1904919
1905065
|
init_parseUtil5();
|
|
1904920
1905066
|
init_typeAliases5();
|
|
1904921
1905067
|
init_util40();
|
|
1904922
|
-
|
|
1905068
|
+
init_types40();
|
|
1904923
1905069
|
init_ZodError5();
|
|
1904924
1905070
|
});
|
|
1904925
1905071
|
|
|
@@ -1917677,7 +1917823,7 @@ var init_errors38 = __esm(() => {
|
|
|
1917677
1917823
|
|
|
1917678
1917824
|
// node_modules/@solana/spl-token/lib/esm/instructions/types.js
|
|
1917679
1917825
|
var TokenInstruction;
|
|
1917680
|
-
var
|
|
1917826
|
+
var init_types41 = __esm(() => {
|
|
1917681
1917827
|
(function(TokenInstruction2) {
|
|
1917682
1917828
|
TokenInstruction2[TokenInstruction2["InitializeMint"] = 0] = "InitializeMint";
|
|
1917683
1917829
|
TokenInstruction2[TokenInstruction2["InitializeAccount"] = 1] = "InitializeAccount";
|
|
@@ -1919274,7 +1919420,7 @@ var init_transferChecked = __esm(() => {
|
|
|
1919274
1919420
|
init_esm38();
|
|
1919275
1919421
|
init_constants15();
|
|
1919276
1919422
|
init_internal();
|
|
1919277
|
-
|
|
1919423
|
+
init_types41();
|
|
1919278
1919424
|
import_buffer_layout28 = __toESM(require_Layout(), 1);
|
|
1919279
1919425
|
import_web326 = __toESM(require_index_cjs(), 1);
|
|
1919280
1919426
|
transferCheckedInstructionData = import_buffer_layout28.struct([
|
|
@@ -1919904,7 +1920050,7 @@ var import_buffer_layout36, import_web341, closeAccountInstructionData;
|
|
|
1919904
1920050
|
var init_closeAccount = __esm(() => {
|
|
1919905
1920051
|
init_constants15();
|
|
1919906
1920052
|
init_internal();
|
|
1919907
|
-
|
|
1920053
|
+
init_types41();
|
|
1919908
1920054
|
import_buffer_layout36 = __toESM(require_Layout(), 1);
|
|
1919909
1920055
|
import_web341 = __toESM(require_index_cjs(), 1);
|
|
1919910
1920056
|
closeAccountInstructionData = import_buffer_layout36.struct([import_buffer_layout36.u8("instruction")]);
|
|
@@ -1919931,7 +1920077,7 @@ function createInitializeAccountInstruction(account6, mint2, owner, programId =
|
|
|
1919931
1920077
|
var import_buffer_layout37, import_web343, initializeAccountInstructionData;
|
|
1919932
1920078
|
var init_initializeAccount = __esm(() => {
|
|
1919933
1920079
|
init_constants15();
|
|
1919934
|
-
|
|
1920080
|
+
init_types41();
|
|
1919935
1920081
|
import_buffer_layout37 = __toESM(require_Layout(), 1);
|
|
1919936
1920082
|
import_web343 = __toESM(require_index_cjs(), 1);
|
|
1919937
1920083
|
initializeAccountInstructionData = import_buffer_layout37.struct([import_buffer_layout37.u8("instruction")]);
|
|
@@ -1920045,7 +1920191,7 @@ function createSyncNativeInstruction(account6, programId = TOKEN_PROGRAM_ID) {
|
|
|
1920045
1920191
|
var import_buffer_layout41, import_web354, syncNativeInstructionData;
|
|
1920046
1920192
|
var init_syncNative = __esm(() => {
|
|
1920047
1920193
|
init_constants15();
|
|
1920048
|
-
|
|
1920194
|
+
init_types41();
|
|
1920049
1920195
|
import_buffer_layout41 = __toESM(require_Layout(), 1);
|
|
1920050
1920196
|
import_web354 = __toESM(require_index_cjs(), 1);
|
|
1920051
1920197
|
syncNativeInstructionData = import_buffer_layout41.struct([import_buffer_layout41.u8("instruction")]);
|
|
@@ -1920095,7 +1920241,7 @@ var init_mintTo = __esm(() => {
|
|
|
1920095
1920241
|
init_esm38();
|
|
1920096
1920242
|
init_constants15();
|
|
1920097
1920243
|
init_internal();
|
|
1920098
|
-
|
|
1920244
|
+
init_types41();
|
|
1920099
1920245
|
import_buffer_layout43 = __toESM(require_Layout(), 1);
|
|
1920100
1920246
|
import_web359 = __toESM(require_index_cjs(), 1);
|
|
1920101
1920247
|
mintToInstructionData = import_buffer_layout43.struct([import_buffer_layout43.u8("instruction"), u645("amount")]);
|
|
@@ -1920165,7 +1920311,7 @@ var import_buffer_layout46, import_web366, AuthorityType, setAuthorityInstructio
|
|
|
1920165
1920311
|
var init_setAuthority = __esm(() => {
|
|
1920166
1920312
|
init_constants15();
|
|
1920167
1920313
|
init_internal();
|
|
1920168
|
-
|
|
1920314
|
+
init_types41();
|
|
1920169
1920315
|
init_serialization();
|
|
1920170
1920316
|
import_buffer_layout46 = __toESM(require_Layout(), 1);
|
|
1920171
1920317
|
import_web366 = __toESM(require_index_cjs(), 1);
|
|
@@ -1920239,7 +1920385,7 @@ var init_transfer = __esm(() => {
|
|
|
1920239
1920385
|
init_esm38();
|
|
1920240
1920386
|
init_constants15();
|
|
1920241
1920387
|
init_internal();
|
|
1920242
|
-
|
|
1920388
|
+
init_types41();
|
|
1920243
1920389
|
import_buffer_layout48 = __toESM(require_Layout(), 1);
|
|
1920244
1920390
|
import_web371 = __toESM(require_index_cjs(), 1);
|
|
1920245
1920391
|
transferInstructionData = import_buffer_layout48.struct([import_buffer_layout48.u8("instruction"), u645("amount")]);
|
|
@@ -1920380,7 +1920526,7 @@ var import_buffer_layout52, import_web378, initializeMintInstructionData;
|
|
|
1920380
1920526
|
var init_initializeMint = __esm(() => {
|
|
1920381
1920527
|
init_esm38();
|
|
1920382
1920528
|
init_constants15();
|
|
1920383
|
-
|
|
1920529
|
+
init_types41();
|
|
1920384
1920530
|
init_serialization();
|
|
1920385
1920531
|
import_buffer_layout52 = __toESM(require_Layout(), 1);
|
|
1920386
1920532
|
import_web378 = __toESM(require_index_cjs(), 1);
|
|
@@ -1920591,7 +1920737,7 @@ var init_initializePermanentDelegate = __esm(() => {
|
|
|
1920591
1920737
|
var init_instructions12 = __esm(() => {
|
|
1920592
1920738
|
init_associatedTokenAccount();
|
|
1920593
1920739
|
init_decode6();
|
|
1920594
|
-
|
|
1920740
|
+
init_types41();
|
|
1920595
1920741
|
init_initializeMint();
|
|
1920596
1920742
|
init_initializeAccount();
|
|
1920597
1920743
|
init_initializeMultisig();
|
|
@@ -1921927,7 +1922073,7 @@ var handleResult7 = (ctx, result) => {
|
|
|
1921927
1922073
|
}, ZodDiscriminatedUnion8, ZodIntersection8, ZodTuple8, ZodRecord8, ZodMap8, ZodSet8, ZodFunction8, ZodLazy8, ZodLiteral8, ZodEnum8, ZodNativeEnum7, ZodPromise8, ZodEffects7, ZodOptional8, ZodNullable8, ZodDefault8, ZodCatch8, ZodNaN8, BRAND7, ZodBranded7, ZodPipeline7, ZodReadonly8, late7, ZodFirstPartyTypeKind8, instanceOfType7 = (cls, params2 = {
|
|
1921928
1922074
|
message: `Input not instance of ${cls.name}`
|
|
1921929
1922075
|
}) => custom9((data7) => data7 instanceof cls, params2), stringType7, numberType7, nanType7, bigIntType7, booleanType7, dateType7, symbolType7, undefinedType7, nullType7, anyType7, unknownType7, neverType7, voidType7, arrayType7, objectType7, strictObjectType7, unionType7, discriminatedUnionType7, intersectionType7, tupleType7, recordType7, mapType7, setType7, functionType7, lazyType7, literalType7, enumType7, nativeEnumType7, promiseType7, effectsType7, optionalType7, nullableType7, preprocessType7, pipelineType7, ostring7 = () => stringType7().optional(), onumber7 = () => numberType7().optional(), oboolean7 = () => booleanType7().optional(), coerce7, NEVER10;
|
|
1921930
|
-
var
|
|
1922076
|
+
var init_types42 = __esm(() => {
|
|
1921931
1922077
|
init_ZodError6();
|
|
1921932
1922078
|
init_errors40();
|
|
1921933
1922079
|
init_errorUtil6();
|
|
@@ -1924848,7 +1924994,7 @@ var init_external7 = __esm(() => {
|
|
|
1924848
1924994
|
init_parseUtil6();
|
|
1924849
1924995
|
init_typeAliases6();
|
|
1924850
1924996
|
init_util41();
|
|
1924851
|
-
|
|
1924997
|
+
init_types42();
|
|
1924852
1924998
|
init_ZodError6();
|
|
1924853
1924999
|
});
|
|
1924854
1925000
|
|
|
@@ -1939657,7 +1939803,7 @@ class BorshTypesCoder {
|
|
|
1939657
1939803
|
return layout3.decode(data7);
|
|
1939658
1939804
|
}
|
|
1939659
1939805
|
}
|
|
1939660
|
-
var
|
|
1939806
|
+
var init_types43 = __esm(() => {
|
|
1939661
1939807
|
init_idl2();
|
|
1939662
1939808
|
});
|
|
1939663
1939809
|
|
|
@@ -1939674,7 +1939820,7 @@ var init_borsh = __esm(() => {
|
|
|
1939674
1939820
|
init_instruction2();
|
|
1939675
1939821
|
init_accounts2();
|
|
1939676
1939822
|
init_event3();
|
|
1939677
|
-
|
|
1939823
|
+
init_types43();
|
|
1939678
1939824
|
init_instruction2();
|
|
1939679
1939825
|
init_accounts2();
|
|
1939680
1939826
|
init_event3();
|
|
@@ -1960660,7 +1960806,7 @@ class BorshTypesCoder2 {
|
|
|
1960660
1960806
|
return layout3.decode(data7);
|
|
1960661
1960807
|
}
|
|
1960662
1960808
|
}
|
|
1960663
|
-
var
|
|
1960809
|
+
var init_types44 = __esm(() => {
|
|
1960664
1960810
|
init_idl4();
|
|
1960665
1960811
|
});
|
|
1960666
1960812
|
|
|
@@ -1960677,7 +1960823,7 @@ var init_borsh2 = __esm(() => {
|
|
|
1960677
1960823
|
init_instruction5();
|
|
1960678
1960824
|
init_accounts4();
|
|
1960679
1960825
|
init_event5();
|
|
1960680
|
-
|
|
1960826
|
+
init_types44();
|
|
1960681
1960827
|
init_instruction5();
|
|
1960682
1960828
|
init_accounts4();
|
|
1960683
1960829
|
init_event5();
|
|
@@ -1994943,7 +1995089,7 @@ var handleResult8 = (ctx, result) => {
|
|
|
1994943
1995089
|
}, ZodDiscriminatedUnion9, ZodIntersection9, ZodTuple9, ZodRecord9, ZodMap9, ZodSet9, ZodFunction9, ZodLazy9, ZodLiteral9, ZodEnum9, ZodNativeEnum8, ZodPromise9, ZodEffects8, ZodOptional9, ZodNullable9, ZodDefault9, ZodCatch9, ZodNaN9, BRAND8, ZodBranded8, ZodPipeline8, ZodReadonly9, late8, ZodFirstPartyTypeKind9, instanceOfType8 = (cls, params2 = {
|
|
1994944
1995090
|
message: `Input not instance of ${cls.name}`
|
|
1994945
1995091
|
}) => custom10((data7) => data7 instanceof cls, params2), stringType8, numberType8, nanType8, bigIntType8, booleanType8, dateType8, symbolType8, undefinedType8, nullType8, anyType8, unknownType8, neverType8, voidType8, arrayType8, objectType8, strictObjectType8, unionType8, discriminatedUnionType8, intersectionType8, tupleType8, recordType8, mapType8, setType8, functionType8, lazyType8, literalType8, enumType8, nativeEnumType8, promiseType8, effectsType8, optionalType8, nullableType8, preprocessType8, pipelineType8, ostring8 = () => stringType8().optional(), onumber8 = () => numberType8().optional(), oboolean8 = () => booleanType8().optional(), coerce10, NEVER11;
|
|
1994946
|
-
var
|
|
1995092
|
+
var init_types45 = __esm(() => {
|
|
1994947
1995093
|
init_ZodError7();
|
|
1994948
1995094
|
init_errors41();
|
|
1994949
1995095
|
init_errorUtil7();
|
|
@@ -1997864,7 +1998010,7 @@ var init_external8 = __esm(() => {
|
|
|
1997864
1998010
|
init_parseUtil7();
|
|
1997865
1998011
|
init_typeAliases7();
|
|
1997866
1998012
|
init_util42();
|
|
1997867
|
-
|
|
1998013
|
+
init_types45();
|
|
1997868
1998014
|
init_ZodError7();
|
|
1997869
1998015
|
});
|
|
1997870
1998016
|
|
|
@@ -2087509,7 +2087655,7 @@ var init_RestingOrder = __esm(() => {
|
|
|
2087509
2087655
|
});
|
|
2087510
2087656
|
|
|
2087511
2087657
|
// node_modules/@cks-systems/manifest-sdk/dist/esm/manifest/types/index.js
|
|
2087512
|
-
var
|
|
2087658
|
+
var init_types46 = __esm(() => {
|
|
2087513
2087659
|
init_BatchUpdateParams();
|
|
2087514
2087660
|
init_CancelOrderParams();
|
|
2087515
2087661
|
init_ClaimedSeat();
|
|
@@ -2089200,7 +2089346,7 @@ var init_manifest = __esm(() => {
|
|
|
2089200
2089346
|
init_accounts6();
|
|
2089201
2089347
|
init_errors42();
|
|
2089202
2089348
|
init_instructions13();
|
|
2089203
|
-
|
|
2089349
|
+
init_types46();
|
|
2089204
2089350
|
PROGRAM_ID = new import_web3178.PublicKey(PROGRAM_ADDRESS);
|
|
2089205
2089351
|
});
|
|
2089206
2089352
|
|
|
@@ -2089680,7 +2089826,7 @@ var init_WrapperWithdrawParams = __esm(() => {
|
|
|
2089680
2089826
|
});
|
|
2089681
2089827
|
|
|
2089682
2089828
|
// node_modules/@cks-systems/manifest-sdk/dist/esm/wrapper/types/index.js
|
|
2089683
|
-
var
|
|
2089829
|
+
var init_types47 = __esm(() => {
|
|
2089684
2089830
|
init_MarketInfo();
|
|
2089685
2089831
|
init_OrderType2();
|
|
2089686
2089832
|
init_WrapperBatchUpdateParams();
|
|
@@ -2089795,7 +2089941,7 @@ var import_bn96;
|
|
|
2089795
2089941
|
var init_wrapperObj = __esm(() => {
|
|
2089796
2089942
|
init_beet_solana();
|
|
2089797
2089943
|
init_redBlackTree();
|
|
2089798
|
-
|
|
2089944
|
+
init_types47();
|
|
2089799
2089945
|
init_numbers3();
|
|
2089800
2089946
|
import_bn96 = __toESM(require_bn(), 1);
|
|
2089801
2089947
|
});
|
|
@@ -2090332,7 +2090478,7 @@ var import_web3181, PROGRAM_ADDRESS2 = "wMNFSTkir3HgyZTsB7uqu3i7FA73grFCptPXgrZj
|
|
|
2090332
2090478
|
var init_wrapper3 = __esm(() => {
|
|
2090333
2090479
|
import_web3181 = __toESM(require_index_cjs(), 1);
|
|
2090334
2090480
|
init_instructions14();
|
|
2090335
|
-
|
|
2090481
|
+
init_types47();
|
|
2090336
2090482
|
PROGRAM_ID2 = new import_web3181.PublicKey(PROGRAM_ADDRESS2);
|
|
2090337
2090483
|
});
|
|
2090338
2090484
|
|
|
@@ -2093861,7 +2094007,7 @@ var init_global2 = __esm(() => {
|
|
|
2093861
2094007
|
init_redBlackTree();
|
|
2093862
2094008
|
init_numbers3();
|
|
2093863
2094009
|
init_esm40();
|
|
2093864
|
-
|
|
2094010
|
+
init_types46();
|
|
2093865
2094011
|
});
|
|
2093866
2094012
|
|
|
2093867
2094013
|
// node_modules/@cks-systems/manifest-sdk/dist/esm/client.js
|
|
@@ -2094927,7 +2095073,7 @@ var import_web3183, marketDiscriminator;
|
|
|
2094927
2095073
|
var init_client15 = __esm(() => {
|
|
2094928
2095074
|
init_esm40();
|
|
2094929
2095075
|
init_instructions13();
|
|
2094930
|
-
|
|
2095076
|
+
init_types46();
|
|
2094931
2095077
|
init_market4();
|
|
2094932
2095078
|
init_wrapperObj();
|
|
2094933
2095079
|
init_manifest();
|
|
@@ -2094941,7 +2095087,7 @@ var init_client15 = __esm(() => {
|
|
|
2094941
2095087
|
});
|
|
2094942
2095088
|
|
|
2094943
2095089
|
// node_modules/@cks-systems/manifest-sdk/dist/esm/types.js
|
|
2094944
|
-
var
|
|
2095090
|
+
var init_types48 = () => {};
|
|
2094945
2095091
|
// node_modules/@cks-systems/manifest-sdk/dist/esm/utils/index.js
|
|
2094946
2095092
|
var init_utils59 = __esm(() => {
|
|
2094947
2095093
|
init_beet();
|
|
@@ -2094957,7 +2095103,7 @@ var init_esm49 = __esm(() => {
|
|
|
2094957
2095103
|
init_client15();
|
|
2094958
2095104
|
init_market4();
|
|
2094959
2095105
|
init_global2();
|
|
2094960
|
-
|
|
2095106
|
+
init_types48();
|
|
2094961
2095107
|
init_utils59();
|
|
2094962
2095108
|
init_errors42();
|
|
2094963
2095109
|
init_accounts6();
|
|
@@ -2147012,7 +2147158,7 @@ class BorshTypesCoder3 {
|
|
|
2147012
2147158
|
return layout3.decode(data7);
|
|
2147013
2147159
|
}
|
|
2147014
2147160
|
}
|
|
2147015
|
-
var
|
|
2147161
|
+
var init_types49 = __esm(() => {
|
|
2147016
2147162
|
init_idl6();
|
|
2147017
2147163
|
});
|
|
2147018
2147164
|
|
|
@@ -2147029,7 +2147175,7 @@ var init_borsh3 = __esm(() => {
|
|
|
2147029
2147175
|
init_instruction8();
|
|
2147030
2147176
|
init_accounts7();
|
|
2147031
2147177
|
init_event7();
|
|
2147032
|
-
|
|
2147178
|
+
init_types49();
|
|
2147033
2147179
|
init_instruction8();
|
|
2147034
2147180
|
init_accounts7();
|
|
2147035
2147181
|
init_event7();
|
|
@@ -2174543,7 +2174689,7 @@ class BorshTypesCoder4 {
|
|
|
2174543
2174689
|
return layout3.decode(typeData);
|
|
2174544
2174690
|
}
|
|
2174545
2174691
|
}
|
|
2174546
|
-
var
|
|
2174692
|
+
var init_types50 = __esm(() => {
|
|
2174547
2174693
|
init_idl7();
|
|
2174548
2174694
|
});
|
|
2174549
2174695
|
|
|
@@ -2174560,7 +2174706,7 @@ var init_borsh4 = __esm(() => {
|
|
|
2174560
2174706
|
init_instruction11();
|
|
2174561
2174707
|
init_accounts9();
|
|
2174562
2174708
|
init_event9();
|
|
2174563
|
-
|
|
2174709
|
+
init_types50();
|
|
2174564
2174710
|
init_instruction11();
|
|
2174565
2174711
|
init_accounts9();
|
|
2174566
2174712
|
init_event9();
|
|
@@ -2190245,7 +2190391,7 @@ class BorshTypesCoder5 {
|
|
|
2190245
2190391
|
return layout3.decode(typeData);
|
|
2190246
2190392
|
}
|
|
2190247
2190393
|
}
|
|
2190248
|
-
var
|
|
2190394
|
+
var init_types51 = __esm(() => {
|
|
2190249
2190395
|
init_idl10();
|
|
2190250
2190396
|
});
|
|
2190251
2190397
|
|
|
@@ -2190262,7 +2190408,7 @@ var init_borsh5 = __esm(() => {
|
|
|
2190262
2190408
|
init_instruction14();
|
|
2190263
2190409
|
init_accounts11();
|
|
2190264
2190410
|
init_event11();
|
|
2190265
|
-
|
|
2190411
|
+
init_types51();
|
|
2190266
2190412
|
init_instruction14();
|
|
2190267
2190413
|
init_accounts11();
|
|
2190268
2190414
|
init_event11();
|
|
@@ -2194775,7 +2194921,7 @@ class BorshTypesCoder6 {
|
|
|
2194775
2194921
|
return layout3.decode(typeData);
|
|
2194776
2194922
|
}
|
|
2194777
2194923
|
}
|
|
2194778
|
-
var
|
|
2194924
|
+
var init_types52 = __esm(() => {
|
|
2194779
2194925
|
init_idl12();
|
|
2194780
2194926
|
});
|
|
2194781
2194927
|
|
|
@@ -2194792,7 +2194938,7 @@ var init_borsh6 = __esm(() => {
|
|
|
2194792
2194938
|
init_instruction17();
|
|
2194793
2194939
|
init_accounts13();
|
|
2194794
2194940
|
init_event13();
|
|
2194795
|
-
|
|
2194941
|
+
init_types52();
|
|
2194796
2194942
|
init_instruction17();
|
|
2194797
2194943
|
init_accounts13();
|
|
2194798
2194944
|
init_event13();
|
|
@@ -2205590,7 +2205736,7 @@ var require_invariant2 = __commonJS((exports6, module) => {
|
|
|
2205590
2205736
|
|
|
2205591
2205737
|
// node_modules/@mercurial-finance/dynamic-amm-sdk/dist/esm/src/amm/types/index.js
|
|
2205592
2205738
|
var import_borsh3, AccountType2, StakePoolLayout, ClockLayout3, ActivationType;
|
|
2205593
|
-
var
|
|
2205739
|
+
var init_types53 = __esm(() => {
|
|
2205594
2205740
|
import_borsh3 = __toESM(require_dist66(), 1);
|
|
2205595
2205741
|
(function(AccountType3) {
|
|
2205596
2205742
|
AccountType3["APY"] = "apy";
|
|
@@ -2402055,7 +2402201,7 @@ var init_stable_swap = __esm(() => {
|
|
|
2402055
2402201
|
init_curve10();
|
|
2402056
2402202
|
init_constants17();
|
|
2402057
2402203
|
init_marinade_finance();
|
|
2402058
|
-
|
|
2402204
|
+
init_types53();
|
|
2402059
2402205
|
import_web3285 = __toESM(require_index_cjs(), 1);
|
|
2402060
2402206
|
PRECISION2 = new import_bn118.default(1e6);
|
|
2402061
2402207
|
BASE_CACHE_EXPIRE = new import_bn118.default(60 * 10);
|
|
@@ -2427194,7 +2427340,7 @@ var init_utils66 = __esm(() => {
|
|
|
2427194
2427340
|
init_esm40();
|
|
2427195
2427341
|
init_constants17();
|
|
2427196
2427342
|
init_curve10();
|
|
2427197
|
-
|
|
2427343
|
+
init_types53();
|
|
2427198
2427344
|
init_idl16();
|
|
2427199
2427345
|
init_decimal2();
|
|
2427200
2427346
|
import_web3286 = __toESM(require_index_cjs(), 1);
|
|
@@ -2429030,7 +2429176,7 @@ var init_amm = __esm(() => {
|
|
|
2429030
2429176
|
init_esm40();
|
|
2429031
2429177
|
init_esm52();
|
|
2429032
2429178
|
init_dist45();
|
|
2429033
|
-
|
|
2429179
|
+
init_types53();
|
|
2429034
2429180
|
init_constants17();
|
|
2429035
2429181
|
init_curve10();
|
|
2429036
2429182
|
init_constant_product();
|
|
@@ -2781656,7 +2781802,7 @@ var init_provider14 = __esm(() => {
|
|
|
2781656
2781802
|
init_dist39();
|
|
2781657
2781803
|
init_dist42();
|
|
2781658
2781804
|
init_dist46();
|
|
2781659
|
-
|
|
2781805
|
+
init_types39();
|
|
2781660
2781806
|
import_web3376 = __toESM(require_index_cjs(), 1);
|
|
2781661
2781807
|
import_bs5830 = __toESM(require_bs58(), 1);
|
|
2781662
2781808
|
});
|
|
@@ -2781664,7 +2781810,7 @@ var init_provider14 = __esm(() => {
|
|
|
2781664
2781810
|
// src/infra/solanakit/index.ts
|
|
2781665
2781811
|
var init_solanakit = __esm(() => {
|
|
2781666
2781812
|
init_provider14();
|
|
2781667
|
-
|
|
2781813
|
+
init_types39();
|
|
2781668
2781814
|
});
|
|
2781669
2781815
|
|
|
2781670
2781816
|
// src/infra/agents/tools/solanakit-wallet.ts
|
|
@@ -2783923,7 +2784069,7 @@ function getRpcUrl(chainName) {
|
|
|
2783923
2784069
|
return defaultUrl;
|
|
2783924
2784070
|
}
|
|
2783925
2784071
|
var CHAINLINK_ENV_KEYS, STREAMS_BASE_URL = "https://api.dataengine.chain.link", STREAMS_FEED_IDS, FEED_SELECTORS, CHAIN_RPCS, FEED_DIRECTORY, CCIP_CHAINS, ERC20_APPROVE_ABI, CCIP_ROUTER_ABI;
|
|
2783926
|
-
var
|
|
2784072
|
+
var init_types54 = __esm(() => {
|
|
2783927
2784073
|
CHAINLINK_ENV_KEYS = {
|
|
2783928
2784074
|
API_KEY: "CHAINLINK_API_KEY",
|
|
2783929
2784075
|
API_SECRET: "CHAINLINK_API_SECRET",
|
|
@@ -2786517,7 +2786663,7 @@ function listAvailableFeeds() {
|
|
|
2786517
2786663
|
}
|
|
2786518
2786664
|
var import_data_streams_sdk, _client = null;
|
|
2786519
2786665
|
var init_streams = __esm(() => {
|
|
2786520
|
-
|
|
2786666
|
+
init_types54();
|
|
2786521
2786667
|
import_data_streams_sdk = __toESM(require_src41(), 1);
|
|
2786522
2786668
|
});
|
|
2786523
2786669
|
|
|
@@ -2786610,7 +2786756,7 @@ async function comparePrices(pair, chainName = "ethereum", streamPrice) {
|
|
|
2786610
2786756
|
};
|
|
2786611
2786757
|
}
|
|
2786612
2786758
|
var init_feeds = __esm(() => {
|
|
2786613
|
-
|
|
2786759
|
+
init_types54();
|
|
2786614
2786760
|
init_streams();
|
|
2786615
2786761
|
});
|
|
2786616
2786762
|
|
|
@@ -2786751,12 +2786897,12 @@ async function getCCIPStatus(messageId) {
|
|
|
2786751
2786897
|
}
|
|
2786752
2786898
|
var init_ccip7 = __esm(() => {
|
|
2786753
2786899
|
init_lib2();
|
|
2786754
|
-
|
|
2786900
|
+
init_types54();
|
|
2786755
2786901
|
});
|
|
2786756
2786902
|
|
|
2786757
2786903
|
// src/infra/chainlink/index.ts
|
|
2786758
2786904
|
var init_chainlink = __esm(() => {
|
|
2786759
|
-
|
|
2786905
|
+
init_types54();
|
|
2786760
2786906
|
init_streams();
|
|
2786761
2786907
|
init_feeds();
|
|
2786762
2786908
|
init_ccip7();
|
|
@@ -2788448,7 +2788594,7 @@ var init_runtime_tools = __esm(() => {
|
|
|
2788448
2788594
|
|
|
2788449
2788595
|
// src/core/regime/types.ts
|
|
2788450
2788596
|
var MarketRegimeSchema, RegimeMetricsSchema, RegimeSignalSchema, RegimeSpanSchema, RegimeHistorySchema, MultiTimeframeRegimeSchema;
|
|
2788451
|
-
var
|
|
2788597
|
+
var init_types55 = __esm(() => {
|
|
2788452
2788598
|
init_zod();
|
|
2788453
2788599
|
MarketRegimeSchema = exports_external.enum([
|
|
2788454
2788600
|
"trending_up",
|
|
@@ -2788676,7 +2788822,7 @@ var init_watcher = __esm(() => {
|
|
|
2788676
2788822
|
|
|
2788677
2788823
|
// src/core/regime/index.ts
|
|
2788678
2788824
|
var init_regime = __esm(() => {
|
|
2788679
|
-
|
|
2788825
|
+
init_types55();
|
|
2788680
2788826
|
init_classifier();
|
|
2788681
2788827
|
init_detector();
|
|
2788682
2788828
|
init_watcher();
|
|
@@ -2788688,7 +2788834,7 @@ var init_regime_tools = __esm(() => {
|
|
|
2788688
2788834
|
init_tools();
|
|
2788689
2788835
|
init_zod();
|
|
2788690
2788836
|
init_regime();
|
|
2788691
|
-
|
|
2788837
|
+
init_types55();
|
|
2788692
2788838
|
init_types9();
|
|
2788693
2788839
|
init_logger2();
|
|
2788694
2788840
|
logger112 = createModuleLogger("regime-tools");
|
|
@@ -2789365,7 +2789511,7 @@ var init_advanced_tools = __esm(() => {
|
|
|
2789365
2789511
|
|
|
2789366
2789512
|
// src/core/genome/types.ts
|
|
2789367
2789513
|
var MutationSchema2, GenomeSchema, ExperimentSchema, MutationSuggestionSchema;
|
|
2789368
|
-
var
|
|
2789514
|
+
var init_types56 = __esm(() => {
|
|
2789369
2789515
|
init_zod();
|
|
2789370
2789516
|
MutationSchema2 = exports_external.object({
|
|
2789371
2789517
|
mutation_id: exports_external.string().uuid(),
|
|
@@ -2789892,7 +2790038,7 @@ __export(exports_genome, {
|
|
|
2789892
2790038
|
EvolutionLoop: () => EvolutionLoop
|
|
2789893
2790039
|
});
|
|
2789894
2790040
|
var init_genome = __esm(() => {
|
|
2789895
|
-
|
|
2790041
|
+
init_types56();
|
|
2789896
2790042
|
init_manager3();
|
|
2789897
2790043
|
init_mutator();
|
|
2789898
2790044
|
init_fitness();
|
|
@@ -2796226,7 +2796372,7 @@ var init_zod_compat = __esm(() => {
|
|
|
2796226
2796372
|
|
|
2796227
2796373
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
2796228
2796374
|
var LATEST_PROTOCOL_VERSION = "2025-11-25", SUPPORTED_PROTOCOL_VERSIONS, RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task", JSONRPC_VERSION4 = "2.0", AssertObjectSchema, ProgressTokenSchema, CursorSchema, TaskCreationParamsSchema, TaskMetadataSchema, RelatedTaskMetadataSchema, RequestMetaSchema, BaseRequestParamsSchema, TaskAugmentedRequestParamsSchema, isTaskAugmentedRequestParams = (value2) => TaskAugmentedRequestParamsSchema.safeParse(value2).success, RequestSchema4, NotificationsParamsSchema, NotificationSchema, ResultSchema4, RequestIdSchema, JSONRPCRequestSchema4, isJSONRPCRequest = (value2) => JSONRPCRequestSchema4.safeParse(value2).success, JSONRPCNotificationSchema4, isJSONRPCNotification = (value2) => JSONRPCNotificationSchema4.safeParse(value2).success, JSONRPCResultResponseSchema, isJSONRPCResultResponse = (value2) => JSONRPCResultResponseSchema.safeParse(value2).success, ErrorCode, JSONRPCErrorResponseSchema, isJSONRPCErrorResponse = (value2) => JSONRPCErrorResponseSchema.safeParse(value2).success, JSONRPCMessageSchema, JSONRPCResponseSchema4, EmptyResultSchema, CancelledNotificationParamsSchema, CancelledNotificationSchema, IconSchema, IconsSchema, BaseMetadataSchema, ImplementationSchema, FormElicitationCapabilitySchema, ElicitationCapabilitySchema, ClientTasksCapabilitySchema, ServerTasksCapabilitySchema, ClientCapabilitiesSchema, InitializeRequestParamsSchema, InitializeRequestSchema, ServerCapabilitiesSchema4, InitializeResultSchema, InitializedNotificationSchema, isInitializedNotification = (value2) => InitializedNotificationSchema.safeParse(value2).success, PingRequestSchema, ProgressSchema, ProgressNotificationParamsSchema, ProgressNotificationSchema, PaginatedRequestParamsSchema, PaginatedRequestSchema, PaginatedResultSchema4, TaskStatusSchema, TaskSchema, CreateTaskResultSchema, TaskStatusNotificationParamsSchema, TaskStatusNotificationSchema, GetTaskRequestSchema, GetTaskResultSchema, GetTaskPayloadRequestSchema, GetTaskPayloadResultSchema, ListTasksRequestSchema, ListTasksResultSchema, CancelTaskRequestSchema, CancelTaskResultSchema, ResourceContentsSchema4, TextResourceContentsSchema4, Base64Schema, BlobResourceContentsSchema4, RoleSchema, AnnotationsSchema, ResourceSchema, ResourceTemplateSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ResourceRequestParamsSchema, ReadResourceRequestParamsSchema, ReadResourceRequestSchema, ReadResourceResultSchema, ResourceListChangedNotificationSchema, SubscribeRequestParamsSchema, SubscribeRequestSchema, UnsubscribeRequestParamsSchema, UnsubscribeRequestSchema, ResourceUpdatedNotificationParamsSchema, ResourceUpdatedNotificationSchema, PromptArgumentSchema, PromptSchema, ListPromptsRequestSchema, ListPromptsResultSchema, GetPromptRequestParamsSchema, GetPromptRequestSchema, TextContentSchema4, ImageContentSchema4, AudioContentSchema, ToolUseContentSchema, EmbeddedResourceSchema4, ResourceLinkSchema, ContentBlockSchema, PromptMessageSchema, GetPromptResultSchema, PromptListChangedNotificationSchema, ToolAnnotationsSchema, ToolExecutionSchema, ToolSchema4, ListToolsRequestSchema, ListToolsResultSchema, CallToolResultSchema, CompatibilityCallToolResultSchema, CallToolRequestParamsSchema, CallToolRequestSchema, ToolListChangedNotificationSchema, ListChangedOptionsBaseSchema, LoggingLevelSchema, SetLevelRequestParamsSchema, SetLevelRequestSchema, LoggingMessageNotificationParamsSchema, LoggingMessageNotificationSchema, ModelHintSchema, ModelPreferencesSchema, ToolChoiceSchema, ToolResultContentSchema, SamplingContentSchema, SamplingMessageContentBlockSchema, SamplingMessageSchema, CreateMessageRequestParamsSchema, CreateMessageRequestSchema, CreateMessageResultSchema, CreateMessageResultWithToolsSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema, UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema, LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema, EnumSchemaSchema, PrimitiveSchemaDefinitionSchema, ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema, ElicitRequestParamsSchema, ElicitRequestSchema, ElicitationCompleteNotificationParamsSchema, ElicitationCompleteNotificationSchema, ElicitResultSchema, ResourceTemplateReferenceSchema, PromptReferenceSchema, CompleteRequestParamsSchema, CompleteRequestSchema, CompleteResultSchema, RootSchema, ListRootsRequestSchema, ListRootsResultSchema, RootsListChangedNotificationSchema, ClientRequestSchema, ClientNotificationSchema, ClientResultSchema, ServerRequestSchema, ServerNotificationSchema, ServerResultSchema, McpError, UrlElicitationRequiredError;
|
|
2796229
|
-
var
|
|
2796375
|
+
var init_types57 = __esm(() => {
|
|
2796230
2796376
|
init_v42();
|
|
2796231
2796377
|
SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
|
|
2796232
2796378
|
AssertObjectSchema = custom((v18) => v18 !== null && (typeof v18 === "object" || typeof v18 === "function"));
|
|
@@ -2797902,7 +2798048,7 @@ function mergeCapabilities(base10, additional) {
|
|
|
2797902
2798048
|
var DEFAULT_REQUEST_TIMEOUT_MSEC = 60000;
|
|
2797903
2798049
|
var init_protocol4 = __esm(() => {
|
|
2797904
2798050
|
init_zod_compat();
|
|
2797905
|
-
|
|
2798051
|
+
init_types57();
|
|
2797906
2798052
|
init_zod_json_schema_compat();
|
|
2797907
2798053
|
});
|
|
2797908
2798054
|
|
|
@@ -2804478,7 +2804624,7 @@ class ExperimentalClientTasks {
|
|
|
2804478
2804624
|
}
|
|
2804479
2804625
|
}
|
|
2804480
2804626
|
var init_client17 = __esm(() => {
|
|
2804481
|
-
|
|
2804627
|
+
init_types57();
|
|
2804482
2804628
|
});
|
|
2804483
2804629
|
|
|
2804484
2804630
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
|
|
@@ -2804561,7 +2804707,7 @@ function getSupportedElicitationModes(capabilities) {
|
|
|
2804561
2804707
|
var Client3;
|
|
2804562
2804708
|
var init_client18 = __esm(() => {
|
|
2804563
2804709
|
init_protocol4();
|
|
2804564
|
-
|
|
2804710
|
+
init_types57();
|
|
2804565
2804711
|
init_ajv_provider();
|
|
2804566
2804712
|
init_zod_compat();
|
|
2804567
2804713
|
init_client17();
|
|
@@ -2805808,7 +2805954,7 @@ async function registerClient(authorizationServerUrl, { metadata: metadata4, cli
|
|
|
2805808
2805954
|
var UnauthorizedError2, AUTHORIZATION_CODE_RESPONSE_TYPE = "code", AUTHORIZATION_CODE_CHALLENGE_METHOD = "S256";
|
|
2805809
2805955
|
var init_auth2 = __esm(() => {
|
|
2805810
2805956
|
init_index_node10();
|
|
2805811
|
-
|
|
2805957
|
+
init_types57();
|
|
2805812
2805958
|
init_auth();
|
|
2805813
2805959
|
init_auth();
|
|
2805814
2805960
|
init_errors43();
|
|
@@ -2806001,7 +2806147,7 @@ class SSEClientTransport {
|
|
|
2806001
2806147
|
var SseError;
|
|
2806002
2806148
|
var init_sse = __esm(() => {
|
|
2806003
2806149
|
init_dist43();
|
|
2806004
|
-
|
|
2806150
|
+
init_types57();
|
|
2806005
2806151
|
init_auth2();
|
|
2806006
2806152
|
SseError = class SseError extends Error {
|
|
2806007
2806153
|
constructor(code, message5, event9) {
|
|
@@ -2806498,7 +2806644,7 @@ function serializeMessage2(message5) {
|
|
|
2806498
2806644
|
`;
|
|
2806499
2806645
|
}
|
|
2806500
2806646
|
var init_stdio = __esm(() => {
|
|
2806501
|
-
|
|
2806647
|
+
init_types57();
|
|
2806502
2806648
|
});
|
|
2806503
2806649
|
|
|
2806504
2806650
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js
|
|
@@ -2807007,7 +2807153,7 @@ class StreamableHTTPClientTransport {
|
|
|
2807007
2807153
|
}
|
|
2807008
2807154
|
var DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS, StreamableHTTPError;
|
|
2807009
2807155
|
var init_streamableHttp = __esm(() => {
|
|
2807010
|
-
|
|
2807156
|
+
init_types57();
|
|
2807011
2807157
|
init_auth2();
|
|
2807012
2807158
|
init_stream();
|
|
2807013
2807159
|
DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS = {
|
|
@@ -2807156,7 +2807302,7 @@ var init_exit_hook = __esm(() => {
|
|
|
2807156
2807302
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
|
|
2807157
2807303
|
var init_server = __esm(() => {
|
|
2807158
2807304
|
init_protocol4();
|
|
2807159
|
-
|
|
2807305
|
+
init_types57();
|
|
2807160
2807306
|
init_ajv_provider();
|
|
2807161
2807307
|
init_zod_compat();
|
|
2807162
2807308
|
});
|
|
@@ -2811909,7 +2812055,7 @@ var require_content_type = __commonJS((exports6) => {
|
|
|
2811909
2812055
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/sse.js
|
|
2811910
2812056
|
var import_raw_body, import_content_type;
|
|
2811911
2812057
|
var init_sse2 = __esm(() => {
|
|
2811912
|
-
|
|
2812058
|
+
init_types57();
|
|
2811913
2812059
|
import_raw_body = __toESM(require_raw_body(), 1);
|
|
2811914
2812060
|
import_content_type = __toESM(require_content_type(), 1);
|
|
2811915
2812061
|
});
|
|
@@ -2812121,7 +2812267,7 @@ var init_dist47 = __esm(() => {
|
|
|
2812121
2812267
|
|
|
2812122
2812268
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js
|
|
2812123
2812269
|
var init_webStandardStreamableHttp = __esm(() => {
|
|
2812124
|
-
|
|
2812270
|
+
init_types57();
|
|
2812125
2812271
|
});
|
|
2812126
2812272
|
|
|
2812127
2812273
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/streamableHttp.js
|
|
@@ -2812280,7 +2812426,7 @@ var init_dist48 = __esm(() => {
|
|
|
2812280
2812426
|
init_stdio2();
|
|
2812281
2812427
|
init_streamableHttp();
|
|
2812282
2812428
|
init_protocol4();
|
|
2812283
|
-
|
|
2812429
|
+
init_types57();
|
|
2812284
2812430
|
init_exit_hook();
|
|
2812285
2812431
|
init_zod();
|
|
2812286
2812432
|
init_dist6();
|
|
@@ -2824642,12 +2824788,13 @@ var SLASH_COMMANDS = [
|
|
|
2824642
2824788
|
{
|
|
2824643
2824789
|
name: "earn",
|
|
2824644
2824790
|
aliases: ["e", "savings"],
|
|
2824645
|
-
description: "
|
|
2824646
|
-
usage: "/earn",
|
|
2824791
|
+
description: "Earn products \u2014 browse, subscribe, redeem, view positions",
|
|
2824792
|
+
usage: "/earn [positions|products|subscribe|redeem|history]",
|
|
2824647
2824793
|
category: "account",
|
|
2824648
2824794
|
level: 2,
|
|
2824649
|
-
action: "
|
|
2824650
|
-
target: "
|
|
2824795
|
+
action: "agent",
|
|
2824796
|
+
target: "executor",
|
|
2824797
|
+
whenToUse: "Browse flexible/locked earn products, subscribe, redeem, or view positions and history"
|
|
2824651
2824798
|
},
|
|
2824652
2824799
|
{
|
|
2824653
2824800
|
name: "history",
|
|
@@ -2824816,23 +2824963,24 @@ var SLASH_COMMANDS = [
|
|
|
2824816
2824963
|
{
|
|
2824817
2824964
|
name: "experiment",
|
|
2824818
2824965
|
aliases: ["ab"],
|
|
2824819
|
-
description: "
|
|
2824820
|
-
usage: "/experiment [status|list|start|evaluate]",
|
|
2824966
|
+
description: "A/B strategy experiments \u2014 start, check, promote, rank, lineage",
|
|
2824967
|
+
usage: "/experiment [status|list|start|check|promote|rank|lineage|evaluate]",
|
|
2824821
2824968
|
category: "strategy",
|
|
2824822
2824969
|
level: 3,
|
|
2824823
2824970
|
action: "agent",
|
|
2824824
|
-
target: "backtester"
|
|
2824971
|
+
target: "backtester",
|
|
2824972
|
+
whenToUse: "Manage A/B experiments: start tests, check progress, promote winners, rank variants, view lineage"
|
|
2824825
2824973
|
},
|
|
2824826
2824974
|
{
|
|
2824827
2824975
|
name: "audit",
|
|
2824828
2824976
|
aliases: ["trail", "decisions"],
|
|
2824829
|
-
description: "
|
|
2824830
|
-
usage: "/audit [recent|agent <name>|position <id
|
|
2824977
|
+
description: "Agent decision audit trail \u2014 entries, paths, activity, stats",
|
|
2824978
|
+
usage: "/audit [recent|agent <name>|position <id>|decision <id>|activity|stats]",
|
|
2824831
2824979
|
category: "system",
|
|
2824832
2824980
|
level: 2,
|
|
2824833
2824981
|
action: "agent",
|
|
2824834
2824982
|
target: "monitor",
|
|
2824835
|
-
whenToUse: "Investigate
|
|
2824983
|
+
whenToUse: "Investigate decision reasoning, review agent activity summaries, or view audit statistics"
|
|
2824836
2824984
|
},
|
|
2824837
2824985
|
{
|
|
2824838
2824986
|
name: "health",
|
|
@@ -2824920,7 +2825068,7 @@ var SLASH_COMMANDS = [
|
|
|
2824920
2825068
|
},
|
|
2824921
2825069
|
{
|
|
2824922
2825070
|
name: "ensemble",
|
|
2824923
|
-
aliases: ["multi", "validate"
|
|
2825071
|
+
aliases: ["multi", "validate"],
|
|
2824924
2825072
|
description: "Multi-strategy validation (~8-12s, 5 strategies)",
|
|
2824925
2825073
|
usage: "/ensemble <symbol>",
|
|
2824926
2825074
|
category: "market",
|
|
@@ -2825239,6 +2825387,99 @@ var SLASH_COMMANDS = [
|
|
|
2825239
2825387
|
action: "agent",
|
|
2825240
2825388
|
target: "gordon",
|
|
2825241
2825389
|
whenToUse: "See latest features and bug fixes"
|
|
2825390
|
+
},
|
|
2825391
|
+
{
|
|
2825392
|
+
name: "chains",
|
|
2825393
|
+
aliases: ["networks", "chain"],
|
|
2825394
|
+
description: "Show configured blockchain networks and available tools",
|
|
2825395
|
+
usage: "/chains",
|
|
2825396
|
+
category: "system",
|
|
2825397
|
+
level: 1,
|
|
2825398
|
+
action: "agent",
|
|
2825399
|
+
target: "gordon",
|
|
2825400
|
+
whenToUse: "See which chain networks are configured and what tools are available"
|
|
2825401
|
+
},
|
|
2825402
|
+
{
|
|
2825403
|
+
name: "bridge",
|
|
2825404
|
+
aliases: ["ccip", "cross-chain"],
|
|
2825405
|
+
description: "Bridge tokens cross-chain via Chainlink CCIP",
|
|
2825406
|
+
usage: "/bridge [amount] [token] from [source] to [dest]",
|
|
2825407
|
+
category: "trading",
|
|
2825408
|
+
level: 1,
|
|
2825409
|
+
action: "agent",
|
|
2825410
|
+
target: "executor",
|
|
2825411
|
+
executionTime: "~10-30s",
|
|
2825412
|
+
whenToUse: "Transfer tokens between EVM chains (Ethereum, Arbitrum, Polygon, etc.)"
|
|
2825413
|
+
},
|
|
2825414
|
+
{
|
|
2825415
|
+
name: "solana",
|
|
2825416
|
+
aliases: ["sol"],
|
|
2825417
|
+
description: "Solana DeFi actions (swap, stake, lend, launch)",
|
|
2825418
|
+
usage: "/solana [swap|stake|lend|launch|balance]",
|
|
2825419
|
+
category: "trading",
|
|
2825420
|
+
level: 2,
|
|
2825421
|
+
action: "agent",
|
|
2825422
|
+
target: "executor",
|
|
2825423
|
+
whenToUse: "Interact with Solana DeFi protocols"
|
|
2825424
|
+
},
|
|
2825425
|
+
{
|
|
2825426
|
+
name: "polkadot",
|
|
2825427
|
+
aliases: ["dot"],
|
|
2825428
|
+
description: "Polkadot ecosystem actions (swap, stake, transfer)",
|
|
2825429
|
+
usage: "/polkadot [swap|stake|transfer|balance]",
|
|
2825430
|
+
category: "trading",
|
|
2825431
|
+
level: 2,
|
|
2825432
|
+
action: "agent",
|
|
2825433
|
+
target: "executor",
|
|
2825434
|
+
whenToUse: "Interact with Polkadot/HydraDX protocols"
|
|
2825435
|
+
},
|
|
2825436
|
+
{
|
|
2825437
|
+
name: "prices",
|
|
2825438
|
+
aliases: ["feeds", "cl-prices"],
|
|
2825439
|
+
description: "Real-time Chainlink Data Streams prices",
|
|
2825440
|
+
usage: "/prices [BTC ETH SOL ...]",
|
|
2825441
|
+
category: "market",
|
|
2825442
|
+
level: 1,
|
|
2825443
|
+
action: "agent",
|
|
2825444
|
+
target: "analyst",
|
|
2825445
|
+
executionTime: "~1-2s",
|
|
2825446
|
+
whenToUse: "Get sub-second institutional-grade price data from Chainlink"
|
|
2825447
|
+
},
|
|
2825448
|
+
{
|
|
2825449
|
+
name: "base",
|
|
2825450
|
+
aliases: ["base-l2"],
|
|
2825451
|
+
description: "Base L2 chain \u2014 trending apps, signals, DEX analytics",
|
|
2825452
|
+
usage: "/base [trending|signals|whales|dex]",
|
|
2825453
|
+
category: "market",
|
|
2825454
|
+
level: 2,
|
|
2825455
|
+
action: "agent",
|
|
2825456
|
+
target: "analyst",
|
|
2825457
|
+
executionTime: "~2-5s",
|
|
2825458
|
+
whenToUse: "Explore Base L2 ecosystem: trending dApps, whale movements, DEX activity"
|
|
2825459
|
+
},
|
|
2825460
|
+
{
|
|
2825461
|
+
name: "liquidation",
|
|
2825462
|
+
aliases: ["liq", "cascade"],
|
|
2825463
|
+
description: "Liquidation intelligence \u2014 cascade risk, pressure, crowding, squeezes",
|
|
2825464
|
+
usage: "/liquidation [cascade|pressure|crowding|squeeze] [symbol]",
|
|
2825465
|
+
category: "trading",
|
|
2825466
|
+
level: 2,
|
|
2825467
|
+
action: "agent",
|
|
2825468
|
+
target: "analyst",
|
|
2825469
|
+
executionTime: "~3-5s",
|
|
2825470
|
+
whenToUse: "Analyze liquidation risks, crowded positions, and short/long squeeze candidates"
|
|
2825471
|
+
},
|
|
2825472
|
+
{
|
|
2825473
|
+
name: "simulate",
|
|
2825474
|
+
aliases: ["sim", "preview"],
|
|
2825475
|
+
description: "Simulate order bundles before live execution",
|
|
2825476
|
+
usage: "/simulate [orders|breaker]",
|
|
2825477
|
+
category: "trading",
|
|
2825478
|
+
level: 3,
|
|
2825479
|
+
action: "agent",
|
|
2825480
|
+
target: "planner",
|
|
2825481
|
+
executionTime: "~2-5s",
|
|
2825482
|
+
whenToUse: "Preview order execution, simulate fills, or verify circuit breaker state"
|
|
2825242
2825483
|
}
|
|
2825243
2825484
|
];
|
|
2825244
2825485
|
function getCommandsByLevel(maxLevel) {
|
|
@@ -2825448,8 +2825689,24 @@ function commandToPrompt(command, args2) {
|
|
|
2825448
2825689
|
return "Disarm the system and return to safe mode";
|
|
2825449
2825690
|
case "portfolio":
|
|
2825450
2825691
|
return "Show my portfolio";
|
|
2825451
|
-
case "earn":
|
|
2825452
|
-
|
|
2825692
|
+
case "earn": {
|
|
2825693
|
+
const earnSub = args2?.trim().split(/\s+/)[0]?.toLowerCase();
|
|
2825694
|
+
if (earnSub === "products" || earnSub === "browse")
|
|
2825695
|
+
return "Show me available flexible and locked earn products with their APY rates and terms";
|
|
2825696
|
+
if (earnSub === "flexible")
|
|
2825697
|
+
return "Show me available flexible earn products I can subscribe to";
|
|
2825698
|
+
if (earnSub === "locked")
|
|
2825699
|
+
return "Show me available locked earn products with their lock periods and APY rates";
|
|
2825700
|
+
if (earnSub === "subscribe")
|
|
2825701
|
+
return "Help me subscribe to an earn product. Show me available options first.";
|
|
2825702
|
+
if (earnSub === "redeem")
|
|
2825703
|
+
return "Help me redeem from my earn positions. Show my current positions first.";
|
|
2825704
|
+
if (earnSub === "history")
|
|
2825705
|
+
return "Show my earn subscription and redemption history";
|
|
2825706
|
+
if (earnSub === "positions")
|
|
2825707
|
+
return "Show all my current earn/staking positions with current value and rewards";
|
|
2825708
|
+
return "Show all my current earn/staking positions with current value and rewards";
|
|
2825709
|
+
}
|
|
2825453
2825710
|
case "history":
|
|
2825454
2825711
|
return args2 ? `Show my trade history for ${args2}` : "Show my recent trade history";
|
|
2825455
2825712
|
case "help":
|
|
@@ -2825850,10 +2826107,11 @@ function commandToPrompt(command, args2) {
|
|
|
2825850
2826107
|
return "Show the regime transition history. Which symbol should I look at?";
|
|
2825851
2826108
|
case "evolve":
|
|
2825852
2826109
|
return args2 ? `Fork the ${args2} playbook with suggested mutations. Show me what changed and why, and prepare it for A/B testing.` : "Which playbook should I evolve? List available playbooks for mutation.";
|
|
2825853
|
-
case "experiment":
|
|
2826110
|
+
case "experiment": {
|
|
2825854
2826111
|
if (!args2)
|
|
2825855
2826112
|
return "Show the status of all active A/B experiments.";
|
|
2825856
|
-
const
|
|
2826113
|
+
const experimentParts = args2.split(/\s+/);
|
|
2826114
|
+
const experimentSubcmd = experimentParts[0]?.toLowerCase();
|
|
2825857
2826115
|
switch (experimentSubcmd) {
|
|
2825858
2826116
|
case "status":
|
|
2825859
2826117
|
return "Show the status of all active A/B experiments with performance comparisons.";
|
|
@@ -2825863,9 +2826121,20 @@ function commandToPrompt(command, args2) {
|
|
|
2825863
2826121
|
return "Start a new A/B experiment between strategy variants.";
|
|
2825864
2826122
|
case "evaluate":
|
|
2825865
2826123
|
return "Evaluate active experiments and recommend winners based on statistical significance.";
|
|
2826124
|
+
case "check":
|
|
2826125
|
+
return experimentParts[1] ? `Check the status and progress of experiment ${experimentParts[1]}. Show performance metrics for each variant.` : "Check the status of the most recent active experiment.";
|
|
2826126
|
+
case "promote":
|
|
2826127
|
+
return experimentParts[1] ? `Promote the winning variant from experiment ${experimentParts[1]} to become the primary strategy.` : "Promote the winner from the most recent completed experiment.";
|
|
2826128
|
+
case "rank":
|
|
2826129
|
+
return "Rank all playbook variants by performance. Show win rate, Sharpe ratio, and recommendation.";
|
|
2826130
|
+
case "lineage":
|
|
2826131
|
+
return experimentParts[1] ? `Show the playbook family tree for ${experimentParts[1]} \u2014 all forks, mutations, and their performance.` : "Show the lineage/family tree of all playbook variants and their evolutionary history.";
|
|
2826132
|
+
case "suggest":
|
|
2826133
|
+
return experimentParts[1] ? `Suggest mutations for the ${experimentParts[1]} playbook based on recent backtest results.` : "Suggest mutations for the most recent playbook based on backtest performance.";
|
|
2825866
2826134
|
default:
|
|
2825867
2826135
|
return "Show the status of all active A/B experiments.";
|
|
2825868
2826136
|
}
|
|
2826137
|
+
}
|
|
2825869
2826138
|
case "audit":
|
|
2825870
2826139
|
if (!args2)
|
|
2825871
2826140
|
return "Show me the most recent decisions from the audit trail.";
|
|
@@ -2825878,11 +2826147,115 @@ function commandToPrompt(command, args2) {
|
|
|
2825878
2826147
|
return auditParts[1] ? `Show audit trail entries for the ${auditParts[1]} agent.` : "Which agent's decisions should I look up?";
|
|
2825879
2826148
|
case "position":
|
|
2825880
2826149
|
return auditParts[1] ? `Show all decisions related to position ${auditParts[1]}.` : "Which position ID should I look up?";
|
|
2826150
|
+
case "decision":
|
|
2826151
|
+
return auditParts[1] ? `Get the full decision path for decision ${auditParts[1]}. Show the complete reasoning chain, inputs, and outcomes.` : "Which decision ID should I trace? Use /audit recent to find decision IDs.";
|
|
2826152
|
+
case "activity":
|
|
2826153
|
+
return auditParts[1] ? `Show agent activity summary for the ${auditParts[1]} agent \u2014 total decisions, success rate, common actions.` : "Show agent activity summary for all agents \u2014 total decisions, success rates, and common actions.";
|
|
2826154
|
+
case "stats":
|
|
2826155
|
+
return "Show audit statistics and trends \u2014 decision volume over time, success rates by agent, common failure reasons.";
|
|
2825881
2826156
|
default:
|
|
2825882
2826157
|
return "Show me the most recent decisions from the audit trail.";
|
|
2825883
2826158
|
}
|
|
2825884
2826159
|
case "health":
|
|
2825885
2826160
|
return "Run a portfolio health check. Show risk status, strategy health, and any warnings.";
|
|
2826161
|
+
case "chains":
|
|
2826162
|
+
return "Show me which blockchain networks are configured and available. For each configured chain, show the available tools and capabilities. For unconfigured chains, show what keys are needed.";
|
|
2826163
|
+
case "bridge":
|
|
2826164
|
+
if (args2) {
|
|
2826165
|
+
return `Help me bridge tokens cross-chain using Chainlink CCIP: ${args2}. Show me the fee estimate before executing.`;
|
|
2826166
|
+
}
|
|
2826167
|
+
return "Help me bridge tokens cross-chain using Chainlink CCIP. Show me supported chains and tokens.";
|
|
2826168
|
+
case "solana": {
|
|
2826169
|
+
if (!args2)
|
|
2826170
|
+
return "Show me Solana DeFi options \u2014 what can I do on Solana? Show my Solana balance if configured.";
|
|
2826171
|
+
const solSubcmd = args2.split(/\s+/)[0]?.toLowerCase();
|
|
2826172
|
+
const solArgs = args2.split(/\s+/).slice(1).join(" ");
|
|
2826173
|
+
switch (solSubcmd) {
|
|
2826174
|
+
case "swap":
|
|
2826175
|
+
return solArgs ? `Swap tokens on Solana: ${solArgs}` : "Help me swap tokens on Solana. What pair?";
|
|
2826176
|
+
case "stake":
|
|
2826177
|
+
return solArgs ? `Stake SOL: ${solArgs}` : "Help me stake SOL. Show me staking options.";
|
|
2826178
|
+
case "lend":
|
|
2826179
|
+
return solArgs ? `Lend on Solana: ${solArgs}` : "Show me Solana lending options.";
|
|
2826180
|
+
case "launch":
|
|
2826181
|
+
return solArgs ? `Launch a token on Solana: ${solArgs}` : "Help me launch a token on Solana.";
|
|
2826182
|
+
case "balance":
|
|
2826183
|
+
return "Show my Solana wallet balance and token holdings.";
|
|
2826184
|
+
default:
|
|
2826185
|
+
return `Solana action: ${args2}`;
|
|
2826186
|
+
}
|
|
2826187
|
+
}
|
|
2826188
|
+
case "polkadot": {
|
|
2826189
|
+
if (!args2)
|
|
2826190
|
+
return "Show me Polkadot ecosystem options \u2014 what can I do on Polkadot/HydraDX? Show my balance if configured.";
|
|
2826191
|
+
const dotSubcmd = args2.split(/\s+/)[0]?.toLowerCase();
|
|
2826192
|
+
const dotArgs = args2.split(/\s+/).slice(1).join(" ");
|
|
2826193
|
+
switch (dotSubcmd) {
|
|
2826194
|
+
case "swap":
|
|
2826195
|
+
return dotArgs ? `Swap on HydraDX: ${dotArgs}` : "Help me swap on HydraDX.";
|
|
2826196
|
+
case "stake":
|
|
2826197
|
+
return dotArgs ? `Stake DOT: ${dotArgs}` : "Help me stake DOT. Show staking options.";
|
|
2826198
|
+
case "transfer":
|
|
2826199
|
+
return dotArgs ? `Transfer on Polkadot: ${dotArgs}` : "Help me transfer tokens on Polkadot.";
|
|
2826200
|
+
case "balance":
|
|
2826201
|
+
return "Show my Polkadot wallet balance.";
|
|
2826202
|
+
default:
|
|
2826203
|
+
return `Polkadot action: ${args2}`;
|
|
2826204
|
+
}
|
|
2826205
|
+
}
|
|
2826206
|
+
case "prices":
|
|
2826207
|
+
if (args2) {
|
|
2826208
|
+
const pairs2 = args2.split(/\s+/).map((s2) => s2.toUpperCase());
|
|
2826209
|
+
return `Get real-time Chainlink Data Streams prices for: ${pairs2.join(", ")}. Show bid, ask, and timestamp.`;
|
|
2826210
|
+
}
|
|
2826211
|
+
return "Get real-time Chainlink Data Streams prices for major crypto pairs (BTC, ETH, SOL, LINK, etc.)";
|
|
2826212
|
+
case "base": {
|
|
2826213
|
+
const sub3 = args2?.trim().toLowerCase();
|
|
2826214
|
+
if (sub3 === "trending")
|
|
2826215
|
+
return "Show me trending dApps and featured projects on Base L2 from the Onchain Registry";
|
|
2826216
|
+
if (sub3 === "signals")
|
|
2826217
|
+
return "Detect trading signals on Base: whale transfers, volume spikes, new listings, and DEX pressure";
|
|
2826218
|
+
if (sub3 === "whales")
|
|
2826219
|
+
return "Show recent whale transfers on Base L2 using Basescan data";
|
|
2826220
|
+
if (sub3 === "dex")
|
|
2826221
|
+
return "Show Base DEX analytics: top pairs by volume, new token listings, and boosted tokens from DexScreener";
|
|
2826222
|
+
if (sub3)
|
|
2826223
|
+
return `Explore Base L2: ${args2}`;
|
|
2826224
|
+
return "Show me an overview of the Base L2 ecosystem: trending apps, recent signals, and DEX activity";
|
|
2826225
|
+
}
|
|
2826226
|
+
case "liquidation": {
|
|
2826227
|
+
if (!args2)
|
|
2826228
|
+
return "Analyze liquidation risks across my open positions. Show cascade risk, liquidation pressure, and any squeeze candidates.";
|
|
2826229
|
+
const liqParts = args2.split(/\s+/);
|
|
2826230
|
+
const liqSub = liqParts[0]?.toLowerCase();
|
|
2826231
|
+
const liqSymbol = liqParts[1]?.toUpperCase();
|
|
2826232
|
+
switch (liqSub) {
|
|
2826233
|
+
case "cascade":
|
|
2826234
|
+
return liqSymbol ? `Analyze cascade liquidation risk for ${liqSymbol}. Show chain reaction scenarios and exposure.` : "Analyze cascade liquidation risk across the market. Show vulnerable positions and chain reaction scenarios.";
|
|
2826235
|
+
case "pressure":
|
|
2826236
|
+
return liqSymbol ? `Measure liquidation pressure on ${liqSymbol}. Show concentration of stop-losses and liquidation levels.` : "Measure liquidation pressure across my positions. Show which are most at risk.";
|
|
2826237
|
+
case "crowding":
|
|
2826238
|
+
return liqSymbol ? `Analyze crowding in ${liqSymbol} positions. Show how many traders are in similar positions.` : "Analyze crowding across positions. Show which trades are in overcrowded territory.";
|
|
2826239
|
+
case "squeeze":
|
|
2826240
|
+
return liqSymbol ? `Analyze squeeze potential for ${liqSymbol}. Is a short or long squeeze likely?` : "Find potential squeeze candidates across the market. Show short and long squeeze probabilities.";
|
|
2826241
|
+
default:
|
|
2826242
|
+
return `Analyze liquidation risks for ${args2}`;
|
|
2826243
|
+
}
|
|
2826244
|
+
}
|
|
2826245
|
+
case "simulate": {
|
|
2826246
|
+
const simSub = args2?.trim().toLowerCase();
|
|
2826247
|
+
if (simSub === "orders" || simSub === "bundle")
|
|
2826248
|
+
return "Simulate my pending order bundle. Show projected fills, slippage, and execution impact before going live.";
|
|
2826249
|
+
if (simSub === "breaker" || simSub === "circuit")
|
|
2826250
|
+
return "Generate a circuit breaker proof for the current state. Verify that safety mechanisms are properly configured.";
|
|
2826251
|
+
if (simSub === "verify")
|
|
2826252
|
+
return "Verify the integrity of a previously generated circuit breaker proof.";
|
|
2826253
|
+
if (simSub === "regime")
|
|
2826254
|
+
return "Query regime-scoped memory context. Show what the system remembers about current market conditions and how it affects decisions.";
|
|
2826255
|
+
if (simSub)
|
|
2826256
|
+
return `Simulate: ${args2}. Show projected outcomes before executing.`;
|
|
2826257
|
+
return "Simulate pending orders before execution. Show projected fills, slippage, and impact analysis.";
|
|
2826258
|
+
}
|
|
2825886
2826259
|
default:
|
|
2825887
2826260
|
return args2 || command.description;
|
|
2825888
2826261
|
}
|
|
@@ -2826957,10 +2827330,10 @@ var StatusBar = ({
|
|
|
2826957
2827330
|
mode: mode2,
|
|
2826958
2827331
|
portfolioValue,
|
|
2826959
2827332
|
connectionStatus = "disconnected",
|
|
2826960
|
-
currency = "USDT",
|
|
2826961
2827333
|
btcPrice,
|
|
2826962
2827334
|
threadInfo,
|
|
2826963
|
-
tickerItems
|
|
2827335
|
+
tickerItems,
|
|
2827336
|
+
chainStatus
|
|
2826964
2827337
|
}) => {
|
|
2826965
2827338
|
const formatValue = (value2) => {
|
|
2826966
2827339
|
if (value2 === undefined)
|
|
@@ -2827060,6 +2827433,45 @@ var StatusBar = ({
|
|
|
2827060
2827433
|
}, undefined, true, undefined, this)
|
|
2827061
2827434
|
]
|
|
2827062
2827435
|
}, undefined, true, undefined, this),
|
|
2827436
|
+
chainStatus && (chainStatus.solana || chainStatus.polkadot || chainStatus.chainlink || chainStatus.evm || chainStatus.cdp || chainStatus.base) && /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Box_default, {
|
|
2827437
|
+
gap: 1,
|
|
2827438
|
+
children: [
|
|
2827439
|
+
/* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Text, {
|
|
2827440
|
+
color: COLORS.DIM,
|
|
2827441
|
+
children: "Chains:"
|
|
2827442
|
+
}, undefined, false, undefined, this),
|
|
2827443
|
+
chainStatus.solana && /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Text, {
|
|
2827444
|
+
color: COLORS.GREEN,
|
|
2827445
|
+
bold: true,
|
|
2827446
|
+
children: "SOL"
|
|
2827447
|
+
}, undefined, false, undefined, this),
|
|
2827448
|
+
chainStatus.polkadot && /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Text, {
|
|
2827449
|
+
color: COLORS.GREEN,
|
|
2827450
|
+
bold: true,
|
|
2827451
|
+
children: "DOT"
|
|
2827452
|
+
}, undefined, false, undefined, this),
|
|
2827453
|
+
chainStatus.chainlink && /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Text, {
|
|
2827454
|
+
color: COLORS.GREEN,
|
|
2827455
|
+
bold: true,
|
|
2827456
|
+
children: "CL"
|
|
2827457
|
+
}, undefined, false, undefined, this),
|
|
2827458
|
+
chainStatus.evm && /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Text, {
|
|
2827459
|
+
color: COLORS.GREEN,
|
|
2827460
|
+
bold: true,
|
|
2827461
|
+
children: "EVM"
|
|
2827462
|
+
}, undefined, false, undefined, this),
|
|
2827463
|
+
chainStatus.cdp && /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Text, {
|
|
2827464
|
+
color: COLORS.GREEN,
|
|
2827465
|
+
bold: true,
|
|
2827466
|
+
children: "CDP"
|
|
2827467
|
+
}, undefined, false, undefined, this),
|
|
2827468
|
+
chainStatus.base && !chainStatus.cdp && /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Text, {
|
|
2827469
|
+
color: COLORS.GREEN,
|
|
2827470
|
+
bold: true,
|
|
2827471
|
+
children: "BASE"
|
|
2827472
|
+
}, undefined, false, undefined, this)
|
|
2827473
|
+
]
|
|
2827474
|
+
}, undefined, true, undefined, this),
|
|
2827063
2827475
|
threadInfo && /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Box_default, {
|
|
2827064
2827476
|
gap: 1,
|
|
2827065
2827477
|
children: [
|
|
@@ -2827111,7 +2827523,7 @@ var import_react64 = __toESM(require_react(), 1);
|
|
|
2827111
2827523
|
// package.json
|
|
2827112
2827524
|
var package_default2 = {
|
|
2827113
2827525
|
name: "@general-liquidity/gordon-cli",
|
|
2827114
|
-
version: "0.75.
|
|
2827526
|
+
version: "0.75.14",
|
|
2827115
2827527
|
description: "The Frontier Trading Agent",
|
|
2827116
2827528
|
author: "General Liquidity, Inc.",
|
|
2827117
2827529
|
license: "MIT",
|
|
@@ -2827357,6 +2827769,8 @@ var QuickStartMenu = ({
|
|
|
2827357
2827769
|
{ label: "Deep analysis", value: "analyze" },
|
|
2827358
2827770
|
{ label: "Strategy Dashboard", value: "strategies-live" },
|
|
2827359
2827771
|
{ label: "Market Regime", value: "regime" },
|
|
2827772
|
+
{ label: "Bridge tokens (cross-chain)", value: "bridge" },
|
|
2827773
|
+
{ label: "Chain networks status", value: "chains" },
|
|
2827360
2827774
|
{ label: "Settings & API keys", value: "setup" },
|
|
2827361
2827775
|
{ label: "Help & commands", value: "help" }
|
|
2827362
2827776
|
];
|
|
@@ -2827970,7 +2828384,7 @@ function HowItWorksStep() {
|
|
|
2827970
2828384
|
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
2827971
2828385
|
color: COLORS.HIGHLIGHT,
|
|
2827972
2828386
|
bold: true,
|
|
2827973
|
-
children: "
|
|
2828387
|
+
children: "350+ tools"
|
|
2827974
2828388
|
}, undefined, false, undefined, this),
|
|
2827975
2828389
|
" and ",
|
|
2827976
2828390
|
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
@@ -2828083,6 +2828497,88 @@ function HowItWorksStep() {
|
|
|
2828083
2828497
|
]
|
|
2828084
2828498
|
}, undefined, true, undefined, this)
|
|
2828085
2828499
|
]
|
|
2828500
|
+
}, undefined, true, undefined, this),
|
|
2828501
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
2828502
|
+
marginTop: 1,
|
|
2828503
|
+
marginBottom: 1,
|
|
2828504
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
2828505
|
+
color: COLORS.WHITE,
|
|
2828506
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
2828507
|
+
color: COLORS.HIGHLIGHT,
|
|
2828508
|
+
bold: true,
|
|
2828509
|
+
children: "Supported Chains:"
|
|
2828510
|
+
}, undefined, false, undefined, this)
|
|
2828511
|
+
}, undefined, false, undefined, this)
|
|
2828512
|
+
}, undefined, false, undefined, this),
|
|
2828513
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
2828514
|
+
flexDirection: "column",
|
|
2828515
|
+
paddingLeft: 2,
|
|
2828516
|
+
children: [
|
|
2828517
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
2828518
|
+
children: [
|
|
2828519
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
2828520
|
+
width: 12,
|
|
2828521
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
2828522
|
+
color: COLORS.WHITE,
|
|
2828523
|
+
bold: true,
|
|
2828524
|
+
children: "Solana"
|
|
2828525
|
+
}, undefined, false, undefined, this)
|
|
2828526
|
+
}, undefined, false, undefined, this),
|
|
2828527
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
2828528
|
+
color: COLORS.DIM,
|
|
2828529
|
+
children: "DeFi, tokens, staking, lending (60+ tools)"
|
|
2828530
|
+
}, undefined, false, undefined, this)
|
|
2828531
|
+
]
|
|
2828532
|
+
}, undefined, true, undefined, this),
|
|
2828533
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
2828534
|
+
children: [
|
|
2828535
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
2828536
|
+
width: 12,
|
|
2828537
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
2828538
|
+
color: COLORS.WHITE,
|
|
2828539
|
+
bold: true,
|
|
2828540
|
+
children: "Polkadot"
|
|
2828541
|
+
}, undefined, false, undefined, this)
|
|
2828542
|
+
}, undefined, false, undefined, this),
|
|
2828543
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
2828544
|
+
color: COLORS.DIM,
|
|
2828545
|
+
children: "Cross-chain swaps, staking, governance"
|
|
2828546
|
+
}, undefined, false, undefined, this)
|
|
2828547
|
+
]
|
|
2828548
|
+
}, undefined, true, undefined, this),
|
|
2828549
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
2828550
|
+
children: [
|
|
2828551
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
2828552
|
+
width: 12,
|
|
2828553
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
2828554
|
+
color: COLORS.WHITE,
|
|
2828555
|
+
bold: true,
|
|
2828556
|
+
children: "EVM"
|
|
2828557
|
+
}, undefined, false, undefined, this)
|
|
2828558
|
+
}, undefined, false, undefined, this),
|
|
2828559
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
2828560
|
+
color: COLORS.DIM,
|
|
2828561
|
+
children: "Bridging via Chainlink CCIP, on-chain price feeds"
|
|
2828562
|
+
}, undefined, false, undefined, this)
|
|
2828563
|
+
]
|
|
2828564
|
+
}, undefined, true, undefined, this),
|
|
2828565
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
2828566
|
+
children: [
|
|
2828567
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
2828568
|
+
width: 12,
|
|
2828569
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
2828570
|
+
color: COLORS.WHITE,
|
|
2828571
|
+
bold: true,
|
|
2828572
|
+
children: "Base"
|
|
2828573
|
+
}, undefined, false, undefined, this)
|
|
2828574
|
+
}, undefined, false, undefined, this),
|
|
2828575
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
2828576
|
+
color: COLORS.DIM,
|
|
2828577
|
+
children: "Smart wallets via Coinbase CDP"
|
|
2828578
|
+
}, undefined, false, undefined, this)
|
|
2828579
|
+
]
|
|
2828580
|
+
}, undefined, true, undefined, this)
|
|
2828581
|
+
]
|
|
2828086
2828582
|
}, undefined, true, undefined, this)
|
|
2828087
2828583
|
]
|
|
2828088
2828584
|
}, undefined, true, undefined, this);
|
|
@@ -2828096,7 +2828592,7 @@ function StrategiesStep() {
|
|
|
2828096
2828592
|
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
2828097
2828593
|
color: COLORS.ACCENT,
|
|
2828098
2828594
|
bold: true,
|
|
2828099
|
-
children: "
|
|
2828595
|
+
children: "Trading Strategies"
|
|
2828100
2828596
|
}, undefined, false, undefined, this)
|
|
2828101
2828597
|
}, undefined, false, undefined, this),
|
|
2828102
2828598
|
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
@@ -2828108,7 +2828604,7 @@ function StrategiesStep() {
|
|
|
2828108
2828604
|
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
2828109
2828605
|
color: COLORS.HIGHLIGHT,
|
|
2828110
2828606
|
bold: true,
|
|
2828111
|
-
children: "
|
|
2828607
|
+
children: "battle-tested strategies"
|
|
2828112
2828608
|
}, undefined, false, undefined, this),
|
|
2828113
2828609
|
" for different market conditions:"
|
|
2828114
2828610
|
]
|
|
@@ -2829249,10 +2829745,18 @@ await init_client19();
|
|
|
2829249
2829745
|
// src/app/SetupWizard.tsx
|
|
2829250
2829746
|
init_binance2();
|
|
2829251
2829747
|
init_exchange();
|
|
2829748
|
+
init_types11();
|
|
2829252
2829749
|
init_config2();
|
|
2829253
2829750
|
init_env();
|
|
2829254
2829751
|
init_theme();
|
|
2829255
2829752
|
var jsx_dev_runtime21 = __toESM(require_jsx_dev_runtime(), 1);
|
|
2829753
|
+
var CHAIN_OPTIONS = [
|
|
2829754
|
+
{ id: "solana", label: "Solana", description: "DeFi swaps, token launches, staking, lending (60+ tools)" },
|
|
2829755
|
+
{ id: "polkadot", label: "Polkadot", description: "Cross-chain swaps, staking, governance" },
|
|
2829756
|
+
{ id: "chainlink", label: "Chainlink Streams", description: "Real-time institutional-grade price feeds" },
|
|
2829757
|
+
{ id: "evm", label: "EVM / CCIP", description: "Cross-chain bridging via Chainlink CCIP" },
|
|
2829758
|
+
{ id: "cdp", label: "Coinbase CDP", description: "Base smart wallets, onchain actions" }
|
|
2829759
|
+
];
|
|
2829256
2829760
|
var SUPPORTED_EXCHANGES2 = ExchangeFactory.getSupportedExchanges();
|
|
2829257
2829761
|
var EXCHANGE_LABELS = {
|
|
2829258
2829762
|
binance: "Binance",
|
|
@@ -2829327,6 +2829831,9 @@ var EXCHANGE_INSTRUCTIONS = {
|
|
|
2829327
2829831
|
"Supports 15+ chains: Ethereum, Base, Arbitrum, Polygon, Optimism, etc."
|
|
2829328
2829832
|
]
|
|
2829329
2829833
|
};
|
|
2829834
|
+
var SOLANA_BASE58_REGEX = /^[1-9A-HJ-NP-Za-km-z]{32,128}$/;
|
|
2829835
|
+
var EVM_HEX_KEY_REGEX = /^0x[0-9a-fA-F]{64}$/;
|
|
2829836
|
+
var POLKADOT_HEX_KEY_REGEX = /^0x[0-9a-fA-F]{64}$/;
|
|
2829330
2829837
|
function maskSecret(value2) {
|
|
2829331
2829838
|
if (value2.length === 0)
|
|
2829332
2829839
|
return "";
|
|
@@ -2829375,6 +2829882,20 @@ function SetupWizard({ onComplete }) {
|
|
|
2829375
2829882
|
exchangePermissions: null,
|
|
2829376
2829883
|
exchangeError: null,
|
|
2829377
2829884
|
exchangeValidated: false,
|
|
2829885
|
+
selectedChains: [],
|
|
2829886
|
+
chainKeys: {
|
|
2829887
|
+
solanaPrivateKey: "",
|
|
2829888
|
+
solanaRpcUrl: "",
|
|
2829889
|
+
polkadotMnemonic: "",
|
|
2829890
|
+
polkadotPrivateKey: "",
|
|
2829891
|
+
chainlinkApiKey: "",
|
|
2829892
|
+
chainlinkApiSecret: "",
|
|
2829893
|
+
evmPrivateKey: "",
|
|
2829894
|
+
cdpApiKeyId: "",
|
|
2829895
|
+
cdpApiKeySecret: "",
|
|
2829896
|
+
cdpWalletSecret: ""
|
|
2829897
|
+
},
|
|
2829898
|
+
chainSetupIndex: 0,
|
|
2829378
2829899
|
openaiApiKey: "",
|
|
2829379
2829900
|
dedalusApiKey: "",
|
|
2829380
2829901
|
preferences: {
|
|
@@ -2829432,7 +2829953,7 @@ function SetupWizard({ onComplete }) {
|
|
|
2829432
2829953
|
}
|
|
2829433
2829954
|
setState((prev) => ({
|
|
2829434
2829955
|
...prev,
|
|
2829435
|
-
step: "
|
|
2829956
|
+
step: "chain-select",
|
|
2829436
2829957
|
isValidating: false,
|
|
2829437
2829958
|
exchangePermissions: permissions,
|
|
2829438
2829959
|
exchangeError: null,
|
|
@@ -2829450,7 +2829971,7 @@ function SetupWizard({ onComplete }) {
|
|
|
2829450
2829971
|
await exchange.getAccountInfo();
|
|
2829451
2829972
|
setState((prev) => ({
|
|
2829452
2829973
|
...prev,
|
|
2829453
|
-
step: "
|
|
2829974
|
+
step: "chain-select",
|
|
2829454
2829975
|
isValidating: false,
|
|
2829455
2829976
|
exchangePermissions: null,
|
|
2829456
2829977
|
exchangeError: null,
|
|
@@ -2829475,15 +2829996,59 @@ function SetupWizard({ onComplete }) {
|
|
|
2829475
2829996
|
}));
|
|
2829476
2829997
|
}
|
|
2829477
2829998
|
}, []);
|
|
2829478
|
-
const saveConfiguration = import_react68.useCallback(async () => {
|
|
2829999
|
+
const saveConfiguration = import_react68.useCallback(async (overrides) => {
|
|
2829479
2830000
|
const currentConfig2 = await loadConfig();
|
|
2829480
2830001
|
const newConfig = {
|
|
2829481
2830002
|
...currentConfig2,
|
|
2829482
|
-
preferences: state19.preferences,
|
|
2830003
|
+
preferences: overrides?.preferences ?? state19.preferences,
|
|
2829483
2830004
|
onboardingComplete: true
|
|
2829484
2830005
|
};
|
|
2829485
2830006
|
const isWalletAuth = requiresWalletAuth(state19.exchangeType);
|
|
2829486
2830007
|
const hasExchangeCredentials = state19.exchangeType && state19.exchangeValidated && (isWalletAuth ? !!state19.walletPrivateKey : !!(state19.exchangeApiKey && state19.exchangeApiSecret));
|
|
2830008
|
+
const envKeys = {};
|
|
2830009
|
+
if (state19.openaiApiKey)
|
|
2830010
|
+
envKeys.OPENAI_API_KEY = state19.openaiApiKey;
|
|
2830011
|
+
if (state19.dedalusApiKey)
|
|
2830012
|
+
envKeys.DEDALUS_API_KEY = state19.dedalusApiKey;
|
|
2830013
|
+
if (state19.exchangeType) {
|
|
2830014
|
+
const envMap = EXCHANGE_ENV_MAP[state19.exchangeType];
|
|
2830015
|
+
if (envMap) {
|
|
2830016
|
+
if (envMap.key && state19.exchangeApiKey)
|
|
2830017
|
+
envKeys[envMap.key] = state19.exchangeApiKey;
|
|
2830018
|
+
if (envMap.secret && state19.exchangeApiSecret)
|
|
2830019
|
+
envKeys[envMap.secret] = state19.exchangeApiSecret;
|
|
2830020
|
+
if (envMap.passphrase && state19.exchangePassphrase)
|
|
2830021
|
+
envKeys[envMap.passphrase] = state19.exchangePassphrase;
|
|
2830022
|
+
if (envMap.wallet && state19.walletPrivateKey)
|
|
2830023
|
+
envKeys[envMap.wallet] = state19.walletPrivateKey;
|
|
2830024
|
+
}
|
|
2830025
|
+
}
|
|
2830026
|
+
if (state19.chainKeys.solanaPrivateKey)
|
|
2830027
|
+
envKeys.SOLANA_PRIVATE_KEY = state19.chainKeys.solanaPrivateKey;
|
|
2830028
|
+
if (state19.chainKeys.solanaRpcUrl)
|
|
2830029
|
+
envKeys.SOLANA_RPC_URL = state19.chainKeys.solanaRpcUrl;
|
|
2830030
|
+
if (state19.chainKeys.polkadotMnemonic)
|
|
2830031
|
+
envKeys.POLKADOT_MNEMONIC = state19.chainKeys.polkadotMnemonic;
|
|
2830032
|
+
if (state19.chainKeys.polkadotPrivateKey)
|
|
2830033
|
+
envKeys.POLKADOT_PRIVATE_KEY = state19.chainKeys.polkadotPrivateKey;
|
|
2830034
|
+
if (state19.chainKeys.chainlinkApiKey)
|
|
2830035
|
+
envKeys.CHAINLINK_API_KEY = state19.chainKeys.chainlinkApiKey;
|
|
2830036
|
+
if (state19.chainKeys.chainlinkApiSecret)
|
|
2830037
|
+
envKeys.CHAINLINK_API_SECRET = state19.chainKeys.chainlinkApiSecret;
|
|
2830038
|
+
if (state19.chainKeys.evmPrivateKey)
|
|
2830039
|
+
envKeys.EVM_PRIVATE_KEY = state19.chainKeys.evmPrivateKey;
|
|
2830040
|
+
if (state19.chainKeys.cdpApiKeyId)
|
|
2830041
|
+
envKeys.CDP_API_KEY_ID = state19.chainKeys.cdpApiKeyId;
|
|
2830042
|
+
if (state19.chainKeys.cdpApiKeySecret)
|
|
2830043
|
+
envKeys.CDP_API_KEY_SECRET = state19.chainKeys.cdpApiKeySecret;
|
|
2830044
|
+
if (state19.chainKeys.cdpWalletSecret)
|
|
2830045
|
+
envKeys.CDP_WALLET_SECRET = state19.chainKeys.cdpWalletSecret;
|
|
2830046
|
+
const envStatus = await checkEnvStatus();
|
|
2830047
|
+
if (envStatus.fileExists) {
|
|
2830048
|
+
await saveEnvKeys(envKeys);
|
|
2830049
|
+
} else {
|
|
2830050
|
+
await createEnvFile(envKeys);
|
|
2830051
|
+
}
|
|
2829487
2830052
|
if (hasExchangeCredentials) {
|
|
2829488
2830053
|
const exchanges = currentConfig2.exchanges ? [...currentConfig2.exchanges] : [];
|
|
2829489
2830054
|
const exchangeType = state19.exchangeType;
|
|
@@ -2829491,10 +2830056,10 @@ function SetupWizard({ onComplete }) {
|
|
|
2829491
2830056
|
const newExchange = {
|
|
2829492
2830057
|
id: exchangeId,
|
|
2829493
2830058
|
type: exchangeType,
|
|
2829494
|
-
apiKey:
|
|
2829495
|
-
apiSecret:
|
|
2829496
|
-
passphrase: state19.exchangePassphrase
|
|
2829497
|
-
walletPrivateKey: state19.walletPrivateKey
|
|
2830059
|
+
apiKey: "***",
|
|
2830060
|
+
apiSecret: "***",
|
|
2830061
|
+
passphrase: state19.exchangePassphrase ? "***" : undefined,
|
|
2830062
|
+
walletPrivateKey: state19.walletPrivateKey ? "***" : undefined,
|
|
2829498
2830063
|
sandbox: false,
|
|
2829499
2830064
|
isDefault: true
|
|
2829500
2830065
|
};
|
|
@@ -2829509,38 +2830074,13 @@ function SetupWizard({ onComplete }) {
|
|
|
2829509
2830074
|
if (exchangeType === "binance" && state19.exchangePermissions) {
|
|
2829510
2830075
|
newConfig.exchange = {
|
|
2829511
2830076
|
name: "binance",
|
|
2829512
|
-
apiKey:
|
|
2829513
|
-
apiSecret:
|
|
2830077
|
+
apiKey: "***",
|
|
2830078
|
+
apiSecret: "***",
|
|
2829514
2830079
|
permissions: state19.exchangePermissions
|
|
2829515
2830080
|
};
|
|
2829516
2830081
|
}
|
|
2829517
2830082
|
}
|
|
2829518
2830083
|
await saveConfig(newConfig);
|
|
2829519
|
-
const envStatus = await checkEnvStatus();
|
|
2829520
|
-
const envKeys = {};
|
|
2829521
|
-
if (state19.openaiApiKey) {
|
|
2829522
|
-
envKeys.OPENAI_API_KEY = state19.openaiApiKey;
|
|
2829523
|
-
}
|
|
2829524
|
-
if (state19.dedalusApiKey) {
|
|
2829525
|
-
envKeys.DEDALUS_API_KEY = state19.dedalusApiKey;
|
|
2829526
|
-
}
|
|
2829527
|
-
if (state19.exchangeType === "binance" && state19.exchangeApiKey) {
|
|
2829528
|
-
envKeys.BINANCE_API_KEY = state19.exchangeApiKey;
|
|
2829529
|
-
}
|
|
2829530
|
-
if (state19.exchangeType === "binance" && state19.exchangeApiSecret) {
|
|
2829531
|
-
envKeys.BINANCE_API_SECRET = state19.exchangeApiSecret;
|
|
2829532
|
-
}
|
|
2829533
|
-
if (state19.exchangeType === "binance_us" && state19.exchangeApiKey) {
|
|
2829534
|
-
envKeys.BINANCE_US_API_KEY = state19.exchangeApiKey;
|
|
2829535
|
-
}
|
|
2829536
|
-
if (state19.exchangeType === "binance_us" && state19.exchangeApiSecret) {
|
|
2829537
|
-
envKeys.BINANCE_US_API_SECRET = state19.exchangeApiSecret;
|
|
2829538
|
-
}
|
|
2829539
|
-
if (envStatus.fileExists) {
|
|
2829540
|
-
await saveEnvKeys(envKeys);
|
|
2829541
|
-
} else {
|
|
2829542
|
-
await createEnvFile(envKeys);
|
|
2829543
|
-
}
|
|
2829544
2830084
|
resetAgents();
|
|
2829545
2830085
|
}, [
|
|
2829546
2830086
|
state19.exchangeApiKey,
|
|
@@ -2829550,10 +2830090,38 @@ function SetupWizard({ onComplete }) {
|
|
|
2829550
2830090
|
state19.exchangePermissions,
|
|
2829551
2830091
|
state19.exchangeType,
|
|
2829552
2830092
|
state19.exchangeValidated,
|
|
2830093
|
+
state19.chainKeys,
|
|
2829553
2830094
|
state19.preferences,
|
|
2829554
2830095
|
state19.openaiApiKey,
|
|
2829555
2830096
|
state19.dedalusApiKey
|
|
2829556
2830097
|
]);
|
|
2830098
|
+
const chainStepMap = {
|
|
2830099
|
+
solana: "chain-solana",
|
|
2830100
|
+
polkadot: "chain-polkadot",
|
|
2830101
|
+
chainlink: "chain-chainlink",
|
|
2830102
|
+
evm: "chain-evm",
|
|
2830103
|
+
cdp: "chain-cdp"
|
|
2830104
|
+
};
|
|
2830105
|
+
const advanceChainStep = import_react68.useCallback((currentIndex, chains5) => {
|
|
2830106
|
+
const nextIndex = currentIndex + 1;
|
|
2830107
|
+
if (nextIndex < chains5.length) {
|
|
2830108
|
+
const nextChain = chains5[nextIndex];
|
|
2830109
|
+
setState((prev) => ({
|
|
2830110
|
+
...prev,
|
|
2830111
|
+
step: nextChain ? chainStepMap[nextChain] : "llm",
|
|
2830112
|
+
chainSetupIndex: nextIndex,
|
|
2830113
|
+
inputValue: "",
|
|
2830114
|
+
exchangeError: null
|
|
2830115
|
+
}));
|
|
2830116
|
+
} else {
|
|
2830117
|
+
setState((prev) => ({
|
|
2830118
|
+
...prev,
|
|
2830119
|
+
step: "llm",
|
|
2830120
|
+
inputValue: "",
|
|
2830121
|
+
exchangeError: null
|
|
2830122
|
+
}));
|
|
2830123
|
+
}
|
|
2830124
|
+
}, []);
|
|
2829557
2830125
|
const handleInputSubmit = import_react68.useCallback(async (value2) => {
|
|
2829558
2830126
|
const trimmedValue = value2.trim();
|
|
2829559
2830127
|
switch (state19.step) {
|
|
@@ -2829624,6 +2830192,148 @@ function SetupWizard({ onComplete }) {
|
|
|
2829624
2830192
|
await validateExchangeCredentials(state19.exchangeType, "", "", undefined, trimmedValue);
|
|
2829625
2830193
|
}
|
|
2829626
2830194
|
break;
|
|
2830195
|
+
case "chain-select": {
|
|
2830196
|
+
if (!trimmedValue) {
|
|
2830197
|
+
setState((prev) => ({ ...prev, step: "llm", inputValue: "" }));
|
|
2830198
|
+
break;
|
|
2830199
|
+
}
|
|
2830200
|
+
const parts = trimmedValue.split(",").map((s2) => s2.trim().toLowerCase());
|
|
2830201
|
+
const selected = [];
|
|
2830202
|
+
for (const part of parts) {
|
|
2830203
|
+
const idx = parseInt(part, 10);
|
|
2830204
|
+
if (!isNaN(idx) && idx >= 1 && idx <= CHAIN_OPTIONS.length) {
|
|
2830205
|
+
const opt = CHAIN_OPTIONS[idx - 1];
|
|
2830206
|
+
if (opt)
|
|
2830207
|
+
selected.push(opt.id);
|
|
2830208
|
+
} else {
|
|
2830209
|
+
const match = CHAIN_OPTIONS.find((o4) => o4.id === part || o4.label.toLowerCase() === part);
|
|
2830210
|
+
if (match)
|
|
2830211
|
+
selected.push(match.id);
|
|
2830212
|
+
}
|
|
2830213
|
+
}
|
|
2830214
|
+
const unique2 = [...new Set(selected)];
|
|
2830215
|
+
if (unique2.length === 0) {
|
|
2830216
|
+
setState((prev) => ({ ...prev, step: "llm", inputValue: "" }));
|
|
2830217
|
+
} else {
|
|
2830218
|
+
const firstChain = unique2[0];
|
|
2830219
|
+
setState((prev) => ({
|
|
2830220
|
+
...prev,
|
|
2830221
|
+
selectedChains: unique2,
|
|
2830222
|
+
chainSetupIndex: 0,
|
|
2830223
|
+
step: chainStepMap[firstChain],
|
|
2830224
|
+
inputValue: ""
|
|
2830225
|
+
}));
|
|
2830226
|
+
}
|
|
2830227
|
+
break;
|
|
2830228
|
+
}
|
|
2830229
|
+
case "chain-solana":
|
|
2830230
|
+
if (trimmedValue) {
|
|
2830231
|
+
if (!SOLANA_BASE58_REGEX.test(trimmedValue)) {
|
|
2830232
|
+
setState((prev) => ({
|
|
2830233
|
+
...prev,
|
|
2830234
|
+
exchangeError: "Invalid format. Solana private keys are base58-encoded (no 0, O, I, l characters). Check your key and try again."
|
|
2830235
|
+
}));
|
|
2830236
|
+
return;
|
|
2830237
|
+
}
|
|
2830238
|
+
setState((prev) => ({
|
|
2830239
|
+
...prev,
|
|
2830240
|
+
chainKeys: { ...prev.chainKeys, solanaPrivateKey: trimmedValue },
|
|
2830241
|
+
exchangeError: null,
|
|
2830242
|
+
inputValue: ""
|
|
2830243
|
+
}));
|
|
2830244
|
+
}
|
|
2830245
|
+
advanceChainStep(state19.chainSetupIndex, state19.selectedChains);
|
|
2830246
|
+
break;
|
|
2830247
|
+
case "chain-polkadot":
|
|
2830248
|
+
if (trimmedValue) {
|
|
2830249
|
+
const wordCount = trimmedValue.split(/\s+/).length;
|
|
2830250
|
+
const isHexKey = POLKADOT_HEX_KEY_REGEX.test(trimmedValue);
|
|
2830251
|
+
const isMnemonic = wordCount === 12 || wordCount === 24;
|
|
2830252
|
+
if (!isHexKey && !isMnemonic) {
|
|
2830253
|
+
setState((prev) => ({
|
|
2830254
|
+
...prev,
|
|
2830255
|
+
exchangeError: `Invalid format. Expected a 12 or 24-word mnemonic phrase, or a 0x-prefixed hex private key (66 chars). Got ${wordCount} word(s).`
|
|
2830256
|
+
}));
|
|
2830257
|
+
return;
|
|
2830258
|
+
}
|
|
2830259
|
+
setState((prev) => ({
|
|
2830260
|
+
...prev,
|
|
2830261
|
+
chainKeys: {
|
|
2830262
|
+
...prev.chainKeys,
|
|
2830263
|
+
...isHexKey ? { polkadotPrivateKey: trimmedValue } : { polkadotMnemonic: trimmedValue }
|
|
2830264
|
+
},
|
|
2830265
|
+
exchangeError: null,
|
|
2830266
|
+
inputValue: ""
|
|
2830267
|
+
}));
|
|
2830268
|
+
}
|
|
2830269
|
+
advanceChainStep(state19.chainSetupIndex, state19.selectedChains);
|
|
2830270
|
+
break;
|
|
2830271
|
+
case "chain-chainlink":
|
|
2830272
|
+
if (trimmedValue) {
|
|
2830273
|
+
const [key5, secret] = trimmedValue.split(",").map((s2) => s2.trim());
|
|
2830274
|
+
if (!key5 || !secret) {
|
|
2830275
|
+
setState((prev) => ({
|
|
2830276
|
+
...prev,
|
|
2830277
|
+
exchangeError: "Both API Key and API Secret are required. Enter them comma-separated: key,secret"
|
|
2830278
|
+
}));
|
|
2830279
|
+
return;
|
|
2830280
|
+
}
|
|
2830281
|
+
setState((prev) => ({
|
|
2830282
|
+
...prev,
|
|
2830283
|
+
chainKeys: {
|
|
2830284
|
+
...prev.chainKeys,
|
|
2830285
|
+
chainlinkApiKey: key5,
|
|
2830286
|
+
chainlinkApiSecret: secret
|
|
2830287
|
+
},
|
|
2830288
|
+
exchangeError: null,
|
|
2830289
|
+
inputValue: ""
|
|
2830290
|
+
}));
|
|
2830291
|
+
}
|
|
2830292
|
+
advanceChainStep(state19.chainSetupIndex, state19.selectedChains);
|
|
2830293
|
+
break;
|
|
2830294
|
+
case "chain-evm":
|
|
2830295
|
+
if (trimmedValue) {
|
|
2830296
|
+
const evmKey = trimmedValue.startsWith("0x") ? trimmedValue : `0x${trimmedValue}`;
|
|
2830297
|
+
if (!EVM_HEX_KEY_REGEX.test(evmKey)) {
|
|
2830298
|
+
setState((prev) => ({
|
|
2830299
|
+
...prev,
|
|
2830300
|
+
exchangeError: "Invalid EVM private key. Expected 0x followed by 64 hex characters (66 chars total)."
|
|
2830301
|
+
}));
|
|
2830302
|
+
return;
|
|
2830303
|
+
}
|
|
2830304
|
+
setState((prev) => ({
|
|
2830305
|
+
...prev,
|
|
2830306
|
+
chainKeys: { ...prev.chainKeys, evmPrivateKey: evmKey },
|
|
2830307
|
+
exchangeError: null,
|
|
2830308
|
+
inputValue: ""
|
|
2830309
|
+
}));
|
|
2830310
|
+
}
|
|
2830311
|
+
advanceChainStep(state19.chainSetupIndex, state19.selectedChains);
|
|
2830312
|
+
break;
|
|
2830313
|
+
case "chain-cdp":
|
|
2830314
|
+
if (trimmedValue) {
|
|
2830315
|
+
const parts = trimmedValue.split(",").map((s2) => s2.trim());
|
|
2830316
|
+
if (!parts[0] || !parts[1] || !parts[2]) {
|
|
2830317
|
+
setState((prev) => ({
|
|
2830318
|
+
...prev,
|
|
2830319
|
+
exchangeError: "All three values are required: API Key ID, API Key Secret, and Wallet Secret. Separate with commas."
|
|
2830320
|
+
}));
|
|
2830321
|
+
return;
|
|
2830322
|
+
}
|
|
2830323
|
+
setState((prev) => ({
|
|
2830324
|
+
...prev,
|
|
2830325
|
+
chainKeys: {
|
|
2830326
|
+
...prev.chainKeys,
|
|
2830327
|
+
cdpApiKeyId: parts[0],
|
|
2830328
|
+
cdpApiKeySecret: parts[1],
|
|
2830329
|
+
cdpWalletSecret: parts[2]
|
|
2830330
|
+
},
|
|
2830331
|
+
exchangeError: null,
|
|
2830332
|
+
inputValue: ""
|
|
2830333
|
+
}));
|
|
2830334
|
+
}
|
|
2830335
|
+
advanceChainStep(state19.chainSetupIndex, state19.selectedChains);
|
|
2830336
|
+
break;
|
|
2829627
2830337
|
case "llm":
|
|
2829628
2830338
|
if (trimmedValue) {
|
|
2829629
2830339
|
setState((prev) => ({
|
|
@@ -2829637,16 +2830347,14 @@ function SetupWizard({ onComplete }) {
|
|
|
2829637
2830347
|
case "preferences": {
|
|
2829638
2830348
|
const percent = parseInt(trimmedValue, 10);
|
|
2829639
2830349
|
if (!isNaN(percent) && percent >= 0 && percent <= 100) {
|
|
2830350
|
+
const newPreferences = { ...state19.preferences, cashReservePercent: percent / 100 };
|
|
2829640
2830351
|
setState((prev) => ({
|
|
2829641
2830352
|
...prev,
|
|
2829642
|
-
preferences:
|
|
2829643
|
-
...prev.preferences,
|
|
2829644
|
-
cashReservePercent: percent / 100
|
|
2829645
|
-
},
|
|
2830353
|
+
preferences: newPreferences,
|
|
2829646
2830354
|
step: "done",
|
|
2829647
2830355
|
inputValue: ""
|
|
2829648
2830356
|
}));
|
|
2829649
|
-
await saveConfiguration();
|
|
2830357
|
+
await saveConfiguration({ preferences: newPreferences });
|
|
2829650
2830358
|
}
|
|
2829651
2830359
|
break;
|
|
2829652
2830360
|
}
|
|
@@ -2829656,8 +2830364,12 @@ function SetupWizard({ onComplete }) {
|
|
|
2829656
2830364
|
state19.exchangeType,
|
|
2829657
2830365
|
state19.exchangeApiKey,
|
|
2829658
2830366
|
state19.exchangeApiSecret,
|
|
2830367
|
+
state19.chainSetupIndex,
|
|
2830368
|
+
state19.selectedChains,
|
|
2830369
|
+
state19.preferences,
|
|
2829659
2830370
|
validateExchangeCredentials,
|
|
2829660
|
-
saveConfiguration
|
|
2830371
|
+
saveConfiguration,
|
|
2830372
|
+
advanceChainStep
|
|
2829661
2830373
|
]);
|
|
2829662
2830374
|
const handleInputChange = import_react68.useCallback((value2) => {
|
|
2829663
2830375
|
setState((prev) => ({ ...prev, inputValue: value2 }));
|
|
@@ -2829679,10 +2830391,24 @@ function SetupWizard({ onComplete }) {
|
|
|
2829679
2830391
|
exchangePermissions: null,
|
|
2829680
2830392
|
exchangeError: null,
|
|
2829681
2830393
|
exchangeValidated: false,
|
|
2830394
|
+
step: "chain-select",
|
|
2830395
|
+
inputValue: ""
|
|
2830396
|
+
}));
|
|
2830397
|
+
break;
|
|
2830398
|
+
case "chain-select":
|
|
2830399
|
+
setState((prev) => ({
|
|
2830400
|
+
...prev,
|
|
2829682
2830401
|
step: "llm",
|
|
2829683
2830402
|
inputValue: ""
|
|
2829684
2830403
|
}));
|
|
2829685
2830404
|
break;
|
|
2830405
|
+
case "chain-solana":
|
|
2830406
|
+
case "chain-polkadot":
|
|
2830407
|
+
case "chain-chainlink":
|
|
2830408
|
+
case "chain-evm":
|
|
2830409
|
+
case "chain-cdp":
|
|
2830410
|
+
advanceChainStep(state19.chainSetupIndex, state19.selectedChains);
|
|
2830411
|
+
break;
|
|
2829686
2830412
|
case "llm":
|
|
2829687
2830413
|
setState((prev) => ({
|
|
2829688
2830414
|
...prev,
|
|
@@ -2829696,10 +2830422,10 @@ function SetupWizard({ onComplete }) {
|
|
|
2829696
2830422
|
step: "done",
|
|
2829697
2830423
|
inputValue: ""
|
|
2829698
2830424
|
}));
|
|
2829699
|
-
await saveConfiguration();
|
|
2830425
|
+
await saveConfiguration({ preferences: state19.preferences });
|
|
2829700
2830426
|
break;
|
|
2829701
2830427
|
}
|
|
2829702
|
-
}, [state19.step, saveConfiguration]);
|
|
2830428
|
+
}, [state19.step, state19.chainSetupIndex, state19.selectedChains, advanceChainStep, saveConfiguration]);
|
|
2829703
2830429
|
use_input_default((input, key5) => {
|
|
2829704
2830430
|
if (state19.step === "welcome" && (input || key5.return)) {
|
|
2829705
2830431
|
setState((prev) => ({ ...prev, step: "exchange-select" }));
|
|
@@ -2829758,6 +2830484,91 @@ function SetupWizard({ onComplete }) {
|
|
|
2829758
2830484
|
state19.step === "exchange-validating" && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(ValidatingStep, {
|
|
2829759
2830485
|
exchangeLabel
|
|
2829760
2830486
|
}, undefined, false, undefined, this),
|
|
2830487
|
+
state19.step === "chain-select" && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(ChainSelectStep, {
|
|
2830488
|
+
inputValue: state19.inputValue,
|
|
2830489
|
+
onInputChange: handleInputChange,
|
|
2830490
|
+
onSubmit: handleInputSubmit
|
|
2830491
|
+
}, undefined, false, undefined, this),
|
|
2830492
|
+
state19.step === "chain-solana" && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(ChainKeyStep, {
|
|
2830493
|
+
chainLabel: "Solana",
|
|
2830494
|
+
description: "Enables DeFi swaps, token operations, staking, and lending across 60+ tools.",
|
|
2830495
|
+
keyLabel: "Solana Private Key",
|
|
2830496
|
+
placeholder: "Base58 private key...",
|
|
2830497
|
+
instructions: [
|
|
2830498
|
+
"Create a new Solana wallet (e.g., via Phantom or solana-keygen)",
|
|
2830499
|
+
"Export your private key (Base58 encoded)",
|
|
2830500
|
+
"Use a DEDICATED wallet with limited funds for trading"
|
|
2830501
|
+
],
|
|
2830502
|
+
inputValue: state19.inputValue,
|
|
2830503
|
+
onInputChange: handleInputChange,
|
|
2830504
|
+
onSubmit: handleInputSubmit,
|
|
2830505
|
+
isMasked: true,
|
|
2830506
|
+
error: state19.exchangeError
|
|
2830507
|
+
}, undefined, false, undefined, this),
|
|
2830508
|
+
state19.step === "chain-polkadot" && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(ChainKeyStep, {
|
|
2830509
|
+
chainLabel: "Polkadot",
|
|
2830510
|
+
description: "Enables cross-chain swaps on HydraDX, staking, governance, and XCM transfers.",
|
|
2830511
|
+
keyLabel: "Polkadot Mnemonic or Private Key",
|
|
2830512
|
+
placeholder: "word1 word2 ... (12/24 words) or 0x...",
|
|
2830513
|
+
instructions: [
|
|
2830514
|
+
"Create a new Polkadot account (e.g., via Polkadot.js extension)",
|
|
2830515
|
+
"Export your mnemonic seed phrase (12 or 24 words) or hex private key",
|
|
2830516
|
+
"Use a DEDICATED wallet with limited funds"
|
|
2830517
|
+
],
|
|
2830518
|
+
inputValue: state19.inputValue,
|
|
2830519
|
+
onInputChange: handleInputChange,
|
|
2830520
|
+
onSubmit: handleInputSubmit,
|
|
2830521
|
+
isMasked: true,
|
|
2830522
|
+
error: state19.exchangeError
|
|
2830523
|
+
}, undefined, false, undefined, this),
|
|
2830524
|
+
state19.step === "chain-chainlink" && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(ChainKeyStep, {
|
|
2830525
|
+
chainLabel: "Chainlink Data Streams",
|
|
2830526
|
+
description: "Enables sub-second institutional-grade price feeds for 50+ crypto pairs.",
|
|
2830527
|
+
keyLabel: "API Key, API Secret",
|
|
2830528
|
+
placeholder: "api-key,api-secret",
|
|
2830529
|
+
instructions: [
|
|
2830530
|
+
"Sign up at data.chain.link for Data Streams access",
|
|
2830531
|
+
"Generate an API key and secret from your dashboard",
|
|
2830532
|
+
"Enter both separated by a comma: key,secret"
|
|
2830533
|
+
],
|
|
2830534
|
+
inputValue: state19.inputValue,
|
|
2830535
|
+
onInputChange: handleInputChange,
|
|
2830536
|
+
onSubmit: handleInputSubmit,
|
|
2830537
|
+
isMasked: true,
|
|
2830538
|
+
error: state19.exchangeError
|
|
2830539
|
+
}, undefined, false, undefined, this),
|
|
2830540
|
+
state19.step === "chain-evm" && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(ChainKeyStep, {
|
|
2830541
|
+
chainLabel: "EVM / Chainlink CCIP",
|
|
2830542
|
+
description: "Enables cross-chain token bridging between Ethereum, Arbitrum, Optimism, Polygon, Base, and more.",
|
|
2830543
|
+
keyLabel: "EVM Private Key",
|
|
2830544
|
+
placeholder: "0x...",
|
|
2830545
|
+
instructions: [
|
|
2830546
|
+
"Export a private key from MetaMask or another EVM wallet",
|
|
2830547
|
+
"Use a DEDICATED wallet with limited funds",
|
|
2830548
|
+
"Ensure the wallet has ETH/native tokens for gas on source chains"
|
|
2830549
|
+
],
|
|
2830550
|
+
inputValue: state19.inputValue,
|
|
2830551
|
+
onInputChange: handleInputChange,
|
|
2830552
|
+
onSubmit: handleInputSubmit,
|
|
2830553
|
+
isMasked: true,
|
|
2830554
|
+
error: state19.exchangeError
|
|
2830555
|
+
}, undefined, false, undefined, this),
|
|
2830556
|
+
state19.step === "chain-cdp" && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(ChainKeyStep, {
|
|
2830557
|
+
chainLabel: "Coinbase CDP",
|
|
2830558
|
+
description: "Enables Base smart wallets, token deployments, and onchain actions via Coinbase Developer Platform.",
|
|
2830559
|
+
keyLabel: "API Key ID, API Key Secret, Wallet Secret",
|
|
2830560
|
+
placeholder: "key-id,key-secret,wallet-secret",
|
|
2830561
|
+
instructions: [
|
|
2830562
|
+
"Go to portal.cdp.coinbase.com and create an API key",
|
|
2830563
|
+
"Copy the API Key ID, API Key Secret, and Wallet Secret",
|
|
2830564
|
+
"Enter all three separated by commas: id,secret,wallet-secret"
|
|
2830565
|
+
],
|
|
2830566
|
+
inputValue: state19.inputValue,
|
|
2830567
|
+
onInputChange: handleInputChange,
|
|
2830568
|
+
onSubmit: handleInputSubmit,
|
|
2830569
|
+
isMasked: true,
|
|
2830570
|
+
error: state19.exchangeError
|
|
2830571
|
+
}, undefined, false, undefined, this),
|
|
2829761
2830572
|
state19.step === "llm" && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(LLMStep, {
|
|
2829762
2830573
|
exchangeConfigured: state19.exchangeValidated,
|
|
2829763
2830574
|
exchangeLabel,
|
|
@@ -2829774,7 +2830585,8 @@ function SetupWizard({ onComplete }) {
|
|
|
2829774
2830585
|
state19.step === "done" && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(DoneStep, {
|
|
2829775
2830586
|
exchangeConfigured: state19.exchangeValidated,
|
|
2829776
2830587
|
exchangeLabel,
|
|
2829777
|
-
llmConfigured: !!state19.openaiApiKey
|
|
2830588
|
+
llmConfigured: !!state19.openaiApiKey,
|
|
2830589
|
+
chainKeys: state19.chainKeys
|
|
2829778
2830590
|
}, undefined, false, undefined, this),
|
|
2829779
2830591
|
state19.step !== "welcome" && state19.step !== "done" && state19.step !== "exchange-validating" && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2829780
2830592
|
marginTop: 1,
|
|
@@ -2829822,11 +2830634,15 @@ function WelcomeStep2() {
|
|
|
2829822
2830634
|
}, undefined, false, undefined, this),
|
|
2829823
2830635
|
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2829824
2830636
|
color: COLORS.DIM,
|
|
2829825
|
-
children: "2.
|
|
2830637
|
+
children: "2. Blockchain networks (Solana, Polkadot, Chainlink, etc.)"
|
|
2829826
2830638
|
}, undefined, false, undefined, this),
|
|
2829827
2830639
|
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2829828
2830640
|
color: COLORS.DIM,
|
|
2829829
|
-
children: "3.
|
|
2830641
|
+
children: "3. LLM API key (for AI features)"
|
|
2830642
|
+
}, undefined, false, undefined, this),
|
|
2830643
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2830644
|
+
color: COLORS.DIM,
|
|
2830645
|
+
children: "4. Trading preferences"
|
|
2829830
2830646
|
}, undefined, false, undefined, this)
|
|
2829831
2830647
|
]
|
|
2829832
2830648
|
}, undefined, true, undefined, this),
|
|
@@ -2829980,7 +2830796,8 @@ function ExchangeKeyStep({
|
|
|
2829980
2830796
|
value: inputValue,
|
|
2829981
2830797
|
onChange: onInputChange,
|
|
2829982
2830798
|
onSubmit,
|
|
2829983
|
-
placeholder: "Paste your API key here..."
|
|
2830799
|
+
placeholder: "Paste your API key here...",
|
|
2830800
|
+
mask: "*"
|
|
2829984
2830801
|
}, undefined, false, undefined, this)
|
|
2829985
2830802
|
]
|
|
2829986
2830803
|
}, undefined, true, undefined, this)
|
|
@@ -2830050,7 +2830867,7 @@ function ExchangeSecretStep({
|
|
|
2830050
2830867
|
marginTop: 1,
|
|
2830051
2830868
|
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2830052
2830869
|
color: COLORS.DIM,
|
|
2830053
|
-
children: "Your secret is never displayed and is stored locally in ~/.gordon
|
|
2830870
|
+
children: "Your secret is never displayed and is stored locally in ~/.gordon/.env"
|
|
2830054
2830871
|
}, undefined, false, undefined, this)
|
|
2830055
2830872
|
}, undefined, false, undefined, this)
|
|
2830056
2830873
|
]
|
|
@@ -2830226,7 +2831043,7 @@ function ExchangeWalletStep({
|
|
|
2830226
2831043
|
marginTop: 1,
|
|
2830227
2831044
|
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2830228
2831045
|
color: COLORS.DIM,
|
|
2830229
|
-
children: "Your private key is never displayed and is stored locally in ~/.gordon
|
|
2831046
|
+
children: "Your private key is never displayed and is stored locally in ~/.gordon/.env"
|
|
2830230
2831047
|
}, undefined, false, undefined, this)
|
|
2830231
2831048
|
}, undefined, false, undefined, this)
|
|
2830232
2831049
|
]
|
|
@@ -2830272,7 +2831089,7 @@ function LLMStep({
|
|
|
2830272
2831089
|
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2830273
2831090
|
color: COLORS.TAN,
|
|
2830274
2831091
|
bold: true,
|
|
2830275
|
-
children: "Step
|
|
2831092
|
+
children: "Step 3: LLM API Key"
|
|
2830276
2831093
|
}, undefined, false, undefined, this)
|
|
2830277
2831094
|
}, undefined, false, undefined, this),
|
|
2830278
2831095
|
exchangeConfigured && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
@@ -2830367,7 +2831184,7 @@ function PreferencesStep({ currentPercent, inputValue, onInputChange, onSubmit }
|
|
|
2830367
2831184
|
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2830368
2831185
|
color: COLORS.TAN,
|
|
2830369
2831186
|
bold: true,
|
|
2830370
|
-
children: "Step
|
|
2831187
|
+
children: "Step 4: Trading Preferences"
|
|
2830371
2831188
|
}, undefined, false, undefined, this)
|
|
2830372
2831189
|
}, undefined, false, undefined, this),
|
|
2830373
2831190
|
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
@@ -2830420,7 +2831237,203 @@ function PreferencesStep({ currentPercent, inputValue, onInputChange, onSubmit }
|
|
|
2830420
2831237
|
]
|
|
2830421
2831238
|
}, undefined, true, undefined, this);
|
|
2830422
2831239
|
}
|
|
2830423
|
-
function
|
|
2831240
|
+
function ChainSelectStep({ inputValue, onInputChange, onSubmit }) {
|
|
2831241
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831242
|
+
flexDirection: "column",
|
|
2831243
|
+
children: [
|
|
2831244
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831245
|
+
marginBottom: 1,
|
|
2831246
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831247
|
+
color: COLORS.TAN,
|
|
2831248
|
+
bold: true,
|
|
2831249
|
+
children: "Step 2: Blockchain Networks"
|
|
2831250
|
+
}, undefined, false, undefined, this)
|
|
2831251
|
+
}, undefined, false, undefined, this),
|
|
2831252
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831253
|
+
flexDirection: "column",
|
|
2831254
|
+
marginBottom: 1,
|
|
2831255
|
+
children: [
|
|
2831256
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831257
|
+
color: COLORS.WHITE,
|
|
2831258
|
+
children: "Configure blockchain network keys to unlock DeFi, bridging, and on-chain tools."
|
|
2831259
|
+
}, undefined, false, undefined, this),
|
|
2831260
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831261
|
+
color: COLORS.DIM,
|
|
2831262
|
+
children: "Enter the numbers of the chains you want to configure (comma-separated), or press ESC to skip."
|
|
2831263
|
+
}, undefined, false, undefined, this)
|
|
2831264
|
+
]
|
|
2831265
|
+
}, undefined, true, undefined, this),
|
|
2831266
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831267
|
+
flexDirection: "column",
|
|
2831268
|
+
marginBottom: 1,
|
|
2831269
|
+
children: CHAIN_OPTIONS.map((chain5, index4) => /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831270
|
+
children: [
|
|
2831271
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831272
|
+
width: 4,
|
|
2831273
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831274
|
+
color: COLORS.ACCENT,
|
|
2831275
|
+
children: [
|
|
2831276
|
+
index4 + 1,
|
|
2831277
|
+
"."
|
|
2831278
|
+
]
|
|
2831279
|
+
}, undefined, true, undefined, this)
|
|
2831280
|
+
}, undefined, false, undefined, this),
|
|
2831281
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831282
|
+
width: 22,
|
|
2831283
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831284
|
+
color: COLORS.WHITE,
|
|
2831285
|
+
bold: true,
|
|
2831286
|
+
children: chain5.label
|
|
2831287
|
+
}, undefined, false, undefined, this)
|
|
2831288
|
+
}, undefined, false, undefined, this),
|
|
2831289
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831290
|
+
color: COLORS.DIM,
|
|
2831291
|
+
children: chain5.description
|
|
2831292
|
+
}, undefined, false, undefined, this)
|
|
2831293
|
+
]
|
|
2831294
|
+
}, chain5.id, true, undefined, this))
|
|
2831295
|
+
}, undefined, false, undefined, this),
|
|
2831296
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831297
|
+
marginTop: 1,
|
|
2831298
|
+
children: [
|
|
2831299
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831300
|
+
color: COLORS.WHITE,
|
|
2831301
|
+
children: "Select chains (e.g., 1,3 or solana,chainlink): "
|
|
2831302
|
+
}, undefined, false, undefined, this),
|
|
2831303
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(build_default, {
|
|
2831304
|
+
value: inputValue,
|
|
2831305
|
+
onChange: onInputChange,
|
|
2831306
|
+
onSubmit,
|
|
2831307
|
+
placeholder: "1,2,3"
|
|
2831308
|
+
}, undefined, false, undefined, this)
|
|
2831309
|
+
]
|
|
2831310
|
+
}, undefined, true, undefined, this)
|
|
2831311
|
+
]
|
|
2831312
|
+
}, undefined, true, undefined, this);
|
|
2831313
|
+
}
|
|
2831314
|
+
function ChainKeyStep({
|
|
2831315
|
+
chainLabel,
|
|
2831316
|
+
description,
|
|
2831317
|
+
keyLabel,
|
|
2831318
|
+
placeholder,
|
|
2831319
|
+
instructions: instructions16,
|
|
2831320
|
+
inputValue,
|
|
2831321
|
+
onInputChange,
|
|
2831322
|
+
onSubmit,
|
|
2831323
|
+
isMasked = false,
|
|
2831324
|
+
error: error56
|
|
2831325
|
+
}) {
|
|
2831326
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831327
|
+
flexDirection: "column",
|
|
2831328
|
+
children: [
|
|
2831329
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831330
|
+
marginBottom: 1,
|
|
2831331
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831332
|
+
color: COLORS.TAN,
|
|
2831333
|
+
bold: true,
|
|
2831334
|
+
children: [
|
|
2831335
|
+
"Step 2: ",
|
|
2831336
|
+
chainLabel
|
|
2831337
|
+
]
|
|
2831338
|
+
}, undefined, true, undefined, this)
|
|
2831339
|
+
}, undefined, false, undefined, this),
|
|
2831340
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831341
|
+
flexDirection: "column",
|
|
2831342
|
+
marginBottom: 1,
|
|
2831343
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831344
|
+
color: COLORS.WHITE,
|
|
2831345
|
+
children: description
|
|
2831346
|
+
}, undefined, false, undefined, this)
|
|
2831347
|
+
}, undefined, false, undefined, this),
|
|
2831348
|
+
error56 && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831349
|
+
marginBottom: 1,
|
|
2831350
|
+
borderStyle: "single",
|
|
2831351
|
+
borderColor: "red",
|
|
2831352
|
+
paddingX: 1,
|
|
2831353
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831354
|
+
color: "red",
|
|
2831355
|
+
children: error56
|
|
2831356
|
+
}, undefined, false, undefined, this)
|
|
2831357
|
+
}, undefined, false, undefined, this),
|
|
2831358
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831359
|
+
marginBottom: 1,
|
|
2831360
|
+
borderStyle: "single",
|
|
2831361
|
+
borderColor: "yellow",
|
|
2831362
|
+
paddingX: 1,
|
|
2831363
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831364
|
+
flexDirection: "column",
|
|
2831365
|
+
children: [
|
|
2831366
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831367
|
+
color: "yellow",
|
|
2831368
|
+
bold: true,
|
|
2831369
|
+
children: "SECURITY"
|
|
2831370
|
+
}, undefined, false, undefined, this),
|
|
2831371
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831372
|
+
color: "yellow",
|
|
2831373
|
+
children: "Use a DEDICATED wallet with limited funds. Never use your primary wallet."
|
|
2831374
|
+
}, undefined, false, undefined, this)
|
|
2831375
|
+
]
|
|
2831376
|
+
}, undefined, true, undefined, this)
|
|
2831377
|
+
}, undefined, false, undefined, this),
|
|
2831378
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831379
|
+
flexDirection: "column",
|
|
2831380
|
+
marginBottom: 1,
|
|
2831381
|
+
children: [
|
|
2831382
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831383
|
+
color: COLORS.TAN_DIM,
|
|
2831384
|
+
bold: true,
|
|
2831385
|
+
children: "Setup instructions:"
|
|
2831386
|
+
}, undefined, false, undefined, this),
|
|
2831387
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831388
|
+
flexDirection: "column",
|
|
2831389
|
+
marginLeft: 2,
|
|
2831390
|
+
children: instructions16.map((line2, index4) => /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831391
|
+
color: COLORS.DIM,
|
|
2831392
|
+
children: [
|
|
2831393
|
+
index4 + 1,
|
|
2831394
|
+
". ",
|
|
2831395
|
+
line2
|
|
2831396
|
+
]
|
|
2831397
|
+
}, `${chainLabel}-${index4}`, true, undefined, this))
|
|
2831398
|
+
}, undefined, false, undefined, this)
|
|
2831399
|
+
]
|
|
2831400
|
+
}, undefined, true, undefined, this),
|
|
2831401
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831402
|
+
marginTop: 1,
|
|
2831403
|
+
children: [
|
|
2831404
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831405
|
+
color: COLORS.WHITE,
|
|
2831406
|
+
children: [
|
|
2831407
|
+
keyLabel,
|
|
2831408
|
+
": "
|
|
2831409
|
+
]
|
|
2831410
|
+
}, undefined, true, undefined, this),
|
|
2831411
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(build_default, {
|
|
2831412
|
+
value: inputValue,
|
|
2831413
|
+
onChange: onInputChange,
|
|
2831414
|
+
onSubmit,
|
|
2831415
|
+
placeholder,
|
|
2831416
|
+
mask: isMasked ? "*" : undefined
|
|
2831417
|
+
}, undefined, false, undefined, this)
|
|
2831418
|
+
]
|
|
2831419
|
+
}, undefined, true, undefined, this),
|
|
2831420
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831421
|
+
marginTop: 1,
|
|
2831422
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831423
|
+
color: COLORS.DIM,
|
|
2831424
|
+
children: "Keys are stored locally in ~/.gordon/.env"
|
|
2831425
|
+
}, undefined, false, undefined, this)
|
|
2831426
|
+
}, undefined, false, undefined, this)
|
|
2831427
|
+
]
|
|
2831428
|
+
}, undefined, true, undefined, this);
|
|
2831429
|
+
}
|
|
2831430
|
+
function DoneStep({ exchangeConfigured, exchangeLabel, llmConfigured, chainKeys }) {
|
|
2831431
|
+
const hasSolana = !!chainKeys.solanaPrivateKey;
|
|
2831432
|
+
const hasPolkadot = !!(chainKeys.polkadotMnemonic || chainKeys.polkadotPrivateKey);
|
|
2831433
|
+
const hasChainlink = !!(chainKeys.chainlinkApiKey && chainKeys.chainlinkApiSecret);
|
|
2831434
|
+
const hasEVM = !!chainKeys.evmPrivateKey;
|
|
2831435
|
+
const hasCDP = !!(chainKeys.cdpApiKeyId && chainKeys.cdpApiKeySecret && chainKeys.cdpWalletSecret);
|
|
2831436
|
+
const anyChain = hasSolana || hasPolkadot || hasChainlink || hasEVM || hasCDP;
|
|
2830424
2831437
|
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2830425
2831438
|
flexDirection: "column",
|
|
2830426
2831439
|
children: [
|
|
@@ -2830462,6 +2831475,46 @@ function DoneStep({ exchangeConfigured, exchangeLabel, llmConfigured }) {
|
|
|
2830462
2831475
|
}, undefined, false, undefined, this)
|
|
2830463
2831476
|
]
|
|
2830464
2831477
|
}, undefined, true, undefined, this),
|
|
2831478
|
+
anyChain && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(jsx_dev_runtime21.Fragment, {
|
|
2831479
|
+
children: [
|
|
2831480
|
+
hasSolana && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831481
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831482
|
+
color: "green",
|
|
2831483
|
+
children: "[OK] Solana (DeFi, tokens, staking)"
|
|
2831484
|
+
}, undefined, false, undefined, this)
|
|
2831485
|
+
}, undefined, false, undefined, this),
|
|
2831486
|
+
hasPolkadot && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831487
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831488
|
+
color: "green",
|
|
2831489
|
+
children: "[OK] Polkadot (swaps, staking, governance)"
|
|
2831490
|
+
}, undefined, false, undefined, this)
|
|
2831491
|
+
}, undefined, false, undefined, this),
|
|
2831492
|
+
hasChainlink && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831493
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831494
|
+
color: "green",
|
|
2831495
|
+
children: "[OK] Chainlink Streams (real-time prices)"
|
|
2831496
|
+
}, undefined, false, undefined, this)
|
|
2831497
|
+
}, undefined, false, undefined, this),
|
|
2831498
|
+
hasEVM && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831499
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831500
|
+
color: "green",
|
|
2831501
|
+
children: "[OK] EVM / CCIP (cross-chain bridging)"
|
|
2831502
|
+
}, undefined, false, undefined, this)
|
|
2831503
|
+
}, undefined, false, undefined, this),
|
|
2831504
|
+
hasCDP && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831505
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831506
|
+
color: "green",
|
|
2831507
|
+
children: "[OK] Coinbase CDP (Base smart wallets)"
|
|
2831508
|
+
}, undefined, false, undefined, this)
|
|
2831509
|
+
}, undefined, false, undefined, this)
|
|
2831510
|
+
]
|
|
2831511
|
+
}, undefined, true, undefined, this),
|
|
2831512
|
+
!anyChain && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831513
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831514
|
+
color: COLORS.DIM,
|
|
2831515
|
+
children: "[--] Blockchain networks (not configured)"
|
|
2831516
|
+
}, undefined, false, undefined, this)
|
|
2831517
|
+
}, undefined, false, undefined, this),
|
|
2830465
2831518
|
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2830466
2831519
|
children: [
|
|
2830467
2831520
|
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
@@ -2830492,6 +2831545,13 @@ function DoneStep({ exchangeConfigured, exchangeLabel, llmConfigured }) {
|
|
|
2830492
2831545
|
children: "Note: Without exchange API keys, Gordon runs in demo mode."
|
|
2830493
2831546
|
}, undefined, false, undefined, this)
|
|
2830494
2831547
|
}, undefined, false, undefined, this),
|
|
2831548
|
+
!anyChain && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2831549
|
+
marginBottom: 1,
|
|
2831550
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
2831551
|
+
color: COLORS.TAN_DIM,
|
|
2831552
|
+
children: "Tip: Configure chains later via Settings or by editing ~/.gordon/.env"
|
|
2831553
|
+
}, undefined, false, undefined, this)
|
|
2831554
|
+
}, undefined, false, undefined, this),
|
|
2830495
2831555
|
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
2830496
2831556
|
marginTop: 1,
|
|
2830497
2831557
|
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
@@ -2831163,6 +2832223,7 @@ function useTheme() {
|
|
|
2831163
2832223
|
init_llm2();
|
|
2831164
2832224
|
init_binance2();
|
|
2831165
2832225
|
init_exchange();
|
|
2832226
|
+
init_types11();
|
|
2831166
2832227
|
init_monitor();
|
|
2831167
2832228
|
await __promiseAll([
|
|
2831168
2832229
|
init_orchestrator(),
|
|
@@ -2834795,7 +2835856,8 @@ function AppContent({ onThemeChange }) {
|
|
|
2834795
2835856
|
showShortcuts: false,
|
|
2834796
2835857
|
showStartupHint: true,
|
|
2834797
2835858
|
session: null,
|
|
2834798
|
-
threadStatusInfo: null
|
|
2835859
|
+
threadStatusInfo: null,
|
|
2835860
|
+
chainStatus: null
|
|
2834799
2835861
|
});
|
|
2834800
2835862
|
const llmClientRef = import_react72.useRef(null);
|
|
2834801
2835863
|
const binanceClientRef = import_react72.useRef(null);
|
|
@@ -2834830,9 +2835892,7 @@ function AppContent({ onThemeChange }) {
|
|
|
2834830
2835892
|
}
|
|
2834831
2835893
|
}));
|
|
2834832
2835894
|
}
|
|
2834833
|
-
} catch
|
|
2834834
|
-
console.error("Failed to update thread status:", error56);
|
|
2834835
|
-
}
|
|
2835895
|
+
} catch {}
|
|
2834836
2835896
|
}, []);
|
|
2834837
2835897
|
const updateLastResultsFromTool = import_react72.useCallback((toolName, toolResult) => {
|
|
2834838
2835898
|
if (!toolName || !toolResult || typeof toolResult !== "object")
|
|
@@ -2834888,21 +2835948,15 @@ function AppContent({ onThemeChange }) {
|
|
|
2834888
2835948
|
binanceClientRef.current = null;
|
|
2834889
2835949
|
return;
|
|
2834890
2835950
|
}
|
|
2834891
|
-
|
|
2834892
|
-
|
|
2834893
|
-
|
|
2834894
|
-
passphrase: active.passphrase,
|
|
2834895
|
-
sandbox: active.sandbox
|
|
2834896
|
-
});
|
|
2834897
|
-
if ((active.type === "binance" || active.type === "binance_us") && active.apiKey && active.apiSecret) {
|
|
2835951
|
+
const creds = resolveExchangeCredentials(active);
|
|
2835952
|
+
exchangeRef.current = ExchangeFactory.create(active.type, creds);
|
|
2835953
|
+
if ((active.type === "binance" || active.type === "binance_us") && creds.apiKey && creds.apiSecret) {
|
|
2834898
2835954
|
const baseUrl = active.type === "binance_us" ? "https://api.binance.us" : undefined;
|
|
2834899
|
-
binanceClientRef.current = new BinanceClient(
|
|
2835955
|
+
binanceClientRef.current = new BinanceClient(creds.apiKey, creds.apiSecret, baseUrl);
|
|
2834900
2835956
|
} else {
|
|
2834901
2835957
|
binanceClientRef.current = null;
|
|
2834902
2835958
|
}
|
|
2834903
|
-
} catch
|
|
2834904
|
-
console.error("Failed to refresh active exchange:", error56);
|
|
2834905
|
-
}
|
|
2835959
|
+
} catch {}
|
|
2834906
2835960
|
}, []);
|
|
2834907
2835961
|
const formatCommandError = import_react72.useCallback((operation, error56, context11) => {
|
|
2834908
2835962
|
const err2 = error56 instanceof Error ? error56 : new Error(String(error56));
|
|
@@ -2834962,22 +2836016,16 @@ function AppContent({ onThemeChange }) {
|
|
|
2834962
2836016
|
const active = config9.exchanges.find((ex) => ex.id === activeId) || config9.exchanges[0];
|
|
2834963
2836017
|
if (active) {
|
|
2834964
2836018
|
try {
|
|
2834965
|
-
|
|
2834966
|
-
|
|
2834967
|
-
apiSecret: active.apiSecret,
|
|
2834968
|
-
passphrase: active.passphrase,
|
|
2834969
|
-
sandbox: active.sandbox
|
|
2834970
|
-
});
|
|
2836019
|
+
const creds = resolveExchangeCredentials(active);
|
|
2836020
|
+
exchangeRef.current = ExchangeFactory.create(active.type, creds);
|
|
2834971
2836021
|
exchangeInitialized = true;
|
|
2834972
2836022
|
if (active.type === "binance" || active.type === "binance_us") {
|
|
2834973
2836023
|
const baseUrl = active.type === "binance_us" ? "https://api.binance.us" : undefined;
|
|
2834974
|
-
binanceClientRef.current = new BinanceClient(
|
|
2836024
|
+
binanceClientRef.current = new BinanceClient(creds.apiKey, creds.apiSecret, baseUrl);
|
|
2834975
2836025
|
} else {
|
|
2834976
2836026
|
binanceClientRef.current = null;
|
|
2834977
2836027
|
}
|
|
2834978
|
-
} catch
|
|
2834979
|
-
console.error("Failed to initialize configured exchange:", error56);
|
|
2834980
|
-
}
|
|
2836028
|
+
} catch {}
|
|
2834981
2836029
|
}
|
|
2834982
2836030
|
}
|
|
2834983
2836031
|
if (!exchangeInitialized && envStatus.hasBinanceKeys && envStatus.keys.BINANCE_API_KEY && envStatus.keys.BINANCE_API_SECRET) {
|
|
@@ -2835076,7 +2836124,15 @@ function AppContent({ onThemeChange }) {
|
|
|
2835076
2836124
|
mode: config9.mode,
|
|
2835077
2836125
|
connectionStatus: llmClientRef.current ? "connected" : "disconnected",
|
|
2835078
2836126
|
session,
|
|
2835079
|
-
threadStatusInfo
|
|
2836127
|
+
threadStatusInfo,
|
|
2836128
|
+
chainStatus: {
|
|
2836129
|
+
solana: envStatus.hasSolanaKey,
|
|
2836130
|
+
polkadot: envStatus.hasPolkadotKey,
|
|
2836131
|
+
chainlink: envStatus.hasChainlinkStreamsKeys,
|
|
2836132
|
+
evm: envStatus.hasChainlinkCCIPKey,
|
|
2836133
|
+
cdp: envStatus.hasCDPKeys,
|
|
2836134
|
+
base: envStatus.hasBasescanKey || envStatus.hasCDPKeys
|
|
2836135
|
+
}
|
|
2835080
2836136
|
}));
|
|
2835081
2836137
|
}
|
|
2835082
2836138
|
initialize();
|
|
@@ -2836200,6 +2837256,87 @@ To disarm: \`/disarm\``,
|
|
|
2836200
2837256
|
refreshActiveExchange,
|
|
2836201
2837257
|
updateLastResultsFromTool
|
|
2836202
2837258
|
]);
|
|
2837259
|
+
const runMenuStream = import_react72.useCallback((prompt, messageTimestamp, errorPrefix) => {
|
|
2837260
|
+
(async () => {
|
|
2837261
|
+
if (!llmClientRef.current)
|
|
2837262
|
+
return;
|
|
2837263
|
+
const context11 = buildAppGordonContext({
|
|
2837264
|
+
binance: binanceClientRef.current,
|
|
2837265
|
+
exchange: exchangeRef.current,
|
|
2837266
|
+
llm: llmClientRef.current,
|
|
2837267
|
+
config: configRef.current,
|
|
2837268
|
+
portfolioValue: state19.portfolioValue ?? 0,
|
|
2837269
|
+
availableCash: state19.availableCash,
|
|
2837270
|
+
userId: state19.session?.resourceId,
|
|
2837271
|
+
threadId: state19.session?.threadId
|
|
2837272
|
+
});
|
|
2837273
|
+
setState((prev) => ({
|
|
2837274
|
+
...prev,
|
|
2837275
|
+
messages: [...prev.messages, { role: "gordon", content: "", timestamp: messageTimestamp }],
|
|
2837276
|
+
isStreaming: true
|
|
2837277
|
+
}));
|
|
2837278
|
+
const updateMsg = (content, agent) => {
|
|
2837279
|
+
setState((prev) => {
|
|
2837280
|
+
const newMessages = [...prev.messages];
|
|
2837281
|
+
for (let i2 = newMessages.length - 1;i2 >= 0; i2--) {
|
|
2837282
|
+
const msg = newMessages[i2];
|
|
2837283
|
+
if (msg && msg.role === "gordon" && msg.timestamp === messageTimestamp) {
|
|
2837284
|
+
newMessages[i2] = { role: "gordon", content, timestamp: messageTimestamp, agent: agent || msg.agent };
|
|
2837285
|
+
break;
|
|
2837286
|
+
}
|
|
2837287
|
+
}
|
|
2837288
|
+
return { ...prev, messages: newMessages };
|
|
2837289
|
+
});
|
|
2837290
|
+
};
|
|
2837291
|
+
try {
|
|
2837292
|
+
const stream4 = processMessageStream(prompt, context11, state19.session?.threadId, state19.session?.resourceId);
|
|
2837293
|
+
let fullContent = "";
|
|
2837294
|
+
let currentAgent;
|
|
2837295
|
+
for await (const event9 of stream4) {
|
|
2837296
|
+
switch (event9.type) {
|
|
2837297
|
+
case "text_delta":
|
|
2837298
|
+
if (event9.content) {
|
|
2837299
|
+
fullContent += event9.content;
|
|
2837300
|
+
updateMsg(fullContent, currentAgent);
|
|
2837301
|
+
}
|
|
2837302
|
+
break;
|
|
2837303
|
+
case "agent_switch":
|
|
2837304
|
+
if (event9.agentName)
|
|
2837305
|
+
currentAgent = event9.agentName;
|
|
2837306
|
+
break;
|
|
2837307
|
+
case "tool_call_start":
|
|
2837308
|
+
setState((prev) => ({ ...prev, activeToolCall: event9.toolName || "tool" }));
|
|
2837309
|
+
if (event9.agentName)
|
|
2837310
|
+
currentAgent = event9.agentName;
|
|
2837311
|
+
break;
|
|
2837312
|
+
case "tool_call_end":
|
|
2837313
|
+
setState((prev) => ({ ...prev, activeToolCall: null }));
|
|
2837314
|
+
break;
|
|
2837315
|
+
case "done":
|
|
2837316
|
+
if (event9.agentName)
|
|
2837317
|
+
currentAgent = event9.agentName;
|
|
2837318
|
+
updateMsg(fullContent, currentAgent);
|
|
2837319
|
+
setState((prev) => ({ ...prev, isStreaming: false, activeToolCall: null }));
|
|
2837320
|
+
break;
|
|
2837321
|
+
case "error":
|
|
2837322
|
+
updateMsg(fullContent || `${errorPrefix}: ${event9.error}`, currentAgent);
|
|
2837323
|
+
setState((prev) => ({ ...prev, isStreaming: false, activeToolCall: null }));
|
|
2837324
|
+
break;
|
|
2837325
|
+
}
|
|
2837326
|
+
}
|
|
2837327
|
+
} catch (error56) {
|
|
2837328
|
+
setState((prev) => ({
|
|
2837329
|
+
...prev,
|
|
2837330
|
+
messages: [
|
|
2837331
|
+
...prev.messages,
|
|
2837332
|
+
{ role: "gordon", content: `${errorPrefix}: ${error56 instanceof Error ? error56.message : "Unknown error"}`, timestamp: formatTimestamp() }
|
|
2837333
|
+
],
|
|
2837334
|
+
isStreaming: false,
|
|
2837335
|
+
activeToolCall: null
|
|
2837336
|
+
}));
|
|
2837337
|
+
}
|
|
2837338
|
+
})();
|
|
2837339
|
+
}, [state19.portfolioValue, state19.availableCash, state19.session?.resourceId, state19.session?.threadId]);
|
|
2836203
2837340
|
const handleMenuSelect = import_react72.useCallback((option15) => {
|
|
2836204
2837341
|
switch (option15) {
|
|
2836205
2837342
|
case "chat":
|
|
@@ -2836234,8 +2837371,11 @@ To disarm: \`/disarm\``,
|
|
|
2836234
2837371
|
}));
|
|
2836235
2837372
|
(async () => {
|
|
2836236
2837373
|
try {
|
|
2837374
|
+
const exchange = exchangeRef.current;
|
|
2837375
|
+
if (!exchange)
|
|
2837376
|
+
return;
|
|
2836237
2837377
|
const scanStart = Date.now();
|
|
2836238
|
-
const scanResult = await scan(
|
|
2837378
|
+
const scanResult = await scan(exchange, {
|
|
2836239
2837379
|
topN: configRef.current.preferences.topNCoins,
|
|
2836240
2837380
|
timeframes: configRef.current.preferences.defaultTimeframes
|
|
2836241
2837381
|
});
|
|
@@ -2836416,137 +2837556,19 @@ To disarm: \`/disarm\``,
|
|
|
2836416
2837556
|
]
|
|
2836417
2837557
|
}));
|
|
2836418
2837558
|
break;
|
|
2836419
|
-
case "trending":
|
|
2837559
|
+
case "trending": {
|
|
2837560
|
+
const trendingTs = formatTimestamp();
|
|
2836420
2837561
|
setState((prev) => ({
|
|
2836421
2837562
|
...prev,
|
|
2836422
2837563
|
view: "chat",
|
|
2836423
2837564
|
messages: [
|
|
2836424
2837565
|
...prev.messages,
|
|
2836425
|
-
{
|
|
2836426
|
-
role: "user",
|
|
2836427
|
-
content: "/trending",
|
|
2836428
|
-
timestamp: formatTimestamp()
|
|
2836429
|
-
},
|
|
2836430
|
-
{
|
|
2836431
|
-
role: "gordon",
|
|
2836432
|
-
content: "Finding today's trending tokens...",
|
|
2836433
|
-
timestamp: formatTimestamp()
|
|
2836434
|
-
}
|
|
2837566
|
+
{ role: "user", content: "/trending", timestamp: trendingTs }
|
|
2836435
2837567
|
]
|
|
2836436
2837568
|
}));
|
|
2836437
|
-
(
|
|
2836438
|
-
if (!llmClientRef.current)
|
|
2836439
|
-
return;
|
|
2836440
|
-
const context11 = buildAppGordonContext({
|
|
2836441
|
-
binance: binanceClientRef.current,
|
|
2836442
|
-
exchange: exchangeRef.current,
|
|
2836443
|
-
llm: llmClientRef.current,
|
|
2836444
|
-
config: configRef.current,
|
|
2836445
|
-
portfolioValue: state19.portfolioValue ?? 0,
|
|
2836446
|
-
availableCash: state19.availableCash,
|
|
2836447
|
-
userId: state19.session?.resourceId,
|
|
2836448
|
-
threadId: state19.session?.threadId
|
|
2836449
|
-
});
|
|
2836450
|
-
const trendingTimestamp = formatTimestamp();
|
|
2836451
|
-
setState((prev) => ({
|
|
2836452
|
-
...prev,
|
|
2836453
|
-
messages: [...prev.messages, {
|
|
2836454
|
-
role: "gordon",
|
|
2836455
|
-
content: "",
|
|
2836456
|
-
timestamp: trendingTimestamp
|
|
2836457
|
-
}],
|
|
2836458
|
-
isStreaming: true
|
|
2836459
|
-
}));
|
|
2836460
|
-
try {
|
|
2836461
|
-
const stream4 = processMessageStream("Show me what's trending and pumping today", context11, state19.session?.threadId, state19.session?.resourceId);
|
|
2836462
|
-
let fullContent = "";
|
|
2836463
|
-
let trendingAgent;
|
|
2836464
|
-
for await (const event9 of stream4) {
|
|
2836465
|
-
if (event9.type === "text_delta" && event9.content) {
|
|
2836466
|
-
fullContent += event9.content;
|
|
2836467
|
-
setState((prev) => {
|
|
2836468
|
-
const newMessages = [...prev.messages];
|
|
2836469
|
-
for (let i2 = newMessages.length - 1;i2 >= 0; i2--) {
|
|
2836470
|
-
const msg = newMessages[i2];
|
|
2836471
|
-
if (msg && msg.role === "gordon" && msg.timestamp === trendingTimestamp) {
|
|
2836472
|
-
newMessages[i2] = {
|
|
2836473
|
-
role: "gordon",
|
|
2836474
|
-
content: fullContent,
|
|
2836475
|
-
timestamp: trendingTimestamp,
|
|
2836476
|
-
agent: trendingAgent || msg.agent
|
|
2836477
|
-
};
|
|
2836478
|
-
break;
|
|
2836479
|
-
}
|
|
2836480
|
-
}
|
|
2836481
|
-
return { ...prev, messages: newMessages };
|
|
2836482
|
-
});
|
|
2836483
|
-
} else if (event9.type === "agent_switch" && event9.agentName) {
|
|
2836484
|
-
trendingAgent = event9.agentName;
|
|
2836485
|
-
} else if (event9.type === "tool_call_start") {
|
|
2836486
|
-
setState((prev) => ({ ...prev, activeToolCall: event9.toolName || "tool" }));
|
|
2836487
|
-
if (event9.agentName) {
|
|
2836488
|
-
trendingAgent = event9.agentName;
|
|
2836489
|
-
}
|
|
2836490
|
-
} else if (event9.type === "tool_call_end") {
|
|
2836491
|
-
setState((prev) => ({ ...prev, activeToolCall: null }));
|
|
2836492
|
-
} else if (event9.type === "done") {
|
|
2836493
|
-
if (event9.agentName) {
|
|
2836494
|
-
trendingAgent = event9.agentName;
|
|
2836495
|
-
}
|
|
2836496
|
-
setState((prev) => {
|
|
2836497
|
-
const newMessages = [...prev.messages];
|
|
2836498
|
-
for (let i2 = newMessages.length - 1;i2 >= 0; i2--) {
|
|
2836499
|
-
const msg = newMessages[i2];
|
|
2836500
|
-
if (msg && msg.role === "gordon" && msg.timestamp === trendingTimestamp) {
|
|
2836501
|
-
newMessages[i2] = {
|
|
2836502
|
-
role: "gordon",
|
|
2836503
|
-
content: fullContent,
|
|
2836504
|
-
timestamp: trendingTimestamp,
|
|
2836505
|
-
agent: trendingAgent
|
|
2836506
|
-
};
|
|
2836507
|
-
break;
|
|
2836508
|
-
}
|
|
2836509
|
-
}
|
|
2836510
|
-
return { ...prev, messages: newMessages, isStreaming: false, activeToolCall: null };
|
|
2836511
|
-
});
|
|
2836512
|
-
} else if (event9.type === "error") {
|
|
2836513
|
-
setState((prev) => {
|
|
2836514
|
-
const newMessages = [...prev.messages];
|
|
2836515
|
-
for (let i2 = newMessages.length - 1;i2 >= 0; i2--) {
|
|
2836516
|
-
const msg = newMessages[i2];
|
|
2836517
|
-
if (msg && msg.role === "gordon" && msg.timestamp === trendingTimestamp) {
|
|
2836518
|
-
newMessages[i2] = {
|
|
2836519
|
-
role: "gordon",
|
|
2836520
|
-
content: fullContent || `Failed to get trending: ${event9.error}`,
|
|
2836521
|
-
timestamp: trendingTimestamp,
|
|
2836522
|
-
agent: trendingAgent
|
|
2836523
|
-
};
|
|
2836524
|
-
break;
|
|
2836525
|
-
}
|
|
2836526
|
-
}
|
|
2836527
|
-
return { ...prev, messages: newMessages, isStreaming: false, activeToolCall: null };
|
|
2836528
|
-
});
|
|
2836529
|
-
}
|
|
2836530
|
-
}
|
|
2836531
|
-
} catch (error56) {
|
|
2836532
|
-
setState((prev) => {
|
|
2836533
|
-
const newMessages = [...prev.messages];
|
|
2836534
|
-
for (let i2 = newMessages.length - 1;i2 >= 0; i2--) {
|
|
2836535
|
-
const msg = newMessages[i2];
|
|
2836536
|
-
if (msg && msg.role === "gordon" && msg.timestamp === trendingTimestamp) {
|
|
2836537
|
-
newMessages[i2] = {
|
|
2836538
|
-
role: "gordon",
|
|
2836539
|
-
content: `Failed to get trending: ${error56 instanceof Error ? error56.message : "Unknown error"}`,
|
|
2836540
|
-
timestamp: trendingTimestamp
|
|
2836541
|
-
};
|
|
2836542
|
-
break;
|
|
2836543
|
-
}
|
|
2836544
|
-
}
|
|
2836545
|
-
return { ...prev, messages: newMessages, isStreaming: false, activeToolCall: null };
|
|
2836546
|
-
});
|
|
2836547
|
-
}
|
|
2836548
|
-
})();
|
|
2837569
|
+
runMenuStream("Show me what's trending and pumping today", trendingTs, "Failed to get trending");
|
|
2836549
2837570
|
break;
|
|
2837571
|
+
}
|
|
2836550
2837572
|
case "analyze":
|
|
2836551
2837573
|
setState((prev) => ({
|
|
2836552
2837574
|
...prev,
|
|
@@ -2836589,8 +2837611,42 @@ To disarm: \`/disarm\``,
|
|
|
2836589
2837611
|
]
|
|
2836590
2837612
|
}));
|
|
2836591
2837613
|
break;
|
|
2837614
|
+
case "bridge":
|
|
2837615
|
+
setState((prev) => ({
|
|
2837616
|
+
...prev,
|
|
2837617
|
+
view: "chat",
|
|
2837618
|
+
messages: [
|
|
2837619
|
+
...prev.messages,
|
|
2837620
|
+
{
|
|
2837621
|
+
role: "user",
|
|
2837622
|
+
content: "/bridge",
|
|
2837623
|
+
timestamp: formatTimestamp()
|
|
2837624
|
+
},
|
|
2837625
|
+
{
|
|
2837626
|
+
role: "gordon",
|
|
2837627
|
+
content: `What would you like to bridge? Tell me the amount, token, source chain, and destination chain.
|
|
2837628
|
+
|
|
2837629
|
+
Example: "Bridge 100 USDC from Ethereum to Arbitrum"`,
|
|
2837630
|
+
timestamp: formatTimestamp()
|
|
2837631
|
+
}
|
|
2837632
|
+
]
|
|
2837633
|
+
}));
|
|
2837634
|
+
break;
|
|
2837635
|
+
case "chains": {
|
|
2837636
|
+
const chainsTs = formatTimestamp();
|
|
2837637
|
+
setState((prev) => ({
|
|
2837638
|
+
...prev,
|
|
2837639
|
+
view: "chat",
|
|
2837640
|
+
messages: [
|
|
2837641
|
+
...prev.messages,
|
|
2837642
|
+
{ role: "user", content: "/chains", timestamp: chainsTs }
|
|
2837643
|
+
]
|
|
2837644
|
+
}));
|
|
2837645
|
+
runMenuStream("Show me which blockchain networks are configured and available. List the tools and capabilities for each configured chain.", chainsTs, "Failed to check chains");
|
|
2837646
|
+
break;
|
|
2837647
|
+
}
|
|
2836592
2837648
|
}
|
|
2836593
|
-
}, [state19.portfolioValue, state19.availableCash, state19.conversationHistory, formatCommandError]);
|
|
2837649
|
+
}, [state19.portfolioValue, state19.availableCash, state19.conversationHistory, formatCommandError, runMenuStream]);
|
|
2836594
2837650
|
const handleOnboardingComplete = import_react72.useCallback(async (options4) => {
|
|
2836595
2837651
|
const updatedConfig = {
|
|
2836596
2837652
|
...configRef.current,
|
|
@@ -2836722,7 +2837778,8 @@ Please check your API keys in the .env file and restart Gordon.`,
|
|
|
2836722
2837778
|
connectionStatus: state19.connectionStatus,
|
|
2836723
2837779
|
btcPrice: state19.btcPrice,
|
|
2836724
2837780
|
threadInfo: state19.threadStatusInfo || undefined,
|
|
2836725
|
-
tickerItems
|
|
2837781
|
+
tickerItems,
|
|
2837782
|
+
chainStatus: state19.chainStatus || undefined
|
|
2836726
2837783
|
}, undefined, false, undefined, this),
|
|
2836727
2837784
|
state19.showShortcuts && /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(ShortcutsOverlay, {
|
|
2836728
2837785
|
onClose: () => setState((prev) => ({ ...prev, showShortcuts: false }))
|