Merge pull request from bitcoinjs/lowR

Add low R value signing as option to ECPair.sign
This commit is contained in:
Jonathan Underwood 2019-05-21 15:40:35 +09:00 committed by GitHub
commit 39bd08002b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 1174 additions and 1147 deletions

4
types/ecpair.d.ts vendored
View file

@ -11,7 +11,7 @@ export interface ECPairInterface {
publicKey: Buffer;
privateKey?: Buffer;
toWIF(): string;
sign(hash: Buffer): Buffer;
sign(hash: Buffer, lowR?: boolean): Buffer;
verify(hash: Buffer, signature: Buffer): boolean;
getPublicKey?(): Buffer;
}
@ -24,7 +24,7 @@ declare class ECPair implements ECPairInterface {
readonly privateKey: Buffer | undefined;
readonly publicKey: Buffer;
toWIF(): string;
sign(hash: Buffer): Buffer;
sign(hash: Buffer, lowR?: boolean): Buffer;
verify(hash: Buffer, signature: Buffer): boolean;
}
declare function fromPrivateKey(buffer: Buffer, options?: ECPairOptions): ECPair;