2018-07-24 02:21:42 +03:00
|
|
|
import { SigningKey } from './signing-key';
|
2018-07-31 01:59:52 +03:00
|
|
|
import { Arrayish } from '../utils/bytes';
|
|
|
|
export declare type ProgressCallback = (percent: number) => void;
|
|
|
|
export declare type EncryptOptions = {
|
|
|
|
iv?: Arrayish;
|
|
|
|
entropy?: Arrayish;
|
|
|
|
mnemonic?: string;
|
|
|
|
path?: string;
|
|
|
|
client?: string;
|
|
|
|
salt?: Arrayish;
|
|
|
|
uuid?: string;
|
|
|
|
scrypt?: {
|
|
|
|
N?: number;
|
|
|
|
r?: number;
|
|
|
|
p?: number;
|
|
|
|
};
|
|
|
|
};
|
2018-07-24 02:21:42 +03:00
|
|
|
export declare function decryptCrowdsale(json: string, password: Arrayish | string): SigningKey;
|
|
|
|
export declare function decrypt(json: string, password: Arrayish, progressCallback?: ProgressCallback): Promise<SigningKey>;
|
|
|
|
export declare function encrypt(privateKey: Arrayish | SigningKey, password: Arrayish | string, options?: EncryptOptions, progressCallback?: ProgressCallback): Promise<string>;
|