ockam
ockam copied to clipboard
Make `ockam identity show` command work without creating nodes
Currently:
> ockam enroll
...
> ockam identity show
No such node available. Run `ockam node list` to list available nodes
After enroll there is already an identity and it is stored in the default_identity
key of our config file.
Desired:
In the above case > ockam identity show
should show the default identity.
We love helping new contributors! If you have questions or need help as you work on your first Ockam contribution, please leave a comment on this discussion. If you're looking for other issues to contribute to, checkout this discussion and labels - https://github.com/build-trust/ockam/labels/good%20first%20issue or https://github.com/build-trust/ockam/labels/help%20wanted
I made a start at this in https://github.com/rtsuk/ockam/tree/default_identity. I think it is correct for the command's full option, but I'm not sure how to covert the identity in the config file into a identity ID.
@rtsuk thank you for spending time on this! Would you mind turning your branch into a draft pull request? I'll try to help with comments there.
Roughly, something like this should work:
let vault = Vault::create();
let identity = PublicIdentity::import(&serialized_identity, &vault);
https://github.com/build-trust/ockam/blob/develop/implementations/rust/ockam/ockam_identity/src/public_identity.rs
Will do. The pull request template had a lot of text and the coffee hadn't quite kicked in enough for me to parse it all. 😀
Hey @rtsuk, let me know if you need any help with this, looking forward to that PR! :rocket:
Done