How to use the @ethersproject/strings.UnicodeNormalizationForm 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 / ethers / utils.js View on Github external
exports.commify = units_1.commify;
exports.formatEther = units_1.formatEther;
exports.parseEther = units_1.parseEther;
exports.formatUnits = units_1.formatUnits;
exports.parseUnits = units_1.parseUnits;
var wallet_1 = require("@ethersproject/wallet");
exports.verifyMessage = wallet_1.verifyMessage;
var web_1 = require("@ethersproject/web");
exports.fetchJson = web_1.fetchJson;
exports.poll = web_1.poll;
////////////////////////
// Enums
var sha2_2 = require("@ethersproject/sha2");
exports.SupportedAlgorithms = sha2_2.SupportedAlgorithms;
var strings_2 = require("@ethersproject/strings");
exports.UnicodeNormalizationForm = strings_2.UnicodeNormalizationForm;
github ethers-io / ethers.js / packages / json-wallets / lib / utils.js View on Github external
function getPassword(password) {
    if (typeof (password) === 'string') {
        return strings_1.toUtf8Bytes(password, strings_1.UnicodeNormalizationForm.NFKC);
    }
    return bytes_1.arrayify(password);
}
exports.getPassword = getPassword;
github ethers-io / ethers.js / packages / hdnode / lib / index.js View on Github external
function mnemonicToSeed(mnemonic, password) {
    if (!password) {
        password = "";
    }
    var salt = strings_1.toUtf8Bytes("mnemonic" + password, strings_1.UnicodeNormalizationForm.NFKD);
    return pbkdf2_1.pbkdf2(strings_1.toUtf8Bytes(mnemonic, strings_1.UnicodeNormalizationForm.NFKD), salt, 2048, 64, "sha512");
}
exports.mnemonicToSeed = mnemonicToSeed;
github ethers-io / ethers.js / packages / hdnode / lib / index.js View on Github external
function mnemonicToSeed(mnemonic, password) {
    if (!password) {
        password = "";
    }
    var salt = strings_1.toUtf8Bytes("mnemonic" + password, strings_1.UnicodeNormalizationForm.NFKD);
    return pbkdf2_1.pbkdf2(strings_1.toUtf8Bytes(mnemonic, strings_1.UnicodeNormalizationForm.NFKD), salt, 2048, 64, "sha512");
}
exports.mnemonicToSeed = mnemonicToSeed;