fromString static method

SecpPublicKey fromString(
  1. String str
)

Implementation

static SecpPublicKey fromString(String str) {
  final nativeStr = str.toNativeUtf8();
  try {
    final ffi = DartApi.native.secpPublicKey
        .fromString(nativeStr)
        .extract((resp) => resp.asPointer<Void>());
    return SecpPublicKey(ffi, true);
  } finally {
    calloc.free(nativeStr);
  }
}