tryDecodeBase58WithCheck static method

(List<int>, List<int>)? tryDecodeBase58WithCheck(
  1. String base58,
  2. int prefixLength
)

Implementation

static (List<int>, List<int>)? tryDecodeBase58WithCheck(
  String base58,
  int prefixLength,
) {
  try {
    final decode = Base58Decoder.checkDecode(base58);
    if (decode.length < prefixLength) return null;
    return (decode.sublist(0, prefixLength), decode.sublist(prefixLength));
  } catch (_) {}
  return null;
}