New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@demox-labs/aleo-hd-key

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@demox-labs/aleo-hd-key

BIP-0032 like derivation for Aleo

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Aleo HD Key

Seed Derivation for aleo

The goal of this library is to safely generate deterministic seeds for use with the Aleo SDK. Since BLS12_377 is not supported yet in BIP-32 or BIP-44, this attempts to ensure Aleo Keys are derived from a seed in a secure way.


SLIP-0010 - Specification

Installation

yarn add @demox-labs/aleo-sdk @demox-labs/aleo-hd-key

optionally, install Bip39: yarn add bip39

Usage

example:

import * as AleoSDK from '@demox-labs/aleo-sdk';
import { derivePath } from '@demox-labs/aleo-hd-key';
import * as Bip39 from 'bip39';

// Generate seed phrase using Bip39
const mnemonic = Bip39.generateMnemonic(128);
const hexSeed = Bip39.mnemonicToSeedSync(mnemonic).toString('hex');

// Generate new seed for account
const { childSeed, chainCode} = derivePath("m/0'/0'/0'", hexSeed);

// Convert to PrivateKey using Also SDK
const privateKey = AleoSDK.PrivateKey.from_seed_unchecked(childSeed);

Tests

yarn test

References

SLIP-0010

BIP-0032

BIP-0044

Keywords

FAQs

Package last updated on 31 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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