New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@bitsler/neo-address

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bitsler/neo-address

generate hd address and mnemonic that is compatible with neo-cli

latest
npmnpm
Version
1.0.4
Version published
Maintainers
2
Created
Source

neo-address

Generate hd address and mnemonic that is compatible with tronlink wallet

Installation

  • yarn add @bitsler/neo-address or npm install @bitsler/neo-address

Usage

  • Generate 24-word mnemonic. (WARNING: This wallet only stores the seed in-memory, restarting the application will also remove it from memory, make sure to backup!)
import Address from '@bitsler/neo-address';
const mnemonic = Address.generateMnemonic();
console.log(mnemonic);
// will show you the 24-word mnemonic seed
  • Initiating class(Mnemonic seed is required)
import Address from '@bitsler/neo-address';
const mnemonic = Address.generateMnemonic();
const address = new Address(mnemonic, 0);
// 2nd argument is optional and defaults to 0, this corresponds to the last index used to generate an address
  • Get the master address (NOTE: master address represents the index 0 of the derivation path);
console.log(address.master)
  • Get the master address full info (NOTE: Becareful when showing your mnemonic seed)
console.log(address.masterInfo)
  • Create new Address
console.log(address.createAddress())
  • Get Address by index
console.log(address.getAddress(1));
console.log(address.getAddress(0));
// using index 0 to getAddress is also the same as address.master
  • Get Address full info (NOTE: Becareful when showing your private key)
console.log(address.getAddressInfo(1))
  • Get the mnemonic seed (WARNING: Becareful when showing your mnemonic seed)
console.log(address.mnemonic)
// will return the mnemonic seed

NOTE

This module does not keep track of your addresses or your indices. The user must keep track or store the address indices and keys.

FAQs

Package last updated on 10 Sep 2020

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