UNPKG

@microsoft/useragent-sdk

Version:

SDK for building decentralized identity wallets and enterprise agents.

30 lines 1.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ const KeyTypeFactory_1 = require("../KeyTypeFactory"); const JsonWebKey_1 = require("../JsonWebKey"); /** * Represents an Elliptic Curve public key * @class * @extends PublicKey */ class EcPublicKey extends JsonWebKey_1.default { /** * Create instance of @class EcPublicKey */ constructor(key) { super(key); /** * Set the EC key type */ this.kty = KeyTypeFactory_1.KeyType.EC; this.crv = key.crv; this.x = key.x; this.y = key.y; } } exports.default = EcPublicKey; //# sourceMappingURL=EcPublicKey.js.map