isValidAccountId static method

bool isValidAccountId(
  1. String value
)

Implementation

static bool isValidAccountId(String value) {
  if (value.contains(":")) {
    List<String> split = value.split(":");
    if (split.length == 3) {
      String chainId = split[0] + ":" + split[1];
      return split.length >= 2 && isValidChainId(chainId);
    }
  }
  //TODO Is there somewhere in the specs that says accounts with ":"s in the account like kadena (k:213421342...) are forbidden?
  return false;
}