createUnsignedTransaction method
Implementation
Transaction createUnsignedTransaction({
required Address toAddress,
required Amount amount,
required Address changeAddress,
}) {
final selectedUtxos = _selectUtxos(
spendAmount: amount.raw,
feePerInput: kFeePerInput,
);
final changeAmount = _getChangeRaw(
selectedUtxos: selectedUtxos,
spendAmount: amount.raw,
feePerInput: kFeePerInput,
);
final payments = <Address, Int64>{
toAddress: amount.raw.toInt64(),
if (changeAmount > kFeePerInput) changeAddress: changeAmount.toInt64(),
};
final unsignedTransaction = _createUnsignedTransaction(
utxos: selectedUtxos,
payments: payments,
);
return unsignedTransaction;
}