I trying the ethereumjs-util
in react-native
, first ethUtil.privateToPublic
work fine, then when use ethUtil.publicToAddress
will getting this error TypeError: Cannot read property 'call' of undefined
, I trace the error actually come from Keccak
.
Then I try Keccak it self :
const createKeccakHash = require('keccak');
console.log(createKeccakHash('keccak256').digest().toString('hex'));
also getting the same error TypeError: Cannot read property 'call' of undefined