Move base58Decode outside of Device, firefox doesn't seem to support declaration after function call