1

I want to test the functionality of wallet recovery via private key import on the testnet. Preferably thru an online service.

I only want to test the functionality so that I can verify that it's basically working since I'm working on some Python code that I want to use on the mainnet later.

So for that, I don't want to download the whole blockchain but instead, want to verify that my private key is generated correctly and I can access the funds that way. But I can't find any possibility to do that on testnet...

EDIT: I did not use mainnet for anything yet. I'm exclusively used testnet to create the wallet and get some coins and want to verify on testnet the wallet recovery thru private key

2 Answers 2

0

Testnet uses a different address format than mainnet, you can not view or verifying anything about the mainnet on testnet, they are separate.

You can test your method from the origin by using testnet funds instead.

Alternatively, you can test on mainnet with a small amount of funds to confirm your recovery method is working the same as it did on testnet (which it should).

4
  • 1
    Why do you think that i want to view / verify something from the mainnet on testnet? I created a wallet on testnet out of some Python code and want to recover that wallet on testnet from the private key i got while creating the wallet. If that works, i will use mainnet. I fail to see why i should test my implementation on mainnet with a small amount of BTC if there is explicitly testnet for such things
    – Endogen
    Commented Jun 19, 2018 at 18:47
  • Please see additional comment in the question.
    – Willtech
    Commented Jun 19, 2018 at 21:49
  • Endogen, you will need to provide more details on what you mean by recover a wallet with a private key. A private key is only a private key to a single bitcoin address, not a wallet. A wallet holds many private keys. Are you referring to your recovery words or an extended private key? Additionally I'm not sure why you are set on using an online service for your implementation, private keys should never be shared. You can recreate most wallet features through available libraries on your own, there's no need to use an online service for wallet recovery.
    – m1xolyd1an
    Commented Jun 20, 2018 at 4:17
  • Thanks for the comment. 1) I would want to use the private key for an address 2) Online Service: Because for testnet, i find it convinient. Just want to verify that the key can recover the address, i don't want to download the chain. I want to verify just this one time that it works, never again. No need for privacy here 3) Recreating with libs: ok but how to be sure that i recovered the address correctly? Thus i wanted to hopefully see the correct balance for that address - doesn't work without downloading the chain?
    – Endogen
    Commented Jun 20, 2018 at 18:58
0

You can code some function as fund transfer, from which library you're using in python you have to sign the transaction through private key, create two testnet addresses and transfer some funds by using a faucet like testnet-faucet

to one of them, then code a function for transferring funds to another address, this method should return a raw transaction hex, if you able to generate transaction hex then you can confirm that your private key recovery functionality works

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