getTransactionKey function

String getTransactionKey(
  1. String transactionId
)

Implementation

String getTransactionKey(String transactionId) {
  Pointer<Char> transactionIdPointer =
      transactionId.toNativeUtf8().cast<Char>();
  final errorBoxPointer = monero_flutter.buildErrorBoxPointer();

  final resultPointer =
      monero_flutter.bindings.get_tx_key(transactionIdPointer, errorBoxPointer);

  final result = resultPointer.cast<Utf8>().toDartString();
  calloc.free(resultPointer);

  final errorInfo = monero_flutter.extractErrorInfo(errorBoxPointer);

  if (0 != errorInfo.code) {
    throw Exception(errorInfo.getErrorMessage());
  }

  return result;
}