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
Add encode-content-key command to trin-cli #300
Add encode-content-key command to trin-cli #300
Conversation
9f927b1
to
36a3c82
Compare
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 great, works great 👍
691a5ed
to
f0069c9
Compare
@carver do you want to take a look? Given that you seem to have a use case for this utility, I would like to see how well it meets your needs. |
A lot of it was just curiosity, and it ended up being pretty straightforward to just generate in python after a quick spec review. But I'm still happy to take a look! |
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.
Yup, all looks reasonably to me!
@@ -52,13 +52,13 @@ cargo run | |||
Note: You may also pass environment variable values in the same command as the run command. This is especially useful for setting log levels. | |||
|
|||
```sh | |||
RUST_LOG=debug cargo run -p trin | |||
RUST_LOG=debug cargo run |
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.
Any idea the history here of why it used to be -p trin
?
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.
Not sure, but the two commands are identical, so I prefer the more succinct one. I wish I could remember if I even had a reason to change that in the first place 🤔.
Obviously, after the build errors are fixed 😆 |
What was wrong?
We lack a CLI command to encode content keys, which makes it difficult to interact with the network from the CLI if you want to look up content items.
How was it fixed?
StructOpt
into two commands:json-rpc
initiates JSON-RPC requestsencode-key
encodes content keysencode-key
subcommand to encode content keys.encode-key
.To-Do