signHydraTransaction method

SignedHydraTransaction signHydraTransaction(
  1. String txJson
)

Implementation

SignedHydraTransaction signHydraTransaction(String txJson) {
  final nativeTx = txJson.toNativeUtf8();
  try {
    final signedTx = DartApi.native.secpPrivateKey
        .signHydraTx(_ffi, nativeTx)
        .extract((resp) => resp.asString);
    return SignedHydraTransaction(signedTx);
  } finally {
    calloc.free(nativeTx);
  }
}