Closed falken42 closed 2 years ago
Not sure what the use case is but sure, why not.
Thanks!
Just to expand on our use case: we build Wuhu in a Docker container, and have a script which executes a series of POSTs directly on the admin panel to automate the entire configuration process for TDF. The final step grabs the generated votekeys from Wuhu and copies the .json out to the local filesystem.
We could have also generated votekeys ourselves and imported them into Wuhu instead, but this was the easier route to take. :)
There's a few concerns; for one, this exports all votekeys, even if they're already used - don't know if that's something you'd want? Also the content-type header should be application/json
, and so on.
Good points. I did consider expanding out the JSON to potentially store more data (such as whether a particular key was used or not), but this was a quick throw-together solution for what we needed.
I can make it more robust in a future update!
While Wuhu has support for importing votekeys (and printing), it currently does not have any method to export votekeys. For our purposes, we've found using Wuhu's votekey generation to be useful, but we needed a way to make use of the votekeys with other applications.
This is a simple feature addition to allow votekeys to be viewed or downloaded as either plaintext or JSON from the Votekeys page in the Admin panel.
For reference, the exported JSON is formatted as a single array of strings, like so: