-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Implement cli tool to handle key material #2453
Conversation
Thanks for following up here @fabricio7p!
I would require passing a config file path for now. I would argue that libp2p shouldn't depend on IPFS concepts much. While we would depend on their file-format, at least we wouldn't depend on their filesystem conventions or environment variables. Does that make sense?
Something along those lines. In my eyes, by default it should just generate a random identity. The feature of choosing a custom prefix should be a nice-to-have. |
I think the |
Sure thing, I'll post updates soon. |
4ed3eaf
to
0c10b33
Compare
I choose to use cli api # Gen random key material, with prefix at your option
keygen rand [--prefix <prefix>]
# Gen key material from IPFS config
keygen from --config <path> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. Thanks for the work here!
I choose to use argh to be way way lighter than clap/structopt
We use structopt
in all other examples across the project. I don't really have a strong opinion on which one to use, but as a maintainer I would prefer being consistent.
Unless you feel strongly about it, I would prefer if this one would use structopt
as well.
0c10b33
to
9cdbabc
Compare
Added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 more comments. Otherwise this is good to go. Thanks for the new tool!
Co-authored-by: Max Inden <[email protected]>
Co-authored-by: Max Inden <[email protected]>
Co-authored-by: Max Inden <[email protected]>
3a7b4bc
to
63cd284
Compare
All points addressed 👍🏻 ready to go? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks @demfabris. This tool will be helpful going forward.
Unrelated test failure:
https://github.com/libp2p/rust-libp2p/runs/5510014225?check_suite_focus=true //CC @elenaf9 |
So for decoding, if I understood correctly we are reading from a IPFS config file passed as argument.
Do we check for this file under
IPFS_PATH
as well?For encoding are we reusing this implementation: peer-id-generator ?
@mxinden
Refs: #482