buildSignedPromoter function
Build a signed validator registration body (legacy name).
Implementation
Map<String, Object?> buildSignedPromoter({
String networkId = kNetworkId,
required int timestamp,
required Object fee,
required int nonce,
required String senderAddress,
required String publicKey,
required Object amount,
required String promoterKey,
required String privHex,
}) {
final s = _sign(networkId, timestamp, fee, nonce, senderAddress, privHex,
promoterPayload(amount: amount, promoterKey: promoterKey));
return {
'timestamp': timestamp,
'fee': normalizeAmount(fee),
'nonce': nonce,
'senderAddress': senderAddress,
'amount': normalizeAmount(amount),
'validatorKey': promoterKey,
'hash': s['hash'],
'senderSignature': s['signature'],
'senderPublicKey': publicKey,
};
}