IPFSConfig constructor
- bool offline = false,
- NetworkConfig network = const NetworkConfig(),
- DHTConfig dht = const DHTConfig(),
- StorageConfig storage = const StorageConfig(),
- SecurityConfig security = const SecurityConfig(),
- bool debug = true,
- bool verboseLogging = true,
- bool enablePubSub = true,
- bool enableDHT = true,
- bool enableCircuitRelay = true,
- bool enableContentRouting = true,
- bool enableDNSLinkResolution = true,
- bool enableIPLD = true,
- bool enableGraphsync = true,
- bool enableMetrics = true,
- bool enableLogging = true,
- String logLevel = 'info',
- bool enableQuotaManagement = true,
- int defaultBandwidthQuota = 1048576,
- String datastorePath = './ipfs_data',
- String keystorePath = './ipfs_keystore',
- String blockStorePath = 'blocks',
- String? nodeId,
- Duration garbageCollectionInterval = const Duration(hours: 24),
- bool garbageCollectionEnabled = true,
- MetricsConfig metrics = const MetricsConfig(),
- String dataPath = './ipfs_data',
- Keystore? keystore,
- 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();