code: function genPriKey() {
    let ec = new EC('secp256k1');
    let key = ec.genKeyPair();
    let priKey = key.getPrivate();
    let priKeyHex = priKey.toString('hex');
    while (priKeyHex.length < 64) {
      priKeyHex = "0" + priKeyHex;
    }
  
    return hexStr2byteArray(priKeyHex);
  }
docs: gen Ecc priKey for bytes