If I have an xpub key (well ypub, but same thing) from my Trezor and I want to query this coldstorage balance using bitcoind... I can't see an obvious way to do this and feel I must be missing a trick as surely everyone does this?
In absence of bitcoind allowing an xpub key query directly, I believe we can generate a bunch of addresses from the xpub key and was planning on asking bitcoind via rpc calls the balances of these addresses however this doesn't seem straight forward. Firstly it requires rescanning which seems like it would be unworkably slow as addresses are generated all the time. Secondly it would indicate another bitcoin node (or at least another bitcoin wallet) would need to be created since it would conflict with my hotwallet.
I see many sites do offer exactly this capability so looking for help on how to do this.
I don't want to use any external API service like blockchain.info or trezor.io since I want to actually do this using our own tech stack.
Any help/pointers really appreciated.
(We use node.js as a backend if anyone happens to know any node modules that may help too.)
Thanks,