Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue: #308 #309
Description:
Properly configured, setup and resolved Helia to work seamlessly within the Angular application while maintaining good development practices and build optimization.
Fixes and Updates
Handles initialization states and errors properly
The key changes address:
1)
ERROR NoValidAddressesError: no valid addresses were provided for transports [@libp2p/websockets]
fix: configure the WebSocket transport with proper addresses.
1.Listen for incoming WebSocket connections
2. Connect to bootstrap nodes for peer discovery
3.Properly encrypt connections
4.Handle multiple streams
2)
Error committing text: Error: UnixFS failed to initialize at _HeliaService.<anonymous> (helia.service.ts:85:13) at Generator.next (<anonymous>)
fix: Properly wait for Helia initialization before attempting operations
Add better error handling throughout the application
Show initialization status and errors to the user
3)
Type '() => StreamMuxerFactory' is not assignable to type 'StreamMuxerFactory'.
fix: Adding type annotation : any to the underscore parameter
Double-invoking yamux with ()() to get the actual muxer instance
This adds as any to force the type system to accept the yamux configuration. While not ideal, it should work around the type mismatch between different versions of the libp2p interfaces.
4)
Error fetching committed text: ReferenceError: Buffer is not defined at _CommitTextService.
fix: Since Buffer isn't available in browsers, used Uint8Array instead
Conclusion: