isValidBytes static method
check if bytes is valid for this key.
Implementation
static bool isValidBytes(List<int> keyBytes) {
try {
ECDSAPrivateKey.fromBytes(keyBytes, Curves.generatorSecp256k1);
return true;
} catch (e) {
return false;
}
}