Add TRON Phase 1: read-only balances + portfolio integration - #15
Merged
Conversation
szhygulin
force-pushed
the
feat/tron-phase1-read
branch
from
April 14, 2026 05:36
bb6ee6a to
95369f5
Compare
Introduces non-EVM chain support without disturbing the EVM type surface: SupportedChain stays EVM-only, TRON lives in a parallel SupportedNonEvmChain union, and AnyChain is the cross-chain entry point. Adds TronGrid-backed balance reads (TRX + canonical TRC-20 stablecoins), a TronBalance/TronPortfolioSlice type pair, optional tronAddress on get_portfolio_summary, TRON dispatch in get_token_balance, and an interactive setup prompt for TRON_API_KEY. Phases 2 (tx preparation) and 3 (Ledger signing) land separately. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extends Phase 1 with a `get_tron_staking` tool and folds staking into `get_portfolio_summary`. Reads `frozenV2` and `unfrozenV2` from the `/v1/accounts` payload (Stake 2.0 model) and claimable voting rewards from `/wallet/getReward`. Surfaces bandwidth/energy split, ISO unlock timestamps, and USD totals; `tronStakingUsd` appears on the portfolio summary alongside `tronUsd`. Actual claim/unstake transactions land in Phase 2. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
szhygulin
force-pushed
the
feat/tron-phase1-read
branch
from
April 14, 2026 06:17
1b57eec to
150322c
Compare
szhygulin
added a commit
that referenced
this pull request
Apr 27, 2026
Captures the architectural rule that follow-up issues #15 (security-skill) and #402 (mcp) both violated: VaultPilot's companion skills ship SKILL.md only, not executables. A skill-shipped CLI can't exist, so MCP-side "detect bin on PATH" plans have nothing to point at. Implication for [AGENT TASK] blocks: inline node -e scripts stay inline. Shrinkable, labelable, redesignable (drop a sub-check, move browser-side) — but not movable into a non-existent skill bin. PR #400's labeling step is the full fix for #396, not a partial one. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced Apr 28, 2026
szhygulin
added a commit
that referenced
this pull request
Apr 28, 2026
Beyond adversarial cases (prompt injection, rogue subagent, malicious skill, deliberately rogue agent), a safety-tuned non-injected agent can still produce harmful behavior through hallucinated addresses / chain IDs, stale knowledge of deprecated contracts, post-training- cutoff protocols, long-context attention drift, sycophancy under user pressure, cross-tool reasoning gaps, numeric mistakes, and tool-name confusion. Threat-model-wise these are functionally equivalent to a narrow agent compromise: the agent emits bytes / advice / args that don't match user intent, with no adversarial intent required. Two edits: 1. "Why trust VaultPilot?" preamble — explicit second paragraph naming the honest-model-error category alongside the adversarial cases, with the user-facing implication that benign-looking responses should not be trusted more than adversarial ones. 2. "Threat → what catches it" — new bullet listing each model-error sub-class and which specific defenses (PREPARE RECEIPT, Inv #1.a, Inv #2.5, Inv #14, Inv #15, agent-side ABI decode, Ledger device display, skill-side unconditional refusals) catch it. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced Apr 29, 2026
Closed
This was referenced Jul 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SupportedChainstays EVM-only, TRON lives in a parallelSupportedNonEvmChainunion,AnyChainis the new cross-chain entry-point type, andisEvmChain()narrows.get_token_balanceacceptschain: "tron"with base58 wallet/token;get_portfolio_summaryaccepts an optionaltronAddressthat folds TRX + canonical TRC-20 stablecoins (USDT, USDC, USDD, TUSD) into the same total viabreakdown.tron/tronUsd/coverage.tron.TRON_API_KEYenv var overrides config.Scope notes
tronAddresscombinations throw (ambiguous which EVM wallet the TRON address pairs with); callers must use single-wallet mode.Test plan
npm run build— cleannpm test— 265/265 passing, including 26 new TRON tests (chain registration invariants,isEvmChain,isTronAddress,TRON_TOKENS,resolveTronApiKeyprecedence, schema acceptance,getTronBalances/getTronTokenBalancewith stubbed fetch, dispatch)recon-crypto-mcp-setupand confirm the TronGrid prompt validates against a live keyget_portfolio_summarywith an EVM wallet +tronAddressand confirm TRON slice appears inbreakdown.tronwith TRX + TRC-20 values🤖 Generated with Claude Code