UNPKG

@microsoft/useragent-sdk

Version:

SDK for building decentralized identity wallets and enterprise agents.

23 lines 1.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const CryptoFactory_1 = require("./CryptoFactory"); const EllipticCryptoOperations_1 = require("./EllipticCryptoOperations"); /** * Utility class to handle all CryptoFactory dependency injection for the environment browser. * In the same way a developer can add new CryptoFactory classes that support a different device. */ class CryptoFactoryBrowser extends CryptoFactory_1.default { /** * Constructs a new CryptoRegistry * @param keyStore used to store private keys * @param crypto The suite to use for dependency injection */ constructor(keyStore, crypto) { super(keyStore, crypto); const operations = new EllipticCryptoOperations_1.default(keyStore, crypto); this.messageSigners['ES256K'] = operations; this.messageSigners['EdDSA'] = operations; } } exports.default = CryptoFactoryBrowser; //# sourceMappingURL=CryptoFactoryBrowser.js.map