IPFSConfig constructor

IPFSConfig({
  1. bool offline = false,
  2. NetworkConfig? network,
  3. DHTConfig? dht,
  4. StorageConfig? storage,
  5. SecurityConfig? security,
  6. GatewayConfig? gateway,
  7. BitswapConfig? bitswap,
  8. GraphsyncConfig? graphsync,
  9. bool debug = true,
  10. bool verboseLogging = true,
  11. bool enablePubSub = true,
  12. bool enableDHT = true,
  13. bool enableRPC = false,
  14. bool enableCircuitRelay = true,
  15. bool enableContentRouting = true,
  16. bool enableDNSLinkResolution = true,
  17. bool enableIPLD = true,
  18. bool enableGraphsync = true,
  19. bool enableMetrics = true,
  20. bool enableIpnsPubSub = false,
  21. bool enableLogging = true,
  22. bool enableStructuredLogging = false,
  23. int ipnsCacheSize = 1000,
  24. String logLevel = 'info',
  25. bool enableQuotaManagement = true,
  26. int defaultBandwidthQuota = 1048576,
  27. int maxConcurrentBitswapRequests = 10,
  28. String datastorePath = './ipfs_data',
  29. String keystorePath = './ipfs_keystore',
  30. String blockStorePath = 'blocks',
  31. bool enableLibp2pBridge = false,
  32. String libp2pListenAddress = '/ip4/0.0.0.0/tcp/4001',
  33. Uint8List? libp2pIdentitySeed,
  34. String? nodeId,
  35. Duration garbageCollectionInterval = const Duration(hours: 24),
  36. bool garbageCollectionEnabled = true,
  37. MetricsConfig metrics = const MetricsConfig(),
  38. String dataPath = './ipfs_data',
  39. Keystore? keystore,
  40. int maxSelectorDepth = 32,
  41. int maxSelectorNodes = 10000,
  42. 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,
  GatewayConfig? gateway,
  BitswapConfig? bitswap,
  GraphsyncConfig? graphsync,
  this.debug = true,
  this.verboseLogging = true,
  this.enablePubSub = true,
  this.enableDHT = true,
  this.enableRPC = false,
  this.enableCircuitRelay = true,
  this.enableContentRouting = true,
  this.enableDNSLinkResolution = true,
  this.enableIPLD = true,
  this.enableGraphsync = true,
  this.enableMetrics = true,
  this.enableIpnsPubSub = false,
  this.enableLogging = true,
  this.enableStructuredLogging = false,
  this.ipnsCacheSize = 1000,
  this.logLevel = 'info',
  this.enableQuotaManagement = true,
  this.defaultBandwidthQuota = 1048576,
  this.maxConcurrentBitswapRequests = 10,
  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.maxSelectorDepth = 32,
  this.maxSelectorNodes = 10000,
  this.customConfig = const {},
}) : network = network ?? NetworkConfig(),
     dht = dht ?? const DHTConfig(),
     storage = storage ?? const StorageConfig(),
     security = security ?? const SecurityConfig(),
     gateway = gateway ?? const GatewayConfig(),
     bitswap = bitswap ?? const BitswapConfig(),
     graphsync = graphsync ?? const GraphsyncConfig(),
     nodeId = nodeId ?? _generateDefaultNodeId(),
     keystore = keystore ?? Keystore();