Wallet Summary Flow
The wallet summary is a derived object that aggregates balance, behavior, and risk context into a single structure. It's used throughout the interface and in AI prompt memory.
The system generates the summary every time a wallet is loaded or refreshed.
Data Sources
SPL token balances (via RPC or indexer)
Transaction history (last N signatures)
Signal events (if pattern match is triggered)
Token-level metadata and risk flags
Summary Object
{
address: "9gzLP8xR9dRka...vU7W",
totalSignals: 6,
topSignalType: "buy-pressure",
avgConfidence: 0.79,
tokenCount: 4,
totalValueUsd: 1325.47,
hasRisk: true
}
totalSignals
— signal count scoped to last 24 hourstopSignalType
— most common signal typeavgConfidence
— mean confidence scoretokenCount
— count of active SPL tokenstotalValueUsd
— sum of token values in USDhasRisk
— true if any holdings are flagged (mintable, paused, unverified)
Flow Behavior
Tokens are normalized and de-duped by mint
Transactions are parsed for signal triggers
Risk flags are mapped at the token level
Confidence is averaged, not weighted
Output is memoized for the session only
Usage
The summary powers:
WalletStats
componentPrompt memory context
Dev tools (debug output, confidence checks)
UI routing for empty states or signal-only views
No external queries or caching layers are used. The summary is local, fast, and disposable. If the wallet changes, the summary is recalculated instantly.
Last updated