Repository navigation
feat(zcash): add AI analysis for blocks, transactions and addresses - #413
Merged
Merged
Conversation
|
🚀 Preview: https://pr-413--openscan.netlify.app |
- The address panel is shown only when the address has a transparent receiver: a Sapling, Sprout or receiver-less unified address has nothing public to analyze, so it isn't sent to the AI provider. - Address balance fields become transparentBalanceZEC and transparentReceivedZEC, so the model can't report a unified address's transparent receiver as its whole balance. - Block context includes the shielded coinbase reward, matching the block page. - Transaction context uses the coinbase | unknown | known fee result. - Tests: a Sprout transaction, a shielded coinbase, and the panel shown only for addresses with public data.
MatiasOS
force-pushed
the
issue-398-zcash-ai-analysis
branch
from
November 20, 2026 23:44
6c67dde to
6fd695d
Compare
This was referenced Nov 20, 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.
Description
Adds AI analysis to the Zcash block, transaction and address pages. It's the last PR in the Zcash stack. The panel is the same
AIAnalysisPanelthe Bitcoin pages use, placed in the same spot.Prompt rules, for both the power-user and regular-user configs:
Context sent to the model. Each page builds a compact context in
aiContext.ts:feeZEC,valueBalanceZEC, …).Related Issue
Closes #398. Stacked on #412.
Type of Change
Changes Made
AIAnalysisTypegainszcash_transaction,zcash_blockandzcash_address.VALID_ANALYSIS_TYPESallowlist gains the same three types.AIPromptTemplates.ts: Zcash configs in the power and regular maps, plus thebuildPromptcases.src/components/pages/zcash/aiContext.tsbuilds the three contexts; unit tests are inaiContext.test.ts.zatToZecadded tozcashUtils.AIAnalysisPaneladded toZcashBlockDisplay,ZcashTransactionDisplayandZcashAddressDisplay, each wrapped inpage-with-analysis. Cache keys follow the Bitcoin pattern, e.g.openscan_ai_zcash_block_${networkId}_${hash}.Screenshots (if applicable)
Checked locally against mocked RPC data:
Checklist
npm run format:fixandnpm run lint:fixnpm run typecheckwith no errorsnpm run test:runAdditional Notes
git diff -wshows the real change.solana_*types. That's a pre-existing gap and out of scope here.devvia build(deps): regenerate bun.lock for bun 1.4 and clear npm audit #423) and the metadata bump (moved to feat(adapter): add Zcash data layer #406, which needs it).npm run test:run: 156 passing.Review follow-up
transparentBalanceZECandtransparentReceivedZEC, so the model can't present a unified address's transparent receiver as its whole balance.coinbase | unknown | knownfee result.VALID_ANALYSIS_TYPESallowlist must include the three Zcash types before this frontend ships.buildZcashPromptfollows the existing per-chain builders; folding all of them into one is out of scope here.Tests after the follow-up
npm run test:run: 206 passing.