Fix publicKey type on ECPairInterface

This commit is contained in:
junderw 2019-05-16 16:29:23 +09:00
parent ea4fd58e87
commit 1c75c02038
No known key found for this signature in database
GPG key ID: B256185D3A971908
2 changed files with 8 additions and 7 deletions

4
types/ecpair.d.ts vendored
View file

@ -8,8 +8,8 @@ interface ECPairOptions {
export interface ECPairInterface {
compressed: boolean;
network: Network;
publicKey: Buffer;
privateKey?: Buffer;
publicKey?: Buffer;
toWIF(): string;
sign(hash: Buffer): Buffer;
verify(hash: Buffer, signature: Buffer): boolean;
@ -22,7 +22,7 @@ declare class ECPair implements ECPairInterface {
network: Network;
constructor(__D?: Buffer | undefined, __Q?: Buffer | undefined, options?: ECPairOptions);
readonly privateKey: Buffer | undefined;
readonly publicKey: Buffer | undefined;
readonly publicKey: Buffer;
toWIF(): string;
sign(hash: Buffer): Buffer;
verify(hash: Buffer, signature: Buffer): boolean;