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;
});
});
[link] [comments]
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