@hypurrquant/defi-cli 1.0.3 → 1.0.4

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 CHANGED
@@ -7960,7 +7960,7 @@ function handleSchema(params) {
7960
7960
  from: { type: "string", required: true, description: "Input token symbol or address" },
7961
7961
  to: { type: "string", required: true, description: "Output token symbol or address" },
7962
7962
  amount: { type: "string", required: true, description: "Amount in wei" },
7963
- provider: { type: "string", required: false, default: "kyber", description: "Aggregator: kyber, openocean, liquid" },
7963
+ provider: { type: "string", required: false, default: "kyber", description: "Aggregator: kyber, openocean, liquid, lifi, relay" },
7964
7964
  slippage: { type: "string", required: false, default: "50", description: "Slippage in bps" }
7965
7965
  },
7966
7966
  cli: "defi --chain hyperevm swap --from USDC --to WHYPE --amount 1000000"
@@ -9818,11 +9818,12 @@ function registerYield(parent, getOpts, makeExecutor2) {
9818
9818
  if (opts.targetChain) {
9819
9819
  targetChainName = opts.targetChain.toLowerCase();
9820
9820
  } else {
9821
- process.stderr.write(`Scanning all chains for best ${asset} yield...
9821
+ const quiet = getOpts().json;
9822
+ if (!quiet) process.stderr.write(`Scanning all chains for best ${asset} yield...
9822
9823
  `);
9823
9824
  const t0 = Date.now();
9824
9825
  const allRates = await scanRatesForExecute(registry, asset);
9825
- process.stderr.write(`Scan done in ${Date.now() - t0}ms \u2014 ${allRates.length} rates found
9826
+ if (!quiet) process.stderr.write(`Scan done in ${Date.now() - t0}ms \u2014 ${allRates.length} rates found
9826
9827
  `);
9827
9828
  if (allRates.length === 0) {
9828
9829
  printOutput({ error: `No yield opportunities found for ${asset}` }, getOpts());
@@ -11746,7 +11747,9 @@ function buildBanner() {
11746
11747
  try {
11747
11748
  const reg = Registry.loadEmbedded();
11748
11749
  chainCount = reg.chains.size;
11749
- protocolCount = reg.protocols.length;
11750
+ protocolCount = reg.protocols.filter(
11751
+ (p) => p.verified !== false && p.is_active !== false
11752
+ ).length;
11750
11753
  } catch {
11751
11754
  }
11752
11755
  const stats = chainCount && protocolCount ? `${chainCount} chains \xB7 ${protocolCount} protocols \xB7 by HypurrQuant` : `by HypurrQuant`;