eosjs核心库的调用都被封装为Eos

sdk中使用的eosjs库的版本为16.0.8
  • 调用方式
window.addEventListener('sdkReady', function () { 
   if (self.Eos) { //初始化完成后就可以直接调用hbWallet中注入好的Eos全局对象
       var ecc = self.Eos.modules.ecc;
       ecc.randomKey().then(privateKey => {
           randomPriKey = privateKey;
           randomPubKey = ecc.privateToPublic(randomPriKey);
           console.log(randomPriKey, randomPubKey);
       });
   }
});

results matching ""

    No results matching ""