address format is different from bitcoin core response from btcd
address format is different from bitcoin core response from btcd
For now, I'm generating WIF and address using golang btcutil package programmatically.
wif, err := btcutil.NewWIF(privateKey, conf, false) if err != nil { return nil, err } strPrivateKey := wif.String() // Address address, err := child.Address(conf) walletKeys[i] = WalletKey{WIF: strPrivateKey, Address: address.String(), EncodedAddress: address.EncodeAddress()}
After generating wif, I import this wif using bitcoin client importprivkey
err := b.client.ImportPrivKeyRescan(privKeyWIF, label, false)
And then, I make sure this private key is added into wallet using getaddressesbyaccount "label" command.
Somehow listed address and first generated address seems different.
I'd like to know why it's different.
Thanks in advance.
https://ift.tt/2PP0YOI
Comments
Post a Comment