/** * WARNING! * This file should NOT be modified unless you know what you're doing. * All public functions are exposed via hedgehog.js and walletManager.js */ /// import { Buffer as BufferSafe } from "safe-buffer"; export declare class Authentication { /** * Given an entropy string and a HD wallet path, return the wallet address * @param entropy Hex string generated by generateMnemonicAndEntropy() * Looks like `47b0e5e107cccc3297d88647c6e84a9f` * @param path Path for hierarchical deterministic wallet * Looks like `m/44'/60'/0'/0/0` * @returns ethereumjs-wallet wallet object */ static generateWalletFromEntropy(entropy: string, path: string): Promise; /** * Creates a random mnemonic and creates an entropy string from the mnemonic * @returns `{mnemonic: '...mnemonic string...', entropy: '47b0e5e107cccc3297d88647c6e84a9f'}` */ static generateMnemonicAndEntropy(): { mnemonic: string; entropy: string; }; /** * Generate a 16 byte initialization vector and returns it as both a hex string and a buffer */ static createIV(): { ivHex: string; ivBuffer: Buffer; }; /** * Given a iv buffer and key buffer, generate a ciphertext * @param entropy Hex string of entropy * @param ivBuffer Buffer version of iv * @param keyBuffer Buffer version of key */ static encrypt(entropy: string, ivBuffer: Buffer, keyBuffer: Uint8Array): { cipherText: BufferSafe; cipherTextHex: string; }; /** * Given an iv buffer, key buffer and ciphertext, decrypt the plaintext value of the entropy * @param ivBuffer Buffer version of iv * @param keyBuffer Buffer version of key * @param cipherTextHex Hex string of the ciphertext * @returns Hex string of the entropy. If everything is correct, this should be the same * as the input entropy, allowing us to check that the generated wallet address * is the same as the current wallet address for the user */ static decrypt(ivBuffer: Uint8Array, keyBuffer: Uint8Array, cipherTextHex: string): string; }