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

conseiljs-softsigner

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

conseiljs-softsigner - npm Package Compare versions

Comparing version 5.0.1-beta.3 to 5.0.1-beta.4

3

dist/KeyStoreUtils.d.ts
/// <reference types="node" />
import { KeyStore } from 'conseiljs';
export declare namespace KeyStoreUtils {
function generateMnemonic(strength?: number): Promise<string>;
function generateIdentity(strength?: number, password?: string, mnemonic?: string): Promise<KeyStore>;
function restoreIdentityFromSecretKey(secretKey: string): Promise<KeyStore>;
function restoreIdentityFromMnemonic(mnemonic: string, password: string, pkh?: string, derivationPath?: string): Promise<KeyStore>;
function restoreIdentityFromMnemonic(mnemonic: string, password?: string, pkh?: string, derivationPath?: string): Promise<KeyStore>;
function restoreIdentityFromFundraiser(mnemonic: string, email: string, password: string, pkh: string): Promise<KeyStore>;

@@ -8,0 +9,0 @@ function generateKeys(seed: Buffer): Promise<{

@@ -25,2 +25,8 @@ "use strict";

(function (KeyStoreUtils) {
function generateMnemonic(strength = 256) {
return __awaiter(this, void 0, void 0, function* () {
return bip39.generateMnemonic(strength);
});
}
KeyStoreUtils.generateMnemonic = generateMnemonic;
function generateIdentity(strength = 256, password = '', mnemonic) {

@@ -42,3 +48,3 @@ return __awaiter(this, void 0, void 0, function* () {

KeyStoreUtils.restoreIdentityFromSecretKey = restoreIdentityFromSecretKey;
function restoreIdentityFromMnemonic(mnemonic, password, pkh, derivationPath) {
function restoreIdentityFromMnemonic(mnemonic, password = '', pkh, derivationPath) {
return __awaiter(this, void 0, void 0, function* () {

@@ -51,3 +57,3 @@ if (![12, 15, 18, 21, 24].includes(mnemonic.split(' ').length)) {

}
const seed = (yield bip39.mnemonicToSeed(mnemonic, password)).slice(0, 32);
const seed = (yield bip39.mnemonicToSeed(mnemonic.split(' ').join(''), password)).slice(0, 32);
const keys = yield generateKeys(seed);

@@ -54,0 +60,0 @@ const secretKey = conseiljs_2.TezosMessageUtils.readKeyWithHint(keys.secretKey, 'edsk');

{
"name": "conseiljs-softsigner",
"version": "5.0.1-beta.3",
"version": "5.0.1-beta.4",
"description": "ConseilJS software signer plugin for ConseilJS-core. Supports the ED25519 curve via libsodium for tz1-address operations.",

@@ -5,0 +5,0 @@ "browser": "dist/index.js",

Sorry, the diff of this file is not supported yet

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