mirror of https://github.com/waku-org/js-waku.git
Remove unused interface
This commit is contained in:
parent
4cb8769271
commit
6ace11f18f
|
@ -2,11 +2,9 @@ import * as secp from "@noble/secp256k1";
|
||||||
|
|
||||||
import { compressPublicKey, randomBytes } from "../../crypto";
|
import { compressPublicKey, randomBytes } from "../../crypto";
|
||||||
|
|
||||||
import { IKeypair, IKeypairClass, KeypairType } from "./types";
|
import { IKeypair, KeypairType } from "./types";
|
||||||
|
|
||||||
export const Secp256k1Keypair: IKeypairClass = class Secp256k1Keypair
|
export class Secp256k1Keypair implements IKeypair {
|
||||||
implements IKeypair
|
|
||||||
{
|
|
||||||
readonly type: KeypairType;
|
readonly type: KeypairType;
|
||||||
_privateKey?: Uint8Array;
|
_privateKey?: Uint8Array;
|
||||||
readonly _publicKey?: Uint8Array;
|
readonly _publicKey?: Uint8Array;
|
||||||
|
@ -77,4 +75,4 @@ export const Secp256k1Keypair: IKeypairClass = class Secp256k1Keypair
|
||||||
hasPrivateKey(): boolean {
|
hasPrivateKey(): boolean {
|
||||||
return !!this._privateKey;
|
return !!this._privateKey;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
|
@ -13,8 +13,3 @@ export interface IKeypair {
|
||||||
verify(msg: Uint8Array, sig: Uint8Array): boolean;
|
verify(msg: Uint8Array, sig: Uint8Array): boolean;
|
||||||
hasPrivateKey(): boolean;
|
hasPrivateKey(): boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IKeypairClass {
|
|
||||||
new (privateKey?: Uint8Array, publicKey?: Uint8Array): IKeypair;
|
|
||||||
generate(): Promise<IKeypair>;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue