I want to make a basic program/script that utilizes Bitcoin payments, but I don't have the storage space to sync with the entire blockchain, and I don't want to be dependent on a third-party API like those offered by blockchain.info or block.io.
Basically, I need a wallet with these three properies:
- Lightweight (i.e. doesn't require the full blockchain)
- Has a CLI to generate and return a receiving address on command
- Has a CLI to get the total wallet balance
I'm vaguely familiar with thin clients such as Electrum
, MultiBit
, and MultiBit HD
, and I know Electrum even has a CLI, but there doesn't seem to be anything in their documentation about generating new addresses:
https://docs.electrum.org/en/latest/cmdline.html
I've read that Electrum wallets work with a queue of addresses and generate new ones automatically after they have been used, so even if I could just get a list of addresses associated with the wallet I could get something like the functionality I want. But again, the CLI seems really limited.
All in all, I'm frustrated. Surely there is a way to do what I am trying to do, and if there isn't an obvious solution, why not? It seems counterintuitive that I should have to use centralized services and APIs for basic wallet functionality just because I can't afford to rent a server with 90+GB of space to store the blockchain.