These are some mods I made to enable displaying mint and dbc information nicely in a CLI.
The largest part of the PR changes Hash to use newtype pattern instead of a type alias. I initially did this in order to impl fmt::Display and Debug on Hash for pretty printing using base64 encoding. However, I discovered that fmt::Display really cannot do what I need, so in the end the app does all the display formatting itself. I also reverted the custom base64 encoding in Hash::Debug, as I figure it is perhaps better to display the raw data/structure in Debug mode. As such, the newtype pattern could be reverted from the PR, but I think it is useful to keep, as it makes it easy/possible to add functionality to Hash and DbcContentHash in the future.
Other changes are:
adds PublicKey::to_bytes()
derive Debug for Mint, KeyCache, KeyManager, SpendBook
These last two are relied upon by the cli mint prototype.
These are some mods I made to enable displaying mint and dbc information nicely in a CLI.
The largest part of the PR changes
Hash
to use newtype pattern instead of a type alias. I initially did this in order to impl fmt::Display and Debug on Hash for pretty printing using base64 encoding. However, I discovered that fmt::Display really cannot do what I need, so in the end the app does all the display formatting itself. I also reverted the custom base64 encoding in Hash::Debug, as I figure it is perhaps better to display the raw data/structure in Debug mode. As such, the newtype pattern could be reverted from the PR, but I think it is useful to keep, as it makes it easy/possible to add functionality to Hash and DbcContentHash in the future.Other changes are:
These last two are relied upon by the cli mint prototype.