Skip to content

feat: non-EVM (Solana/Bitcoin) read-only support + Jupiter quotes (v1.1.0-rc.1)#7

Open
junjieit wants to merge 13 commits into
mainfrom
feat/svm-and-bvm
Open

feat: non-EVM (Solana/Bitcoin) read-only support + Jupiter quotes (v1.1.0-rc.1)#7
junjieit wants to merge 13 commits into
mainfrom
feat/svm-and-bvm

Conversation

@junjieit

@junjieit junjieit commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds read-only support for non-EVM chains — Solana (SVM) and Bitcoin mainnet (BVM) — across the chain, protocol, token, wallet, and risk command trees, plus Solana swap quotes via the Jupiter aggregator. Swap execution, ERC-20 approvals, and token create/mint/renounce stay EVM-only by design.

Also cuts a release candidate: 1.0.01.1.0-rc.1.

What's included

  • Non-EVM read-only queries — routing by address shape (SPL mints / BTC addresses) or solana/svm and bitcoin/bvm chain aliases; --chain-id does not apply to these lookups.
    • chain / protocol analytics via DefiLlama
    • wallet balance / overview / history (Debank → Zerion for SVM; mempool.space for BVM), pnl / defi on SVM
    • token info / price / liquidity on SVM (Jupiter + CoinGecko + DexScreener)
    • token risk / risk token on SVM (GoPlus Solana, authority-based signals)
  • Solana swap quotes via Jupiter — read-only pricing when both --from and --to are SPL mints; the returned quote cannot be simulated or executed.
  • Wallet risk hardeningrisk wallet combines a native-balance heuristic with GoPlus malicious-address reputation (sanctions, phishing, drainer, mixer, …) on both EVM and SVM.
  • Non-EVM input rejection — swap quote/simulate/status and residual EVM-only token commands reject SVM/BVM inputs with a clear message.
  • Docs — SKILL.md non-EVM coverage matrix and Jupiter quote notes; README.md / README_CN.md non-EVM support section.
  • Release — version bump to 1.1.0-rc.1.

Notes

  • For Solana wallet queries, Debank is recommended over Zerion (Zerion's Solana indexing is async and can time out on cold wallets).
  • Bitcoin entity labels are not integrated (mempool.space returns raw on-chain data only).

🤖 Generated with Claude Code

junjieit and others added 13 commits June 15, 2026 10:42
- chain/protocol analytics accept svm/bvm/solana/bitcoin aliases via DefiLlama
- wallet balance/overview/pnl/history/labels/defi now branch on AddressRef:
  SVM via Debank/Zerion, BVM via new mempool.space client + CoinGecko BTC price
- commands with no data source on Bitcoin surface a clear "not supported" error
  instead of falling through to EVM-only paths
- token info/price/liquidity accept SPL mints (base58) via AddressRef shape
  detection; Jupiter supplies identity, CoinGecko coins/solana/contract
  supplies price/market cap, DexScreener supplies pool data and liquidity
- BVM addresses surface a clear "not supported" error
- new src/api/jupiter.rs client for /tokens/v1/token/{mint}
- token_metadata gains enrich_svm / fetch_price_svm / fetch_liquidity_svm
- token contract/risk/create/mint/fee remain EVM-only by design
- token risk on SPL mints uses GoPlus Solana token_security; risk level
  derives from authority signals (mintable / freezable / closable),
  transfer fee, transfer hook, and non_transferable
- risk token routes SPL mints through the same GoPlus Solana path and
  surfaces authority-based signals as RiskSignal entries
- risk wallet on Solana returns a metadata-only report (no behavioral
  signals indexed by public providers); on Bitcoin returns not supported
- risk approval rejects any SVM/BVM owner or spender with a message
  naming which side triggered the rejection (ERC-20 approval is EVM-only)
- token contract / token add now reject SVM / BVM addresses with command-
  specific messages instead of bubbling "Token not found" / "Invalid
  address" from the EVM resolver
- SKILL.md gains a top-level support matrix covering every command's
  behaviour on EVM, SVM, and BVM so consumers can see at a glance which
  read paths are wired and which remain EVM-only by design
- swap quote rejects --from / --to shaped as SPL mints or BTC addresses
  with a routing-specific message, instead of bubbling the resolver's
  "Token not found"
- swap status disambiguates EVM and Bitcoin hashes by the 0x prefix: a
  bare 64-char hex is treated as a BTC txid (not tracked by DODO swap
  history) and base58 strings ≥32 chars as Solana signatures
- swap simulate inherits the same protection via the saved quote (a SVM/
  BVM input cannot reach simulate without first passing quote)
Wire GoPlus's chain-agnostic malicious-address library into `risk wallet`.
SVM goes from a metadata-only placeholder to a real reputation lookup; EVM
augments the native-balance heuristic, taking the more severe of balance and
reputation as the overall level so a funded-but-flagged wallet isn't LOW.

- token_metadata: add AddressSecurity + fetch_address_security (flat
  result schema, "1"/"0" flags; None chain_id for non-EVM / Solana).
- risk: address_reputation_signals (chain-neutral, pure, unit-tested);
  sanctions/stealing/honeypot=Critical, financial-crime=High, soft=Medium.
- verified live against GoPlus on EVM (chain_id=1) and Solana.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Replace absolute "no data source" wording with accurate scoping:
- risk wallet: now GoPlus address reputation on EVM+SVM; note GoPlus
  coverage is best-effort (clean = "not flagged", not "proven safe").
- wallet labels (BVM): mark "not integrated" with a footnote — Breadcrumbs/
  MetaSleuth/Arkham cover BTC labels but need a new paid/keyed client, and
  BTC isn't a DODO trading target, so it's deferred not impossible.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Follow-up hardening for the GoPlus address-reputation risk wallet path:

- token_metadata: extract pure parse_address_security() and guard against
  schema drift — a keyed map or renamed result no longer reads as a false
  "clean"; it returns None (no record). Add 4 unit tests (flat, all-zero,
  code!=1, keyed-map).
- risk (EVM): emit the native-balance heuristic as an explicit
  low_native_balance signal instead of folding it opaquely into overall;
  overall is now uniformly the most-severe signal.
- surface reputation coverage as best-effort in metadata (EVM + SVM) so a
  LOW result reads as "not flagged", not "proven safe".

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
`swap quote` now routes SPL-mint pairs to the Jupiter aggregator instead of
rejecting them; DODO stays EVM-only. Read-only pricing only — no DODO
liquidity, no signing, and the quote is NOT persisted, so simulate/execute/
status remain EVM-only. Bitcoin and mixed EVM/SVM pairs are rejected.

- jupiter: add quote() + pure parse_quote() (typed route/impact/amounts).
- jupiter: migrate token() from the retired /tokens/v1/token/{mint} route
  to Token API v2 /tokens/v2/search — this also fixes SVM token info/price/
  risk, which had silently regressed to 404 ("Route not found").
- swap: classify_quote_route() picks EVM vs Jupiter vs reject by address
  shape; build_svm_quote() maps Jupiter output into the shared Quote model
  (chain_id=0 sentinel, empty EVM-only fields).
- verified live against Jupiter lite-api (quote + v2 token) and reject paths.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Split the swap coverage matrix into quote vs execution rows, note that
`swap quote` works on SVM via Jupiter (read-only, SPL mints, quote-only /
not persisted), and update the swap quote section with the SVM routing and
rejection rules.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Router, native Value, Est. Gas, and Gas Limit are EVM settlement concepts.
For a non-EVM quote (chain_id == 0 sentinel, e.g. a read-only Solana quote
via Jupiter) they were always empty/zero and the Value row rendered with a
wrong-chain "ETH (wei)" label. Skip those four rows when chain_id == 0; EVM
quotes are unchanged. Verified: SVM quote omits them, EVM quote still shows
them.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Bring README.md and README_CN.md in line with the branch's Solana/Bitcoin
work: add a non-EVM support matrix, note Jupiter-backed Solana swap quotes,
and mention the GoPlus address-reputation signal in wallet risk. Execution,
approvals, and token create/mint stay EVM-only.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant