IPFSConfig constructor

IPFSConfig({
  1. bool offline = false,
  2. NetworkConfig network = const NetworkConfig(),
  3. DHTConfig dht = const DHTConfig(),
  4. StorageConfig storage = const StorageConfig(),
  5. SecurityConfig security = const SecurityConfig(),
  6. bool debug = true,
  7. bool verboseLogging = true,
  8. bool enablePubSub = true,
  9. bool enableDHT = true,
  10. bool enableCircuitRelay = true,
  11. bool enableContentRouting = true,
  12. bool enableDNSLinkResolution = true,
  13. bool enableIPLD = true,
  14. bool enableGraphsync = true,
  15. bool enableMetrics = true,
  16. bool enableLogging = true,
  17. String logLevel = 'info',
  18. bool enableQuotaManagement = true,
  19. int defaultBandwidthQuota = 1048576,
  20. String datastorePath = './ipfs_data',
  21. String keystorePath = './ipfs_keystore',
  22. String blockStorePath = 'blocks',
  23. String? nodeId,
  24. Duration garbageCollectionInterval = const Duration(hours: 24),
  25. bool garbageCollectionEnabled = true,
  26. MetricsConfig metrics = const MetricsConfig(),
  27. String dataPath = './ipfs_data',
  28. Keystore? keystore,
  29. Map<String, dynamic> customConfig = const {},
})

Creates a new IPFSConfig with the specified options.

Implementation

IPFSConfig({
  this.offline = false,
  this.network = const NetworkConfig(),
  this.dht = const DHTConfig(),
  this.storage = const StorageConfig(),
  this.security = const SecurityConfig(),
  this.debug = true,
  this.verboseLogging = true,
  this.enablePubSub = true,
  this.enableDHT = true,
  this.enableCircuitRelay = true,
  this.enableContentRouting = true,
  this.enableDNSLinkResolution = true,
  this.enableIPLD = true,
  this.enableGraphsync = true,
  this.enableMetrics = true,
  this.enableLogging = true,
  this.logLevel = 'info',
  this.enableQuotaManagement = true,
  this.defaultBandwidthQuota = 1048576,
  this.datastorePath = './ipfs_data',
  this.keystorePath = './ipfs_keystore',
  this.blockStorePath = 'blocks',
  String? nodeId,
  this.garbageCollectionInterval = const Duration(hours: 24),
  this.garbageCollectionEnabled = true,
  this.metrics = const MetricsConfig(),
  this.dataPath = './ipfs_data',
  Keystore? keystore,
  this.customConfig = const {},
}) : nodeId = nodeId ?? _generateDefaultNodeId(),
     keystore = keystore ?? Keystore();