UNPKG

@microsoft/useragent-sdk

Version:

SDK for building decentralized identity wallets and enterprise agents.

28 lines 1.42 kB
"use strict"; /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ Object.defineProperty(exports, "__esModule", { value: true }); const CryptoFactory_1 = require("./CryptoFactory"); const useragent_plugin_secp256k1_1 = require("@microsoft/useragent-plugin-secp256k1"); /** * Utility class to handle all CryptoFactory dependency injection for the environment node. * In the same way a developer can add new CryptoFactory classes that support a different device. */ class CryptoFactoryNode extends CryptoFactory_1.default { /** * Constructs a new CryptoRegistry * @param keyStore used to store private jeys * @param crypto The suite to use for dependency injection */ constructor(keyStore, crypto) { super(keyStore, crypto); const operations = new useragent_plugin_secp256k1_1.SubtleCryptoElliptic(crypto); this.messageSigners['EdDSA'] = operations; this.messageSigners['EDDSA'] = operations; this.messageSigners['ed25519'] = operations; } } exports.default = CryptoFactoryNode; //# sourceMappingURL=CryptoFactoryNode.js.map