用于生成离线私钥、助记词种子和地址的 Tron HD 钱包。
参考地址:tron-wallet-hd
1、安装依赖npm install tron-wallet-hd
utils函数定义
用法
const hdWallet = require('tron-wallet-hd');
const utils = hdWallet.utils;
generateMnemonic() :生成一个由随机 12 字种子组成的字符串并返回它。
const seed = utils.generateMnemonic();
validateMnemonic(mnemonic) :根据BIP39规范检查种子是否是有效的 12 字种子&