Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Libp2p interface #1875

Closed
weboko opened this issue Jul 10, 2023 · 3 comments
Closed

Improve Libp2p interface #1875

weboko opened this issue Jul 10, 2023 · 3 comments
Labels
kind/stale need/author-input Needs input from the original author

Comments

@weboko
Copy link

weboko commented Jul 10, 2023

Version: [email protected], @libp2p/[email protected]

Severity: Medium

Description:

Right now my team faces a problem with types that a coming from Libp2p in case when we want to refer to Libp2p Components.

Because default interface to refer to libp2p is declared in @libp2p/interface-libp2p does not have components defined on it when at the same time libp2p implementation has components declared it created problematic situation for us and forces us to use type casting to keep the possibility to refer to Libp2p components in our TypeScript code.

I'd like to know if was it intentional that Components are not exported from libp2p package?

If so, what is the reasoning for it?
Otherwise is it possible to export the Components interface from the package?

Steps to reproduce the error: N/A

@weboko weboko added the need/triage Needs initial labeling and prioritization label Jul 10, 2023
@maschad
Copy link
Member

maschad commented Jul 17, 2023

This has been previously raised in #1567 but the rationale is that Components are the internals of Libp2p and should be obscured from consumers. The Libp2p node interface seeks to be a simple API that exposes methods a consumer should call without having to know the internals of Libp2p's components, I am curious to see the use cases for utilizing Libp2p components directly in your code, could you please share some examples?

@maschad maschad assigned maschad and unassigned maschad Jul 17, 2023
@maschad maschad added need/author-input Needs input from the original author and removed need/triage Needs initial labeling and prioritization labels Aug 29, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2023

Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days.

@github-actions
Copy link
Contributor

This issue was closed because it is missing author input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/stale need/author-input Needs input from the original author
Projects
None yet
Development

No branches or pull requests

2 participants