NdkConfig constructor

NdkConfig({
  1. required EventVerifier eventVerifier,
  2. EventSigner? eventSigner,
  3. required CacheManager cache,
  4. NdkEngine engine = NdkEngine.RELAY_SETS,
  5. List<String> ignoreRelays = const [],
  6. List<String> bootstrapRelays = DEFAULT_BOOTSTRAP_RELAYS,
  7. List<EventFilter> eventOutFilters = const [],
  8. Duration defaultQueryTimeout = RequestDefaults.DEFAULT_QUERY_TIMEOUT,
  9. Level logLevel = defaultLogLevel,
})

Creates a new instance of NdkConfig.

eventVerifier The verifier used to validate Nostr events.
eventSigner Optional signer used to sign Nostr events.
cache The cache manager for storing and retrieving Nostr data.
engine The engine mode to use (defaults to RELAY_SETS).
ignoreRelays A list of relay URLs to ignore (defaults to an empty list).
bootstrapRelays A list of initial relay URLs (defaults to DEFAULT_BOOTSTRAP_RELAYS).
eventOutFilters A list of filters to apply to the output stream (defaults to an empty list).
defaultQueryTimeout The default timeout for queries (defaults to DEFAULT_QUERY_TIMEOUT).
logLevel The log level for the NDK (defaults to warning).

Implementation

NdkConfig({
  required this.eventVerifier,
  this.eventSigner,
  required this.cache,
  this.engine = NdkEngine.RELAY_SETS,
  this.ignoreRelays = const [],
  this.bootstrapRelays = DEFAULT_BOOTSTRAP_RELAYS,
  this.eventOutFilters = const [],
  this.defaultQueryTimeout = RequestDefaults.DEFAULT_QUERY_TIMEOUT,

  /// test
  this.logLevel = defaultLogLevel,
});