magicMessage static method
Applies the magic prefix and calculates the SHA-256 hash of the message for Bitcoin signing.
The message prefix is expected to start with the safe Bitcoin message prefix (0x18).
Implementation
static List<int> magicMessage(List<int> message, String messagePrefix) {
final prefixBytes = StringUtils.encode(messagePrefix);
final magic = _magicPrefix(message, prefixBytes);
return QuickCrypto.sha256Hash(magic);
}