• About
  • FAQ
  • Earn Bitcoin while Surfing the net
  • Buy & Sell Crypto on Paxful
Newsletter
Approx Foundation
  • Home
    • Home – Layout 1
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Business
  • Guide
  • Contact Us
No Result
View All Result
  • Home
    • Home – Layout 1
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Business
  • Guide
  • Contact Us
No Result
View All Result
Approx Foundation
No Result
View All Result
Home Bitcoin

bitcoinjs – Tracking incoming transactions using nodejs and own node

Moussa by Moussa
May 8, 2026
in Bitcoin
0
How do Bitcoin mining pools typically handle payout frequency versus thresholds?
189
SHARES
1.5k
VIEWS
Share on FacebookShare on Twitter


I need to verify that user from my database has sent btc to my wallet.

Ideally I want to generate a unique address for each user transaction and then track all those addresses but I suppose it will be difficult to implement due to address gap limit, so I decided to just ask users for their bitcoin address and then expecting tx with funds transfer from that address to my wallet so I can verify funds were sent by them.

I have own bitcoin node which I want to use for tracking all the transactions to my wallet.

So let’s say I want to track all txs just to my wallet address.

I was following the guide how to implement this with ZEROMQ. I’ve updated bitcoind config file with to can listen for raw txs via zeromq.
There are my nodejs code:

const bitcoin = require('bitcoinjs-lib');
const zmq = require('zeromq');

const sock = zmq.socket('sub');
const addr="tcp://127.0.0.1:3000";

module.exports = function (app) {

    sock.connect(addr);
    sock.subscribe('rawtx');

    sock.on('message', function (topic, message) {
        if (topic.toString() === 'rawtx') {
            let rawTx = message.toString('hex');
            let tx = bitcoin.Transaction.fromHex(rawTx);
            let txid = tx.getId();

            const address = bitcoin.address.fromOutputScript(tx.outs[0].script, bitcoin.networks.testnet);

            console.log("address ", address)
            console.log('received transaction', txid, tx);
        }
    });
}

As I understand, when I connect to node in live network from this code, I’ll be notified about all txs that are happening in the network?

How can I validate transactions with transferring funds only to my wallet and decode address from which funds were transferred?

Are there some easy ways to implement this and maybe some code/project examples?



Source link

Related articles

Bitcoin Price Prediction: Dips, Healthy Pullbacks, and Psychological Floors

Bitcoin Price Prediction: Dips, Healthy Pullbacks, and Psychological Floors

May 8, 2026
BNY Partners with Key Companies to Expand Crypto Custody in the UAE

BNY Partners with Key Companies to Expand Crypto Custody in the UAE

May 8, 2026
Share76Tweet47

Related Posts

Bitcoin Price Prediction: Dips, Healthy Pullbacks, and Psychological Floors

Bitcoin Price Prediction: Dips, Healthy Pullbacks, and Psychological Floors

by Moussa
May 8, 2026
0

Bitcoin price slipped to $79,800, breaking below the $80,000 mark after a failed push above the $82,800 resistance, all while...

BNY Partners with Key Companies to Expand Crypto Custody in the UAE

BNY Partners with Key Companies to Expand Crypto Custody in the UAE

by Moussa
May 8, 2026
0

Trusted Editorial content, reviewed by leading industry experts and seasoned editors. Ad Disclosure BNY, the world’s largest custodian bank overseeing...

Bitcoin Reclaims Short-Term Holder Cost Basis—What It Means

Bitcoin Reclaims Short-Term Holder Cost Basis—What It Means

by Moussa
May 8, 2026
0

Keshav is currently a senior writer at NewsBTC and has been attached to the website since June 14, 2021. Keshav...

Bitcoin Price Tops $81,000 For First Time Since January

Bitcoin Price Tops $81,000 For First Time Since January

by Moussa
May 8, 2026
0

Bitcoin price broke above $81,000 during Asian trading hours and early U.S. hours today, its highest price since late January...

Bermuda Pushes New USDC Airdrop as Premier Burt Targets Local Merchants

Bermuda Pushes New USDC Airdrop as Premier Burt Targets Local Merchants

by Moussa
May 8, 2026
0

Key TakeawaysPremier David Burt revealed a new USDC airdrop and merchant program at Consensus Miami 2026 on May 6.Bermuda uses...

Load More

youssufi.com

sephina.com

[vc_row full_width="stretch_row" parallax="content-moving" vc_row_background="" background_repeat="no-repeat" background_position="center center" footer_scheme="dark" css=".vc_custom_1517813231908{padding-top: 60px !important;padding-bottom: 30px !important;background-color: #191818 !important;background-position: center;background-repeat: no-repeat !important;background-size: cover !important;}" footer_widget_title_color="#fcbf46" footer_button_bg="#fcb11e"][vc_column width="1/4"]

We bring you the latest in Crypto News

[/vc_column][vc_column width="1/4"][vc_wp_categories]
[/vc_column][vc_column width="1/4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3MlM0QlMjJ0bnAtZmllbGQlMjB0bnAtcHJpdmFjeS1maWVsZCUyMiUzRSUzQ2xhYmVsJTNFJTNDaW5wdXQlMjB0eXBlJTNEJTIyY2hlY2tib3glMjIlMjBuYW1lJTNEJTIybnklMjIlMjByZXF1aXJlZCUyMGNsYXNzJTNEJTIydG5wLXByaXZhY3klMjIlM0UlQzIlQTBCeSUyMGNvbnRpbnVpbmclMkMlMjB5b3UlMjBhY2NlcHQlMjB0aGUlMjBwcml2YWN5JTIwcG9saWN5JTNDJTJGbGFiZWwlM0UlM0MlMkZkaXYlM0UlM0NkaXYlMjBjbGFzcyUzRCUyMnRucC1maWVsZCUyMHRucC1maWVsZC1idXR0b24lMjIlM0UlM0NpbnB1dCUyMGNsYXNzJTNEJTIydG5wLXN1Ym1pdCUyMiUyMHR5cGUlM0QlMjJzdWJtaXQlMjIlMjB2YWx1ZSUzRCUyMlN1YnNjcmliZSUyMiUyMCUzRSUwQSUzQyUyRmRpdiUzRSUwQSUzQyUyRmZvcm0lM0UlMEElM0MlMkZkaXYlM0UlM0NiciUyRiUzRSUzQyUyRnAlM0U=[/vc_raw_html][/vc_column][/vc_row]
No Result
View All Result
  • Contact Us
  • Homepages
  • Business
  • Guide

© 2024 APPROX FOUNDATION - The Crypto Currency News