encodeSimplePubKey static method

String encodeSimplePubKey(
  1. String pubKey
)

Encode a public key in simplified format (first10:last10)

Implementation

static String encodeSimplePubKey(String pubKey) {
  try {
    var code = encodePubKey(pubKey);
    var length = code.length;
    return "${code.substring(0, 10)}:${code.substring(length - 10)}";
  } catch (e) {
    return pubKey;
  }
}