IPFSConfig constructor
- bool offline = false,
- NetworkConfig? network,
- DHTConfig? dht,
- StorageConfig? storage,
- SecurityConfig? security,
- 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',
- bool enableLibp2pBridge = false,
- String libp2pListenAddress = '/ip4/0.0.0.0/tcp/4001',
- Uint8List? libp2pIdentitySeed,
- 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,
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();