我尝试了ethereumjs-util in react-native,首先ethUtil.privateToPublic工作得很好,然后当使用ethUtil.publicToAddress将得到这个错误react-native时,我跟踪错误实际上来自Keccak。
然后我尝试凯克卡克 it self:
const createKeccakHash = require('keccak');
console.log(createKeccakHash('keccak256').digest().toString('hex'));也会得到相同的错误TypeError: Cannot read property 'call' of undefined
发布于 2019-08-18 12:40:23
您可以尝试使用js-sha3 --我知道您的模块可能不支持React Native.
keccak256 = require('js-sha3').keccak256;
var bytes = keccak256.digest();
console.log(bytes);https://stackoverflow.com/questions/57541888
复制相似问题