* Add the possibility to generate legacy seeds and mnemonics
* Add the possibility to import legacy mnemonic phrases
* Stop throwing errors if given an upper case hex as input
* Return mnemonic also when creating wallet with a legacy seed
* npm audit fix
* Small refactoring
Toolkit for Nano cryptocurrency client side offline implementations allowing you to build web- and mobile applications using Nano without compromising the user's keys by sending them out of their own device.
-The toolkit supports creating and importing wallets and signing blocks on-device. Meaning that the user's keys should never be required to leave the device.
+The toolkit supports creating and importing wallets and signing blocks on-device. Meaning that the user's keys should never be required to leave the device. And much more!
## Features
* Generate wallets with a BIP32 mnemonic phrase
-* BIP39/44 private key derivation
-* Mnemonic is compatible with the Ledger Nano implementation
+* Generate wallets with legacy Nano mnemonic phrases
+* BIP32/44 private key derivation
+* BIP39 Mnemonic is the same one which Ledger uses in their hardware wallets
* Import wallets with a mnemonic phrase or a seed
* Import wallets with the legacy Nano hex seed
* Sign send, receive and change representative blocks with a private key
@@ -44,9+45,16 @@ import { wallet } from 'nanocurrency-web'
// Notice, that losing the password will make the mnemonic phrase void
+ it('should successfully create a new legacy wallet and get the same result from importing one from the mnemonic', () => {
+ const result = wallet.generateLegacy('BE3E51EE51BAB11950B2495013512FEB110D9898B4137DA268709621CE2862F4')
+ expect(result).to.have.own.property('mnemonic')
+ expect(result).to.have.own.property('seed')
+ expect(result).to.have.own.property('accounts')
+ expect(result.mnemonic).to.equal('sail verb knee pet prison million drift empty exotic once episode stomach awkward slush glare list laundry battle bring clump brother before mesh pair')