How to use the @ethersproject/sha2.SupportedAlgorithms function in @ethersproject/sha2

To help you get started, we’ve selected a few @ethersproject/sha2 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.serializeTransaction = transactions_1.serialize;
var units_1 = require("@ethersproject/units");
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 / hdnode / lib / index.js View on Github external
HDNode._fromSeed = function (seed, mnemonic) {
        var seedArray = bytes_1.arrayify(seed);
        if (seedArray.length < 16 || seedArray.length > 64) {
            throw new Error("invalid seed");
        }
        var I = bytes_1.arrayify(sha2_1.computeHmac(sha2_1.SupportedAlgorithms.sha512, MasterSecret, seedArray));
        return new HDNode(_constructorGuard, bytes32(I.slice(0, 32)), null, "0x00000000", bytes32(I.slice(32)), 0, 0, mnemonic, "m");
    };
    HDNode.fromMnemonic = function (mnemonic, password, wordlist) {

@ethersproject/sha2

The SHA2 family hash functions and HMAC functions for ethers.

MIT
Latest version published 2 years ago

Package Health Score

65 / 100
Full package analysis