IPFSConfig constructor
- bool offline = false,
- NetworkConfig? network,
- DHTConfig? dht,
- StorageConfig? storage,
- SecurityConfig? security,
- GatewayConfig? gateway,
- BitswapConfig? bitswap,
- GraphsyncConfig? graphsync,
- bool debug = true,
- bool verboseLogging = true,
- bool enablePubSub = true,
- bool enableDHT = true,
- bool enableRPC = false,
- bool enableCircuitRelay = true,
- bool enableContentRouting = true,
- bool enableDNSLinkResolution = true,
- bool enableIPLD = true,
- bool enableGraphsync = true,
- bool enableMetrics = true,
- bool enableIpnsPubSub = false,
- bool enableLogging = true,
- bool enableStructuredLogging = false,
- int ipnsCacheSize = 1000,
- String logLevel = 'info',
- bool enableQuotaManagement = true,
- int defaultBandwidthQuota = 1048576,
- int maxConcurrentBitswapRequests = 10,
- 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,
- int maxSelectorDepth = 32,
- int maxSelectorNodes = 10000,
- 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();