Can't generate same addresses as bitcoincore using xprv from bitcoin-core

Can't generate same addresses as bitcoincore using xprv from bitcoin-core

First of all all addresses below are for testing purposes so I don't care about private keys.

So dumped wallet created by Bitcoin-qt v0.16.2:

extended private masterkey: xprv9s21ZrQH143K3mYiBBH7MwWV9VTkeB5q5sxEFGgvLbLqRZ3xPVAKvwyxSLVtTcL2tz665vdZnHLrMQPr6MWGKdDHYoncZmUNiUgtShGCmZE

From what I can understand from the rest of the dump the first receive address is: addr=3DhmoRSx2bjxyJm7A1Crs3bCPnVcEx51fE hdkeypath=m/0'/0'/0'

Now I am trying to generate same addess using bitcoinjs-lib but haven't had any success so far with it.

import { HDNode } from "bitcoinjs-lib";
const key = HDNode.fromBase58(
 "xprv9s21ZrQH143K3mYiBBH7MwWV9VTkeB5q5sxEFGgvLbLqRZ3xPVAKvwyxSLVtTcL2tz665vdZnHLrMQPr6MWGKdDHYoncZmUNiUgtShGCmZE"
);
console.log(key.derivePath("m/0'/0'/0'").getAddress()); // prints 1NoQERVA18v5WcFUbgvz22tDGigmAkqy4U

Now I get confused becuase I use same derive path but I get 2 different addresses and on top of that looks like address from dump is multisig? Is it becuase of multisig?

If so how should I generate wallet.dat that is not multisig and is HD.

https://ift.tt/2BX67l0

Comments

Popular posts from this blog

Bitcoin Core errors with database block

Bitfinex & Market Synergy To Offer Institutional Calibre Cryptocurrency Connectivity