Browse Source
fix bug:ECPair.verify should return boolean
fECPair.verify should return boolean, and js implements indeed return boolean.
bumpver
jolestar
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
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; |
|
|
|