signInBackground function
Sign a transaction in a background isolate. Returns the signature (Base64 DER); attach it with
tx.withSignature(signature, account.publicKeyHex).
Implementation
Future<String> signInBackground(UnsignedTx tx, String privateKeyHex) {
final hash = tx.hash();
return Isolate.run(() => Account.fromPrivateKey(privateKeyHex).sign(hash));
}