Closed Hammad-Mubeen closed 3 years ago
I have code for generating addresses from the master public key of an electrum wallet, it generates addresses but not their private keys electrum says watch-only wallet
A master public key is called as such because it can be publically shared without loss of security. It only allows watching addresses, not spending from them.
how can I achieve spending on the addresses generated from the master public key
You need the corresponding private keys.
I need to check faucet spending on those addresses for that I need the addresses private key?
By "check spending" do you mean watching the addresses? In that case a watch-only wallet should suffice.
A master public key is called as such because it can be publically shared without loss of security. It only allows watching addresses, not spending from them.
So, I cannot spend them
You need the corresponding private keys.
Can I somehow have those private keys for the addresses generated from master public key? or it can not be achieved as you mentioned above.
By "check spending" do you mean watching the addresses? In that case a watch-only wallet should suffice.
No, by faucet spending i mean, I need to receive faucets on those addresses (which I am successful to do so) in a watch only wallet but can not spend them because it a watch only wallet. For spending i need private keys of those addresses, can I somehow have the private keys of the addresses generated from the master public key? or it can not be achieved as you mentioned above.
"I have received funds on an address generated by xpub key generated using electrum wallet" how do i spend those funds"
How did you create the master public key (xpub)? If you generated it, presumably at one point you did have the corresponding private keys.
no electrum generated it by itself, i have just retrieved it from the wallet to use it.
How did you create the wallet?
i have created a standard electrum wallet, it gives me the master public key ....using that i am generating addresses from node backend then sends faucat to that address ...have import address into a wallet (watch only wallet) to see faucets have come or not(they are coming)...now i want to spend those faucats (want to transfer it to someone). I know i need private key to spend but how i can have the private key?
i have created a standard electrum wallet, it gives me the master public key
No it does not. It first gives you seed words. You are supposed to write those down on paper. Only after that can you obtain the master public key.
You should restore from seed words.
My Problem:
I have code for generating addresses from the master public key of an electrum wallet, it generates addresses but not their private keys, I need to check faucet spending on those addresses for that I need the addresses private key?...because when I import a wallet by these addresses electrum says watch-only wallet, (i need to import wallet from private keys which I don't have ) if I am wrong how can I achieve spending on the addresses generated from the master public key of an electrum wallet.
My code: