firstbt (OP)
Newbie
Offline
Activity: 29
Merit: 3
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 05, 2021, 03:59:46 PM |
|
Hello,
I am currently testing with Bitcoin Core Qt v.0.21.0
1. Is there any way I can see all my public addresses associated with my wallet? I quickly google...something came up..someone mentioned there is a command getaddress something with empty parameter that responds the list of public addresses that associated with my wallet..but it looks like this is no longer true in the latest version. Is there any command for that I can try to use the list of all my public addresses of my wallet?
2. I see there is a receiving addresses window showing all public addresses have been generated. However, I believe there could be more than what these are showing. Here is some interesting thing I noticed.....
I tested to send my bitcoin to myself....
Say here is my public bitcoin address generated, which is "abc"... I sent 0.001 bitcoin to "abc"..... What I noticed is that bitcoin detects the "abc" belongs to my self..so it generated new public address automatically(which I noticed in the payload, ..let's say ..this new public address "def")... .... the thing is that the "def" public address generated I wasn't able to find in the receiving addresses window...
So I guess the list of public addresses showing in the Receiving Addresses are something that you generated explicitly by yourself.
Thanks,
|
|
|
|
jackg
Copper Member
Legendary
Offline
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 05, 2021, 05:04:15 PM |
|
Everytime you send or receive funds, a new address will be generated by your wallet.
In the addresses tab you've found there should be a "new" button (or there used to be) so if you want more addresses you could use that too.
|
|
|
|
BitMaxz
Legendary
Offline
Activity: 3360
Merit: 3088
BTC price road to $80k
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 05, 2021, 05:37:33 PM |
|
~snip~
Say here is my public bitcoin address generated, which is "abc"... I sent 0.001 bitcoin to "abc"..... What I noticed is that bitcoin detects the "abc" belongs to my self..so it generated new public address automatically(which I noticed in the payload, ..let's say ..this new public address "def")... .... the thing is that the "def" public address generated I wasn't able to find in the receiving addresses window...
So I guess the list of public addresses showing in the Receiving Addresses are something that you generated explicitly by yourself.
Thanks,
If you can't find the newly generated one try to check the receive tab under "requested payments history" it should show something like this ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2Fu5eHbTU.png&t=665&c=WLgbdcEgShDugA) Now check if one is the address that you are looking for. If not you can use the console to check if the address that automatically generated is yours by using this command below. getaddressinfo yourbitcoinaddress Then check under ismine if it's true or not. If it's true then the generated address is yours.
|
|
|
|
firstbt (OP)
Newbie
Offline
Activity: 29
Merit: 3
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 05, 2021, 05:39:55 PM |
|
Everytime you send or receive funds, a new address will be generated by your wallet.
In the addresses tab you've found there should be a "new" button (or there used to be) so if you want more addresses you could use that too.
Yes..Right.. then "In the addresses tab", which one are you talking about? I guess you are talking about "Create new receiving address" button under receive tab. Yes. you can create new address and use this to receive. What I am asking is that I want to see ALL public addresses have been generated by my wallet. What is the rpc command for that? Maybe something like *getalladdressinfo* ..maybe..don't know..? ...then..it shows all public addresses that associated with your wallet....Is there anything like that?
|
|
|
|
hosseinimr93
Legendary
Offline
Activity: 2506
Merit: 5566
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 05, 2021, 06:09:03 PM |
|
Maybe something like *getalladdressinfo* ..maybe..don't know..? ...then..it shows all public addresses that associated with your wallet....Is there anything like that?
You can use the command below to get list of all your addresses with their balance. listreceivedbyaddress 0 true
|
|
|
|
BitMaxz
Legendary
Offline
Activity: 3360
Merit: 3088
BTC price road to $80k
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 05, 2021, 06:38:36 PM |
|
Maybe something like *getalladdressinfo* ..maybe..don't know..? ...then..it shows all public addresses that associated with your wallet....Is there anything like that?
Can you try this command "listwallets" if not try to use the command "help" But I think there is no command that could see all possible addresses in your wallet all address generated is random that's why it's recommended to always backup wallet.dat file or make a private key backup.
|
|
|
|
firstbt (OP)
Newbie
Offline
Activity: 29
Merit: 3
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 05, 2021, 06:56:13 PM |
|
Maybe something like *getalladdressinfo* ..maybe..don't know..? ...then..it shows all public addresses that associated with your wallet....Is there anything like that?
You can use the command below to get list of all your addresses with their balance. listreceivedbyaddress 0 true Thanks a lot. That looks like the command I was looking for .... I *guess* that a public addressed generated by *your wallet(system)* may be hidden because I *guess* that could confuse you more... Here is what I noticed. 1. *You* created new receiving address by clicking the button. Say this address is "ABC"...This "ABC" will be shown up in the "Receiving addresses" window. 2. You sent 0.1BT to that address "ABC" 3. In the transaction payload, I noticed that *new public address*(Say this address is "DEF") was created by the system ..and sent back the difference to this "DEF". 4. "DEF" address I wasn't able to find from that "Receiving addresses" window. I thought that since the "DEF" was also my public address generated by the system, that should be shown up in that window, but it wasn't. 5. I used listreceivedbyaddress... what I noticed is that... I still didn't see "DEF" address, but here is what I see... { "address" : "ABC" "amount" : blahblah.. .... "txids" :[ "c3123456...", "48056789...." ] } One of transactions in txids indicated that the "DEF" was associated in the output.... Well I thought that there should be listed something like below...........but it wasn't. { "address" : "DEF" ... .. } Well...my observation may be too much detail..maybe no one cares..but just would like to share for anyone may be interested for educational purpose............but be aware that I am extremely beginner so this may not be true totally ..:-) Since I really get tons of help from this site, hope this observation also could help someone...I guess like p2p network propagation so eventually reach someone that needs this info!..:-) BTW, I really appreciate all help you guys have given so far. Thanks,
|
|
|
|
firstbt (OP)
Newbie
Offline
Activity: 29
Merit: 3
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 05, 2021, 07:38:21 PM |
|
some additional questions came up.
1. would that even possible to send money to the same public address? Say my public address is ABC....then sent some coin to ABC...like I observed, the bitcoin created new public address in my wallet to send back the difference...to new one, not ABC...but somehow any way possibly to send to that ABC?
2. Here is my reasonable thinking(?).. the way bitcoin works this way is that..because it needs to keep track of UTXO.... so it *must* generate new public address to receive in that way it can easily figure out transparently whether it is spent or unspent.... Is that somehow principal of design..am I pretty much in the right track of thinking?
Thanks,
|
|
|
|
Upgrade00
Legendary
Offline
Activity: 2142
Merit: 2286
Playgram - The Telegram Casino
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 05, 2021, 07:48:34 PM |
|
1. would that even possible to send money to the same public address? Say my public address is ABC....then sent some coin to ABC...like I observed, the bitcoin created new public address in my wallet to send back the difference...to new one, not ABC...but somehow any way possibly to send to that ABC?
Yes. All public addresses of a single key are linked together by a master public and private key. So you can reuse same address even if a new one is suggested. Change address is only in place to improve privacy. 2. Here is my reasonable thinking(?).. the way bitcoin works this way is that..because it needs to keep track of UTXO.... so it *must* generate new public address to receive in that way it can easily figure out transparently whether it is spent or unspent.... Is that somehow principal of design..am I pretty much in the right track of thinking?
No, it must NOT generate new addresses to keep track of UTXOs. Multiple transactions to a single address are different outputs and would not be linked i.e, a single address can have multiple UTXOs.
|
|
|
|
▄▄███████▄▄███████ ▄███████████████▄▄▄▄▄ ▄████████████████████▀░ ▄█████████████████████▄░ ▄█████████▀▀████████████▄ ██████████████▀▀█████████ █████████████████████████ ██████████████▄▄█████████ ▀█████████▄▄████████████▀ ▀█████████████████████▀░ ▀████████████████████▄░ ▀███████████████▀▀▀▀▀ ▀▀███████▀▀███████ | ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ Playgram.io ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ | ▄▄▄░░ ▀▄ █ █ █ █ █ █ █ ▄▀ ▀▀▀░░
| │ | ▄▄▄███████▄▄▄ ▄▄███████████████▄▄ ▄███████████████████▄ ▄██████████████▀▀█████▄ ▄██████████▀▀███▄██▐████▄ ██████▀▀████▄▄▀▀█████████ ████▄▄███▄██▀█████▐██████ ██████████▀██████████████ ▀███████▌▐██▄████▐██████▀ ▀███████▄▄███▄████████▀ ▀███████████████████▀ ▀▀███████████████▀▀ ▀▀▀███████▀▀▀ | | │ | ██████▄▄███████▄▄████████ ███▄███████████████▄░░▀█▀ ███████████░█████████░░█ ░█████▀██▄▄░▄▄██▀█████░█ █████▄░▄███▄███▄░▄██████ ████████████████████████ ████████████████████████ ██░▄▄▄░██░▄▄▄░██░▄▄▄░███ ██░░░█░██░░░█░██░░░█░████ ██░░█░░██░░█░░██░░█░░████ ██▄▄▄▄▄██▄▄▄▄▄██▄▄▄▄▄████ ███████████████████████ ███████████████████████ | | │ | ► | |
|
|
|
firstbt (OP)
Newbie
Offline
Activity: 29
Merit: 3
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 05, 2021, 08:19:06 PM |
|
1. would that even possible to send money to the same public address? Say my public address is ABC....then sent some coin to ABC...like I observed, the bitcoin created new public address in my wallet to send back the difference...to new one, not ABC...but somehow any way possibly to send to that ABC?
Yes. All public addresses of a single key are linked together by a master public and private key. So you can reuse same address even if a new one is suggested. Change address is only in place to improve privacy. 2. Here is my reasonable thinking(?).. the way bitcoin works this way is that..because it needs to keep track of UTXO.... so it *must* generate new public address to receive in that way it can easily figure out transparently whether it is spent or unspent.... Is that somehow principal of design..am I pretty much in the right track of thinking?
No, it must NOT generate new addresses to keep track of UTXOs. Multiple transactions to a single address are different outputs and would not be linked i.e, a single address can have multiple UTXOs. Say my public address "ABC"...say I have 10 bitcoins..then sent to 2 bitcoins to "XYZ"...then XYZ will receive 2 bitcoins...then 8 bitcoins will send back to my new public address (generated by the system), say, this is "FFF", which is linked and governed by a master key. First of all, I am not sure how to override that "FFF" to "ABC" manually in that Bitcoin Core though... In the Send window, only inputs I see is Pay TO(which should be "XYZ", Label(this is optional), and Amount(2 bitcoins)...Maybe in order to override this, I would have to use JSONRPC command to send money then? "Multiple transactions to a single address are different outputs and would not be linked i.e, a single address can have multiple UTXOs." ... Could you possibly explain more easily with some examples so I could understand better? Thanks,
|
|
|
|
khaled0111
Legendary
Offline
Activity: 2632
Merit: 2978
Top Crypto Casino
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 05, 2021, 10:28:40 PM |
|
Say my public address "ABC"...say I have 10 bitcoins..then sent to 2 bitcoins to "XYZ"...then XYZ will receive 2 bitcoins...then 8 bitcoins will send back to my new public address (generated by the system), say, this is "FFF", which is linked and governed by a master key. The "FFF" is your change address. Your wallet will generate this change address automatically to receive the difference between the value of your UTXOs and the sent amount. I am not sure how to override that "FFF" to "ABC" manually in that Bitcoin Core though... In the Send window, only inputs I see is Pay TO(which should be "XYZ"
Not sure why you want to override it! When you send a payment to someone, you would want the change to be sent back to one of your addresses. However, you can specify which address should receive the change by adding it as a new recipient and send the difference to it.
|
|
|
|
firstbt (OP)
Newbie
Offline
Activity: 29
Merit: 3
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 05, 2021, 11:12:26 PM |
|
Correct, don't want to override it..probably don't need it at all.. however, just was curious whether that would be something possible or not. Yes, once I received the back the difference to the system generated address, I could send back the difference to my desired address again, in this case ABC. However, another transaction means another fees as well. So I just was thinking that if we could specify the public address where we r supposed to receive back to, at the time of when we send it somehow, we could avoid another fees possibly...
|
|
|
|
ranochigo
Legendary
Offline
Activity: 3038
Merit: 4418
Crypto Swap Exchange
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 06, 2021, 05:52:33 AM |
|
Correct, don't want to override it..probably don't need it at all.. however, just was curious whether that would be something possible or not. Yes, once I received the back the difference to the system generated address, I could send back the difference to my desired address again, in this case ABC. However, another transaction means another fees as well. So I just was thinking that if we could specify the public address where we r supposed to receive back to, at the time of when we send it somehow, we could avoid another fees possibly...
Yes. The UI provides a fairly easy way to do so as well. Ensure that you have Coin Control turned on in the settings. ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FltAEVFS.png&t=665&c=2rC-R3GnwoXn-w) After which, you should be able to see a box labelled Coin Control features. There's a checkbox to specify a custom change address and after which, you can specify your own change address. ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2Fn6FEDhJ.png&t=665&c=4snNJtwcdypNVA)
|
|
|
|
nc50lc
Legendary
Offline
Activity: 2520
Merit: 5967
Self-proclaimed Genius
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 06, 2021, 06:47:42 AM Last edit: March 07, 2021, 02:07:14 AM by nc50lc |
|
-snip- So I guess the list of public addresses showing in the Receiving Addresses are something that you generated explicitly by yourself.
Those are already pre-generated in the wallet file, 1000 receiving and 1000 change addresses. They are not randomly generated, all are based from your " hdseed". In the 'receive' tab, the first to be displayed is the first in the index, the next is the second, etc. etc. I *guess* that a public addressed generated by *your wallet(system)* may be hidden because I *guess* that could confuse you more...
If you really want to " see" them, you can use dumpwallet command ( doc), but that includes sensitive data like the hdseed, extended private masterkey and the addresses' private keys. So, only do this to a " for testing" wallet. In the data dump ( include a .txt extension if you want to open it directly with a txt editor), look for the derivation paths like hdkeypath=m/0'/0'/0'. The example should be the first address that displayed in the receive tab, hdkeypath=m/0'/0'/1' is the second and hdkeypath=m/0'/0'/2 3'is the third. The change addresses' hdkeypath starts with hdkeypath=m/0'/1'/0' then hdkeypath=m/0'/1'/1' for the second, etc. Lastly, the wallet will generate more keys to keep a 1000 unused keys per chain after you've used the first in the index.
|
|
|
|
firstbt (OP)
Newbie
Offline
Activity: 29
Merit: 3
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 06, 2021, 01:20:32 PM |
|
Awesome guys! Huge Thanks again!
|
|
|
|
firstbt (OP)
Newbie
Offline
Activity: 29
Merit: 3
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 10, 2021, 03:27:58 AM |
|
One additional question.
Under File Menu, there sign message...
So it asks the bitcoin address and message to sign message...
I understand that here segwit address cannot be used..
Let's say I entered the legacy bitcoin address...and then message...
Actually to sign message, private key is needed...so when the legacy public address is generated in my wallet, it keeps track of the private key and public key...technically, we can't know the private key from the public key, but in the wallet, when they generate public key, internally, they keep track of pair of private key and public key...so...when they entered the legacy public address when signing message, then from the wallet behind, it looks up to find out the private key from the public key to sign the message...is my understanding correct? So they actually used the private key that is found from lookup table inside wallet data structure...Correct?
Then...that message will be verified with the public key..then..
Thanks,
|
|
|
|
ranochigo
Legendary
Offline
Activity: 3038
Merit: 4418
Crypto Swap Exchange
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 10, 2021, 03:49:35 AM |
|
Let's say I entered the legacy bitcoin address...and then message...
Actually to sign message, private key is needed...so when the legacy public address is generated in my wallet, it keeps track of the private key and public key...technically, we can't know the private key from the public key, but in the wallet, when they generate public key, internally, they keep track of pair of private key and public key...so...when they entered the legacy public address when signing message, then from the wallet behind, it looks up to find out the private key from the public key to sign the message...is my understanding correct? So they actually used the private key that is found from lookup table inside wallet data structure...Correct?
Then...that message will be verified with the public key..then..
You enter the Bitcoin address so it should lookup your private key from your address. The message is actually verified against your Bitcoin address as that is one of the three elements given to the person verifying it. Due to the unique characteristic of ECDSA, it is possible to derive the possible ECDSA public key from the signature itself. It is converted into the corresponding Bitcoin addresses during verification and then verified against the address given by the other party.
|
|
|
|
firstbt (OP)
Newbie
Offline
Activity: 29
Merit: 3
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 10, 2021, 03:59:14 AM |
|
Let's say I entered the legacy bitcoin address...and then message...
Actually to sign message, private key is needed...so when the legacy public address is generated in my wallet, it keeps track of the private key and public key...technically, we can't know the private key from the public key, but in the wallet, when they generate public key, internally, they keep track of pair of private key and public key...so...when they entered the legacy public address when signing message, then from the wallet behind, it looks up to find out the private key from the public key to sign the message...is my understanding correct? So they actually used the private key that is found from lookup table inside wallet data structure...Correct?
Then...that message will be verified with the public key..then..
You enter the Bitcoin address so it should lookup your private key from your address. The message is actually verified against your Bitcoin address as that is one of the three elements given to the person verifying it. Due to the unique characteristic of ECDSA, it is possible to derive the possible ECDSA public key from the signature itself. It is converted into the corresponding Bitcoin addresses during verification and then verified against the address given by the other party. "You enter the Bitcoin address so it should lookup your private key from your address. " So this is basically what I was saying. You can't get private key from public key...however, in wallet, it keeps track of pair of private/public..so it can simply look up the private from the public then...basically.
|
|
|
|
firstbt (OP)
Newbie
Offline
Activity: 29
Merit: 3
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 10, 2021, 04:02:13 PM |
|
> getaddressinfo mBlahblhbblh(this is my bitcoin address, which is base58 encoded) it returns pub key ...this was compressed one... in order to know the uncompressed one as well, do I need do it programmatically by my own or any way I can do this as well in the console?
|
|
|
|
ranochigo
Legendary
Offline
Activity: 3038
Merit: 4418
Crypto Swap Exchange
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 11, 2021, 06:21:05 AM |
|
> getaddressinfo mBlahblhbblh(this is my bitcoin address, which is base58 encoded) it returns pub key ...this was compressed one... in order to know the uncompressed one as well, do I need do it programmatically by my own or any way I can do this as well in the console?
You'll have to do it yourself outside of the console. Bitcoin Core only displays the public key that corresponds to the address. There's no need for Bitcoin Core to display different versions of the address as it won't serve much purpose other than causing more confusion. It's not too difficult to do so.
|
|
|
|
|