I am trying to develop an online application primarily in JavaScript. As I am aware, the only way to receive notifications for unconfirmed/mempool transactions as they appear on the network is to utilize the -zmqpubrawtx
or -zmqpubhashtx
commands in the startup of Bitcoin-Core. I have setup one of these values to be the example -zmqpubhashtx=tcp://127.0.0.1:28332
However, I am having a difficult time implementing this in any browser based JavaScript. The only library that is not based solely on Node.js is JSMQ which does not appear to support tcp://
as the socket type (apparently relies on JavaScripts WebSocket which only lets you use ws://
or wss://
). I am trying to avoid online API usage such as blockchain.info, etc.
My question: Are there any other methods of receiving realtime unconfirmed transactions notifications (that don't belong to a specific wallet) and that doesn't rely on an external/online API? If there is no alternative, are there any known/reputable libraries available for ZeroMQ for JavaScript