IPFSWebNode constructor

IPFSWebNode({
  1. IPFSConfig? config,
  2. List<String> bootstrapPeers = const [],
  3. RouterInterface? router,
  4. BitswapHandler? bitswap,
})

Creates a new web IPFS node.

Implementation

IPFSWebNode({
  IPFSConfig? config,
  this.bootstrapPeers = const [],
  RouterInterface? router,
  BitswapHandler? bitswap,
}) {
  _platform = getPlatform();
  _config = config ?? IPFSConfig(offline: true);

  // Initialize networking components
  _router = router ?? Libp2pRouter(_config, seed: _config.libp2pIdentitySeed);
  _injectedBitswap = bitswap;
  _blockStore = WebBlockStore(_platform);

  // Other components initialized in start()
}