2018-07-31 01:59:52 +03:00
|
|
|
import { Arrayish, Signature } from './bytes';
|
2018-07-24 02:21:42 +03:00
|
|
|
export declare class KeyPair {
|
|
|
|
readonly privateKey: string;
|
|
|
|
readonly publicKey: string;
|
|
|
|
readonly compressedPublicKey: string;
|
|
|
|
readonly publicKeyBytes: Uint8Array;
|
2018-09-06 23:41:02 +03:00
|
|
|
constructor(privateKey: Arrayish | string);
|
|
|
|
sign(digest: Arrayish | string): Signature;
|
|
|
|
computeSharedSecret(otherKey: Arrayish | string): string;
|
2018-07-24 02:21:42 +03:00
|
|
|
}
|
2018-09-06 23:41:02 +03:00
|
|
|
export declare function computePublicKey(key: Arrayish | string, compressed?: boolean): string;
|
|
|
|
export declare function computeAddress(key: Arrayish | string): string;
|
|
|
|
export declare function recoverPublicKey(digest: Arrayish | string, signature: Signature | string): string;
|
|
|
|
export declare function recoverAddress(digest: Arrayish | string, signature: Signature | string): string;
|
2018-07-24 02:21:42 +03:00
|
|
|
export declare function verifyMessage(message: Arrayish | string, signature: Signature | string): string;
|