NdkConfig constructor
NdkConfig({
- required EventVerifier eventVerifier,
- EventSigner? eventSigner,
- required CacheManager cache,
- NdkEngine engine = NdkEngine.RELAY_SETS,
- List<
String> ignoreRelays = const [], - List<
String> bootstrapRelays = DEFAULT_BOOTSTRAP_RELAYS, - List<
EventFilter> eventOutFilters = const [], - Duration defaultQueryTimeout = RequestDefaults.DEFAULT_QUERY_TIMEOUT,
- 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,
});