default: {
    addTrustedIssuerCertificates: ((certificates) => Promise<Result<string[], AddTrustedIssuerCertificatesError>>);
    createProximityPresentationSession: ((options) => Promise<void>);
    deinitialize: (() => Promise<void>);
    deleteTrustedIssuerCertificate: ((certificateId) => Promise<void>);
    deregisterForNfcDeviceEngagement: (() => Promise<void>);
    destroy: (() => Promise<Result<void, MobileCredentialVerifierError<SdkInitialized>>>);
    fetchAppleWalletConfiguration: ((options) => Promise<Result<AppleWallet, FetchAppleWalletConfigurationError>>);
    getCurrentLogFilePath: (() => Promise<null | string>);
    getTrustedIssuerCertificates: (() => Promise<TrustedIssuerCertificate[]>);
    getTrustedIssuerStatusListsCacheInfo: (() => Promise<GetTrustedIssuerStatusListsCacheInfo>);
    handleDeepLink: ((options) => Promise<Result<void, MobileCredentialVerifierError<PlatformNotSupported>>>);
    initialize: InitializeFunction;
    isInitialized: (() => Promise<boolean>);
    name: string;
    registerForNfcDeviceEngagement: ((options) => Promise<void>);
    requestMobileCredentials: ((options) => Promise<Result<OnlinePresentationSessionResult, RequestMobileCredentialsError>>);
    sendProximityPresentationRequest: ((options) => Promise<Result<MobileCredentialResponse, SendProximityPresentationRequestError>>);
    terminateProximityPresentationSession: (() => Promise<void>);
    updateTrustedIssuerStatusLists: (() => Promise<UpdateTrustedIssuerStatusListsResult>);
} = ...

Type declaration

  • addTrustedIssuerCertificates: ((certificates) => Promise<Result<string[], AddTrustedIssuerCertificatesError>>)
      • (certificates): Promise<Result<string[], AddTrustedIssuerCertificatesError>>
      • Add trusted issuer certificates to storage.

        Issuer certificates are used to verify mDocs when they are added to storage. This function validates the issuer certificate as per the IACA profile defined in ISO/IEC 18013-5:2021, applying the additional constraint of requiring the certificate to be self-signed.

        The function is idempotent, meaning repeated calls to add the same issuer certificates do not result in duplicates. Instead, it returns the IDs of existing certificates stored by the SDK.

        Parameters

        • certificates: readonly string[]

          An array of certificates in PEM-encoded string format OR a Base64-encoded DER string.

        Returns Promise<Result<string[], AddTrustedIssuerCertificatesError>>

        An array of IDs of successfully added certificates.

  • createProximityPresentationSession: ((options) => Promise<void>)
      • (options): Promise<void>
      • Create a proximity-based presentation session with an mDoc holder using device retrieval as per ISO/IEC 18013-5:2021.

        If the application using this SDK hasn't tried to use Bluetooth before, calling this function will result in a system UI prompt asking the user to grant Bluetooth permissions to the application. If the user has denied a similar previous permission request (either when interacting with another part of the application or through a prior call to this function) the ProximityPresentationSessionListener#onError will be invoked with MobileCredentialVerifierErrorType#BluetoothPermissionDenied error until the user explicitly grants Bluetooth permissions to the application in their OS app settings.

        Parameters

        Returns Promise<void>

  • deinitialize: (() => Promise<void>)
      • (): Promise<void>
      • Deinitialize the MobileCredentialVerifier SDK.

        This function will terminate the current presentation session if it exists and close access to storage. Calling this method when the SDK is already deinitialized will be ignored.

        Returns Promise<void>

  • deleteTrustedIssuerCertificate: ((certificateId) => Promise<void>)
      • (certificateId): Promise<void>
      • Delete a trusted issuer certificate from storage.

        This function is idempotent, meaning calls to delete issuer certificates that do not exist will not return an error.

        Parameters

        • certificateId: string

          ID of the certificate to be deleted.

        Returns Promise<void>

  • deregisterForNfcDeviceEngagement: (() => Promise<void>)
      • (): Promise<void>
      • Disables NFC engagement and deregisters any previously registered callbacks.

        Returns Promise<void>

  • destroy: (() => Promise<Result<void, MobileCredentialVerifierError<SdkInitialized>>>)
  • fetchAppleWalletConfiguration: ((options) => Promise<Result<AppleWallet, FetchAppleWalletConfigurationError>>)
  • getCurrentLogFilePath: (() => Promise<null | string>)
      • (): Promise<null | string>
      • Gets the path to the Verifier SDK log file.

        Returns Promise<null | string>

        A Promise resolving to the log file path string, or null if no log is available.

  • getTrustedIssuerCertificates: (() => Promise<TrustedIssuerCertificate[]>)
  • getTrustedIssuerStatusListsCacheInfo: (() => Promise<GetTrustedIssuerStatusListsCacheInfo>)
  • handleDeepLink: ((options) => Promise<Result<void, MobileCredentialVerifierError<PlatformNotSupported>>>)
  • initialize: InitializeFunction
  • isInitialized: (() => Promise<boolean>)
      • (): Promise<boolean>
      • Returns Promise<boolean>

  • name: string
  • registerForNfcDeviceEngagement: ((options) => Promise<void>)
  • requestMobileCredentials: ((options) => Promise<Result<OnlinePresentationSessionResult, RequestMobileCredentialsError>>)
      • (options): Promise<Result<OnlinePresentationSessionResult, RequestMobileCredentialsError>>
      • Parameters

        • options: RequestMobileCredentialsOptions

          An object containing the following properties:

          • request: An array of MobileCredentialRequest objects that specify the credential queries to be sent to the wallet for filtering and matching credentials stored in the wallet.
          • applicationId: The Android verifier application ID that has been registered with the MATTR VII Platform and configured for use with this integration.
          • walletProviderId: Optional wallet provider ID registered with the MATTR VII Platform, used to target a specific wallet that supports OpenID4VP. When set, forces using an OpenID4VP session.
          • challenge: A string representing the challenge to be sent to the server. This is typically a unique identifier or token generated for the verification process.

          Android behavior:

          Starts a remote app-to-app verification flow using either an OpenID4VP Redirect or Digital Credentials API (DC API) session. Depending on the configured MATTR VII Android Verifier application and the credential request, the most appropriate session flow will be initiated.

          Creates a DC API session when all of the following conditions are met:

          1. dcApiConfiguration is enabled in the MATTR VII Verifier application configuration
          2. The end user's device supports the Android API level >= Android P (API 28)
          3. walletProviderId is not provided (i.e., walletProviderId is undefined)
          4. request.length == 1

          When any of the conditions are not met, the SDK automatically falls back to create an OpenID4VP session. If no openid4vpConfiguration is defined for the Verifier application, the session would fail.

          NOTE: To receive OpenID4VP results you must declare the SDK callback activity in your app AndroidManifest.xml.

          <activity
          android:name="global.mattr.mobilecredential.verifier.a2apresentation.callback.Openid4VpCallbackActivity"
          android:exported="true">
          <intent-filter>
          <action android:name="android.intent.action.VIEW" />
          <category android:name="android.intent.category.DEFAULT" />
          <category android:name="android.intent.category.BROWSABLE" />
          <!-- Match the openid4vpConfiguration you configured in the MATTR VII Verifier application -->
          <data
          android:scheme="com.example.verifier"
          android:host="openid4vp" />
          </intent-filter>
          </activity>

          NOTE: DC API support in the Holder SDK is currently offered as a tech preview. This feature is experimental and relies on Google’s Digital Credentials Manager (DCM) API, which is also in an early stage. As such, functionality may be limited, may not work in all scenarios, and could change or break without prior notice.


          iOS behavior:

          Initialize an online presentation flow. This method requires a deep link handler to be registered in the app's event handling flow, such as in AppDelegate, SceneDelegate, or onOpenURL.

          Details: https://api-reference-sdk.mattr.global/mobile-credential-verifier-ios/latest/documentation/mobilecredentialverifiersdk/mobilecredentialverifier/handledeeplink(_:)#discussion

          See handleDeepLink for more details.

        Returns Promise<Result<OnlinePresentationSessionResult, RequestMobileCredentialsError>>

  • sendProximityPresentationRequest: ((options) => Promise<Result<MobileCredentialResponse, SendProximityPresentationRequestError>>)
      • (options): Promise<Result<MobileCredentialResponse, SendProximityPresentationRequestError>>
      • This function uses the requested credentials to construct and send a request to the holder.

        If the request is not valid, an error will be thrown. Once the request has been sent, a response is expected. In accordance with ISO 18013-5, sessions must be terminated after a period of inactivity. The specification recommends a minimum timeout of 300 seconds for no activity (sending or receiving session data). The SDK implements this minimum, and will throw an error if no response is received within 300 seconds. The session will not be terminated so a new request can be sent. When a response is received, it will be decoded, verified and returned. The verification process is performed according to ISO 18013-5 specifications, subsequently the credential revocation status is checked if checkStatus is true (or not supplied) and the previous verifications have succeeded. As per ISO 18013-5 specifications, a response and sessionTermination status code can be received in the same response from the holder. In this scenario the response will be returned by this method and the data transport session will be closed.

        Parameters

        Returns Promise<Result<MobileCredentialResponse, SendProximityPresentationRequestError>>

        The response as received from the holder as an instance of MobileCredentialResponse

  • terminateProximityPresentationSession: (() => Promise<void>)
      • (): Promise<void>
      • Terminate the session explicitly, send status code sessionTerminated to the holder, and close data transport.

        Returns Promise<void>

  • updateTrustedIssuerStatusLists: (() => Promise<UpdateTrustedIssuerStatusListsResult>)

Generated using TypeDoc