extractV2TransactionSemantics method

Future<ScV2TransactionSemantics> extractV2TransactionSemantics(
  1. Map<String, dynamic> unsignedTransaction, {
  2. Iterable<String> changeAddresses = const [],
})

Extracts canonical signing semantics from the complete unsigned V2 transaction map and computes its InputSigHash through Sia core.

Implementation

Future<ScV2TransactionSemantics> extractV2TransactionSemantics(
  Map<String, dynamic> unsignedTransaction, {
  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).extractV2TransactionSemantics(
    unsignedTransaction,
    changeAddresses: changeAddresses,
  );
}