buildSignedTransfer function
Build a fully-signed transfer body (ready to POST).
Implementation
Map<String, Object?> buildSignedTransfer({
String networkId = kNetworkId,
required int timestamp,
required Object fee,
required int nonce,
required String senderAddress,
required String publicKey,
required String recipientAddress,
required Object amount,
String? data,
required String privHex,
}) {
final s = _sign(
networkId,
timestamp,
fee,
nonce,
senderAddress,
privHex,
p.transferPayload(
amount: amount, recipientAddress: recipientAddress, data: data));
return {
'timestamp': timestamp,
'fee': normalizeAmount(fee),
'nonce': nonce,
'hash': s['hash'],
'senderAddress': senderAddress,
'senderSignature': s['signature'],
'senderPublicKey': publicKey,
'amount': normalizeAmount(amount),
'recipientAddress': recipientAddress,
'data': data,
};
}