Remove unused interface

This commit is contained in:
Franck Royer 2022-05-20 11:45:48 +10:00
parent 4cb8769271
commit 6ace11f18f
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
2 changed files with 3 additions and 10 deletions

View File

@ -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;
}
};
}

View File

@ -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<IKeypair>;
}