checkBtcAddress static method

bool checkBtcAddress(
  1. String address, [
  2. NetworkType? networkType
])

Implementation

static bool checkBtcAddress(String address,
    [bitcoin.NetworkType? networkType]) {
  try {
    if (address.startsWith('bitcoincash:')) {
      return checkStandardBase32(address);
    } else {
      bitcoin.Address.addressToOutputScript(address, networkType);
      return true;
    }
  } catch (error) {
    return false;
  }
}