signAndBuildTransaction method
Implementation
ADATransaction signAndBuildTransaction(ONSignADA onSignADA) {
_validateAmounts();
final aux = auxiliaryData;
final trBody = buildTxBody(auxHash: aux?.toHash());
final bodyHash = List<int>.unmodifiable(trBody.toHash().data);
final List<ADABaseTransactionWitness> witnesses = [];
final transactionSigners = signers;
for (final i in transactionSigners) {
final witness = onSignADA(address: i, digest: bodyHash);
witnesses.add(witness);
}
final vkeys = witnesses.whereType<Vkeywitness>().toList();
final bootstraps = witnesses.whereType<BootstrapWitness>().toList();
return ADATransaction(
body: trBody,
data: aux,
witnessSet: TransactionWitnessSet(
vKeys: vkeys,
nativeScripts: transactionNativeScripts,
bootstraps: bootstraps));
}