transactionDiffV1 method

Result<Uint8List, Error> transactionDiffV1({
  1. required YTransaction txn,
  2. Uint8List? vector,
})

Implementation

Result<Uint8List, Error> transactionDiffV1({
  required YTransaction txn,
  Uint8List? vector,
}) {
  final results = _transactionDiffV1([
    YTransaction.toWasm(txn),
    (vector == null
        ? const None().toWasm()
        : Option.fromValue(vector).toWasm()),
  ]);
  final result = results[0];
  return Result.fromJson(
    result,
    (ok) => (ok is Uint8List ? ok : Uint8List.fromList((ok! as List).cast())),
    (error) => error is String ? error : (error! as ParsedString).value,
  );
}