UNPKG

@ideem/zsm-client-sdk

Version:

ZSM makes 2FA easy and invisible for everyone, all the time, using advanced cryptography like MPC to establish cryptographic proof of the origin of any transaction or login attempt, while eliminating opportunities for social engineering. ZSM has no relian

30 lines (25 loc) 1.15 kB
import eventCoordinator from './EventCoordinator.js'; import WebAuthnClientBase from './WebAuthnClientBase.js'; import WASMRustInterface from './WASMRustInterface.js'; eventCoordinator.update('WebAuthnClient'); class WebAuthnClient extends WebAuthnClientBase { /** * Constructs a WebAuthnClient object by extending the WebAuthnClientBase class. * @param {Object} config - The configuration for ZSM initialization. */ constructor(config) { super(config); eventCoordinator.update('WebAuthnClient', 'READY'); } /** * @name getZsmApi * @description Retrieves the ZSM API instance. * @param {Object} config The configuration object for ZSM initialization. * @returns {Promise<ZSMAPI>} Resolves with the initialized ZSM API. * @overrides {function} getZsmApi (ref: WebAuthnClientBase) * @memberOf WebAuthnClient */ getZsmApi = async (config) => WASMRustInterface(config); } // Export the WebAuthnClient class export default WebAuthnClient;