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;
|
publicKey?: Buffer;
|
||||||
toWIF(): string;
|
toWIF(): string;
|
||||||
sign(hash: Buffer): Buffer;
|
sign(hash: Buffer): Buffer;
|
||||||
verify(hash: Buffer, signature: Buffer): Buffer;
|
verify(hash: Buffer, signature: Buffer): boolean;
|
||||||
getPublicKey?(): Buffer;
|
getPublicKey?(): Buffer;
|
||||||
}
|
}
|
||||||
declare class ECPair implements ECPairInterface {
|
declare class ECPair implements ECPairInterface {
|
||||||
|
@ -25,7 +25,7 @@ declare class ECPair implements ECPairInterface {
|
||||||
readonly publicKey: Buffer | undefined;
|
readonly publicKey: Buffer | undefined;
|
||||||
toWIF(): string;
|
toWIF(): string;
|
||||||
sign(hash: Buffer): Buffer;
|
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 fromPrivateKey(buffer: Buffer, options?: ECPairOptions): ECPair;
|
||||||
declare function fromPublicKey(buffer: Buffer, options?: ECPairOptions): ECPair;
|
declare function fromPublicKey(buffer: Buffer, options?: ECPairOptions): ECPair;
|
||||||
|
|
Loading…
Reference in a new issue