Can I only get confirmed UTXOs?

(Scriz) #1


So I’m currently doing tests on testnet3 using the public insight test API and bitcore-explorers into my Javascript project.
Using this

insight.getUnspentUtxos(address, function(err, utxos));

My problem is that I need to gather every UTXOs from an address, but only thoses that are actually confirmed at least once.

I’m a newbie compared to the majority here so I hope I’ve been clear enough in my request. Thank you very much!

(Nohea) #2

Look for the property “height” in the returned array of utxos. If current blockheight minus utxo.height is 6 or more, you can consider it confirmed for Bitcoin.

(Scriz) #3

Thank you so much, sorry I haven’t received any notification for your answer before.