addKey method

MorpheusOperation addKey(
  1. String authentication,
  2. int expiresAtHeight
)

Implementation

MorpheusOperation addKey(String authentication, int expiresAtHeight) {
  final nativeAuth = authentication.toNativeUtf8();
  try {
    final op = DartApi.native.morpheusOperationBuilder
        .addKey(_ffi, nativeAuth, expiresAtHeight)
        .extract((res) => res.asPointer<Void>());
    return MorpheusOperation(op, true);
  } finally {
    calloc.free(nativeAuth);
  }
}