tryPreservingPrivacy method
Select receiver input such that the payJoin avoids surveillance. Return the input chosen that has been applied to the Proposal.
Proper coin selection allows common.dart to resemble ordinary transactions. To ensure the resemblance, a number of heuristics must be avoided.
UIH “Unnecessary input heuristic” is one class of them to avoid. We define UIH1 and UIH2 according to the BlockSci practice BlockSci UIH1 and UIH2:
Implementation
@override
Future<common.OutPoint> tryPreservingPrivacy(
{required Map<BigInt, common.OutPoint> candidateInputs, hint}) {
try {
return super.tryPreservingPrivacy(candidateInputs: candidateInputs);
} on error.PayjoinError catch (e) {
throw mapPayjoinError(e);
}
}