checkInputsNotOwned method

  1. @override
Future<MaybeMixedInputScripts> checkInputsNotOwned({
  1. required FutureOr<bool> isOwned(
    1. Uint8List p1
    ),
  2. dynamic hint,
})

Check that the Original PSBT has no receiver-owned inputs. Return original-psbt-rejected error or otherwise refuse to sign undesirable inputs. An attacker could try to spend receiver's own inputs. This check prevents that.

Implementation

@override
Future<MaybeMixedInputScripts> checkInputsNotOwned(
    {required FutureOr<bool> Function(Uint8List p1) isOwned, hint}) async {
  try {
    final res = await super.checkInputsNotOwned(isOwned: isOwned);
    return MaybeMixedInputScripts._(field0: res.field0);
  } on error.PayjoinError catch (e) {
    throw mapPayjoinError(e);
  }
}