2018-07-23 19:21:42 -04:00
|
|
|
import { SigningKey } from './signing-key';
|
2018-09-24 16:07:14 -04:00
|
|
|
import { Arrayish } from './bytes';
|
2018-07-30 18:59:52 -04:00
|
|
|
export declare type ProgressCallback = (percent: number) => void;
|
|
|
|
export declare type EncryptOptions = {
|
|
|
|
iv?: Arrayish;
|
|
|
|
entropy?: Arrayish;
|
|
|
|
mnemonic?: string;
|
|
|
|
path?: string;
|
2020-02-16 16:34:49 -05:00
|
|
|
wordlist?: any;
|
2018-07-30 18:59:52 -04:00
|
|
|
client?: string;
|
|
|
|
salt?: Arrayish;
|
|
|
|
uuid?: string;
|
|
|
|
scrypt?: {
|
|
|
|
N?: number;
|
|
|
|
r?: number;
|
|
|
|
p?: number;
|
|
|
|
};
|
|
|
|
};
|
2018-07-23 19:21:42 -04: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>;
|