Version: 0.0.30.0.40.0.50.0.60.0.70.0.80.0.90.1.0-alpha10.1.00.1.10.1.20.1.3-alpha.10.1.30.2.0-alpha.00.2.0-alpha10.2.0-alpha20.2.0-alpha30.2.0-alpha40.2.0-alpha50.2.0-alpha60.2.00.2.1-alpha.00.2.1-alpha.10.2.1-alpha.20.2.1-alpha.30.2.1-alpha.40.2.1-alpha.51.0.0-dev.01.0.02.0.03.0.04.0.04.1.04.2.04.3.04.3.14.3.24.3.34.3.44.4.04.4.14.4.24.5.04.5.14.6.04.6.14.6.24.6.34.7.04.7.14.8.04.8.14.9.05.0.05.0.15.0.25.1.05.1.15.1.25.2.05.3.05.3.15.4.05.4.15.5.05.5.15.5.25.5.35.6.05.6.15.6.25.6.35.7.05.8.05.9.05.10.05.11.05.11.15.12.05.12.15.12.25.12.35.12.46.0.06.1.06.1.16.1.26.2.06.2.16.2.26.3.06.4.06.5.06.6.06.6.16.7.06.8.06.9.06.10.06.10.16.11.06.11.16.11.26.11.36.11.46.11.56.11.66.11.7-alpha.17.0.0-alpha.17.0.0-alpha.27.0.0-alpha.37.0.0-alpha.47.0.0-alpha.57.0.07.1.0-alpha.17.1.07.2.0-alpha.17.2.0-alpha.27.2.0-alpha.37.2.07.2.17.2.27.2.37.2.47.2.57.2.67.2.77.2.87.3.07.4.07.4.17.4.27.4.37.4.47.4.57.4.67.4.78.0.08.0.18.0.28.0.38.0.48.0.58.0.68.0.78.0.89.0.0-alpha.1
import type { Signer } from '../JWT.js'
import { hexToBytes } from '../util.js'
import { ES256KSigner } from './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: string): Signer {
return ES256KSigner(hexToBytes(hexPrivateKey))
}
export default EllipticSigner