2

I set up bitcoind, and the complete blockchain is synced. I created a wallet, and I loaded the wallet.

How can I generate an address to deposit BTC to? I tried bitcoin-cli getnewaddress and I get this address bc1q4mglxdp28f693lw476fnmcesq25tmfkcsfqnpk, but at the Huobi exchange when I try to withdraw 0.001 BTC to that address as a test, I get the message "Invalid address."

What am I doing wrong? How can I create a valid BTC address on my loaded wallet to send BTC to?

1 Answer 1

2

Your bitcoin client is generating a P2WPKH (bech32 encoded) address, which is a newer address format which has some benefits compared to legacy formats. The address is valid, but for whatever reason, the exchange mentioned has not upgraded it's code to recognize and send to this address type yet.

The fix is easy: you just need to tell bitcoin-core to generate a legacy address. You can use the following command:

$ bitcoin-cli getnewaddress "(address_label)" "legacy"

You can substitute your own label in for the (address_label), this is just for local book-keeping purposes, it can also just be left blank if you'd like:

$ bitcoin-cli getnewaddress "" "legacy"

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.