sign method
Signs the payload with a private key. The output will be like the
bytes representation of the xcb_sign RPC method,
but without the "Core signed message" prefix.
The payload parameter contains the raw data, not a hash.
Implementation
Uint8List sign(Uint8List payload, {required int networkId}) {
final signature = signToSignature(payload, networkId: networkId);
return signature;
}