retrieveIdentityAsync method

Future<SealdSsksTMRPluginRetrieveIdentityResponse> retrieveIdentityAsync(
  1. String sessionId,
  2. String authFactorType,
  3. String authFactorValue,
  4. Uint8List rawTMRSymKey, {
  5. String? challenge,
})

Retrieve the Seald account previously saved with saveIdentity.

sessionId - The user's session ID. authFactorType - The type of authentication factor. Can be "EM" or "SMS". authFactorValue - The value of authentication factor. rawTMRSymKey - The raw encryption key used to encrypt / decrypt the stored identity keys. This MUST be a cryptographically random buffer of 64 bytes. challenge - The challenge sent by SSKS to the user's authentication method.

Returns a SealdSsksTMRPluginRetrieveIdentityResponse containing the retrieved identity.

Implementation

Future<SealdSsksTMRPluginRetrieveIdentityResponse> retrieveIdentityAsync(
    String sessionId,
    String authFactorType,
    String authFactorValue,
    Uint8List rawTMRSymKey,
    {String? challenge}) {
  final _TransferablePointer<NativeSealdSsksTMRPlugin> tPtr = _ptr;
  return compute(
      (Map<String, dynamic> args) => SealdSsksTMRPlugin._(tPtr)
          .retrieveIdentity(args["sessionId"], args["authFactorType"],
              args["authFactorValue"], args["rawTMRSymKey"],
              challenge: args["challenge"]),
      {
        "sessionId": sessionId,
        "authFactorType": authFactorType,
        "authFactorValue": authFactorValue,
        "rawTMRSymKey": rawTMRSymKey,
        "challenge": challenge
      });
}