/** * Parses the provided string and returns the possible supported coin types. * Throws an AddressFormatException if the string is not a valid address or not supported. */ public static List<CoinType> getPossibleTypes(String addressStr) throws AddressMalformedException { ImmutableList.Builder<CoinType> builder = ImmutableList.builder(); tryBitcoinFamilyAddresses(addressStr, builder); // TODO try other coin addresses List<CoinType> possibleTypes = builder.build(); if (possibleTypes.size() == 0) { throw new AddressMalformedException("Unsupported address: " + addressStr); } return possibleTypes; }