fix bug:ECPair.verify should return boolean

fECPair.verify should return boolean, and js implements indeed return boolean.
This commit is contained in:
jolestar 2019-04-23 13:55:51 +08:00 committed by GitHub
parent a52ef82e4f
commit 67aa87e28d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

4
types/ecpair.d.ts vendored
View file

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