MultiversX Tracker is Live!

unable to listen incoming transaction on using zeromq.

Bitcoin Reddit

More / Bitcoin Reddit 96 Views

Here is my script ...

var zmq = require("zeromq"),
sock = new zmq.Socket("sub"),
RpcClient = require("litecoind-rpc");
const Client = require("bitcoin-core");
require("dotenv").config();
var config = {
protocol: "http",
user: "USERID",
pass: "PASSWORD",
host: " 65.2.121.77 ",
port: "18332",
};
const client = (wallet_name) =>
new Client({
wallet: wallet_name,
username: process.env.RPC_USER,
password: process.env.RPC_PASSWORD,
host: process.env.RPC_HOST,
port: process.env.RPC_PORT,
});
console.log(process.env.RPC_PORT);
var rpc = new RpcClient(config);
sock.connect("tcp://43.204.212.116:18332");
sock.subscribe("rawtx");
console.log("Subscriber connected to port 19332");
sock.on("message", function (topic, message) {
rpc.decodeRawTransaction(message.toString("hex"), async function (err, resp){
console.log(resp);
var sender_add;
});
});

submitted by /u/samirjumade
[link] [comments]
Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments