@animo-id/expo-digital-credentials-api
Version:
Expo wrapper around Android Digital Credentials API
21 lines • 810 B
JavaScript
import Module from './DigitalCredentialsApiModule';
import { getEncodedCredentialsBase64 } from './encodeCredentials';
import { ensureAndroid } from './util';
export async function registerCredentials(options) {
ensureAndroid();
const credentialBytesBase64 = getEncodedCredentialsBase64(options.credentials, { debug: options.debug });
await Module?.registerCredentials(credentialBytesBase64, options.matcher ?? 'cmwallet');
}
export function sendResponse(options) {
ensureAndroid();
Module?.sendResponse(options.response);
}
export function sendErrorResponse(options) {
ensureAndroid();
Module?.sendErrorResponse(options.errorMessage);
}
export function isGetCredentialActivity() {
ensureAndroid();
return Module?.isGetCredentialActivity();
}
//# sourceMappingURL=api.js.map