Author

Topic: BTc Core- new wallet getting public address on CLI? (Read 119 times)

legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
tried dumpwallet but the text outputted is not showing it (hdkeypath=m/0'/0'/0')
I am looking for the address that starts with bc1
You might have dumped the wrong wallet, in CLI, you'll have to specifically load and indicate a wallet together with your commands.
Without loading other wallets, it will select the default wallet when using wallet commands.

Use this to load a wallet:
Code:
bitcoin-cli loadwallet "wallet_name/path"
Use this to issue commands for that wallet:
Code:
bitcoin-cli -rpcwallet="wallet_name"

Also, do you have any configurations in your bitcoin.conf file?
HCP
legendary
Activity: 2086
Merit: 4361
How would I get the Public address for the new wallet I created?
Bitcoin Core is an "HD" Wallet (hierarchal determinisic) wallet... it doesn't have "a" Public address... it has many public addresses (theoretically an unlimited number).

Do you specifically need the "first" address? or will any address do?

If you have used the getnewaddress command ONCE, it should return the first address from the keypool, which should be the address at hdkeypath=m/0'/0'/0' NOTE: if you use it again, it'll return the m/0'/0'/1' address, then m/0'/0'/2' etc

If you didn't explicitly provide a "label" when using the getnewaddress... you can get it to display by using getaddressbylabel command and passing an empty string:
Code:
getaddressbylabel ""

It should return something like:
Code:
{
  "bc1_your_address_here": {
    "purpose": "receive"
  }
}

Note... if you have generated multiple addresses, there is no guarantee that the getaddressbylabel command will return them "in order".



tried dumpwallet but the text outputted is not showing it (hdkeypath=m/0'/0'/0')
Did you search for the m/0'/0'/0' in the output text using dumpwallet... the address (and all 1000 keypool addresses) should be displayed in the dump file? Huh
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
"How would I get the Public address for the new wallet I created?"

I am looking for the address that starts with bc1
Is there a specific reason why you need to get the address of the first index?

If you've already called getnewaddress, try using listaddressgroupings.
newbie
Activity: 2
Merit: 0
"How would I get the Public address for the new wallet I created?"

I am looking for the address that starts with bc1
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
I think you meant passphrase?

How did you use dumpwallet *DIRECTORY* in that format? It will not output any text in the cli pertaining to the dump but will create a file in the defined directory. The following syntax works for me.

Code:
dumpwallet E:/Walletdat1.txt
newbie
Activity: 2
Merit: 0
How would I get the Public address for the new wallet I created?
tried dumpwallet but the text outputted is not showing it (hdkeypath=m/0'/0'/0')

opened it with the walletpassphrase  "seed words" 99999
prior.

thanks!
Jump to: