How to use the @ethersproject/strings.UnicodeNormalizationForm.NFKD function in @ethersproject/strings

To help you get started, we’ve selected a few @ethersproject/strings examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ethers-io / ethers.js / packages / hdnode / lib.esm / index.js View on Github external
export function mnemonicToSeed(mnemonic, password) {
    if (!password) {
        password = "";
    }
    const salt = toUtf8Bytes("mnemonic" + password, UnicodeNormalizationForm.NFKD);
    return pbkdf2(toUtf8Bytes(mnemonic, UnicodeNormalizationForm.NFKD), salt, 2048, 64, "sha512");
}
export function mnemonicToEntropy(mnemonic, wordlist) {
github ethers-io / ethers.js / packages / hdnode / lib.esm / index.js View on Github external
export function mnemonicToSeed(mnemonic, password) {
    if (!password) {
        password = "";
    }
    const salt = toUtf8Bytes("mnemonic" + password, UnicodeNormalizationForm.NFKD);
    return pbkdf2(toUtf8Bytes(mnemonic, UnicodeNormalizationForm.NFKD), salt, 2048, 64, "sha512");
}
export function mnemonicToEntropy(mnemonic, wordlist) {
github ethers-io / ethers.js / packages / hdnode / src.ts / index.ts View on Github external
export function mnemonicToSeed(mnemonic: string, password?: string): string {
    if (!password) { password = ""; }

    const salt = toUtf8Bytes("mnemonic" + password, UnicodeNormalizationForm.NFKD);

    return pbkdf2(toUtf8Bytes(mnemonic, UnicodeNormalizationForm.NFKD), salt, 2048, 64, "sha512");
}
github ethers-io / ethers.js / packages / hdnode / src.ts / index.ts View on Github external
export function mnemonicToSeed(mnemonic: string, password?: string): string {
    if (!password) { password = ""; }

    const salt = toUtf8Bytes("mnemonic" + password, UnicodeNormalizationForm.NFKD);

    return pbkdf2(toUtf8Bytes(mnemonic, UnicodeNormalizationForm.NFKD), salt, 2048, 64, "sha512");
}