Open adangert opened 6 years ago
This also does not work, this is one of my bitcoin cash addresses
var room = 'qr9x435hmf5p0r2m35mjwq2tslce6p0tnctp0datec';
var eventToListenTo = 'qr9x435hmf5p0r2m35mjwq2tslce6p0tnctp0datec';
var socket = io("https://bch-insight.bitpay.com");
socket.on('connect', function() {
// Join the room.
socket.emit('subscribe', room);
})
socket.on(eventToListenTo, function(data) {
console.log("New transaction received: ");
console.log(data);
})
Would also like to know if this is possible as I've tried the above with both legacy and cashaddr with no success. The documentation seems to indicate that this is possible, but I cannot see where this might take place in the code.
socket.on('bitcoind/addresstxid', data => console.log('new address data:', data)) socket.on('connect', () => socket.emit('subscribe', 'bitcoind/addresstxid', [ 'my_address_here' ]))
This code above works for test-insight.bitpay.com but not for the Insight Node I set up. The socket connects and all other events are received well except for the
Facing the same issue with bitcoin addresses, on my own insight node. Would immensely appreciate any help from the developers!
@parikshitsharma70
socket.emit('subscribe', 'bitcoind/addresstxid', [ "btc_address_to_listen" ]) socket.on('bitcoind/addresstxid', function (data) { console.log('New Tx in that address : ', data) // you'll receive the transactions involving that address alone })
And also make sure, insight-api version >= 0.4.3
Thanks a lot, I figured this out eventually. Their docs need to be updated immediately, such a waste of time.
@parikshitsharma70
socket.emit('subscribe', 'bitcoind/addresstxid', [ "btc_address_to_listen" ]) socket.on('bitcoind/addresstxid', function (data) { console.log('New Tx in that address : ', data) // you'll receive the transactions involving that address alone })
And also make sure, insight-api version >= 0.4.3
is it working with bitcoin cash?
currently I only have this which seems to send every transaction, rather than a single address.
var eventToListenTo = 'tx' var room = 'inv' var socket = io("https://blockdozer.com/"); socket.on('connect', function() { // Join the room. socket.emit('subscribe', room); }) socket.on(eventToListenTo, function(data) { console.log(data); })