Closed jtobin closed 5 years ago
Going to give this a double-check, the hex2buf and buf2hex next to each other in the networkNodes
definition are making me suspicious..
Yeah one of the hex2bufs is superfluous, fixing..
Yeah, possibly the best thing would be to manage seeds/keys/etc. in terms of buffers, always, and just use strings, hex or otherwise, for rendering output. That's basically what we do now, but we could probably be more structured about it (by using explicit rendering functions, say).
There were a couple of cases where
Buffer.from(foo)
was used when moving from a hex-encoded string, whenBuffer.from(foo, 'hex')
is the correct way to do it. This had an effect on some seeds (which were too big), plus the resulting keys.