Requests constructor

Requests({
  1. required GlobalState globalState,
  2. required CacheRead cacheRead,
  3. required CacheWrite cacheWrite,
  4. required NetworkEngine networkEngine,
  5. required EventVerifier eventVerifier,
  6. required List<EventFilter> eventOutFilters,
})

Creates a new Requests instance

globalState The global state of the application
cacheRead The cache reader for retrieving cached events
cacheWrite The cache writer for storing events
networkEngine The engine for handling network requests
eventVerifier The verifier for validating Nostr events

Implementation

Requests({
  required GlobalState globalState,
  required CacheRead cacheRead,
  required CacheWrite cacheWrite,
  required NetworkEngine networkEngine,
  required EventVerifier eventVerifier,
  required List<EventFilter> eventOutFilters,
})  : _engine = networkEngine,
      _cacheWrite = cacheWrite,
      _cacheRead = cacheRead,
      _globalState = globalState,
      _eventVerifier = eventVerifier,
      _eventOutFilters = eventOutFilters;