light-mode-image
Learn
Functions

destroy

Destroys an instance of the SDK.

This function deletes all credentials, trusted issuer certificates and device keys from storage for a given instance of the SDK.

An error is thrown if this method is called when the SDK is already initialized; call deinitialize() first.

This API is idempotent, meaning calling it with an instance ID that has never been initialized will not result in an error.

Signature

function destroy(
  options?: DestroyOptions
): Promise<Result<void, DestroyError>>

Parameters

Prop

Type

Returns

Promise<Result<void, DestroyError>>

A promise that resolves to an ok result once the instance's credentials, certificates and device keys are deleted.

Throws

InvalidParams if the provided arguments are missing or invalid.

MobileCredentialHolderErrorType.SdkInitialized if the SDK is currently initialized; call deinitialize() before destroying.

How would you rate this page?

On this page