nansen-cli 1.27.0 → 1.27.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.27.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#408](https://github.com/nansen-ai/nansen-cli/pull/408) [`d1e9787`](https://github.com/nansen-ai/nansen-cli/commit/d1e97871b897153a9e1cd587897ff2f4bbed6c88) Thanks [@0xlaveen](https://github.com/0xlaveen)! - Add cross-chain notes to trade help text and document --to-chain constraints in schema.json.
8
+
3
9
  ## 1.27.0
4
10
 
5
11
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nansen-cli",
3
- "version": "1.27.0",
3
+ "version": "1.27.1",
4
4
  "description": "Command-line interface for Nansen API - designed for AI agents",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/cli.js CHANGED
@@ -1505,7 +1505,17 @@ WALLET:
1505
1505
 
1506
1506
  SYMBOLS:
1507
1507
  Common tokens resolve automatically: SOL, ETH, USDC, USDT, WETH
1508
- Raw addresses are also accepted.`);
1508
+ Raw addresses are also accepted.
1509
+
1510
+ CROSS-CHAIN NOTES (when using --to-chain):
1511
+ Supported combos:
1512
+ native → native (ETH <-> SOL) — requires $5+ per trade
1513
+ USDC → USDC (both directions)
1514
+ USDC → native (USDC → ETH or SOL)
1515
+ native → USDC (ETH/SOL → USDC)
1516
+ non-native → non-native — not supported (use USDC as intermediate)
1517
+ Bridge provider: Li.Fi
1518
+ Typical bridge time: 1-5 minutes`);
1509
1519
  return;
1510
1520
  }
1511
1521
  if (!tradingCmds[sub]) {
package/src/schema.json CHANGED
@@ -839,7 +839,7 @@
839
839
  },
840
840
  "to-chain": {
841
841
  "type": "string",
842
- "description": "Destination blockchain for cross-chain swap (solana or base). Omit for same-chain."
842
+ "description": "Destination blockchain for cross-chain swap (solana or base). Omit for same-chain. At least one side must be USDC or a native token (ETH, SOL). Non-native to non-native is not supported — swap to USDC first, then bridge. Minimum ~$5 per cross-chain trade (Li.Fi bridge)."
843
843
  },
844
844
  "from": {
845
845
  "type": "string",
package/src/trading.js CHANGED
@@ -994,6 +994,16 @@ EXAMPLES:
994
994
  nansen trade quote --chain base --from ETH --to USDC --amount 1000000000000000000
995
995
  nansen trade quote --chain base --to-chain solana --from USDC --to USDC --amount 1000000
996
996
  nansen trade quote --chain solana --to-chain base --from SOL --to ETH --amount 1000000000
997
+
998
+ CROSS-CHAIN NOTES (when using --to-chain):
999
+ Supported combos:
1000
+ native → native (ETH <-> SOL) — requires $5+ per trade
1001
+ USDC → USDC (both directions)
1002
+ USDC → native (USDC → ETH or SOL)
1003
+ native → USDC (ETH/SOL → USDC)
1004
+ non-native → non-native — not supported (use USDC as intermediate)
1005
+ Bridge provider: Li.Fi
1006
+ Typical bridge time: 1-5 minutes
997
1007
  `, 'MISSING_ARGS');
998
1008
  }
999
1009
 
@@ -1157,6 +1167,10 @@ EXAMPLES:
1157
1167
  };
1158
1168
  if (isCrossChain) {
1159
1169
  params.toChainIndex = toChainConfig.index;
1170
+ // Opt out of Relay aggregator: CLI bypasses backend /execute so the
1171
+ // Redis aggregator hint is never set, and /bridge/status defaults to
1172
+ // LiFi — polling a Relay txHash there returns NOT_FOUND.
1173
+ params.disabledAggregators = 'relay';
1160
1174
  if (toWallet) {
1161
1175
  params.toWalletAddress = toWallet;
1162
1176
  log(` Destination wallet: ${toWallet}`);