Const An array of certificates in PEM-encoded string format OR a Base64-encoded DER string.
An array of IDs of successfully added certificates.
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.
Session creation options
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.
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.
ID of the certificate to be deleted.
Disables NFC engagement and deregisters any previously registered callbacks.
iOS only
Retrieves the Apple Wallet configuration required for mobile credential verification.
An object containing the mobile credential request, application ID, and merchant ID.
A promise that resolves to a Result containing an instance of AppleWallet on success, or a FetchAppleWalletConfigurationError on failure.
Gets the path to the Verifier SDK log file.
A Promise resolving to the log file path string, or null if no log is available.
Retrieve all trusted issuer certificates from storage.
An array of trusted issuer certificates as instances of TrustedIssuerCertificate.
Get current revocation status lists cache information without updating the status lists.
Update result as an instance of UpdateTrustedIssuerStatusListsResult.
iOS only
Handles a deep link to continue the online presentation flow.
An object containing the URL received from the url handler.
void
Enables NFC engagement and registers any previously registered callbacks.
An object containing the following properties:
MobileCredentialRequest objects that specify the credential queries to be sent to the wallet for filtering and matching credentials stored in the wallet.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:
dcApiConfiguration is enabled in the MATTR VII Verifier application configurationwalletProviderId is not provided (i.e., walletProviderId is undefined)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.
See handleDeepLink for more details.
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.
Request options
The response as received from the holder as an instance of MobileCredentialResponse
Terminate the session explicitly, send status code sessionTerminated to the holder, and close data transport.
Update trusted issuer status lists.
It is recommended to call this function regularly before the UpdateTrustedIssuerStatusListsResult#nextUpdate date to keep the status list updated. This can reduce delays during the follow up call to sendProximityPresentationRequest. Network requests may be performed to check revocation status.
Update result as an instance of UpdateTrustedIssuerStatusListsResult.
Generated using TypeDoc
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.