createAccount static method

String createAccount(
  1. int accountType,
  2. String publicKey
)

Implementation

static String createAccount(int accountType, String publicKey) {
  assert(accountType == NanoAccountType.BANANO ||
      accountType == NanoAccountType.NANO ||
      accountType == NanoAccountType.PAW);
  String binaryPubkey = NanoHelpers.hexToBinary(publicKey).padLeft(260, "0");
  String encodedChecksum = calculatedEncodedChecksum(publicKey);
  String encodedPubkey = encoder.encode(binaryPubkey);
  return NanoAccountType.getPrefix(accountType) +
      encodedPubkey +
      encodedChecksum;
}