detectFormat method

int detectFormat (String address)

Detects type of the address and returns formatCashAddr or formatLegacy

Implementation

static int detectFormat(String address) {
  // decode the address to determine the format
  final decoded = _decode(address);
  // return the format
  return decoded["format"];
}