I would like to verify if somebody send ETH to a particular address. How can I get the list of incoming (pending) transactions with web3 ?
I tried the example in the web3 documentation with subscribe(“pendingTransactions”):
http://web3js.readthedocs.io/en/1.0/web3-eth-subscribe.html#id7
var subscription = web3.eth.subscribe('pendingTransactions', function(error, result){
if (!error)
console.log(transaction);
})
.on("data", function(transaction){
});
But I get the following error: TypeError: web3.eth.subscribe is not a function
Is there a way to get that list ?