Export private keys from wallet

Is it possible export the private key corresponding to one of the addresses displayed for my wallet in Bitsquare? I assume that I could in theory generate the keys from the backup seed, but that seems like a very complex solution to something that should be easy.

I understand that this is something that needs to be handled carefully and is not a feature suitable for every user, but it is handy for people who know what they are doing. (In my particular case, I would like to fund the wallet using Joinmarket’s “patient-send” functionality. This currently requires knowledge of the recipient private key due to a protocol restriction in Joinmarket, but since the key is mine, it “should” still be possible to do.)

Bitsquare use a HDWallet. I could add such a feature but as you said that should be not accessible in the main screen to avoid that users are doing something weird. Maybe I will add it as a small wallet tool where u can get out a priv key when u enter the address.

1 Like

I agree - such a tool would definitely be very useful for my case, without hurting simplicity of the general UI and without putting users at risk of accidentally doing something bad to their keys. I might even try to build something like this myself (no need to waste your time), just wanted to make sure there’s not already a way that I’m missing.

BTW, is wallet handling with BitcoinJ sufficiently “standard” that such a tool could be built directly for BitcoinJ itself and be useful for other wallets as well? Or is the actual implementation different for each user of the library (like Bitsquare), such that the tool would need to be specifically aware of Bitsquare’s implementation?

1 Like

You might find even in BitcoinJ a tool doing that. There are a few command line tools. U need to use the branch we use not the master as that would not be compatible probably.
Then just point the wallet file to it. The wallet file is standard bitcoinJ nothing special from Bitsquare in there. But do backups first…
If u want to do it in Bitsquare, there is a headless module what u can use. And the WalletService class it the start point for Btc related stuff…

Indeed, there is one that worked perfectly for my purpose: tools/wallet-tool

I first needed to decrypt the wallet (possible with the tool) and then it was able to dump the addresses and private keys.

@ManfredKarrer
Hi, I really need to access my private keys!

How can I do this the easiest way?

Thanks!

1 Like

Indeed. An easier way would be very much appreciated.

We added a key export tool a while ago:
Alt+j or option+j.
There is alos the emergency wallet too (cmd+e or ctrl+e).

Why you want to access the priv. keys? Please understand that using the keys outside will likely break the internal DB structure!

1 Like

I mistakenly sent bitcoins to a crowdfunding (NVO), that requires you to have your private key, as they send the colored coins back to the same address (I believe).

alt+j gave a popup with priv key option.
Thanks a lot!

When I click the “Include Private Keys” option, I seem something like:

DeterministicKey{pub HEX=02738a5…, isEncrypted=true, isPubKeyOnly=true}

Is this the private key, but encrypted? If so, how do I decrypt it so that bitcoin-qt will accept it? If not, where is the private key?

Ah, I found that when I removed the password to Bitsquare, it printed the private keys decrypted. That’s what I needed.

I am not an expert.
I have my bitcoin in the bitsq HDWallet.
I have upgraded bitsquare and I am currently running the 0.5.1 version.
My latest trade has been done in July (before the BCC fork)
No other trades have been performed since the 1st of August.
I would like to “retrieve/extract” the Bitcoin Cash (BCH or BCC)

How is the easiest way?

I got the screen shot (Alt+j flagging “Include Private Keys”) as suggested in the comment above.

Among all these numbers which one is the private key?
It a single or a multiple value?
(Probably I don’t have a clear idea on this issue. Please be patient)

Once I got the Private Key’ I can import it in the ABC Wallet to get the BCH/BCC as far as I have understood.

May be there is another way to reach the same goal. Suggestion are welcome

Thanks in advance

P.S. Can I perform a trade with Bitsquare before to extract the BCH/BCC or is better to postpone this operation. I think there isn’t any constrains, isn’t it?

I managed to sell my BCH that were in a Bitsquare wallet (hadn’t upgraded to Bisq yet), so here’s how I did it. First of all, I would recommend moving your current Bitcoin to a different wallet. You don’t have to sell them, but at least transfer them to a new wallet with a new private key, for extra security when you share your private key with the BCH software. After that, you go into Bitsquare, turn off the password in settings, otherwise the private keys will show up encrypted. Do the Alt+J hotkey and make sure to check Include Private Keys, and you will see a lot of text describing the wallet. You should see a part like this:

DeterministicKey{pub HEX=02738a515abd770cf730a10c3ac6f6479517daa6c331b473e456a09fba4ee432d8, priv HEX=20c97d7d67b4ffebed9bb7aca1f3b923…, priv WIF=KxKSk6kG78HXXZ4xEhqVY69fH16X…, isEncrypted=false, isPubKeyOnly=false}

The part you want is the WIF (Wallet Import Format). Now you can import that into BCH wallet software. I used Electron Cash. It was a pain in the ass to get running. You can’t install it on the same computer if you have it’s Bitcoin version Electrum installed. The binary didn’t work for me, so I had to run it from source and resolve dependencies to get that working (Python 2.7 and PyQT). Apparently, they put out a YouTube video on how to get it running from the packaged binary, but I don’t know if it works. When you eventually get it running, open the app and from the top menu select Wallet > Private keys > Sweep. Here you can paste in any number of private keys, one per line. Then there is a field to enter which Wallet Address to import them into. The default is a wallet created for you by Electron Cash. You can use that (which is what I did), or you can send your BCH directly to an exchange (haven’t tried it). I used Kraken, but there are several that accept BCH now, so pick your favorite. Click Sweep, and it should send the BCH over. Then you can sell it for whatever currency you like. Good luck!

EDIT by Manfred: I removed part of the private key. Assume you have spent already the funds there, but just in case…

Actually Coinomi wallet doing this With BCH nice and smooth, need just few min to claim your BCH.
All you need is to add BCH and swipe privat key to you BTC (not to BCH) .takes about 5 min. :slight_smile:
And you can exchange it for any coin you like too.

I thank you all
I succeed in transferring BCH/BCC.
I use the Electron Cash Wallet (ver. 2.9.3)
I have performed the following steps:

Wizard windows 1) new wallet (default_wallet)
WW 2) Standard wallet
WW3) I have already a seed
WW4) Options
WW5) BIP39 seeds / I pasted the 12 bitsquare seed words. (No need to import the private keys.)

The wallet synchronized for a while and the balance was right.
I sent the BCC/BCH to and exchange afterwords
Everything went smoothly
Time spent 2/3 minutes.

Thanks again.

1 Like

Thanks for these instructions. Most helpful! :grinning:

Hope you checked this wallet.
Because,on they site warning:
“Please, please, PLEASE… take the time to verify
the authenticty of these files before running them.
This protects you from hackers and malware!”

By entering your seed phrase, you start the process of generating pairs of addresses address\key, with is copy of previous wallets.
So, you expose your secret keys without need to enter them.
If you use the phrase from a multiple coin wallet, you expose all secret keys of all coins and wallets of previous wallet to new wallet program!
So,. in case of someone modifies the code, you in danger ALL of your wallets compare with this phrase!

1 Like