Bitcoin Forum

Other => Beginners & Help => Topic started by: hussong first on April 05, 2024, 12:49:05 AM



Title: Where are bitcoin core receiving addresses?
Post by: hussong first on April 05, 2024, 12:49:05 AM
Long experience with linux and 3 years with various cheaper coins.  I set up a separate machine where I run bitcoin core.  No problem compiling it or installing it.  Currently using 26.1, but I have tried 25.0 and 26.0.  I want to transfer some bitcoin into my new wallet.  Where do I get a receiving address so I can send myself some bitcoin to test my wallet?


Title: Re: Where are bitcoin core receiving addresses?
Post by: hd49728 on April 05, 2024, 02:24:39 AM
Did you try with Console?

Type
Code:
Getnewaddress

https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/03_3_Setting_Up_Your_Wallet.md#create-an-address


Title: Re: Where are bitcoin core receiving addresses?
Post by: nc50lc on April 05, 2024, 05:09:05 AM
I set up a separate machine where I run bitcoin core.  No problem compiling it or installing it.  Currently using 26.1, but I have tried 25.0 and 26.0.  I want to transfer some bitcoin into my new wallet.  Where do I get a receiving address -snip-
Are you using "bitcoind" in the command line or "bitcoin-qt" (with GUI)?
Have you created a new wallet yet?
New Bitcoin Core versions aren't configured to create a new wallet automatically.

If none, start with createwallet command with "bitcoin-cli" (use: bitcoin-cli help createwallet for examples).
Then you can now use the command in the first reply like this: bitcoin-cli getnewaddress

Or if you're using bitcoin-qt: Create a new wallet in "File->Create Wallet...", then you can now use the 'Receive' tab.


Title: Re: Where are bitcoin core receiving addresses?
Post by: promise444c5 on April 06, 2024, 12:25:10 AM
Long experience with linux and 3 years with various cheaper coins.  I set up a separate machine where I run bitcoin core.  No problem compiling it or installing it.  Currently using 26.1, but I have tried 25.0 and 26.0.  I want to transfer some bitcoin into my new wallet.  Where do I get a receiving address so I can send myself some bitcoin to test my wallet?

In addition, if you use the bitcoind with the bitcoin-cli
The bitcoin-cli getnewaddress will always generate a bitcoinLegacy address [pay-to-pubkey-hash(P2PKH)]by default,if you need to use a segwit type [bech32 or p2sh-segwit]
You need to add addresstype in your bitcoin.conf
Code:
#addresstype= < your preferred: bech32 or p2sh-segwit>
#Like this
#E.g
addresstype=bech32
Now  bitcoin-cli getnewaddress will always return a  bech32 address  type
You can edit this to your preferred as many times as you want  but note by default it will always return a Legacy address

For the bitcoin-qt
If you have an existing  wallet with a backed up wallet.dat
Go to file->Restore->select your wallet.dat from it directory
If not then you can just create one just as  it's been mentioned above by @nc50lc

Then you can create a request which gives you a new address from Receive ,for example  like this:
https://www.talkimg.com/images/2024/04/06/V5e4J.png

The label and message part is optional*
You can choose to make request in [BTC,mBTC,ųBTC(bits),Satoshi(stas)
You can select the kind of address you want [Legacy, Segwit]
click on Create new receiving address after filling , you should see your new address

If you are willing to test then you could use the testnet  mode ,testing with testnet coins, that way you won't  be using your real coin....

Tip: you can also use the getnewaddress directly on your  GUI console


Title: Re: Where are bitcoin core receiving addresses?
Post by: nc50lc on April 06, 2024, 03:38:13 AM
In addition, if you use the bitcoind with the bitcoin-cli
The bitcoin-cli getnewaddress will always generate a bitcoinLegacy address [pay-to-pubkey-hash(P2PKH)]by default,if you need to use a segwit type [bech32 or p2sh-segwit]
I'm pretty sure after v0.20.0, it'll default to "bech32" if addresstype isn't set as an option or the -address_type isn't specified with the command.
In the GUI, it is the default since v0.19.0.1.

That's considering that the wallet has an active ranged wpkh descriptor or an HD legacy wallet.

As for using the console in the GUI, it think it's silly since a more convenient method is readily available in the 'Receive' tab ;D