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

Introduce ToPeerId type for things that can be turned into PeerId #133

Open
Gozala opened this issue Nov 12, 2020 · 1 comment
Open

Introduce ToPeerId type for things that can be turned into PeerId #133

Gozala opened this issue Nov 12, 2020 · 1 comment
Labels
status/ready Ready to be worked

Comments

@Gozala
Copy link

Gozala commented Nov 12, 2020

@vasco-santos
Copy link
Member

Cross posting from https://github.com/ipfs/js-ipfs/pull/3365/files/fa7c2c13c43bab922052104fe8aff863d9725e9b?file-filters%5B%5D=.js&file-filters%5B%5D=.json&file-filters%5B%5D=.ts#r522871631

We already have several createFrom* functions in peer-id, but they are targeted to a specific type https://github.com/libp2p/js-peer-id#import
I think this would be nice to have, I would just go with PeerId.createFrom(param: ToPeerId) to be consistent with what we already have.

@vasco-santos vasco-santos added the status/ready Ready to be worked label Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/ready Ready to be worked
Projects
None yet
Development

No branches or pull requests

2 participants