diff --git a/src/lib/enr/keypair/secp256k1.ts b/src/lib/enr/keypair/secp256k1.ts index 8c6a83448e..0a960fbc35 100644 --- a/src/lib/enr/keypair/secp256k1.ts +++ b/src/lib/enr/keypair/secp256k1.ts @@ -2,11 +2,9 @@ import * as secp from "@noble/secp256k1"; import { compressPublicKey, randomBytes } from "../../crypto"; -import { IKeypair, IKeypairClass, KeypairType } from "./types"; +import { IKeypair, KeypairType } from "./types"; -export const Secp256k1Keypair: IKeypairClass = class Secp256k1Keypair - implements IKeypair -{ +export class Secp256k1Keypair implements IKeypair { readonly type: KeypairType; _privateKey?: Uint8Array; readonly _publicKey?: Uint8Array; @@ -77,4 +75,4 @@ export const Secp256k1Keypair: IKeypairClass = class Secp256k1Keypair hasPrivateKey(): boolean { return !!this._privateKey; } -}; +} diff --git a/src/lib/enr/keypair/types.ts b/src/lib/enr/keypair/types.ts index 00e0696981..4d84d030c1 100644 --- a/src/lib/enr/keypair/types.ts +++ b/src/lib/enr/keypair/types.ts @@ -13,8 +13,3 @@ export interface IKeypair { verify(msg: Uint8Array, sig: Uint8Array): boolean; hasPrivateKey(): boolean; } - -export interface IKeypairClass { - new (privateKey?: Uint8Array, publicKey?: Uint8Array): IKeypair; - generate(): Promise; -}