Bitcoinjs-lib: create addresses by mnemonic is very slowly

Created on 11 May 2018  ·  2Comments  ·  Source: bitcoinjs/bitcoinjs-lib

excuse me ,
i want to create address by mnemonic,
eg:
var root = bitcoin.HDNode.fromSeedHex('dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd')

var child1 = root.derivePath("m/44'/0'/0'/0/0")

assert.equal(child1.getAddress(), '12Tyvr1U8A3ped6zwMEU5M8cx3G38sP5Au')

like this ,when i  pass about 20 path,  it's become very slowly , it's spent time about 20 seconds , i want to konw why and  what should i do?  thanks a lot!
how to / question / docs

Most helpful comment

Thanks a lot !!! it's very helpful !! It saves about 2/3 of the time

All 2 comments

Have you tried:

var node = root.derivePath("m/44'/0'/0'/0")

for (var i = 0; i < 20; i++) {
   var child = node.derive(i)
   // do stuff
}

Thanks a lot !!! it's very helpful !! It saves about 2/3 of the time

Was this page helpful?
0 / 5 - 0 ratings

Related issues

panpan2 picture panpan2  ·  3Comments

zhaozhiming picture zhaozhiming  ·  3Comments

Beardcoding picture Beardcoding  ·  3Comments

hoshsadiq picture hoshsadiq  ·  3Comments

itsMikeLowrey picture itsMikeLowrey  ·  3Comments