I am new to bitcoin. I've read multiple articles and posts on forums and unfortunately I haven't found the answer I am looking for.
Some back story...
I just bought a 2TB SSD storage, and installed bitcoin full node on it. I played around with the API and noticed that I cannot retrieve the balance for some arbitrary address without importing the account, and sum all the unspent transactions.
I would like to create some program, that when given an arbitrary address, I will be able to output the updated balance instantly without having to wait ~20 minutes for every 'new' address.
Is there some way I can achieve this without importing any addresses?
I was wondering if there's a way to somehow pre-process (single scan) all the transactions in the blockchain, while holding a large table, that inserts new addresses that are mentioned in a transaction, and updates their balance on the go, with every transaction (based on the information in the transaction).
I would appreciate all answers, preferably practical solutions rather than general discussion.
Also, if there's a way to do this with/without changing the bitcoin API, let me know :)