signClaimPresentation method

Signed<Presentation> signClaimPresentation(
  1. KeyId id,
  2. Presentation presentation
)

Implementation

Ssi.Signed<Ssi.Presentation> signClaimPresentation(
    KeyId id, Ssi.Presentation presentation) {
  final presentationString = json.encode(presentation.toJson());
  final nativePresentation = presentationString.toNativeUtf8();
  try {
    final signedFfi = DartApi.native.morpheusPrivate
        .signClaimPresentation(_ffi, id.ffi, nativePresentation)
        .extract((resp) => resp.asPointer<Void>());
    return _toSsiSignedTyped(signedFfi, presentation);
  } finally {
    calloc.free(nativePresentation);
  }
}