How to generate these bitcoin addresses?

For the private key KwaZRh42fdQD4iUN6sy2GtEC5gfSAYXrQgp16KPV4Pxsspi5ChRb, I have the following addresses:

  • 1N7jKvQ1fHezb61eNsGEaF4gcj5sQXhb2m (P2PKH)
  • 14MNoFYWheu7sLkj8urvXCpYEdCuL4m2PH (P2PKH)
  • 3G4BoJsFB6N3Eejtovr8PUnvz4LRDhWmxk (P2SH)
  • bc1qu7s8s2ga69a9068s85e9vpxh7uvneet292wa5n (P2WPKH)
  • bc1qxr7lhfgnynvw7dk3e0asw2hsxhdvp4cgp7u0z09stm26gaxqn6zqd9muau (P2WSH)

I am looking for a utility (like the ku utility from which can generate all these address given the private key (the ku does not generate the P2WSH address). The utility I am searching for can be in C, C++, Go or Python.

General book recommendation

Disclaimer for moderators: I am not sure if such a question is allowed in this website. Please feel free to remove it in case it isn’t. This question is based on a similar question on StackOverflow.

There are currently many books on Bitcoin and cryptocurrency/blockchain in general and surely many more will be written. Some are easier to find, some harder. Some are very good, others quite the opposite. Good reviews on websites such as Amazon are not always on par with the quality of the book, and not all books can be found in one place. I propose to provide answers to this question recommending books. The rules are as follows:

  1. Each answer must propose one book only.
  2. Each answer must propose a different book.
  3. The proposal has to contain the book’s author and title. A short description and subjective opinion why this book is worth reading is admissible.

The votes for each answer will determine the relative quality of each book. Please refrain from downvoting a book – simply don’t upvote it.

The idea behind this question is not to argue which book is the best, but to consolidate the knowledge in one place.

Opening a wallet with bitcoind

I am running bitcoind after previously running bitcoin-qt. I made a wallet with bitcoin-qt (and encrypted it) and I would like to open it now with bitcoind. The folder that contains the wallet.dat file is in the data directory, but when I run either of the following:

bitcoin-cli listwallets
bitcoin-cli getwalletinfo

it does not show my wallet. I have tried:

bitcoind -wallet="directory with file"

and still no luck, it just tried to rund bitcoind and says it is already running (not sure why, I am running bitcoind -daemon).

Any idea how I can import this wallet?

How do people using thin clients know the correct merkle path of transactions they’ve sent without knowing the full block?

User A send a transaction to user B. Those transactions are bundled together into a merkle tree. User A and B can both use the transaction plus the merkle root, plus the merkle path to prove the merkle root in the block header is correct.

I understand all that.. what I don’t understand is how do A and B know the correct merkle path without needing the entire block?

Do they need a centralized provider that processes the blocks to calculate these for them? Is it possible to do in a decentralized way?

Step by Step to Connect to ElectrumX via Nodejs

I am developing a simple app that will need to retrieve BTC wallet Address Balance and relative transactions

Initially I thought to use some existing APIs (, etc.), but the limitation in terms of request rates do not fit my project…

Looking at other options it seems that my best bet is:

  • Identify an ElectrumX public server
  • Request blockchain.scripthash.get_balance (via JSON RPC)
  • Request blockchain.scripthash.get_history (via JSON RPC)

now, I am not a techy person, but I like to learn and play around 🙂 therefore I need to “translate the theory into practice”… where do I start? is there a step by step guide “for dummie” tutorial?

Thank you all

Physical safety of crypto owner

Let’s image a scenario where I buy (or trade) BTC on a regular basis and have a large number of coins in my wallet. Of course I’d like to be able to use my coins whenever possible, exchange with friends or strangers locally. So, I move part of my cryptos to another wallet for petty purchases, exchanges, etc.

My concern is, suppose I have a transaction with a malicious person, they can trace back with relatively high certainty to my account. Now I know this is debatable as they couldn’t really tell with certainty but maybe they just don’t care. All it matters is they know or I may have cryptos. In this scenario I am left at their mercy. They could threaten me, there’s cases of kidnapping, etc.

My question is, is there a reasonable way to go around this problem? Bear in mind I’m talking about local exchanges in a relatively small towns, where people know my face and name, not online where I could keep anonymity.

Bitcoin Core JSONRPC only accept requests with in configs

I’ve lunched a Bitcoin Core server, and trying to connect to it via JSON-RPC.
This is my configuration settings:


But all cURL connections to this server via the IP has the same error result as:

cURL error 7: Failed to connect to port 1234: Connection refused

I tried adding this option too, but it did not solve the problem:

Only when I put as a bined RPC IP, Bitcoin core returns true response. I’ve checked many pages but did not find any other appropriate way to allow some certain IPs to Bitcoind. May you help me please?

Note: IP, Port number, username and password are changed from real values.

Delete Bitcoin Qt Mac: System folder inflated in size, although “Application Support/Bitcoin/” and app deleted

I downloaded Bitcoin Qt and the entire blockchain, now I’d like to delete it.

I followed instructions from various search results, which all instructed to delete the app and to delete all data (where the “data”, the blockchain, is supposed to take up so much space) in ~/Library/Preferences/, ~/Library/Application Support/ and ~/Library/Caches/. This was the most comprehensive guide:

In ~/Library/Preferences/ & ~/Library/Caches/, I couldn’t find any related data. In ~/Library/Application Support/, there was a “Bitcoin” folder (which was like 7gb in size according to right click->”Get Info”), which I moved to Trash (was emptied subsequently).

I’m sure that I chose only default options in the installation of Bitcoin Qt – no non-default directories were chosen.

Before Bitcoin Qt, under “Storage management”, “System” took up like 30-50 gb. Now, it takes up 155 gb. The way I understand it, “Library” is basically my system directory. The “Library” directory, via “get info”, shows a total size of 60 gb. However, in “Storage management” System is shown to occupy 155gb. I’m not sure how this makes sense. I have enabled to see all hidden files, so I’m also sure that I’m not overlooking something too obvious.

Rebooting my mac also doesn’t help.

Do you have any clue where the blockchain from Bitcoin Qt could sit, so I can delete it and free up the space?

I use a MacBook Pro Early 2015, macOS High Sierra, Version 10.13.6