Closed ottodevs closed 5 years ago
Sounds like a good idea to me! Let's make sure we support both bytesX
and arbitrary-size bytes
In the latest version of web3, toAscii
has been deprecated in favor of hexToAscii
. And I would propose to expose hexToUtf8(hex)
instead, as well as hexToNumber(hex)
. Do you agree?
Because
bytesX
arguments fit better than strings in some cases, I think it would be really helpful for the user to have a radspec helper that outputs the friendly ASCII or UTF8 value (as web3 utils has).Example:
Those helpers would be pure functions, so they should not decrease overall safety
I can submit a PR for that if you find it is a good idea.