Browse Source

TODO: Cache the derived node for quick perf gain

master
Luke Childs 5 years ago
parent
commit
76348d8b05
  1. 1
      src/key-formats/xpub.js

1
src/key-formats/xpub.js

@ -3,6 +3,7 @@ const bitcoin = require('bitcoinjs-lib');
const generateXpubKey = ({attempts, xpub}) => {
const index = attempts - 1;
// TODO: Cache the derived node for quick perf gain
const node = bitcoin.bip32.fromBase58(xpub);
const {publicKey} = node.derive(index);

Loading…
Cancel
Save