-
Notifications
You must be signed in to change notification settings - Fork 163
How to store and load Keypairs? #482
Comments
To be honest I haven't kept up at what facilities are already implemented in latest While providing tools for at least the en/decoding of secrets makes a lot of sense, or even semi-reasonable higher level secret management, it was not part of the grant work done on this project for it being needed near of "escaping the alpha stage" after having become useful as a library, which I don't think it is at the moment. And as such, not a priority on the quite short list of things we could do. For development purposes the random keys work just fine, and should be preferred not to risk anyone using any keys they use elsewhere accidentially. |
Do you mean this library is not ready for usage yet? That'd be sad because it seems that this is the only IPFS library that actually seems to be usabe (ipfs-api is not usable at all and ipfs-embed is really hard to use). |
Yes, this is the case. We try to be forthcoming with this in the repository README. If you are not interested in developing rust implementation of ipfs but only using an ipfs implementation, you should look into ipfs-api and go-ipfs. I haven't been keeping up on the latest developments on the HTTP API front so I cannot comment on ipfs-api's usability. However, if some API functionality has changed drastically fixing them might not be a huge amount of work. |
Go is not an option because it is go and |
Hi there, rust-libp2p maintainer here. The story on storing and loading key material is not ideal in rust-libp2p quite yet. In case you want to load the keymaterial generated from a go-ipfs node, you can use: I would like to replace https://github.com/libp2p/rust-libp2p/tree/master/misc/peer-id-generator with a command line tool to store and load key material in a go-ipfs style, though I have not yet found the time. Contributions are most welcome. |
Hi @mxinden I just stumbled on the necessity of such tool, lol. |
Great @fabricio7p. For decoding you would basically just copy the logic here and wrap it in a CLI tool which takes the config path as an input. Want to create a draft pull request on rust-libp2p? We can discuss encoding over there then. |
For the record @demfabris has implemented a |
Hi!
If I understand correctly, I need to save and store
Keypair
s when writing an application that uses an ipfs node internally. But how do I do that? I do not see any way to encode the keypair to save it to disk and later load it again?Hope you can help!
The text was updated successfully, but these errors were encountered: