Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

thor-devkit

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thor-devkit - npm Package Compare versions

Comparing version 0.5.2 to 0.5.3

14

dist/cry/mnemonic.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const crypto_1 = require("crypto");
const bip39_1 = require("bip39");
const hdkey_1 = require("hdkey");
const BIP39 = require("bip39");
const HDKey = require('hdkey');
var mnemonic;

@@ -12,3 +12,3 @@ (function (mnemonic) {

function generate() {
return bip39_1.default.generateMnemonic(128, crypto_1.randomBytes).split(' ');
return BIP39.generateMnemonic(128, crypto_1.randomBytes).split(' ');
}

@@ -21,3 +21,3 @@ mnemonic.generate = generate;

function validate(words) {
return bip39_1.default.validateMnemonic(words.join(' '));
return BIP39.validateMnemonic(words.join(' '));
}

@@ -30,4 +30,4 @@ mnemonic.validate = validate;

function derivePrivateKey(words) {
const seed = bip39_1.default.mnemonicToSeed(words.join(' '));
const hdKey = hdkey_1.default.fromMasterSeed(seed);
const seed = BIP39.mnemonicToSeed(words.join(' '));
const hdKey = HDKey.fromMasterSeed(seed);
return hdKey.derive(VET_DERIVATION_PATH + '/0').privateKey;

@@ -37,2 +37,2 @@ }

})(mnemonic = exports.mnemonic || (exports.mnemonic = {}));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW5lbW9uaWMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY3J5L21uZW1vbmljLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsbUNBQW9DO0FBRXBDLGlDQUF5QjtBQUN6QixpQ0FBeUI7QUFFekIsSUFBaUIsUUFBUSxDQTBCeEI7QUExQkQsV0FBaUIsUUFBUTtJQUNyQixvRUFBb0U7SUFDcEUsTUFBT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FRDs7O09BR0c7SUFDSCwwQkFBaUMsS0FBZTtRQUM1QyxNQUFNLElBQUksR0FBRyxLQUFLLENBQUMsY0FBYyxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQTtRQUNsRCxNQUFNLEtBQUssR0FBRyxLQUFLLENBQUMsY0FBYyxDQUFDLElBQUksQ0FBQyxDQUFBO1FBQ3hDLE9BQU8sS0FBSyxDQUFDLE1BQU0sQ0FBQyxtQkFBbUIsR0FBRyxJQUFJLENBQUMsQ0FBQyxVQUFVLENBQUE7SUFDOUQsQ0FBQztJQUplLHlCQUFnQixtQkFJL0IsQ0FBQTtBQUNMLENBQUMsRUExQmdCLFFBQVEsS0FBUixRQUFRLFFBMEJ4QiJ9
{
"name": "thor-devkit",
"version": "0.5.2",
"version": "0.5.3",
"description": "Typescript library to aid DApp development on VeChain Thor",

@@ -62,3 +62,2 @@ "main": "dist/index.js",

"@types/chai": "^4.1.3",
"@types/hdkey": "^0.7.0",
"@types/mocha": "^5.2.1",

@@ -65,0 +64,0 @@ "@types/node": "^10.5.2",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc