fix bug:ECPair.verify should return boolean
fECPair.verify should return boolean, and js implements indeed return boolean.
This commit is contained in:
parent
a52ef82e4f
commit
67aa87e28d
1 changed files with 2 additions and 2 deletions
4
types/ecpair.d.ts
vendored
4
types/ecpair.d.ts
vendored
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue