💰 Currency / Internal¶
🎯 Purpose¶
The Internal layer contains private implementation helpers, decorators, guards, caches, and runtime plumbing used by the Currency system.
These types support composition, authority resolution, policy application, auditing, batching, escrow, idempotency, and resolver override behaviour.
This folder is not part of the supported extension surface.
⚠️ Important Notes¶
- This folder is not a supported dependency surface
- Types here may change without notice
- External code should not depend on this folder
- Public contracts are defined in Abstractions and PublicAPI
🧩 What Lives Here¶
Internal helpers¶
-
CurrencyAuthorityScene-scoped resolver and cache forICurrencyAuthority -
CurrencyBatchInternal capture helper forCurrencyDeltabatching -
CurrencyPolicyUtilHelper for applying policy rules to balances -
CurrencyRequestIdGUID-based request identifier helper -
CurrencyServiceOverrideResolver override used by bootstrap publishing
Internal seams¶
-
ICurrencyBatchEmitterInternal seam for batch event emission -
IAuditAwareCurrencyServicePublic capability (defined in Abstractions) that may be forwarded internally
Internal decorators / guards¶
Concrete runtime wrappers used for composition:
AuditedCurrencyService— audit capture and forwardingBatchEventCurrencyService— batch event supportCappedCurrencyService— cap enforcementEscrowCurrencyService— escrow lifecycle handlingIdempotencyCurrencyService— replay detectionRequireEscrowCurrencyService— guard for escrow-required flows
These implementations are internal to keep the public API surface stable.
🧠 Usage Guidance¶
Mental model¶
- Abstractions define contracts
- PublicAPI defines supported usage
- Bootstrap composes stacks
- Internal performs runtime work
External code should interact with Currency through supported layers only.
🚫 Internal Use Only¶
This folder is intended for internal runtime implementation.
Do not:
- Reference these types from gameplay code
- Build integrations against these implementations
- Rely on behaviour or structure remaining stable
🧹 Safe to Remove¶
This folder should not be removed.
Core Currency functionality depends on these internal implementations.
🔗 Related Documentation¶
- Abstractions — public contracts and capabilities
- PublicAPI — supported usage helpers
- Bootstrap — service composition and publishing
- Authority — mutation gating seam
- Policies — rule definitions used by internal helpers