Hostile Consumer Panels¶
This folder contains hostile-consumer teachable panels for the Currency system.
These panels are intentionally written as if they lived in a separate Unity project consuming RevFramework from the outside.
They verify that the public API surface of the Currency system is complete and usable without internal access.
What “Hostile Consumer” Means¶
Panels in this folder are restricted to using only:
- Public APIs
- Documented runtime types
- Supported extension seams
- Teaching UI utilities
They may not:
- reference
.Internalnamespaces - access private fields through reflection
- depend on internal decorators or bootstrap helpers
- rely on sample/demo scene utilities
- assume a specific concrete service implementation
If a panel requires any of those, it must not live in this folder.
Built-In Runtime Model¶
The Currency system exposes a supported runtime model alongside its abstractions.
Hostile consumer panels may use these documented runtime surfaces.
Core Runtime Types¶
ICurrencyService
CurrencyId
Money
CurOpResult
CurOpCode
CurOpKind
CurrencyDelta
Optional Capability Interfaces¶
ICurrencyAuditReader
ICurrencyBatchEvents
ICurrencyEscrow
IAuditAwareCurrencyService
Helper Entry Points¶
CurrencyResolve
CurrencyServiceExtensions
CurrencyAudit
CurrencyPersistence
CurrencyTxn
CurrencyHoldTxn
These types are part of the public runtime API, not internal implementation details.
Panels must not assume the concrete implementation of the currency service.
Policy & Definition Surfaces¶
Panels may also use these authoring/runtime types:
CurrencyDefinition
CurrencySet
CurrencyPolicy
CurrencyCapRule
CapMode
These represent authoring configuration and public rule primitives.
Panels must query rules through the supported query surface:
CurrencyPolicy.TryGetCapRule(...)
They must not depend on internal rule lists or authoring structures.
Purpose of These Panels¶
Hostile-consumer panels serve two roles.
1️⃣ Public API Verification¶
They prove that the framework can be used through its public surface only.
If a hostile-consumer panel stops compiling or working after a refactor, it usually means:
- the public API changed
- a required capability is missing
- or a contract became unstable
This makes them regression tests for the public API.
2️⃣ Teaching Real Usage¶
These panels demonstrate real production interaction patterns, including:
- resolving services via
CurrencyResolve - performing mutations through
ICurrencyService - using reason/source audit metadata
- reading balances safely
- previewing policy outcomes
- building transactions
- handling escrow workflows
- inspecting audit history
- persisting and restoring wallet state
Everything shown here uses the same public APIs developers use in real gameplay code.
Relationship to Demo Panels¶
Not all teaching panels are hostile consumers.
Panels that:
- demonstrate scene bootstrap patterns
- wire example services
- interact with UI bars
- attach demo-only helpers
are placed in the Demo folder instead.
Examples include:
CurrencyServiceBootstrap_Escrow
CurrencyUIBarsPanel
These panels demonstrate usage patterns, but they are not part of the public API verification layer.
Summary¶
Panels in this folder are API verification tools disguised as teaching panels.
They ensure that:
- the Currency public API is usable externally
- the runtime model works without internal access
- internal refactors cannot silently break consumers
If these panels compile and run successfully, the Currency public API is sound.