src/utils/account.js
function generateAccount() {
  let priKeyBytes = genPriKey();
  let addressBytes = getAddressFromPriKey(priKeyBytes);
  let address = getBase58CheckAddress(addressBytes);
  let privateKey = byteArray2hexStr(priKeyBytes);

  return {
    privateKey,
    address,
  }
}
function generateAccount() {
  let priKeyBytes = genPriKey();
  let addressBytes = getAddressFromPriKey(priKeyBytes);
  let address = getBase58CheckAddress(addressBytes);
  let privateKey = byteArray2hexStr(priKeyBytes);

  return {
    privateKey,
    address,
  }
}
function generateAccount ( ) { let priKeyBytes = genPriKey ( ) ; let addressBytes = getAddressFromPriKey ( priKeyBytes ) ; let address = getBase58CheckAddress ( addressBytes ) ; let privateKey = byteArray2hexStr ( priKeyBytes ) ; return { privateKey , address , } }
Generate a new account
Generate a new account