inspectV2TransactionSemantics method

Future<ScV2TransactionSemantics> inspectV2TransactionSemantics(
  1. Uint8List semanticBytes, {
  2. Iterable<String> changeAddresses = const [],
})

Strictly parses canonical semantic bytes and recomputes InputSigHash through the same Sia core implementation used by the hot side.

Implementation

Future<ScV2TransactionSemantics> inspectV2TransactionSemantics(
  Uint8List semanticBytes, {
  Iterable<String> changeAddresses = const [],
}) {
  final bridge = wasmBridge;
  if (bridge is! ScV2SemanticBridge) {
    throw UnsupportedError(
      'This custom SC bridge does not support V2 transaction semantics',
    );
  }
  return (bridge as ScV2SemanticBridge).inspectV2TransactionSemantics(
    semanticBytes,
    changeAddresses: changeAddresses,
  );
}