From 67aa87e28df35c414b0650d8a0b79998e58a64a7 Mon Sep 17 00:00:00 2001 From: jolestar Date: Tue, 23 Apr 2019 13:55:51 +0800 Subject: [PATCH] fix bug:ECPair.verify should return boolean fECPair.verify should return boolean, and js implements indeed return boolean. --- types/ecpair.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/ecpair.d.ts b/types/ecpair.d.ts index a5ae716..2cc2c27 100644 --- a/types/ecpair.d.ts +++ b/types/ecpair.d.ts @@ -12,7 +12,7 @@ export interface ECPairInterface { publicKey?: Buffer; toWIF(): string; sign(hash: Buffer): Buffer; - verify(hash: Buffer, signature: Buffer): Buffer; + verify(hash: Buffer, signature: Buffer): boolean; getPublicKey?(): Buffer; } declare class ECPair implements ECPairInterface { @@ -25,7 +25,7 @@ declare class ECPair implements ECPairInterface { readonly publicKey: Buffer | undefined; toWIF(): string; sign(hash: Buffer): Buffer; - verify(hash: Buffer, signature: Buffer): Buffer; + verify(hash: Buffer, signature: Buffer): boolean; } declare function fromPrivateKey(buffer: Buffer, options?: ECPairOptions): ECPair; declare function fromPublicKey(buffer: Buffer, options?: ECPairOptions): ECPair;