IPFSConfig constructor

IPFSConfig({
  1. bool offline = false,
  2. NetworkConfig? network,
  3. DHTConfig? dht,
  4. StorageConfig? storage,
  5. SecurityConfig? security,
  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. bool enableLibp2pBridge = false,
  24. String libp2pListenAddress = '/ip4/0.0.0.0/tcp/4001',
  25. Uint8List? libp2pIdentitySeed,
  26. String? nodeId,
  27. Duration garbageCollectionInterval = const Duration(hours: 24),
  28. bool garbageCollectionEnabled = true,
  29. MetricsConfig metrics = const MetricsConfig(),
  30. String dataPath = './ipfs_data',
  31. Keystore? keystore,
  32. Map<String, dynamic> customConfig = const {},
})

Creates a new IPFSConfig with the specified options.

Implementation

IPFSConfig({
  this.offline = false,
  NetworkConfig? network,
  DHTConfig? dht,
  StorageConfig? storage,
  SecurityConfig? security,
  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',
  this.enableLibp2pBridge = false,
  this.libp2pListenAddress = '/ip4/0.0.0.0/tcp/4001',
  this.libp2pIdentitySeed,
  String? nodeId,
  this.garbageCollectionInterval = const Duration(hours: 24),
  this.garbageCollectionEnabled = true,
  this.metrics = const MetricsConfig(),
  this.dataPath = './ipfs_data',
  Keystore? keystore,
  this.customConfig = const {},
}) : network = network ?? NetworkConfig(),
     dht = dht ?? const DHTConfig(),
     storage = storage ?? const StorageConfig(),
     security = security ?? const SecurityConfig(),
     nodeId = nodeId ?? _generateDefaultNodeId(),
     keystore = keystore ?? Keystore();