UNPKG

did-jwt

Version:

Library for Signing and Verifying JWTs that use DIDs as issuers and JWEs that use DIDs as recipients

24 lines • 821 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const util_js_1 = require("../util.js"); const ES256KSigner_js_1 = require("./ES256KSigner.js"); /** * @deprecated Please use ES256KSigner * The EllipticSigner returns a configured function for signing data. * * @example * ```typescript * const signer = EllipticSigner(process.env.PRIVATE_KEY) * signer(data).then( (signature: string) => { * ... * }) * ``` * * @param {String} hexPrivateKey a hex encoded private key * @return {Function} a configured signer function */ function EllipticSigner(hexPrivateKey) { return (0, ES256KSigner_js_1.ES256KSigner)((0, util_js_1.hexToBytes)(hexPrivateKey)); } exports.default = EllipticSigner; //# sourceMappingURL=EllipticSigner.js.map