keyvenant
Version:
Keyvenant is a JavaScript tool to generate and export CovenantSQL keys to facilitate key management locally and in web extensions.
27 lines (26 loc) • 955 B
TypeScript
/**
* create CovenantSQL keystore
* @param password master password user typed-in
* @param salt kdf salt
* @param addrVersion address version
* @param privateKeyVersion private key encode version
* @return keystore object
*/
export declare function createKeystore(password: string, salt: string, addrVersion: number, privateKeyVersion: number): object;
/**
* recover private key from keystore and password
* @param password
* @param keystore
* @return private key string in hex
*/
export declare function recoverFromKeystore(password: string, salt: string, keystore: any): string;
/**
* deconstruct base58 encoded string for CovenantSQL chain recover
* @param encrypted base58Encoded concated
* @return {
* privateKeyVersion 1 btye version
* iv generated iv
* ciphertext encrypted ciphertext
* }
*/
export declare function deconstructEncrypted(encrypted: string): object;