Base58Data.unsafe constructor
Base58Data.unsafe(
- String from
Unsafely creates a Base58Data
instance from a String
.
Throws an ArgumentError
if the input is not a valid Base-58 encoded string.
@param from the String
to create the Base58Data
from
@return the Base58Data
@throws ArgumentError when the input string is not a valid Base-58 encoding.
Implementation
factory Base58Data.unsafe(String from) {
try {
return Base58Data.validated(from);
} on Exception catch (err) {
throw ArgumentError('Invalid Base-58 string: $err');
}
}